-int
-scsi_read_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size)
-{
- return __scsi_buffer_io(dev, lba, buffer, size, 0);
-}
-
-int
-scsi_write_buffer(struct hba_device* dev,
- uint64_t lba,
- void* buffer,
- uint32_t size)
-{
- return __scsi_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);