aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2007-06-07 03:52:07 -0400
committerJeff Garzik <jeff@garzik.org>2007-06-09 23:08:12 -0400
commitfa4453c4c94a61bbefe470b16ddbb6218481c6dc (patch)
tree63a861f6fdb92729f7f15b65684e5add0bac5c62
parent23cb1d718ddbeb718ed7ca5be283dcbfb63993c3 (diff)
libata passthru: always enforce correct DEV bit
Always enforce correct DEV bit since we know which drive the command is targeted. SAT demands to ignore the DEV bit, too. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-scsi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 8c6a2b2e81b4..884f52f43f8f 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2595,12 +2595,10 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
2595 tf->device = cdb[8]; 2595 tf->device = cdb[8];
2596 tf->command = cdb[9]; 2596 tf->command = cdb[9];
2597 } 2597 }
2598 /* 2598
2599 * If slave is possible, enforce correct master/slave bit 2599 /* enforce correct master/slave bit */
2600 */ 2600 tf->device = dev->devno ?
2601 if (qc->ap->flags & ATA_FLAG_SLAVE_POSS) 2601 tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
2602 tf->device = qc->dev->devno ?
2603 tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
2604 2602
2605 /* sanity check for pio multi commands */ 2603 /* sanity check for pio multi commands */
2606 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) 2604 if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf))