Hello Damian, Martin, and all,
I came across this (quite old by now) patch to extend eventfd's polling
functionality. I was wondering what happened to it (why it hasn't been
merged yet) and if we could, or what is needed to, move it forward.
I was thinking to use it for V4L2 events support via po
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
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
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
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
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
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
, 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
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,
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
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:
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
, 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
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
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
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
> > > > (
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 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
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 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
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 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
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
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
. 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
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
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
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
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
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
, 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
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
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
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
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
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.
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
> >
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
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
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
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
, 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
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
.
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
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
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
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
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
, 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
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
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
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
.
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
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
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
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
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
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
Convert exec test output to TAP13 format, using the ksft framework.
Signed-off-by: Paul Elder
---
Changes from v1: Fixed a couple coding style errors and changed a forgotten
printf() to ksft_print_msg()
tools/testing/selftests/exec/execveat.c | 151 ++--
1 file
On 07/27/2017 01:58 AM, Shuah Khan wrote:
> Hi Paul,
>
> Please see comments below:
>
> On 07/25/2017 11:12 AM, Paul Elder wrote:
>> Convert exec test output to TAP13 format, using the ksft framework.
>>
>> Signed-off-by: Paul Elder
>> ---
>>
Convert exec test output to TAP13 format, using the ksft framework.
Signed-off-by: Paul Elder
---
Depends on Shuah Khan's patch: "[PATCH 2/3] selftests: kselftest framework: add
API to return pass/fail/* counts"
(http://www.spinics.net/lists/linux-kselftest/msg01964.html)
On 07/01/2017 08:47 AM, Shuah Khan wrote:
> Convert to TAP13 output using ksft_ api. Child runs tests, increments test
> counters, and prints test results.
>
> Signed-off-by: Shuah Khan
> ---
>
> Changes since v1:
> - Add ksft_print_header()
>
> tools/testing/selftests/kcmp/kcmp_test.c | 48
>
On 07/01/2017 02:06 AM, Shuah Khan wrote:
> On 06/30/2017 10:52 AM, Paul Elder wrote:
>> On 07/01/2017 01:33 AM, Shuah Khan wrote:
>>> On 06/30/2017 10:13 AM, Paul Elder wrote:
>>>> On 06/30/2017 08:18 AM, Shuah Khan wrote:
>>>>> This patch series c
On 07/01/2017 01:33 AM, Shuah Khan wrote:
> On 06/30/2017 10:13 AM, Paul Elder wrote:
>> On 06/30/2017 08:18 AM, Shuah Khan wrote:
>>> This patch series converts breakpoint_test_arm64 to TAP13 output. Uses
>>> ksft_ var arg msg functions as needed. Changed to ensure
On 06/30/2017 08:18 AM, Shuah Khan wrote:
> This patch series converts breakpoint_test_arm64 to TAP13 output. Uses
> ksft_ var arg msg functions as needed. Changed to ensure parent is the
> one that increments test counters.
>
> breakpoint_test, step_after_suspend_test, membarrier tests are change
On 06/28/2017 01:36 AM, Shuah Khan wrote:
> On 06/27/2017 10:11 AM, Greg KH wrote:
>> On Tue, Jun 27, 2017 at 10:04:47AM -0600, Shuah Khan wrote:
>>> Convert breakpoint_test_arm64 output to TAP13 format.
>>>
>>> Signed-off-by: Shuah Khan
>>> ---
>>> .../selftests/breakpoints/breakpoint_test_arm64
On 06/28/2017 01:04 AM, Shuah Khan wrote:
> Convert breakpoint_test_arm64 output to TAP13 format.
>
> Signed-off-by: Shuah Khan
> ---
> .../selftests/breakpoints/breakpoint_test_arm64.c | 114
> ++---
> 1 file changed, 79 insertions(+), 35 deletions(-)
>
> diff --git a/tools/t
On 06/28/2017 12:16 AM, Greg KH wrote:
> On Tue, Jun 27, 2017 at 05:13:59PM +0200, Greg KH wrote:
>> On Tue, Jun 27, 2017 at 02:10:32PM +0530, Naresh Kamboju wrote:
>>> selftest capabilities test failed on linux mainline and linux-next and
>>> PASS on linux-4.4.70+
>>
>> Odd. Any chance you can us
75 matches
Mail list logo