Skip to content

Commit a1e785e

Browse files
Mintz Yuvaldavem330
authored andcommitted
bnx2x: allow all functions to display the phy FW version
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 04f2d51 commit a1e785e

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -806,14 +806,8 @@ static void bnx2x_get_drvinfo(struct net_device *dev,
806806
strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
807807

808808
phy_fw_ver[0] = '\0';
809-
if (bp->port.pmf) {
810-
bnx2x_acquire_phy_lock(bp);
811-
bnx2x_get_ext_phy_fw_version(&bp->link_params,
812-
(bp->state != BNX2X_STATE_CLOSED),
813-
phy_fw_ver, PHY_FW_VER_LEN);
814-
bnx2x_release_phy_lock(bp);
815-
}
816-
809+
bnx2x_get_ext_phy_fw_version(&bp->link_params,
810+
phy_fw_ver, PHY_FW_VER_LEN);
817811
strlcpy(info->fw_version, bp->fw_ver, sizeof(info->fw_version));
818812
snprintf(info->fw_version + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
819813
"bc %d.%d.%d%s%s",

drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6042,8 +6042,8 @@ static int bnx2x_null_format_ver(u32 spirom_ver, u8 *str, u16 *len)
60426042
return 0;
60436043
}
60446044

6045-
int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
6046-
u8 *version, u16 len)
6045+
int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
6046+
u16 len)
60476047
{
60486048
struct bnx2x *bp;
60496049
u32 spirom_ver = 0;

drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ int bnx2x_phy_write(struct link_params *params, u8 phy_addr,
337337
void bnx2x_link_status_update(struct link_params *input,
338338
struct link_vars *output);
339339
/* returns string representing the fw_version of the external phy */
340-
int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 driver_loaded,
341-
u8 *version, u16 len);
340+
int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
341+
u16 len);
342342

343343
/* Set/Unset the led
344344
Basically, the CLC takes care of the led for the link, but in case one needs

0 commit comments

Comments
 (0)