Skip to content

Commit

Permalink
iwmc3200wifi: SDIO disable race fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Oct 27, 2009
1 parent 88e6195 commit f96cca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/iwmc3200wifi/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ static int if_sdio_disable(struct iwm_priv *iwm)
struct iwm_sdio_priv *hw = iwm_to_if_sdio(iwm);
int ret;

iwm_reset(iwm);

sdio_claim_host(hw->func);
sdio_writeb(hw->func, 0, IWM_SDIO_INTR_ENABLE_ADDR, &ret);
if (ret < 0)
Expand All @@ -237,6 +235,8 @@ static int if_sdio_disable(struct iwm_priv *iwm)

iwm_sdio_rx_free(hw);

iwm_reset(iwm);

IWM_DBG_SDIO(iwm, INFO, "IWM SDIO disable\n");

return 0;
Expand Down

0 comments on commit f96cca8

Please sign in to comment.