From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: fy15309206903@gmail.com
Cc: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] thunderbolt: Clamp DMA tunnel credits to what a hop register can hold
Date: Tue, 11 Aug 2026 06:03:48 +0200 [thread overview]
Message-ID: <20260811040348.GJ893316@black.igk.intel.com> (raw)
In-Reply-To: <20260810-tb-dma-credit-clamp-v2-1-e81af742994d@gmail.com>
Hi,
On Mon, Aug 10, 2026 at 12:14:13PM +0000, Fan Ye via B4 Relay wrote:
> From: Fan Ye <fy15309206903@gmail.com>
>
> struct tb_regs_hop::initial_credits is 7 bits wide, but neither of the
> values tb_tunnel_alloc_dma() picks from is bounded by that: the
> dma_credits module parameter has no upper limit, and neither does the
> host router's baMaxHI. A larger count survives until tb_path_activate()
> copies it into the register and keeps the low bits, leaving the path on
> a credit count nobody asked for.
>
> Clamp it in tb_tunnel_alloc_dma(), the only entry point for DMA tunnels;
> every step below it can only lower the value further. Carry the count in
> an unsigned int while at it.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Fan Ye <fy15309206903@gmail.com>
Applied to thunderbolt.git/next, thanks!
prev parent reply other threads:[~2026-08-11 4:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 12:14 [PATCH v2] thunderbolt: Clamp DMA tunnel credits to what a hop register can hold Fan Ye via B4 Relay
2026-08-11 4:03 ` Mika Westerberg [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=20260811040348.GJ893316@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=fy15309206903@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=westeri@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox