Re: Problems with ide-cs.c
From: Richard Purdie <hidden>
Date: 2004-12-15 14:51:24
I wrote:
If the usage count for the device is non-zero ide_unregister will fail which is likely if you just pull the card out. This silent failure leads to all kinds of problems which break the device until it's rebooted - quite a serious bug. There is a fixme in ide-cs.c relating to this.
I've been looking into this. I think the simplest approach is to make sure ide_unregister() succeeds regardless of any busy/usage status. In order to make it succeed, I found I needed to add some checks on various functions to see if drives were dead or interface's present. I've made a working patch available at http://www.rpsys.net/openzaurus/ide.patch . If someone who knows more about the ide system could have a look at this, I'd appreciate it. If a patch along these lines could be included, it would unbreak ide_unregister() and hence the ide_cs module. Thanks, Richard