[PATCH net-next 0/2] qed*: Fix ethtool issues relating to link

STALE3653d

4 messages, 2 authors, 2016-08-19 · open the first message on its own page

[PATCH net-next 0/2] qed*: Fix ethtool issues relating to link

From: Yuval Mintz <hidden>
Date: 2016-08-19 05:35:07

This series addresses two issues that were introduced when adding
support for ethtool's link_ksettings support - the first fixes a
regression and second incorrect functionallity in the submission.

Although these are fixes, as the feature currently exists only in
'next-next' I'm aiming them for it.

Dave, please consider applying this series to 'net-next'.

Cheers,
Yuval

Yuval Mintz (2):
  qed*: Fix pause setting
  qed: Fix forcing high speeds

 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 6 +++---
 include/linux/qed/qed_if.h                      | 8 +++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

-- 
1.9.3

[PATCH net-next 1/2] qed*: Fix pause setting

From: Yuval Mintz <hidden>
Date: 2016-08-19 05:35:09

When moving into using ethtool's link_ksetting, qed started
supplying its own bitmask of speed/capabilities, but qede
is still checking for the SUPPORTED value to determine whether
it supports pause.

Fixes: 054c67d1c82a ("qed*: Add support for ethtool link_ksettings callbacks")
Signed-off-by: Yuval Mintz <redacted>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 2 +-
 include/linux/qed/qed_if.h                      | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index f0ab2fd..ef521e5 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -672,7 +672,7 @@ static int qede_set_pauseparam(struct net_device *dev,
 	memset(&params, 0, sizeof(params));
 	params.override_flags |= QED_LINK_OVERRIDE_PAUSE_CONFIG;
 	if (epause->autoneg) {
-		if (!(current_link.supported_caps & SUPPORTED_Autoneg)) {
+		if (!(current_link.supported_caps & QED_LM_Autoneg_BIT)) {
 			DP_INFO(edev, "autoneg not supported\n");
 			return -EINVAL;
 		}
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index 864265f..433e33a 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -314,9 +314,11 @@ struct qed_link_params {
 struct qed_link_output {
 	bool	link_up;
 
-	u32	supported_caps;         /* In SUPPORTED defs */
-	u32	advertised_caps;        /* In ADVERTISED defs */
-	u32	lp_caps;                /* In ADVERTISED defs */
+	/* In QED_LM_* defs */
+	u32	supported_caps;
+	u32	advertised_caps;
+	u32	lp_caps;
+
 	u32	speed;                  /* In Mb/s */
 	u8	duplex;                 /* In DUPLEX defs */
 	u8	port;                   /* In PORT defs */
-- 
1.9.3

[PATCH net-next 2/2] qede: Fix forcing high speeds

From: Yuval Mintz <hidden>
Date: 2016-08-19 05:35:17

While '0xdead' and '0xbeef' are "great" values, we should
use the correct SPEED_* values instead.

Fixes: 054c67d1c82a ("qed*: Add support for ethtool link_ksettings callbacks")
Signed-off-by: Yuval Mintz <redacted>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index ef521e5..c1a4c98 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -414,7 +414,7 @@ static int qede_set_link_ksettings(struct net_device *dev,
 			}
 			params.adv_speeds = QED_LM_40000baseLR4_Full_BIT;
 			break;
-		case 0xdead:
+		case SPEED_50000:
 			if (!(current_link.supported_caps &
 			      QED_LM_50000baseKR2_Full_BIT)) {
 				DP_INFO(edev, "50G speed not supported\n");
@@ -422,7 +422,7 @@ static int qede_set_link_ksettings(struct net_device *dev,
 			}
 			params.adv_speeds = QED_LM_50000baseKR2_Full_BIT;
 			break;
-		case 0xbeef:
+		case SPEED_100000:
 			if (!(current_link.supported_caps &
 			      QED_LM_100000baseKR4_Full_BIT)) {
 				DP_INFO(edev, "100G speed not supported\n");
-- 
1.9.3

Re: [PATCH net-next 0/2] qed*: Fix ethtool issues relating to link

From: David Miller <davem@davemloft.net>
Date: 2016-08-19 06:06:21

From: Yuval Mintz <redacted>
Date: Fri, 19 Aug 2016 08:34:56 +0300
This series addresses two issues that were introduced when adding
support for ethtool's link_ksettings support - the first fixes a
regression and second incorrect functionallity in the submission.

Although these are fixes, as the feature currently exists only in
'next-next' I'm aiming them for it.

Dave, please consider applying this series to 'net-next'.
Series applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help