usbconfig power_off is not working correctly on FreeBSD 8.2

Hans Petter Selasky hselasky at c2i.net
Mon Mar 7 11:16:15 UTC 2011


On Monday 07 March 2011 12:03:55 Gritsuk Anton wrote:
> On 07.03.2011 12:44, Hans Petter Selasky wrote:
> > On Monday 07 March 2011 11:30:35 Gritsuk Anton wrote:
> >> I see that usbconfig is not working correctly. When i type:
> >>    # usbconfig -u 4 -a 3 power_off
> >> 
> >> really usb device will detached
> >> 
> >> But i cannot return device back when I type:
> >>    usbconfig -u 4 -a 3 power_on
> > 
> > Hi,
> > 
> > There has been some changes in this area. When an USB device is powered
> > off, then you need to reset the parent hub to get it back.
> > 
> > --HPS
> 
> How I can reset the parent hub to get usb device back?
> 

Hi,

> When I type:
> # usbconfig reset
> my terminal is freeze and nothing happens.

Is your keyboard on USB and you are in X? Then try:

CTRL+ALT+F1, then CTRL+ALT+F9

The command you did will reset all USB devices. You should specify a 
particular device:

usbconfig -d ugenX.Y reset

I see there is a bug if trying to reset the root HUB. You can try instead:

usbconfig -d ugenX.Y set_config 255

Then

usbconfig -d ugenX.Y set_config 0

For the root HUB.

Currently there is no easy way to find the HUB directly. One way is to find 
the root HUB on the same bus like your device:

Device:

ugen4.2: <...> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

Associated root HUB:

ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) 
pwr=SAVE

You see they are both at the same bus ugen4.Y.

> 
> > I recommend only using power_save. Then the USB stack will manage power
> > saving.

The power_save is done like this:

usbconfig -d ugenX.Y power_save

The timeout until power save triggers can be set by:

sysctl hw.usb.power_timeout=30

--HPS


More information about the freebsd-usb mailing list