- int slot = hba_alloc_slot(port, &table, &header, 0);
+ int slot = hba_prepare_cmd(port, &table, &header, buffer, size);
header->options |= (HBA_CMDH_WRITE * (write == 1)) | HBA_CMDH_ATAPI;
uint32_t count = ICEIL(size, port->device->block_size);
header->options |= (HBA_CMDH_WRITE * (write == 1)) | HBA_CMDH_ATAPI;
uint32_t count = ICEIL(size, port->device->block_size);
} else {
scsi_create_packet12((struct scsi_cdb12*)cdb,
write ? SCSI_WRITE_BLOCKS_12 : SCSI_READ_BLOCKS_12,
lba,
count);
} else {
scsi_create_packet12((struct scsi_cdb12*)cdb,
write ? SCSI_WRITE_BLOCKS_12 : SCSI_READ_BLOCKS_12,
lba,
count);