aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorAndrey Yurovsky <andrey@cozybit.com>2009-06-17 22:15:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:01:55 -0400
commit23b149c1890f9a55f065c6b7842e9383d22e0c04 (patch)
tree4eff627a84169994dd003723230ee9483507f02e /drivers/net/wireless/libertas
parentefcfd1f28f6a5c377a0e630ca2c96c54eb3f1e8f (diff)
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>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/if_sdio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c
index 89396a788627..485a8d406525 100644
--- a/drivers/net/wireless/libertas/if_sdio.c
+++ b/drivers/net/wireless/libertas/if_sdio.c
@@ -1093,11 +1093,11 @@ static void if_sdio_remove(struct sdio_func *func)
1093 lbs_pr_alert("CMD_FUNC_SHUTDOWN cmd failed\n"); 1093 lbs_pr_alert("CMD_FUNC_SHUTDOWN cmd failed\n");
1094 } 1094 }
1095 1095
1096 card->priv->surpriseremoved = 1;
1097 1096
1098 lbs_deb_sdio("call remove card\n"); 1097 lbs_deb_sdio("call remove card\n");
1099 lbs_stop_card(card->priv); 1098 lbs_stop_card(card->priv);
1100 lbs_remove_card(card->priv); 1099 lbs_remove_card(card->priv);
1100 card->priv->surpriseremoved = 1;
1101 1101
1102 flush_workqueue(card->workqueue); 1102 flush_workqueue(card->workqueue);
1103 destroy_workqueue(card->workqueue); 1103 destroy_workqueue(card->workqueue);