Skip to contentSkip to conversation

megaraid driver (proposed patch)

DISCUSSION Bruno Cornec 5 participants 10 messages Mar 25, 2005 – Mar 31, 2005 SCSI

lore
Share & tools
lore
#0 lore raw

Hello,

I've noticed that since recent kernel versions, it's not possible anymore to use simultaneously new and old megaraid driver.

It seems to have been introduced by that changeset:
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/scsi/megaraid/[email protected]??nav=index.html|src/.|src/drivers|src/drivers/scsi|src/drivers/scsi/megaraid|hist/drivers/scsi/megaraid/Kconfig.megaraid

It particularly makes life of people developing kernel for distro difficult as it forces them to drop support for legacy hardware which is working just fine with 2.6, or to patch their own kernel build. As well it prevents simultaneous usage of new and old cards in the same system.

Would you consider to apply the following patch proposed by Thierry Vignaud as a solution for the MandrakeSoft kernel in the mainstream 2.6 kernel ?

Thanks in advance,
Bruno.

--- ./drivers/scsi/megaraid/Kconfig.megaraid 2005-03-02
08:37:49.000000000 +0100
+++ ./drivers/scsi/megaraid/Kconfig.megaraid 2005-03-25
18:36:37.809994244 +0100
@@ -64,7 +64,6 @@
To compile this driver as a module, choose M here: the module will be called megaraid_mbox

-if MEGARAID_NEWGEN=n
config MEGARAID_LEGACY
tristate "LSI Logic Legacy MegaRAID Driver" depends on PCI && SCSI
@@ -75,4 +74,3 @@

To compile this driver as a module, choose M here: the module will be called megaraid
-endif

Signature · 4 lines
Linux Solution Consultant   /   Open Source Evangelist   \    HP C&I EMEA ISG
HP/Intel Solution Center http://hpintelco.net Hewlett-Packard Grenoble/France
Des infos sur Linux?  http://www.HyPer-Linux.org      http://www.hp.com/linux
La musique ancienne?  http://www.musique-ancienne.org http://www.medieval.org
#1 lore raw
Quoted 3 lines · Bruno Cornec

Would you consider to apply the following patch proposed by Thierry Vignaud as a solution for the MandrakeSoft kernel in the mainstream 2.6 kernel ?

Well, to be considered you'd need to cc the megaraid maintainers and the linux-scsi mailing list.

Quoted 1 line

-if MEGARAID_NEWGEN=n

No, this is wrong it would break allyes configs and I'd get shot.

James

#2 lore raw
Quoted 11 lines · James Bottomley
Quoted 3 lines · Bruno Cornec

Would you consider to apply the following patch proposed by Thierry Vignaud as a solution for the MandrakeSoft kernel in the mainstream 2.6 kernel ?

Well, to be considered you'd need to cc the megaraid maintainers and the linux-scsi mailing list.

Quoted 1 line

-if MEGARAID_NEWGEN=n

No, this is wrong it would break allyes configs and I'd get shot.

Why? The megaraid drivers shouldn't have any conflicting non-static symbols

#3 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 8 lines · James Bottomley
Quoted 3 lines · Bruno Cornec

Would you consider to apply the following patch proposed by Thierry Vignaud as a solution for the MandrakeSoft kernel in the mainstream 2.6 kernel ?

Well, to be considered you'd need to cc the megaraid maintainers and the linux-scsi mailing list.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

-if MEGARAID_NEWGEN=n

No, this is wrong it would break allyes configs and I'd get shot.

Why? The megaraid drivers shouldn't have any conflicting non-static symbols

You get a kernel with two drivers trying to claim some of the same set of cards. The winner will be the driver that gets its init routines called first, but this isn't a desirable outcome.

I wouldn't object to a patch that allows both *modules* to be built, which is all I think the distros are after.

James

#4 lore raw
Quoted 6 lines · James Bottomley

You get a kernel with two drivers trying to claim some of the same set of cards. The winner will be the driver that gets its init routines called first, but this isn't a desirable outcome.

I wouldn't object to a patch that allows both *modules* to be built, which is all I think the distros are after.

The new megaraid driver doesn't support old hardware. Maybe we should drop the overlapping pci ids from the old driver?

#5 lore raw

Can someone please remove me from these mailing lists?

I don't remember signing up ffor them and it's filling my inbox too quickly.

Quoted 18 lines · Christoph Hellwig
Quoted 6 lines · James Bottomley

You get a kernel with two drivers trying to claim some of the same set of cards. The winner will be the driver that gets its init routines called first, but this isn't a desirable outcome.

I wouldn't object to a patch that allows both *modules* to be built, which is all I think the distros are after.

The new megaraid driver doesn't support old hardware. Maybe we should drop the overlapping pci ids from the old driver?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

The new megaraid driver doesn't support old hardware. Maybe we should drop the overlapping pci ids from the old driver?

That works for me too ... but the people who get to decide what to do should be the driver maintainers.

James

#7 lore raw

Hello,

After a first attempt of discussion on lkml, I'd like to get your feedback on the following points.

I've noticed that since recent kernel versions, it's not possible anymore to use simultaneously new and old megaraid driver.

It seems to have been introduced by that changeset:
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/scsi/megaraid/Kconfig.megar
[email protected]??nav=index.html|src/.|src/drivers|src/drivers/scsi|src/drivers/scsi/mega raid|hist/drivers/scsi/megaraid/Kconfig.megaraid

It particularly makes life of people developing kernel for distro difficult as it forces them to drop support for legacy hardware which is working just fine with 2.6, or to patch their own kernel build. As well it prevents simultaneous usage of new and old cards in the same system.

