Re: [PATCH] kselftest: exec: make exec test output conform to TAP13

2017-07-29 Thread Paul Elder
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 <paul.el...@pitt.edu&g

[PATCH] kselftest: exec: make exec test output conform to TAP13

2017-07-25 Thread Paul Elder
Convert exec test output to TAP13 format, using the ksft framework. Signed-off-by: Paul Elder <paul.el...@pitt.edu> --- 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-kselfte

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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 e

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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

Re: [PATCH v2] selftests: kcmp: convert to TAP13 output

2017-06-30 Thread Paul Elder
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() > >

[PATCH v2] kselftest: exec: make exec test output conform to TAP13

2017-08-20 Thread Paul Elder
Convert exec test output to TAP13 format, using the ksft framework. Signed-off-by: Paul Elder <paul.el...@pitt.edu> --- Changes from v1: Fixed a couple coding style errors and changed a forgotten printf() to ksft_print_msg() tools/testing/selftests/exec/execveat.c

Re: [PATCH] selftests: breakpoints: convert breakpoint_test_arm64 test to TAP13

2017-06-27 Thread Paul Elder
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(-)

Re: [PATCH] selftests: breakpoints: convert breakpoint_test_arm64 test to TAP13

2017-06-27 Thread Paul Elder
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 >>> --- >>>

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Paul Elder
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

Re: [PATCH 5/6] usb: musb: gadget: implement send_response

2018-10-31 Thread Paul Elder
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

[PATCH] kselftest: exec: make exec test output conform to TAP13

2017-07-25 Thread 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) too

Re: [PATCH] kselftest: exec: make exec test output conform to TAP13

2017-07-29 Thread Paul Elder
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 >> --- >>

[PATCH v2] kselftest: exec: make exec test output conform to TAP13

2017-08-20 Thread Paul Elder
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

Re: selftests/capabilities: test FAIL on linux mainline and linux-next and PASS on linux-4.4.70+

2017-06-27 Thread Paul Elder
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

Re: [PATCH] selftests: breakpoints: convert breakpoint_test_arm64 test to TAP13

2017-06-27 Thread Paul Elder
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

Re: [PATCH] selftests: breakpoints: convert breakpoint_test_arm64 test to TAP13

2017-06-27 Thread Paul Elder
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 >>> --- >>>

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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 e

Re: [PATCH 0/4] Convert to TAP13 using ksft_ var arg msg api

2017-06-30 Thread Paul Elder
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

Re: [PATCH v2] selftests: kcmp: convert to TAP13 output

2017-06-30 Thread Paul Elder
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

Re: [PATCH v3 1/1] eventfd: implementation of EFD_MASK flag

2020-06-19 Thread Paul Elder
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

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-13 Thread Paul Elder
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

[PATCH v3] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-15 Thread Paul Elder
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

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-15 Thread Paul Elder
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 s

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-18 Thread Paul Elder
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

