usb: xhci: remove enq_updates and deq_updates from ring
enq_updates and deq_updates were introduced in the first place to check whether an xhci hardware is able to respond to trbs enqueued in the ring. We now have trb tracers to trace every single enqueue/dequeue trb. It's time to remove them and the associated debugging code. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
74e0b5649c
commit
cd12fd9f6d
|
@ -347,14 +347,10 @@ void xhci_dbg_ring_ptrs(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
||||||
ring->dequeue,
|
ring->dequeue,
|
||||||
(unsigned long long)xhci_trb_virt_to_dma(ring->deq_seg,
|
(unsigned long long)xhci_trb_virt_to_dma(ring->deq_seg,
|
||||||
ring->dequeue));
|
ring->dequeue));
|
||||||
xhci_dbg(xhci, "Ring deq updated %u times\n",
|
|
||||||
ring->deq_updates);
|
|
||||||
xhci_dbg(xhci, "Ring enq = %p (virt), 0x%llx (dma)\n",
|
xhci_dbg(xhci, "Ring enq = %p (virt), 0x%llx (dma)\n",
|
||||||
ring->enqueue,
|
ring->enqueue,
|
||||||
(unsigned long long)xhci_trb_virt_to_dma(ring->enq_seg,
|
(unsigned long long)xhci_trb_virt_to_dma(ring->enq_seg,
|
||||||
ring->enqueue));
|
ring->enqueue));
|
||||||
xhci_dbg(xhci, "Ring enq updated %u times\n",
|
|
||||||
ring->enq_updates);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -373,10 +369,6 @@ void xhci_debug_ring(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
||||||
struct xhci_segment *first_seg = ring->first_seg;
|
struct xhci_segment *first_seg = ring->first_seg;
|
||||||
xhci_debug_segment(xhci, first_seg);
|
xhci_debug_segment(xhci, first_seg);
|
||||||
|
|
||||||
if (!ring->enq_updates && !ring->deq_updates) {
|
|
||||||
xhci_dbg(xhci, " Ring has not been updated\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (seg = first_seg->next; seg != first_seg; seg = seg->next)
|
for (seg = first_seg->next; seg != first_seg; seg = seg->next)
|
||||||
xhci_debug_segment(xhci, seg);
|
xhci_debug_segment(xhci, seg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -315,9 +315,6 @@ static void xhci_initialize_ring_info(struct xhci_ring *ring,
|
||||||
* handling ring expansion, set the cycle state equal to the old ring.
|
* handling ring expansion, set the cycle state equal to the old ring.
|
||||||
*/
|
*/
|
||||||
ring->cycle_state = cycle_state;
|
ring->cycle_state = cycle_state;
|
||||||
/* Not necessary for new rings, but needed for re-initialized rings */
|
|
||||||
ring->enq_updates = 0;
|
|
||||||
ring->deq_updates = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Each segment has a link TRB, and leave an extra TRB for SW
|
* Each segment has a link TRB, and leave an extra TRB for SW
|
||||||
|
|
|
@ -167,8 +167,6 @@ static void next_trb(struct xhci_hcd *xhci,
|
||||||
*/
|
*/
|
||||||
static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
static void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring)
|
||||||
{
|
{
|
||||||
ring->deq_updates++;
|
|
||||||
|
|
||||||
/* event ring doesn't have link trbs, check for last trb */
|
/* event ring doesn't have link trbs, check for last trb */
|
||||||
if (ring->type == TYPE_EVENT) {
|
if (ring->type == TYPE_EVENT) {
|
||||||
if (!last_trb_on_seg(ring->deq_seg, ring->dequeue)) {
|
if (!last_trb_on_seg(ring->deq_seg, ring->dequeue)) {
|
||||||
|
@ -226,7 +224,6 @@ static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring,
|
||||||
ring->num_trbs_free--;
|
ring->num_trbs_free--;
|
||||||
next = ++(ring->enqueue);
|
next = ++(ring->enqueue);
|
||||||
|
|
||||||
ring->enq_updates++;
|
|
||||||
/* Update the dequeue pointer further if that was a link TRB */
|
/* Update the dequeue pointer further if that was a link TRB */
|
||||||
while (trb_is_link(next)) {
|
while (trb_is_link(next)) {
|
||||||
|
|
||||||
|
|
|
@ -1566,10 +1566,8 @@ struct xhci_ring {
|
||||||
struct xhci_segment *last_seg;
|
struct xhci_segment *last_seg;
|
||||||
union xhci_trb *enqueue;
|
union xhci_trb *enqueue;
|
||||||
struct xhci_segment *enq_seg;
|
struct xhci_segment *enq_seg;
|
||||||
unsigned int enq_updates;
|
|
||||||
union xhci_trb *dequeue;
|
union xhci_trb *dequeue;
|
||||||
struct xhci_segment *deq_seg;
|
struct xhci_segment *deq_seg;
|
||||||
unsigned int deq_updates;
|
|
||||||
struct list_head td_list;
|
struct list_head td_list;
|
||||||
/*
|
/*
|
||||||
* Write the cycle state into the TRB cycle field to give ownership of
|
* Write the cycle state into the TRB cycle field to give ownership of
|
||||||
|
|
Loading…
Reference in New Issue