From: Jarod Wilson <jarod@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Jarod Wilson <jarod@redhat.com>,
Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
Edward Cree <ecree@solarflare.com>,
Bert Kenward <bkenward@solarflare.com>,
netdev@vger.kernel.org
Subject: [PATCH net] ethernet/sfc: report supported link speeds on SFP connections
Date: Thu, 2 Jun 2016 21:33:24 -0400 [thread overview]
Message-ID: <1464917604-11596-1-git-send-email-jarod@redhat.com> (raw)
My solarflare cards connected to a 10GbE switch with an SFP+ module/cable
don't currently report any supported link speeds:
$ ethtool ens4f0
Settings for ens4f0:
Supported ports: [ FIBRE ]
Supported link modes: Not reported
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10000baseKX4/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 255
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x000020f7 (8439)
drv probe link ifdown ifup rx_err tx_err hw
Link detected: yes
I've navigated my way through the sfc code down to mcdi_to_ethtool_cap's
switch on media's MC_CMD_MEDIA_SFP_PLUS case, where no speeds are set.
If we just do some cap checks similar to the MC_CMD_MEDIA_KX4 case, I get
the expected output:
$ ethtool ens4f0
Settings for ens4f0:
Supported ports: [ FIBRE ]
Supported link modes: 1000baseKX/Full
10000baseKX4/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10000baseKX4/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 255
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x000020f7 (8439)
drv probe link ifdown ifup rx_err tx_err hw
Link detected: yes
This is from an sfc9120 interface here. It also applies to a 9140 with a
10GbE breakout cable.
Side note: wiring up Advertised by simply copying Supported seems to be a
thing many other drivers do. Worth doing here?...
CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
CC: Edward Cree <ecree@solarflare.com>
CC: Bert Kenward <bkenward@solarflare.com>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
drivers/net/ethernet/sfc/mcdi_port.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c
index 7f295c4..6516471 100644
--- a/drivers/net/ethernet/sfc/mcdi_port.c
+++ b/drivers/net/ethernet/sfc/mcdi_port.c
@@ -189,6 +189,10 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap)
case MC_CMD_MEDIA_XFP:
case MC_CMD_MEDIA_SFP_PLUS:
+ if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN))
+ result |= SUPPORTED_1000baseKX_Full;
+ if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN))
+ result |= SUPPORTED_10000baseKX4_Full;
result |= SUPPORTED_FIBRE;
break;
--
1.8.3.1
next reply other threads:[~2016-06-03 1:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 1:33 Jarod Wilson [this message]
2016-06-03 23:50 ` [PATCH net] ethernet/sfc: report supported link speeds on SFP connections David Miller
2016-06-06 15:07 ` Bert Kenward
2016-06-06 16:29 ` [PATCH net v2] sfc: " Bert Kenward
2016-06-06 18:55 ` Jarod Wilson
2016-06-07 21:20 ` Jarod Wilson
2016-06-08 13:41 ` Jarod Wilson
2016-06-08 18:19 ` David Miller
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=1464917604-11596-1-git-send-email-jarod@redhat.com \
--to=jarod@redhat.com \
--cc=bkenward@solarflare.com \
--cc=ecree@solarflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@solarflare.com \
--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).