summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorPaul Barker <pbarker@konsulko.com>2020-09-03 13:26:21 +0200
committerDavid S. Miller <davem@davemloft.net>2020-09-03 21:07:29 +0200
commit434d2312cd8057aa6972f2b39aa0b359d02af9f4 (patch)
treeceb9238aa22f7c4d138ee3483b71afa09079c981 /drivers/net/dsa
parentnet: dsa: b53: Use dev_{err,info} instead of pr_* (diff)
downloadlinux-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.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);