Alan Stern a écrit : > On Mon, 14 May 2012, Matthieu CASTET wrote: > >> +static void tdi_phy_lpm_clear(struct ehci_hcd *ehci, int port) >> +{ >> + if (ehci->has_hostpc) { >> + u32 __iomem *hostpc_reg; >> + u32 temp; >> + >> + hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs >> + + HOSTPC0 + 4 * port); > > While you're at it, can we get rid of this mess? How about just > defining register array pointer, like this: > > ehci->hostpcs = (u32 __iomem *) ((void *) ehci->regs + HOSTPC0); > >> @@ -146,15 +177,10 @@ static __maybe_unused void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, >> spin_lock_irqsave(&ehci->lock, flags); >> >> /* clear phy low-power mode before changing wakeup flags */ >> - if (ehci->has_hostpc) { >> + if (ehci->has_tdi_phy_lpm) { >> port = HCS_N_PORTS(ehci->hcs_params); >> - while (port--) { >> - u32 __iomem *hostpc_reg; >> - >> - hostpc_reg = (u32 __iomem *)((u8 *) ehci->regs >> - + HOSTPC0 + 4 * port); >> - temp = ehci_readl(ehci, hostpc_reg); >> - ehci_writel(ehci, temp & ~HOSTPC_PHCD, hostpc_reg); >> + while (port--) >> + tdi_phy_lpm_clear(ehci, port); >> } > > You forgot to remove this line. Did you try to compile this code? > I was building with CONFIG_PM disabled. > Instead of looping through the ports all over the place, how writing a > separate routine to call tdi_phy_lpm_clear() for all ports? And the > same for tdi_phy_lpm_set(). Ok, but the single port version is still need for ehci_hub_control. Matthieu -- 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