Bug#317258: [stable] kernel upload to p-u
On Fri, Sep 14, 2007 at 07:12:52PM +0200, Bastian Blank wrote:
> On Fri, Sep 14, 2007 at 10:53:50AM -0600, dann frazier wrote:
> > Have you verified that this fix works in 2.6.18? It seems like its
> > adding support for megaraid3s w/ specific subsystem devices, while
> > 2.6.18 (and current upstream) claim megaraid3 devices w/ *any*
> > subsystem ids. (Although there does appear to be code to explicitly
> > not claim some cards w/ intel vendor ids).
>
> megaraid_mbox claims PCI_VENDOR_ID_AMI and PCI_VENDOR_ID_LSI_LOGIC for
> PCI_DEVICE_ID_AMI_MEGARAID3. megaraid claims PCI_VENDOR_ID_INTEL for the
> same device.
>
> The patch adds PCI_VENDOR_ID_AMI to megaraid with two specific subsystem
> ids. They are not excluded in megaraid_mbox, so both claim the same
> device.
Thanks waldi, I see that I failed to notice that the MEGARAID3 entry
was PCI_VENDOR_ID_INTEL (not _AMI).
I've modified the patch to also blacklist these controllers in the
megaraid_mbox driver to avoid an overlap. I tested this patch on one
of the 2M cards I have (which, for whatever reason, all work just fine
with either driver).
If this looks correct, I'll submit it upstream and then we can
look at backporting it into a stable update.
--- linux-source-2.6.18.orig/drivers/scsi/megaraid.c 2006-09-19 21:42:06.000000000 -0600
+++ linux-source-2.6.18/drivers/scsi/megaraid.c 2007-09-14 18:10:16.000000000 -0600
@@ -24,6 +24,7 @@
*
* Supported controllers: MegaRAID 418, 428, 438, 466, 762, 467, 471, 490, 493
* 518, 520, 531, 532
+ * NetRAID 1M, 2M
*
* This driver is supported by LSI Logic, with assistance from Red Hat, Dell,
* and others. Please send updates to the mailing list
@@ -5042,6 +5043,10 @@ static struct pci_device_id megaraid_pci
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+ HP_SUBSYS_VID, HP_NETRAID1M_SUBSYS_DID, 0, 0, 0},
+ {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+ HP_SUBSYS_VID, HP_NETRAID2M_SUBSYS_DID, 0, 0, 0},
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
--- linux-source-2.6.18.orig/drivers/scsi/megaraid.h 2006-09-19 21:42:06.000000000 -0600
+++ linux-source-2.6.18/drivers/scsi/megaraid.h 2007-09-14 17:47:50.000000000 -0600
@@ -84,6 +84,10 @@
#define LSI_SUBSYS_VID 0x1000
#define INTEL_SUBSYS_VID 0x8086
+/* Sub-System Device IDs */
+#define HP_NETRAID1M_SUBSYS_DID 0x60E7
+#define HP_NETRAID2M_SUBSYS_DID 0x60E8
+
#define HBA_SIGNATURE 0x3344
#define HBA_SIGNATURE_471 0xCCCC
#define HBA_SIGNATURE_64BIT 0x0299
--- linux-source-2.6.18.orig/drivers/scsi/megaraid/megaraid_mbox.c 2006-09-19 21:42:06.000000000 -0600
+++ linux-source-2.6.18/drivers/scsi/megaraid/megaraid_mbox.c 2007-09-14 18:50:40.000000000 -0600
@@ -426,6 +426,16 @@ megaraid_probe_one(struct pci_dev *pdev,
con_log(CL_ANN, ("bus %d:slot %d:func %d\n", pdev->bus->number,
PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)));
+ /* Some NetRAID 1M and 2M controllers still require the old driver */
+ if (pdev->vendor == PCI_VENDOR_ID_AMI && \
+ pdev->device == PCI_DEVICE_ID_AMI_MEGARAID3 && \
+ pdev->subsystem_vendor == PCI_VENDOR_ID_HP && \
+ (pdev->subsystem_device == 0x60e7 || \
+ pdev->subsystem_device == 0x60e8)) {
+ con_log(CL_ANN, ("megaraid_mbox: Blacklisted device found, aborting.\n"));
+ return -ENODEV;
+ }
+
if (pci_enable_device(pdev)) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: pci_enable_device failed\n"));
Reply to: