[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250212083007.04383b5d@foxbook>
Date: Wed, 12 Feb 2025 08:30:07 +0100
From: MichaĆ Pecio <michal.pecio@...il.com>
To: Mathias Nyman <mathias.nyman@...ux.intel.com>
Cc: Mathias Nyman <mathias.nyman@...el.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Niklas Neronin
<niklas.neronin@...ux.intel.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] usb: xhci: Skip only one TD on Ring
Underrun/Overrun
On Tue, 11 Feb 2025 17:41:39 +0200, Mathias Nyman wrote:
> > + if (ring_xrun_event) {
> > + /*
> > + * If we are here, we are on xHCI 1.0 host with no idea how
> > + * many TDs were missed and where the xrun occurred. Don't
> > + * skip more TDs, they may have been queued after the xrun.
> > + */
> > + xhci_dbg(xhci, "Skipped one TD for slot %u ep %u",
> > + slot_id, ep_index);
> > + break;
>
> This would be the same as return 0; right?
Currently, yes. I know it looks silly, but I thought it would be more
future proof than hardcoding 'return 0' into the loop. The point it to
simply stop iteration, what happens next is none of the loop's business.
I hope gcc is clever enough to do the right thing here.
Regards,
Michal
Powered by blists - more mailing lists