[PATCH v4] usbip: dynamically allocate idev by nports found in sysfs

2018-05-25 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik --- v1 -> v2: - reworked memory allocation into one calloc c

Re: [PATCH v3] usbip: dynamically allocate idev by nports found in sysfs

2018-05-24 Thread Michael Grzeschik
On Wed, May 23, 2018 at 10:44:57AM -0600, Shuah Khan wrote: > On 05/23/2018 03:22 AM, Michael Grzeschik wrote: > > As the amount of available ports varies by the kernels build > > configuration. To remove the limitation of the fixed 128 ports > > we allocate the amount of idev

Re: [PATCH v3] usbip: dynamically allocate idev by nports found in sysfs

2018-05-23 Thread Michael Grzeschik
On Wed, May 23, 2018 at 10:44:57AM -0600, Shuah Khan wrote: > On 05/23/2018 03:22 AM, Michael Grzeschik wrote: > > As the amount of available ports varies by the kernels build > > configuration. To remove the limitation of the fixed 128 ports > > we allocate the amount of idev

[PATCH v3] usbip: dynamically allocate idev by nports found in sysfs

2018-05-23 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik --- v1 -> v2: - reworked memory allocation into one calloc c

[PATCH v2] usbip: dynamically allocate idev by nports found in sysfs

2018-05-22 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik --- v1 -> v2: - reworked memory allocation into one calloc c

[PATCH] usbip: dynamically allocate idev by nports found in sysfs

2018-05-18 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik --- tools/usb/usbip/libsrc/vhci_driver.c | 11

Re: [PATCH v4] usb: usbip: set buffer pointers to NULL after free

2017-06-06 Thread Michael Grzeschik
Gentle Ping. To verify this patch just test usbip with some USB Ethernet devices. On Mon, May 22, 2017 at 01:02:44PM +0200, Michael Grzeschik wrote: > The usbip stack dynamically allocates the transfer_buffer and > setup_packet of each urb that got generated by the tcp to usb stub code

[PATCH v4] usb: usbip: set buffer pointers to NULL after free

2017-05-22 Thread Michael Grzeschik
kfree situations where the usbip remote side added the URB_FREE_BUFFER. Cc: sta...@vger.kernel.org Signed-off-by: Michael Grzeschik --- v1 -> v2: - rephrased patch subject from: "usb: usbip: avoid the usb layer to kfree our allocated buffer" - changed to always l

Re: [PATCH v3] usb: usbip: let urb_destroy kfree the transfer_buffer

2017-05-17 Thread Michael Grzeschik
On Wed, May 17, 2017 at 12:07:50PM +0200, Michael Grzeschik wrote: > The usbip stack dynamically allocates the transfer_buffer of each urb in > stub_recv_cmd_submit depending on the requested transfer_buffer_length > set via the received tcp packet. > > As the usbip layer never re

[PATCH v3] usb: usbip: let urb_destroy kfree the transfer_buffer

2017-05-17 Thread Michael Grzeschik
transfer_flags and let urb_destroy call the kfree for it. This patch fixes double kfree situations where the usbip remote side added the URB_FREE_BUFFER. Cc: sta...@vger.kernel.org Signed-off-by: Michael Grzeschik --- v1 -> v2: - rephrased patch subject from: "usb: usbip: avoid

Re: [PATCH v2] usb: usbip: let urb_destroy the transfer_buffer

2017-05-16 Thread Michael Grzeschik
On Mon, May 15, 2017 at 05:37:52PM +0200, Michael Grzeschik wrote: > The usbip stack dynamically allocates the transfer_buffer of each urb in > stub_recv_cmd_submit depending on the requested transfer_buffer_length > set via the received tcp packet. As the usbip layer never reuses the

[PATCH v2] usb: usbip: let urb_destroy the transfer_buffer

2017-05-15 Thread Michael Grzeschik
transfer_flags and let urb_destroy call the kfree for it. Signed-off-by: Michael Grzeschik --- v1 -> v2: - rephrased patch subject from: "usb: usbip: avoid the usb layer to kfree our allocated buffer" - changed from never let urb_destoy remove the transfer_buffer

Re: [PATCH] usb: usbip: avoid the usb layer to kfree our allocated buffer

2017-05-15 Thread Michael Grzeschik
On Mon, May 15, 2017 at 10:34:35AM +0200, Oliver Neukum wrote: > Am Freitag, den 12.05.2017, 15:00 +0200 schrieb Michael Grzeschik: > > The usbip stack handles the kmalloc and kfree of the transfered buffers. > > Some > > USB-Stacks add the flag URB_FREE_BUFFER to their u

[PATCH] usb: usbip: avoid the usb layer to kfree our allocated buffer

2017-05-12 Thread Michael Grzeschik
this flag from the usbip transfered urbs. Signed-off-by: Michael Grzeschik --- After further debugging we found the issue in the cleanup functions of the priv structs. Some USB drivers add the flag URB_FREE_BUFFER to the urb which results into double free of the transfer_buffer. Once inside the

usbip issue in stub_shutdown_connection while stub_complete triggers

