From: James Bottomley <James.Bottomley@SteelEye.com>
To: Graham Knap <graham.knap@rogers.com>
Cc: Horms <horms@debian.org>, Doug Ledford <dledford@redhat.com>,
338089@bugs.debian.org, linux-scsi@vger.kernel.org
Subject: Re: Bug#338089: New aic7xxx driver fails spectacularly on 2940UW
Date: Mon, 28 Nov 2005 15:41:58 -0600 [thread overview]
Message-ID: <1133214118.3325.59.camel@mulgrave> (raw)
In-Reply-To: <20051121022158.82709.qmail@web88012.mail.re2.yahoo.com>
On Sun, 2005-11-20 at 21:21 -0500, Graham Knap wrote:
> Sure enough, the kernel now boots. I'll attach the "dmesg" output here.
>
> Do you guys have a "final" patch in mind?
>
> Let me know if there are other tests you'd like me to run. Now that I
> know how to do this, I should be able to turn around test results
> fairly quickly.
OK, try the attached. If it works out, I'll soak it in -mm for a while
and then try to put it in as a bug fix for 2.6.15.
James
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -812,12 +812,10 @@ spi_dv_device_internal(struct scsi_devic
if (!scsi_device_sync(sdev) && !scsi_device_dt(sdev))
return;
- /* see if the device has an echo buffer. If it does we can
- * do the SPI pattern write tests */
-
- len = 0;
- if (scsi_device_dt(sdev))
- len = spi_dv_device_get_echo_buffer(sdev, buffer);
+ /* len == -1 is the signal that we need to ascertain the
+ * presence of an echo buffer before trying to use it. len ==
+ * 0 means we don't have an echo buffer */
+ len = -1;
retry:
@@ -840,11 +838,23 @@ spi_dv_device_internal(struct scsi_devic
if (spi_min_period(starget) == 8)
DV_SET(pcomp_en, 1);
}
+ /* Do the read only INQUIRY tests */
+ spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len,
+ spi_dv_device_compare_inquiry);
+ /* See if we actually managed to negotiate and sustain DT */
+ if (i->f->get_dt)
+ i->f->get_dt(starget);
+
+ /* see if the device has an echo buffer. If it does we can do
+ * the SPI pattern write tests. Because of some broken
+ * devices, we *only* try this on a device that has actually
+ * negotiated DT */
+
+ if (len == -1 && spi_dt(starget))
+ len = spi_dv_device_get_echo_buffer(sdev, buffer);
- if (len == 0) {
+ if (len <= 0) {
starget_printk(KERN_INFO, starget, "Domain Validation skipping write tests\n");
- spi_dv_retrain(sdev, buffer, buffer + len,
- spi_dv_device_compare_inquiry);
return;
}
next prev parent reply other threads:[~2005-11-28 21:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 2:21 Bug#338089: New aic7xxx driver fails spectacularly on 2940UW Graham Knap
2005-11-28 21:41 ` James Bottomley [this message]
2005-11-28 22:26 ` Doug Ledford
2005-12-05 1:49 ` Graham Knap
2005-12-12 17:53 ` Florian Ernst
-- strict thread matches above, loose matches on Subject: below --
2005-11-14 10:15 emmanuel.fuste
[not found] <20051108024523.35622.qmail@web88006.mail.re2.yahoo.com>
2005-11-08 3:31 ` Horms
2005-11-08 14:10 ` James Bottomley
2005-11-09 1:47 ` Graham Knap
2005-11-13 4:16 ` James Bottomley
2005-11-13 16:47 ` Graham Knap
2005-11-13 17:41 ` Doug Ledford
2005-11-13 17:46 ` James Bottomley
2005-11-15 0:45 ` Graham Knap
2005-11-16 2:37 ` Horms
2005-11-13 18:03 ` Graham Knap
2005-11-13 18:21 ` James Bottomley
2005-11-13 19:42 ` Doug Ledford
2005-11-13 21:51 ` James Bottomley
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=1133214118.3325.59.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=338089@bugs.debian.org \
--cc=dledford@redhat.com \
--cc=graham.knap@rogers.com \
--cc=horms@debian.org \
--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