Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mintz Yuval and committed by
David S. Miller
a1e785e0 04f2d513

+6 -12
+2 -8
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
··· 806 806 strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version)); 807 807 808 808 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); 817 811 strlcpy(info->fw_version, bp->fw_ver, sizeof(info->fw_version)); 818 812 snprintf(info->fw_version + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver), 819 813 "bc %d.%d.%d%s%s",
+2 -2
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
··· 6042 6042 return 0; 6043 6043 } 6044 6044 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) 6047 6047 { 6048 6048 struct bnx2x *bp; 6049 6049 u32 spirom_ver = 0;
+2 -2
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h
··· 337 337 void bnx2x_link_status_update(struct link_params *input, 338 338 struct link_vars *output); 339 339 /* 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); 342 342 343 343 /* Set/Unset the led 344 344 Basically, the CLC takes care of the led for the link, but in case one needs