aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 4e5e54a1564b..4c96df060c3b 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -305,7 +305,7 @@ void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat)
305 sb[0] = 0x70; 305 sb[0] = 0x70;
306 sb[2] = MEDIUM_ERROR; 306 sb[2] = MEDIUM_ERROR;
307 sb[7] = 0x0A; 307 sb[7] = 0x0A;
308 if (cmd->sc_data_direction == SCSI_DATA_READ) { 308 if (cmd->sc_data_direction == DMA_FROM_DEVICE) {
309 sb[12] = 0x11; /* "unrecovered read error" */ 309 sb[12] = 0x11; /* "unrecovered read error" */
310 sb[13] = 0x04; 310 sb[13] = 0x04;
311 } else { 311 } else {
@@ -671,8 +671,8 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
671 return; 671 return;
672 672
673 /* data is present; dma-map it */ 673 /* data is present; dma-map it */
674 if (cmd->sc_data_direction == SCSI_DATA_READ || 674 if (cmd->sc_data_direction == DMA_FROM_DEVICE ||
675 cmd->sc_data_direction == SCSI_DATA_WRITE) { 675 cmd->sc_data_direction == DMA_TO_DEVICE) {
676 if (unlikely(cmd->request_bufflen < 1)) { 676 if (unlikely(cmd->request_bufflen < 1)) {
677 printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n", 677 printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n",
678 ap->id, dev->devno); 678 ap->id, dev->devno);
@@ -1304,7 +1304,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
1304 struct scsi_cmnd *cmd = qc->scsicmd; 1304 struct scsi_cmnd *cmd = qc->scsicmd;
1305 struct ata_device *dev = qc->dev; 1305 struct ata_device *dev = qc->dev;
1306 int using_pio = (dev->flags & ATA_DFLAG_PIO); 1306 int using_pio = (dev->flags & ATA_DFLAG_PIO);
1307 int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE); 1307 int nodata = (cmd->sc_data_direction == DMA_NONE);
1308 1308
1309 if (!using_pio) 1309 if (!using_pio)
1310 /* Check whether ATAPI DMA is safe */ 1310 /* Check whether ATAPI DMA is safe */
@@ -1316,7 +1316,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
1316 qc->complete_fn = atapi_qc_complete; 1316 qc->complete_fn = atapi_qc_complete;
1317 1317
1318 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; 1318 qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
1319 if (cmd->sc_data_direction == SCSI_DATA_WRITE) { 1319 if (cmd->sc_data_direction == DMA_TO_DEVICE) {
1320 qc->tf.flags |= ATA_TFLAG_WRITE; 1320 qc->tf.flags |= ATA_TFLAG_WRITE;
1321 DPRINTK("direction: write\n"); 1321 DPRINTK("direction: write\n");
1322 } 1322 }
@@ -1340,7 +1340,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
1340 1340
1341#ifdef ATAPI_ENABLE_DMADIR 1341#ifdef ATAPI_ENABLE_DMADIR
1342 /* some SATA bridges need us to indicate data xfer direction */ 1342 /* some SATA bridges need us to indicate data xfer direction */
1343 if (cmd->sc_data_direction != SCSI_DATA_WRITE) 1343 if (cmd->sc_data_direction != DMA_TO_DEVICE)
1344 qc->tf.feature |= ATAPI_DMADIR; 1344 qc->tf.feature |= ATAPI_DMADIR;
1345#endif 1345#endif
1346 } 1346 }