linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: James Courtier-Dutton <James@superbug.demon.co.uk>,
	linux-ide@vger.kernel.org
Subject: [PATCH 2.6.15-rc1] libata: fix passthru for slave devices
Date: Sat, 12 Nov 2005 18:54:34 -0500	[thread overview]
Message-ID: <437680BA.40707@rtr.ca> (raw)
In-Reply-To: <4376788E.9010503@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 234 bytes --]

This patch forces a correct master/slave unit bit
when sending libata commands via SCSI passthru.
The bit is left as-is for ports which do not
support slave devices.

Compiles, not tested.

Signed-off-by: Mark Lord <mlord@pobox.com>


[-- Attachment #2: passthru.patch --]
[-- Type: text/x-patch, Size: 532 bytes --]

--- linux-2.6.15-rc1/drivers/scsi/libata-scsi.c.orig	2005-11-11 20:43:36.000000000 -0500
+++ linux/drivers/scsi/libata-scsi.c	2005-11-12 18:45:43.000000000 -0500
@@ -2276,6 +2276,12 @@
 		tf->device = scsicmd[8];
 		tf->command = scsicmd[9];
 	}
+	/*
+	 * If applicable, enforce a correct master/slave bit for this device:
+	 */
+	if ((qc->ap->flags & ATA_FLAG_SLAVE_POSS))
+		tf->command = qc->dev->devno ?
+			(tf->command | ATA_DEV1) : (tf->command & ~ATA_DEV1);
 
 	/*
 	 * Filter SET_FEATURES - XFER MODE command -- otherwise,

  reply	other threads:[~2005-11-12 23:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 10:55 libata-passthrough problem James Courtier-Dutton
2005-11-12 15:18 ` Mark Lord
2005-11-12 17:57   ` Jeff Garzik
2005-11-12 19:53     ` Mark Lord
2005-11-12 19:56       ` Mark Lord
2005-11-12 23:19         ` Jeff Garzik
2005-11-12 23:54           ` Mark Lord [this message]
2005-11-12 23:55             ` [PATCH 2.6.15-rc1] libata: fix comments on ata_tf_from_fis() Mark Lord
2005-11-13  0:15             ` [PATCH 2.6.15-rc1] libata: fix passthru for slave devices Jeff Garzik
2005-11-13  2:50               ` Mark Lord
2005-11-13  3:20                 ` Jeff Garzik
2005-11-13  4:37                   ` Mark Lord
2005-11-13  0:16             ` Jeff Garzik
2005-11-13  2:48               ` Mark Lord
2005-11-13  3:04             ` Mark Lord
2005-11-13  3:11               ` Mark Lord
2005-11-12 23:19       ` libata-passthrough problem Jeff Garzik
2005-11-12 23:40         ` Mark Lord
2005-11-13 15:13           ` James Courtier-Dutton
2005-11-13 17:01             ` Mark Lord
2005-11-13 17:03               ` Mark Lord
2005-11-13 20:17                 ` James Courtier-Dutton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=437680BA.40707@rtr.ca \
    --to=liml@rtr.ca \
    --cc=James@superbug.demon.co.uk \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).