Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350257
b: refs/heads/master
c: 7f5855c
h: refs/heads/master
i:
  350255: afdd673
v: v3
  • Loading branch information
Tejun Heo committed Dec 28, 2012
1 parent 024154f commit 2e4aa67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cab3f9fcc7ecaf70c77a10032b4757f769e345b
refs/heads/master: 7f5855c979ef0d49a8680b7fbdd3fc8e3093cb73
9 changes: 4 additions & 5 deletions trunk/drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,8 @@ mwifiex_update_mp_end_port(struct mwifiex_adapter *adapter, u16 port)
static struct mmc_host *reset_host;
static void sdio_card_reset_worker(struct work_struct *work)
{
struct mmc_host *target = reset_host;

/* The actual reset operation must be run outside of driver thread.
* This is because mmc_remove_host() will cause the device to be
* instantly destroyed, and the driver then needs to end its thread,
Expand All @@ -1761,10 +1763,10 @@ static void sdio_card_reset_worker(struct work_struct *work)
*/

pr_err("Resetting card...\n");
mmc_remove_host(reset_host);
mmc_remove_host(target);
/* 20ms delay is based on experiment with sdhci controller */
mdelay(20);
mmc_add_host(reset_host);
mmc_add_host(target);
}
static DECLARE_WORK(card_reset_work, sdio_card_reset_worker);

Expand All @@ -1773,9 +1775,6 @@ static void mwifiex_sdio_card_reset(struct mwifiex_adapter *adapter)
{
struct sdio_mmc_card *card = adapter->card;

if (work_pending(&card_reset_work))
return;

reset_host = card->func->card->host;
schedule_work(&card_reset_work);
}
Expand Down

0 comments on commit 2e4aa67

Please sign in to comment.