Skip to contentSkip to conversation

Dell CERC support for megaraid_mbox

PATCH In review [email protected] 4 participants 6 messages Mar 28, 2008 – Apr 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/17 Dell CERC support for megaraid_mbox

From: Hannes Reinecke <[email protected]>

Newer Dell CERC firmware (>= 6.62) implement a random deletion handling compatible with the legacy megaraid driver. The legacy handling shifted the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas megaraid_mbox shifts the target ID always if random deletion is supported. The resulted in megaraid_mbox sending an INQUIRY to the wrong channel, and not finding any devices, obviously.

So we disable the random deletion support if the offending firmware is found.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6695

Cc "Patro, Sumant" <[email protected]>
Cc James Bottomley <[email protected]>
Cc "Yang, Bo" <[email protected]>

---

 drivers/scsi/megaraid/megaraid_mbox.c |   17 +++++++++++++++++
 drivers/scsi/megaraid/megaraid_mbox.h |    1 +
 2 files changed, 18 insertions(+)
drivers/scsi/megaraid/megaraid_mbox.c renamed from drivers/scsi/megaraid/megaraid_mbox.c~dell-cerc-support-for-megaraid_mbox +17 -0
diff -puN drivers/scsi/megaraid/megaraid_mbox.c~dell-cerc-support-for-megaraid_mbox drivers/scsi/megaraid/megaraid_mbox.c
@@ -3168,6 +3168,23 @@ megaraid_mbox_support_random_del(adapter
 	uint8_t		raw_mbox[sizeof(mbox_t)];
 	int		rval;
 
+	/*
+	 * Newer firmware on Dell CERC expect a different
+	 * random deletion handling, so disable it.
+	 */
+	if (adapter->pdev->vendor == PCI_VENDOR_ID_AMI &&
+	    adapter->pdev->device == PCI_DEVICE_ID_AMI_MEGARAID3 &&
+	    adapter->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
+	    adapter->pdev->subsystem_device == PCI_SUBSYS_ID_CERC_ATA100_4CH &&
+	    (adapter->fw_version[0] > '6' ||
+	     (adapter->fw_version[0] == '6' &&
+	      adapter->fw_version[2] > '6') ||
+	     (adapter->fw_version[0] == '6'
+	      && adapter->fw_version[2] == '6'
+	      && adapter->fw_version[3] > '1'))) {
+		con_log(CL_DLEVEL1, ("megaraid: disable random deletion\n"));
+		return 0;
+	}
 
 	mbox = (mbox_t *)raw_mbox;
 
drivers/scsi/megaraid/megaraid_mbox.h renamed from drivers/scsi/megaraid/megaraid_mbox.h~dell-cerc-support-for-megaraid_mbox +1 -0
diff -puN drivers/scsi/megaraid/megaraid_mbox.h~dell-cerc-support-for-megaraid_mbox drivers/scsi/megaraid/megaraid_mbox.h
@@ -88,6 +88,7 @@
 #define PCI_SUBSYS_ID_PERC3_QC				0x0471
 #define PCI_SUBSYS_ID_PERC3_DC				0x0493
 #define PCI_SUBSYS_ID_PERC3_SC				0x0475
+#define PCI_SUBSYS_ID_CERC_ATA100_4CH			0x0511
 
 
 #define MBOX_MAX_SCSI_CMDS	128	// number of cmds reserved for kernel

_

maintainer
#1 lore raw
Quoted 9 lines · On Fri, 2008-03-28 at 14:48 -0700, [email protected] wrote:

From: Hannes Reinecke <[email protected]>

Newer Dell CERC firmware (>= 6.62) implement a random deletion handling compatible with the legacy megaraid driver. The legacy handling shifted the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas megaraid_mbox shifts the target ID always if random deletion is supported. The resulted in megaraid_mbox sending an INQUIRY to the wrong channel, and not finding any devices, obviously.

Quoted 4 lines

So we disable the random deletion support if the offending firmware is found.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6695

Bo,

You said you'd review this patch and give feedback "soon" twenty five days ago (5 March). My patience finally ran out on this one; you have three days (that's until midnight CST on 2 April) to provide an ack or a replacement patch for this otherwise I'll apply it anyway.

James

#2 lore raw

James,

I am checking with our FW team for the random deletion logic drive (RDLD) for Dell CERC firmware (>= 6.62) implementation. We should have the RDLD support if the driver found the FW support the RDLD.

Thanks.

Bo Yang

-----Original Message-----
From: James Bottomley [mailto:[email protected]]
Sent: Sunday, March 30, 2008 1:14 PM
To: [email protected]
Cc: [email protected]; [email protected]; Yang, Bo; Patro, Sumant
Subject: Re: [patch 02/17] Dell CERC support for megaraid_mbox

Quoted 6 lines · On Fri, 2008-03-28 at 14:48 -0700, [email protected] wrote:

From: Hannes Reinecke <[email protected]>

Newer Dell CERC firmware (>= 6.62) implement a random deletion handling compatible with the legacy megaraid driver. The legacy handling shifted the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas megaraid_mbox shifts the target ID always if

random deletion is supported.

Quoted 9 lines

The resulted in megaraid_mbox sending an INQUIRY to the wrong channel,

and not finding any devices, obviously.

So we disable the random deletion support if the offending firmware is

found.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6695

Bo,

