From: Paul Barker Date: Thu, 3 Sep 2020 11:26:21 +0000 (+0100) Subject: net: dsa: b53: Print err message on SW_RST timeout X-Git-Tag: howlett/maple_spf/20210104~792^2~385^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=434d2312cd8057aa6972f2b39aa0b359d02af9f4;p=users%2Fjedix%2Flinux-maple.git 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 Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- 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);