* [PATCH 3/3] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel
@ 2008-02-08 11:05 Prakash, Sathya
2008-02-08 16:46 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Prakash, Sathya @ 2008-02-08 11:05 UTC (permalink / raw)
To: linux-scsi; +Cc: eric.moore
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 <sathya.prakash@lsi.com>
---
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 355c172..d473146 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1704,6 +1704,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);
@@ -2074,7 +2077,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));
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel
2008-02-08 11:05 [PATCH 3/3] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel Prakash, Sathya
@ 2008-02-08 16:46 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2008-02-08 16:46 UTC (permalink / raw)
To: Prakash, Sathya; +Cc: linux-scsi, eric.moore
On Fri, 2008-02-08 at 16:35 +0530, Prakash, Sathya wrote:
> 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.
Much better, thanks.
Would I be correct in assuming that even though this email says [PATCH
3/3] there aren't two missing precursor patches?
James
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-08 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 11:05 [PATCH 3/3] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel Prakash, Sathya
2008-02-08 16:46 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox