From: Tom Lendacky <thomas.lendacky@amd.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Subject: [PATCH net-next v2 04/12] amd-xgbe: Remove field that indicates SFP diagnostic support
Date: Wed, 23 May 2018 11:38:38 -0500 [thread overview]
Message-ID: <20180523163838.31625.5649.stgit@tlendack-t1.amdoffice.net> (raw)
In-Reply-To: <20180523163802.31625.76572.stgit@tlendack-t1.amdoffice.net>
The driver currently sets an indication of whether the SFP supports, and
that the driver can obtain, diagnostics data. This isn't currently used
by the driver and the logic to set this indicator is flawed because the
field is cleared each time the SFP is checked and only set when a new SFP
is detected. Remove this field and the logic supporting it.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index 05003be..cb15caf 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -343,7 +343,6 @@ struct xgbe_phy_data {
unsigned int sfp_rx_los;
unsigned int sfp_tx_fault;
unsigned int sfp_mod_absent;
- unsigned int sfp_diags;
unsigned int sfp_changed;
unsigned int sfp_phy_avail;
unsigned int sfp_cable_len;
@@ -1211,13 +1210,6 @@ static int xgbe_phy_sfp_read_eeprom(struct xgbe_prv_data *pdata)
memcpy(&phy_data->sfp_eeprom, &sfp_eeprom, sizeof(sfp_eeprom));
- if (sfp_eeprom.extd[XGBE_SFP_EXTD_SFF_8472]) {
- u8 diag_type = sfp_eeprom.extd[XGBE_SFP_EXTD_DIAG];
-
- if (!(diag_type & XGBE_SFP_EXTD_DIAG_ADDR_CHANGE))
- phy_data->sfp_diags = 1;
- }
-
xgbe_phy_free_phy_device(pdata);
} else {
phy_data->sfp_changed = 0;
@@ -1267,7 +1259,6 @@ static void xgbe_phy_sfp_reset(struct xgbe_phy_data *phy_data)
phy_data->sfp_rx_los = 0;
phy_data->sfp_tx_fault = 0;
phy_data->sfp_mod_absent = 1;
- phy_data->sfp_diags = 0;
phy_data->sfp_base = XGBE_SFP_BASE_UNKNOWN;
phy_data->sfp_cable = XGBE_SFP_CABLE_UNKNOWN;
phy_data->sfp_speed = XGBE_SFP_SPEED_UNKNOWN;
next prev parent reply other threads:[~2018-05-23 16:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 16:38 [PATCH net-next v2 00/12] amd-xgbe: AMD XGBE driver updates 2018-05-21 Tom Lendacky
2018-05-23 16:38 ` [PATCH net-next v2 01/12] amd-xgbe: Fix debug output of max channel counts Tom Lendacky
2018-05-23 16:38 ` [PATCH net-next v2 02/12] amd-xgbe: Read and save the port property registers during probe Tom Lendacky
2018-05-23 16:38 ` [PATCH net-next v2 03/12] amd-xgbe: Remove use of comm_owned field Tom Lendacky
2018-05-23 16:38 ` Tom Lendacky [this message]
2018-05-23 16:38 ` [PATCH net-next v2 05/12] amd-xgbe: Add ethtool support to retrieve SFP module info Tom Lendacky
2018-05-23 16:38 ` [PATCH net-next v2 06/12] amd-xgbe: Add ethtool show/set ring parameter support Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 07/12] amd-xgbe: Prepare for ethtool set-channel support Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 08/12] amd-xgbe: Add ethtool show/set channels support Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 09/12] amd-xgbe: Always attempt link training in KR mode Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 10/12] amd-xgbe: Advertise FEC support with the KR re-driver Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 11/12] amd-xgbe: Update the BelFuse quirk to support SGMII Tom Lendacky
2018-05-23 16:39 ` [PATCH net-next v2 12/12] amd-xgbe: Improve SFP 100Mbps auto-negotiation Tom Lendacky
2018-05-23 20:33 ` [PATCH net-next v2 00/12] amd-xgbe: AMD XGBE driver updates 2018-05-21 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=20180523163838.31625.5649.stgit@tlendack-t1.amdoffice.net \
--to=thomas.lendacky@amd.com \
--cc=davem@davemloft.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