diff options
author | Andiry Xu <andiry.xu@amd.com> | 2012-03-05 13:49:33 +0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2012-03-13 20:29:46 +0400 |
commit | 3fe4fe083d3355537565b2b0a678807513dfa013 (patch) | |
tree | 69b30ecc405abdc1c5799db3147574edc6c1334d /drivers/usb/host/xhci-mem.c | |
parent | 3b72fca09d7aed0c1a390370eb3f3f4f0480702a (diff) | |
download | linux-3fe4fe083d3355537565b2b0a678807513dfa013.tar.xz |
xHCI: store ring's last segment and segment numbers
Store the ring's last segment pointer and number of segments for ring
expansion usage.
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 2 |
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) { |