- int is_ok = ahci_try_send(port, slot);
-
- vfree_dma(table);
- return is_ok;
-}
-
-int
-sata_read_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size)
-{
- return __sata_buffer_io(dev, lba, buffer, size, 0);
-}
-
-int
-sata_write_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size)
-{
- return __sata_buffer_io(dev, lba, buffer, size, 1);
-}
+ // The async way...
+ struct hba_cmd_state* cmds = valloc(sizeof(struct hba_cmd_state));
+ *cmds = (struct hba_cmd_state){ .cmd_table = table, .state_ctx = io_req };
+ ahci_post(port, cmds, slot);
+}
\ No newline at end of file