diff options
author | Hennerich, Michael <Michael.Hennerich@analog.com> | 2009-09-02 04:26:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 09:46:16 -0400 |
commit | eb661bc88252e5c6dc69df732e77e42981dd4d8b (patch) | |
tree | fa822f60e840530359bd73addb77ead12ab20012 /drivers/usb/host/sl811-hcd.c | |
parent | ec3815c3e14dc68d49428e6505ae99e86e5dd067 (diff) |
USB: sl811-hcd: Fix device disconnect:
SL811 Device detected after removal used to be working in linux-2.6.22
but then broke somewhere between 2.6.22 and 2.6.28. Current
hub_port_connect_change() in drivers/usb/core/hub.c won't call
usb_disconnect() in case the SL811 driver sets portstatus
USB_PORT_FEAT_CONNECTION upon removal.
AFAIK the SL811 has only a combined Device Insert/Remove
detection bit, therefore use a count to distinguish insert or remove.
Signed-Off-By: Michael Hennerich <hennerich@blackfin.uclinux.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index a949259f18b9..5b22a4d1c9e4 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -719,8 +719,12 @@ retry: | |||
719 | /* port status seems weird until after reset, so | 719 | /* port status seems weird until after reset, so |
720 | * force the reset and make khubd clean up later. | 720 | * force the reset and make khubd clean up later. |
721 | */ | 721 | */ |
722 | sl811->port1 |= (1 << USB_PORT_FEAT_C_CONNECTION) | 722 | if (sl811->stat_insrmv & 1) |
723 | | (1 << USB_PORT_FEAT_CONNECTION); | 723 | sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION; |
724 | else | ||
725 | sl811->port1 &= ~(1 << USB_PORT_FEAT_CONNECTION); | ||
726 | |||
727 | sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION; | ||
724 | 728 | ||
725 | } else if (irqstat & SL11H_INTMASK_RD) { | 729 | } else if (irqstat & SL11H_INTMASK_RD) { |
726 | if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND)) { | 730 | if (sl811->port1 & (1 << USB_PORT_FEAT_SUSPEND)) { |