Skip to contentSkip to conversation

Allow both megaraid drivers to be built

PATCH RESEND New Bagalkote, Sreenivas 4 participants 4 messages Nov 7, 2005

Subsystems (3)
lore
Share & tools
lore
#0 lore raw
Quoted 9 lines

Note that the current situation is even worse for your customers, because the Kconfig subsystem only allows to build one driver at a time. You don't notice that because all distributions patch that silly check out again.

Can we at least agree on patching that out ASAP and leave two drivers handling the same ID (we have cases like that all over already) and then try to make some progress on removing ids from the old driver independent of that?

You mean, you want to allow both drivers to be built and loaded together, even though they have overlapping ids?!

#1 lore raw
Quoted 2 lines · Sreenivas

You mean, you want to allow both drivers to be built and loaded together, even though they have overlapping ids?!

We allow to build both, and allow to load both aswell, although the latter is pretty useless as all devices will be claimed by one driver already (except for the two ids only supported by the old driver)

#2 lore raw
In reply to Bagalkote, Sreenivas
Quoted 2 lines · Sreenivas

You mean, you want to allow both drivers to be built and loaded together, even though they have overlapping ids?!

You're not thinking like a distribution. They want to build one kernel for almost every configuration. There are a few things (SMP, bigmem etc) that they're willing to build extra kernels for, but not, I think, for old vs new megaraid. Thus they have to patch this up to build the two modules. By and large, the overlapping ID business is sorted out by the installer, although having disjoint IDs is good since the installer doesn't have to make a choice.

Can you get this sorted out before 2.6.15, please (so if I believe Linus, that's about five weeks)?

Thanks,

James

#3 lore raw

PATCH 1/1 Schedule removal of megaraid hardware support overlap

Hopefully we'll be getting the build restriction zapped much sooner, but we should also be thinking about totally removing the hardware support overlap in the megaraid drivers.

This patch pencils in a date of Feb 06 for this, and performs some printk abuse in hope that existing legacy users might pick up on what's going on.

Documentation/feature-removal-schedule.txt renamed from Documentation/feature-removal-schedule.txt.orig +16 -0
@@ -95,3 +95,19 @@ Why:	This interface has been obsoleted b
 	to link against API-compatible library on top of libnfnetlink_queue 
 	instead of the current 'libipq'.
 Who:	Harald Welte <[email protected]>
+
+---------------------------
+
+What:	Hardware support in the legacy SCSI megaraid driver
+When:	February 2006
+Why:	The legacy megaraid driver has a large hardware support overlap with
+	the "newgen" driver. For this reason, you cannot build the legacy
+	driver alongside the new driver, making it impossible for a
+	one-size-fits-all kernel to support the whole range of megaraid
+	hardware. To resolve this, support for the overlapping hardware will
+	be dropped from the legacy driver and the build restriction will be
+	dropped. During the interim period, legacy driver users with affected
+	hardware will recieve a large warning in 'dmesg' notifying them that
+	they should change.
+Who:	Daniel Drake <[email protected]>
+
drivers/scsi/megaraid.c renamed from drivers/scsi/megaraid.c.orig +31 -5
@@ -51,6 +51,15 @@
 
 #include "megaraid.h"
 
+/*
+ * Some of the hardware supported by this driver overlaps with hardware
+ * supported by the "newgen" megaraid driver.
+ * Support for the overlapping hardware may be dropped from _this_ driver in
+ * the near future. If you get a printk warning about this, you probably want
+ * to change.
+ */
+#define DRIVER_DEPRECATED 0x1
+
 #define MEGARAID_MODULE_VERSION "2.00.3"
 
 MODULE_AUTHOR ("LSI Logic Corporation");
@@ -4786,6 +4795,23 @@ megaraid_probe_one(struct pci_dev *pdev,
 		}
 	}
 
+	/*
+	 * Warn affected users that support for their hardware is going away
+	 */
+	if (id->driver_data & DRIVER_DEPRECATED) {
+		printk(KERN_WARNING "megaraid: ******    WARNING    ******\n");
+		printk(KERN_WARNING "megaraid: Your megaraid card is supported "
+			"by both the legacy and the newgen\n");
+		printk(KERN_WARNING "megaraid: megaraid driver, and you are "
+			"currently using the legacy driver.\n");
+		printk(KERN_WARNING "megaraid: Support for your card will be "
+			"dropped from the legacy driver in\n");
+		printk(KERN_WARNING "megaraid: the near future, so you should "
+			"switch over to the newgen driver as\n");
+		printk(KERN_WARNING "megaraid: soon as you can.\n");
+		printk(KERN_WARNING "megaraid: ******    WARNING    ******");
+	}
+
 	if (mega_is_bios_enabled(adapter))
 		mega_hbas[hba_count].is_bios_enabled = 1;
 	mega_hbas[hba_count].hostdata_addr = adapter;
@@ -5045,21 +5071,21 @@ megaraid_shutdown(struct pci_dev *pdev)
 
 static struct pci_device_id megaraid_pci_tbl[] = {
 	{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DISCOVERY,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0, DRIVER_DEPRECATED},
 	{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_PERC4_DI,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT | DRIVER_DEPRECATED},
 	{PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_PERC4_QC_VERDE,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT | DRIVER_DEPRECATED},
 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
 		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,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0, DRIVER_DEPRECATED},
 	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID3,
-		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+		PCI_ANY_ID, PCI_ANY_ID, 0, 0, DRIVER_DEPRECATED},
 	{0,}
 };
 MODULE_DEVICE_TABLE(pci, megaraid_pci_tbl);