netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 8139too: send NETDEV_CHANGE manually when autoneg is disabled
@ 2013-03-06 19:06 Veaceslav Falico
  2013-03-06 20:22 ` Ben Hutchings
  0 siblings, 1 reply; 12+ messages in thread
From: Veaceslav Falico @ 2013-03-06 19:06 UTC (permalink / raw)
  To: netdev; +Cc: wfp5p, jasowang, junchangwang, greearb, ivecera

When setting autoneg off (with any additional parameters, like
speed/duplex), 8139too doesn't do an interface reset, and thus doesn't
notify anyone that its speed/duplex might have changed (bonding and bridge
will not see the speed changes, per example).

Verify if we've force_media and send notification manually, so that the
listeners have a chance to see the changes. It's quite ugly, however I
don't see anything better.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
---
 drivers/net/ethernet/realtek/8139too.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/realtek/8139too.c b/drivers/net/ethernet/realtek/8139too.c
index 1276ac7..96ee18c 100644
--- a/drivers/net/ethernet/realtek/8139too.c
+++ b/drivers/net/ethernet/realtek/8139too.c
@@ -2393,6 +2393,11 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 	spin_lock_irq(&tp->lock);
 	rc = mii_ethtool_sset(&tp->mii, cmd);
 	spin_unlock_irq(&tp->lock);
+	/*
+	 * we don't restart on autoneg off, so notify manually
+	 */
+	if (tp->mii.force_media)
+		call_netdevice_notifiers(NETDEV_CHANGE, dev);
 	return rc;
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-03-11 21:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-06 19:06 [PATCH] 8139too: send NETDEV_CHANGE manually when autoneg is disabled Veaceslav Falico
2013-03-06 20:22 ` Ben Hutchings
2013-03-06 20:53   ` David Miller
2013-03-06 21:35     ` Francois Romieu
2013-03-07 10:27     ` Veaceslav Falico
2013-03-07 15:52       ` Ben Hutchings
2013-03-07 16:35         ` Veaceslav Falico
2013-03-07 16:54           ` Ben Hutchings
2013-03-07 18:38             ` Veaceslav Falico
2013-03-07 19:10               ` Ben Hutchings
2013-03-11 17:58                 ` Veaceslav Falico
2013-03-11 21:31                   ` Ben Hutchings

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).