Skip to content

Commit

Permalink
USB: sl811-hcd: Fix device disconnect
Browse files Browse the repository at this point in the history
A while ago I provided a patch that fixed device detection after device
removal (USB: sl811-hcd: Fix device disconnect).
Chris Brissette pointed out that the detection/removal counter method
to distinguish insert or remove my fail under certain conditions.
Latest SL811HS datasheet (Document 38-08008 Rev. *D) indicates that
bit 6 (SL11H_INTMASK_RD) of the Interrupt Status Register together with
bit 5 (SL11H_INTMASK_INSRMV) can be used to determine whether a device
has been inserted or removed.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Apr 30, 2010
1 parent 869aa98 commit 8a3461e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/host/sl811-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,10 @@ static irqreturn_t sl811h_irq(struct usb_hcd *hcd)
/* port status seems weird until after reset, so
* force the reset and make khubd clean up later.
*/
if (sl811->stat_insrmv & 1)
sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION;
else
if (irqstat & SL11H_INTMASK_RD)
sl811->port1 &= ~(1 << USB_PORT_FEAT_CONNECTION);
else
sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION;

sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION;

Expand Down

0 comments on commit 8a3461e

Please sign in to comment.