2017-05-10 Thread Michael Grzeschik
0 e5903024 e1a05000 (e5933000) [ 219.899277] ---[ end trace 118d02b9c07cde80 ]--- Regards, Michael Grzeschik -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, German

[PATCH] fsl_udc_core: add support for devices provided by fsl-mph-dr-of

2017-04-04 Thread Michael Grzeschik
Currently the of glue code in fsl-mph-dr-of will create the platform device fsl-usb2-udc. As this driver should also be probed by this name, this patch adds it to the devtypes list. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/udc/fsl_udc_core.c | 2 ++ 1 file changed, 2 insertions

Re: [PATCH 05/12] usb: chipidea: introduce ci_platform_config

2015-03-19 Thread Michael Grzeschik
On Thu, Mar 19, 2015 at 09:19:16AM +0800, Peter Chen wrote: > It is used to configure controller parameters according to > platform data, like speed, interrupt threshold, stream mode, etc. > > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/ci.h | 2 ++ > drivers/usb/chipidea/core.c |

ci_hdrc ci_hdrc.1: fatal error

2015-02-12 Thread Michael Grzeschik
Hi Peter, we currently see rare ocasions with the chipidea core code on an mx53 where the controller dies after a long period of usage. ci_hdrc ci_hdrc.1: fatal error ci_hdrc ci_hdrc.1: HC died; cleaning up This is the result of the 'SEI' (System Error) bit in register 'USBSTS' changing to '1' i

[PATCH v2] usb: chipidea: add portpower override for host and use it

2014-10-09 Thread Michael Grzeschik
This patch adds an hub_control override to toggle the PORT_POWER by the registered regulator. That is needed when an external GPIO is used instead of the default PORT_POWER bit. Signed-off-by: Michael Grzeschik --- drivers/usb/chipidea/host.c | 102

Re: [PATCH 0/2] Add portpower callback to ehci-hub

2014-10-06 Thread Michael Grzeschik
Hi Laurent, On Mon, Oct 06, 2014 at 10:50:36PM +0300, Laurent Pinchart wrote: > Thank you for the patch. > > On Friday 26 September 2014 16:21:18 Michael Grzeschik wrote: > > This series adds an portpower callback that can be triggered additionaly > > to the PORT_POWER ehci

Re: [PATCH 1/2] USB: EHCI: add portpower callback and override

2014-10-06 Thread Michael Grzeschik
On Sun, Sep 28, 2014 at 10:30:53AM +0800, Peter Chen wrote: > On Fri, Sep 26, 2014 at 10:42:35AM -0400, Alan Stern wrote: > > On Fri, 26 Sep 2014, Michael Grzeschik wrote: > > > > > The current EHCI implementation is prepared to toggle the > > > PORT_POWER bit to

Re: [PATCH 1/2] USB: EHCI: add portpower callback and override

2014-10-06 Thread Michael Grzeschik
On Fri, Sep 26, 2014 at 10:42:35AM -0400, Alan Stern wrote: > On Fri, 26 Sep 2014, Michael Grzeschik wrote: > > > The current EHCI implementation is prepared to toggle the > > PORT_POWER bit to enable or disable a USB-Port. In some > > cases this port power can not be t

[PATCH 2/2] usb: chipidea: add portpower override for host and use it

2014-09-26 Thread Michael Grzeschik
This patch adds an external portpower override callback. It can be used by the ehci-hub to toggle the PORT_POWER by the registered regulator. That is needed when an external GPIO is used instead of the default PORT_POWER bit. Signed-off-by: Michael Grzeschik --- drivers/usb/chipidea/host.c | 69

[PATCH 0/2] Add portpower callback to ehci-hub

2014-09-26 Thread Michael Grzeschik
Michael Grzeschik (2): USB: EHCI: add portpower callback and override usb: chipidea: add portpower override for host and use it drivers/usb/chipidea/host.c | 69 +++-- drivers/usb/host/ehci-hcd.c | 2 ++ drivers/usb/host/ehci-hub.c | 25

[PATCH 1/2] USB: EHCI: add portpower callback and override

2014-09-26 Thread Michael Grzeschik
capable portpower callback. Signed-off-by: Michael Grzeschik --- drivers/usb/host/ehci-hcd.c | 2 ++ drivers/usb/host/ehci-hub.c | 25 +++-- drivers/usb/host/ehci.h | 1 + include/linux/usb/hcd.h | 1 + 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a

Re: [PATCH v2 2/3] usb: gadget/uvc: also handle v4l2 ioctl ENUM_FMT

