public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Kazunori Kobayashi <kkobayas@igel.co.jp>
To: netdev@vger.kernel.org
Cc: steve.glendinning@smsc.com, dhobsong@igel.co.jp,
	Kazunori Kobayashi <kkobayas@igel.co.jp>
Subject: [PATCH] smsc911x: Enable flow control advertisement
Date: Wed, 19 Oct 2011 18:21:54 +0900	[thread overview]
Message-ID: <1319016114-4781-1-git-send-email-kkobayas@igel.co.jp> (raw)

Enable the advertisement of both symmetric pause and asymmetric pause 
flow control capability. 

Signed-off-by: Kazunori Kobayashi <kkobayas@igel.co.jp>
---
 drivers/net/smsc911x.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index b9016a3..60c3bc2 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -800,8 +800,13 @@ static void smsc911x_phy_update_flowcontrol(struct smsc911x_data *pdata)
 	struct phy_device *phy_dev = pdata->phy_dev;
 	u32 afc = smsc911x_reg_read(pdata, AFC_CFG);
 	u32 flow;
+	u16 miiadv = smsc911x_mii_read(phy_dev->bus, phy_dev->addr,
+				       MII_ADVERTISE);
 	unsigned long flags;
 
+	miiadv |= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
+	smsc911x_mii_write(phy_dev->bus, phy_dev->addr, MII_ADVERTISE, miiadv);
+
 	if (phy_dev->duplex == DUPLEX_FULL) {
 		u16 lcladv = phy_read(phy_dev, MII_ADVERTISE);
 		u16 rmtadv = phy_read(phy_dev, MII_LPA);
-- 
1.7.0.4

             reply	other threads:[~2011-10-19  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  9:21 Kazunori Kobayashi [this message]
2011-10-19 12:26 ` [PATCH] smsc911x: Enable flow control advertisement Ben Hutchings
2011-10-25  8:20   ` Kazunori Kobayashi

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=1319016114-4781-1-git-send-email-kkobayas@igel.co.jp \
    --to=kkobayas@igel.co.jp \
    --cc=dhobsong@igel.co.jp \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@smsc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox