> From: Of David Laight
> Using TRB_CYCLE makes it clearer that the ring->cycle_state value is used when
> writing to the actual ring itself.
FWIW this patch is against Linus's tree.
This hunk probably fails to apply to some trees because the patch
to force TRB_CYCLE to be little endian hasn't got there yet.
> @@ -297,25 +294,19 @@ void xhci_free_or_cache_endpoint_ring(struct xhci_hcd
> *xhci,
> * pointers to the beginning of the ring.
> */
> static void xhci_reinit_cached_ring(struct xhci_hcd *xhci,
> - struct xhci_ring *ring, unsigned int cycle_state,
> - enum xhci_ring_type type)
> + struct xhci_ring *ring, enum xhci_ring_type type)
> {
> struct xhci_segment *seg = ring->first_seg;
> - int i;
>
> do {
> memset(seg->trbs, 0,
> sizeof(union xhci_trb)*TRBS_PER_SEGMENT);
> - if (cycle_state == 0) {
> - for (i = 0; i < TRBS_PER_SEGMENT; i++)
> - seg->trbs[i].link.control |= TRB_CYCLE;
> - }
> /* All endpoint rings have link TRBs */
> xhci_link_segments(xhci, seg, seg->next, type);
> seg = seg->next;
> } while (seg != ring->first_seg);
> ring->type = type;
> - xhci_initialize_ring_info(ring, cycle_state);
> + xhci_initialize_ring_info(ring);
> /* td list should be empty since all URBs have been cancelled,
> * but just in case...
> */
David
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html