linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 02/17] Dell CERC support for megaraid_mbox
@ 2008-03-28 21:48 akpm
  2008-03-30 17:13 ` James Bottomley
  2008-04-02 21:48 ` Yang, Bo
  0 siblings, 2 replies; 6+ messages in thread
From: akpm @ 2008-03-28 21:48 UTC (permalink / raw)
  To: James.Bottomley
  Cc: linux-scsi, akpm, hare, Bo.Yang, James.Bottomley, Sumant.Patro

From: Hannes Reinecke <hare@suse.de>

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

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: "Patro, Sumant" <Sumant.Patro@lsi.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Cc: "Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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_mbox drivers/scsi/megaraid/megaraid_mbox.c
--- a/drivers/scsi/megaraid/megaraid_mbox.c~dell-cerc-support-for-megaraid_mbox
+++ 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_mbox drivers/scsi/megaraid/megaraid_mbox.h
--- a/drivers/scsi/megaraid/megaraid_mbox.h~dell-cerc-support-for-megaraid_mbox
+++ 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
_

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch 02/17] Dell CERC support for megaraid_mbox
  2008-03-28 21:48 [patch 02/17] Dell CERC support for megaraid_mbox akpm
@ 2008-03-30 17:13 ` James Bottomley
  2008-03-31 14:33   ` Yang, Bo
  2008-04-02 21:48 ` Yang, Bo
  1 sibling, 1 reply; 6+ messages in thread
From: James Bottomley @ 2008-03-30 17:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-scsi, hare, Bo.Yang, Sumant.Patro

On Fri, 2008-03-28 at 14:48 -0700, akpm@linux-foundation.org wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> 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

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [patch 02/17] Dell CERC support for megaraid_mbox
  2008-03-30 17:13 ` James Bottomley
@ 2008-03-31 14:33   ` Yang, Bo
  0 siblings, 0 replies; 6+ messages in thread
From: Yang, Bo @ 2008-03-31 14:33 UTC (permalink / raw)
  To: James Bottomley, akpm; +Cc: linux-scsi, hare, Patro, Sumant


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:James.Bottomley@HansenPartnership.com] 
Sent: Sunday, March 30, 2008 1:14 PM
To: akpm@linux-foundation.org
Cc: linux-scsi@vger.kernel.org; hare@suse.de; Yang, Bo; Patro, Sumant
Subject: Re: [patch 02/17] Dell CERC support for megaraid_mbox

On Fri, 2008-03-28 at 14:48 -0700, akpm@linux-foundation.org wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> 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

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [patch 02/17] Dell CERC support for megaraid_mbox
  2008-03-28 21:48 [patch 02/17] Dell CERC support for megaraid_mbox akpm
  2008-03-30 17:13 ` James Bottomley
@ 2008-04-02 21:48 ` Yang, Bo
  2008-04-07 12:44   ` Hannes Reinecke
  1 sibling, 1 reply; 6+ messages in thread
From: Yang, Bo @ 2008-04-02 21:48 UTC (permalink / raw)
  To: akpm, James.Bottomley; +Cc: linux-scsi, hare, James.Bottomley, Patro, Sumant

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: akpm@linux-foundation.org [mailto:akpm@linux-foundation.org] 
Sent: Friday, March 28, 2008 5:49 PM
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org; akpm@linux-foundation.org; hare@suse.de;
Yang, Bo; James.Bottomley@SteelEye.com; Patro, Sumant
Subject: [patch 02/17] Dell CERC support for megaraid_mbox

From: Hannes Reinecke <hare@suse.de>

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

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: "Patro, Sumant" <Sumant.Patro@lsi.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Cc: "Yang, Bo" <Bo.Yang@lsi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 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
_

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch 02/17] Dell CERC support for megaraid_mbox
  2008-04-02 21:48 ` Yang, Bo
@ 2008-04-07 12:44   ` Hannes Reinecke
  2008-04-14 15:56     ` Yang, Bo
  0 siblings, 1 reply; 6+ messages in thread
From: Hannes Reinecke @ 2008-04-07 12:44 UTC (permalink / raw)
  To: Yang, Bo
  Cc: akpm, James.Bottomley, linux-scsi, James.Bottomley, Patro, Sumant

Yang, Bo wrote:
> 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
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [patch 02/17] Dell CERC support for megaraid_mbox
  2008-04-07 12:44   ` Hannes Reinecke
@ 2008-04-14 15:56     ` Yang, Bo
  0 siblings, 0 replies; 6+ messages in thread
From: Yang, Bo @ 2008-04-14 15:56 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: akpm, James.Bottomley, linux-scsi, James.Bottomley, Patro, Sumant

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:hare@suse.de] 
Sent: Monday, April 07, 2008 8:45 AM
To: Yang, Bo
Cc: akpm@linux-foundation.org; James.Bottomley@HansenPartnership.com; linux-scsi@vger.kernel.org; James.Bottomley@SteelEye.com; Patro, Sumant
Subject: Re: [patch 02/17] Dell CERC support for megaraid_mbox

Yang, Bo wrote:
> 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
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-14 15:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 21:48 [patch 02/17] Dell CERC support for megaraid_mbox akpm
2008-03-30 17:13 ` James Bottomley
2008-03-31 14:33   ` Yang, Bo
2008-04-02 21:48 ` Yang, Bo
2008-04-07 12:44   ` Hannes Reinecke
2008-04-14 15:56     ` Yang, Bo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).