Re: [RFC/PATCH 4/4] add phy low power suspend for older chipidea core

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

 



On Mon, 14 May 2012, Matthieu CASTET wrote:

> >> +	else {
> >> +		reg = &ehci->regs->port_status[port];
> >> +		bit = HOSTPC_PHCD << 1;
> >>  	}
> >> +
> >> +	temp = ehci_readl(ehci, reg);
> >> +	ehci_writel(ehci, temp & ~bit, reg);
> > 
> > This can't be right.  In the !has_hostpc case, you do not turn off the 
> > RWC bits before writing them back.
> > 
> I don't understand : the bit is turned of by "temp & ~bit" that is in the common
> path.

Sure, you turned off the HOSTPC_PHCD bit.  But what about the PORT_CSC,
PORT_PEC, and PORT_OCC bits (collectively known as PORT_RWC_BITS)?  If
any of them happened to be on when the ehci_readl() executed, the
ehci_writel() would turn them off.  That's not what you want.

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