* [PATCH] megaraid: Dell CERC ATA100/4ch support revisited
@ 2007-10-31 13:59 Hannes Reinecke
0 siblings, 0 replies; only message in thread
From: Hannes Reinecke @ 2007-10-31 13:59 UTC (permalink / raw)
To: Patro, Sumant; +Cc: James Bottomley, SCSI Mailing List
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
Hi all,
I finally managed to track down the outstanding Del CERC issue.
Problem is the megaraid_mbox does not find any devices with
firmware levels >= 6.62. And telling users to downgrade their
BIOS is not always an option. So here's the problem:
Megaraid F/W implements a feature called 'random deletion'.
Appearently it's used for delete logical volumes on the fly
(don't ask me for details, I've no idea).
So, for handling this they shift the target IDs for the
logical channels by 0x80.
Only the legacy megaraid driver shifts the ID only for
I/O commands, whereas the megaraid_mbox driver shifts
the ID for _all_ commands.
This results in the INQUIRY command being sent to the
wrong channel, where it doesn't detect any devices.
Not surprisingly, really.
So as I don't have a clue which behavior is the correct
one we should take the safe route and just disable this
feature if an offending firmware is found.
Maybe Sumant can shed some light here. But at least we
now know the reason behind this incompability.
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)
[-- Attachment #2: megaraid_mbox-dell-cerc-support --]
[-- Type: text/plain, Size: 2142 bytes --]
From: Hannes Reinecke <hare@suse.de>
Subject: Dell CERC support for megaraid_mbox
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.
Signed-off-by: Hannes Reinecke <hare@suse.de>
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index c6a53dc..8c84049 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3172,6 +3172,23 @@ megaraid_mbox_support_random_del(adapter_t *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 --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h
index 626459d..c1d86d9 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.h
+++ b/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 related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-31 13:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 13:59 [PATCH] megaraid: Dell CERC ATA100/4ch support revisited Hannes Reinecke
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).