Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d2daade authored by Alban Browaeys's avatar Alban Browaeys Committed by Greg Kroah-Hartman
Browse files

xhci: really enqueue zero length TRBs.



Enqueue the first TRB even if full_len is zero.
Without this "adb install <apk>" freezes the system.

Signed-off-by: default avatarAlban Browaeys <alban.browaeys@gmail.com>
Fixes: 86065c27 ("xhci: don't rely on precalculated value of needed trbs in the enqueue loop")
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33be1265
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3244,7 +3244,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
	send_addr = addr;
	send_addr = addr;


	/* Queue the TRBs, even if they are zero-length */
	/* Queue the TRBs, even if they are zero-length */
	for (enqd_len = 0; enqd_len < full_len; enqd_len += trb_buff_len) {
	for (enqd_len = 0; first_trb || enqd_len < full_len;
			enqd_len += trb_buff_len) {
		field = TRB_TYPE(TRB_NORMAL);
		field = TRB_TYPE(TRB_NORMAL);


		/* TRB buffer should not cross 64KB boundaries */
		/* TRB buffer should not cross 64KB boundaries */