2014-08-25 Thread Michael Grzeschik
u for the patch. > > > > > > (CC'ing Hans Verkuil and the linux-media mailing list) > > > > > > On Friday 08 August 2014 17:38:58 Michael Grzeschik wrote: > > >> This patch adds ENUM_FMT as possible ioctl to the uvc v4l2 device. > > &g

[PATCH v2 RESEND] usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

2014-08-21 Thread Michael Grzeschik
As the driver is mainline we can remove the version numbers. Signed-off-by: Michael Grzeschik Acked-by: Laurent Pinchart --- Rebased on v3.17-rc1 drivers/usb/gadget/function/uvc.h | 3 --- drivers/usb/gadget/function/uvc_v4l2.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions

Re: [PATCH 2/2] usb: gadget: f_uvc: Move to video_ioctl2

2014-08-20 Thread Michael Grzeschik
On Mon, Aug 18, 2014 at 11:16:36PM +0200, Laurent Pinchart wrote: > Hi Hans, > > On Monday 18 August 2014 18:24:26 Hans Verkuil wrote: > > On 08/18/2014 05:06 PM, Laurent Pinchart wrote: > > > Simplify ioctl handling by using video_ioctl2. > > > > Are you able to test this on actual hardware? And

Re: [PATCH 0/7] g_webcam: Preparation for configfs

2014-08-16 Thread Michael Grzeschik
gacy/webcam.c | 75 +++--- > 14 files changed, 344 insertions(+), 216 deletions(-) > create mode 100644 drivers/usb/gadget/function/u_uvc.h > create mode 100644 drivers/usb/gadget/function/uvc_v4l2.h > create mode 100644 drivers/usb/gadget/function/uvc_video.h For t

[PATCH v2] usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

2014-08-14 Thread Michael Grzeschik
As the driver is mainline we can remove the version numbers. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/function/uvc.h | 3 --- drivers/usb/gadget/function/uvc_v4l2.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/gadget/function/uvc.h b

Re: [PATCH] usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

2014-08-14 Thread Michael Grzeschik
On Mon, Aug 11, 2014 at 09:20:47AM -0500, Felipe Balbi wrote: > Hi, > > On Mon, Aug 11, 2014 at 03:50:08PM +0200, Michael Grzeschik wrote: > > > > As the driver is mainline we can remove the version numbers. > > > > > > > > Signed-off-by: Michae

Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-13 Thread Michael Grzeschik
On Wed, Aug 13, 2014 at 09:19:31AM -0500, Felipe Balbi wrote: > Hi, > > On Wed, Aug 13, 2014 at 10:02:08AM -0400, Alan Stern wrote: > > > > So here's what the UDC driver should do: If the pullup routine is called > > > > while Vbus is off, the driver should leave the D+ pullup disconnected > > >

Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-13 Thread Michael Grzeschik
On Wed, Aug 13, 2014 at 01:26:07AM +, Peter Chen wrote: > > > On Mon, Aug 11, 2014 at 02:34:33PM +0200, Michael Grzeschik wrote: > > > Hi Peter, > > > > > > On Mon, Aug 11, 2014 at 12:56:47AM +, Peter Chen wrote: > > > > > I have seen th

Re: [RFC 3/3] usb/gadget: f_uvc: add configfs support

2014-08-12 Thread Michael Grzeschik
Hi Andrzej, On Thu, Jul 17, 2014 at 02:42:19PM +0200, Andrzej Pietrasiewicz wrote: > Add support for using uvc as a component of a composite gadget > set up with configfs. > > Signed-off-by: Andrzej Pietrasiewicz > --- > Documentation/ABI/testing/configfs-usb-gadget-uvc | 11 + > drivers/usb/

Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-11 Thread Michael Grzeschik
Hi Alan, On Mon, Aug 11, 2014 at 10:28:12AM -0400, Alan Stern wrote: > On Mon, 11 Aug 2014, Felipe Balbi wrote: > > > On Mon, Aug 11, 2014 at 09:44:05AM -0400, Alan Stern wrote: > > > On Mon, 11 Aug 2014, Felipe Balbi wrote: > > > > > > > > > I don't know what exactly problem you met, but curren

Re: usb_gadget_state_work not triggering sysfs_notify

2014-08-11 Thread Michael Grzeschik
Ping! On Mon, Jul 07, 2014 at 12:53:45PM +0200, Michael Grzeschik wrote: > I am currently working with an udc where the userspace should react on > plugging > and unplugging of the device. The layers used trigger the > usb_gadget_state_work > as expected, but the sysfs_notify

Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-11 Thread Michael Grzeschik
On Mon, Aug 11, 2014 at 08:45:52AM -0500, Felipe Balbi wrote: > On Mon, Aug 11, 2014 at 09:44:05AM -0400, Alan Stern wrote: > > On Mon, 11 Aug 2014, Felipe Balbi wrote: > > > > > > > I don't know what exactly problem you met, but current pullup dp > > > > > during loading > > > > > gadget driver

Re: [PATCH] usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

2014-08-11 Thread Michael Grzeschik
Hi, On Mon, Aug 11, 2014 at 08:32:37AM -0500, Felipe Balbi wrote: > Hi, > > On Mon, Aug 11, 2014 at 01:15:06PM +0200, Michael Grzeschik wrote: > > As the driver is mainline we can remove the version numbers. > > > > Signed-off-by: Michael Grzeschik > >

Re: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-11 Thread Michael Grzeschik
Hi Peter, On Mon, Aug 11, 2014 at 12:56:47AM +, Peter Chen wrote: > > I have seen this call is still returning EOPNOTSUPP which is also > > returned by usb_gadget_connect and usb_gadget_disconnect if the pullup > > function is not available. Should it not handle that case somehow special? > >

[PATCH] usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

2014-08-11 Thread Michael Grzeschik
As the driver is mainline we can remove the version numbers. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc.h | 3 --- drivers/usb/gadget/uvc_v4l2.c | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h index 49d9573..e593a10

[PATCH] usb: gadget/uvc: remove unused DRIVER_VERSION

2014-08-11 Thread Michael Grzeschik
The define is unused and can be thrown into the garbage bag of other unused defines. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h index 49d9573..5ae5c5e 100644 --- a/drivers

[PATCH] usb: gadget/uvc: remove unused DRIVER_VERSION

2014-08-11 Thread Michael Grzeschik
The define is unused and can be thrown into the garbage bag of other unused defines. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/uvc.h index 49d9573..5ae5c5e 100644 --- a/drivers

[PATCH v2 0/3] usb: gadget/uvc: simple fixes and ENUM_FMT

2014-08-08 Thread Michael Grzeschik
This series fixes a possible lock in the uvc-gadget. It also adds ENUM_FMT to the v4l2 ioctl list. This way it will be possible to use gstreamer with it. At last we increase isoc requests in flight. Cheers, Michael Michael Grzeschik (3): usb: gadget/uvc: fix possible lockup in uvc gadget usb

[PATCH v2 3/3] usb: gadget/uvc: bump isoc requests from 4 to 16

2014-08-08 Thread Michael Grzeschik
While sending bigger images it is better to use more isochronous requests in flight. This patch bumps the default from 4 to 16. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/uvc.h b/drivers

[PATCH v2 2/3] usb: gadget/uvc: also handle v4l2 ioctl ENUM_FMT

2014-08-08 Thread Michael Grzeschik
This patch adds ENUM_FMT as possible ioctl to the uvc v4l2 device. That makes userspace applications with a generic IOCTL calling convention make also use of it. Signed-off-by: Michael Grzeschik --- v1 -> v2: - changed first switch case to simple if - added separate function - ad

[PATCH v2 1/3] usb: gadget/uvc: fix possible lockup in uvc gadget

2014-08-08 Thread Michael Grzeschik
If the pending buffers in the queue could not be pushed to the udc endpoint we have to cancel the uvc_queue. Otherwise the gadget will get stuck on this error. This patch calls uvc_queue_cancel if usb_ep_queue failed. Signed-off-by: Michael Grzeschik --- v1 -> v2: - moved uvc_queue_can

[RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

2014-08-08 Thread Michael Grzeschik
This reverts commit 4a64783b66bbeed06a1f10ab56a1dd401dd5bfba. --- Hello Peter, I have seen this call is still returning EOPNOTSUPP which is also returned by usb_gadget_connect and usb_gadget_disconnect if the pullup function is not available. Should it not handle that case somehow special? Is i

Re: [PATCH] usb: chipidea: udc: Disable auto ZLP generation on ep0

2014-07-08 Thread Michael Grzeschik
On Mon, Jul 07, 2014 at 04:22:08PM +0500, Abbas Raza wrote: > On 07/07/2014 02:37 PM, Michael Grzeschik wrote: > >On Sun, Jul 06, 2014 at 11:47:50PM +0500, Abbas Raza wrote: > >>On 07/06/2014 11:01 PM, Greg KH wrote: > >>>On Sun, Jul 06, 2014 at 07:52:41PM +0200, Mic

usb_gadget_state_work not triggering sysfs_notify

2014-07-07 Thread Michael Grzeschik
Hi, I am currently working with an udc where the userspace should react on plugging and unplugging of the device. The layers used trigger the usb_gadget_state_work as expected, but the sysfs_notify never cross the userspace layer. static void usb_gadget_state_work(struct work_struct *work) {

Re: Chipidea gadget unplug/disconnect event

2014-07-07 Thread Michael Grzeschik
On Sun, Jul 06, 2014 at 01:31:37PM +0800, Peter Chen wrote: > On Fri, Jul 04, 2014 at 11:54:57AM +0200, Michael Grzeschik wrote: > > On Fri, Jul 04, 2014 at 01:39:08AM +, Peter Chen wrote: > > > > > > > > > > > > > > > > >

Re: [PATCH] usb: chipidea: udc: Disable auto ZLP generation on ep0

2014-07-07 Thread Michael Grzeschik
On Sun, Jul 06, 2014 at 11:47:50PM +0500, Abbas Raza wrote: > On 07/06/2014 11:01 PM, Greg KH wrote: > >On Sun, Jul 06, 2014 at 07:52:41PM +0200, Michael Grzeschik wrote: > >>Hi, > >> > >>On Sun, Jul 06, 2014 at 09:26:02PM +0500, Abbas Raza wrote: > >

Re: [PATCH] usb: chipidea: udc: Disable auto ZLP generation on ep0

2014-07-06 Thread Michael Grzeschik
Hi, On Sun, Jul 06, 2014 at 09:26:02PM +0500, Abbas Raza wrote: > From: Abbas Raza > > There are 2 methods for ZLP (zero-length packet) generation: > 1) In software > 2) Automatic generation by device controller > > 1) is implemented in UDC driver and it attaches ZLP to IN packet if >descri

