All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: linux-scsi@vger.kernel.org
Subject: sym53c8xx ISTAT1 feature never set
Date: Sat, 19 Jan 2008 10:41:44 -0700	[thread overview]
Message-ID: <20080119174144.GB25398@parisc-linux.org> (raw)


I got an interesting mail from Mike Anderson yesterday detailing how he
managed to provoke an error recovery path that didn't work so well.

In sym_soft_reset(), we check to see if the chip has an ISTAT1
register, and if it does, and the scripts are running, we take
additional action to abort the running script before doing a full reset.
The comments for this function discuss a possible hang that can occur if
we don't do this.

The only problem is ... we never set the FE_ISTAT1 bit.  Mike tells me
that when he sets it, it makes his error recovery work.

I think we need a patch somewhat along these lines:

diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_
index 463f119..37575c1 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -1226,61 +1226,61 @@ static struct sym_chip sym_dev_table[] = {
  ,
  {PCI_DEVICE_ID_NCR_53C875, 0x01, "875", 6, 16, 5, 2,
  FE_WIDE|FE_ULTRA|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|
- FE_RAM|FE_DIFF|FE_VARCLK}
+ FE_RAM|FE_DIFF|FE_VARCLK|FE_ISTAT1}
  ,
  {PCI_DEVICE_ID_NCR_53C875, 0xff, "875", 6, 16, 5, 2,
  FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|
- FE_RAM|FE_DIFF|FE_VARCLK}
+ FE_RAM|FE_DIFF|FE_VARCLK|FE_ISTAT1}
  ,
  {PCI_DEVICE_ID_NCR_53C875J, 0xff, "875J", 6, 16, 5, 2,
  FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|
- FE_RAM|FE_DIFF|FE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510d", 6, 31, 7, 4,
  FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|
- FE_RAM|FE_IO256|FE_LEDC}
+ FE_RAM|FE_IO256|FE_LEDC|FE_ISTAT1}
 };
 
 #define sym_num_devs (ARRAY_SIZE(sym_dev_table))

But I'd welcome advice from anyone who knows these chips better than I do
(ie Kai, James, etc).

Note that the only place we currently _check_ FE_ISTAT1 is in the
sym_soft_reset().  We do use nc_istat1 in a couple of other places,
but those places are guarded by FE_C10 (ie 53c1010 chips) which are a
superset of chips which implement ISTAT1.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

             reply	other threads:[~2008-01-19 17:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19 17:41 Matthew Wilcox [this message]
2008-01-21 21:24 ` sym53c8xx ISTAT1 feature never set Mike Anderson

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=20080119174144.GB25398@parisc-linux.org \
    --to=matthew@wil.cx \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.