Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Alan Stern
On Thu, 26 Feb 2015, Mathias Nyman wrote: > On 26.02.2015 16:57, Alan Stern wrote: > > On Thu, 26 Feb 2015, Mathias Nyman wrote: > > > >> I'm starting to like your idea of setting the urb->actual_length in > >> advance, > >> It may actually simplify things. > > > > But it will make unlinking mo

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Mathias Nyman
On 26.02.2015 16:57, Alan Stern wrote: > On Thu, 26 Feb 2015, Mathias Nyman wrote: > >> I'm starting to like your idea of setting the urb->actual_length in advance, >> It may actually simplify things. > > But it will make unlinking more difficult. Also, what will you do if > there is more than

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Alan Stern
On Thu, 26 Feb 2015, Mathias Nyman wrote: > I'm starting to like your idea of setting the urb->actual_length in advance, > It may actually simplify things. But it will make unlinking more difficult. Also, what will you do if there is more than one TRB? Alan Stern -- To unsubscribe from this l

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-26 Thread Mathias Nyman
... > > The second event is always COMP_SUCCESS and the event->transfer_len is > always set to 0 in that one. The 3 cases I've seen are: > > case 1: 1 event on last TRB > COMP_SUCCESS, event->len=0 > > case 2: short event but with data > COMP_SHORT_TX, event->len < urb->transfer_buffer_len

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-25 Thread Aleksander Morgado
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. There

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-25 Thread Mathias Nyman
On 23.02.2015 19:02, Aleksander Morgado wrote: > On Mon, Feb 23, 2015 at 4:23 PM, Mathias Nyman > wrote: >> Hi >> >> On 23.02.2015 13:52, Aleksander Morgado wrote: >>> When a control transfer has a short data stage, the xHCI controller >>> generates >>> two transfer events: a COMP_SHORT_TX event

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-23 Thread Aleksander Morgado
On Mon, Feb 23, 2015 at 4:23 PM, Mathias Nyman wrote: > Hi > > On 23.02.2015 13:52, Aleksander Morgado 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_SUCCES

Re: [PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-23 Thread Mathias Nyman
Hi On 23.02.2015 13:52, Aleksander Morgado 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 > CO

[PATCH v3] xhci: fix reporting of 0-sized URBs in control endpoint

2015-02-23 Thread Aleksander Morgado
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 must set urb->act