From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] Blacklist devices that falsely claim an echo buffer
Date: Mon, 6 Dec 2004 20:54:26 +0000 [thread overview]
Message-ID: <20041206205426.GC10881@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <1102345160.2018.1.camel@mulgrave>
On Mon, Dec 06, 2004 at 08:59:13AM -0600, James Bottomley wrote:
> Well ... I'm not very keen on this. Does the device support LVD? i.e.
> could we use the sreq->sr_device->ppr flag as a discriminator? Write
> echo buffer tests are really most useful for validating high LVD
> transfer speeds, so it wouldn't be unreasonable simply to skip them if
> the device isn't ppr capable.
James explained to me offline that echo buffers were introduced at the
same time as the LVD extensions, so it's quite reasonly to assume ppr
will be set if the device supports echo buffers. Here's the patch I'm
currently using which works:
Index: linux-2.6/drivers/scsi/scsi_transport_spi.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/scsi/scsi_transport_spi.c,v
retrieving revision 1.6
diff -u -p -r1.6 scsi_transport_spi.c
--- linux-2.6/drivers/scsi/scsi_transport_spi.c 21 Oct 2004 18:59:23 -0000 1.6
+++ linux-2.6/drivers/scsi/scsi_transport_spi.c 6 Dec 2004 20:51:40 -0000
@@ -635,7 +635,11 @@ spi_dv_device_internal(struct scsi_reque
/* OK, now we have our initial speed set by the read only inquiry
* test, now try an echo buffer test (if the device allows it) */
- if ((len = spi_dv_device_get_echo_buffer(sreq, buffer)) == 0) {
+ len = 0;
+ if (sdev->ppr)
+ len = spi_dv_device_get_echo_buffer(sreq, buffer);
+
+ if (len == 0) {
SPI_PRINTK(sdev->sdev_target, KERN_INFO, "Domain Validation skipping write tests\n");
return;
}
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
prev parent reply other threads:[~2004-12-06 20:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-03 20:19 [PATCH] Blacklist devices that falsely claim an echo buffer Matthew Wilcox
2004-12-06 14:59 ` James Bottomley
2004-12-06 20:54 ` Matthew Wilcox [this message]
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=20041206205426.GC10881@parcelfarce.linux.theplanet.co.uk \
--to=matthew@wil.cx \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@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