2024-01-30 09:21:02

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: [PATCH v5 net-next 09/13] net: phy: marvell-88q2xxx: add cable test support

On Mon, Jan 22, 2024 at 10:28:42PM +0100, Dimitri Fedrau wrote:
> +static int mv88q222x_cable_test_get_status(struct phy_device *phydev,
> + bool *finished)
> +{
> + int ret;
> + u32 dist;
> +
> + ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_MMD_PCS_MV_TDR_STATUS);
> + if (ret < 0)
> + return ret;
> +
> + *finished = true;
> + /* fault length in meters */
> + dist = ((ret & MDIO_MMD_PCS_MV_TDR_STATUS_DIST_MASK) >>
> + MDIO_MMD_PCS_MV_TDR_STATUS_DIST_SHIFT) * 100;

dist = FIELD_GET(MDIO_MMD_PCS_MV_TDR_STATUS_DIST_MASK, ret) * 100;


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


2024-01-31 12:03:27

by Dimitri Fedrau

[permalink] [raw]
Subject: Re: [PATCH v5 net-next 09/13] net: phy: marvell-88q2xxx: add cable test support

Am Tue, Jan 30, 2024 at 09:19:30AM +0000 schrieb Russell King (Oracle):
> On Mon, Jan 22, 2024 at 10:28:42PM +0100, Dimitri Fedrau wrote:
> > +static int mv88q222x_cable_test_get_status(struct phy_device *phydev,
> > + bool *finished)
> > +{
> > + int ret;
> > + u32 dist;
> > +
> > + ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MDIO_MMD_PCS_MV_TDR_STATUS);
> > + if (ret < 0)
> > + return ret;
> > +
> > + *finished = true;
> > + /* fault length in meters */
> > + dist = ((ret & MDIO_MMD_PCS_MV_TDR_STATUS_DIST_MASK) >>
> > + MDIO_MMD_PCS_MV_TDR_STATUS_DIST_SHIFT) * 100;
>
> dist = FIELD_GET(MDIO_MMD_PCS_MV_TDR_STATUS_DIST_MASK, ret) * 100;
>
Hi Russell,

sure can fix it. Did you have a chance to review the other patches ? Is
there anything I could do to ease the review process ? I'm new to
submitting patches, maybe I crossed some line without knowing ? Would be
glad to get some feedback. I'm just asking because there was not much
feedback besides your comments.

Best regards,
Dimitri