Re: qla2xxx errors? (2.6.19)

2007-07-02 Thread Csillag Tamas
On 06/26, James Bottomley wrote:
> On Tue, 2007-06-26 at 05:46 -0700, Andrew Vasquez wrote:
> > On Thu, 21 Jun 2007, Csillag Tamas wrote:
> > > Hi Andrew,
> > > 
> > > On 06/12, Andrew Vasquez wrote:
> > > ...
> > > > I can setup somthing similar locally, I take it you are writing
> > > > directly some some lun exported off the DS400, and not using DM?
> > > ...
> > > 
> > > Do you have any results? Does the information I sent regarding my
> > > system helped?
> > > 
> > > Please tell me if you need more information or anything that can help.
> > 
> > The initial logs don't indicate any 'notable' driver issues during the
> > I/O test.  Concurrently, we've been unable to reproduce on similar
> > storage along with other array devices.  I've escalated this to our
> > formal support group (which should be in contact with you shortly) in
> > hopes of triaging this further and getting resolution.
> 
> The DS400 is actually a discontinued array ... any chance the original
> reproducer could redo the test with an LSI or an Emulex FC adapter just
> to see if its qlogic or array related?

Well. I do not have any other card right now. The problem only appears
with kernel version > 2.6.18. So I do not think that this is array
related.

If you say it is worth trying with other cards I will try to borrow one,
but please confirm first as it is not easy for me to get one.

Thanks.

Best regards,
cstamas
-- 
CSILLAG Tamas (cstamas) - http://digitus.itk.ppke.hu/~cstamas

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH]: PCI Error Recovery: Symbios SCSI device driver

2007-07-02 Thread Linas Vepstas

Various PCI bus errors can be signaled by newer PCI controllers.  
This patch adds the PCI error recovery callbacks to the Symbios 
SCSI device driver.  The patch has been tested, and appears to 
work well.

Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>



Hi,

This patch has been bouncing around for a long time, and has made
appearences in various -mm trees since 2.6.something-teen. However,
it has never made it into mainline, and I'm starting to get concerned
that it will miss 2.6.23 as well. 

There was some discussion, and I think I addressed all of the various
issues that came up. I'd really like to get this patch in, but am unclear
on exactly who to pester at this point. Matt Wilcox seems to be looking 
for a job (???) and I am unable to git-clone James Bottmley's 
git://kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
git tree; there's some error on the server side.

Linas.

 drivers/scsi/sym53c8xx_2/sym_glue.c |  136 
 drivers/scsi/sym53c8xx_2/sym_glue.h |4 +
 drivers/scsi/sym53c8xx_2/sym_hipd.c |6 +
 3 files changed, 146 insertions(+)

