On Monday 10 July 2006 9:16 am, Alan Stern wrote: > Dave: > > It seems to me that none of the calls to usb_resume_root_hub() below are > really needed. Is there any reason not to remove them?
I'll have to re-test a lot of configurations to be sure, but the basic reason for having those calls is to make sure khubd does its part of re-activating the root hub. Even in "selective suspend" scenarios, the kind that are mostly triggered through /sys/devices/.../power/state writes. The reason not to remove them is lack of time to test all the various configurations of half a dozen different drivers, several including hardware I don't have (and with infrequent maintainance). Plus, even if those calls aren't needed, it's not like it hurts anything to have khubd look at a root hub now and then! - Dave > Alan Stern > > > > Index: usb-2.6/drivers/usb/host/ehci-pci.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ehci-pci.c > +++ usb-2.6/drivers/usb/host/ehci-pci.c > @@ -277,10 +277,8 @@ static int ehci_pci_resume(struct usb_hc > status = readl(&ehci->regs->port_status [port]); > if (!(status & PORT_POWER)) > continue; > - if (status & (PORT_SUSPEND | PORT_RESUME | PORT_OWNER)) { > - usb_hcd_resume_root_hub(hcd); > + if (status & (PORT_SUSPEND | PORT_RESUME | PORT_OWNER)) > return 0; > - } > } > > restart: > Index: usb-2.6/drivers/usb/host/ohci-hub.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ohci-hub.c > +++ usb-2.6/drivers/usb/host/ohci-hub.c > @@ -567,9 +564,6 @@ static int ohci_hub_control ( > break; > case USB_PORT_FEAT_SUSPEND: > temp = RH_PS_POCI; > - if ((ohci->hc_control & OHCI_CTRL_HCFS) > - != OHCI_USB_OPER) > - usb_hcd_resume_root_hub(hcd); > break; > case USB_PORT_FEAT_C_SUSPEND: > temp = RH_PS_PSSC; > Index: usb-2.6/drivers/usb/host/ohci-omap.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ohci-omap.c > +++ usb-2.6/drivers/usb/host/ohci-omap.c > @@ -487,7 +487,6 @@ static int ohci_omap_resume(struct platf > > omap_ohci_clock_power(1); > dev->power.power_state = PMSG_ON; > - usb_hcd_resume_root_hub(dev_get_drvdata(dev)); > return 0; > } > > Index: usb-2.6/drivers/usb/host/ohci-pxa27x.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ohci-pxa27x.c > +++ usb-2.6/drivers/usb/host/ohci-pxa27x.c > @@ -348,7 +348,6 @@ static int ohci_hcd_pxa27x_drv_resume(st > return status; > > pdev->dev.power.power_state = PMSG_ON; > - usb_hcd_resume_root_hub(hcd); > > return 0; > } > Index: usb-2.6/drivers/usb/host/ohci-pci.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ohci-pci.c > +++ usb-2.6/drivers/usb/host/ohci-pci.c > @@ -146,7 +146,6 @@ static int ohci_pci_suspend (struct usb_ > static int ohci_pci_resume (struct usb_hcd *hcd) > { > set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); > - usb_hcd_resume_root_hub(hcd); > return 0; > } > > Index: usb-2.6/drivers/usb/host/ohci-ep93xx.c > =================================================================== > --- usb-2.6.orig/drivers/usb/host/ohci-ep93xx.c > +++ usb-2.6/drivers/usb/host/ohci-ep93xx.c > @@ -192,7 +192,6 @@ static int ohci_hcd_ep93xx_drv_resume(st > > ep93xx_start_hc(&pdev->dev); > pdev->dev.power.power_state = PMSG_ON; > - usb_hcd_resume_root_hub(hcd); > > return 0; > } > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel