Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328218
b: refs/heads/master
c: 1d38227
h: refs/heads/master
v: v3
  • Loading branch information
Franky Lin authored and John W. Linville committed Sep 24, 2012
1 parent 4473aba commit 9a5a4f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 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: 86761fcbea8a779b0aa2af120173cd4ef7edd72f
refs/heads/master: 1d38227371d8db7d58b4f870192dd944f73f4352
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ struct brcmf_sdio {

bool intr; /* Use interrupts */
bool poll; /* Use polling */
bool ipend; /* Device interrupt is pending */
atomic_t ipend; /* Device interrupt is pending */
uint spurious; /* Count of spurious interrupts */
uint pollrate; /* Ticks between device polls */
uint polltick; /* Tick counter */
Expand Down Expand Up @@ -2151,7 +2151,7 @@ static uint brcmf_sdbrcm_sendfromq(struct brcmf_sdio *bus, uint maxframes)
if (ret != 0)
break;
if (intstatus & bus->hostintmask)
bus->ipend = true;
atomic_set(&bus->ipend, 1);
}
}

Expand Down Expand Up @@ -2249,7 +2249,7 @@ static inline void brcmf_sdbrcm_clrintr(struct brcmf_sdio *bus)
unsigned long flags;

spin_lock_irqsave(&bus->sdiodev->irq_en_lock, flags);
if (!bus->sdiodev->irq_en && !bus->ipend) {
if (!bus->sdiodev->irq_en && !atomic_read(&bus->ipend)) {
enable_irq(bus->sdiodev->irq);
bus->sdiodev->irq_en = true;
}
Expand Down Expand Up @@ -2332,8 +2332,8 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_sdio *bus)
goto clkwait;

/* Pending interrupt indicates new device status */
if (bus->ipend) {
bus->ipend = false;
if (atomic_read(&bus->ipend) > 0) {
atomic_set(&bus->ipend, 0);
err = r_sdreg32(bus, &newstatus,
offsetof(struct sdpcmd_regs, intstatus));
bus->sdcnt.f1regdata++;
Expand Down Expand Up @@ -2478,7 +2478,7 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_sdio *bus)
} else if (bus->clkstate == CLK_PENDING) {
brcmf_dbg(INFO, "rescheduled due to CLK_PENDING awaiting I_CHIPACTIVE interrupt\n");
resched = true;
} else if (bus->intstatus || bus->ipend ||
} else if (bus->intstatus || atomic_read(&bus->ipend) > 0 ||
(!bus->fcstate && brcmu_pktq_mlen(&bus->txq, ~bus->flowcontrol)
&& data_ok(bus)) || PKT_AVAILABLE()) {
resched = true;
Expand Down Expand Up @@ -3692,7 +3692,7 @@ void brcmf_sdbrcm_isr(void *arg)
}
/* Count the interrupt call */
bus->sdcnt.intrcount++;
bus->ipend = true;
atomic_set(&bus->ipend, 1);

/* Disable additional interrupts (is this needed now)? */
if (!bus->intr)
Expand Down Expand Up @@ -3740,7 +3740,7 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)
schedule the DPC */
if (intstatus) {
bus->sdcnt.pollcnt++;
bus->ipend = true;
atomic_set(&bus->ipend, 1);

bus->dpc_sched = true;
if (bus->dpc_tsk) {
Expand Down Expand Up @@ -3784,7 +3784,7 @@ static bool brcmf_sdbrcm_bus_watchdog(struct brcmf_sdio *bus)

up(&bus->sdsem);

return bus->ipend;
return (atomic_read(&bus->ipend) > 0);
}

static bool brcmf_sdbrcm_chipmatch(u16 chipid)
Expand Down

0 comments on commit 9a5a4f8

Please sign in to comment.