Netdev List
 help / color / mirror / Atom feed
From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
	<kuba@kernel.org>, <linux-kernel@vger.kernel.org>,
	<andrew@lunn.ch>, <Jose.Abreu@synopsys.com>,
	<fancer.lancer@gmail.com>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next V1] net: pcs: xpcs: Add 2500BASE-X case in get state for XPCS drivers
Date: Thu, 26 Oct 2023 15:44:40 +0530	[thread overview]
Message-ID: <ZTo8EL7JhmqY56J0@HYD-DK-UNGSW21> (raw)
In-Reply-To: <ZToq3n26jDqiueTB@shell.armlinux.org.uk>

Hi Russell King,

Thank you for review the patch.

The 10/26/2023 10:01, Russell King (Oracle) wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Thu, Oct 26, 2023 at 11:13:05AM +0530, Raju Lakkaraju wrote:
> > +     sts = xpcs_read(xpcs, MDIO_MMD_VEND2, DW_VR_MII_MMD_STS);
> > +
> > +     state->link = !!(sts & DW_VR_MII_MMD_STS_LINK_STS);
> > +     if (!state->link) {
> > +             state->speed = SPEED_UNKNOWN;
> > +             state->pause = MLO_PAUSE_NONE;
> > +             state->duplex = DUPLEX_UNKNOWN;
> > +             return 0;
> > +     }
> 
> You don't need this. If autoneg is enabled then these are initialised
> prior to calling this by phylink using:
> 
>                 state->speed = SPEED_UNKNOWN;
>                 state->duplex = DUPLEX_UNKNOWN;
>                 state->pause = MLO_PAUSE_NONE;
> 

Ok. I will remove the change.

Thanks,
Raju

> or if not using autoneg:
> 
>                 state->speed =  pl->link_config.speed;
>                 state->duplex = pl->link_config.duplex;
>                 state->pause = pl->link_config.pause;
> 
> so you don't need to touch them if the link is down.
> 
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

-- 
--------                                                                        
Thanks,                                                                         
Raju

  reply	other threads:[~2023-10-26 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26  5:43 [PATCH net-next V1] net: pcs: xpcs: Add 2500BASE-X case in get state for XPCS drivers Raju Lakkaraju
2023-10-26  9:01 ` Russell King (Oracle)
2023-10-26 10:14   ` Raju Lakkaraju [this message]
2023-10-26  9:09 ` Russell King (Oracle)

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=ZTo8EL7JhmqY56J0@HYD-DK-UNGSW21 \
    --to=raju.lakkaraju@microchip.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=fancer.lancer@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    /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