Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Alan Stern
On Mon, 2 Mar 2015, Aleksander Morgado wrote: I think my patch also lacks the -EREMOTEIO return for the case when 0 bytes are transferred. I'll try to update it today. It's not necessary. The USB core automatically sets the status to -EREMOTEIO if the status is equal to 0 and the transfer

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Mathias Nyman
On 26.02.2015 20:01, Alan Stern wrote: On Thu, 26 Feb 2015, Mathias Nyman wrote: On 26.02.2015 18:12, Mathias Nyman wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Mathias Nyman
On 26.02.2015 23:59, Aleksander Morgado wrote: On Thu, Feb 26, 2015 at 5:12 PM, Mathias Nyman mathias.ny...@linux.intel.com wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount,

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Aleksander Morgado
On Mon, Mar 2, 2015 at 12:57 PM, Mathias Nyman mathias.ny...@linux.intel.com wrote: On 26.02.2015 23:59, Aleksander Morgado wrote: On Thu, Feb 26, 2015 at 5:12 PM, Mathias Nyman mathias.ny...@linux.intel.com wrote: When a control transfer has a short data stage, the xHCI controller generates

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Alan Stern
On Mon, 2 Mar 2015, Aleksander Morgado wrote: On Mon, Mar 2, 2015 at 4:02 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 2 Mar 2015, Aleksander Morgado wrote: I think my patch also lacks the -EREMOTEIO return for the case when 0 bytes are transferred. I'll try to update it

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Aleksander Morgado
On Mon, Mar 2, 2015 at 4:02 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 2 Mar 2015, Aleksander Morgado wrote: I think my patch also lacks the -EREMOTEIO return for the case when 0 bytes are transferred. I'll try to update it today. It's not necessary. The USB core automatically

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-03-02 Thread Alan Stern
On Mon, 2 Mar 2015, Aleksander Morgado wrote: On Mon, Mar 2, 2015 at 6:10 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, Mar 2, 2015 at 4:02 PM, Alan Stern st...@rowland.harvard.edu wrote: On Mon, 2 Mar 2015, Aleksander Morgado wrote: I think my patch also lacks the

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-27 Thread Aleksander Morgado
On Thu, Feb 26, 2015 at 5:12 PM, Mathias Nyman mathias.ny...@linux.intel.com wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the data stage

[RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Mathias Nyman
When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the data stage is not short, only the COMP_SUCCESS event occurs. Therefore, xhci-hcd sets

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Mathias Nyman
On 26.02.2015 18:12, Mathias Nyman wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the data stage is not short, only the COMP_SUCCESS

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Alan Stern
On Thu, 26 Feb 2015, Mathias Nyman wrote: On 26.02.2015 18:12, Mathias Nyman wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the

Re: [RFC PATCH] xhci: fix reporting of 0-sized URBs in control endpoints

2015-02-26 Thread Aleksander Morgado
On Thu, Feb 26, 2015 at 5:12 PM, Mathias Nyman mathias.ny...@linux.intel.com wrote: When a control transfer has a short data stage, the xHCI controller generates two transfer events: a COMP_SHORT_TX event that specifies the untransferred amount, and a COMP_SUCCESS event. But when the data stage