On Sat, 27 Apr 2013, ZhenHua wrote:I tested this, and the warning is gone. Is this patch committed ?
On 04/27/2013 12:51 AM, Alan Stern wrote:Have you tried this? I expect the warning will not occur when theOn Fri, 26 Apr 2013, ZhenHua wrote:I have tested the UHCI_RH_RUNNING_NODEVS case yeasterday, and it works.
There is a function wait_for_HP() in uhci-hub.c. In thisI believe that if you change the UHCI_RH_RUNNING_NODEVS case, you will
patch, it is used in suspend_rh(), I think this can be a
solution. And I have tested this patch, it can fix the bug.
I think there is another patch needed. As Alan said in another
mail, in the UHCI_RH_RUNNING_NODEVS case, it should not be stopped
if the uhci device is HP iLo virtual usb.
find that this patch (calling wait_for_HP) isn't needed.
In fact, the patch is so easy that I am including it below. Please
test this (without either of your patches) to see if it works.
@@ -225,7 +225,8 @@ static int uhci_hub_status_data(struct u
/* auto-stop if nothing connected for 1 second */
uhci->rh_state = UHCI_RH_RUNNING;
- else if (time_after_eq(jiffies, uhci->auto_stop_time))
+ else if (time_after_eq(jiffies, uhci->auto_stop_time) &&
But the function suspend_rh is also called in other places, so I think
it only fixes
the warning when auto stop is called, but not fix the warning when
is called, it will come out again.
bus_suspend routine is called, because then there will be a 1-ms delay,
not just a 400-us delay.
I think we can check the product id to determine whether a device is virtual.
And if you add uhci->wait_for_hp check in the UHCI_RH_RUNNING_NODEVS case,If you want, you can add a new flag specifically for virtual
all hp uhci devices will not auto stop, not only the virtual devices. I
guess it may waste resource.
controllers. But it shouldn't matter -- as long as your kernels are
built with CONFIG_PM_RUNTIME enabled, there won't be any significant
waste of resources.