2004-06-07 22:55:53

by Anton Blanchard

[permalink] [raw]
Subject: [PATCH] Fix PCI hotplug of promise IDE cards


Hi,

It looks like no one has tried hotplugging Promise IDE cards :)

Anton

--

Change some __init functions in the pdc202xx driver to be __devinit, they
are used when hotpluging.

Signed-off-by: Anton Blanchard <[email protected]>


diff -puN drivers/ide/pci/pdc202xx_new.c~fix_promise_hotplug drivers/ide/pci/pdc202xx_new.c
--- gr_work/drivers/ide/pci/pdc202xx_new.c~fix_promise_hotplug 2004-06-07 02:44:59.180717024 -0500
+++ gr_work-anton/drivers/ide/pci/pdc202xx_new.c 2004-06-07 02:46:04.067307100 -0500
@@ -404,7 +404,7 @@ static void __devinit apple_kiwi_init(st
}
#endif /* CONFIG_PPC_PMAC */

-static unsigned int __init init_chipset_pdcnew (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_pdcnew (struct pci_dev *dev, const char *name)
{
if (dev->resource[PCI_ROM_RESOURCE].start) {
pci_write_config_dword(dev, PCI_ROM_ADDRESS,
@@ -429,7 +429,7 @@ static unsigned int __init init_chipset_
return dev->irq;
}

-static void __init init_hwif_pdc202new (ide_hwif_t *hwif)
+static void __devinit init_hwif_pdc202new (ide_hwif_t *hwif)
{
hwif->autodma = 0;

@@ -457,12 +457,12 @@ static void __init init_hwif_pdc202new (
#endif /* PDC202_DEBUG_CABLE */
}

-static void __init init_setup_pdcnew (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdcnew (struct pci_dev *dev, ide_pci_device_t *d)
{
ide_setup_pci_device(dev, d);
}

-static void __init init_setup_pdc20270 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdc20270 (struct pci_dev *dev, ide_pci_device_t *d)
{
struct pci_dev *findev = NULL;

@@ -488,7 +488,7 @@ static void __init init_setup_pdc20270 (
ide_setup_pci_device(dev, d);
}

-static void __init init_setup_pdc20276 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdc20276 (struct pci_dev *dev, ide_pci_device_t *d)
{
if ((dev->bus->self) &&
(dev->bus->self->vendor == PCI_VENDOR_ID_INTEL) &&

_


Subject: Re: [PATCH] Fix PCI hotplug of promise IDE cards

On Tuesday 08 of June 2004 00:51, Anton Blanchard wrote:
> Hi,

Hi,

> It looks like no one has tried hotplugging Promise IDE cards :)

Yep and this bug is present in some other drivers.
Debian kernel patchkit has fixes for them but it goes too far
and fixes drivers for hardware which is not hot-pluggable.

> Anton
>
> --
>
> Change some __init functions in the pdc202xx driver to be __devinit, they
> are used when hotpluging.
>
> Signed-off-by: Anton Blanchard <[email protected]>