From: Michal Pecio <michal.pecio@gmail.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: Don't unchain link TRBs on quirky HCs
Date: Fri, 14 Nov 2025 12:32:32 +0100 [thread overview]
Message-ID: <20251114123232.0b96bfa5.michal.pecio@gmail.com> (raw)
In-Reply-To: <f1259e37-5671-43ca-85f5-a37b68d5507a@linux.intel.com>
On Tue, 11 Nov 2025 18:19:38 +0200, Mathias Nyman wrote:
> On 11/7/25 12:08, Michal Pecio wrote:
> > +static void td_to_noop(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
> > + struct xhci_td *td, bool flip_cycle)
>
> we could avoid passing xhci pointer to td_to_noop() and just grab it from
> the xhci_virt_ep structure instead. i.e. ep->xhci
I can do a v2 if you want.
But OTOH, I didn't expect such pointer to exist (though I'm sure I must
have seen it many times) because it doesn't seem strictly necessary.
Maybe do the reverse and get rid of ep->xhci, or stop adding new users
and clean up existing ones along the way?
Main users are invalidate_cancelled_tds()/giveback_invalidated_tds(),
their callers all have xhci and could easily supply it to them. And we
even discussed removing the latter completely, but I got sidetracked by
issues with URB_ZERO_PACKET.
Another user is xhci_handle_cmd_set_deq() which already has xhci.
I have a compile-tested patch which removes it completely right now,
it took five minutes and zero mental effort to prepare.
Regards,
Michal
next prev parent reply other threads:[~2025-11-14 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 10:08 [PATCH] usb: xhci: Don't unchain link TRBs on quirky HCs Michal Pecio
2025-11-11 16:19 ` Mathias Nyman
2025-11-14 11:32 ` Michal Pecio [this message]
2025-11-14 12:15 ` 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=20251114123232.0b96bfa5.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mathias.nyman@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