dsa: mv88e6xxx: Make mv88e6xxx_wait() timeout verbose
authorAndrew Lunn <andrew@lunn.ch>
Thu, 18 Aug 2016 22:01:57 +0000 (00:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Aug 2016 00:14:07 +0000 (17:14 -0700)
When mv88e6xxx_wait() returns a timeout, something bad has
happened. Make sure it is noticed by logging an error.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c

index 8c846bce4edf0e4318bc16fb213f6fbb4f8e9988..014b52bd72f123776dcf69f4e1a5f639b90c9202 100644 (file)
@@ -325,6 +325,7 @@ static int mv88e6xxx_wait(struct mv88e6xxx_chip *chip, int addr, int reg,
                usleep_range(1000, 2000);
        }
 
+       dev_err(chip->dev, "Timeout while waiting for switch\n");
        return -ETIMEDOUT;
 }