Commit 8a3461e2 authored by Michael Hennerich's avatar Michael Hennerich Committed by Greg Kroah-Hartman

USB: sl811-hcd: Fix device disconnect

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: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 869aa98c
......@@ -720,10 +720,10 @@ retry:
/* 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment