From: James Bottomley <James.Bottomley@SteelEye.com>
To: Mark Haverkamp <markh@linux-foundation.org>
Cc: Eric Moore <eric.moore@lsi.com>, linux-scsi@vger.kernel.org
Subject: RE: [PATCH] scsi spi transport: SCSI domain validation after reset
Date: Mon, 12 Feb 2007 15:45:25 -0600 [thread overview]
Message-ID: <1171316725.3690.16.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <1171296886.23143.6.camel@markh3.pdx.osdl.net>
On Mon, 2007-02-12 at 08:14 -0800, Mark Haverkamp wrote:
> This patch fixed my looping DV problem.
As far as I can tell, this is identical to Eric's patch, but is done
using the existing dv_in_progress flag ... can you test it out and see
if it actually works?
Thanks,
James
Index: linux-2.6/drivers/scsi/scsi_transport_spi.c
===================================================================
--- linux-2.6.orig/drivers/scsi/scsi_transport_spi.c 2007-02-11 14:16:51.000000000 -0600
+++ linux-2.6/drivers/scsi/scsi_transport_spi.c 2007-02-12 15:20:59.000000000 -0600
@@ -787,6 +787,7 @@ spi_dv_device_internal(struct scsi_devic
struct scsi_target *starget = sdev->sdev_target;
struct Scsi_Host *shost = sdev->host;
int len = sdev->inquiry_len;
+
/* first set us up for narrow async */
DV_SET(offset, 0);
DV_SET(width, 0);
@@ -917,8 +918,25 @@ spi_dv_device(struct scsi_device *sdev)
if (unlikely(scsi_device_get(sdev)))
return;
- if (unlikely(spi_dv_in_progress(starget)))
+ if (unlikely(spi_dv_in_progress(starget))) {
+ /*
+ * If DV is already pending, just make sure the device
+ * has all the parameters set (in case this is the
+ * result of a reset during the in progress DV)
+ */
+ DV_SET(dt, spi_dt(starget));
+ DV_SET(iu, spi_iu(starget));
+ DV_SET(width, spi_width(starget));
+ DV_SET(offset, spi_offset(starget));
+ DV_SET(period, spi_period(starget));
+ DV_SET(qas, spi_qas(starget));
+ DV_SET(rd_strm, spi_rd_strm(starget));
+ DV_SET(wr_flow, spi_wr_flow(starget));
+ DV_SET(rti, spi_rti(starget));
+ DV_SET(pcomp_en, spi_pcomp_en(starget));
+ scsi_device_put(sdev);
return;
+ }
spi_dv_in_progress(starget) = 1;
buffer = kzalloc(len, GFP_KERNEL);
next prev parent reply other threads:[~2007-02-12 21:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 23:51 [PATCH] scsi spi transport: SCSI domain validation after reset Eric Moore
2007-02-12 16:14 ` Mark Haverkamp
2007-02-12 21:45 ` James Bottomley [this message]
2007-02-12 23:00 ` Mark Haverkamp
-- strict thread matches above, loose matches on Subject: below --
2007-02-05 20:49 Mark Haverkamp
2007-02-05 21:50 ` James Bottomley
2007-02-05 22:01 ` Mark Haverkamp
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=1171316725.3690.16.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=eric.moore@lsi.com \
--cc=linux-scsi@vger.kernel.org \
--cc=markh@linux-foundation.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