Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214837
b: refs/heads/master
c: 4cb5e42
h: refs/heads/master
i:
  214835: ae5cd6d
v: v3
  • Loading branch information
Tilman Schmidt authored and David S. Miller committed Oct 1, 2010
1 parent 5f4b9ec commit a76b10e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60798c68bebf6009df9da634e79ebdd8c8227238
refs/heads/master: 4cb5e42f6132bf2d2851f8dd67bd8499979c7ebc
22 changes: 22 additions & 0 deletions trunk/drivers/isdn/gigaset/bas-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,28 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb)
* The next command will reopen the AT channel automatically.
*/
if (cb->len == 3 && !memcmp(cb->buf, "+++", 3)) {
/* If an HD_RECEIVEATDATA_ACK message remains unhandled
* because of an error, the base never sends another one.
* The response channel is thus effectively blocked.
* Closing and reopening the AT channel does *not* clear
* this condition.
* As a stopgap measure, submit a zero-length AT read
* before closing the AT channel. This has the undocumented
* effect of triggering a new HD_RECEIVEATDATA_ACK message
* from the base if necessary.
* The subsequent AT channel close then discards any pending
* messages.
*/
spin_lock_irqsave(&cs->lock, flags);
if (!(cs->hw.bas->basstate & BS_ATRDPEND)) {
kfree(cs->hw.bas->rcvbuf);
cs->hw.bas->rcvbuf = NULL;
cs->hw.bas->rcvbuf_size = 0;
cs->hw.bas->retry_cmd_in = 0;
atread_submit(cs, 0);
}
spin_unlock_irqrestore(&cs->lock, flags);

rc = req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
if (cb->wake_tasklet)
tasklet_schedule(cb->wake_tasklet);
Expand Down

0 comments on commit a76b10e

Please sign in to comment.