xhcid: fix EDTLA Event Data TRB handling (Linux 7.1 xhci-ring.c:2306)

This commit is contained in:
Red Bear OS
2026-07-08 15:37:39 +03:00
parent ba5a7cd3fc
commit faf777b990
+7 -2
View File
@@ -1143,8 +1143,13 @@ impl<const N: usize> Xhci<N> {
handle_transfer_event_trb("EXECUTE_TRANSFER", &event_trb, &transfer_trb)?;
// FIXME: EDTLA if event data was set
if event_trb.completion_code() != TrbCompletionCode::ShortPacket as u8
// EDTLA (Event Data Transfer Length Accumulator): Event Data TRBs
// carry total bytes transferred in the transfer_length field per
// xHCI spec §4.17.3. A non-zero transfer length on an Event Data TRB
// is expected — it is the EDTLA value, not an error condition.
// Cross-referenced with Linux 7.1 xhci-ring.c:2306 EVENT_TRB_LEN().
if !event_trb.event_data_bit()
&& event_trb.completion_code() != TrbCompletionCode::ShortPacket as u8
&& event_trb.transfer_length() != 0
{
error!("Event trb didn't yield a short packet, but some bytes were not transferred");