Skip to content

Commit 6502ad5

Browse files
sbrandendavem330
authored andcommitted
bnxt_en: Add ETH_RESET_AP support
Add ETH_RESET_AP support handling to reset the internal Application Processor(s) of the SmartNIC card. Signed-off-by: Scott Branden <[email protected]> Acked-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 40e44a1 commit 6502ad5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,9 @@ static int bnxt_firmware_reset(struct net_device *dev,
13761376
req.embedded_proc_type = FW_RESET_REQ_EMBEDDED_PROC_TYPE_CHIP;
13771377
req.selfrst_status = FW_RESET_REQ_SELFRST_STATUS_SELFRSTASAP;
13781378
break;
1379+
case BNXT_FW_RESET_AP:
1380+
req.embedded_proc_type = FW_RESET_REQ_EMBEDDED_PROC_TYPE_AP;
1381+
break;
13791382
default:
13801383
return -EINVAL;
13811384
}
@@ -2522,6 +2525,14 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
25222525
rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_CHIP);
25232526
if (!rc)
25242527
netdev_info(dev, "Reset request successful. Reload driver to complete reset\n");
2528+
} else if (*flags == ETH_RESET_AP) {
2529+
/* This feature is not supported in older firmware versions */
2530+
if (bp->hwrm_spec_code < 0x10803)
2531+
return -EOPNOTSUPP;
2532+
2533+
rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_AP);
2534+
if (!rc)
2535+
netdev_info(dev, "Reset Application Processor request successful.\n");
25252536
} else {
25262537
rc = -EINVAL;
25272538
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ struct bnxt_led_cfg {
3434
#define BNXT_LED_DFLT_ENABLES(x) \
3535
cpu_to_le32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
3636

37+
#define BNXT_FW_RESET_AP 0xfffe
3738
#define BNXT_FW_RESET_CHIP 0xffff
3839

3940
extern const struct ethtool_ops bnxt_ethtool_ops;

0 commit comments

Comments
 (0)