From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Michal Pecio <michal.pecio@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: Re: [PATCH 1/3] usb: xhci: Simplify update_ring_for_set_deq_completion()
Date: Fri, 21 Feb 2025 15:23:11 +0200 [thread overview]
Message-ID: <e3ca349d-c77d-4643-9865-f9991b34540f@linux.intel.com> (raw)
In-Reply-To: <20250220234458.4bf8dcba@foxbook>
On 21.2.2025 0.44, Michal Pecio wrote:
> This function checks if the queued Set Deq pointer really belongs to the
> ring it was queued on and updates the ring's dequeue state. It also used
> to count free TRBs, but that part has been removed.
>
> The code is needlessly complex and inefficent, walking TRBs one by one.
> And it could "jump off the segment into la-la-land" if a segment doesn't
> end with a link TRB or if the link points to another link.
>
> Make if faster, simpler and more robust. Upgrade xhci_dbg() to xhci_err()
> because this situation is a bug and shouldn't happen.
>
> Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
update_ring_for_set_deq_completion() isn't needed anymore.
Niklas already wrote a patch to remove it.
It's sitting in my for-usb-next branch
https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?h=for-usb-next&id=ee7dab196a7dfc48a1608274329323cb10b4340d
Thanks
Mathias
next prev parent reply other threads:[~2025-02-21 13:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 22:43 [PATCH 0/3] xhci: ring queuing cleanups Michal Pecio
2025-02-20 22:44 ` [PATCH 1/3] usb: xhci: Simplify update_ring_for_set_deq_completion() Michal Pecio
2025-02-21 13:23 ` Mathias Nyman [this message]
2025-03-05 8:24 ` Michał Pecio
2025-02-20 22:46 ` [PATCH 2/3] usb: xhci: Simplify moving HW Dequeue Pointer past cancelled TDs Michal Pecio
2025-02-20 22:47 ` [PATCH 3/3] usb: xhci: Unify duplicate inc_enq() code Michal Pecio
2025-02-21 14:54 ` Mathias Nyman
2025-02-23 23:45 ` Michał Pecio
2025-02-24 11:49 ` Mathias Nyman
2025-02-24 21:01 ` Michał Pecio
2025-02-25 9:33 ` Mathias Nyman
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=e3ca349d-c77d-4643-9865-f9991b34540f@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=michal.pecio@gmail.com \
--cc=niklas.neronin@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®