lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Dec 2018 14:01:45 +0100
From:   Pavel Machek <pavel@....cz>
To:     andrew@...n.ch, vivien.didelot@...oirfairelinux.com,
        netdev@...r.kernel.org, f.fainelli@...il.com
Cc:     buytenh@...vell.com, buytenh@...tstofly.org, nico@...vell.com
Subject: [PATCH] mv88e6060: Warn about errors

    
Errors communicating with the chip are not expected, warn about them.
    
Signed-off-by: Pavel Machek <pavel@....cz>

diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c
index 65f10fec25b3..f43104f48dbb 100644
--- a/drivers/net/dsa/mv88e6060.c
+++ b/drivers/net/dsa/mv88e6060.c
@@ -30,8 +30,10 @@ static int reg_read(struct dsa_switch *ds, int addr, int reg)
 		int __ret;					\
 								\
 		__ret = reg_read(ds, addr, reg);		\
-		if (__ret < 0)					\
+		if (__ret < 0) {				\
+			printk("mv88e6060: error reading %x/%x\n", addr, reg);	\
 			return __ret;				\
+		}						\
 		__ret;						\
 	})
 
@@ -48,8 +50,10 @@ static int reg_write(struct dsa_switch *ds, int addr, int reg, u16 val)
 		int __ret;					\
 								\
 		__ret = reg_write(ds, addr, reg, val);		\
-		if (__ret < 0)					\
+		if (__ret < 0)  {                               \
+			printk("mv88e6060: error writing %x/%x\n", addr, reg);	\
 			return __ret;				\
+		}						\
 	})
 
 static const char *mv88e6060_get_name(struct mii_bus *bus, int sw_addr)



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