* [PATCH] Use legacy driver for NetRAID 1M/2M controllers
@ 2007-09-19 1:04 dann frazier
2007-09-19 18:46 ` Patro, Sumant
0 siblings, 1 reply; 3+ messages in thread
From: dann frazier @ 2007-09-19 1:04 UTC (permalink / raw)
To: megaraidlinux; +Cc: linux-scsi
Debian has had a long-standing bug concerning certain NetRAID
controllers that were moved over to the megaraid driver:
http://bugs.debian.org/317258
The reporters claim that the legacy driver works just fine for
them. I've been unable to reproduce this with the 2M cards I have
access to, which use the following firmware revs:
BIOS Firmware
-----------------
G.02.03 H.02.00
J.01.01 K.01.03
As these cards work fine with both the new and legacy drivers, and
there are cards known to only work with the legacy driver, please
consider the following patch which moves the support of these cards
back to the legacy driver.
Signed-off-by: dann frazier <dannf@hp.com>
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3907f67..ac96dbb 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -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
@@ -4967,6 +4968,10 @@ static struct pci_device_id megaraid_pci_tbl[] = {
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, PCI_SUBSYS_ID_HP_NETRAID_1M, 0, 0, 0},
+ {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+ HP_SUBSYS_VID, PCI_SUBSYS_ID_HP_NETRAID_2M, 0, 0, 0},
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
index ee70bd4..697276a 100644
--- a/drivers/scsi/megaraid.h
+++ b/drivers/scsi/megaraid.h
@@ -84,6 +84,10 @@
#define LSI_SUBSYS_VID 0x1000
#define INTEL_SUBSYS_VID 0x8086
+/* Sub-System Device IDs */
+#define PCI_SUBSYS_ID_HP_NETRAID_1M 0x60E7
+#define PCI_SUBSYS_ID_HP_NETRAID_2M 0x60E8
+
#define HBA_SIGNATURE 0x3344
#define HBA_SIGNATURE_471 0xCCCC
#define HBA_SIGNATURE_64BIT 0x0299
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 4963b96..0d74241 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -443,6 +443,14 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
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 need the legacy 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 == PCI_SUBSYS_ID_HP_NETRAID_1M || \
+ pdev->subsystem_device == PCI_SUBSYS_ID_HP_NETRAID_2M))
+ return -ENODEV;
+
if (pci_enable_device(pdev)) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: pci_enable_device failed\n"));
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h
index 2e760c2..c66d107 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.h
+++ b/drivers/scsi/megaraid/megaraid_mbox.h
@@ -89,6 +89,8 @@
#define PCI_SUBSYS_ID_PERC3_DC 0x0493
#define PCI_SUBSYS_ID_PERC3_SC 0x0475
+#define PCI_SUBSYS_ID_HP_NETRAID_1M 0x60E7
+#define PCI_SUBSYS_ID_HP_NETRAID_2M 0x60E8
#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel
#define MBOX_MAX_USER_CMDS 32 // number of cmds for applications
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH] Use legacy driver for NetRAID 1M/2M controllers
2007-09-19 1:04 [PATCH] Use legacy driver for NetRAID 1M/2M controllers dann frazier
@ 2007-09-19 18:46 ` Patro, Sumant
2007-09-19 19:23 ` dann frazier
0 siblings, 1 reply; 3+ messages in thread
From: Patro, Sumant @ 2007-09-19 18:46 UTC (permalink / raw)
To: dann frazier, DL-MegaRAID Linux; +Cc: linux-scsi
NACK.
ID being added is already supported in megaraid_mbox driver.
Please use megaraid_mbox driver.
--Sumant
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of dann frazier
Sent: Tuesday, September 18, 2007 6:05 PM
To: DL-MegaRAID Linux
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] Use legacy driver for NetRAID 1M/2M controllers
Debian has had a long-standing bug concerning certain NetRAID
controllers that were moved over to the megaraid driver:
http://bugs.debian.org/317258
The reporters claim that the legacy driver works just fine for
them. I've been unable to reproduce this with the 2M cards I have
access to, which use the following firmware revs:
BIOS Firmware
-----------------
G.02.03 H.02.00
J.01.01 K.01.03
As these cards work fine with both the new and legacy drivers, and
there are cards known to only work with the legacy driver, please
consider the following patch which moves the support of these cards
back to the legacy driver.
Signed-off-by: dann frazier <dannf@hp.com>
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 3907f67..ac96dbb 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -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
@@ -4967,6 +4968,10 @@ static struct pci_device_id megaraid_pci_tbl[] =
{
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, PCI_SUBSYS_ID_HP_NETRAID_1M, 0, 0, 0},
+ {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+ HP_SUBSYS_VID, PCI_SUBSYS_ID_HP_NETRAID_2M, 0, 0, 0},
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
diff --git a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
index ee70bd4..697276a 100644
--- a/drivers/scsi/megaraid.h
+++ b/drivers/scsi/megaraid.h
@@ -84,6 +84,10 @@
#define LSI_SUBSYS_VID 0x1000
#define INTEL_SUBSYS_VID 0x8086
+/* Sub-System Device IDs */
+#define PCI_SUBSYS_ID_HP_NETRAID_1M 0x60E7
+#define PCI_SUBSYS_ID_HP_NETRAID_2M 0x60E8
+
#define HBA_SIGNATURE 0x3344
#define HBA_SIGNATURE_471 0xCCCC
#define HBA_SIGNATURE_64BIT 0x0299
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c
b/drivers/scsi/megaraid/megaraid_mbox.c
index 4963b96..0d74241 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -443,6 +443,14 @@ megaraid_probe_one(struct pci_dev *pdev, const
struct pci_device_id *id)
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 need the legacy
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 ==
PCI_SUBSYS_ID_HP_NETRAID_1M || \
+ pdev->subsystem_device ==
PCI_SUBSYS_ID_HP_NETRAID_2M))
+ return -ENODEV;
+
if (pci_enable_device(pdev)) {
con_log(CL_ANN, (KERN_WARNING
"megaraid: pci_enable_device
failed\n"));
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h
b/drivers/scsi/megaraid/megaraid_mbox.h
index 2e760c2..c66d107 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.h
+++ b/drivers/scsi/megaraid/megaraid_mbox.h
@@ -89,6 +89,8 @@
#define PCI_SUBSYS_ID_PERC3_DC 0x0493
#define PCI_SUBSYS_ID_PERC3_SC 0x0475
+#define PCI_SUBSYS_ID_HP_NETRAID_1M 0x60E7
+#define PCI_SUBSYS_ID_HP_NETRAID_2M 0x60E8
#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for
kernel
#define MBOX_MAX_USER_CMDS 32 // number of cmds for
applications
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Use legacy driver for NetRAID 1M/2M controllers
2007-09-19 18:46 ` Patro, Sumant
@ 2007-09-19 19:23 ` dann frazier
0 siblings, 0 replies; 3+ messages in thread
From: dann frazier @ 2007-09-19 19:23 UTC (permalink / raw)
To: Patro, Sumant; +Cc: DL-MegaRAID Linux, linux-scsi
On Wed, Sep 19, 2007 at 12:46:02PM -0600, Patro, Sumant wrote:
> NACK.
>
> ID being added is already supported in megaraid_mbox driver.
> Please use megaraid_mbox driver.
Understood. The problem is that the megaraid_mbox driver is not
working for various cards with these IDs, whereas the legacy driver is
believed to work for all of them.
Note that this patch also alters megaraid_mbox to avoid an overlap in
device support.
I've sent a call out to the various reporters to find out what exactly
the failure mode(s) is with megaraid_mbox, which can be found in the
bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=317258
So far there's just one response about timeouts during
initialization. I expect to see at least one more response this week.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-19 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 1:04 [PATCH] Use legacy driver for NetRAID 1M/2M controllers dann frazier
2007-09-19 18:46 ` Patro, Sumant
2007-09-19 19:23 ` dann frazier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox