Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa4453c4 authored by Albert Lee's avatar Albert Lee Committed by Jeff Garzik
Browse files

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: default avatarAlbert Lee <albertcc@tw.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 23cb1d71
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2595,11 +2595,9 @@ 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 ?

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

	/* sanity check for pio multi commands */