As notes by James Bottomley and Christoph Hellwig the best thing to do is probably to remove support for cards in the old driver that are still supported by the new driver.

I'd like to propose a patch but looking at the code I have the following
question: the card id 101E:1960 seems to be supported by the new driver as per the header of megaraid_mbox.c but in reality I was unable to boot my system which uses that precise card with the new driver.

Are they mistakes in the header file ? Should they be removed from the new driver (if they don't work) or from the old if they work ?

My current status is the following (just for discussion)

diff -Nru drivers/scsi/megaraid/Kconfig.megaraid
drivers.new/scsi/megaraid/Kconfig.megaraid

scsi/megaraid/Kconfig.megaraid Fri Mar 25 20:53:37 2005 renamed from scsi/megaraid/Kconfig.megaraid Fri Mar 25 20:34:06 2005 +0 -1
@@ -64,15 +64,12 @@
        To compile this driver as a module, choose M here: the
        module will be called megaraid_mbox
 
-if MEGARAID_NEWGEN=n
 config MEGARAID_LEGACY
        tristate "LSI Logic Legacy MegaRAID Driver"
        depends on PCI && SCSI
        help
        This driver supports the LSI MegaRAID 418, 428, 438, 466, 762,

490
- and 467 SCSI host adapters. This driver also support the all

        U320

- RAID controllers
+ and 467 SCSI host adapters.

To compile this driver as a module, choose M here: the module will be called megaraid
-endif

scsi/megaraid.c Fri Mar 25 20:57:25 2005 renamed from scsi/megaraid.c Fri Mar 25 20:28:29 2005 +0 -6
diff -Nru drivers/scsi/megaraid.c drivers.new/scsi/megaraid.c
@@ -5033,12 +5033,6 @@
 }
 
 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_VENDOR_ID_DELL, PCI_DEVICE_ID_PERC4_DI,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
-       {PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_PERC4_QC_VERDE,
-               PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
        {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,
scsi/megaraid.h Fri Mar 25 20:57:03 2005 renamed from scsi/megaraid.h Fri Mar 25 20:28:25 2005 +0 -4
diff -Nru drivers/scsi/megaraid.h drivers.new/scsi/megaraid.h
@@ -73,10 +73,6 @@
 #define PCI_DEVICE_ID_AMI_MEGARAID3    0x1960
 #endif
 
-#define PCI_DEVICE_ID_DISCOVERY                0x000E
-#define PCI_DEVICE_ID_PERC4_DI         0x000F
-#define PCI_DEVICE_ID_PERC4_QC_VERDE   0x0407
-
 /* Sub-System Vendor IDs */
 #define        AMI_SUBSYS_VID                  0x101E
 #define DELL_SUBSYS_VID                        0x1028
Signature · 4 lines
Linux Solution Consultant   /   Open Source Evangelist   \    HP C&I EMEA ISG
HP/Intel Solution Center http://hpintelco.net Hewlett-Packard Grenoble/France
Des infos sur Linux?  http://www.HyPer-Linux.org      http://www.hp.com/linux
La musique ancienne?  http://www.musique-ancienne.org http://www.medieval.org
#8 lore raw
In reply to James Bottomley
Quoted 9 lines · James Bottomley
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

Would you consider to apply the following patch proposed by Thierry Vignaud as a solution for the MandrakeSoft kernel in the mainstream 2.6 kernel ?

Well, to be considered you'd need to cc the megaraid maintainers and the linux-scsi mailing list.

Quoted 1 line

-if MEGARAID_NEWGEN=n

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

No, this is wrong it would break allyes configs and I'd get shot.

Why? The megaraid drivers shouldn't have any conflicting non-static symbols

You get a kernel with two drivers trying to claim some of the same set of cards. The winner will be the driver that gets its init routines called first, but this isn't a desirable outcome.

well, this is not the first occurence:

- one can build both oss and alsa drivers which claimed quite the same ids set.
eg, one example from modules.pcimap:
snd-intel8x0 0x00001039 0x00007012 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
i810_audio 0x00001039 0x00007012 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0

- at one point, atiixp and sata_sil used to overlap on one sata controller
- tg3 and bcm5700 totally overlap
- the same for e100 and eepro100, e1000 and eepro1000
- sata drivers ahci and ata_piix used to overlap too on a cople of devices
- b44 and bcm4400 totally overlap
- 8139too and 8139cp overlap
- i2c-ali15x3 and i2c-ali1535 overlap too
- qla6322 and qla6312 used to overlap in the past
- via-ircc and i2c-viapro overlaps
- dvb
- saa7134 and saa7134-dvb overlap
- sonypi and i2c-piix4 overlap
- cx88 and cx88-dvb overlap
- radio-gemtek-pci and radio-maxiradio overlap too
- ...

so this argument looks totally bogus for me since few of these drivers prevent them being build in-core at both time b/c there're quite a lot of other driver that will "break" allyes configs

Quoted 2 lines

I wouldn't object to a patch that allows both *modules* to be built, which is all I think the distros are after.

indeed. but the first patch should have been accpeted as this.

the in fact policy isn't currently to prevent overlapping drivers to being compiled in-core at the same time, so i think we shouldn't prevent it but convert all these drivers' build rules so that they allow to be built as modules at the same time, but not in core at the same time

#9 lore raw
Quoted 1 line

- tg3 and bcm5700 totally overlap

bcm5700 isn't in the tree.

Quoted 1 line

- the same for e100 and eepro100, e1000 and eepro1000

there's no eepro1000

Quoted 3 lines

- sata drivers ahci and ata_piix used to overlap too on a cople of devices
- b44 and bcm4400 totally overlap

bcm4000 isn't in the tree