Skip to content

Commit

Permalink
bnxt_en: fix clear flags in ethtool reset handling
Browse files Browse the repository at this point in the history
Clear flags when reset command processed successfully for components
specified.

Fixes: 6502ad5 ("bnxt_en: Add ETH_RESET_AP support")
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Branden authored and David S. Miller committed Apr 1, 2018
1 parent abe93ad commit 2373d8d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2535,16 +2535,20 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
return -EOPNOTSUPP;

rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_CHIP);
if (!rc)
if (!rc) {
netdev_info(dev, "Reset request successful. Reload driver to complete reset\n");
*flags = 0;
}
} else if (*flags == ETH_RESET_AP) {
/* This feature is not supported in older firmware versions */
if (bp->hwrm_spec_code < 0x10803)
return -EOPNOTSUPP;

rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_AP);
if (!rc)
if (!rc) {
netdev_info(dev, "Reset Application Processor request successful.\n");
*flags = 0;
}
} else {
rc = -EINVAL;
}
Expand Down

0 comments on commit 2373d8d

Please sign in to comment.