netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [RFC PATCH v2 linux-next 13/14] net: dsa: sja1105: expose the SGMII PCS as an mdio_device
Date: Wed, 26 May 2021 16:46:41 +0100	[thread overview]
Message-ID: <20210526154641.GJ30436@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210526154102.dlp2clwqncadna2v@skbuf>

On Wed, May 26, 2021 at 06:41:02PM +0300, Vladimir Oltean wrote:
> On Wed, May 26, 2021 at 04:29:11PM +0100, Russell King (Oracle) wrote:
> > On Wed, May 26, 2021 at 04:55:34PM +0300, Vladimir Oltean wrote:
> > > Since we touch all PCS accessors again, now it is a good time to check
> > > for error codes from the hardware access as well. We can't propagate the
> > > errors very far due to phylink returning void for mac_config and
> > > mac_link_up, but at least we print them to the console.
> > 
> > phylink doesn't have much option on what it could do if we error out at
> > those points - I suppose we could print a non-specific error and then
> > lock-out the interface in a similar way that phylib does, but to me that
> > seems really unfriendly if you're remotely accessing a box and the error
> > is intermittent.
> 
> I would like to have intermittent errors at this level logged, because
> to me they would be quite unexpected and I would like to have some rope
> to pull while debugging - an error code, something.
> 
> If there's an error of any sort, the interface won't be fully
> initialized anyway, so not functional.
> 
> The reason why I added error checking in this patch is because I was
> working on the MDIO bus accessors and I wanted to make sure that the
> errors returned there are propagated somewhere.

Yes, makes sense there, but doesn't make sense if one is using the MMIO
accessors and have no errors to check...

My argument is - if you print an error at the lower levels, you can be
more specific about what failed. If you do it in phylink, you can only
say "oh, the blah_config() call failed" - which isn't particularly
useful.

Yes, we do this for some of the newly introduced methods, e.g. the
pcs_config() method - and there all we can say is:

                if (err < 0)
                        phylink_err(pl, "pcs_config failed: %pe\n",
                                    ERR_PTR(err));

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-05-26 15:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 13:55 [RFC PATCH v2 linux-next 00/14] Add NXP SJA1110 support to the sja1105 DSA driver Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 01/14] net: dsa: sja1105: be compatible with "ethernet-ports" OF node name Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 02/14] net: dsa: sja1105: allow SGMII PCS configuration to be per port Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 03/14] net: dsa: sja1105: the 0x1F0000 SGMII "base address" is actually MDIO_MMD_VEND2 Vladimir Oltean
2021-05-26 15:24   ` Russell King (Oracle)
2021-05-26 15:34     ` Vladimir Oltean
2021-05-26 15:42       ` Russell King (Oracle)
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 04/14] net: dsa: sja1105: cache the phy-mode port property Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 05/14] net: dsa: sja1105: add a PHY interface type compatibility matrix Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 06/14] net: dsa: sja1105: add a translation table for port speeds Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 07/14] net: dsa: sja1105: always keep RGMII ports in the MAC role Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 08/14] net: dsa: sja1105: some table entries are always present when read dynamically Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 09/14] dt-bindings: net: dsa: sja1105: convert to YAML schema Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 10/14] dt-bindings: net: dsa: sja1105: add SJA1110 bindings Vladimir Oltean
2021-05-26 14:19   ` Rob Herring
2021-05-26 14:25     ` Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 11/14] net: dsa: sja1105: add support for the SJA1110 switch family Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 12/14] net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 13/14] net: dsa: sja1105: expose the SGMII PCS as an mdio_device Vladimir Oltean
2021-05-26 15:29   ` Russell King (Oracle)
2021-05-26 15:41     ` Vladimir Oltean
2021-05-26 15:46       ` Russell King (Oracle) [this message]
2021-05-26 21:26         ` Vladimir Oltean
2021-05-26 13:55 ` [RFC PATCH v2 linux-next 14/14] net: dsa: sja1105: add support for the SJA1110 SGMII/2500base-x PCS Vladimir Oltean

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=20210526154641.GJ30436@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /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).