提交 3fe4fe08 编写于 作者: A Andiry Xu 提交者: Sarah Sharp

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: NAndiry Xu <andiry.xu@amd.com>
Signed-off-by: NSarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: NPaul Zimmerman <Paul.Zimmerman@synopsys.com>
上级 3b72fca0
......@@ -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) {
......
......@@ -1262,6 +1262,7 @@ enum xhci_ring_type {
struct xhci_ring {
struct xhci_segment *first_seg;
struct xhci_segment *last_seg;
union xhci_trb *enqueue;
struct xhci_segment *enq_seg;
unsigned int enq_updates;
......@@ -1276,6 +1277,7 @@ struct xhci_ring {
*/
u32 cycle_state;
unsigned int stream_id;
unsigned int num_segs;
enum xhci_ring_type type;
bool last_td_was_short;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册