Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10385
b: refs/heads/master
c: 0274aa2
h: refs/heads/master
i:
  10383: 277e37f
v: v3
  • Loading branch information
Jeff Garzik authored and Jeff Garzik committed Jun 22, 2005
1 parent 4d4dbc8 commit 0538c25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80bd6d7f5e0d872a0f5a151473d2a39d95d210a8
refs/heads/master: 0274aa2506fd2fe89a58dd6cd64d3b3f7b976af8
16 changes: 10 additions & 6 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,11 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc)

sb[0] = 0x70;
sb[7] = 0x0a;

#if 0 /* when C/H/S support is merged */
if (tf->flags & ATA_TFLAG_LBA && !(tf->flags & ATA_TFLAG_LBA48)) {
#endif
if (!(tf->flags & ATA_TFLAG_LBA48)) {
/* A small (28b) LBA will fit in the 32b info field */
sb[0] |= 0x80; /* set valid bit */
sb[3] = tf->device & 0x0f;
Expand Down Expand Up @@ -977,8 +981,8 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
return;

/* data is present; dma-map it */
if (cmd->sc_data_direction == SCSI_DATA_READ ||
cmd->sc_data_direction == SCSI_DATA_WRITE) {
if (cmd->sc_data_direction == DMA_FROM_DEVICE ||
cmd->sc_data_direction == DMA_TO_DEVICE) {
if (unlikely(cmd->request_bufflen < 1)) {
printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n",
ap->id, dev->devno);
Expand Down Expand Up @@ -1609,7 +1613,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
struct scsi_cmnd *cmd = qc->scsicmd;
struct ata_device *dev = qc->dev;
int using_pio = (dev->flags & ATA_DFLAG_PIO);
int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE);
int nodata = (cmd->sc_data_direction == DMA_NONE);

if (!using_pio)
/* Check whether ATAPI DMA is safe */
Expand All @@ -1621,7 +1625,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)
qc->complete_fn = atapi_qc_complete;

qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
if (cmd->sc_data_direction == SCSI_DATA_WRITE) {
if (cmd->sc_data_direction == DMA_TO_DEVICE) {
qc->tf.flags |= ATA_TFLAG_WRITE;
DPRINTK("direction: write\n");
}
Expand All @@ -1645,7 +1649,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, u8 *scsicmd)

#ifdef ATAPI_ENABLE_DMADIR
/* some SATA bridges need us to indicate data xfer direction */
if (cmd->sc_data_direction != SCSI_DATA_WRITE)
if (cmd->sc_data_direction != DMA_TO_DEVICE)
qc->tf.feature |= ATAPI_DMADIR;
#endif
}
Expand Down Expand Up @@ -1821,7 +1825,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, u8 *scsicmd)
*/
tf->flags |= (ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE);

if (cmd->sc_data_direction == SCSI_DATA_WRITE)
if (cmd->sc_data_direction == DMA_TO_DEVICE)
tf->flags |= ATA_TFLAG_WRITE;

/*
Expand Down

0 comments on commit 0538c25

Please sign in to comment.