Bugzilla – Bug 132507
permanent compact flash change detection in kernel 2.6.14-3
Last modified: 2006-03-13 15:28:57 UTC
From SUSE kernel 2.6.14-3 on (works well in 2.6.13 and older SUSE kernels), complact flash hard disks connected with and CF-IDE adapter are permanently redetected. I have found that the following lines have been removed in the ide-disk.c::idedisk_media_changed() in kernel 2.6.14-3: /* We get reliably notified from PCMCIA layer */ if (drive->is_flash) return 0; If i add these lines again (copied from kernel 2.6.13), all is OK. Was there a reason to removes these lines?
Jens, Greg - any idea what to do with this?
What do you mean "permanently redetected"? There was a nasty loop from udev opening the device to detect the kind of media, which caused a new hotplug event from the driver, which looped again. Is that what you are seeing here too?
Yes. ide-cs drives will recreate partitions on _every_ call to open(). You can imagine for yourself what this means. There was a discussion about this on lkml recently (cf '[patch] Re: 2.6.14-rc5-mm1 - ide-cs broken!'). It boils down to that PCMCIA CF cards are _not_ removeable from the kernel point of view, as (in roughly 80% of all cases) removing of the media implies a removal of the PCMCIA adapter, which will result in a complete teardown of all associated structures, including the IDE stack. Allegedly there are some built-in CF card readers which are a) not USB and b) not removeable, but so far I haven't seen any of them. For those case we would need blacklisting, sure. Nevertheless, I've already re-added the patch in question (no-partition-check-for-pcmcia); feel free to replace it with the upstream version if and when it gets included. So far all those attempts got vetoed by Alan Cox :-(
What do you mean "permanently redetected": Of course udev also runs crazy when the CF is detected permanently, but i tested with killing udev also. In this case i can still see the redectection of the device in the syslog, so redetection of the CF is NOT created by an udev loop ...
As it's not udev triggering the loop in the first place but hal instead killing udev wouldn't help here.
HAL can handle the additional events at open just fine, it does not cause a loop. I've comitted a udev yesterday, that should skip all persistent rules for removable IDE devices.
So I'll close this; should be fixed by other means (ie udev).