[PATCH v2 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2018-12-16 Thread Paul Elder
ge 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

[PATCH v2 5/6] usb: musb: gadget: implement optional explicit status stage

2018-12-16 Thread Paul Elder
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

[PATCH v2 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-16 Thread 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

[PATCH v2 1/6] usb: uvc: include videodev2.h in g_uvc.h

2018-12-16 Thread Paul Elder
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

[PATCH v2 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2018-12-16 Thread Paul Elder
of 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

[PATCH v2 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2018-12-16 Thread Paul Elder
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 usb: gadget: uvc: e

[PATCH] usb: gadget: uvc: add uvcg_warn macro

2018-12-16 Thread Paul Elder
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

[PATCH v2 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2018-12-16 Thread Paul Elder
, 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

Re: [PATCH] usb: gadget: musb: fix short isoc packets with inventra dma for pandaboard es

2018-12-13 Thread 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

Re: [PATCH 4/6] usb: gadget: add functions to signal udc driver to delay status stage

2018-12-13 Thread Paul Elder
->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

[PATCH v3 1/6] usb: uvc: include videodev2.h in g_uvc.h

2018-12-19 Thread Paul Elder
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

[PATCH v3 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2018-12-19 Thread Paul Elder
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 usb: gadget: uvc: enqueue usb reques

[PATCH v3 5/6] usb: musb: gadget: implement optional explicit status stage

2018-12-19 Thread Paul Elder
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

[PATCH v3 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2018-12-19 Thread Paul Elder
, 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

[PATCH v3 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2018-12-19 Thread Paul Elder
of 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

[PATCH v3 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-19 Thread 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

[PATCH v3 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2018-12-19 Thread Paul Elder
ge 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

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-23 Thread Paul Elder
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,

[PATCH v7 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl OUT request

2019-01-23 Thread Paul Elder
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 control OU

[PATCH v7 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-23 Thread Paul Elder
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 has

[PATCH v7 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2019-01-23 Thread Paul Elder
, 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

[PATCH v7 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-23 Thread Paul Elder
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

[PATCH v7 1/6] usb: uvc: include videodev2.h in g_uvc.h

2019-01-23 Thread Paul Elder
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

[PATCH v7 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2019-01-23 Thread Paul Elder
ge 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

[PATCH v7 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2019-01-23 Thread Paul Elder
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

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-20 Thread Paul Elder
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 > > > > (

[PATCH v6 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-20 Thread Paul Elder
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 (ie

[PATCH v6 1/6] usb: uvc: include videodev2.h in g_uvc.h

2019-01-20 Thread Paul Elder
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

[PATCH v6 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-20 Thread Paul Elder
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

[PATCH v6 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2019-01-20 Thread Paul Elder
ge 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

[PATCH v6 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2019-01-20 Thread Paul Elder
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

[PATCH v6 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-20 Thread Paul Elder
it 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: add mechanism to specify an explici

[PATCH v6 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2019-01-20 Thread Paul Elder
, 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

[PATCH v4 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-06 Thread Paul Elder
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_status

[PATCH v4 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-06 Thread Paul Elder
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

[PATCH v4 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-06 Thread Paul Elder
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 control OUT usb: gadget: uvc: pa

[PATCH v4 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2019-01-06 Thread Paul Elder
ge 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

[PATCH v4 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2019-01-06 Thread Paul Elder
, 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

[PATCH v4 1/6] usb: uvc: include videodev2.h in g_uvc.h

2019-01-06 Thread 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

[PATCH v4 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2019-01-06 Thread Paul Elder
of 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

Re: [PATCH] usb: gadget: musb: fix short isoc packets with inventra dma for pandaboard es

2019-01-07 Thread Paul Elder
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 > >

Re: [PATCH v4 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-07 Thread Paul Elder
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

[PATCH v5 2/6] usb: gadget: uvc: enqueue usb request in setup handler for control OUT

2019-01-08 Thread Paul Elder
, 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

[PATCH v5 1/6] usb: uvc: include videodev2.h in g_uvc.h

2019-01-08 Thread Paul Elder
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

[PATCH v5 6/6] usb: gadget: uvc: allow ioctl to send response in status stage

2019-01-08 Thread Paul Elder
of 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

[PATCH v5 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-08 Thread Paul Elder
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 implementation for MUSB) Paul Elder (6):

[PATCH v5 3/6] usb: gadget: uvc: package setup and data for control OUT requests

2019-01-08 Thread Paul Elder
ge 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

[PATCH v5 5/6] usb: musb: gadget: implement optional explicit status stage

2019-01-08 Thread Paul Elder
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

[PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-08 Thread Paul Elder
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) Changes

[PATCH v2] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-08 Thread Paul Elder
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

[PATCH v3 2/4] usb: gadget: uvc: don't delay the status phase of non-zero SET_INTERFACE requests

2019-01-08 Thread Paul Elder
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(+), 7 deletions

[PATCH v3 0/4] usb: gadget: uvc: fix racing between uvc_function_set_alt and streamon/off

2019-01-08 Thread Paul Elder
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't delay

[PATCH v3 4/4] usb: gadget: uvc: remove unused/duplicate function prototypes from uvc.h

2019-01-08 Thread Paul Elder
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 -- 1

[PATCH v3 3/4] usb: gadget: uvc: disable stream when disconnected

2019-01-08 Thread Paul Elder
. 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

[PATCH v3 1/4] usb: gadget: uvc: synchronize streamon/off with uvc_function_set_alt

2019-01-08 Thread Paul Elder
, or 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

Re: [PATCH v2] usb: gadget: musb: fix short isoc packets with inventra dma

2019-01-10 Thread Paul Elder
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 MUS

Re: [PATCH v5 4/6] usb: gadget: add mechanism to specify an explicit status stage

2019-01-11 Thread Paul Elder
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 > > asynchro

Re: [PATCH v5 0/6] usb: gadget: add mechanism to asynchronously validate data stage of ctrl out request

2019-01-11 Thread Paul Elder
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

Re: [PATCH v3 4/6] usb: gadget: add mechanism to specify an explicit status stage

2018-12-21 Thread 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 inst

Re: [PATCH 5/6] usb: musb: gadget: implement send_response

2018-10-31 Thread Paul Elder
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