Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171187
b: refs/heads/master
c: 5b45bfe
h: refs/heads/master
i:
  171185: ffe9e79
  171183: 34ea432
v: v3
  • Loading branch information
Cindy H Kao authored and Inaky Perez-Gonzalez committed Oct 19, 2009
1 parent bad5bae commit 1eefb12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 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: 663ebb4aa2fd0d19e3d1da0fed3fa3fa134a4ef0
refs/heads/master: 5b45bfe5010ae1ddaac463d1bcdb141a4ff4ff66
8 changes: 4 additions & 4 deletions trunk/drivers/net/wimax/i2400m/sdio-fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ ssize_t i2400ms_bus_bm_wait_for_ack(struct i2400m *i2400m,
d_fnstart(5, dev, "(i2400m %p ack %p size %zu)\n",
i2400m, ack, ack_size);

spin_lock(&i2400m->rx_lock);
i2400ms->bm_ack_size = -EINPROGRESS;
spin_unlock(&i2400m->rx_lock);

result = wait_event_timeout(i2400ms->bm_wfa_wq,
i2400ms->bm_ack_size != -EINPROGRESS,
2 * HZ);
Expand All @@ -199,6 +195,10 @@ ssize_t i2400ms_bus_bm_wait_for_ack(struct i2400m *i2400m,
size = min(ack_size, i2400ms->bm_ack_size);
memcpy(ack, i2400m->bm_ack_buf, size);
}
/*
* Remember always to clear the bm_ack_size to -EINPROGRESS
* after the RX data is processed
*/
i2400ms->bm_ack_size = -EINPROGRESS;
spin_unlock(&i2400m->rx_lock);

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/wimax/i2400m/sdio-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ int i2400ms_rx_setup(struct i2400ms *i2400ms)
init_waitqueue_head(&i2400ms->bm_wfa_wq);
spin_lock(&i2400m->rx_lock);
i2400ms->bm_wait_result = -EINPROGRESS;
/*
* Before we are about to enable the RX interrupt, make sure
* bm_ack_size is cleared to -EINPROGRESS which indicates
* no RX interrupt happened yet or the previous interrupt
* has been handled, we are ready to take the new interrupt
*/
i2400ms->bm_ack_size = -EINPROGRESS;
spin_unlock(&i2400m->rx_lock);

sdio_claim_host(func);
Expand Down

0 comments on commit 1eefb12

Please sign in to comment.