[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#374792: linux-2.6: Please add support for CERC ATA100/4ch to the new megaraid_mbox driver)



Tags: fixed, patch

Janusz Krzysztofik wrote:
Ju, Seokmann wrote:
...
Technically, I would recommend you to check F/W version and make sure it is not higher than 6.61.
I believe the problem happens with 6.62 or higher.

Bingo! megaraid_mbox works for me with F/W 6.61. How did you know?

I enclose a trivial patch that checks for F/W version and displays a warning if too high. It should make life easier for those who may face the problem :).

So I think the bug can be closed as a workaround is available.
The patch is optional.

Maybe some info should be included in the Etch release notes?

Thank you,
Janusz
diff -upr linux-source-2.6.18/drivers/scsi/megaraid/megaraid_mbox.c linux-source-2.6.18-cerc/drivers/scsi/megaraid/megaraid_mbox.c
--- linux-source-2.6.18/drivers/scsi/megaraid/megaraid_mbox.c	2006-09-20 05:42:06.000000000 +0200
+++ linux-source-2.6.18-cerc/drivers/scsi/megaraid/megaraid_mbox.c	2006-09-27 17:53:17.000000000 +0200
@@ -25,6 +25,7 @@
  * Dell PERC3/QC			101E	1960	1028	0471
  * Dell PERC3/DC			101E	1960	1028	0493
  * Dell PERC3/SC			101E	1960	1028	0475
+ * Dell CERC ATA100/4ch with F/W<=6.61	101E	1960	1028	0511
  * Dell PERC3/Di			1028	1960	1028	0123
  * Dell PERC4/SC			1000	1960	1028	0520
  * Dell PERC4/DC			1000	1960	1028	0518
@@ -791,6 +792,21 @@ megaraid_init_mbox(adapter_t *adapter)
 		goto out_alloc_cmds;
 	}
 
+	// Compatibility check
+	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_ANN, (KERN_WARNING
+			"megaraid: problems? downgrade F/W to version 6.61\n"));
+	}
+
 	// Do we support extended CDBs
 	adapter->max_cdb_sz = 10;
 	if (megaraid_mbox_extended_cdb(adapter) == 0) {
diff -upr linux-source-2.6.18/drivers/scsi/megaraid/megaraid_mbox.h linux-source-2.6.18-cerc/drivers/scsi/megaraid/megaraid_mbox.h
--- linux-source-2.6.18/drivers/scsi/megaraid/megaraid_mbox.h	2006-09-20 05:42:06.000000000 +0200
+++ linux-source-2.6.18-cerc/drivers/scsi/megaraid/megaraid_mbox.h	2006-09-27 17:45:25.000000000 +0200
@@ -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

Reply to: