* [PATCH] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup
@ 2005-08-08 14:06 Salyzyn, Mark
2005-08-08 14:16 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Salyzyn, Mark @ 2005-08-08 14:06 UTC (permalink / raw)
To: linux-scsi; +Cc: James Bottomley, Markus.Lidel, Andrew Morton, alan
Suitable for both 2.4 and 2.6 version of the driver. Applies to
scsi-misc-2.6 git tree.
Prevent driver from loading if another driver (i2o) has already claimed
the resources associated with the card. Discussion associated with this
bug can be referenced at http://bugzilla.kernel.org/show_bug.cgi?id=4940
where it was agreed to use pci_request_regions in both the dpt_i2o and
the i2o driver to prevent both drivers loading on the same adapter(s).
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Index: a/drivers/scsi/dpt_i2o.c
===================================================================
--- a/drivers/scsi/dpt_i2o.c 2005-07-26 11:42:03.000000000 -0400
+++ b/drivers/scsi/dpt_i2o.c 2005-08-08 09:50:33.247595544 -0400
@@ -908,8 +908,12 @@
}
-
+ if (pci_request_regions(pDev)) {
+ PERROR("dpti: adpt_config_hba: pci request region
failed\n");
+ return -EINVAL;
+ }
base_addr_virt = ioremap(base_addr0_phys,hba_map0_area_size);
if (!base_addr_virt) {
+ pci_release_regions(pDev);
PERROR("dpti: adpt_config_hba: io remap failed\n");
return -EINVAL;
}
@@ -919,6 +924,7 @@
if (!msg_addr_virt) {
PERROR("dpti: adpt_config_hba: io remap failed
on BAR1\n");
iounmap(base_addr_virt);
+ pci_release_regions(pDev);
return -EINVAL;
}
} else {
@@ -932,6 +938,7 @@
iounmap(msg_addr_virt);
}
iounmap(base_addr_virt);
+ pci_release_regions(pDev);
return -ENOMEM;
}
memset(pHba, 0, sizeof(adpt_hba));
@@ -1027,6 +1034,7 @@
up(&adpt_configuration_lock);
iounmap(pHba->base_addr_virt);
+ pci_release_regions(pHba->pDev);
if(pHba->msg_addr_virt != pHba->base_addr_virt){
iounmap(pHba->msg_addr_virt);
}
Sincerely -- Mark Salyzyn
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup
2005-08-08 14:06 [PATCH] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup Salyzyn, Mark
@ 2005-08-08 14:16 ` Christoph Hellwig
2005-08-08 15:47 ` Alan Cox
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2005-08-08 14:16 UTC (permalink / raw)
To: Salyzyn, Mark
Cc: linux-scsi, James Bottomley, Markus.Lidel, Andrew Morton, alan
On Mon, Aug 08, 2005 at 10:06:11AM -0400, Salyzyn, Mark wrote:
> Suitable for both 2.4 and 2.6 version of the driver. Applies to
> scsi-misc-2.6 git tree.
>
> Prevent driver from loading if another driver (i2o) has already claimed
> the resources associated with the card. Discussion associated with this
> bug can be referenced at http://bugzilla.kernel.org/show_bug.cgi?id=4940
> where it was agreed to use pci_request_regions in both the dpt_i2o and
> the i2o driver to prevent both drivers loading on the same adapter(s).
Please either update the driver to use the pci_driver model or even
better remove it completely and let everyone use the i2o drivers now
that they have full 64bit dma and managment support.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup
2005-08-08 14:16 ` Christoph Hellwig
@ 2005-08-08 15:47 ` Alan Cox
0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2005-08-08 15:47 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Salyzyn, Mark, linux-scsi, James Bottomley, Markus.Lidel,
Andrew Morton, alan
On Mon, Aug 08, 2005 at 03:16:18PM +0100, Christoph Hellwig wrote:
> Please either update the driver to use the pci_driver model or even
> better remove it completely and let everyone use the i2o drivers now
> that they have full 64bit dma and managment support.
In the mean time. I ack the fix for what we have now. I don't see the point
of fixing dpt_i2o much further given in another 6 months your wish can probably
come true.
Alan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-08 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-08 14:06 [PATCH] Bug 4940 Repeatable Kernel Panic on Adaptec 2015S I20 device on bootup Salyzyn, Mark
2005-08-08 14:16 ` Christoph Hellwig
2005-08-08 15:47 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox