Re: [PATCH] usb: xhci: Correct last context entry calculation for Configure Endpoint

From: Alan Stern
Date: Tue Apr 01 2014 - 18:01:25 EST


On Tue, 1 Apr 2014, Julius Werner wrote:

> > http://marc.info/?l=linux-usb&m=137158978503741&w=2
> >
> > There's an xHCI spec ambiguity: Does the last valid context entry refer
> > to the last valid endpoint context in the *input* device context or the
> > *output* device context?

It's not ambiguous at all. 6.2.2.2 clearly states:

A 'valid' Input Slot Context for a Configure Endpoint Command
requires the Context Entries field to be initialized to the
index of the last valid Endpoint Context that is defined by the
_target configuration_.

(my emphasis).

Thus, if the current config has ep0, ep1, and ep2 and the command drops
ep1, the Context Entries field should be set to the index of ep2 since
that is the last valid Endpoint Context in the target config (which
has only ep0 and ep2).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/