From: Simon Horman <horms@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Thomas Kopp <thomas.kopp@microchip.com>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH can] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes
Date: Sat, 26 Oct 2024 13:54:00 +0100 [thread overview]
Message-ID: <20241026125400.GD1507976@kernel.org> (raw)
In-Reply-To: <20241025-mcp251xfd-fix-coalesing-v1-1-9d11416de1df@pengutronix.de>
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@vger.kernel.org
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Simon Horman <horms@kernel.org>
prev parent reply other threads:[~2024-10-26 12:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 14:47 [PATCH can] can: mcp251xfd: mcp251xfd_ring_alloc(): fix coalescing configuration when switching CAN modes Marc Kleine-Budde
2024-10-26 12:54 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241026125400.GD1507976@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=thomas.kopp@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.