linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Michael Walle <michael@walle.cc>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Alex Marginean <alexandru.marginean@nxp.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Heiko Thiery <heiko.thiery@gmail.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next v6 0/4] net: enetc: remove bootloader dependency
Date: Sat, 11 Jul 2020 10:52:42 +0300	[thread overview]
Message-ID: <20200711075242.dl72ymyyby6ivsk2@skbuf> (raw)
In-Reply-To: <20200709213526.21972-1-michael@walle.cc>

On Thu, Jul 09, 2020 at 11:35:22PM +0200, Michael Walle wrote:
> This is a resend [now a new v6] of the series because the conversion to the
> phylink interface will likely take longer:
> https://lore.kernel.org/netdev/CA+h21hpBodyY8CtNH2ktRdc2FqPi=Fjp94=VVZvzSVbnvnfKVg@mail.gmail.com/
> Also the discussion in the v3 resend doesn't look like it will be resolved
> soon :/
> https://lore.kernel.org/netdev/20200701213433.9217-1-michael@walle.cc/
> 
> Unfortunately, we have boards in the wild with a bootloader which doesn't
> set the PCS up correctly. Thus I'd really see this patches picked up as an
> intermediate step until the phylink conversion is ready. Vladimir Oltean
> already offered to convert enetc to phylink when he converts the felix to
> phylink. After this series the PCS setup of the enetc looks almost the same
> as the current felix setup. Thus conversion should be easy.
> 
> These patches were picked from the following series:
> https://lore.kernel.org/netdev/1567779344-30965-1-git-send-email-claudiu.manoil@nxp.com/
> They have never been resent. I've picked them up, addressed Andrews
> comments, fixed some more bugs and asked Claudiu if I can keep their SOB
> tags; he agreed. I've tested this on our board which happens to have a
> bootloader which doesn't do the enetc setup in all cases. Though, only
> SGMII mode was tested.
> 
> changes since v5:
>  - fixed pcs->autoneg_complete and pcs->link assignment. Thanks Vladimir.
> 
> changes since v4:
>  - moved (and renamed) the USXGMII constants to include/uapi/linux/mdio.h.
>    Suggested by Russell King.
> 
> changes since v3:
>  - rebased to latest net-next where devm_mdiobus_free() was removed.
>    replace it by mdiobus_free(). The internal MDIO bus is optional, if
>    there is any error, we try to run with the bootloader default PCS
>    settings, thus in the error case, we need to free the mdiobus.
> 
> changes since v2:
>  - removed SOBs from "net: enetc: Initialize SerDes for SGMII and USXGMII
>    protocols" because almost everything has changed.
>  - get a phy_device for the internal PCS PHY so we can use the phy_
>    functions instead of raw mdiobus writes
>  - reuse macros already defined in fsl_mdio.h, move missing bits from
>    felix to fsl_mdio.h, because they share the same PCS PHY building
>    block
>  - added 2500BaseX mode (based on felix init routine)
>  - changed xgmii mode to usxgmii mode, because it is actually USXGMII and
>    felix does the same.
>  - fixed devad, which is 0x1f (MMD_VEND2)
> 
> changes since v1:
>  - mdiobus id is '"imdio-%s", dev_name(dev)' because the plain dev_name()
>    is used by the emdio.
>  - use mdiobus_write() instead of imdio->write(imdio, ..), since this is
>    already a full featured mdiobus
>  - set phy_mask to ~0 to avoid scanning the bus
>  - use phy_interface_mode_is_rgmii(phy_mode) to also include the RGMII
>    modes with pad delays.
>  - move enetc_imdio_init() to enetc_pf.c, there shouldn't be any other
>    users, should it?
>  - renamed serdes to SerDes
>  - printing the error code of mdiobus_register() in the error path
>  - call mdiobus_unregister() on _remove()
>  - call devm_mdiobus_free() if mdiobus_register() fails, since an
>    error is not fatal
> 
> Alex Marginean (1):
>   net: enetc: Use DT protocol information to set up the ports
> 
> Michael Walle (3):
>   net: phy: add USXGMII link partner ability constants
>   net: dsa: felix: (re)use already existing constants
>   net: enetc: Initialize SerDes for SGMII and USXGMII protocols
> 
>  drivers/net/dsa/ocelot/felix_vsc9959.c        |  45 ++---
>  .../net/ethernet/freescale/enetc/enetc_hw.h   |   3 +
>  .../net/ethernet/freescale/enetc/enetc_pf.c   | 188 +++++++++++++++---
>  .../net/ethernet/freescale/enetc/enetc_pf.h   |   5 +
>  include/uapi/linux/mdio.h                     |  26 +++
>  5 files changed, 210 insertions(+), 57 deletions(-)
> 
> -- 
> 2.20.1
> 

I plan to give this series a go on an LS1028A-QDS later today to make
sure there are no regressions.

Thanks,
-Vladimir

      parent reply	other threads:[~2020-07-11  7:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 21:35 [PATCH net-next v6 0/4] net: enetc: remove bootloader dependency Michael Walle
2020-07-09 21:35 ` [PATCH net-next v6 1/4] net: phy: add USXGMII link partner ability constants Michael Walle
2020-07-13 16:34   ` Vladimir Oltean
2020-07-13 17:01     ` Andrew Lunn
2020-07-13 17:07       ` Michael Walle
2020-07-13 18:16   ` Russell King - ARM Linux admin
2020-07-13 18:23   ` Russell King - ARM Linux admin
2020-07-13 18:37     ` Michael Walle
2020-07-15 20:33       ` Michael Walle
2020-07-15 22:44         ` Vladimir Oltean
2020-07-16  7:49           ` Michael Walle
2020-07-09 21:35 ` [PATCH net-next v6 2/4] net: dsa: felix: (re)use already existing constants Michael Walle
2020-07-13 16:33   ` Vladimir Oltean
2020-07-09 21:35 ` [PATCH net-next v6 3/4] net: enetc: Initialize SerDes for SGMII and USXGMII protocols Michael Walle
2020-07-13 16:38   ` Vladimir Oltean
2020-07-09 21:35 ` [PATCH net-next v6 4/4] net: enetc: Use DT protocol information to set up the ports Michael Walle
2020-07-13 16:39   ` Vladimir Oltean
2020-07-11  7:52 ` Vladimir Oltean [this message]

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=20200711075242.dl72ymyyby6ivsk2@skbuf \
    --to=olteanv@gmail.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandru.marginean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=heiko.thiery@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael@walle.cc \
    --cc=netdev@vger.kernel.org \
    /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).