Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=07df8afa0dd54b8b89ad8aa93994c0d55a4a5921
Commit:     07df8afa0dd54b8b89ad8aa93994c0d55a4a5921
Parent:     90a95af85f22c82f87e5fb714bac7ee06673b0ff
Author:     Prakash, Sathya <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 16:35:40 2008 +0530
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Mon Feb 11 10:20:53 2008 -0600

    [SCSI] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in 
parallel
    
    This patch sets the IOC pointer in drvrdata of pcidev before adding
    the IOC into the list of IOCs. Without this patch the driver oops when
    the mptsas and mptctl modules are loaded in parallel.
    
    Signed-off-by: Sathya Prakash <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/message/fusion/mptbase.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 425f60c..d381c38 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1658,6 +1658,9 @@ mpt_attach(struct pci_dev *pdev, const struct 
pci_device_id *id)
        ioc->active = 0;
        CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
 
+       /* Set IOC ptr in the pcidev's driver data. */
+       pci_set_drvdata(ioc->pcidev, ioc);
+
        /* Set lookup ptr. */
        list_add_tail(&ioc->list, &ioc_list);
 
@@ -1999,7 +2002,6 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int 
sleepFlag)
                        irq_allocated = 1;
                        ioc->pci_irq = ioc->pcidev->irq;
                        pci_set_master(ioc->pcidev);            /* ?? */
-                       pci_set_drvdata(ioc->pcidev, ioc);
                        dprintk(ioc, printk(MYIOC_s_INFO_FMT "installed at 
interrupt "
                            "%d\n", ioc->name, ioc->pcidev->irq));
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to