Re: [PATCH net-next v2 2/4] Documentation: net: phy: Add a paragraph about pause frames/flow control

2016-11-30 Thread Sebastian Frias
On 28/11/16 18:33, Florian Fainelli wrote: > On 11/28/2016 02:38 AM, Sebastian Frias wrote: >> On 27/11/16 19:44, Florian Fainelli wrote: >>> Describe that the Ethernet MAC controller is ultimately responsible for >>> dealing with proper pause frames/flow control adv

Re: [PATCH net-next v2 2/4] Documentation: net: phy: Add a paragraph about pause frames/flow control

2016-11-28 Thread Sebastian Frias
On 27/11/16 19:44, Florian Fainelli wrote: > Describe that the Ethernet MAC controller is ultimately responsible for > dealing with proper pause frames/flow control advertisement and > enabling, and that it is therefore allowed to have it change > phydev->supported/advertising with SUPPORTED_Pause

Re: [PATCH net-next v2 3/4] Documentation: net: phy: Add blurb about RGMII

2016-11-28 Thread Sebastian Frias
On 27/11/16 19:44, Florian Fainelli wrote: > RGMII is a recurring source of pain for people with Gigabit Ethernet > hardware since it may require PHY driver and MAC driver level > configuration hints. Document what are the expectations from PHYLIB and > what options exist. > > Signed-off-by: Flori

Re: [net-next PATCH v1 0/2] stmmac: dwmac-meson8b: configurable RGMII TX delay

2016-11-28 Thread Sebastian Frias
On 25/11/16 18:44, Florian Fainelli wrote: > On 11/25/2016 03:13 AM, Sebastian Frias wrote: >> On 24/11/16 19:55, Florian Fainelli wrote: >>> Correct, the meaning of PHY_INTERFACE_MODE should be from the >>> perspective of the PHY device: >>> >>> - PHY

Re: [net-next PATCH v1 0/2] stmmac: dwmac-meson8b: configurable RGMII TX delay

2016-11-25 Thread Sebastian Frias
On 24/11/16 19:55, Florian Fainelli wrote: > Le 24/11/2016 à 09:05, Martin Blumenstingl a écrit : >> On Thu, Nov 24, 2016 at 4:56 PM, Jerome Brunet wrote: >>> On Thu, 2016-11-24 at 15:34 +0100, Martin Blumenstingl wrote: Currently the dwmac-meson8b stmmac glue driver uses a hardcoded 1/4

Re: Debugging Ethernet issues

2016-11-16 Thread Sebastian Frias
Hi Florian, On 11/14/2016 10:00 PM, Florian Fainelli wrote: > On 11/14/2016 12:27 PM, Mason wrote: >> On 14/11/2016 19:20, Florian Fainelli wrote: >> >>> On 11/14/2016 09:59 AM, Sebastian Frias wrote: >>> >>>> Could you confirm that Mason's

Re: Debugging Ethernet issues

2016-11-14 Thread Sebastian Frias
On 11/14/2016 06:32 PM, Florian Fainelli wrote: > On 11/14/2016 07:33 AM, Mason wrote: >> On 14/11/2016 15:58, Mason wrote: >> >>> nb8800 26000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx >>> vs >>> nb8800 26000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off >>> >>> I

