RE: Sample implementation of a scheme to handle missing interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, July 28, 2008 2:45 PM, James Bottomley wrote:
> >
> > In my case, the MSI problem will manifest itself well before we bind
> > with the scsi midlayer.    Meaning when there is a MSI problem, we
> > can't even bring up the card.  Hence adding code in a eh_timed_out
> > callback handler would be meaningless in solving our problem. What I
> > need to do is find a problematic card, so I can verify some things.
>
> Actually, you don't need this.  I verified the behaviour of the MSI
> problem simply by commenting out the request_irq.  It looks
> like there's
> no simple way to simulate MSI misrouting, but perhaps I should look at
> that, since it would be useful.
>

Well today I found at FC929X where it fails when MSI enabled.   The problem is occuring at the end of mpt_do_ioc_recovery, after we enable interrupts, we are asking for random manufacturing config pages. I see it randomly timing out on the config pages, meaning some time GetLanConfigPages works, then other times it fails. Sometimes it fails later on for either GetIoUnitPage2 or mpt_get_manufacturing_pg_0.  So its randomly timing out on config pages, but most the time is the first one.   So did the following patch (hopefully its not butcherd by ccmail). What I'm doing is failling back to IOAPIC routing after we have a config page timeout.   This works scsi_misc tip with drives attached to both channels of the multifunction FC card.      I'm thinking we may still need do what Matt W. suggested just as I pointed, I see random timeouts with the config pages.  A side note, I found that pci_disable_msi() is not working in SLES10 SP2..    Did you have any other suggestion where this could be handled in a generic common method?


diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index d6a0074..e2804b2 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1754,7 +1754,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)

        if (mpt_msi_enable == -1) {
                /* Enable on SAS, disable on FC and SPI */
-               if (ioc->bus_type == SAS)
+               if (ioc->bus_type == SAS || ioc->bus_type == FC)
                        ioc->msi_enable = 1;
                else
                        ioc->msi_enable = 0;
@@ -5927,6 +5927,25 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *pCfg)
        /* mf has been freed - do not access */

        rc = pCfg->status;
+       if ((rc == MPT_CONFIG_ERROR) && ioc->msi_enable) {
+               ioc->msi_enable = 0;
+               printk(MYIOC_s_ERR_FMT "free_irq\n", ioc->name);
+               free_irq(ioc->pci_irq, ioc);
+               printk(MYIOC_s_ERR_FMT "pci_disable_msi\n", ioc->name);
+               pci_disable_msi(ioc->pcidev);
+               printk(MYIOC_s_ERR_FMT "request_irq\n", ioc->name);
+               if (request_irq(ioc->pcidev->irq, mpt_interrupt, IRQF_SHARED,
+                   ioc->name, ioc) < 0) {
+                       printk(MYIOC_s_ERR_FMT "Unable to allocate "
+                           "interrupt %d!\n", ioc->name, ioc->pcidev->irq);
+                       return -EBUSY;
+               }
+               pci_set_master(ioc->pcidev);
+               pci_set_drvdata(ioc->pcidev, ioc);
+               ioc->pci_irq = ioc->pcidev->irq;
+               printk(MYIOC_s_INFO_FMT "PCI-MSI is being disabled\n",
+                   ioc->name);
+       }

        return rc;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux