netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org, gabriel.fernandez@linaro.org,
	fschaefer.oss@googlemail.com, dinh.linux@gmail.com,
	davem@davemloft.net, preid@electromag.com.au
Subject: Re: [PATCHv3 (net.git) 2/2] stmmac: fix MDIO settings
Date: Tue, 15 Mar 2016 01:54:14 +0100	[thread overview]
Message-ID: <56E75D36.2030201@suse.de> (raw)
In-Reply-To: <1457703196-15008-3-git-send-email-peppe.cavallaro@st.com>

Hi Peppe,

Am 11.03.2016 um 14:33 schrieb Giuseppe Cavallaro:
> Initially the phy_bus_name was added to manipulate the
> driver name but It was recently just used to manage the

"it"

> fixed-link and then to take some decision at run-time
> inside the main (for example to skip EEE).

Word missing after "main"? ("function"?)

> So the patch uses the is_pseudo_fixed_link and removes
> removes the phy_bus_name variable not necessary anymore.

Duplicate "removes".

> 
> The driver can manage the mdio registration by using phy-handle,
> dwmac-mdio and own parameter e.g. snps,phy-addr.
> This patch takes care about all these possible configurations
> and fixes the mdio registration in case of there is a real
> transceiver or a switch (that needs to be managed by using
> fixed-link).
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
> Cc: Gabriel Fernandez <gabriel.fernandez@linaro.org>
> Cc: Dinh Nguyen <dinh.linux@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Phil Reid <preid@electromag.com.au>
> ---
> 
> V2: use is_pseudo_fixed_link
> V3: parse device-tree driver parameters to allocate PHY resources considering
>     DSA case (+ fixed-link).

For next-20160314 I needed "i2c: immediately mark ourselves as
registered" plus this build fix:

--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -866,9 +866,8 @@ static int stmmac_init_phy(struct net_device *dev)
        }

        /* If attached to a switch, there is no reason to poll phy
handler */
-       if (priv->plat->phy_bus_name)
-               if (!strcmp(priv->plat->phy_bus_name, "fixed"))
-                       phydev->irq = PHY_IGNORE_INTERRUPT;
+       if (phydev->is_pseudo_fixed_link)
+               phydev->irq = PHY_IGNORE_INTERRUPT;

        pr_debug("stmmac_init_phy:  %s: attached to PHY (UID 0x%x)"
                 " Link = %d\n", dev->name, phydev->phy_id, phydev->link);

It then fixes the PHY error on GeekBox, so for this mini-series:

Tested-by: Andreas Färber <afaerber@suse.de>


The connectivity issue still remains. Kernel log snippet:

[  +0.001117] rk_gmac-dwmac ff290000.ethernet: Looking up phy-supply
from device tree
[  +0.000028] rk808 0-001b: Looking up vcc12-supply from device tree
[  +0.000014] vcc_lan: supplied by vcc_io
[  +0.000101] rk_gmac-dwmac ff290000.ethernet: clock input or output?
(input).
[  +0.000009] rk_gmac-dwmac ff290000.ethernet: TX delay(0x30).
[  +0.000008] rk_gmac-dwmac ff290000.ethernet: RX delay(0x10).
[  +0.000014] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[  +0.000104] rk_gmac-dwmac ff290000.ethernet: clock input from PHY
[  +0.005063] rk_gmac-dwmac ff290000.ethernet: no reset control found
[  +0.000007] stmmac - user ID: 0x10, Synopsys ID: 0x35
[  +0.000002]  Ring mode enabled
[  +0.000006]  DMA HW capability register supported
[  +0.000000]  Normal descriptors
[  +0.000003]  RX Checksum Offload Engine supported (type 2)
[  +0.000002]  TX Checksum insertion supported
[  +0.000002]  Wake-Up On Lan supported
[  +0.000053]  Enable RX Mitigation via HW Watchdog Timer
[  +0.000771] of_get_named_gpiod_flags: can't parse 'snps,reset-gpio'
property of node '/ethernet@ff290000[0]'
[  +0.004250] libphy: stmmac: probed
[  +0.000009] eth0: PHY ID 001cc915 at 0 IRQ POLL (stmmac-0:00) active
[  +0.000005] eth0: PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)

As before, reverting "stmmac: first frame prep at the end of xmit
routine" fixes it. My test cases are `ping 192.168.1.1` and `zypper up`.

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)

  parent reply	other threads:[~2016-03-15  0:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 13:33 [PATCHv3 (net.git) 0/2] stmmac: MDIO fixes Giuseppe Cavallaro
2016-03-11 13:33 ` [PATCH v3(linux-sti-3.10)(net.git) 1/2] Revert "stmmac: Fix 'eth0: No PHY found' regression" Giuseppe Cavallaro
2016-03-11 13:33 ` [PATCHv3 (net.git) 2/2] stmmac: fix MDIO settings Giuseppe Cavallaro
2016-03-11 15:14   ` Phil Reid
2016-03-11 15:32     ` Giuseppe CAVALLARO
2016-03-14  0:50       ` Phil Reid
2016-03-12 10:50   ` Frank Schäfer
2016-03-14  9:14   ` Gabriel Fernandez
2016-03-14  9:28     ` Giuseppe CAVALLARO
2016-03-15  0:54   ` Andreas Färber [this message]
2016-03-15 15:53     ` Giuseppe CAVALLARO
2016-03-16  9:47       ` Andreas Färber
2016-03-16 10:18         ` Giuseppe CAVALLARO

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E75D36.2030201@suse.de \
    --to=afaerber@suse.de \
    --cc=davem@davemloft.net \
    --cc=dinh.linux@gmail.com \
    --cc=fschaefer.oss@googlemail.com \
    --cc=gabriel.fernandez@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=preid@electromag.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).