Skip to content

Commit d5bd32a

Browse files
committed
Merge branch 'bnxt_en-bug-fixes'
Michael Chan says: ==================== bnxt_en: Bug fixes. This first patch fixes a module eeprom A2h addressing issue. The next 2 patches fix counter related issues. The last one skips an unsupported firmware call on the VF to avoid the error log. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 064c9c3 + 0ae0a77 commit d5bd32a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4099,7 +4099,8 @@ static void bnxt_free_mem(struct bnxt *bp, bool irq_re_init)
40994099
bnxt_free_ntp_fltrs(bp, irq_re_init);
41004100
if (irq_re_init) {
41014101
bnxt_free_ring_stats(bp);
4102-
if (!(bp->fw_cap & BNXT_FW_CAP_PORT_STATS_NO_RESET))
4102+
if (!(bp->fw_cap & BNXT_FW_CAP_PORT_STATS_NO_RESET) ||
4103+
test_bit(BNXT_STATE_IN_FW_RESET, &bp->state))
41034104
bnxt_free_port_stats(bp);
41044105
bnxt_free_ring_grps(bp);
41054106
bnxt_free_vnics(bp);
@@ -7757,6 +7758,7 @@ static void bnxt_add_one_ctr(u64 hw, u64 *sw, u64 mask)
77577758
{
77587759
u64 sw_tmp;
77597760

7761+
hw &= mask;
77607762
sw_tmp = (*sw & ~mask) | hw;
77617763
if (hw < (*sw & mask))
77627764
sw_tmp += mask + 1;

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,9 @@ int bnxt_hwrm_nvm_get_dev_info(struct bnxt *bp,
20792079
struct hwrm_nvm_get_dev_info_input req = {0};
20802080
int rc;
20812081

2082+
if (BNXT_VF(bp))
2083+
return -EOPNOTSUPP;
2084+
20822085
bnxt_hwrm_cmd_hdr_init(bp, &req, HWRM_NVM_GET_DEV_INFO, -1, -1);
20832086
mutex_lock(&bp->hwrm_cmd_lock);
20842087
rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
@@ -2997,7 +3000,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev,
29973000
/* Read A2 portion of the EEPROM */
29983001
if (length) {
29993002
start -= ETH_MODULE_SFF_8436_LEN;
3000-
rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 1,
3003+
rc = bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 0,
30013004
start, length, data);
30023005
}
30033006
return rc;

0 commit comments

Comments
 (0)