diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-04-28 17:31:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-30 09:25:12 -0700 |
commit | 8a3461e2cdb719ae4796feb70054f1597005af28 (patch) | |
tree | 6c8e2e8c0eb2f1808a435c2beb5768e141d1cad0 /drivers/usb/host | |
parent | 869aa98c1d6a03dd2078f8f8257a0bcc343cb8b9 (diff) | |
download | blackbird-op-linux-8a3461e2cdb719ae4796feb70054f1597005af28.tar.gz blackbird-op-linux-8a3461e2cdb719ae4796feb70054f1597005af28.zip |
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: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index e11cc3aa4b82..3b867a8af7b2 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c @@ -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; |