Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Nicolai Buchwitz
Sun, 15 Nov 2026 19:39
Re: [PATCH net-next v6 1/2] net: macb: implement ethtool_ops.get|set_channels()
Author: Nicolai Buchwitz
Date: Sun, 15 Nov 2026 19:39
Date: Sun, 15 Nov 2026 19:39
36 lines
9796 bytes
9796 bytes
Hi Théo
On 13.11.2026 18:32, Théo Lebrun wrote:
> [...]
> @@ -3351,16 +3374,21 @@ static void macb_context_swap_end(struct macb
> *bp,
>
> lockdep_assert_held(&bp->mac_cfg_lock);
>
> - /* Swap contexts & give buffer pointers to HW. */
> + /* Swap contexts & give buffer pointers to HW.
> + * !new_ctx means that the swap failed and we keep the old context.
> + */
> +
> + if (new_ctx) {
> + old_ctx = bp->ctx;
> + WRITE_ONCE(bp->ctx, new_ctx);
> + wmb(); /* ensure IRQ enabled below read the new context */
> + }
>
> - old_ctx = bp->ctx;
> - WRITE_ONCE(bp->ctx, new_ctx);
> - wmb(); /* ensure IRQ enabled below read the new context */
> macb_init_buffers(bp);
The NULL case reuses the old rings without mog_init_rings(). The HW
restarts at descriptor 0 but head/tail don't, so Tx stalls after a
failed ethtool -L? macb_hresp_error_task() reinits the rings first.
> [...]
Regards,
Nicolai
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads