netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: netdev@vger.kernel.org
Subject: [PATCH v2 1/7] alx: treat flow control correctly in alx_set_pauseparam()
Date: Tue, 25 Jun 2013 20:38:17 +0200	[thread overview]
Message-ID: <1372185503-24705-2-git-send-email-johannes@sipsolutions.net> (raw)
In-Reply-To: <1372185503-24705-1-git-send-email-johannes@sipsolutions.net>

Even when alx_setup_speed_duplex() is called, we still
need to call alx_cfg_mac_flowcontrol() and set hw->flowctrl
if flow control changed.

This was a bug I accidentally introduced while simplifying
the original driver.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 drivers/net/ethernet/atheros/alx/ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/alx/ethtool.c b/drivers/net/ethernet/atheros/alx/ethtool.c
index 6fa2aec..50a91d0 100644
--- a/drivers/net/ethernet/atheros/alx/ethtool.c
+++ b/drivers/net/ethernet/atheros/alx/ethtool.c
@@ -187,7 +187,8 @@ static int alx_set_pauseparam(struct net_device *netdev,
 
 	if (reconfig_phy) {
 		err = alx_setup_speed_duplex(hw, hw->adv_cfg, fc);
-		return err;
+		if (err)
+			return err;
 	}
 
 	/* flow control on mac */
-- 
1.8.0

  reply	other threads:[~2013-06-25 18:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 18:38 [PATCH v2 0/7] alx: small fixes/cleanups Johannes Berg
2013-06-25 18:38 ` Johannes Berg [this message]
2013-06-25 18:38 ` [PATCH v2 2/7] alx: fix 100mbit/full duplex speed translation Johannes Berg
2013-06-25 19:32   ` Joe Perches
2013-06-25 18:38 ` [PATCH v2 3/7] alx: remove NET_CORE Kconfig select Johannes Berg
2013-06-25 18:38 ` [PATCH v2 4/7] alx: make sizes unsigned Johannes Berg
2013-06-25 18:38 ` [PATCH v2 5/7] alx: separate link speed/duplex fields Johannes Berg
2013-06-25 18:38 ` [PATCH v2 6/7] alx: fix MAC address alignment problem Johannes Berg
2013-06-25 18:38 ` [PATCH v2 7/7] alx: fix ethtool support code Johannes Berg
2013-06-25 21:01 ` [PATCH v2 0/7] alx: small fixes/cleanups Johannes Stezenbach
2013-06-29 17:20   ` Johannes Berg
2013-06-29 18:56     ` Johannes Stezenbach
2013-06-26  0:11 ` David Miller
2013-06-29 16:53   ` Johannes Berg

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=1372185503-24705-2-git-send-email-johannes@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.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).