From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Nicola Lunghi <nick83ola@gmail.com>,
mathias.nyman@intel.com, michal.pecio@gmail.com,
niklas.neronin@linux.intel.com, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] usb: xhci: fix isoc silent reschedule creating stream gap on CFC controllers
Date: Tue, 5 May 2026 16:32:54 +0300 [thread overview]
Message-ID: <50ce5341-bf93-474b-acd8-c25dc3e42f87@linux.intel.com> (raw)
In-Reply-To: <20260504233143.10242-3-nick83ola@gmail.com>
On 5/5/26 02:31, Nicola Lunghi wrote:
> xhci_get_isoc_frame_id() silently rescheduled the first TRB to
> start_frame_id+1 when the requested start frame was out of the valid
> scheduling window or landed exactly on its boundary. This creates an
> explicit one-frame hole in the isochronous stream.
Agreed, setting start_frame to start_frame_id + 1 would only make
sense for the very first URB, otherwise we create glitches.
Looks like the whole start_frame_id calculation is incorrect.
xhci specification 4.11.2.5 'Start Frame ID' formula sums together several
values in frame units, while driver currently sums values in microframes, and
then turns it into frames.
xhci 4.11.2.5
"Software should not schedule an Isoch TD with a Frame ID value that is less than
the Start Frame ID, where:
Start Frame ID = (Frame Index of the current MFINDEX register value + IST + 1) MOD 2048
where IST shall be rounded up to the nearest frame boundary if it is defined in
microframes"
Looks like we don't consider the ESIT rules for frame id either (xhci 4.11.2.5.1).
frame ID must be aligned with starting frames of an ESIT, so if ESIT is 2ms then
allowed frame ID values are 0,2,4,6... not 1,3,5..
Thanks
Mathias
next prev parent reply other threads:[~2026-05-05 13:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 23:31 [PATCH 0/2] xhci: Fix isochronous scheduling gaps on CFC controllers Nicola Lunghi
2026-05-04 23:31 ` [PATCH 1/2] usb: xhci: fix isoc silent reschedule creating stream gap " Nicola Lunghi
2026-05-05 13:32 ` Mathias Nyman [this message]
2026-05-04 23:31 ` [PATCH 2/2] usb: xhci: fix CFC sequential scheduling lost on ring drain race Nicola Lunghi
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=50ce5341-bf93-474b-acd8-c25dc3e42f87@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=nick83ola@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