Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572115

Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver
Date 2017-02-02 03:00 +0100
Message-ID <t6eQN-5Cs-3@gated-at.bofh.it> (permalink)
References (1 earlier) <t66JA-iP-41@gated-at.bofh.it> <t68s2-1q4-15@gated-at.bofh.it> <t6aka-2Pd-19@gated-at.bofh.it> <t6atP-2Vw-1@gated-at.bofh.it> <t6bpU-3E0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 01, 2017 at 11:13:23PM +0100, Lukasz Majewski wrote:
> Hi Andrew,
> 
> > > We would need a tri-state device tree properly:
> > > 
> > > 1. Not defined - do nothing
> > > 2. Defined as 0 -> explicitly disable port mirroring
> > > 3. Defined as 1 -> explicitly enable port mirriring
> > > 
> > > The "net-phy-lane-swap" only fulfills points 1 and 3 above.
> > > 
> > > In my use case I do need point 2.
> > 
> > Looking at the datasheet, PORT_MIRROR_EN defaults to 0. So it seems
> > reasonable to unconditionally set it to 0 when the PHY driver
> > loads. Any device which needs a value of 1 can set "net-phy-lane-swap"
> 
> Unconditionally setting this field to 0 (as we expect the reset default
> setting) seems to me like a good solution. 
> 
> However, I was not sure if such approach is acceptable by the community.

So the issue here is, are there boards with bootloaders which set this
"lane swap" bit, and rely on Linux not changing it, because the
hardware design has such a swap?

It seems the bootloader you are using does this. But in your case, it
does it wrongly. I'm guessing you have a vendor bootloader? And no
easy access to the sources? Otherwise you would of fixed the
bootloader. So can we assume there are vendor designed boards which
require the swap? Do they run a mainline kernel? Or only the vendor
kernel?

If we know of mainline boards which are going to break, we should not
do this.

If however we do decide to reset it to default value, i think it would
be good to implement net-phy-lane-swap as well, so giving people an
easier path towards mainline.

       Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net: phy: dp83867: Port mirroring support in the DP83867 TI's PHY driver Lukasz Majewski <lukma@denx.de> - 2017-02-01 15:50 +0100
  Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Andrew Lunn <andrew@lunn.ch> - 2017-02-01 18:20 +0100
    Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Florian Fainelli <f.fainelli@gmail.com> - 2017-02-01 20:10 +0100
      Re: [PATCH] net: phy: dp83867: Port mirroring support in the  DP83867 TI's PHY driver Lukasz Majewski <lukma@denx.de> - 2017-02-01 22:10 +0100
        Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Andrew Lunn <andrew@lunn.ch> - 2017-02-01 22:20 +0100
          Re: [PATCH] net: phy: dp83867: Port mirroring support in the  DP83867 TI's PHY driver Lukasz Majewski <lukma@denx.de> - 2017-02-01 23:20 +0100
            Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Andrew Lunn <andrew@lunn.ch> - 2017-02-02 03:00 +0100
              Re: [PATCH] net: phy: dp83867: Port mirroring support in the  DP83867 TI's PHY driver Lukasz Majewski <lukma@denx.de> - 2017-02-02 10:20 +0100
                Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Andrew Lunn <andrew@lunn.ch> - 2017-02-02 14:20 +0100
                Re: [PATCH] net: phy: dp83867: Port mirroring support in the  DP83867 TI's PHY driver Lukasz Majewski <lukma@denx.de> - 2017-02-02 16:30 +0100
        Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Andrew Lunn <andrew@lunn.ch> - 2017-02-01 22:20 +0100
        Re: [PATCH] net: phy: dp83867: Port mirroring support in the DP83867  TI's PHY driver Florian Fainelli <f.fainelli@gmail.com> - 2017-02-01 22:20 +0100

csiph-web