diff mbox series

[2/2] net: dsa: b53: Print err message on SW_RST timeout

Message ID 20200903112621.379037-3-pbarker@konsulko.com
State Accepted
Delegated to: David Miller
Headers show
Series Minor improvements to b53 dmesg output | expand

Commit Message

Paul Barker Sept. 3, 2020, 11:26 a.m. UTC
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>
---
 drivers/net/dsa/b53/b53_common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Florian Fainelli Sept. 3, 2020, 2:21 p.m. UTC | #1
On 9/3/2020 4:26 AM, Paul Barker wrote:
> 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>
diff mbox series

Patch

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index c2ecb1cdef3f..26fcff85d881 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);