PATCH: Fix crashes with hotplug serverworks
You can't install the base kernel on a Stratus box because of the overuse of __init. Affects both IDE layers identically. It isn't the only misuser of __init so more review of other drivers (or fixing ide_register code to know about hotplug v non-hotplug chipsets) would be good.
Original issue found by Stratus and their patch was the inspiration for this trivial one.
drivers/ide/pci/serverworks.c +5 -5
@@ -442,7 +442,7 @@return (dev->irq) ? dev->irq :0 ; } -static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif) +static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif) {return 1 ; }
@@ -454,7 +454,7 @@* Bit 14 clear = primary IDE channel does not have 80-pin cable. * Bit 14 set = primary IDE channel has 80-pin cable. */ -static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif) +static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif) {struct pci_dev *dev = hwif->pci_dev; if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
@@ -472,7 +472,7 @@* * WARNING: this only works on Alpine hardware! */ -static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif) +static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif) {struct pci_dev *dev = hwif->pci_dev; if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
@@ -483,7 +483,7 @@return 0 ; } -static unsigned int __init ata66_svwks (ide_hwif_t *hwif) +static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif) {struct pci_dev *dev = hwif->pci_dev;
@@ -573,7 +573,7 @@return ide_setup_pci_device (dev, d); } -static int __init init_setup_csb6 (struct pci_dev *dev,ide_pci_device_t *d) +static int __devinit init_setup_csb6 (struct pci_dev *dev,ide_pci_device_t *d) {if (!(PCI_FUNC (dev->devfn) &1 )) { d->bootable =NEVER_BOARD ;
Quoted 5 lines · Alan Cox
You can't install the base kernel on a Stratus box because of the overuse of
__init. Affects both IDE layers identically. It isn't the only misuser of__initso more review of other drivers (or fixingide_registercode to know about hotplug v non-hotplug chipsets) would be good.
Well, because of fake-hotplug we really need to mark every ->probe routine and what's called from it __devinit. Debian has patch to do that forever but Bart refused to take it.
Quoted 10 lines · Christoph Hellwig
Quoted 5 lines · Alan Cox
You can't install the base kernel on a Stratus box because of the overuse of
__init. Affects both IDE layers identically. It isn't the only misuser of__initso more review of other drivers (or fixingide_registercode to know about hotplug v non-hotplug chipsets) would be good.Well, because of fake-hotplug we really need to mark every ->probe routine and what's called from it
__devinit. Debian has patch to do that forever but Bart refused to take it.
If you care to respin your big patch it I'll gladly take it. It is indeed needed for PCI hotplug.
Bartlomiej
Quoted 3 lines · Christoph Hellwig
Well, because of fake-hotplug we really need to mark every ->probe routine and what's called from it
__devinit. Debian has patch to do that forever but Bart refused to take it.
I'm not surprised from our experience either.
Actually marking all the devices __devinit may be overkill. One approach that does also seem to work is passing "hotplug yes/no" information when registering the driver. This is then used to run the ide scan at boot and avoid registering that driver with the PCI core for hotplug.
A move to __devinit is certainly simpler.
Quoted 6 lines · Alan Cox
Quoted 3 lines · Christoph Hellwig
Well, because of fake-hotplug we really need to mark every ->probe routine and what's called from it
__devinit. Debian has patch to do that forever but Bart refused to take it.I'm not surprised from our experience either.
Get a life.
Quoted 4 lines
Actually marking all the devices
__devinitmay be overkill. One approach that does also seem to work is passing "hotplug yes/no" information when registering the driver. This is then used to run the ide scan at boot and avoid registering that driver with the PCI core for hotplug.
* with fake-hotplug driver you always need "hotplug yes"
* these drivers have to be registered with PCI core
Quoted 1 line
A move to
__devinitis certainly simpler.
This is a correct fix.
Bartlomiej
Quoted 1 line · Bartlomiej Zolnierkiewicz
Get a life.
I think that illustrates the problem with IDE management nicely...
Quoted 4 lines · Alan Cox
Quoted 1 line · Bartlomiej Zolnierkiewicz
Get a life.
I think that illustrates the problem with IDE management nicely...
Taking my words out of full context is a cheap trick.
The real problem here is your PERSONAL AGENDA against me. I try to stay focused on TECHNICAL ISSUES while you keep on your cruciate. You've became really "difficult" to deal with.
BTW I'm going to apply most (all?) of your patches.
Bartlomiej
Quoted 2 lines · Bartlomiej Zolnierkiewicz
I try to stay focused on TECHNICAL ISSUES while you keep on your cruciate. You've became really "difficult" to deal with.
I find the same true in the other direction.
Quoted 1 line
BTW I'm going to apply most (all?) of your patches.
Glad to hear it. If you make any small changes/fixes in the process please let me know so I can propogate them back into my tree and also our vendor release tree.
Thanks
Alan