Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60798c68 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by David S. Miller
Browse files

isdn/gigaset: try USB reset for bas_gigaset error recovery



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: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d5a9edc
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ 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
 */
@@ -358,7 +358,9 @@ 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