Re: Chipidea gadget unplug/disconnect event

2014-07-04 Thread Michael Grzeschik
On Fri, Jul 04, 2014 at 01:39:08AM +, Peter Chen wrote: > > > > > > > > > > > Yes, it has already implemented at ci_usc_vbus_session. > > > > > > > I see the code path in ci_udc_vbus_session of udc.c to trigger such > > > > an event, but unfortunately it was never possible to run into that >

Re: Chipidea gadget unplug/disconnect event

2014-07-03 Thread Michael Grzeschik
Hi Fabio, On Thu, Jul 03, 2014 at 02:04:07PM -0300, Fabio Estevam wrote: > Hi Michael, > > On Thu, Jul 3, 2014 at 1:06 PM, Michael Grzeschik wrote: > > > I validated this with two different imx25 boards and realized, > > that we have this external vbus div

Re: Chipidea gadget unplug/disconnect event

2014-07-03 Thread Michael Grzeschik
On Thu, Jul 03, 2014 at 01:19:21AM +, Peter Chen wrote: > > > > > Is it possible to get the chipidea to generate an event on udc unplugging? > > > > Yes, it has already implemented at ci_usc_vbus_session. > > > I see the code path in ci_udc_vbus_session of udc.c to trigger such an > > eve

Chipidea gadget unplug/disconnect event

