Re: [PATCH 2/2] xhci: fix last valid endpoint when dropping an endpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 11, 2013 at 07:30:17PM +0300, Xenia Ragiadakou wrote:
> On 10/11/2013 11:40 AM, Xenia Ragiadakou wrote:
> >[snip]
> >The main reasons that made me come to this conclusion was the fact
> >that Context Entries by being updated with a value other than the
> >last valid endpoint will be inconsistent with the definition in
> >xhci spec (revision 1.0 5/21/10) "Context Entries. This field
> >identifies the index of the last valid Endpoint Context within
> >this Device Context structure." and that in 6.4.3.8 Stop Endpoint
> >Command TRB field definitions for Endpoint ID field it states that
> >"Valid values are ‘1’ to Slot Context Context Entries", from which
> >i hypothesize that when Context Entries are set with a smaller
> >value a subsequent Stop Command to an endpoint with higher index
> >will fail.
> >
> >I compile now to see if that actually can happen. However, the
> >best person to answer this question is an xHC architect. Will the
> >xHC take under consideration the value in Context Entries field of
> >the Output Slot Context only when a Configure Endpoint command is
> >issued or also for other commands in order to check if the
> >endpoint affected by the command is a valid endpoint?
> >
> 
> To test if a smaller value will cause a problem, I reset first
> endpoint 4 and, then, endpoint 3 so that the Context Entries field
> get updated with the value 3 while the actual last valid endpoint is
> 4.

Did you happen to see what the Context Entries field in the Output Slot
Context was after the command finished?  I would expect it to remain at
4, even though the Context Entries field in the Input Slot Context would
have been 3.

> Endpoint 4 is a BULK OUT endpoint so I checked if I could write to
> the device. I didn't experience any issues when writing.
> Then, I issued a Stop Endpoint command to EP 4 and although its
> number is higher than the number kept in Context Entries field, the
> Stop Endpoint command completed successfully.
> Then, I issued a Set TR Dequeue pointer command to EP 4 and also
> completed successfully.
> At last, I issued a Disable Slot command to see if all the Endpoint
> Contexts for the slot will be disabled and not only those in the
> range of Context Entries and indeed all of them were disabled.
> 
> So, I guess that my changelog was unreasonably ominous and that the
> patch can be dropped.

Ok, I'll drop it, and notify the testers they don't need the second
patch.

> From the above it seems that xHC does not update with the vallue in
> the Context Entries field of the Input Slot Context any internal
> register used in determining currently valid endpoints.

The Output Slot Context Entries should still reflect which endpoints the
hardware thinks are currently valid.

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux