Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-05 Thread Tao Ren
On 8/5/19 1:45 PM, Heiner Kallweit wrote: > On 04.08.2019 21:22, Vladimir Oltean wrote: >> On Sun, 4 Aug 2019 at 19:07, Heiner Kallweit wrote: >>> >>> On 04.08.2019 17:59, Vladimir Oltean wrote: On Sun, 4 Aug 2019 at 17:52, Andrew Lunn wrote: > >>> The patchset looks better now. But

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-05 Thread Heiner Kallweit
On 04.08.2019 21:22, Vladimir Oltean wrote: > On Sun, 4 Aug 2019 at 19:07, Heiner Kallweit wrote: >> >> On 04.08.2019 17:59, Vladimir Oltean wrote: >>> On Sun, 4 Aug 2019 at 17:52, Andrew Lunn wrote: >> The patchset looks better now. But is it ok, I wonder, to keep >> PHY_BCM_FLAGS_M

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-05 Thread Andrew Lunn
On Mon, Aug 05, 2019 at 06:38:16AM +, Tao Ren wrote: > Hi Andrew, > > On 8/4/19 7:51 AM, Andrew Lunn wrote: > >>> The patchset looks better now. But is it ok, I wonder, to keep > >>> PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that > >>> phy_attach_direct is overwriting it? > >

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Tao Ren
Hi Andrew, On 8/4/19 7:51 AM, Andrew Lunn wrote: >>> The patchset looks better now. But is it ok, I wonder, to keep >>> PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that >>> phy_attach_direct is overwriting it? >> > >> I checked ftgmac100 driver (used on my machine) and it calls >>

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Vladimir Oltean
On Sun, 4 Aug 2019 at 19:07, Heiner Kallweit wrote: > > On 04.08.2019 17:59, Vladimir Oltean wrote: > > On Sun, 4 Aug 2019 at 17:52, Andrew Lunn wrote: > >> > The patchset looks better now. But is it ok, I wonder, to keep > PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering tha

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Andrew Lunn
> > Even if that were the case (patching phy_attach_direct to apply a > > logical-or to dev_flags), it sounds fishy to me that the genphy code > > is unable to determine that this PHY is running in 1000Base-X mode. > > > > In my opinion it all boils down to this warning: > > > > "PHY advertising

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Heiner Kallweit
On 04.08.2019 17:59, Vladimir Oltean wrote: > On Sun, 4 Aug 2019 at 17:52, Andrew Lunn wrote: >> The patchset looks better now. But is it ok, I wonder, to keep PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that phy_attach_direct is overwriting it? >>> >> >>> I checked

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Vladimir Oltean
On Sun, 4 Aug 2019 at 17:52, Andrew Lunn wrote: > > > > The patchset looks better now. But is it ok, I wonder, to keep > > > PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that > > > phy_attach_direct is overwriting it? > > > > > I checked ftgmac100 driver (used on my machine) and it

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-04 Thread Andrew Lunn
> > The patchset looks better now. But is it ok, I wonder, to keep > > PHY_BCM_FLAGS_MODE_1000BX in phydev->dev_flags, considering that > > phy_attach_direct is overwriting it? > > I checked ftgmac100 driver (used on my machine) and it calls > phy_connect_direct which passes phydev->dev_flags whe

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-03 Thread Tao Ren
Hi Vladimir, On 8/3/19 6:49 AM, Vladimir Oltean wrote: > Hi Tao, > > On Sat, 3 Aug 2019 at 00:56, Tao Ren wrote: >> >> genphy_read_status() cannot report correct link speed when BCM54616S PHY >> is configured in RGMII->1000Base-KX mode (for example, on Facebook CMM >> BMC platform), and it is be

Re: [PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-03 Thread Vladimir Oltean
Hi Tao, On Sat, 3 Aug 2019 at 00:56, Tao Ren wrote: > > genphy_read_status() cannot report correct link speed when BCM54616S PHY > is configured in RGMII->1000Base-KX mode (for example, on Facebook CMM > BMC platform), and it is because speed-related fields in MII registers > are assigned differe

[PATCH net-next v3] net: phy: broadcom: add 1000Base-X support for BCM54616S

2019-08-02 Thread Tao Ren
genphy_read_status() cannot report correct link speed when BCM54616S PHY is configured in RGMII->1000Base-KX mode (for example, on Facebook CMM BMC platform), and it is because speed-related fields in MII registers are assigned different meanings in 1000X register set. Actually there is no speed fi