Hi all,

our research group is involved in building a large sensor node testbed, and we 
need to control the power supply of a number of USB devices by turning on/off 
the supply of the ports on the hub they are connected to. The hubs that we 
are using are DUB-H4, a self-powered 4-port USB 2.0 hub branded as D-Link, 
using a Genesys Logic controller.

Unfortunately, we are having problems with getting this to work with the more 
recent linux kernels and we don't have a record of the latest working ehci 
driver version. I would be grateful for any hints about potential changes in 
the drivers (in the last 5-6 months) that could have influenced the power 
control capability.

Here is some debugging information:

Bus 001 Device 002: ID 05e3:0660 Genesys Logic, Inc.

Sending a control message to read the hub descriptor (using usb_control_msg 
from libusb), with enabled usbfs_snoop in the usbcore module returns:

usb 1-3: usbdev_ioctl: CONTROL
usb 1-3: control read: bRequest=06 bRrequestType=a0 wValue=0000 wIndex=0000
usb 1-3: control read: data 09 29 04 e9 00 32 64 00 ff

According to table 11.23.2.1 in the USB 2.0 spec. "e9" says that the hub 
supports individual port power switching and over-current reporting.

Checking the status of port-1 on the hub after the initialisation shows:

usb 1-3: usbdev_ioctl: CONTROL
usb 1-3: control read: bRequest=00 bRrequestType=a3 wValue=0000 wIndex=0001
usb 1-3: control read: data 00 01 00 00

and the same with a device connected:

usb 1-3: usbdev_ioctl: CONTROL
usb 1-3: control read: bRequest=00 bRrequestType=a3 wValue=0000 wIndex=0001
usb 1-3: control read: data 03 01 00 00


If we now send a command to turn off the power of port-1:

usb 1-3: control write: bRequest=01 bRrequestType=23 wValue=0008 wIndex=0001
usb 1-3: control write: data:

the port-1 status changes into power-down state:

usb 1-3: control read: bRequest=00 bRrequestType=a3 wValue=0000 wIndex=0001
usb 1-3: control read: data 00 00 00 00


Unfortunately the power (in electrical terms) is still on and the LED 
indicator remains lit. With the older kernels, at this point of time, the LED 
was turned off and the power was disconnected.

Also, with the recent kernels, the hub behaves differently when the external 
power is disconnected while the hub remains connected to the host controller. 
Previously, this has resulted in all ports going into power-down state. Now, 
after a short reset, the hub is re-powered from the bus.  Could it be that 
the same thing is happening when we want to turn the individual ports, i.e. 
the driver thinking that this is an error condition and trying corrective 
actions in the background?


Best regards,
Vlado Handziski
TU Berlin

P.S. I apologize if this is a duplicate, the system rejected my original mail 
because of the HTML that gmail inserts.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to