aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-10-10 15:18:48 +0200
committerDavid S. Miller <davem@davemloft.net>2019-10-11 21:02:30 -0700
commit402818205c9ecdfd922fdfa58fb113f60fdda523 (patch)
treeac09a38408d421791cf78d1d1c040f1112b3ecb9
parentnet: usb: ax88179_178a: write mac to hardware in get_mac_addr (diff)
downloadlinux-dev-402818205c9ecdfd922fdfa58fb113f60fdda523.tar.xz
linux-dev-402818205c9ecdfd922fdfa58fb113f60fdda523.zip
devlink: don't do reporter recovery if the state is healthy
If reporter state is healthy, don't call into a driver for recover and don't increase recovery count. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/devlink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c
index eb0a22f05887..95887462eecf 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -4851,6 +4851,9 @@ devlink_health_reporter_recover(struct devlink_health_reporter *reporter,
{
int err;
+ if (reporter->health_state == DEVLINK_HEALTH_REPORTER_STATE_HEALTHY)
+ return 0;
+
if (!reporter->ops->recover)
return -EOPNOTSUPP;