Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-16 Thread Mathias Nyman
On 16.06.2017 11:58, Shyam Sundar S K wrote: On 6/9/2017 4:15 PM, Mathias Nyman wrote: I think it's valid to check if the endpoint is already stopped from the endpoint context, and not queue a stop endpoint command for a already stopped endpoint. Especially as your hardware can't handle it.

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-16 Thread Shyam Sundar S K
On 6/9/2017 4:15 PM, Mathias Nyman wrote: > I think it's valid to check if the endpoint is already stopped from the > endpoint context, and not > queue a stop endpoint command for a already stopped endpoint. Especially as > your hardware can't handle it. > That code makes sense. > Thank you

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-09 Thread Mathias Nyman
On 09.06.2017 12:44, Shyam Sundar S K wrote: On 6/7/2017 4:45 PM, Mathias Nyman wrote: Hi The internal variable is just what xhci spec recommends as it says the output context is not immediately updated for example at endpoint doorbell ring. It's to make sure we don't read stale values from

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-09 Thread Shyam Sundar S K
On 6/7/2017 4:45 PM, Mathias Nyman wrote: > Hi > > The internal variable is just what xhci spec recommends as it says the output > context is not immediately > updated for example at endpoint doorbell ring. It's to make sure we don't > read stale values from the output context. > > The race

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-07 Thread Mathias Nyman
On 06.06.2017 13:22, Shyam Sundar S K wrote: On 6/2/2017 8:21 PM, Alan Stern wrote: On Fri, 2 Jun 2017, Shyam Sundar S K wrote: on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is issued the controller does not respond, when the EP is not in running state. HW completes

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-06 Thread Shyam Sundar S K
On 6/2/2017 8:21 PM, Alan Stern wrote: > On Fri, 2 Jun 2017, Shyam Sundar S K wrote: > >> on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is >> issued the controller does not respond, when the EP is not in running >> state. HW completes the command execution and reports >>

Re: [PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-02 Thread Alan Stern
On Fri, 2 Jun 2017, Shyam Sundar S K wrote: > on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is > issued the controller does not respond, when the EP is not in running > state. HW completes the command execution and reports > "Context State Error" completion code. This is

[PATCH v2] usb: xhci: Issue stop EP command only when the EP state is running

2017-06-01 Thread Shyam Sundar S K
on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is issued the controller does not respond, when the EP is not in running state. HW completes the command execution and reports "Context State Error" completion code. This is as per the spec. However HW on receiving the second