提交 2373d8d6 编写于 作者: S Scott Branden 提交者: David S. Miller

bnxt_en: fix clear flags in ethtool reset handling

Clear flags when reset command processed successfully for components
specified.

Fixes: 6502ad59 ("bnxt_en: Add ETH_RESET_AP support")
Signed-off-by: NScott Branden <scott.branden@broadcom.com>
Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 abe93ad2
...@@ -2535,16 +2535,20 @@ static int bnxt_reset(struct net_device *dev, u32 *flags) ...@@ -2535,16 +2535,20 @@ static int bnxt_reset(struct net_device *dev, u32 *flags)
return -EOPNOTSUPP; return -EOPNOTSUPP;
rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_CHIP); 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"); netdev_info(dev, "Reset request successful. Reload driver to complete reset\n");
*flags = 0;
}
} else if (*flags == ETH_RESET_AP) { } else if (*flags == ETH_RESET_AP) {
/* This feature is not supported in older firmware versions */ /* This feature is not supported in older firmware versions */
if (bp->hwrm_spec_code < 0x10803) if (bp->hwrm_spec_code < 0x10803)
return -EOPNOTSUPP; return -EOPNOTSUPP;
rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_AP); rc = bnxt_firmware_reset(dev, BNXT_FW_RESET_AP);
if (!rc) if (!rc) {
netdev_info(dev, "Reset Application Processor request successful.\n"); netdev_info(dev, "Reset Application Processor request successful.\n");
*flags = 0;
}
} else { } else {
rc = -EINVAL; rc = -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册