PCMCIA / IDE Deadlock

Todd Blumer sdgvulpes at gmail.com
Wed Jul 19 16:31:27 EDT 2006


Hi.  I've searched the archives and haven't seen anything about this, so
here's the trouble.

This is in kernel 2.6.15, and we're having trouble on pxa255- and
pxa270-based handheld devices with a deadlock on resume involving both
the PCMCIA subsystem and the IDE drivers.

Here are the details about the deadlock:  Suspend the device with a CF
memory card inserted and mounted.  Remove the CF card while suspended.
Resume.  The deadlock occurs because pcmcia/cs.c detects that the card
is no longer present, and sends a CS_EVENT_CARD_REMOVAL event to
ide/legacy/ide-cs.c.  This driver, in turn, calls ide_unregister() in
ide/ide.c, and it deadlocks on the gendev_rel_comp semaphore.  (There is
a patch floating around that changes these semaphores to completions,
but the deadlock still occurs.)  I'm assuming it deadlocks because it's
waiting on the semaphore, but not everything has been resumed, and
processes have not been thawed.

I see that for 2.6.16, the pcmcia stuff has been significantly altered,
but we are required to use 2.6.15, so upgrading is not an option right
now.



More information about the linux-pcmcia mailing list