/**
* ata_to_sense_error - convert ATA error to SCSI error
* @qc: Command that we are erroring out
- * @drv_stat: value contained in ATA status register
*
* Converts an ATA error into a SCSI error. While we are at it
* we decode and dump the ATA error for the user so that they
ata_sg_init_one(qc, cmd->request_buffer,
cmd->request_bufflen);
- qc->dma_dir = cmd->sc_data_direction;
+ qc->pci_dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
}
qc->complete_fn = ata_scsi_qc_complete;
/**
* ata_scsi_rbuf_put - Unmap response buffer.
* @cmd: SCSI command containing buffer to be unmapped.
- * @buf: buffer to unmap
*
* Unmaps response buffer contained within @cmd.
*
int using_pio = (dev->flags & ATA_DFLAG_PIO);
int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE);
- if (!using_pio)
- /* Check whether ATAPI DMA is safe */
- if (ata_check_atapi_dma(qc))
- using_pio = 1;
-
memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len);
qc->complete_fn = atapi_qc_complete;
/**
* ata_scsi_find_dev - lookup ata_device from scsi_cmnd
* @ap: ATA port to which the device is attached
- * @scsidev: SCSI device from which we derive the ATA device
+ * @cmd: SCSI command to be sent to the device
*
* Given various information provided in struct scsi_cmnd,
* map that onto an ATA bus, and using that mapping