aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/xhci-ring.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index f692e74f269c..d42a738cdaa7 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -183,13 +183,14 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, bool consumer
183 while (last_trb(xhci, ring, ring->enq_seg, next)) { 183 while (last_trb(xhci, ring, ring->enq_seg, next)) {
184 if (!consumer) { 184 if (!consumer) {
185 if (ring != xhci->event_ring) { 185 if (ring != xhci->event_ring) {
186 next->link.control &= ~TRB_CHAIN;
187 next->link.control |= chain;
186 /* Give this link TRB to the hardware */ 188 /* Give this link TRB to the hardware */
189 wmb();
187 if (next->link.control & TRB_CYCLE) 190 if (next->link.control & TRB_CYCLE)
188 next->link.control &= (u32) ~TRB_CYCLE; 191 next->link.control &= (u32) ~TRB_CYCLE;
189 else 192 else
190 next->link.control |= (u32) TRB_CYCLE; 193 next->link.control |= (u32) TRB_CYCLE;
191 next->link.control &= ~TRB_CHAIN;
192 next->link.control |= chain;
193 } 194 }
194 /* Toggle the cycle bit after the last ring segment. */ 195 /* Toggle the cycle bit after the last ring segment. */
195 if (last_trb_on_last_seg(xhci, ring, ring->enq_seg, next)) { 196 if (last_trb_on_last_seg(xhci, ring, ring->enq_seg, next)) {