From: "Yuval Mintz" <yuvalmin@broadcom.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: eilong@broadcom.com, "Mintz Yuval" <yuvalmin@broadcom.com>
Subject: [net-next 11/11] bnx2x: allow all functions to display the phy FW version
Date: Wed, 15 Feb 2012 07:10:32 -0500 [thread overview]
Message-ID: <1329307832-32454-12-git-send-email-yuvalmin@broadcom.com> (raw)
In-Reply-To: <1329307832-32454-1-git-send-email-yuvalmin@broadcom.com>
From: Mintz Yuval <yuvalmin@broadcom.com>
The phy FW version is stored in regular memory, no MDC-MDIO access or
any special locks are required to read it in the current implementation.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
.../net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 10 ++--------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 4 ++--
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h | 4 ++--
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index c18dc1d..7e57fa4 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -806,14 +806,8 @@ static void bnx2x_get_drvinfo(struct net_device *dev,
strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
phy_fw_ver[0] = '\0';
- if (bp->port.pmf) {
- bnx2x_acquire_phy_lock(bp);
- bnx2x_get_ext_phy_fw_version(&bp->link_params,
- (bp->state != BNX2X_STATE_CLOSED),
- phy_fw_ver, PHY_FW_VER_LEN);
- bnx2x_release_phy_lock(bp);
- }
-
+ bnx2x_get_ext_phy_fw_version(&bp->link_params,
+ phy_fw_ver, PHY_FW_VER_LEN);
strlcpy(info->fw_version, bp->fw_ver, sizeof(info->fw_version));
snprintf(info->fw_version + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
"bc %d.%d.%d%s%s",
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 57fe056..beb4cdb 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -6042,8 +6042,8 @@ static int bnx2x_null_format_ver(u32 spirom_ver, u8 *str, u16 *len)
return 0;
}
-int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
- u8 *version, u16 len)
+int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
+ u16 len)
{
struct bnx2x *bp;
u32 spirom_ver = 0;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
index 9cc7baf..7ba557a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
@@ -337,8 +337,8 @@ int bnx2x_phy_write(struct link_params *params, u8 phy_addr,
void bnx2x_link_status_update(struct link_params *input,
struct link_vars *output);
/* returns string representing the fw_version of the external phy */
-int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
- u8 *version, u16 len);
+int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
+ u16 len);
/* Set/Unset the led
Basically, the CLC takes care of the led for the link, but in case one needs
--
1.7.9.rc2
next prev parent reply other threads:[~2012-02-15 5:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 12:10 [net-next 00/11] bnx2x: feature patch series Yuval Mintz
2012-02-15 12:10 ` [net-next 01/11] bnx2x: consistent statistics after internal driver reload Yuval Mintz
2012-02-15 12:10 ` [net-next 02/11] bnx2x: half duplex support added for several boards Yuval Mintz
2012-02-15 12:10 ` [net-next 03/11] bnx2x: ethtool publishes link partners speed and FC Yuval Mintz
2012-02-15 12:10 ` [net-next 04/11] bnx2x: added autoneg-restart after link advertisement changes Yuval Mintz
2012-02-15 12:10 ` [net-next 05/11] bnx2x: force 10G on 84833 phy should be autoneg with only 10G advertised Yuval Mintz
2012-02-15 12:10 ` [net-next 06/11] bnx2x: allocate memory dynamically in ethtool self-test Yuval Mintz
2012-02-15 12:10 ` [net-next 07/11] bnx2x: allocate smaller Rx rings for 1G functions Yuval Mintz
2012-02-15 12:10 ` [net-next 08/11] bnx2x: notify cnic of address of info-to-the-mcp Yuval Mintz
2012-02-15 12:10 ` [net-next 09/11] bnx2x: allow BCM84833 phy to advertise 100Base-T speeds Yuval Mintz
2012-02-15 12:10 ` [net-next 10/11] bnx2x: removed code re-checking memory base after device open Yuval Mintz
2012-02-15 12:10 ` Yuval Mintz [this message]
2012-02-15 20:31 ` [net-next 00/11] bnx2x: feature patch series 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=1329307832-32454-12-git-send-email-yuvalmin@broadcom.com \
--to=yuvalmin@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.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).