diff --git a/target/linux/rockchip/patches-5.4/302-add-dwc3-xhci-usb-trb-quirk.patch b/target/linux/rockchip/patches-5.4/302-add-dwc3-xhci-usb-trb-quirk.patch index 6c94b60d74..288bdf09d4 100644 --- a/target/linux/rockchip/patches-5.4/302-add-dwc3-xhci-usb-trb-quirk.patch +++ b/target/linux/rockchip/patches-5.4/302-add-dwc3-xhci-usb-trb-quirk.patch @@ -99,7 +99,7 @@ index 7fa27b403..c2fd2af7e 100644 bool more_trbs_coming = true; bool need_zero_pkt = false; bool first_trb = true; -+ bool en_trb_ent = true; ++ bool en_trb_ent = !!(xhci->quirks & XHCI_TRB_ENT_QUIRK); unsigned int num_trbs; unsigned int start_cycle, num_sgs = 0; unsigned int enqd_len, block_len, trb_buff_len, full_len; @@ -126,7 +126,7 @@ index 7fa27b403..c2fd2af7e 100644 + * transfer length of the first TRB isn't an + * integer multiple of the EP maxpacket. + */ -+ if (trb_buff_len % usb_endpoint_maxp(&urb->ep->desc)) ++ if (en_trb_ent && (trb_buff_len % usb_endpoint_maxp(&urb->ep->desc))) + en_trb_ent = false; } else field |= ring->cycle_state; @@ -135,7 +135,7 @@ index 7fa27b403..c2fd2af7e 100644 */ if (enqd_len + trb_buff_len < full_len) { field |= TRB_CHAIN; -+ if (xhci->quirks & XHCI_TRB_ENT_QUIRK && en_trb_ent) ++ if (en_trb_ent) + field |= TRB_ENT; if (trb_is_link(ring->enqueue + 1)) { if (xhci_align_td(xhci, urb, enqd_len,