Re: Overcurrent behavior of linux usb stack

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

 



On Tue, 11 Jan 2011, Pratyush Anand wrote:

> >> I am working with controller where it expects port power off to be
> >> done by software in case of overcurrent detection interrupt.
> >
> > Root hubs are different from external hubs.  It is reasonable to expect
> > software to turn off port power for root hubs.
> >
> 
> The code which I had referred was from linux (except hub_power_off part).
> 
> linux+v2.6.37/drivers/usb/core/hub.c
> line no: 3416
> 
> 3416                        if (hubchange & HUB_CHANGE_OVERCURRENT) {
> 3417                                dev_dbg (hub_dev, "overcurrent change\n");
> 3418                                msleep(500);    /* Cool down */
> 3419                                clear_hub_feature(hdev, C_HUB_OVER_CURRENT);
> 3420                                hub_power_on(hub, true);
> 3421                        }
> 3422                }
> 
> But, It does not turn off port power for root hubs.

If you want to add a hub_power_off() call in there, I don't think 
anyone will object.  Especially if you call it only for root hubs.  Is 
that sufficient to make your controller work?

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