Re: Forced disconnect of usb device at external usb hub plugin

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

 



On Thu, 8 Jul 2010, Amit Nagal wrote:

> Hi ,
> 
> i am facing forced disconnect of my usb composite device under the
> situation described below :
> 
> 1 ) i plugged a 4 port bus powered external usb  hub  into linux pc's root hub .
> 
> 2)  i plugged  the usb device into one of the 4 ports of external usb hub .
> 
> 3)  i plugged another 4 port external usb hub (same vendor as for 1st
> external hub ) into one of the available port
>      of first external usb hub .  topology looks like this
> 
>     root hub  <-   1st 4 port external usb hub  <-  usb device
> 
> <-   2nd 4 port external usb hub
> 
> 
>     but most of the time when 2nd usb hub is plugged into the 1st hub ,
>     usb device gets disconnected automatically from 1st hub  ,
>     though physically it is plugged in to the 1st external usb hub .
> 
> 
>  4) under what conditions a device can automatically get disconnected
> from a hub ?

Basically, whenever something goes wrong.  It's entirely up to the hub 
to decide when this should happen.

>  5) is it something related to power issue ?

It could very well be.  Did you know that USB does not allow one 
bus-powered hub to be plugged into another?  The combined voltage drop 
is too great.

>  6) if a hub cannot meet the power requirements of a device attached
> to its port ,
>      will it do a disconnect to the device ?

It might.  In theory this shouldn't happen because both the hub and the 
device are supposed to tell the kernel how much current they need.  But 
a lot of devices don't do this correctly.

>  7)  my dmesg logs are attached for the following situations :
> 
>       a)  when usb device is plugged into first external usb hub
> (dmesg_device_connect_No_2nd_hub.txt)
>       b) when 2nd usb hub is plugged into 1st usb hub  and the device
> disconnects .

This is a good example.  The kernel prints a warning message in the log
when it sees an unpowered hub plugged into another unpowered hub.  The
fact that the warning isn't present in your log means that the hubs lie
to the kernel: They don't tell it they are unpowered.  Another way to
see this is that the log doesn't include any messages about "hub
controller current requirement"; these messages are skipped when the
hub claims to be self-powered.

You should be able to see this in the "lsusb -v" output for those hubs.

Alan Stern

--
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