summaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 1699df9f2568..bdea4de867b4 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -154,6 +154,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
if (!ring)
return NULL;
+ ring->num_segs = num_segs;
INIT_LIST_HEAD(&ring->td_list);
ring->type = type;
if (num_segs == 0)
@@ -177,6 +178,7 @@ static struct xhci_ring *xhci_ring_alloc(struct xhci_hcd *xhci,
num_segs--;
}
xhci_link_segments(xhci, prev, ring->first_seg, type);
+ ring->last_seg = prev;
/* Only event ring does not use link TRB */
if (type != TYPE_EVENT) {