Hi all, I've caught deadlock inside IDE layer using IDE-CS: after accessing to IDE disk placed in PCMCIA (CF card really), it will never probe again after pulling it from PCMCIA/CF. The kernel is stuck at drivers/ide/ide.c:ide_unregister():604: 602 spin_unlock_irq(&ide_lock); 603 device_unregister(&drive->gendev); 604 wait_for_completion(&drive->gendev_rel_comp); 605 spin_lock_irq(&ide_lock); ide_unregister() assumes that device_unregister() will call ide-probe.c:drive_release_dev(): 1282 static void drive_release_dev (struct device *dev) 1283 { .... [...] 1302 complete(&drive->gendev_rel_comp); 1303 } 1311 static void init_gendisk (ide_hwif_t *hwif) 1312 { .... 1323 drive->gendev.release = drive_release_dev; .... 1333 } But release() function will not called because drive->gendev is still referenced inside genhd layer. I'm attaching two patches: the fix and the workaround. I assume that first is a candidate to -mm, and workaround is a temporary solution. There are two set of patches: for the Linus's git tree and for the handhelds.org's 2.6.17-hh1 (prefixed with hh-). Note: this is cross-posting, thus please keep To: and CC: headers, to keep us all in sync. Thanks, -- Anton (irc: bd2)