Commit 561e7222 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

Revert "brcmfmac: Use atomic functions for intstatus update."

This reverts commit c98db0be.

The function atomic_set_mask() is not architecture independent
so it can not be used in the driver as is.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7ce24ab7
...@@ -2444,7 +2444,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) ...@@ -2444,7 +2444,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus)
struct brcmf_core *buscore; struct brcmf_core *buscore;
u32 addr; u32 addr;
unsigned long val; unsigned long val;
int ret; int n, ret;
buscore = brcmf_chip_get_core(bus->ci, BCMA_CORE_SDIO_DEV); buscore = brcmf_chip_get_core(bus->ci, BCMA_CORE_SDIO_DEV);
addr = buscore->base + offsetof(struct sdpcmd_regs, intstatus); addr = buscore->base + offsetof(struct sdpcmd_regs, intstatus);
...@@ -2452,7 +2452,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) ...@@ -2452,7 +2452,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus)
val = brcmf_sdiod_regrl(bus->sdiodev, addr, &ret); val = brcmf_sdiod_regrl(bus->sdiodev, addr, &ret);
bus->sdcnt.f1regdata++; bus->sdcnt.f1regdata++;
if (ret != 0) if (ret != 0)
return ret; val = 0;
val &= bus->hostintmask; val &= bus->hostintmask;
atomic_set(&bus->fcstate, !!(val & I_HMB_FC_STATE)); atomic_set(&bus->fcstate, !!(val & I_HMB_FC_STATE));
...@@ -2461,7 +2461,13 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) ...@@ -2461,7 +2461,13 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus)
if (val) { if (val) {
brcmf_sdiod_regwl(bus->sdiodev, addr, val, &ret); brcmf_sdiod_regwl(bus->sdiodev, addr, val, &ret);
bus->sdcnt.f1regdata++; bus->sdcnt.f1regdata++;
atomic_set_mask(val, &bus->intstatus); }
if (ret) {
atomic_set(&bus->intstatus, 0);
} else if (val) {
for_each_set_bit(n, &val, 32)
set_bit(n, (unsigned long *)&bus->intstatus.counter);
} }
return ret; return ret;
...@@ -2473,7 +2479,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus) ...@@ -2473,7 +2479,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
unsigned long intstatus; unsigned long intstatus;
uint txlimit = bus->txbound; /* Tx frames to send before resched */ uint txlimit = bus->txbound; /* Tx frames to send before resched */
uint framecnt; /* Temporary counter of tx/rx frames */ uint framecnt; /* Temporary counter of tx/rx frames */
int err = 0; int err = 0, n;
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
...@@ -2577,8 +2583,10 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus) ...@@ -2577,8 +2583,10 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
} }
/* Keep still-pending events for next scheduling */ /* Keep still-pending events for next scheduling */
if (intstatus) if (intstatus) {
atomic_set_mask(intstatus, &bus->intstatus); for_each_set_bit(n, &intstatus, 32)
set_bit(n, (unsigned long *)&bus->intstatus.counter);
}
brcmf_sdio_clrintr(bus); brcmf_sdio_clrintr(bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment