RE: [PATCH net-next v6 1/1] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

From: Michal Smulski
Date: Sat Jun 03 2023 - 00:59:34 EST


I do not know if there is a an_complete bit as per my previous email. I think for now I will set state->an_complete = state->link.
Michal

-----Original Message-----
From: Russell King <linux@xxxxxxxxxxxxxxx>
Sent: Friday, June 2, 2023 4:08 AM
To: msmulski2@xxxxxxxxx
Cc: andrew@xxxxxxx; f.fainelli@xxxxxxxxx; olteanv@xxxxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; simon.horman@xxxxxxxxxxxx; kabel@xxxxxxxxxx; Michal Smulski <michal.smulski@xxxxxxxx>
Subject: Re: [PATCH net-next v6 1/1] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

CAUTION: This email is originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


On Thu, Jun 01, 2023 at 05:17:04PM -0700, msmulski2@xxxxxxxxx wrote:
> +static int mv88e639x_serdes_pcs_get_state_usxgmii(struct mv88e6xxx_chip *chip,
> + int port, int lane,
> + struct
> +phylink_link_state *state) {
> + u16 status, lp_status;
> + int err;
> +
> + err = mv88e6390_serdes_read(chip, lane, MDIO_MMD_PHYXS,
> + MV88E6390_USXGMII_PHY_STATUS, &status);
> + if (err) {
> + dev_err(chip->dev, "can't read Serdes USXGMII PHY status: %d\n", err);
> + return err;
> + }
> + dev_dbg(chip->dev, "USXGMII PHY status: 0x%x\n", status);
> +
> + state->link = !!(status & MDIO_USXGMII_LINK);

Another thing which is missing is filling in state->an_complete. Does the PHY have a status bit for this when operating in USXGMII mode?
If not, please set it to state->link.

Thanks.

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