aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlban Browaeys <alban.browaeys@gmail.com>2016-08-16 03:18:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-16 03:42:47 -0400
commit0d2daaded82565f807a4435d678343f437b8b848 (patch)
tree3c3e62014f24134fe5a58ac9143bc6706f7641de /drivers/usb
parent33be126510974e2eb9679f1ca9bca4f67ee4c4c7 (diff)
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: Alban Browaeys <alban.browaeys@gmail.com> Fixes: 86065c2719a5 ("xhci: don't rely on precalculated value of needed trbs in the enqueue loop") Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci-ring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index fe5b70be61ba..fd9fd12e4861 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3244,7 +3244,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
3244 send_addr = addr; 3244 send_addr = addr;
3245 3245
3246 /* Queue the TRBs, even if they are zero-length */ 3246 /* Queue the TRBs, even if they are zero-length */
3247 for (enqd_len = 0; enqd_len < full_len; enqd_len += trb_buff_len) { 3247 for (enqd_len = 0; first_trb || enqd_len < full_len;
3248 enqd_len += trb_buff_len) {
3248 field = TRB_TYPE(TRB_NORMAL); 3249 field = TRB_TYPE(TRB_NORMAL);
3249 3250
3250 /* TRB buffer should not cross 64KB boundaries */ 3251 /* TRB buffer should not cross 64KB boundaries */