Re: [PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-18 Thread David Miller
From: Florian Fainelli 
Date: Wed, 16 Sep 2020 19:04:13 -0700

> The internal Gigabit PHY on Broadcom STB chips has a digital clock which
> drives its MDIO interface among other things, the driver now requests
> and manage that clock during .probe() and .remove() accordingly.
> 
> Because the PHY driver can be probed with the clocks turned off we need
> to apply the dummy BMSR workaround during the driver probe function to
> ensure subsequent MDIO read or write towards the PHY will succeed.
> 
> Signed-off-by: Florian Fainelli 
> ---
> Changes in v2:
> 
> - localize the changes exclusively within the PHY driver and do not
>   involve the MDIO driver at all. Using the ethernet-phyid.
>   compatible string we can get straight to the desired driver without
>   requiring clocks to be assumed on.

Applied and queued up for -stable, thanks.


Re: [PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-17 Thread Andrew Lunn
On Wed, Sep 16, 2020 at 07:04:13PM -0700, Florian Fainelli wrote:
> The internal Gigabit PHY on Broadcom STB chips has a digital clock which
> drives its MDIO interface among other things, the driver now requests
> and manage that clock during .probe() and .remove() accordingly.
> 
> Because the PHY driver can be probed with the clocks turned off we need
> to apply the dummy BMSR workaround during the driver probe function to
> ensure subsequent MDIO read or write towards the PHY will succeed.
> 
> Signed-off-by: Florian Fainelli 

Reviewed-by: Andrew Lunn 

Andrew


Re: [PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-17 Thread Florian Fainelli




On 9/17/2020 6:11 AM, Andrew Lunn wrote:

On Wed, Sep 16, 2020 at 07:04:13PM -0700, Florian Fainelli wrote:

The internal Gigabit PHY on Broadcom STB chips has a digital clock which
drives its MDIO interface among other things, the driver now requests
and manage that clock during .probe() and .remove() accordingly.

Because the PHY driver can be probed with the clocks turned off we need
to apply the dummy BMSR workaround during the driver probe function to
ensure subsequent MDIO read or write towards the PHY will succeed.


Hi Florian

Is it worth mentioning this in the DT binding? It is all pretty much
standard lego pieces, but it has taken you a while to assemble them in
the correct way. So giving hits to others who might want to uses these
STB chips could be nice.


In some respect this does not really belong in the DT binding because we 
are describing how Linux will be matching a given compatible string with 
its driver, but it is certainly worth mentioning somewhere, like in the 
PHY document.


Are you fine with the changes though?
--
Florian


Re: [PATCH net-next v2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-17 Thread Andrew Lunn
On Wed, Sep 16, 2020 at 07:04:13PM -0700, Florian Fainelli wrote:
> The internal Gigabit PHY on Broadcom STB chips has a digital clock which
> drives its MDIO interface among other things, the driver now requests
> and manage that clock during .probe() and .remove() accordingly.
> 
> Because the PHY driver can be probed with the clocks turned off we need
> to apply the dummy BMSR workaround during the driver probe function to
> ensure subsequent MDIO read or write towards the PHY will succeed.

Hi Florian

Is it worth mentioning this in the DT binding? It is all pretty much
standard lego pieces, but it has taken you a while to assemble them in
the correct way. So giving hits to others who might want to uses these
STB chips could be nice.

Andrew