aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2009-10-16 01:18:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:26 -0400
commitf96cca8483c1b0bcc8002dc466159bf8fd53ca47 (patch)
tree1778a0cfb4e970f08239798a9b9b46de03aaf1a0 /drivers/net/wireless
parent88e6195a911bce85adcc14e8377aa619e8054ab2 (diff)
iwmc3200wifi: SDIO disable race fix
When calling sdio->bus_disable(), we are flushing the command lists before disabling the sdio function. We can thus potentially get a command response after having flushed the command list. To avoid that race, we have to call iwm_reset() after disabling the sdio function. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/sdio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/sdio.c b/drivers/net/wireless/iwmc3200wifi/sdio.c
index 38026b70a2f9..cf86294f719b 100644
--- a/drivers/net/wireless/iwmc3200wifi/sdio.c
+++ b/drivers/net/wireless/iwmc3200wifi/sdio.c
@@ -224,8 +224,6 @@ static int if_sdio_disable(struct iwm_priv *iwm)
224 struct iwm_sdio_priv *hw = iwm_to_if_sdio(iwm); 224 struct iwm_sdio_priv *hw = iwm_to_if_sdio(iwm);
225 int ret; 225 int ret;
226 226
227 iwm_reset(iwm);
228
229 sdio_claim_host(hw->func); 227 sdio_claim_host(hw->func);
230 sdio_writeb(hw->func, 0, IWM_SDIO_INTR_ENABLE_ADDR, &ret); 228 sdio_writeb(hw->func, 0, IWM_SDIO_INTR_ENABLE_ADDR, &ret);
231 if (ret < 0) 229 if (ret < 0)
@@ -237,6 +235,8 @@ static int if_sdio_disable(struct iwm_priv *iwm)
237 235
238 iwm_sdio_rx_free(hw); 236 iwm_sdio_rx_free(hw);
239 237
238 iwm_reset(iwm);
239
240 IWM_DBG_SDIO(iwm, INFO, "IWM SDIO disable\n"); 240 IWM_DBG_SDIO(iwm, INFO, "IWM SDIO disable\n");
241 241
242 return 0; 242 return 0;