RE: [Uclinux-dist-devel] [PATCH] USB: sl811-hcd: Fix device disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sergei Shtylyov wrote on 2010-03-25:
> Hello.
>
> Hennerich, Michael wrote:
>
>> 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@xxxxxxxxxx>
>>
>> drivers/usb/host/sl811-hcd.c |    7 ++++---
>>  1 files changed, 4 insertions(+), 3 deletions(-)
>> diff --git a/drivers/usb/host/sl811-hcd.c
>> b/drivers/usb/host/sl811-hcd.c index 5b22a4d..30f4185 100644
>> --- a/drivers/usb/host/sl811-hcd.c
>> +++ b/drivers/usb/host/sl811-hcd.c
>> @@ -719,10 +719,11 @@ 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) +
>>
>
>    Empty line not needed here...

Sorry - it got there by accident

>>                         sl811->port1 &= ~(1 <<
>> USB_PORT_FEAT_CONNECTION); +               else +
>> sl811->port1 |= 1 << USB_PORT_FEAT_CONNECTION;
>>
>>                 sl811->port1 |= 1 << USB_PORT_FEAT_C_CONNECTION;
>
> WBR, Sergei
>
> _______________________________________________ Uclinux-dist-devel
> mailing list Uclinux-dist-devel@xxxxxxxxxxxxxxxxxxxx
> https://blackfin.uclinux.org/mailman/listinfo/uclinux-dist-devel
Greetings,
Michael

remove spurious newline

Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>

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 5b22a4d..75e8426 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -719,10 +719,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;


Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux