[RFC] PCMCIA patches for 2.6.34
w.sang at pengutronix.de
Mon Jan 11 17:01:49 EST 2010
thanks for your assistance!
> Not known to me -- does it also happen with pata_pcmcia.c?
Nope, it doesn't. Never noticed this driver :)
> (1) diff between /proc/ioports before and after inserting the card. Extra
> bonus i you can grab a /proc/ioports before the ide-cs driver is loaded
> (e.g. by moving it away from /lib/modules/... and then insmod'ing it
The ports definately have been assigned before (the card is working), I always
had the impression there was a double-free going on.
Knowing now that this is a flaw, I digged up something, check the following
call chain in ide_detach from ide-cs.c:
ide_release -> pcmcia_disable_device -> pcmcia_release_io
Then(!) release_region is called twice, but the io-resources are gone by now.
From what I see, I'd suggest the following patch which makes the warnings go
away for me. To me, it looks correct. I just wonder as this seems to have gone
unnoticed for quite a while. If you think this rfc is correct, I will create a
proper patch out of it and remove the shadowing introduced by
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index dd63963..ef7b61e 100644
@@ -129,11 +129,11 @@ static void ide_detach(struct pcmcia_device *link)
data_addr = hwif->io_ports.data_addr;
ctl_addr = hwif->io_ports.ctl_addr;
} /* ide_detach */
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the linux-pcmcia