]> git.baikalelectronics.ru Git - kernel.git/commit
libertas: fix card cleanup order in SDIO driver
authorAndrey Yurovsky <andrey@cozybit.com>
Thu, 18 Jun 2009 02:15:19 +0000 (19:15 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 19:01:55 +0000 (15:01 -0400)
commitbadccc16648de0d5d00b55ee2e70cf3bef2c615e
tree4eff627a84169994dd003723230ee9483507f02e
parent0b56997f1647ea7130d2338cc948138e47b06fcb
libertas: fix card cleanup order in SDIO driver

The SDIO driver sets the surpriseremoved flag before calling
lbs_remove_card.  With IEEE PS enabled, lbs_remove_card must issue a
command to exit IEEE PS mode, however with that flag set the command
path is blocked and the card is never taken out of IEEE PS mode.  This
step is required to ensure that the driver can be reloaded.  This patch
moves the setting of surpriseremoved after lbs_remove_card is called.

Tested with V9 firmware by ensuring that IEEE PS is disabled when the
driver is removed.  Reloading the driver is not fully tested due to a
separate issue with module reload in the SDIO driver, however this
patch at least leaves the card in a better state when we bring the
driver down.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/if_sdio.c