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] [day] [month] [year] [list]
Message-ID: <20241026125400.GD1507976@kernel.org>
Date: Sat, 26 Oct 2024 13:54:00 +0100
From: Simon Horman <horms@...nel.org>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Thomas Kopp <thomas.kopp@...rochip.com>,
	Vincent Mailhol <mailhol.vincent@...adoo.fr>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	linux-can@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH can] can: mcp251xfd: mcp251xfd_ring_alloc(): fix
 coalescing configuration when switching CAN modes

On Fri, Oct 25, 2024 at 04:47:19PM +0200, Marc Kleine-Budde wrote:
> Since commit 50ea5449c563 ("can: mcp251xfd: fix ring configuration
> when switching from CAN-CC to CAN-FD mode"), the current ring and
> coalescing configuration is passed to can_ram_get_layout(). That fixed
> the issue when switching between CAN-CC and CAN-FD mode with
> configured ring (rx, tx) and/or coalescing parameters (rx-frames-irq,
> tx-frames-irq).
> 
> However 50ea5449c563 ("can: mcp251xfd: fix ring configuration when
> switching from CAN-CC to CAN-FD mode"), introduced a regression when
> switching CAN modes with disabled coalescing configuration: Even if
> the previous CAN mode has no coalescing configured, the new mode is
> configured with active coalescing. This leads to delayed receiving of
> CAN-FD frames.
> 
> This comes from the fact, that ethtool uses usecs = 0 and max_frames =
> 1 to disable coalescing, however the driver uses internally
> priv->{rx,tx}_obj_num_coalesce_irq = 0 to indicate disabled
> coalescing.
> 
> Fix the regression by assigning struct ethtool_coalesce
> ec->{rx,tx}_max_coalesced_frames_irq = 1 if coalescing is disabled in
> the driver as can_ram_get_layout() expects this.
> 
> Reported-by: https://github.com/vdh-robothania
> Closes: https://github.com/raspberrypi/linux/issues/6407
> Fixes: 50ea5449c563 ("can: mcp251xfd: fix ring configuration when switching from CAN-CC to CAN-FD mode")
> Cc: stable@...r.kernel.org
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