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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c76d1786c308aeb6e4c836334084e3049c0f108a.camel@redhat.com>
Date: Thu, 20 Jun 2024 13:43:52 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>, davem@...emloft.net,
  edumazet@...gle.com, kuba@...nel.org, horms@...nel.org,
 linux-usb@...r.kernel.org,  netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org
Subject: Re: [PATCH v2] net: usb: ax88179_178a: improve link status logs

On Tue, 2024-06-18 at 13:50 +0200, Jose Ignacio Tornos Martinez wrote:
> Avoid spurious link status logs that may ultimately be wrong; for example,
> if the link is set to down with the cable plugged, then the cable is
> unplugged and after this the link is set to up, the last new log that is
> appearing is incorrectly telling that the link is up.
> 
> In order to avoid errors, show link status logs after link_reset
> processing, and in order to avoid spurious as much as possible, only show
> the link loss when some link status change is detected.
> 
> cc: stable@...r.kernel.org
> Fixes: e2ca90c276e1 ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver")
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>

Please always include the target tree in the subj prefix - in this case
it should have been 'net'.

> ---
> v2:
>   - Fix the nits
> v1: https://lore.kernel.org/netdev/20240617103405.654567-1-jtornosm@redhat.com/
> 
>  drivers/net/usb/ax88179_178a.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
> index c2fb736f78b2..d90ceab282ff 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -326,7 +326,9 @@ static void ax88179_status(struct usbnet *dev, struct urb *urb)
>  
>  	if (netif_carrier_ok(dev->net) != link) {
>  		usbnet_link_change(dev, link, 1);
> -		netdev_info(dev->net, "ax88179 - Link status is: %d\n", link);
> +		if (!link)
> +			netdev_info(dev->net, "ax88179 - Link status is: %d\n",
> +				    link);

Here                                ^^^^ link value is always 0, so you
should using a constant string.


Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