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

2017-07-11 Thread Shyam Sundar S K
On 6/22/2017 4:34 PM, Mathias Nyman wrote: > On 22.06.2017 13:44, Shyam Sundar S K wrote: >> >> On 6/19/2017 9:42 AM, Shyam Sundar S K wrote: >>> on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is >>> issued the controller does not respo

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

2017-06-22 Thread Shyam Sundar S K
On 6/22/2017 4:34 PM, Mathias Nyman wrote: > On 22.06.2017 13:44, Shyam Sundar S K wrote: >> >> On 6/19/2017 9:42 AM, Shyam Sundar S K wrote: >>> on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is >>> issued the controller does not respo

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

2017-06-22 Thread Shyam Sundar S K
On 6/19/2017 9:42 AM, 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

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

2017-06-18 Thread Shyam Sundar S K
oblem, its better we check the EP state and issue the stop EP command only when the EP is in running state. Also, with the inclusion of this patch, there maybe a possible race condition that may get triggered as mentioned in the xHCI spec 4.6.9 Signed-off-by: Shyam Sundar S K <shyam-sundar@am

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 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-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 comma

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

2017-06-01 Thread Shyam Sundar S K
is problem, its better we check the EP state and issue the stop EP command only when the EP is in running state. Signed-off-by: Shyam Sundar S K <shyam-sundar@amd.com> Signed-off-by: Nehal Shah <nehal-bakulchandra.s...@amd.com> --- drivers/usb/host/xhci-hub.c | 27 ++---

Re: [PATCH] usb: xhci: add quirk flag for broken stop command on AMD platforms

2017-05-25 Thread Shyam Sundar S K
On 5/22/2017 8:26 PM, Shyam Sundar S K wrote: > > On 5/22/2017 6:49 PM, Mathias Nyman wrote: >> On 22.05.2017 11:56, Shyam Sundar S K wrote: >>> Hi Mathias, >>> >>> >>> On 5/19/2017 12:43 PM, Mathias Nyman wrote: >>>> On 18.05.2017 16:4

Re: [PATCH] usb: xhci: add quirk flag for broken stop command on AMD platforms

2017-05-22 Thread Shyam Sundar S K
On 5/22/2017 6:49 PM, Mathias Nyman wrote: > On 22.05.2017 11:56, Shyam Sundar S K wrote: >> Hi Mathias, >> >> >> On 5/19/2017 12:43 PM, Mathias Nyman wrote: >>> On 18.05.2017 16:46, Alan Stern wrote: >>>> On Thu, 18 May 2017, Shyam Sundar S K wrot

Re: [PATCH] usb: xhci: add quirk flag for broken stop command on AMD platforms

2017-05-22 Thread Shyam Sundar S K
Hi Mathias, On 5/19/2017 12:43 PM, Mathias Nyman wrote: > On 18.05.2017 16:46, Alan Stern wrote: >> On Thu, 18 May 2017, Shyam Sundar S K wrote: >> >>> on AMD platforms with SNPS 3.1 USB controller has an issue >>> if the stop EP command is issued when the contr

[PATCH] usb: xhci: add quirk flag for broken stop command on AMD platforms

2017-05-18 Thread Shyam Sundar S K
that scenario does not happen. Signed-off-by: Shyam Sundar S K <shyam-sundar@amd.com> Signed-off-by: Nehal Shah <nehal-bakulchandra.s...@amd.com> --- drivers/usb/host/xhci-hub.c | 36 ++-- drivers/usb/host/xhci-pci.c | 8 drivers/usb/host/xhc