You said you'd review this patch and give feedback "soon" twenty five days ago (5 March). My patience finally ran out on this one; you have three days (that's until midnight CST on 2 April) to provide an ack or a replacement patch for this otherwise I'll apply it anyway.

James

#3 lore raw
In reply to [email protected]

Hannes,

We can not find out why need to disable the random deletion of the logical drive for the FW version>=6.62? Where is the 6.62 come from?

Thanks.

Bo Yang

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Friday, March 28, 2008 5:49 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; Yang, Bo; [email protected]; Patro, Sumant
Subject: [patch 02/17] Dell CERC support for megaraid_mbox

From: Hannes Reinecke <[email protected]>

Newer Dell CERC firmware (>= 6.62) implement a random deletion handling compatible with the legacy megaraid driver. The legacy handling shifted the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas megaraid_mbox shifts the target ID always if random deletion is supported.
The resulted in megaraid_mbox sending an INQUIRY to the wrong channel, and not finding any devices, obviously.

So we disable the random deletion support if the offending firmware is found.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6695

Cc "Patro, Sumant" <[email protected]>
Cc James Bottomley <[email protected]>
Cc "Yang, Bo" <[email protected]>

---

 drivers/scsi/megaraid/megaraid_mbox.c |   17 +++++++++++++++++
 drivers/scsi/megaraid/megaraid_mbox.h |    1 +
 2 files changed, 18 insertions(+)

diff -puN drivers/scsi/megaraid/megaraid_mbox.c~dell-cerc-support-for-megaraid_mbo x drivers/scsi/megaraid/megaraid_mbox.c
---
a/drivers/scsi/megaraid/megaraid_mbox.c~dell-cerc-support-for-megaraid_m box
+++ a/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3168,6 +3168,23 @@ megaraid_mbox_support_random_del(adapter
uint8_t raw_mbox[sizeof(mbox_t)];
int rval;

+ /*
+ * Newer firmware on Dell CERC expect a different
+ * random deletion handling, so disable it.
+ */
+ if (adapter->pdev->vendor == PCI_VENDOR_ID_AMI &&

+	    adapter->pdev->device == PCI_DEVICE_ID_AMI_MEGARAID3 &&
+	    adapter->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
+	    adapter->pdev->subsystem_device ==

PCI_SUBSYS_ID_CERC_ATA100_4CH &&
+ (adapter->fw_version[0] > '6' ||
+ (adapter->fw_version[0] == '6' &&
+ adapter->fw_version[2] > '6') ||
+ (adapter->fw_version[0] == '6'
+ && adapter->fw_version[2] == '6'
+ && adapter->fw_version[3] > '1'))) {
+ con_log(CL_DLEVEL1, ("megaraid: disable random
deletion\n"));
+ return 0;
+ }

mbox = (mbox_t *)raw_mbox;

diff -puN drivers/scsi/megaraid/megaraid_mbox.h~dell-cerc-support-for-megaraid_mbo x drivers/scsi/megaraid/megaraid_mbox.h
---
a/drivers/scsi/megaraid/megaraid_mbox.h~dell-cerc-support-for-megaraid_m box
+++ a/drivers/scsi/megaraid/megaraid_mbox.h
@@ -88,6 +88,7 @@
#define PCI_SUBSYS_ID_PERC3_QC 0x0471
#define PCI_SUBSYS_ID_PERC3_DC 0x0493
#define PCI_SUBSYS_ID_PERC3_SC 0x0475
+#define PCI_SUBSYS_ID_CERC_ATA100_4CH 0x0511

#define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for
kernel
_

#4 lore raw
Quoted 5 lines · Bo

Hannes,

We can not find out why need to disable the random deletion of the logical drive for the FW version>=6.62? Where is the 6.62 come from?

From the bug reports we had. Dell machines with a fw rev < 6.61 work with this driver, whereas newer rev (the said 6.62) don't. As to the details: No idea. This is just what I found by comparing the older megaraid driver (which worked, but is unsupported) and the newer megaraid_mbox driver.
The noticeable difference was just the random deletion feature. As I don't have any details about the driver I certainly can't tell you any details. This is a workaround.
But as Dell (or LSI, for that matter) refuse to update the BIOS on these drivers we're stuck with it.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

Hannes,

I was on vacation last week. Sorry for late response. I am trying to findout the details of the DELL FW 6.62 release and will give the update as soon as I have them.

Regards.

Bo Yang

-----Original Message-----
From: Hannes Reinecke [mailto:[email protected]]
Sent: Monday, April 07, 2008 8:45 AM
To: Yang, Bo
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Patro, Sumant
Subject: Re: [patch 02/17] Dell CERC support for megaraid_mbox

Quoted 5 lines · Bo

Hannes,

We can not find out why need to disable the random deletion of the logical drive for the FW version>=6.62? Where is the 6.62 come from?

From the bug reports we had. Dell machines with a fw rev < 6.61 work with this driver, whereas newer rev (the said 6.62) don't.
As to the details: No idea. This is just what I found by comparing the older megaraid driver (which worked, but is unsupported) and the newer megaraid_mbox driver. The noticeable difference was just the random deletion feature.
As I don't have any details about the driver I certainly can't tell you any details. This is a workaround.
But as Dell (or LSI, for that matter) refuse to update the BIOS on these drivers we're stuck with it.

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html