Subject: [PATCH] IDE update for 2.6.7-rc3 [1/12]


Probably some drivers are still missed because I changed only
these drivers that I knew that there are PCI cards using them.

If you know about PCI cards using other drivers please speak up.

[PATCH] ide: PCI hotplugging fixes

Extracted from the Debian kernel package.

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>

linux-2.6.7-rc3-bzolnier/drivers/ide/pci/aec62xx.c | 10 ++++----
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/cmd64x.c | 6 ++---
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/hpt34x.c | 4 +--
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/hpt366.c | 16 +++++++-------
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/pdc202xx_new.c | 10 ++++----
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/pdc202xx_old.c | 12 +++++-----
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/siimage.c | 18 ++++++++--------
linux-2.6.7-rc3-bzolnier/drivers/ide/pci/trm290.c | 2 -
8 files changed, 39 insertions(+), 39 deletions(-)

diff -puN drivers/ide/pci/aec62xx.c~ide_pci_fixes drivers/ide/pci/aec62xx.c
--- linux-2.6.7-rc3/drivers/ide/pci/aec62xx.c~ide_pci_fixes 2004-06-11 15:54:58.655677784 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/aec62xx.c 2004-06-11 15:56:03.099880776 +0200
@@ -409,7 +409,7 @@ static int aec62xx_irq_timeout (ide_driv
return 0;
}

-static unsigned int __init init_chipset_aec62xx (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const char *name)
{
int bus_speed = system_bus_clock();

@@ -435,7 +435,7 @@ static unsigned int __init init_chipset_
return dev->irq;
}

