against uvc_v4l2_streamon, or by userspace neglecting to issue
the VIDIOC_STREAMOFF ioctl.
To fix this, add two more uvc states: starting and stopping. Use these
to prevent the racing, and to detect when VIDIOC_STREAMON is issued
without previously issuing VIDIOC_STREAMOFF.
Signed-off-by: Paul
mon/off is called in between this return and
increment, uvc_function_setup_continue within uvc_v4l2_streamon/off will
WARN that cdev->delayed_status is zero.
To fix situations like this, add a function to increment
cdev->delayed_status.
Signed-off-by: Paul Elder
---
drivers/usb/gadget/compos
ad of USB_GADGET_DELAYED_STATUS.
Finally, there is another way to trigger the aforementioned BUG: start
streaming and (physically) disconnect usb. To fix this, call
uvcg_video_enable 0 in uvc_function_disable.
Paul Elder (4):
usb: gadget: uvc: synchronize streamon/off with uvc_function_set_alt
usb: g
x this, use usb_composite_setup_delay to increment
cdev->delayed_status, and then return 0 so that composite_setup doesn't
increment cdev->delayed_status again.
Signed-off-by: Paul Elder
---
drivers/usb/gadget/function/f_uvc.c| 13 -
drivers/usb/gadget/function/uvc_
physically
disconnecting usb. To fix this, do the streamoff procedures on usb
disconnect.
Signed-off-by: Paul Elder
---
drivers/usb/gadget/function/f_uvc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uvc.c
b/drivers/usb/gadget/function/f_uvc.c
index 3324d36e809c
I'm sorry; I sent this one again only because I realized I accidentally
truncated the subject line on the original cover letter.
On Tue, Apr 17, 2018 at 11:20:15PM -0400, Paul Elder wrote:
> Down the call stack from the ioctl handler for VIDIOC_STREAMON,
> uvc_video_alloc_requests
Also forgot to mention that I did this against 4.16. From what I can
tell, only drivers/usb/gadget/composite.c has changed between then and
4.17-rc1 :/
On Tue, Apr 17, 2018 at 11:18:12PM -0400, Paul Elder wrote:
> Down the call stack from the ioctl handler for VIDIOC_STREA
o fix this, call
uvcg_video_enable 0 in uvc_function_disable.
Changes in v2:
1. Remove delay usb status phase
Paul Elder (3):
usb: gadget: uvc: synchronize streamon/off with uvc_function_set_alt
usb: gadget: uvc: remove delay usb status phase from uvc
usb: gadget: uvc: disable s
physically
disconnecting usb. To fix this, do the streamoff procedures on usb
disconnect.
Signed-off-by: Paul Elder
---
Changes in v2: Nothing
drivers/usb/gadget/function/f_uvc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uvc.c
b/drivers/usb/gadget/function
against uvc_v4l2_streamon, or by userspace neglecting to issue
the VIDIOC_STREAMOFF ioctl.
To fix this, add two more uvc states: starting and stopping. Use these
to prevent the racing, and to detect when VIDIOC_STREAMON is issued
without previously issuing VIDIOC_STREAMOFF.
Signed-off-by: Paul
The completion of the usb status phase doesn't need to be delayed
from uvc_function_set_alt to uvc_v4l2_streamon/off.
Remove USB_GADGET_DELAYED_STATUS and usb_composite_setup_delay from
these two, respectively.
Signed-off-by: Paul Elder
---
Changes in v2:
1. Remove delay usb status
Hello Felipe,
We have discovered an issue in MUSB gadget when receiving control OUT
transfers. I have specifically observed it very frequently on the second
SET_CUR UVC request when trying to stream video with yavta from a UVC
gadget.
What happens is that in the DATA phase, the controller copies
Hi Alan,
On Mon, Jul 02, 2018 at 04:03:34PM -0400, Alan Stern wrote:
> On Mon, 2 Jul 2018, Laurent Pinchart wrote:
>
> > Hi Alan,
> >
> > On Monday, 2 July 2018 18:13:27 EEST Alan Stern wrote:
> > > On Mon, 2 Jul 2018, Paul Elder wrote:
> > > > Hell
On Tue, Jul 10, 2018 at 11:23:50AM -0400, Alan Stern wrote:
> On Tue, 10 Jul 2018, Paul Elder wrote:
>
> > > > Are there other mechanisms ? If there are no other
> > > > mechanism, I won't be able to validate the DATA stage in userspace as I
> > > &g
es:
Looks good to me.
Reviewed-by: Paul Elder
Tested-by: Paul Elder
> ---
> drivers/usb/gadget/function/uvc_video.c | 30 --
> 1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/uvc_video.c
> b/driver
using the correct format to
> print unsigned int values.
For the whole series:
Looks good to me.
Reviewed-by: Paul Elder
Tested-by: Paul Elder
> Laurent Pinchart (4):
> usb: video: Fix endianness mismatches in descriptor structures
> usb: gadget: uvc: configfs: Fix operat
SoC/USBSniffer
I have forward-ported this patch from 2.6.34 to 4.19-rc1.
Signed-off-by: Paul Elder
---
drivers/usb/musb/musb_gadget.c | 21 ++---
drivers/usb/musb/musbhsdma.c | 21 +++--
2 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/m
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
include/uapi/linux/usb/g_uvc.h | 3 ++-
3 files changed, 6 insertions(+), 1 deletio
This patch implements a mechanism to signal the MUSB driver to reply to
a control OUT request with STALL or ACK.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
drivers/usb/musb/musb_gadget_ep0.c | 41 ++
1 file changed, 41 insertions(+)
diff --git a
control OUT request sends a response to the data stage,
and so the ioctl now notifies the UDC driver to reply with STALL or ACK.
In the case of a control IN request, the ioctl sends the UVC data as
before.
Also tell the UDC to delay the status stage for this to work.
Signed-off-by: Paul Elder
ned for a long time
again shows that it isn't being used.
The conclusion is that since the API hasn't been used for a long time,
it is safe to fix it.
Paul Elder (6):
usb: uvc: include videodev2.h in g_uvc.h
usb: gadget: uvc: enqueue usb request in setup handler for control OUT
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb/g_uvc.h
index 3c9ee3020cbb..6698c3263ae8 100644
--- a/include/uapi/linux/usb
called by function drivers to tell the UDC what to
reply in the status stage that it has requested to be delayed.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
drivers/usb/gadget/udc/core.c | 35 +++
include/linux/usb/gadget.h| 11 +++
2 files ch
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
drivers/usb/gadget/function/f_uvc.c| 25 +++--
drivers
Hi Bin,
On Thu, Oct 11, 2018 at 11:07:46AM -0500, Bin Liu wrote:
> Hi,
>
> On Tue, Oct 09, 2018 at 10:49:02PM -0400, Paul Elder wrote:
> > This patch implements a mechanism to signal the MUSB driver to reply to
> > a control OUT request with STALL or ACK.
> >
&g
Hi Alan,
On Thu, Oct 18, 2018 at 10:07:36AM -0400, Alan Stern wrote:
> On Thu, 18 Oct 2018, Laurent Pinchart wrote:
>
> > Hi Bin,
> >
> > On Thursday, 11 October 2018 19:10:21 EEST Bin Liu wrote:
> > > On Tue, Oct 09, 2018 at 10:49:01PM -0400, Paul Elder wro
On Tue, Oct 09, 2018 at 02:32:20AM -0400, Paul Elder wrote:
> Handling short packets (length < max packet size) in the Inventra DMA
> engine in the MUSB driver causes the MUSB DMA controller to hang. An
> example of a problem that is caused by this problem is when streaming
> vid
st(gadget->ep0, GFP_ATOMIC);
> if (req) {
> req->length = 0;
> req->no_implicit_status = 1;
> req->complete = /* req's deallocation routine */
> usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
> }
> }
>
> Then all a UDC driver would need to do is call
> usb_gadget_control_complete() after invoking a control request's
> completion handler. The no_implicit_status and status arguments would
> be taken from the request that was just completed.
>
> With this one call added to each UDC, all the existing function drivers
> would work correctly. Even though they don't explicitly queue
> status-stage requests, the new routine will do so for them,
> transparently. Function drivers that want to handle their own
> status-stage requests explicitly will merely have to set the
> req->no_implicit_status bit.
I think this is a good idea. We still get the benefits of explicit
status stage without being overly intrusive in the conversion, and we
maintain the queue-based API.
Would it be fine for me to proceed in this direction for a v2?
> (We might or might not need to watch out for 0-length control-OUT
> transfers. Function drivers _do_ queue status-stage requests for
> those.)
Thanks,
Paul Elder
.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
---
Changes from v1:
Complete change of API. Now we use a flag that should be set in the
usb_request that is queued for the data stage to signal to the UDC that
we want to delay the status stage (as opposed to setting a flag in the
UDC
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
control OUT request sends a response to the data stage,
and so the ioctl now notifies the UDC driver to reply with STALL or ACK.
In the case of a control IN request, the ioctl sends the UVC data as
before.
Also tell the UDC to delay the status stage for this to work.
Signed-off-by: Paul Elder
f
the usb_request is for the status stage and if it has been requested to
be explicit, and if so check the status that should be sent. (See 5/6
"usb: musb: gadget: implement optional explicit status stage" for an
implementation for MUSB)
Paul Elder (6):
usb: uvc: include videodev2
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v1
drivers/usb/gadget/function/f_uvc.c| 25
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb/g_uvc.h
index 3c9ee3020cbb..6698c3263ae8 100644
--- a
We only have uvcg_dbg, uvcg_info, and uvcg_err, so add uvcg_warn macro
to print gadget device name and function name along with format.
Signed-off-by: Paul Elder
---
drivers/usb/gadget/function/uvc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/uvc.h
b
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
include/uapi/linux/usb/g_uvc.h | 3 ++-
3 files changed, 6 insert
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v2
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb/g_uvc.h
index 3c9ee3020cbb..6698c3263ae8
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
---
Changes from v2:
Add status parameter to usb_gadget_control_complete, so that a
usb_request is not queued if the status of the just given back request
is nonzero.
Changes from v1:
Complete change of API. Now we use a flag that should be
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c| 25
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
include/uapi/linux/usb/g_uvc.h | 3 ++-
3 files
t is for the status stage and if it has been requested to
be explicit, and if so check the status that should be sent. (See 5/6
"usb: musb: gadget: implement optional explicit status stage" for an
implementation for MUSB)
Paul Elder (6):
usb: uvc: include videodev2.h in g_uvc.h
u
control OUT request sends a response to the data stage,
and so the ioctl now notifies the UDC driver to reply with STALL or ACK.
In the case of a control IN request, the ioctl sends the UVC data as
before.
Also tell the UDC to delay the status stage for this to work.
Signed-off-by: Paul Elder
On Wed, Dec 19, 2018 at 11:01:52AM -0500, Alan Stern wrote:
> On Wed, 19 Dec 2018, Paul Elder wrote:
>
> > A usb gadget function driver may or may not want to delay the status
> > stage of a control OUT request. An instance it m
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
be explicit, and if so check the status that should be sent. (See 5/6
"usb: musb: gadget: implement optional explicit status stage" for an
implementation for MUSB)
Paul Elder (6):
usb: uvc: include videodev2.h in g_uvc.h
usb: gadget: uvc: enqueue usb request in setup handler for con
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v3
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
include/uapi/linux/usb/g_uvc.h
IN ACK the host's zero-length
data packet, or for control OUT send a zero-length DATA1 ACK packet.
Signed-off-by: Paul Elder
Acked-by: Alan Stern
v1 Reviewed-by: Laurent Pinchart
---
Changes from v3:
- More specific in commit message about what to do for udc driver acking
- Set explicit_s
control OUT request sends a response to the data stage,
and so the ioctl now notifies the UDC driver to reply with STALL or ACK.
In the case of a control IN request, the ioctl sends the UVC data as
before.
Also tell the UDC to delay the status stage for this to work.
Signed-off-by: Paul Elder
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v3
No change from v2
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb/g_uvc.h
index
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v3
No change from v2
No change from v1
drivers/usb/gadget
9, 2018 at 02:32:20AM -0400, Paul Elder wrote:
> > Handling short packets (length < max packet size) in the Inventra DMA
> > engine in the MUSB driver causes the MUSB DMA controller to hang. An
> > example of a problem that is caused by this problem is when streaming
> >
On Sun, Jan 06, 2019 at 03:03:09PM -0500, Alan Stern wrote:
> On Sun, 6 Jan 2019, Paul Elder wrote:
>
> > Implement the mechanism for optional explicit status stage for the MUSB
> > driver. This allows a function driver to specify what to reply for the
> > status stage.
usb_gadget_giveback_request, and in its queue function should check if
the usb_request is for the status stage and if it has been requested to
be explicit, and if so check the status that should be sent. (See 5/6
"usb: musb: gadget: implement optional explicit status stage" for an
implem
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
control OUT request sends a response to the data stage,
and so the ioctl now notifies the UDC driver to reply with STALL or ACK.
In the case of a control IN request, the ioctl sends the UVC data as
before.
Also tell the UDC to delay the status stage for this to work.
Signed-off-by: Paul Elder
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v4
No change from v3
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
include/uapi/linux/u
ard-usbsniffer:beagleboard-usbsniffer-kernel.git;a=patch;h=b0be3b6cc195ba732189b04f1d43ec843c3e54c9
[2]
http://beagleboard-usbsniffer.blogspot.com/2010/07/musb-isochronous-transfers-fixed.html
[3] http://elinux.org/BeagleBoard/GSoC/USBSniffer
Signed-off-by: Paul Elder
---
Changes in v2:
- no more flushing F
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v4
No change from v3
No change from v2
No change from v1
drivers
1 ACK packet.
Signed-off-by: Paul Elder
v4 Acked-by: Alan Stern
v1 Reviewed-by: Laurent Pinchart
---
Changes from v4:
- Change parameter of usb_gadget_control_complete to simply take a
usb_request
- Make usb_gadget_control_complete do nothing if the request has no
length (ie. no data stage)
Ch
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v4
No change from v3
No change from v2
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include/uapi/linux/usb
. To fix this, do the streamoff procedures on usb
disconnect. Since uvcg_video_enable is not interrupt-safe, add an
interrupt-safe version uvcg_video_cancel, and use that.
Signed-off-by: Paul Elder
v2 Reviewed-by: Kieran Bingham
---
Changes in v3:
- added interrupt-safe uvcg_video_cancel and used
Defined in uvc.h, uvc_endpoint_stream doesn't exist, and
uvc_function_connect, uvc_function_disconnect, and
uvc_function_setup_continue have duplicates in f_uvc.h.
Remove these four function prototypes from uvc.h
Signed-off-by: Paul Elder
---
drivers/usb/gadget/function/uvc.h | 10
dify the status
phase delay API to fix the race condition.
Signed-off-by: Paul Elder
---
Changes in v3: Nothing
Changes in v2:
1. Remove delay usb status phase
drivers/usb/gadget/function/f_uvc.c| 3 ++-
drivers/usb/gadget/function/uvc_v4l2.c | 6 --
2 files changed, 2 insertions(
ff
- added interrupt-safe uvcg_video_cancel and used instead of the
non-interrupt-save uvcg_video_enable 0 in uvc_function_disable
Changes in v2:
1. Remove delay usb status phase
Paul Elder (4):
usb: gadget: uvc: synchronize streamon/off with uvc_function_set_alt
usb: gadget: uvc: don
when userspace neglects to issue the
VIDIOC_STREAMOFF ioctl.
To fix this, add two more uvc states: starting and stopping. Use these
to prevent the racing, and to detect when VIDIOC_STREAMON is issued
without previously issuing VIDIOC_STREAMOFF.
Signed-off-by: Paul Elder
---
Changes in v3:
- add
Hi Bin,
On Wed, Jan 09, 2019 at 09:02:15AM -0600, Bin Liu wrote:
> Hi Paul,
>
> On Wed, Jan 09, 2019 at 02:10:09AM -0500, Paul Elder wrote:
> > Handling short packets (length < max packet size) in the Inventra DMA
> > engine in the MUSB driver causes the MUSB DM
On Wed, Jan 09, 2019 at 02:06:31PM -0500, Alan Stern wrote:
> On Wed, 9 Jan 2019, Paul Elder wrote:
>
> > A usb gadget function driver may or may not want to delay the status
> > stage of a control OUT request. An instance where it might want to is to
> > asynchronousl
On Thu, Jan 10, 2019 at 03:39:25PM -0500, Alan Stern wrote:
> On Wed, 9 Jan 2019, Paul Elder wrote:
>
> > This patch series adds a mechanism to allow asynchronously validating
> > the data stage of a control OUT request, and for stalling or suceeding
> > the request accord
On Fri, Jan 11, 2019 at 10:50:11AM -0500, Alan Stern wrote:
> On Fri, 11 Jan 2019, Paul Elder wrote:
>
> > On Wed, Jan 09, 2019 at 02:06:31PM -0500, Alan Stern wrote:
> > > On Wed, 9 Jan 2019, Paul Elder wrote:
> > >
> > > > A usb gadget function driv
ard-usbsniffer:beagleboard-usbsniffer-kernel.git;a=patch;h=b0be3b6cc195ba732189b04f1d43ec843c3e54c9
[2]
http://beagleboard-usbsniffer.blogspot.com/2010/07/musb-isochronous-transfers-fixed.html
[3] http://elinux.org/BeagleBoard/GSoC/USBSniffer
Signed-off-by: Paul Elder
---
Changes in v3:
- remove unnecess
On Mon, Jan 14, 2019 at 10:24:44AM -0500, Alan Stern wrote:
> On Mon, 14 Jan 2019, Paul Elder wrote:
>
> > > > > Can you check your uvc
> > > > > changes using dummy_hcd with the patch below?
> > > >
> > > > I'm not sure what to
On Wed, Jan 16, 2019 at 10:06:53AM -0500, Alan Stern wrote:
> On Wed, 16 Jan 2019, Paul Elder wrote:
>
> > On Mon, Jan 14, 2019 at 10:24:44AM -0500, Alan Stern wrote:
> > > On Mon, 14 Jan 2019, Paul Elder wrote:
> > >
> > > > > > > Can you c
On Fri, Jan 18, 2019 at 11:52:57AM -0500, Alan Stern wrote:
> On Fri, 18 Jan 2019, Paul Elder wrote:
>
> > > > I meant the functions (procedures) in the function driver, so the setup
> > > > handler (uvc_function_setup), the completion handler
> > > > (
1 ACK packet.
Signed-off-by: Paul Elder
v4 Acked-by: Alan Stern
v1 Reviewed-by: Laurent Pinchart
---
No change from v5
Changes from v4:
- Change parameter of usb_gadget_control_complete to simply take a
usb_request
- Make usb_gadget_control_complete do nothing if the request has no
length (i
gadget driver aware of if the
completion handler is called for the status stage, and do nothing (as
opposed to giving userspace the UVC data again).
Signed-off-by: Paul Elder
---
Changes from v5:
- add event_status flag and use to keep track of whether or not the
gadget is in the status stage
: implement optional explicit status stage" for an
implementation for MUSB)
Paul Elder (6):
usb: uvc: include videodev2.h in g_uvc.h
usb: gadget: uvc: enqueue usb request in setup handler for control OUT
usb: gadget: uvc: package setup and data for control OUT requests
usb: gadget:
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v5
No change from v4
No change from v3
No change from v2
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb/g_uvc.h b/include
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v5
No change from v4
No change from v3
No change from v2
No change
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v5
No change from v4
No change from v3
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/function/uvc.h | 1 +
in
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
On Wed, Jan 23, 2019 at 04:10:12PM -0500, Alan Stern wrote:
> On Mon, 14 Jan 2019, Paul Elder wrote:
>
> > On Fri, Jan 11, 2019 at 10:50:11AM -0500, Alan Stern wrote:
> > > On Fri, 11 Jan 2019, Paul Elder wrote:
> > >
> > > > On Wed, Jan 09,
videodev2.h in g_uvc.h.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v6
No change from v5
No change from v4
No change from v3
No change from v2
No change from v1
include/uapi/linux/usb/g_uvc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/usb
handler to be able to read it and send it to
userspace.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v6
No change from v5
No change from v4
No change from v3
No change from v2
No change from v1
drivers/usb/gadget/function/f_uvc.c | 3 +++
drivers/usb/gadget/func
, to reply with a STALL).
This problem is remedied by having the setup handler enqueue the empty
uvc request data, instead of waiting for userspace to do it.
Signed-off-by: Paul Elder
Reviewed-by: Laurent Pinchart
---
No change from v6
No change from v5
No change from v4
No change from v3
No change
has been requested to
be explicit, and if so check the status that should be sent. (See 5/6
"usb: musb: gadget: implement optional explicit status stage" for an
implementation for MUSB)
Paul Elder (6):
usb: uvc: include videodev2.h in g_uvc.h
usb: gadget: uvc: enqueue usb requ
Implement the mechanism for optional explicit status stage for the MUSB
driver. This allows a function driver to specify what to reply for the
status stage. The functionality for an implicit status stage is
retained.
Signed-off-by: Paul Elder
v1 Reviewed-by: Laurent Pinchart
v1 Acked-by: Bin
gadget driver aware of if the
completion handler is called for the status stage, and do nothing (as
opposed to giving userspace the UVC data again).
Signed-off-by: Paul Elder
---
No change from v6
Changes from v5:
- add event_status flag and use to keep track of whether or not the
gadget is
1 ACK packet.
Signed-off-by: Paul Elder
v4 Acked-by: Alan Stern
v1 Reviewed-by: Laurent Pinchart
---
No change from v6
No change from v5
Changes from v4:
- Change parameter of usb_gadget_control_complete to simply take a
usb_request
- Make usb_gadget_control_complete do nothing if the request h
89 matches
Mail list logo