summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-09-03 14:26:21 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-03 22:07:29 +0300
commit434d2312cd8057aa6972f2b39aa0b359d02af9f4 (patch)
treeceb9238aa22f7c4d138ee3483b71afa09079c981
parent3b33438c52def0de4a5577ad541e50923bcc2596 (diff)
downloadlinux-434d2312cd8057aa6972f2b39aa0b359d02af9f4.tar.xz
net: dsa: b53: Print err message on SW_RST timeout
This allows us to differentiate between the possible failure modes of b53_switch_reset() by looking at the dmesg output. Signed-off-by: Paul Barker <pbarker@konsulko.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/b53/b53_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index b100fad00762..5d0618e99156 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -765,8 +765,11 @@ static int b53_switch_reset(struct b53_device *dev)
usleep_range(1000, 2000);
} while (timeout-- > 0);
- if (timeout == 0)
+ if (timeout == 0) {
+ dev_err(dev->dev,
+ "Timeout waiting for SW_RST to clear!\n");
return -ETIMEDOUT;
+ }
}
b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, &mgmt);