diff options
author | Paul Barker <pbarker@konsulko.com> | 2020-09-03 13:26:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-03 21:07:29 +0200 |
commit | 434d2312cd8057aa6972f2b39aa0b359d02af9f4 (patch) | |
tree | ceb9238aa22f7c4d138ee3483b71afa09079c981 /drivers/net/dsa | |
parent | net: dsa: b53: Use dev_{err,info} instead of pr_* (diff) | |
download | linux-434d2312cd8057aa6972f2b39aa0b359d02af9f4.tar.xz linux-434d2312cd8057aa6972f2b39aa0b359d02af9f4.zip |
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>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r-- | drivers/net/dsa/b53/b53_common.c | 5 |
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); |