linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ren <taoren@fb.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Arun Parameswaran" <arun.parameswaran@broadcom.com>,
	Justin Chen <justinpopo6@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S
Date: Fri, 2 Aug 2019 19:52:19 +0000	[thread overview]
Message-ID: <7e397b2a-b2bc-19e3-5104-a596e88e2a9a@fb.com> (raw)
In-Reply-To: <20190802145011.GH2099@lunn.ch>

On 8/2/19 7:50 AM, Andrew Lunn wrote:
>> +static int bcm54616s_read_status(struct phy_device *phydev)
>> +{
>> +	int err;
>> +
>> +	err = genphy_read_status(phydev);
>> +
>> +	/* 1000Base-X register set doesn't provide speed fields: the
>> +	 * link speed is always 1000 Mb/s as long as link is up.
>> +	 */
>> +	if (phydev->dev_flags & PHY_BCM_FLAGS_MODE_1000BX &&
>> +	    phydev->link)
>> +		phydev->speed = SPEED_1000;
>> +
>> +	return err;
>> +}
> 
> This function is equivalent to bcm5482_read_status(). You should use
> it, rather than add a new function.

Thank you for pointing it out. Will fix the code.

BTW, should I update the patch subject to something more descriptive (such as "net: phy: broadcom: fix BCM54616S read_status in 1000X mode")? Or I should use the same title to avoid confusion?


Thanks,

Tao

      reply	other threads:[~2019-08-02 19:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01 23:58 [PATCH net-next v2] net: phy: broadcom: add 1000Base-X support for BCM54616S Tao Ren
2019-08-02 14:50 ` Andrew Lunn
2019-08-02 19:52   ` Tao Ren [this message]

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=7e397b2a-b2bc-19e3-5104-a596e88e2a9a@fb.com \
    --to=taoren@fb.com \
    --cc=andrew@lunn.ch \
    --cc=arun.parameswaran@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=justinpopo6@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=openbmc@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).