netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: netdev@vger.kernel.org
Cc: ben@decadent.org.uk
Subject: [PATCH 1/6] alx: treat flow control correctly in alx_set_pauseparam()
Date: Fri, 21 Jun 2013 00:14:49 +0200	[thread overview]
Message-ID: <1371766494-18979-2-git-send-email-johannes@sipsolutions.net> (raw)
In-Reply-To: <1371766494-18979-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-20 22:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 22:14 [PATCH 0/6] alx: small fixes and cleanups Johannes Berg
2013-06-20 22:14 ` Johannes Berg [this message]
2013-06-20 22:14 ` [PATCH 2/6] alx: fix 100mbit/full duplex speed translation Johannes Berg
2013-06-20 22:14 ` [PATCH 3/6] alx: make sizes unsigned Johannes Berg
2013-06-20 22:14 ` [PATCH 4/6] alx: separate link speed/duplex fields Johannes Berg
2013-06-21 12:37   ` Ben Hutchings
2013-06-21 20:43     ` Johannes Berg
2013-06-20 22:14 ` [PATCH 5/6] alx: fix MAC address alignment problem Johannes Berg
2013-06-21  8:38   ` David Laight
2013-06-21  8:43     ` Johannes Berg
2013-06-20 22:14 ` [PATCH 6/6] alx: fix ethtool support code Johannes Berg
2013-06-21 12:39   ` Ben Hutchings
2013-06-21 20:46     ` 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=1371766494-18979-2-git-send-email-johannes@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ben@decadent.org.uk \
    --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).