]> git.baikalelectronics.ru Git - kernel.git/commit
libertas: don't reset card on error when it is being removed
authorDaniel Drake <dsd@laptop.org>
Mon, 30 Jul 2012 21:58:04 +0000 (22:58 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 2 Aug 2012 17:51:47 +0000 (13:51 -0400)
commit8ae9e37606a3b4c8178a74fadd1d4e760295593d
tree85cb9efd85b251ec398316f734ea82cde45ad03d
parentb1630ccaced6843119f051e1b9818bdcc1266dd6
libertas: don't reset card on error when it is being removed

On an OLPC XO-1.5 we have seen the following situation:
 - the system starts going into suspend
 - no wake params are set, so the mmc layer removes the card
 - during remove, we send a command to the card
 - that command fails, causing if_sdio's reset method to try and remove
   the mmc card in attempt to reset it
 - the mmc layer is not happy about being asked to remove a card that
   it is already removing, and the kernel crashes

While the MMC layer could possibly be taught to behave better here,
it also seems sensible for libertas not to try and reset a card if
we're in the process of removing it anyway.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/main.c