Re: compact flash IDE hot-swap summary please

From: Russell King (rmk@arm.linux.org.uk)
Date: Wed Jul 23 2003 - 16:15:25 EST


On Wed, Jul 23, 2003 at 09:13:51PM +0100, Alan Cox wrote:
> Everyone I know is using the PCMCIA interface stuff for that. Now that
> can support the unplugging but the ide-cs code is still not doing the
> right things in this case (and the core could be a little more careful).
> The ide_unregister can fail - you are supposed to call it again later if
> it does - ide_cs doesnt

Ok, I see a couple of problems here.

Firstly, how does ide_cs in 2.6.0-test1 know that ide_unregister has
failed? In my copy of 2.6.0-test1, it doesn't return any values.

Secondly, 2.4.21 seems to fail with value '1' for two cases:
 - the ide interface wasn't found to be present
 - the drive is in use
 - the shutdown fails

In the first case, we just want to forget all about the interface - we
don't want to retry at some time in the future. In the second case,
well, the device has physically gone, so any outstanding requests are
not going to complete. Hopefully an in-progress request should time
out, but we shouldn't try to start a new request.

Thirdly, we don't change the iops on unregister. Some hardware returns
random garbage to reads from the PCMCIA space when there isn't a card
present.

So, in short, I think that IDE unplug is broken in the core IDE driver
and needs significant work in _both_ 2.4 and 2.6 before we can think
about getting PCMCIA-based IDE cards to work sufficiently well. Yes,
ide-cs.c may need some work, but ide.c also requires work.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:50 EST