[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fd2afea-ab43-14bf-f787-dc159a9cae50@maxlinear.com>
Date: Thu, 3 Jun 2021 10:36:04 +0000
From: Liang Xu <lxu@...linear.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
CC: "andrew@...n.ch" <andrew@...n.ch>,
"hkallweit1@...il.com" <hkallweit1@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"vee.khee.wong@...ux.intel.com" <vee.khee.wong@...ux.intel.com>,
Hauke Mehrtens <hmehrtens@...linear.com>,
Thomas Mohren <tmohren@...linear.com>
Subject: Re: [PATCH v2] net: phy: add Maxlinear GPY115/21x/24x driver
> > +static int gpy_config_aneg(struct phy_device *phydev)
> > +{
> > + bool changed = false;
> > + u32 adv;
> > + int ret;
> > +
> > + if (phydev->autoneg == AUTONEG_DISABLE) {
> > + return phydev->duplex != DUPLEX_FULL
> > + ? genphy_setup_forced(phydev)
> > + : genphy_c45_pma_setup_forced(phydev);
>
> I think this needs a comment to describe what is going on here to
> explain why the duplex setting influences whether we program the PHY
> via C22 or C45.
>
Thank you for review.
We support half/full duplex for 10/100/1000 and full duplex only for 2500.
genphy_c45_pma_setup_forced supports full duplex only.
So in half duplex, I use genphy_setup_forced.
Is there recommended way to handle this situation?
Or I should keep this code and put a comment.
Powered by blists - more mailing lists