PCMCIA-related breakage on suspend to disk

Russell King rmk+pcmcia at arm.linux.org.uk
Thu Nov 24 03:56:10 EST 2005


On Thu, Nov 24, 2005 at 05:29:08AM +0000, Matthew Garrett wrote:
> In the Ubuntu suspend to disk script, we eject all PCMCIA cards before 
> suspend in order to minimise problems caused by drivers that aren't 
> terribly happy with being suspended. This seems to cause the following 
> issue:
> 
> 1) Userspace ejects the card
> 2) Userspace triggers suspend to disk
> 3) Userspace is frozen
> 4) The kernel suspends all hardware
> 5) An atomic copy of memory is made
> 6) The kernel resumes the hardware in order to write the image to disk
> 7) socket_resume is called
> 8) socket_resume calls socket_insert
> 9) The machine hangs
> 
> It's fairly clear /why/ socket_insert is called - it's possible that a 
> card has been inserted between suspend and resume (we call cardctl 
> insert from userspace in order to deal with this case). However, it 
> seems to cause problems in this specific case, and I don't understand 
> why. The following patch avoids the issue, but plainly isn't the correct 
> solution.

What happens if you don't eject the cards prior to suspend?

Note that there are platforms which depend on the behaviour you
are disabling for sane operation, where the normal "off" mode is
a suspend to RAM.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core



More information about the linux-pcmcia mailing list