From dcc2d1e7f0acf7d3f7ae632a73cd5f828ef9de20 Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Sun, 13 Nov 2005 16:22:06 -0500 Subject: [PATCH] [libata passthru] address slave devices correctly --- drivers/scsi/libata-scsi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 261be24e1df3..0df4b682965d 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -2276,6 +2276,12 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd) tf->device = scsicmd[8]; tf->command = scsicmd[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; /* * Filter SET_FEATURES - XFER MODE command -- otherwise, -- 2.34.1