From: "Marek Behún" <kabel@kernel.org>
To: netdev@vger.kernel.org
Cc: pavana.sharma@digi.com, vivien.didelot@gmail.com,
f.fainelli@gmail.com, kuba@kernel.org, lkp@intel.com,
davem@davemloft.net, ashkan.boldaji@digi.com, andrew@lunn.ch,
Chris Packham <chris.packham@alliedtelesis.co.nz>,
olteanv@gmail.com,
Russell King - ARM Linux admin <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v15 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell
Date: Tue, 12 Jan 2021 23:36:58 +0100 [thread overview]
Message-ID: <20210112233658.4c938348@kernel.org> (raw)
In-Reply-To: <20210112195405.12890-6-kabel@kernel.org>
On Tue, 12 Jan 2021 20:54:04 +0100
Marek Behún <kabel@kernel.org> wrote:
> + /* mv88e6393x family errata 3.7 :
> + * When changing cmode on SERDES port from any other mode to 1000BASE-X
> + * mode the link may not come up due to invalid 1000BASE-X
> + * advertisement.
> + * Workaround: Correct advertisement and reset PHY core.
> + */
> + if (cmode == MV88E6XXX_PORT_STS_CMODE_1000BASEX) {
> + reg = MV88E6390_SGMII_ANAR_1000BASEX_FD;
> + err = mv88e6390_serdes_write(chip, lane, MDIO_MMD_PHYXS,
> + MV88E6390_SGMII_ANAR, reg);
> + if (err)
> + return err;
> +
> + /* soft reset the PCS/PMA */
> + err = mv88e6390_serdes_read(chip, lane, MDIO_MMD_PHYXS,
> + MV88E6390_SGMII_CONTROL, ®);
> + if (err)
> + return err;
> +
> + reg |= MV88E6390_SGMII_CONTROL_RESET;
> + err = mv88e6390_serdes_write(chip, lane, MDIO_MMD_PHYXS,
> + MV88E6390_SGMII_CONTROL, reg);
> + if (err)
> + return err;
It would seem that this is already done in
mv88e6390_serdes_pcs_config, just without the last reset.
> +#define MV88E6390_SGMII_STATUS_AN_ABLE BIT(3)
> +#define MV88E6390_SGMII_ANAR 0x2004
> +#define MV88E6390_SGMII_ANAR_1000BASEX_FD BIT(5)
> +#define MV88E6390_SGMII_CONTROL 0x2000
This register is already called MV88E6390_SGMII_BMCR and the bits are
defined as BMCR_* macros. Thse same for MV88E6390_SGMII_STATUS and
MV88E6390_SGMII_ANAR.
> +#define MV88E6390_SGMII_CONTROL_RESET BIT(15)
> +#define MV88E6390_SGMII_CONTROL_LOOPBACK BIT(14)
> +#define MV88E6390_SGMII_CONTROL_PDOWN BIT(11)
> +#define MV88E6390_SGMII_STATUS 0x2001
I shall fix this in another version.
next prev parent reply other threads:[~2021-01-12 22:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 19:53 [PATCH net-next v15 0/6] Add support for mv88e6393x family of Marvell Marek Behún
2021-01-12 19:54 ` [PATCH net-next v15 1/6] dt-bindings: net: Add 5GBASER phy interface Marek Behún
2021-01-12 19:55 ` Florian Fainelli
2021-01-12 19:54 ` [PATCH net-next v15 2/6] net: phy: Add 5GBASER interface mode Marek Behún
2021-01-12 19:56 ` Florian Fainelli
2021-01-12 19:54 ` [PATCH net-next v15 3/6] net: dsa: mv88e6xxx: Change serdes lane parameter type from u8 type to int Marek Behún
2021-01-12 19:54 ` [PATCH net-next v15 4/6] net: dsa: mv88e6xxx: wrap .set_egress_port method Marek Behún
2021-01-12 20:25 ` Vladimir Oltean
2021-01-12 19:54 ` [PATCH net-next v15 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell Marek Behún
2021-01-12 20:38 ` Vladimir Oltean
2021-01-12 21:16 ` Marek Behún
2021-01-12 21:30 ` Vladimir Oltean
2021-01-12 21:44 ` Marek Behún
2021-01-12 22:36 ` Marek Behún [this message]
2021-01-12 19:54 ` [PATCH net-next v15 6/6] net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst Marek Behún
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=20210112233658.4c938348@kernel.org \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=ashkan.boldaji@digi.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pavana.sharma@digi.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).