Skip to content

Commit

Permalink
libata passthru: always enforce correct DEV bit
Browse files Browse the repository at this point in the history
 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>
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Jun 10, 2007
1 parent 23cb1d7 commit fa4453c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2595,12 +2595,10 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
tf->device = cdb[8];
tf->command = cdb[9];
}
/*
* If slave is possible, enforce correct master/slave bit
*/
if (qc->ap->flags & ATA_FLAG_SLAVE_POSS)
tf->device = qc->dev->devno ?
tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;

/* enforce correct master/slave bit */
tf->device = dev->devno ?
tf->device | ATA_DEV1 : tf->device & ~ATA_DEV1;

/* sanity check for pio multi commands */
if ((cdb[1] & 0xe0) && !is_multi_taskfile(tf))
Expand Down

0 comments on commit fa4453c

Please sign in to comment.