From: Doug Ledford <dledford@redhat.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
James Bottomley <James.Bottomley@steeleye.com>
Cc: linux-scsi mailing list <linux-scsi@vger.kernel.org>
Subject: [PATCH] sym53c8xx PPR negotiation fix
Date: Wed, 29 Oct 2003 12:07:01 -0500 [thread overview]
Message-ID: <1067447221.3112.336.camel@compaq.xsintricity.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
Marcelo,
I've verified that this problem still exists as of 2.4.23-pre8. The
sym53c8xx driver doesn't bother to check that a device should support
PPR negotiation messages before attempting to use them on Ultra160
controllers. PPR negotiations were added to the SCSI-3 standard (they
are required to negotiate Ultra160 or higher speeds) and should be
limited to SCSI-3 devices. For back compatibility some modern devices
that support Ultra160 or above speeds still need to report themselves as
SCSI-2 devices. Those devices are required to signal that they know
about PPR messages by setting the DT bit in the device's INQUIRY data.
This patch adds that check.
Why add this check? Two reasons. One, correctness. It's the right
thing to do. Two, it fixes a bug with some DVD drives (the drives don't
report that they support PPR, but if the driver tries to use PPR then
the drive will accept it and respond in kind, but the drive fails to
actually properly set the sync speed after the PPR negotiation is
complete and the bus locks up as a result).
I haven't checked if this is applicable to 2.6 as well. James?
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
[-- Attachment #2: sym.patch --]
[-- Type: text/x-patch, Size: 682 bytes --]
diff -urNp linux-5420/drivers/scsi/sym53c8xx.c linux-5430/drivers/scsi/sym53c8xx.c
--- linux-5420/drivers/scsi/sym53c8xx.c
+++ linux-5430/drivers/scsi/sym53c8xx.c
@@ -11981,6 +11981,19 @@ static lcb_p ncr_setup_lcb (ncb_p np, u_
inq_byte7 |= INQ7_SYNC;
/*
+ ** Don't do PPR negotiations on SCSI-2 devices unless
+ ** they set the DT bit (0x04) in byte 57 of the INQUIRY
+ ** return data.
+ */
+ if (((inq_data[2] & 0x07) < 3) && (inq_data[4] < 53 ||
+ !(inq_data[56] & 0x04))) {
+ if (tp->minsync < 10)
+ tp->minsync = 10;
+ if (tp->usrsync < 10)
+ tp->usrsync = 10;
+ }
+
+ /*
** Prepare negotiation if SIP capabilities have changed.
*/
tp->inq_done = 1;
next reply other threads:[~2003-10-29 17:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-29 17:07 Doug Ledford [this message]
2003-10-29 17:11 ` [PATCH] sym53c8xx PPR negotiation fix James Bottomley
2003-10-29 17:50 ` Matthew Wilcox
2003-10-29 18:02 ` Doug Ledford
[not found] ` <20031029183159.GE25237@parcelfarce.linux.theplanet.co.uk>
2003-10-29 18:45 ` Doug Ledford
2003-10-31 23:55 ` Justin T. Gibbs
2003-10-31 23:55 ` James Bottomley
2003-11-01 0:08 ` Doug Ledford
2003-11-01 0:16 ` Justin T. Gibbs
2003-11-01 1:22 ` Mike Anderson
2003-11-01 2:34 ` James Bottomley
2003-11-01 3:09 ` Doug Ledford
2003-11-03 18:10 ` Mike Anderson
2003-11-04 7:10 ` Christoph Hellwig
2003-11-05 9:26 ` Mike Anderson
2003-11-06 9:04 ` Mike Anderson
2003-11-06 9:07 ` Christoph Hellwig
2003-11-06 9:21 ` Mike Anderson
2003-11-01 0:02 ` Doug Ledford
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=1067447221.3112.336.camel@compaq.xsintricity.com \
--to=dledford@redhat.com \
--cc=James.Bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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