2014-07-02 Thread Michael Grzeschik
Hi Peter, Is it possible to get the chipidea to generate an event on udc unplugging? I see the code path in ci_udc_vbus_session of udc.c to trigger such an event, but unfortunately it was never possible to run into that code. The function ci_otg_work in otg.c is prepared to do that in case the i

Re: [PATCH 1/1] usb: chipidea: udc: delete td from req's td list at ep_dequeue

2014-06-30 Thread Michael Grzeschik
On Mon, Jun 30, 2014 at 12:15:03PM +0800, Peter Chen wrote: > We need to delete un-finished td from current request's td list > at ep_dequeue API, otherwise, this non-user td will be remained > at td list before this request is freed. So if we do ep_queue-> > ep_dequeue->ep_queue sequence, when the

Re: [PATCH v2 2/2] usb: chipidea: Add support for zynq usb host and device controller

2014-06-27 Thread Michael Grzeschik
Hi, On Fri, Jun 27, 2014 at 04:53:53PM +0530, Punnaiah Choudary Kalluri wrote: > Zynq soc uses Chipidea/Synopsys usb IP core(CI13612). This patch adds > necessary glue to allow the chipidea driver to work on zynq soc. > Did you see the currently discussed patches for the generic chipidea glue?

[PATCH 2/8] usb: gadget/uvc: change KERN_INFO to KERN_DEBUG on request shutdown

2014-05-28 Thread Michael Grzeschik
The disconnect of the USB Device is an common pattern for an UVC Camera. In many cases this will give us an meaningless information for all buffers that couldn't be enqueued. That patch changes this to KERN_DEBUG. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc_video.c | 2

[PATCH 6/8] usb: gadget/uvc: set sizes in queue_setup to 0 when memorytype is not MMAP

2014-05-28 Thread Michael Grzeschik
Its not needed to set plane sizelimit if using USERPTR or DMABUF. The buffersize limit will be parsed in the encoder function. Signed-off-by: Michael Grzeschik Signed-off-by: Philipp Zabel --- drivers/usb/gadget/uvc_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 7/8] usb: gadget/uvc: Add monotonic time stamp flag

2014-05-28 Thread Michael Grzeschik
From: Michael Grzeschik Since the introduction of the timestamp_type field, it is necessary that the driver chooses which type it will use. This patch adds support for the timestamp_type. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc_queue.c | 1 + 1 file changed, 1 insertion

[PATCH 4/8] usb: gadget/uvc: also handle v4l2 ioctl ENUM_FMT

2014-05-28 Thread Michael Grzeschik
This patch adds ENUM_FMT as possible ioctl to the uvc v4l2 device. That makes userspace applications with a generic IOCTL calling convention make also use of it. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc_v4l2.c | 24 1 file changed, 24 insertions

[PATCH 8/8] usb: gadget/uvc: Add support for DMABUF importing

2014-05-28 Thread Michael Grzeschik
From: Philipp Zabel Signed-off-by: Philipp Zabel --- drivers/usb/gadget/uvc_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c index 2ed1d52..1061ba7 100644 --- a/drivers/usb/gadget/uvc_queue.c +++ b/driver

[PATCH 1/8] usb: gadget/uvc: fix possible lockup in uvc gadget

2014-05-28 Thread Michael Grzeschik
If the pending buffers in the queue could not be pushed to the udc endpoint we have to cancel the uvc_queue. Otherwise the gadget will get stuck on this error. This patch calls uvc_queue_cancel if usb_ep_queue failed. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc_video.c | 3

[PATCH RESEND 0/8] usb: gadget/uvc: stability and usability fixes

2014-05-28 Thread Michael Grzeschik
Hi, this series is fixing some stability and usability issues found with the usb uvc-gadget. It's needed to make the device usable as an v4l2sink with gstreamer. Thanks, Michael Michael Grzeschik (7): usb: gadget/uvc: fix possible lockup in uvc gadget usb: gadget/uvc: change KERN_IN

[PATCH 3/8] usb: gadget/uvc: fix S_FMT always assume sizeimage for JPEG

2014-05-28 Thread Michael Grzeschik
Sizeimage is an property comming from the device. It's not safe to depend on its value for imagesize on S_FMT. Its better to use simple width * height for compressed formats without bits per pixel. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/uvc_v4l2.c | 4 +++- 1 file chang

[PATCH 5/8] usb: gadget/uvc: add uvc suspend resume functions

2014-05-28 Thread Michael Grzeschik
This is needed to tell the userspace daemon to disable the streaming if the device is suspended. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/f_uvc.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index

Re: USB OTG support on mx27pdk

2014-04-16 Thread Michael Grzeschik
Hi, On Wed, Apr 16, 2014 at 09:53:34AM -0300, Fabio Estevam wrote: > On Wed, Apr 16, 2014 at 8:58 AM, Alexander Shiyan wrote: > > > I can tell immediately without further testing, > > this will not work without the USB support in the bootoader because > > we do not have DT support for ULPI. > >

Re: [PATCH 1/1] usb: chipidea: udc: refine ep operation at isr_tr_complete_handler

2014-01-28 Thread Michael Grzeschik
Tested with g_mass_storage, g_ncm, g_ether > > Cc: matthieu.cas...@parrot.com > Reported-by: Michael Grzeschik > Signed-off-by: Peter Chen > --- > drivers/usb/chipidea/udc.c | 28 > 1 files changed, 8 insertions(+), 20 deletions(-) > > di

[PATCH] usb: chipidea: udc: add maximum-speed = full-speed option

2014-01-28 Thread Michael Grzeschik
This patch makes it possible to set the chipidea udc into full-speed only mode. It is set by the oftree property "maximum-speed = full-speed". Signed-off-by: Michael Grzeschik Signed-off-by: Marc Kleine-Budde --- Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | 2 ++ d

[PATCH] usb: chipidea: udc: fix setup_status condition in isr

2014-01-24 Thread Michael Grzeschik
The isr is going to check for a status phase on the indexed endpoint. Input endpoints have no status bits and can be skipped for that test. Signed-off-by: Michael Grzeschik --- This patch is based on the change mentioned by Matthieu CASTET, but moves the check before using

Re: chipidea udc: ctrl traffic on endpoint 8

2014-01-23 Thread Michael Grzeschik
On Mon, Jan 20, 2014 at 11:26:02AM +0100, Matthieu CASTET wrote: > Le Sat, 18 Jan 2014 09:03:01 +0100, > Michael Grzeschik a écrit : > > > On Fri, Jan 17, 2014 at 05:15:49PM +0100, Matthieu CASTET wrote: > > > How many fifo have your controller (hw_ep_max) ? >

Re: [PATCH 1/1] usb: chipidea: udc: delete wrong warning message for ep0in

2014-01-21 Thread Michael Grzeschik
t; > > This commit deletes the warning message at interrupt handler, > > and adds judgement at ep_enable, if non-ep0 requests ctrl transfer, > > it will indicate an error. > > > > Reported-by: Michael Grzeschik > > Signed-off-by: Peter Chen > > --- >

Re: chipidea udc: ctrl traffic on endpoint 8

2014-01-18 Thread Michael Grzeschik
On Fri, Jan 17, 2014 at 05:15:49PM +0100, Matthieu CASTET wrote: > Le Fri, 17 Jan 2014 16:54:07 +0100, > Michael Grzeschik a écrit : > > > Hi Peter, > > > > we recently see a lot of warnings with the chipidea udc. > > The driver is running as g_ether gadget.

chipidea udc: ctrl traffic on endpoint 8

2014-01-17 Thread Michael Grzeschik
Hi Peter, we recently see a lot of warnings with the chipidea udc. The driver is running as g_ether gadget. cat drivers/usb/chipidea/udc.c ... if (i != 0) { dev_warn(ci->dev, "ctrl traffic at endpoint %d\n", i); continue; } ... Do you know if thi

Re: [PATCH] usb: chipidea: need to mask when writting endptflush and endptprime

2014-01-17 Thread Michael Grzeschik
On Fri, Jan 17, 2014 at 01:21:45PM +0100, Michael Grzeschik wrote: > On Tue, Jan 14, 2014 at 03:39:25PM +0100, Matthieu CASTET wrote: > > ENDPTFLUSH and ENDPTPRIME registers are set by software and > > clear by hardware. > > There is a bit for each endpoint. > > When

Re: [PATCH] usb: chipidea: need to mask when writting endptflush and endptprime

2014-01-17 Thread Michael Grzeschik
On Tue, Jan 14, 2014 at 03:39:25PM +0100, Matthieu CASTET wrote: > ENDPTFLUSH and ENDPTPRIME registers are set by software and > clear by hardware. > There is a bit for each endpoint. > When we are setting a bit for an endpoint we should make sure we not touch > other endpoint bit. There is a race

Re: [PATCH 06/10] usb: chipidea: OTG fsm timers initialization.

2014-01-10 Thread Michael Grzeschik
Hi Li Jun, On Wed, Jan 08, 2014 at 05:06:21PM +0800, Li Jun wrote: > This patch adds OTG fsm timers initialization, which use controller's 1ms > interrupt as time out counter, also adds some local timers which are not > in otg_fsm_timer list. > > Signed-off-by: Li Jun > --- > drivers/usb/chipid

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-12-06 Thread Michael Grzeschik
Hi Peter, On Tue, Nov 26, 2013 at 12:08:03PM +, Peter Chen wrote: > > The GPIO is working for this pin. But also the DIGCTL register bits > > helped here. Now the OC event triggers if the pin gets pulled to 3V3. > > > > I am currently looking for a good place to enable the DIGCTL bits. > > I

Re: [PATCH v4 02/17] usb: phy-mxs: Add platform judgement code

2013-12-03 Thread Michael Grzeschik
On Tue, Dec 03, 2013 at 03:36:56PM +0800, Peter Chen wrote: > The mxs-phy has several bugs and features at different > versions, the driver code can get it through of_device_id.data. > > Signed-off-by: Peter Chen > --- > drivers/usb/phy/phy-mxs-usb.c | 58 ++

Re: [PATCH 2/3 v2] usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag

2013-11-29 Thread Michael Grzeschik
On Fri, Nov 29, 2013 at 03:19:45PM +0800, Chris Ruehl wrote: > usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag > > * init the sts flag to 0 (missed) > * set the sts flag only if not 0 > > Signed-off-by: Chris Ruehl > --- > drivers/usb/chipidea/core.c |8 ++-- > 1 f

