Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253397
b: refs/heads/master
c: d2ac49f
h: refs/heads/master
i:
  253395: 0455ccd
v: v3
  • Loading branch information
Daniel Drake authored and John W. Linville committed Jun 3, 2011
1 parent 764f00c commit dbd8eaa
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 59e7e7078d6c2c6294caf454c6e3695f9d3e46a2
refs/heads/master: d2ac49fe3c7c4730323c1042fb53a2e008643b6a
21 changes: 16 additions & 5 deletions trunk/drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ static void if_sdio_interrupt(struct sdio_func *func)
card = sdio_get_drvdata(func);

cause = sdio_readb(card->func, IF_SDIO_H_INT_STATUS, &ret);
if (ret)
if (ret || !cause)
goto out;

lbs_deb_sdio("interrupt: 0x%X\n", (unsigned)cause);
Expand Down Expand Up @@ -1008,10 +1008,6 @@ static int if_sdio_probe(struct sdio_func *func,
if (ret)
goto release;

ret = sdio_claim_irq(func, if_sdio_interrupt);
if (ret)
goto disable;

/* For 1-bit transfers to the 8686 model, we need to enable the
* interrupt flag in the CCCR register. Set the MMC_QUIRK_LENIENT_FN0
* bit to allow access to non-vendor registers. */
Expand Down Expand Up @@ -1082,6 +1078,21 @@ static int if_sdio_probe(struct sdio_func *func,
else
card->rx_unit = 0;

/*
* Set up the interrupt handler late.
*
* If we set it up earlier, the (buggy) hardware generates a spurious
* interrupt, even before the interrupt has been enabled, with
* CCCR_INTx = 0.
*
* We register the interrupt handler late so that we can handle any
* spurious interrupts, and also to avoid generation of that known
* spurious interrupt in the first place.
*/
ret = sdio_claim_irq(func, if_sdio_interrupt);
if (ret)
goto disable;

/*
* Enable interrupts now that everything is set up
*/
Expand Down

0 comments on commit dbd8eaa

Please sign in to comment.