* sym53c8xx ISTAT1 feature never set
@ 2008-01-19 17:41 Matthew Wilcox
2008-01-21 21:24 ` Mike Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2008-01-19 17:41 UTC (permalink / raw)
To: linux-scsi
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_VARCLK}
+ FE_RAM|FE_DIFF|FE_VARCLK|FE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EN|
- 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."
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: sym53c8xx ISTAT1 feature never set
2008-01-19 17:41 sym53c8xx ISTAT1 feature never set Matthew Wilcox
@ 2008-01-21 21:24 ` Mike Anderson
0 siblings, 0 replies; 2+ messages in thread
From: Mike Anderson @ 2008-01-21 21:24 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-scsi
Matthew Wilcox <matthew@wil.cx> wrote:
> 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:
>
> {PCI_DEVICE_ID_LSI_53C1010_66, 0xff, "1010-66", 6, 31, 7, 8,
> FE_WIDE|FE_ULTRA3|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFBC|FE_LDSTR|FE_PFEN|
> FE_RAM|FE_RAM8K|FE_64BIT|FE_DAC|FE_IO256|FE_NOPM|FE_LEDC|FE_66MHZ|FE_CRC|
> - FE_C10|FE_U3EN}
> + FE_C10|FE_U3EN|FE_ISTAT1}
As you already mentioned we tested setting FE_ISTAT1 for one card. We just
ran with your patch and it addressed that issue as expected (as this patch
only enables more cards that we do not have it not that interesting that it
passed, just wanted to add a "tested" to this thread). I can only hardware
verify the check above "PCI_DEVICE_ID_LSI_53C1010_66", so that does not
add much.
-andmike
--
Michael Anderson
andmike@linux.vnet.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-21 21:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-19 17:41 sym53c8xx ISTAT1 feature never set Matthew Wilcox
2008-01-21 21:24 ` Mike Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).