]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: dsa: b53: Print err message on SW_RST timeout
authorPaul Barker <pbarker@konsulko.com>
Thu, 3 Sep 2020 11:26:21 +0000 (12:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 19:07:29 +0000 (12:07 -0700)
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>
drivers/net/dsa/b53/b53_common.c

index b100fad00762df38859d7b31d0b275c74e779fdb..5d0618e99156bbf5741b4bbe59a63a776d397f21 100644 (file)
@@ -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);