Index: linux-2.6.22-rc1/drivers/scsi/sym53c8xx_2/sym_glue.c
===
--- linux-2.6.22-rc1.orig/drivers/scsi/sym53c8xx_2/sym_glue.c   2007-04-25 
22:08:32.0 -0500
+++ linux-2.6.22-rc1/drivers/scsi/sym53c8xx_2/sym_glue.c2007-05-14 
17:31:44.0 -0500
@@ -657,6 +657,10 @@ static irqreturn_t sym53c8xx_intr(int ir
unsigned long flags;
struct sym_hcb *np = (struct sym_hcb *)dev_id;
 
+   /* Avoid spinloop trying to handle interrupts on frozen device */
+   if (pci_channel_offline(np->s.device))
+   return IRQ_HANDLED;
+
if (DEBUG_FLAGS & DEBUG_TINY) printf_debug ("[");
 
spin_lock_irqsave(np->s.host->host_lock, flags);
@@ -726,6 +730,20 @@ static int sym_eh_handler(int op, char *
 
dev_warn(&cmd->device->sdev_gendev, "%s operation started.\n", opname);
 
+   /* We may be in an error condition because the PCI bus
+* went down. In this case, we need to wait until the
+* PCI bus is reset, the card is reset, and only then
+* proceed with the scsi error recovery.  There's no
+* point in hurrying; take a leisurely wait.
+*/
+#define WAIT_FOR_PCI_RECOVERY  35
+   if (pci_channel_offline(np->s.device)) {
+   int finished_reset = wait_for_completion_timeout(
+   &np->s.io_reset_wait, WAIT_FOR_PCI_RECOVERY*HZ);
+   if (!finished_reset)
+   return SCSI_FAILED;
+   }
+
spin_lock_irq(host->host_lock);
/* This one is queued in some place -> to wait for completion */
FOR_EACH_QUEUED_ELEMENT(&np->busy_ccbq, qp) {
@@ -1510,6 +1528,7 @@ static struct Scsi_Host * __devinit sym_
np->maxoffs = dev->chip.offset_max;
np->maxburst= dev->chip.burst_max;
np->myaddr  = dev->host_id;
+   init_completion(&np->s.io_reset_wait);
 
/*
 *  Edit its name.
@@ -1948,6 +1967,116 @@ static void __devexit sym2_remove(struct
attach_count--;
 }
 
+/**
+ * sym2_io_error_detected() -- called when PCI error is detected
+ * @pdev: pointer to PCI device
+ * @state: current state of the PCI slot
+ */
+static pci_ers_result_t sym2_io_error_detected(struct pci_dev *pdev,
+ enum pci_channel_state state)
+{
+   struct sym_hcb *np = pci_get_drvdata(pdev);
+
+   /* If slot is permanently frozen, turn everything off */
+   if (state == pci_channel_io_perm_failure) {
+   sym2_remove(pdev);
+   return PCI_ERS_RESULT_DISCONNECT;
+   }
+
+   init_completion(&np->s.io_reset_wait);
+   disable_irq(pdev->irq);
+   pci_disable_device(pdev);
+
+   /* Request a slot reset. */
+   return PCI_ERS_RESULT_NEED_RESET;
+}
+
+/**
+ * sym2_reset_workarounds -- hardware-specific work-arounds
+ *
+ * This routine is similar to sym_set_workarounds(), except
+ * that, at this point, we already know that the device was
+ * succesfully intialized at least once before, and so most
+ * of the steps taken there are un-needed here.
+ */
+static void sym2_reset_workarounds(struct pci_dev *pdev)
+{
+   u_char revision;
+   u_short status_reg;
+   struct sym_chip *chip;
+
+   pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision);
+   chip = sym_lookup_chip_table(pdev->device, revision);
+
+   /* Work around for errant bit in 895A, in a fashion
+* similar to what is done in sym_set_workarounds().
+*/
+   pci_read_config_word(pdev, PCI_STATUS, &status_reg);
+   if (!(chip->features & FE_66MHZ) && (status_reg & PCI_STATUS_66MHZ)) {
+   status_reg = PCI_STATUS_66MHZ;
+   pci_write_config_word(pdev, PCI_STATUS, status_reg);
+   pci_read_config_word(pdev, PCI_STATUS, &status_r

Re: [PATCH] scsi disk help file is not complete

2007-07-02 Thread Jeff Garzik

Randy Dunlap wrote:

On Mon, 11 Jun 2007 20:28:16 +0200 api wrote:


Good day,
When doing make menuconfig one comes across CONFIG_BLK_DEV_SD.
The help file states that this is for scsi disks.NO MENTION IS MADE THAT
IT IS NEEDE FOR SATA DISKS AS WELL!
Would have saved me a lot of time if the help was up to date.
I hope this can be changed so others can make a kernel for sata systems
quicker.



From: Randy Dunlap <[EMAIL PROTECTED]>

Add help info for BLK_DEV_SD referring to its use in
SATA or PATA driver configurations.

Add help text for "ATA" indicating that it probably needs
some SCSI config symbols enabled in order to be useful.

Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]>
---
 drivers/ata/Kconfig  |5 +
 drivers/scsi/Kconfig |1 +
 2 files changed, 6 insertions(+)


applied


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mpt fusion: deregister from transport layer if PCI registration failed

2007-07-02 Thread Prakash, Sathya
The mptspi and mptsas drivers are modified to deregister from transport layer
if registration with PCI driver failed

Signed-Off-by: Sathya Prakash <[EMAIL PROTECTED]>



diff -uarpN b/drivers/message/fusion/mptsas.c a/drivers/message/fusion/mptsas.c
--- b/drivers/message/fusion/mptsas.c   2007-07-02 16:20:46.0 +0530
+++ a/drivers/message/fusion/mptsas.c   2007-07-02 16:22:23.0 +0530
@@ -3237,6 +3237,8 @@ static struct pci_driver mptsas_driver =
 static int __init
 mptsas_init(void)
 {
+   int error;
+
show_mptmod_ver(my_NAME, my_VERSION);
 
mptsas_transport_template =
@@ -3259,8 +3261,12 @@ mptsas_init(void)
dprintk((KERN_INFO MYNAM
  ": Registered for IOC reset notifications\n"));
}
+   
+   error = pci_register_driver(&mptsas_driver);
+   if (error)
+   sas_release_transport(mptsas_transport_template);
 
-   return pci_register_driver(&mptsas_driver);
+   return error;
 }
 
 static void __exit
diff -uarpN b/drivers/message/fusion/mptspi.c a/drivers/message/fusion/mptspi.c
--- b/drivers/message/fusion/mptspi.c   2007-07-02 16:20:46.0 +0530
+++ a/drivers/message/fusion/mptspi.c   2007-07-02 16:22:23.0 +0530
@@ -1521,6 +1521,8 @@ static struct pci_driver mptspi_driver =
 static int __init
 mptspi_init(void)
 {
+   int error;
+
show_mptmod_ver(my_NAME, my_VERSION);
 
mptspi_transport_template = 
spi_attach_transport(&mptspi_transport_functions);
@@ -1541,7 +1543,11 @@ mptspi_init(void)
  ": Registered for IOC reset notifications\n"));
}
 
-   return pci_register_driver(&mptspi_driver);
+   error = pci_register_driver(&mptspi_driver);
+   if (error)
+   spi_release_transport(mptspi_transport_template);
+
+   return error;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html