Re: [PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-14 Thread Sebastian Frias
On 11/09/2016 06:03 PM, Florian Fainelli wrote: > On 11/09/2016 05:02 AM, Sebastian Frias wrote: >> On 11/04/2016 05:49 PM, Måns Rullgård wrote: >>>>> But when doing so, both the Atheros 8035 and the Aurora NB8800 drivers >>>>> will apply the delay. >>&

Re: Is Documentation/networking/phy.txt still up-to-date?

2016-11-14 Thread Sebastian Frias
On 11/09/2016 06:07 PM, Florian Fainelli wrote: > On 11/09/2016 05:24 AM, Sebastian Frias wrote: >> Hi, >> >> Documentation/networking/phy.txt discusses phy_connect and states that: >> >> "... >> >> interface is a u32 which specifies the conne

Re: Debugging Ethernet issues

2016-11-14 Thread Sebastian Frias
On 11/13/2016 08:55 PM, Florian Fainelli wrote: > Le 13/11/2016 à 11:51, Mason a écrit : >> On 13/11/2016 04:09, Andrew Lunn wrote: >> >>> Mason wrote: >>> When connected to a Gigabit switch 3.4 negotiates a LAN DHCP setup instantly 4.7 requires over 5 seconds to do so >>> >>> When y

Is Documentation/networking/phy.txt still up-to-date?

2016-11-09 Thread Sebastian Frias
Hi, Documentation/networking/phy.txt discusses phy_connect and states that: "... interface is a u32 which specifies the connection type used between the controller and the PHY. Examples are GMII, MII, RGMII, and SGMII. For a full list, see include/linux/phy.h Now just make sure that phyd

Re: [PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-09 Thread Sebastian Frias
On 11/04/2016 05:49 PM, Måns Rullgård wrote: >>> But when doing so, both the Atheros 8035 and the Aurora NB8800 drivers >>> will apply the delay. >>> >>> I think a better way of dealing with this is that both, PHY and MAC >>> drivers exchange information so that the delay is applied only once. >> >

Re: [PATCH v3 2/2] net: ethernet: nb8800: handle all RGMII definitions

2016-11-07 Thread Sebastian Frias
Hi Måns, On 11/05/2016 01:58 PM, Måns Rullgård wrote: >> if (gigabit) { >> -if (priv->phy_mode == PHY_INTERFACE_MODE_RGMII) >> +if (phy_interface_is_rgmii(phydev)) >> mac_mode |= RGMII_MODE; >> >> mac_mode |= GMAC_MODE; > > As I said

Re: [PATCH v2 2/2 ] net: ethernet: nb8800: handle all RGMII definitions

2016-11-04 Thread Sebastian Frias
Hi David, On 11/04/2016 06:54 PM, David Miller wrote: > From: Sebastian Frias > Date: Fri, 4 Nov 2016 18:02:15 +0100 > >> Commit a999589ccaae ("phylib: add RGMII-ID interface mode definition") >> and commit 7d400a4c5897 ("phylib: add PHY interface modes for

[PATCH v3 2/2] net: ethernet: nb8800: handle all RGMII definitions

2016-11-04 Thread Sebastian Frias
E_MODE_RGMII_TXID to deal with internal delays. Those are all RGMII modes (1Gbit) and must be considered that way when setting the MAC mode or the pad mode for the HW to work properly. Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 8 1 file changed, 4 insert

[PATCH v3 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
The delay can be applied at PHY or MAC level, but since PHY drivers will apply the delay at PHY level when using one of the "internal delay" declinations of RGMII mode (like PHY_INTERFACE_MODE_RGMII_TXID), applying it again at MAC level causes issues. Signed-off-by: Sebastian Frias --

[PATCH v3 0/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
This is v3 of the series, it fixes formatting issues of v2. In v2 of the series, only the second patch: "net: ethernet: nb8800: handle all RGMII definitions" is modified to account for Florian's suggestion. Sebastian Frias (2): net: ethernet: nb8800: Do not apply TX delay at

[PATCH v2 2/2] net: ethernet: nb8800: handle all RGMII definitions

2016-11-04 Thread Sebastian Frias
E_MODE_RGMII_TXID to deal with internal delays. Those are all RGMII modes (1Gbit) and must be considered that way when setting the MAC mode or the pad mode for the HW to work properly. Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 8 1 file changed, 4 insert

[PATCH v2 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
The delay can be applied at PHY or MAC level, but since PHY drivers will apply the delay at PHY level when using one of the "internal delay" declinations of RGMII mode (like PHY_INTERFACE_MODE_RGMII_TXID), applying it again at MAC level causes issues. Signed-off-by: Sebastian Frias -

[PATCH v2 0/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
This is v2 of the series, only the second patch: "net: ethernet: nb8800: handle all RGMII definitions" is modified to account for Florian's suggestion. Sebastian Frias (2): net: ethernet: nb8800: Do not apply TX delay at MAC level net: ethernet: nb8800: handle all RGMII defini

[PATCH v2 2/2 ] net: ethernet: nb8800: handle all RGMII definitions

2016-11-04 Thread Sebastian Frias
E_MODE_RGMII_TXID to deal with internal delays. Those are all RGMII modes (1Gbit) and must be considered that way when setting the MAC mode or the pad mode for the HW to work properly. Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 8 1 file changed, 4 insert

Re: [PATCH 2/2] net: ethernet: nb8800: handle all RGMII declinations

2016-11-04 Thread Sebastian Frias
On 11/04/2016 05:23 PM, Florian Fainelli wrote: > > > On 11/04/2016 08:05 AM, Sebastian Frias wrote: >> Commit a999589ccaae ("phylib: add RGMII-ID interface mode definition") >> and commit 7d400a4c5897 ("phylib: add PHY interface modes for internal >>

Re: [PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
Hi Andrew, On 11/04/2016 04:11 PM, Andrew Lunn wrote: > On Fri, Nov 04, 2016 at 04:02:24PM +0100, Sebastian Frias wrote: >> The delay can be applied at PHY or MAC level, but since >> PHY drivers will apply the delay at PHY level when using >> one of the "internal delay&q

Re: [PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
Hi Måns, On 11/04/2016 04:18 PM, Måns Rullgård wrote: > Sebastian Frias writes: > >> The delay can be applied at PHY or MAC level, but since >> PHY drivers will apply the delay at PHY level when using >> one of the "internal delay" d

[PATCH 2/2] net: ethernet: nb8800: handle all RGMII declinations

2016-11-04 Thread Sebastian Frias
E_MODE_RGMII_TXID to deal with internal delays. Those are all RGMII modes (1Gbit) and must be considered that way when setting the MAC Mode or the Pads Mode for the HW to work properly. Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 10 ++ 1 file changed

[PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level

2016-11-04 Thread Sebastian Frias
The delay can be applied at PHY or MAC level, but since PHY drivers will apply the delay at PHY level when using one of the "internal delay" declinations of RGMII mode (like PHY_INTERFACE_MODE_RGMII_TXID), applying it again at MAC level causes issues. Signed-off-by: Sebastian Frias --

Re: Ethernet not working on a different SoC with same eth HW

2016-11-04 Thread Sebastian Frias
On 11/04/2016 02:57 PM, Andrew Lunn wrote: >> Considering the ethernet DT bindings: >> >> https://www.kernel.org/doc/Documentation/devicetree/bindings/net/ethernet.txt >> >> Specifically, phy-mode values "rgmii", "rgmii-id", "rgmii-rxid", >> "rgmii-txid". >> >> Assuming that "rxid" (rx internal de

Re: [PATCH] net: phy: at803x: Register 'link_change_notify' only for AT8030

2016-04-27 Thread Sebastian Frias
Hi, Sergei pointed out that the same patch was submitted yesterday by Timur (what are the chances?! :-) ) https://patchwork.ozlabs.org/patch/615019/ Regards, Sebastian On 04/27/2016 01:34 PM, Sebastian Frias wrote: > There is no need to register the callback introduced by >

[PATCH] net: phy: at803x: Register 'link_change_notify' only for AT8030

2016-04-27 Thread Sebastian Frias
9325 ("net: phy: at803x: Add support for hardware reset") Signed-off-by: Sebastian Frias --- drivers/net/phy/at803x.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c in

Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY

2016-03-24 Thread Sebastian Frias
Hi Sergei, >>What I don't understand is why the link_change_notify() method ptr is >> populated for all 3 supported chips while only being needed on 8030... > > You are right. I made the patch but I'm unsure about it because it could conflict with yours. I mean, I think you submitted a patch

Re: [PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY

2016-03-24 Thread Sebastian Frias
Hi Sergei, On 03/23/2016 08:42 PM, Sergei Shtylyov wrote: > Hello. > > On 03/23/2016 01:49 PM, Sebastian Frias wrote: > >> This removes the dependency on GPIOLIB for non faulty PHYs. >> >> Indeed, without this patch, if GPIOLIB is not selected >> devm_gpio

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-23 Thread Sebastian Frias
Hi Sergei, On 03/23/2016 11:39 AM, Sergei Shtylyov wrote: >> gpiod_reset = devm_gpiod_get_optional(dev, "reset", >> GPIOD_OUT_HIGH); > >We shouldn't call _optional() then, should we? I could imagine the original intention was to be backward compatible. Indeed, if this call is not o

[PATCH] net: phy: at803x: Request 'reset' GPIO only for AT8030 PHY

2016-03-23 Thread Sebastian Frias
: at803x: Add support for hardware reset") Signed-off-by: Sebastian Frias --- drivers/net/phy/at803x.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index 2174ec9..dcecf25 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/p

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-23 Thread Sebastian Frias
Hi Uwe, On 03/22/2016 08:42 PM, Uwe Kleine-König wrote: > Hello Sebastian, > > On Tue, Mar 22, 2016 at 03:34:23PM +0100, Sebastian Frias wrote: >> I think we are in a deadlock :-) >> I'm going to reply inline below, but I will also send a different email >> to

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-22 Thread Sebastian Frias
Hi, On 03/21/2016 09:41 PM, Uwe Kleine-König wrote: >>My patch basically gets rid of all this code. The thing that worries me >> is that the driver assumes that the reset singal is active low, despite what >> the GPIO specifier in the device tree has for the GPIO polarity. In fact, it >> will

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-22 Thread Sebastian Frias
Hi Sergei, On 03/21/2016 09:15 PM, Sergei Shtylyov wrote: > >Do you have the PHY that requires the GPIO reset workaround? Unfortunately (or luckily :-) ) I don't have the faulty PHY, sorry. Best regards, Sebastian

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-22 Thread Sebastian Frias
04:56 PM, Sebastian Frias wrote: > Hi Uwe, Daniel, > > On 03/18/2016 01:54 PM, Uwe Kleine-König wrote: >> [expand cc a bit more] >> >> Hello, >> >> On Wed, Mar 16, 2016 at 06:25:59PM +0100, Sebastian Frias wrote: >>> Commit 687908c2b649 ("

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-22 Thread Sebastian Frias
Hi Uwe, I think we are in a deadlock :-) I'm going to reply inline below, but I will also send a different email to Daniel with a small recap. I think he should share the intent of the "reset" mechanism he introduced, in particular if it is mandatory. On 03/21/2016 09:12 PM, Uwe Kleine-König wro

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-21 Thread Sebastian Frias
Hi Uwe, On 03/21/2016 02:54 PM, Uwe Kleine-König wrote: >> >> Two things: >> - I suppose that in such hypothetical case the dependency on GPIOLIB >> would be required and thus be there > > I don't agree. There are bugs out there, and maybe the reason is as > simple as "the implementor of the re

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-21 Thread Sebastian Frias
Hi Uwe, On 03/18/2016 08:12 PM, Uwe Kleine-König wrote: > Hello Sebastian, > > On Fri, Mar 18, 2016 at 04:56:21PM +0100, Sebastian Frias wrote: >> On 03/18/2016 01:54 PM, Uwe Kleine-König wrote: >>> From a driver perspecitive, it would be nice if devm_gpiod_get_optional &

[PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-19 Thread Sebastian Frias
LIB is not selected. Fixes: 687908c2b649 ("net: phy: at803x: simplify using devm_gpiod_get_optional and its 4th argument") Signed-off-by: Sebastian Frias --- drivers/net/phy/at803x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/at803x.c b/driv

Re: [PATCH] net: phy: at803x: don't depend on GPIOLIB

2016-03-18 Thread Sebastian Frias
Hi Uwe, Daniel, On 03/18/2016 01:54 PM, Uwe Kleine-König wrote: > [expand cc a bit more] > > Hello, > > On Wed, Mar 16, 2016 at 06:25:59PM +0100, Sebastian Frias wrote: >> Commit 687908c2b649 ("net: phy: at803x: simplify using >> devm_gpiod_get_optional and

Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-08 Thread Sebastian Frias
On 02/08/2016 03:11 PM, Mason wrote: On 08/02/2016 14:37, Måns Rullgård wrote: Sebastian Frias wrote: By the way, I know some people like the command line, email, etc. but there ought to be other tools better suited for patch review... Some kernel subsystems use http://patchwork.ozlabs.org

Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-08 Thread Sebastian Frias
On 02/08/2016 02:37 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 04:26 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 04:08 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 03:34 PM, Måns Rullgård wrote: Sebastian Frias writes

Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-08 Thread Sebastian Frias
On 02/05/2016 04:26 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 04:08 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 03:34 PM, Måns Rullgård wrote: Sebastian Frias writes: Signed-off-by: Sebastian Frias Please change the subject to something like

[PATCH v5] net: ethernet: nb8800: support fixed-link DT node

2016-02-08 Thread Sebastian Frias
patch adds support for the "fixed-link" node to the nb8800 driver. Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/au

Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-05 Thread Sebastian Frias
On 02/05/2016 04:08 PM, Måns Rullgård wrote: Sebastian Frias writes: On 02/05/2016 03:34 PM, Måns Rullgård wrote: Sebastian Frias writes: Signed-off-by: Sebastian Frias Please change the subject to something like "net: ethernet: nb8800: support fixed-link DT node" and add

[PATCH v4] net: ethernet: nb8800: support fixed-link DT node

2016-02-05 Thread Sebastian Frias
Properly handles the case where the PHY is not connected to the real MDIO bus Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet

Re: [PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-05 Thread Sebastian Frias
On 02/05/2016 03:34 PM, Måns Rullgård wrote: Sebastian Frias writes: Signed-off-by: Sebastian Frias Please change the subject to something like "net: ethernet: nb8800: support fixed-link DT node" and add a comment body. The subject is pretty explicit for such a simple patch,

[PATCH v3] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-05 Thread Sebastian Frias
Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index ecc4a33..e1fb071 100644 --- a/drivers/net/ethernet

Re: [PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver

2016-02-05 Thread Sebastian Frias
On 02/05/2016 02:58 PM, Måns Rullgård wrote: Sebastian Frias writes: Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet

[PATCH] net: ethernet: support "fixed-link" DT node on nb8800 driver

2016-02-05 Thread Sebastian Frias
Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index ecc4a33..1353fee 100644 --- a/drivers/net

[PATCH v2] net: ethernet: support "fixed-link" DT key/node on nb8800 driver

2016-02-05 Thread Sebastian Frias
Signed-off-by: Sebastian Frias --- drivers/net/ethernet/aurora/nb8800.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c index ecc4a33..dd7bedc 100644 --- a/drivers/net/ethernet