Re: [PATCH 2/3] usb: chipidea: Fix Internal error: : 808 [#1] ARM related to STS flag

2013-11-29 Thread Michael Grzeschik
On Fri, Nov 29, 2013 at 10:07:49AM +0800, Chris Ruehl wrote: > * init the sts flag to 0 (missed) > * set the sts flag only if not 0 > > Signed-off-by: Chris Ruehl > --- > drivers/usb/chipidea/core.c |8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/

Re: [PATCH 1/8] usb/gadget: uvc: move descriptors to their only user

2013-11-28 Thread Michael Grzeschik
On Thu, Nov 28, 2013 at 10:53:03PM +0100, Laurent Pinchart wrote: > On Thursday 28 November 2013 08:43:35 Andrzej Pietrasiewicz wrote: > > A bunch of descriptors is defined in webcam.c. They are used only > > by f_uvc. Move them to their only user. > > The reason why descriptors are located in web

Re: Check device use before detaching?

2013-11-28 Thread Michael Grzeschik
On Mon, Nov 18, 2013 at 08:19:38PM +, Luke-Jr wrote: > My software does not interface with keyboards under any condition. > > Some specific devices I'm working with include: > FTDI: Avalon, Butterfly Labs BitFORCE & BitFORCE SC, The Chili > CP210X: Bitfountain Block Erupter Emerald/Sapphire >

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-11-25 Thread Michael Grzeschik
Hi Marek, Peter, On Mon, Nov 25, 2013 at 12:58:32AM +0100, Marek Vasut wrote: > Hello Michael, > > > Hi Marek, Peter, > > > > On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > > > Add the pinmux settings for USB PHY overcurrent pins. > > > > > > Signed-off-by: Marek Vasut > > > Cc

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-11-24 Thread Michael Grzeschik
On Sat, Nov 23, 2013 at 02:48:48PM +, Peter Chen wrote: > > > > > > > > diff --git a/arch/arm/boot/dts/imx28.dtsi > > b/arch/arm/boot/dts/imx28.dtsi > > > index b996c2d..3cba62d 100644 > > > --- a/arch/arm/boot/dts/imx28.dtsi > > > +++ b/arch/arm/boot/dts/imx28.dtsi > > > @@ -520,6 +520,36 @

Re: [PATCH] Allow MUSB DSPS to use "force host" mode

2013-11-22 Thread Michael Grzeschik
Hallo, On Fri, Nov 22, 2013 at 03:55:59PM +, Mark Jackson wrote: > The IDDIG input pin is normally used to determine the USB mode > (i.e. HOST or DEVICE). > > On some systems (e.g. AM335x) leaving this pin floating allows > the USB mode to be set via software. > > This patch adds support for

Re: [PATCH 2/4 V2] ARM: mx28: Add USB PHY overcurrent pinmux

2013-11-22 Thread Michael Grzeschik
Hi Marek, Peter, On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > Add the pinmux settings for USB PHY overcurrent pins. > > Signed-off-by: Marek Vasut > Cc: Chris Ball > Cc: Fabio Estevam > Cc: Mark Brown > Cc: Shawn Guo > --- > arch/arm/boot/dts/imx28.dtsi | 30

Re: [PATCH] USB: chipidea: i.MX: Probe usbmisc early

2013-11-18 Thread Michael Grzeschik
Hi Marek, On Sun, Nov 17, 2013 at 11:59:10PM +0100, Marek Vasut wrote: > Dear Peter Chen, > > > > Probe the usbmisc driver earlier, otherwise the ci_hdrc_imx.c will > > > get -EPROBE_DEFER from usbmisc when both are compiled into the kernel > > > and thus USB gadget mode won't work. > > > > Hi M

Re: [PATCH v3] chipidea: ci_hdrc_imx: Allow handling the clock for an external USB hub

2013-11-14 Thread Michael Grzeschik
On Thu, Nov 14, 2013 at 03:00:25PM -0200, Fabio Estevam wrote: > Hi Michael, > > On 11/14/2013 02:53 PM, Michael Grzeschik wrote: > >Hi Fabio, > > > >On Thu, Nov 14, 2013 at 02:12:25PM -0200, Fabio Estevam wrote: > >>When using an external USB hub, it

Re: [PATCH v3] chipidea: ci_hdrc_imx: Allow handling the clock for an external USB hub

2013-11-14 Thread Michael Grzeschik
Hi Fabio, On Thu, Nov 14, 2013 at 02:12:25PM -0200, Fabio Estevam wrote: > When using an external USB hub, it is common that they require a clock input. > > Add a 'clk_usb' clock, so that it can be retrieved from the device tree and > enabled in the driver, so that the clock can properly drive t

Re: [PATCH v2] chipidea: ci_hdrc_imx: Allow handling the clock for an USB phy/hub

2013-11-14 Thread Michael Grzeschik
On Thu, Nov 14, 2013 at 08:47:40AM -0200, Fabio Estevam wrote: > From: Fabio Estevam > > When using external USB PHY or USB hub, it is common that they require a clock > input. > > Add a 'clk_phy' clock, so that it can be retrieved from the device tree and > enabled in the driver, so that the cloc

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Michael Grzeschik
On Tue, Nov 12, 2013 at 08:12:04PM +0800, Peter Chen wrote: > On Tue, Nov 12, 2013 at 7:50 PM, Michael Grzeschik > wrote: > > Don't start hw_device_state on udc_start. The gadget framework has > > the prepared pullup callback for this. This is necessary if we use gadge

[PATCH] usb: chipidea: udc: first start device on pullup

2013-11-12 Thread Michael Grzeschik
Don't start hw_device_state on udc_start. The gadget framework has the prepared pullup callback for this. This is necessary if we use gadgets which need to be enabled after an userspace application got prepared, or other delayed conditiions have passed. Signed-off-by: Michael Grzeschik --

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-11 Thread Michael Grzeschik
On Mon, Nov 11, 2013 at 02:00:36PM -0600, Felipe Balbi wrote: > On Mon, Nov 11, 2013 at 12:39:30PM +0100, Michael Grzeschik wrote: > > Don't pullup the resistors on hw_device_state. The gadget framework has > > the prepared callback for this. This is necessary if we use gadge

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-11 Thread Michael Grzeschik
Hi Peter, On Tue, Nov 12, 2013 at 10:59:09AM +0800, Peter Chen wrote: > On Mon, Nov 11, 2013 at 04:37:26PM +0100, Michael Grzeschik wrote: > > On Mon, Nov 11, 2013 at 09:42:35PM +0800, Peter Chen wrote: > > > On Mon, Nov 11, 2013 at 12:39:30PM +0100, Michael Grzeschik wrote: &g

[PATCH] usb: gadget: composite: reset delayed_status on reset_config

2013-11-11 Thread Michael Grzeschik
The delayed_status value is used to keep track of status response packets on ep0. It needs to be reset or the set_config function would still delay the answer, if the usb device got unplugged while waiting for setup_continue to be called. Cc: sta...@vger.kernel.org Signed-off-by: Michael

Re: [PATCH] usb: chipidea: udc: first start device on pullup

2013-11-11 Thread Michael Grzeschik
On Mon, Nov 11, 2013 at 09:42:35PM +0800, Peter Chen wrote: > On Mon, Nov 11, 2013 at 12:39:30PM +0100, Michael Grzeschik wrote: > > Don't pullup the resistors on hw_device_state. The gadget framework has > > the prepared callback for this. This is necessary if we use gadgets

[PATCH] usb: gadget: move gadget start to bind of each driver

2013-11-11 Thread Michael Grzeschik
We currently enable the udc on bind_to_driver. This breaks the de/activate mechanism for drivers that depent on userspace components. This patch fixes this by moving the pullup call to each bind. Signed-off-by: Michael Grzeschik --- drivers/usb/gadget/f_acm.c | 3 +++ drivers/usb

[PATCH] usb: chipidea: udc: first start device on pullup

2013-11-11 Thread Michael Grzeschik
Don't pullup the resistors on hw_device_state. The gadget framework has the prepared callback for this. This is necessary if we use gadgets which need to be enabled after an userspace application got prepared, or other delayed conditiions have passed. Signed-off-by: Michael Grze

  1   2   3   4   >