Skip to content

Commit

Permalink
isdn/gigaset: try USB reset for bas_gigaset error recovery
Browse files Browse the repository at this point in the history
In error_reset(), if sending HD_RESET_INTERRUPT_PIPE to the device
fails, try performing an USB reset.
Also correct an error in the leading comment.

Signed-off-by: Tilman Schmidt <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tilmanschmidt authored and davem330 committed Oct 1, 2010
1 parent 1d5a9ed commit 60798c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/isdn/gigaset/bas-gigaset.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,17 @@ static inline void error_hangup(struct bc_state *bcs)
* reset Gigaset device because of an unrecoverable error
* This function may be called from any context, and takes care of
* scheduling the necessary actions for execution outside of interrupt context.
* cs->lock must not be held.
* cs->hw.bas->lock must not be held.
* argument:
* controller state structure
*/
static inline void error_reset(struct cardstate *cs)
{
/* reset interrupt pipe to recover (ignore errors) */
update_basstate(cs->hw.bas, BS_RESETTING, 0);
req_submit(cs->bcs, HD_RESET_INTERRUPT_PIPE, 0, BAS_TIMEOUT);
if (req_submit(cs->bcs, HD_RESET_INTERRUPT_PIPE, 0, BAS_TIMEOUT))
/* submission failed, escalate to USB port reset */
usb_queue_reset_device(cs->hw.bas->interface);
}

/* check_pending
Expand Down

0 comments on commit 60798c6

Please sign in to comment.