-static void __init init_hwif_aec62xx (ide_hwif_t *hwif)
+static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif)
{
hwif->autodma = 0;
hwif->tuneproc = &aec62xx_tune_drive;
@@ -468,7 +468,7 @@ static void __init init_hwif_aec62xx (id
hwif->drives[1].autodma = hwif->autodma;
}

-static void __init init_dma_aec62xx (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_aec62xx(ide_hwif_t *hwif, unsigned long dmabase)
{
struct pci_dev *dev = hwif->pci_dev;

@@ -490,12 +490,12 @@ static void __init init_dma_aec62xx (ide
ide_setup_dma(hwif, dmabase, 8);
}

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

-static void __init init_setup_aec6x80 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_aec6x80(struct pci_dev *dev, ide_pci_device_t *d)
{
unsigned long bar4reg = pci_resource_start(dev, 4);

diff -puN drivers/ide/pci/cmd64x.c~ide_pci_fixes drivers/ide/pci/cmd64x.c
--- linux-2.6.7-rc3/drivers/ide/pci/cmd64x.c~ide_pci_fixes 2004-06-11 15:54:58.659677176 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/cmd64x.c 2004-06-11 15:57:19.695236512 +0200
@@ -586,7 +586,7 @@ static int cmd646_1_ide_dma_end (ide_dri
return (dma_stat & 7) != 4;
}

-static unsigned int __init init_chipset_cmd64x (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const char *name)
{
u32 class_rev = 0;
u8 mrdmode = 0;
@@ -674,7 +674,7 @@ static unsigned int __init init_chipset_
return 0;
}

-static unsigned int __init ata66_cmd64x (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_cmd64x(ide_hwif_t *hwif)
{
u8 ata66 = 0, mask = (hwif->channel) ? 0x02 : 0x01;

@@ -689,7 +689,7 @@ static unsigned int __init ata66_cmd64x
return (ata66 & mask) ? 1 : 0;
}

-static void __init init_hwif_cmd64x (ide_hwif_t *hwif)
+static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
unsigned int class_rev;
diff -puN drivers/ide/pci/hpt34x.c~ide_pci_fixes drivers/ide/pci/hpt34x.c
--- linux-2.6.7-rc3/drivers/ide/pci/hpt34x.c~ide_pci_fixes 2004-06-11 15:54:58.671675352 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/hpt34x.c 2004-06-11 15:58:40.615934696 +0200
@@ -235,7 +235,7 @@ no_dma_set:
*/
#define HPT34X_PCI_INIT_REG 0x80

-static unsigned int __init init_chipset_hpt34x (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const char *name)
{
int i = 0;
unsigned long hpt34xIoBase = pci_resource_start(dev, 4);
@@ -289,7 +289,7 @@ static unsigned int __init init_chipset_
return dev->irq;
}

-static void __init init_hwif_hpt34x (ide_hwif_t *hwif)
+static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
{
u16 pcicmd = 0;

diff -puN drivers/ide/pci/hpt366.c~ide_pci_fixes drivers/ide/pci/hpt366.c
--- linux-2.6.7-rc3/drivers/ide/pci/hpt366.c~ide_pci_fixes 2004-06-11 15:54:58.675674744 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/hpt366.c 2004-06-11 16:00:16.230399088 +0200
@@ -795,7 +795,7 @@ static int hpt370_busproc(ide_drive_t *
return 0;
}

-static int __init init_hpt37x(struct pci_dev *dev)
+static int __devinit init_hpt37x(struct pci_dev *dev)
{
int adjust, i;
u16 freq;
@@ -923,7 +923,7 @@ init_hpt37X_done:
return 0;
}

-static int __init init_hpt366 (struct pci_dev *dev)
+static int __devinit init_hpt366(struct pci_dev *dev)
{
u32 reg1 = 0;
u8 drive_fast = 0;
@@ -958,7 +958,7 @@ static int __init init_hpt366 (struct pc
return 0;
}

-static unsigned int __init init_chipset_hpt366 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const char *name)
{
int ret = 0;
u8 test = 0;
@@ -1004,7 +1004,7 @@ static unsigned int __init init_chipset_
return dev->irq;
}

-static void __init init_hwif_hpt366 (ide_hwif_t *hwif)
+static void __devinit init_hwif_hpt366(ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
u8 ata66 = 0, regmask = (hwif->channel) ? 0x01 : 0x02;
@@ -1116,7 +1116,7 @@ static void __init init_hwif_hpt366 (ide
hwif->drives[1].autodma = hwif->autodma;
}

-static void __init init_dma_hpt366 (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_hpt366(ide_hwif_t *hwif, unsigned long dmabase)
{
u8 masterdma = 0, slavedma = 0;
u8 dma_new = 0, dma_old = 0;
@@ -1151,7 +1151,7 @@ static void __init init_dma_hpt366 (ide_
ide_setup_dma(hwif, dmabase, 8);
}

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

@@ -1176,12 +1176,12 @@ static void __init init_setup_hpt374 (st
ide_setup_pci_device(dev, d);
}

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

-static void __init init_setup_hpt366 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d)
{
struct pci_dev *findev = NULL;
u8 pin1 = 0, pin2 = 0;
diff -puN drivers/ide/pci/pdc202xx_new.c~ide_pci_fixes drivers/ide/pci/pdc202xx_new.c
--- linux-2.6.7-rc3/drivers/ide/pci/pdc202xx_new.c~ide_pci_fixes 2004-06-11 15:54:58.679674136 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/pdc202xx_new.c 2004-06-11 16:02:00.526543664 +0200
@@ -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) &&
diff -puN drivers/ide/pci/pdc202xx_old.c~ide_pci_fixes drivers/ide/pci/pdc202xx_old.c
--- linux-2.6.7-rc3/drivers/ide/pci/pdc202xx_old.c~ide_pci_fixes 2004-06-11 15:54:58.682673680 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/pdc202xx_old.c 2004-06-11 16:03:21.125290792 +0200
@@ -670,7 +670,7 @@ static int pdc202xx_tristate (ide_drive_
return 0;
}

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

-static void __init init_hwif_pdc202xx (ide_hwif_t *hwif)
+static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
{
hwif->autodma = 0;
hwif->tuneproc = &config_chipset_for_pio;
@@ -755,7 +755,7 @@ static void __init init_hwif_pdc202xx (i
#endif /* PDC202_DEBUG_CABLE */
}

-static void __init init_dma_pdc202xx (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase)
{
u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0;

@@ -807,7 +807,7 @@ static void __init init_dma_pdc202xx (id
ide_setup_dma(hwif, dmabase, 8);
}

-static void __init init_setup_pdc202ata4 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdc202ata4(struct pci_dev *dev, ide_pci_device_t *d)
{
if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
u8 irq = 0, irq2 = 0;
@@ -837,7 +837,7 @@ static void __init init_setup_pdc202ata4
ide_setup_pci_device(dev, d);
}

-static void __init init_setup_pdc20265 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdc20265(struct pci_dev *dev, ide_pci_device_t *d)
{
if ((dev->bus->self) &&
(dev->bus->self->vendor == PCI_VENDOR_ID_INTEL) &&
@@ -866,7 +866,7 @@ static void __init init_setup_pdc20265 (
ide_setup_pci_device(dev, d);
}

-static void __init init_setup_pdc202xx (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_pdc202xx(struct pci_dev *dev, ide_pci_device_t *d)
{
ide_setup_pci_device(dev, d);
}
diff -puN drivers/ide/pci/siimage.c~ide_pci_fixes drivers/ide/pci/siimage.c
--- linux-2.6.7-rc3/drivers/ide/pci/siimage.c~ide_pci_fixes 2004-06-11 15:54:58.686673072 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/siimage.c 2004-06-11 16:05:25.028454648 +0200
@@ -812,7 +812,7 @@ static unsigned int setup_mmio_siimage (
* to 133MHz clocking if the system isn't already set up to do it.
*/

-static unsigned int __init init_chipset_siimage (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const char *name)
{
u32 class_rev = 0;
u8 tmpbyte = 0;
@@ -877,8 +877,8 @@ static unsigned int __init init_chipset_
* The hardware supports buffered taskfiles and also some rather nice
* extended PRD tables. Unfortunately right now we don't.
*/
-
-static void __init init_mmio_iops_siimage (ide_hwif_t *hwif)
+
+static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
void *addr = pci_get_drvdata(dev);
@@ -996,8 +996,8 @@ static int is_dev_seagate_sata(ide_drive
* look in we get for setting up the hwif so that we
* can get the iops right before using them.
*/
-
-static void __init init_iops_siimage (ide_hwif_t *hwif)
+
+static void __devinit init_iops_siimage(ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
u32 class_rev = 0;
@@ -1023,8 +1023,8 @@ static void __init init_iops_siimage (id
* Check for the presence of an ATA66 capable cable on the
* interface.
*/
-
-static unsigned int __init ata66_siimage (ide_hwif_t *hwif)
+
+static unsigned int __devinit ata66_siimage(ide_hwif_t *hwif)
{
unsigned long addr = siimage_selreg(hwif, 0);
if (pci_get_drvdata(hwif->pci_dev) == NULL) {
@@ -1044,8 +1044,8 @@ static unsigned int __init ata66_siimage
* requires several custom handlers so we override the default
* ide DMA handlers appropriately
*/
-
-static void __init init_hwif_siimage (ide_hwif_t *hwif)
+
+static void __devinit init_hwif_siimage(ide_hwif_t *hwif)
{
hwif->autodma = 0;

diff -puN drivers/ide/pci/trm290.c~ide_pci_fixes drivers/ide/pci/trm290.c
--- linux-2.6.7-rc3/drivers/ide/pci/trm290.c~ide_pci_fixes 2004-06-11 15:54:58.691672312 +0200
+++ linux-2.6.7-rc3-bzolnier/drivers/ide/pci/trm290.c 2004-06-11 16:06:21.250907536 +0200
@@ -302,7 +302,7 @@ static int trm290_ide_dma_test_irq (ide_
/*
* Invoked from ide-dma.c at boot time.
*/
-void __init init_hwif_trm290 (ide_hwif_t *hwif)
+void __devinit init_hwif_trm290(ide_hwif_t *hwif)
{
unsigned int cfgbase = 0;
unsigned long flags;

_


2004-06-12 10:34:57

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Fri, Jun 11, 2004 at 05:50:30PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> Probably some drivers are still missed because I changed only
> these drivers that I knew that there are PCI cards using them.
>
> If you know about PCI cards using other drivers please speak up.

IMHO the PCI ->probe methods should always be __devinit. It's rather
hard to make sure they're never every hotplugged in any way, especially
with the dynamic id adding via sysfs thing.

2004-06-13 08:36:26

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

Christoph Hellwig <[email protected]> wrote:
> On Fri, Jun 11, 2004 at 05:50:30PM +0200, Bartlomiej Zolnierkiewicz wrote:
>>
>> Probably some drivers are still missed because I changed only
>> these drivers that I knew that there are PCI cards using them.
>>
>> If you know about PCI cards using other drivers please speak up.
>
> IMHO the PCI ->probe methods should always be __devinit. It's rather
> hard to make sure they're never every hotplugged in any way, especially
> with the dynamic id adding via sysfs thing.

Well the reason I made them all __devinit in my patch is because it
also tries to maintain the same PCI probing order as a builtin kernel
when IDE is built as a module.

To do that all the PCI driver modules are loaded before probing takes
place. Therefore if any probing funciton is declared as __init then
this will not work.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Saturday 12 of June 2004 12:34, Christoph Hellwig wrote:
> On Fri, Jun 11, 2004 at 05:50:30PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > Probably some drivers are still missed because I changed only
> > these drivers that I knew that there are PCI cards using them.
> >
> > If you know about PCI cards using other drivers please speak up.
>
> IMHO the PCI ->probe methods should always be __devinit. It's rather
> hard to make sure they're never every hotplugged in any way, especially
> with the dynamic id adding via sysfs thing.

I generally agree but IMO it makes no sense for i.e. piix.c.

Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Sunday 13 of June 2004 10:35, Herbert Xu wrote:
> Christoph Hellwig <[email protected]> wrote:
> > On Fri, Jun 11, 2004 at 05:50:30PM +0200, Bartlomiej Zolnierkiewicz wrote:
> >> Probably some drivers are still missed because I changed only
> >> these drivers that I knew that there are PCI cards using them.
> >>
> >> If you know about PCI cards using other drivers please speak up.
> >
> > IMHO the PCI ->probe methods should always be __devinit. It's rather
> > hard to make sure they're never every hotplugged in any way, especially
> > with the dynamic id adding via sysfs thing.
>
> Well the reason I made them all __devinit in my patch is because it
> also tries to maintain the same PCI probing order as a builtin kernel
> when IDE is built as a module.
>
> To do that all the PCI driver modules are loaded before probing takes
> place. Therefore if any probing funciton is declared as __init then
> this will not work.

This makes ordering of IDE devices different in Debian-2.6
and vanilla 2.4/2.6, doesn't sound like a good thing to do.

Ideally ordering should be controlled by user-space. :-)

BTW ide-generic.c is a very wrong place to add ide_scan_pcibus() call

Cheers.

> Cheers,

2004-06-13 22:18:58

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Sun, Jun 13, 2004 at 08:01:44PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> This makes ordering of IDE devices different in Debian-2.6
> and vanilla 2.4/2.6, doesn't sound like a good thing to do.

If IDE is built-in, the ordering is exactly the same.

> Ideally ordering should be controlled by user-space. :-)

If IDE is built as a module, then the ordering is still controlled
by user space.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2004-06-14 09:58:38

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Sun, Jun 13, 2004 at 07:36:08PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > IMHO the PCI ->probe methods should always be __devinit. It's rather
> > hard to make sure they're never every hotplugged in any way, especially
> > with the dynamic id adding via sysfs thing.
>
> I generally agree but IMO it makes no sense for i.e. piix.c.

Are you sure? I've seen piix3/4 in very strange place, iirc even in
a docking station which is hotpluggable.

And even if for this special hardware it's usually not doable there
are things like greg's fake hotplug pci driver. So a non-__devinit pci
probe method is a bug, please fix them in PCI.

Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]


[ Greg added to cc: ]

On Monday 14 of June 2004 11:58, Christoph Hellwig wrote:
> On Sun, Jun 13, 2004 at 07:36:08PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > IMHO the PCI ->probe methods should always be __devinit. It's rather
> > > hard to make sure they're never every hotplugged in any way, especially
> > > with the dynamic id adding via sysfs thing.
> >
> > I generally agree but IMO it makes no sense for i.e. piix.c.
>
> Are you sure? I've seen piix3/4 in very strange place, iirc even in
> a docking station which is hotpluggable.

Do you mean that south-bridge chipset itself is hotpluggable?

AFAIK it is only ATA hotplug not PCI one.

> And even if for this special hardware it's usually not doable there
> are things like greg's fake hotplug pci driver. So a non-__devinit pci
> probe method is a bug, please fix them in PCI.

Greg, should I add "fake" PCI hotplug support to some IDE
drivers just to make fake hotplug PCI driver happy?

Cheers.

Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Monday 14 of June 2004 00:18, Herbert Xu wrote:
> On Sun, Jun 13, 2004 at 08:01:44PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > This makes ordering of IDE devices different in Debian-2.6
> > and vanilla 2.4/2.6, doesn't sound like a good thing to do.
>
> If IDE is built-in, the ordering is exactly the same.
>
> > Ideally ordering should be controlled by user-space. :-)
>
> If IDE is built as a module, then the ordering is still controlled
> by user space.

I'm lost now, so what is your change exactly supposed to do?

2004-06-14 14:44:51

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Mon, Jun 14, 2004 at 04:36:01PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > Are you sure? I've seen piix3/4 in very strange place, iirc even in
> > a docking station which is hotpluggable.
>
> Do you mean that south-bridge chipset itself is hotpluggable?
>
> AFAIK it is only ATA hotplug not PCI one.

that thingy had an ide controller that was hotpluggable in the dockingstation.
And IIRC it was a piix4 with everything but ide and superio disabled.

2004-06-14 15:02:15

by Doug Maxey

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On certain platforms, it is desired that even devices soldered to the
MB be hotpluggable, at least in the logical sense.

++doug


On Mon, 14 Jun 2004 16:36:01 +0200, Bartlomiej Zolnierkiewicz wrote:
>
>[ Greg added to cc: ]
>
>On Monday 14 of June 2004 11:58, Christoph Hellwig wrote:
>> On Sun, Jun 13, 2004 at 07:36:08PM +0200, Bartlomiej Zolnierkiewicz wrote:
>> > > IMHO the PCI ->probe methods should always be __devinit. It's rather
>> > > hard to make sure they're never every hotplugged in any way, especially
>> > > with the dynamic id adding via sysfs thing.
>> >
>> > I generally agree but IMO it makes no sense for i.e. piix.c.
>>
>> Are you sure? I've seen piix3/4 in very strange place, iirc even in
>> a docking station which is hotpluggable.
>
>Do you mean that south-bridge chipset itself is hotpluggable?
>
>AFAIK it is only ATA hotplug not PCI one.
>
>> And even if for this special hardware it's usually not doable there
>> are things like greg's fake hotplug pci driver. So a non-__devinit pci
>> probe method is a bug, please fix them in PCI.
>
>Greg, should I add "fake" PCI hotplug support to some IDE
>drivers just to make fake hotplug PCI driver happy?
>
>Cheers.
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ide" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2004-06-14 16:09:17

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Mon, Jun 14, 2004 at 04:36:01PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > And even if for this special hardware it's usually not doable there
> > are things like greg's fake hotplug pci driver. So a non-__devinit pci
> > probe method is a bug, please fix them in PCI.
>
> Greg, should I add "fake" PCI hotplug support to some IDE
> drivers just to make fake hotplug PCI driver happy?

No, not at all. The fake hotplug pci driver is for developers. Do not
go changing your IDE drivers just to prevent oopses from happening when
someone uses the fake hotplug pci driver.

thanks,

greg k-h

2004-06-14 21:30:11

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH] IDE update for 2.6.7-rc3 [1/12]

On Mon, Jun 14, 2004 at 04:37:27PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> I'm lost now, so what is your change exactly supposed to do?

The change is only effective when IDE is built as a module. It allows
you the option to have the same probing order as if IDE was built-in.

Without the patch it always probes the device as soon as each PCI driver
is loaded. And you can still do that as long as ide-generic is loaded
before the PCI drivers.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt