From: Veaceslav Falico <vfalico@redhat.com>
To: netdev@vger.kernel.org
Cc: wfp5p@virginia.edu, jasowang@redhat.com, junchangwang@gmail.com,
greearb@candelatech.com, ivecera@redhat.com
Subject: [PATCH] 8139too: send NETDEV_CHANGE manually when autoneg is disabled
Date: Wed, 6 Mar 2013 20:06:24 +0100 [thread overview]
Message-ID: <1362596784-19443-1-git-send-email-vfalico@redhat.com> (raw)
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
next reply other threads:[~2013-03-06 19:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 19:06 Veaceslav Falico [this message]
2013-03-06 20:22 ` [PATCH] 8139too: send NETDEV_CHANGE manually when autoneg is disabled 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
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=1362596784-19443-1-git-send-email-vfalico@redhat.com \
--to=vfalico@redhat.com \
--cc=greearb@candelatech.com \
--cc=ivecera@redhat.com \
--cc=jasowang@redhat.com \
--cc=junchangwang@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=wfp5p@virginia.edu \
/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).