From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: [PATCH] mv88e6060: Warn about errors Date: Thu, 6 Dec 2018 14:01:45 +0100 Message-ID: <20181206130145.GB22343@amd> References: <20181115195111.GA9946@amd> <20181206130051.GA22343@amd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8GpibOaaTibBMecb" Cc: buytenh@marvell.com, buytenh@wantstofly.org, nico@marvell.com To: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org, f.fainelli@gmail.com Return-path: Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:34128 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728648AbeLFNBr (ORCPT ); Thu, 6 Dec 2018 08:01:47 -0500 Content-Disposition: inline In-Reply-To: <20181206130051.GA22343@amd> Sender: netdev-owner@vger.kernel.org List-ID: --8GpibOaaTibBMecb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =20 Errors communicating with the chip are not expected, warn about them. =20 Signed-off-by: Pavel Machek 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 =3D reg_read(ds, addr, reg); \ - if (__ret < 0) \ + if (__ret < 0) { \ + printk("mv88e6060: error reading %x/%x\n", addr, reg); \ return __ret; \ + } \ __ret; \ }) =20 @@ -48,8 +50,10 @@ static int reg_write(struct dsa_switch *ds, int addr, in= t reg, u16 val) int __ret; \ \ __ret =3D reg_write(ds, addr, reg, val); \ - if (__ret < 0) \ + if (__ret < 0) { \ + printk("mv88e6060: error writing %x/%x\n", addr, reg); \ return __ret; \ + } \ }) =20 static const char *mv88e6060_get_name(struct mii_bus *bus, int sw_addr) --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --8GpibOaaTibBMecb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwJHbkACgkQMOfwapXb+vJNlgCfZnhUhP35saGcAakm3n2tspIt j1cAoIWQ/VLbMZtGULiVIJcNMVLjrKRK =Bu3y -----END PGP SIGNATURE----- --8GpibOaaTibBMecb--