lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Oct 2011 18:21:54 +0900
From:	Kazunori Kobayashi <kkobayas@...l.co.jp>
To:	netdev@...r.kernel.org
Cc:	steve.glendinning@...c.com, dhobsong@...l.co.jp,
	Kazunori Kobayashi <kkobayas@...l.co.jp>
Subject: [PATCH] smsc911x: Enable flow control advertisement

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

Signed-off-by: Kazunori Kobayashi <kkobayas@...l.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