提交 fa4453c4 编写于 作者: A Albert Lee 提交者: Jeff Garzik

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: NAlbert Lee <albertcc@tw.ibm.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 23cb1d71
...@@ -2595,12 +2595,10 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc) ...@@ -2595,12 +2595,10 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
tf->device = cdb[8]; tf->device = cdb[8];
tf->command = cdb[9]; tf->command = cdb[9];
} }
/*
* If slave is possible, enforce correct master/slave bit /* enforce correct master/slave bit */
*/ tf->device = dev->devno ?
if (qc->ap->flags & ATA_FLAG_SLAVE_POSS) tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
tf->device = qc->dev->devno ?
tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;
/* sanity check for pio multi commands */ /* sanity check for pio multi commands */
if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf)) if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册