Re: [PATCH] genhd fix or ide workaround -- choose one

Anton Vorontsov
2006-10-19T14:15:07Z

On Thu, Oct 19, 2006 at 05:33:07PM +0400, Anton Vorontsov wrote:
> On Thu, Oct 19, 2006 at 02:08:32PM +0100, Alan Cox wrote:
> > Ar Iau, 2006-10-19 am 16:25 +0400, ysgrifennodd Anton Vorontsov:
> > > It just happens every time on HP iPaq hx4700. hx4700 have internal CF
> > > slot, which is working via pxa2xx pcmcia driver.
> >
> > I can't duplicate this with the ide_cs driver and a laptop.
> >
> > > Have you read comments inside -fix patch? Imho it's obvious that nobody
> > > putting driverfs_device second time, but got it twice.
> >
> > Its also obvious that it currently works on millions of PC systems and
> > that also needs explaining before any change is made.
>
> You're right, it needs explanation. Unfortunately I don't have any other
> PCMCIAable devices to find it out. :-/ Though, I'll try to find answers
> in the code.

Okay. Wild guess: you're using 32 bit CardBus (yenta socket?), but hx4700
is using 16 bit PCMCIA (drivers/pcmcia/ds.c). And indeed ds.c calling
device_unregister() which triggers that sequece:
ide_cs.c:ide_detach()
ide_cs.c:ide_release()
ide.c:ide_unregister() <- hang here

I've grep'ed drivers/pcmcia/ for the device_unregister and seems nobody
calling it except drivers/pcmcia/ds.c.

-- Anton (irc: bd2)

p.s. drivers/pcmcia/cardbus.c states:
* cardbus.c -- 16-bit PCMCIA core support

typo?