All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang Xu <lxu@maxlinear.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"vee.khee.wong@linux.intel.com" <vee.khee.wong@linux.intel.com>,
	"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	Hauke Mehrtens <hmehrtens@maxlinear.com>,
	Thomas Mohren <tmohren@maxlinear.com>,
	"mohammad.athari.ismail@intel.com"
	<mohammad.athari.ismail@intel.com>
Subject: Re: [PATCH v4 2/2] net: phy: add Maxlinear GPY115/21x/24x driver
Date: Tue, 29 Jun 2021 16:05:33 +0000	[thread overview]
Message-ID: <6068f6ab-1521-48be-20a6-f8a30ad75d3f@maxlinear.com> (raw)
In-Reply-To: <YNs1F7pgNzDlm/mD@lunn.ch>

On 29/6/2021 10:58 pm, Andrew Lunn wrote:
> This email was sent from outside of MaxLinear.
>
>
>> +static int gpy_config_aneg(struct phy_device *phydev)
>> +{
>> +     bool changed = false;
>> +     u32 adv;
>> +     int ret;
>> +
>> +     if (phydev->autoneg == AUTONEG_DISABLE) {
>> +             /* Configure half duplex with genphy_setup_forced,
>> +              * because genphy_c45_pma_setup_forced does not support.
>> +              */
>> +             return phydev->duplex != DUPLEX_FULL
>> +                     ? genphy_setup_forced(phydev)
>> +                     : genphy_c45_pma_setup_forced(phydev);
>> +     }
>> +
>> +     ret = genphy_c45_an_config_aneg(phydev);
>> +     if (ret < 0)
>> +             return ret;
>> +     if (ret > 0)
>> +             changed = true;
>> +
>> +     adv = linkmode_adv_to_mii_ctrl1000_t(phydev->advertising);
>> +     ret = phy_modify_changed(phydev, MII_CTRL1000,
>> +                              ADVERTISE_1000FULL | ADVERTISE_1000HALF,
>> +                              adv);
>> +     if (ret < 0)
>> +             return ret;
>> +     if (ret > 0)
>> +             changed = true;
>> +
>> +     ret = genphy_c45_check_and_restart_aneg(phydev, changed);
>> +     if (ret < 0)
>> +             return ret;
>> +
>> +     if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
>> +         phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
>> +             return 0;
>> +
>> +     /* No need to trigger re-ANEG if SGMII link speed is 2.5G
>> +      * or SGMII ANEG is disabled.
>> +      */
> Is this correct. Are you using SGMII at 2.5G, or should this comment
> be 2500BaseX?
>
> Otherwise, this looks good now.
>
>     Andrew
>
Can I change to "if link speed is 2.5G"?



  reply	other threads:[~2021-06-29 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 14:29 [PATCH v4 1/2] net: phy: add API to read 802.3-c45 IDs Xu Liang
2021-06-28 14:29 ` [PATCH v4 2/2] net: phy: add Maxlinear GPY115/21x/24x driver Xu Liang
2021-06-29 14:58   ` Andrew Lunn
2021-06-29 16:05     ` Liang Xu [this message]
2021-06-28 16:22 ` [PATCH v4 1/2] net: phy: add API to read 802.3-c45 IDs kernel test robot
2021-06-28 16:22   ` kernel test robot
2021-06-28 21:14 ` kernel test robot
2021-06-28 21:14   ` kernel test robot

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=6068f6ab-1521-48be-20a6-f8a30ad75d3f@maxlinear.com \
    --to=lxu@maxlinear.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=hmehrtens@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mohammad.athari.ismail@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tmohren@maxlinear.com \
    --cc=vee.khee.wong@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.