[PATCHv2 8/8] usb: gadget: configfs: OS Extended Properties descriptors support

2014-05-08 Thread Andrzej Pietrasiewicz
- unicode string with environment variables 3 - binary 4 - little-endian 32-bit 5 - big-endian 32-bit 6 - unicode string with a symbolic link 7 - multiple unicode strings Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 21 +++ drivers

[PATCHv2 6/8] usb: gadget: configfs: OS Extended Compatibility descriptors support

2014-05-08 Thread Andrzej Pietrasiewicz
and sub_compatible_id, which represent 8-byte strings to be reported to the host as the Compatible ID and Sub Compatible ID. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 13 ++ drivers/usb/gadget/configfs.c | 190

[PATCHv2 7/8] usb: gadget: f_rndis: OS Descriptors configfs support

2014-05-08 Thread Andrzej Pietrasiewicz
Added handling of OS Descriptors support for f_rndis. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_rndis.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index a7633d6..eed3ad8 100644

[PATCHv2 3/8] usb: gadget: OS Feature Descriptors support

2014-05-08 Thread Andrzej Pietrasiewicz
-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/composite.c | 288 - drivers/usb/gadget/u_os_desc.h | 90 + include/linux/usb/composite.h | 58 + 3 files changed

[PATCHv2 1/8] usb: gadget: FunctionFS: share VLA macros with all usb gadget files

2014-05-08 Thread Andrzej Pietrasiewicz
Variable Length Array macros allow portable (compilable with both gcc and clang) way of allocating a number of structures using a single memory chunk. They can be useful for files other than f_fs.c, so move them to a header file. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked

[PATCHv2 4/8] usb: gadget: f_rndis: OS descriptors support

2014-05-08 Thread Andrzej Pietrasiewicz
In order for usb functions to expose OS descriptors they need to be made aware of OS descriptors. This involves extending the options structure and setting up appropriate associations. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com

[PATCHv2 2/8] usb: gadget: OS String support

2014-05-08 Thread Andrzej Pietrasiewicz
implement responding to any vendor-specific USB requests. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/composite.c | 29 + include/linux/usb/composite.h | 11 +++ 2 files

Re: About gadget configfs

2014-05-06 Thread Andrzej Pietrasiewicz
Hi Peter, W dniu 06.05.2014 03:01, Peter Chen pisze: On Mon, May 05, 2014 at 11:09:30AM +0200, Andrzej Pietrasiewicz wrote: W dniu 04.05.2014 09:48, Peter Chen pisze: Hi Sebastian Andrzej, snip 1. I have setup successfully for running mass storage and CDC ACM at the same time with below

Re: [RFC 3/9] usb: gadget: OS Feature Descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
Hello Michal, W dniu 05.05.2014 20:41, Michal Nazarewicz pisze: On Mon, May 05 2014, Andrzej Pietrasiewicz wrote: When a gadget is composed with configfs the usb_add_config() is invoked each time a configuration's directory is created, so this way configurations' indices are determined. If we

[PATCH 8/8] usb: gadget: configfs: OS Extended Properties descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
- unicode string with environment variables 3 - binary 4 - little-endian 32-bit 5 - big-endian 32-bit 6 - unicode string with a symbolic link 7 - multiple unicode strings Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 21 +++ drivers

[PATCH 1/8] usb: gadget: FunctionFS: share VLA macros with all usb gadget files

2014-05-06 Thread Andrzej Pietrasiewicz
Variable Length Array macros allow portable (compilable with both gcc and clang) way of allocating a number of structures using a single memory chunk. They can be useful for files other than f_fs.c, so move them to a header file. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked

[PATCH 0/8] OS Descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
$ $ #USUAL STUFF, CONTINUED $ #== $ $ ln -s functions/rndis.usb0 configs/c.1 $ echo s3c-hsotg UDC Andrzej Pietrasiewicz (8): usb: gadget: FunctionFS: share VLA macros with all usb gadget files usb: gadget: OS String support usb: gadget: OS Feature Descriptors support

[PATCH 7/8] usb: gadget: f_rndis: OS Descriptors configfs support

2014-05-06 Thread Andrzej Pietrasiewicz
Added handling of OS Descriptors support for f_rndis. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_rndis.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index a7633d6..eed3ad8 100644

[PATCH 4/8] usb: gadget: f_rndis: OS descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
In order for usb functions to expose OS descriptors they need to be made aware of OS descriptors. This involves extending the options structure and setting up appropriate associations. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_rndis.c | 24

[PATCH 3/8] usb: gadget: OS Feature Descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/composite.c | 315 - drivers/usb/gadget/u_os_desc.h | 90 include/linux/usb/composite.h | 58 3 files changed, 462 insertions(+), 1 deletion(-) create mode

[PATCH 5/8] usb: gadget: configfs: OS String support

2014-05-06 Thread Andrzej Pietrasiewicz
. b_vendor_code contains a one-byte value which is used for custom per-device and per-interface requests. qw_sign contains an identifier to be reported as the OS String proper. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 11 ++ drivers

[PATCH 6/8] usb: gadget: configfs: OS Extended Compatibility descriptors support

2014-05-06 Thread Andrzej Pietrasiewicz
and sub_compatible_id, which represent 8-byte strings to be reported to the host as the Compatible ID and Sub Compatible ID. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 13 ++ drivers/usb/gadget/configfs.c | 190

[PATCH 2/8] usb: gadget: OS String support

2014-05-06 Thread Andrzej Pietrasiewicz
implement responding to any vendor-specific USB requests. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/composite.c | 27 +++ include/linux/usb/composite.h | 11 +++ 2 files changed, 38 insertions(+) diff --git a/drivers/usb

[PATCH] usb: gadget: ether: example usage of OS descriptors

2014-05-06 Thread Andrzej Pietrasiewicz
Example of using OS Descriptors in a legacy gadget. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/ether.c | 61 +- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers

Re: [RFC 0/9] OS Descriptors support

2014-05-05 Thread Andrzej Pietrasiewicz
Hi Felipe, W dniu 30.04.2014 18:24, Felipe Balbi pisze: On Thu, Apr 24, 2014 at 11:17:11AM +0200, Andrzej Pietrasiewicz wrote: There is a custom (non-USB IF) extension to the USB standard: http://msdn.microsoft.com/library/windows/hardware/gg463182 are you sure there isn't some crappy

Re: About gadget configfs

2014-05-05 Thread Andrzej Pietrasiewicz
Hello, W dniu 04.05.2014 12:31, Peter Stuge pisze: Hi Peter, Peter Chen wrote: The step at the board: root@freescale ~$ modprobe libcomposite I guess this step is unneccessary, and that all neccessary modules are loaded automatically on demand. This one is necessary. The code which

Re: About gadget configfs

2014-05-05 Thread Andrzej Pietrasiewicz
W dniu 04.05.2014 09:48, Peter Chen pisze: Hi Sebastian Andrzej, snip My questions: snip - How to choose gserial? I tried to remove the configuration of mass storage, but both of configurations have been removed root@freescale /sys/kernel/config/usb_gadget/g1$ rm -rf

Re: [RFC 3/9] usb: gadget: OS Feature Descriptors support

2014-05-05 Thread Andrzej Pietrasiewicz
Hi Michal, W dniu 01.05.2014 03:42, Michal Nazarewicz pisze: On Thu, Apr 24 2014, Andrzej Pietrasiewicz wrote: @@ -438,8 +440,46 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value) } - /* This is a lookup by config *INDEX* */ w_value = 0xff

Re: [RFC 4/9] usb: gadget: f_rndis: OS descriptors support

2014-05-05 Thread Andrzej Pietrasiewicz
W dniu 01.05.2014 03:48, Michal Nazarewicz pisze: On Thu, Apr 24 2014, Andrzej Pietrasiewicz wrote: In order for usb functions to expose OS descriptors they need to be made aware of OS descriptors. This involves extending the options structure and setting up appropriate associations. Signed

Re: [RFC 2/9] usb: gadget: OS String support

2014-05-05 Thread Andrzej Pietrasiewicz
W dniu 01.05.2014 03:36, Michal Nazarewicz pisze: On Thu, Apr 24 2014, Andrzej Pietrasiewicz wrote: There is a custom (non-USB IF) extension to the USB standard: http://msdn.microsoft.com/library/windows/hardware/gg463182 snip diff --git a/drivers/usb/gadget/composite.c b/drivers/usb

Re: [RFC 9/9] usb: gadget: ether: example usage of OS desriptors

2014-05-05 Thread Andrzej Pietrasiewicz
Hi Felipe W dniu 24.04.2014 11:17, Andrzej Pietrasiewicz pisze: Example of using OS Descriptors in a legacy gadget. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/ether.c | 58 ++ 1 file changed, 53 insertions

[RFC 3/9] usb: gadget: OS Feature Descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
it can invoke usb_add_config in any order because the designated configuration will be reported to be at index 0 anyway. This patch also adds handling vendor-specific requests addressed at device or interface and related to handling OS descriptors. Signed-off-by: Andrzej Pietrasiewicz andrze

[RFC 9/9] usb: gadget: ether: example usage of OS desriptors

2014-04-24 Thread Andrzej Pietrasiewicz
Example of using OS Descriptors in a legacy gadget. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/ether.c | 58 ++ 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/ether.c b/drivers

[RFC 7/9] usb: gadget: f_rndis: OS Descriptors configfs support

2014-04-24 Thread Andrzej Pietrasiewicz
Added handling of OS Descriptors support for f_rndis. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_rndis.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index b781a59..43d15f9 100644

[RFC 0/9] OS Descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
. Rebased onto Felipe's master as of 23rd April. It is meant for 3.16. I kindly ask for comments about this extension. In particular, FunctionFS needs an extension of the way descriptors are written to ep0. Regards, AP Andrzej Pietrasiewicz (9): usb: gadget: FunctionFS: share VLA macros

[RFC 5/9] usb: gadget: configfs: OS String support

2014-04-24 Thread Andrzej Pietrasiewicz
. b_vendor_code contains a one-byte value which is used for custom per-device and per-interface requests. qw_sign contains an identifier to be reported as the OS String proper. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 11 ++ drivers

[RFC 1/9] usb: gadget: FunctionFS: share VLA macros with all usb gadget files

2014-04-24 Thread Andrzej Pietrasiewicz
Variable Length Array macros allow portable (compilable with both gcc and clang) way of allocating a number of structures using a single memory chunk. They can be useful for files other than f_fs.c, so move them to a header file. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com

[RFC 6/9] usb: gadget: configfs: OS Extended Compatibility descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
and sub_compatible_id, which represent 8-byte strings to be reported to the host as the Compatible ID and Sub Compatible ID. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 13 ++ drivers/usb/gadget/configfs.c | 190

[RFC 4/9] usb: gadget: f_rndis: OS descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
In order for usb functions to expose OS descriptors they need to be made aware of OS descriptors. This involves extending the options structure and setting up appropriate associations. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_rndis.c | 24

[RFC 2/9] usb: gadget: OS String support

2014-04-24 Thread Andrzej Pietrasiewicz
-specific USB requests. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/composite.c | 16 include/linux/usb/composite.h | 14 ++ 2 files changed, 30 insertions(+) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget

[RFC 8/9] usb: gadget: configfs: OS Extended Properties descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
- unicode string with environment variables 3 - binary 4 - little-endian 32-bit 5 - big-endian 32-bit 6 - unicode string with a symbolic link 7 - multiple unicode strings Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget | 21 +++ drivers

Re: [RFC 0/9] OS Descriptors support

2014-04-24 Thread Andrzej Pietrasiewicz
W dniu 24.04.2014 11:17, Andrzej Pietrasiewicz pisze: There is a custom (non-USB IF) extension to the USB standard: http://msdn.microsoft.com/library/windows/hardware/gg463182 The said extension is maintained by Microsoft for Microsoft. Yet it is fairly common for various devices to use

Re: 3.15-rc1 and gether bug

2014-04-23 Thread Andrzej Pietrasiewicz
W dniu 20.04.2014 21:33, Robert Jarzmik pisze: Robert Jarzmik robert.jarz...@free.fr writes: Hi, I've tried the 3.15-rc1 recently. Upon USB gether gadget connexion, the kernel panics. With 3.14, no issue is seen. And if I revert commit in [2], everything works fine. That should speed up the

Re: [PATCH v3] u_ether: move hardware transmit to RX workqueue

2014-04-03 Thread Andrzej Pietrasiewicz
W dniu 03.04.2014 06:31, clanlab.proj pisze: Hi Andrzej, Btw, Can you help to test the another version of this patch which uses work queue instead of NAPI? I'll send you a copy of this patch later out of the mailing list. The patch was send to the list here.

Re: [PATCH v3] u_ether: move hardware transmit to RX workqueue

2014-04-02 Thread Andrzej Pietrasiewicz
Hello, W dniu 06.03.2014 17:04, Felipe Balbi pisze: Hi, On Thu, Mar 06, 2014 at 11:42:49PM +0800, Weinn Jheng wrote: In order to reduce the interrupt times in the embedded system, a receiving workqueue is introduced. This modification also enhanced the overall throughput as the benefits of

Re: [PATCH v3] u_ether: move hardware transmit to RX workqueue

2014-04-02 Thread Andrzej Pietrasiewicz
W dniu 02.04.2014 16:39, clanlab.proj pisze: Hi Andrzej, My device supports rndis only and the platform was beased on Android. Sorry I cannot test with the behavior like what you've did. Could you provide the board information to me and maybe I can trying to get one? It's a board with an

[RFC 0/8] Equivalent of g_webcam with configfs

2014-02-28 Thread Andrzej Pietrasiewicz
v4l2:///dev/video0 Andrzej Pietrasiewicz (8): usb: gadget: f_uvc: fix potential memory leak usb/gadget: uvc: move module parameters from f_uvc usb/gadget: uvc: separately compile some components of f_uvc usb/gadget: f_uvc: convert f_uvc to new function interface usb/gadget: webcam

[RFC 1/8] usb: gadget: f_uvc: fix potential memory leak

2014-02-28 Thread Andrzej Pietrasiewicz
If uvc-control_buf is successfuly allocated but uvc-control_req is not, uvc-control_buf is not freed in the error recovery path. With this patch applied uvc-control_buf is freed unconditionally; if it happens to be NULL kfree on it is safe anyway. Signed-off-by: Andrzej Pietrasiewicz andrze

[RFC 4/8] usb/gadget: f_uvc: convert f_uvc to new function interface

2014-02-28 Thread Andrzej Pietrasiewicz
Use the new function registration interface. It is required in order to integrate configfs support. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/Kconfig | 3 + drivers/usb/gadget/Makefile | 2 + drivers/usb/gadget/f_uvc.c | 252

[RFC 5/8] usb/gadget: webcam: convert webcam to new interface of f_uvc

2014-02-28 Thread Andrzej Pietrasiewicz
Use the new function interface of f_uvc. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/Kconfig | 1 + drivers/usb/gadget/Makefile | 4 ++-- drivers/usb/gadget/webcam.c | 53 - 3 files changed, 41 insertions(+), 17

[RFC 3/8] usb/gadget: uvc: separately compile some components of f_uvc

2014-02-28 Thread Andrzej Pietrasiewicz
Compile uvc_queue, uvc_v4l2, uvc_video separately so that later they can be all combined in a separately compiled f_uvc. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/Makefile| 2 +- drivers/usb/gadget/f_uvc.c | 2 ++ drivers/usb/gadget/f_uvc.h

[RFC 7/8] usb/gadget: f_uvc: use usb_gstrings_attach

2014-02-28 Thread Andrzej Pietrasiewicz
Attach strings to gadget with usb_strings_attach. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_uvc.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c

[RFC 2/8] usb/gadget: uvc: move module parameters from f_uvc

2014-02-28 Thread Andrzej Pietrasiewicz
When configfs support is integrated the future uvc function module must not take any parameters. Move parameters to webcam. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_uvc.c | 30 -- drivers/usb/gadget/f_uvc.h | 6

[RFC 6/8] usb/gadget: f_uvc: remove compatibility layer

2014-02-28 Thread Andrzej Pietrasiewicz
There are no users of the old interface left. Remove it. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_uvc.c | 167 - drivers/usb/gadget/f_uvc.h | 11 --- 2 files changed, 178 deletions(-) diff --git a/drivers

Re: [Patch V1 1/2] usb: gadget: zero: Add support for interrupt EP

2014-02-27 Thread Andrzej Pietrasiewicz
. [for the configfs part] Acked-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_loopback.c | 3 +- drivers/usb/gadget/f_sourcesink.c | 519 -- drivers/usb/gadget/g_zero.h | 13 +- drivers/usb/gadget/zero.c | 21 ++ 4

Re: gadget support

2014-02-18 Thread Andrzej Pietrasiewicz
W dniu 18.02.2014 14:15, Arturo Veras pisze: hi all In my PC have the kernel linux usb gadget support enabled but when i Why do you have usb gadget support in a PC in the first place? What are you trying to achieve? What you could achieve is for example to make your PC act as a mass storage

Re: [PATCH] usb: gadget: fix NULL pointer dereference

2014-02-18 Thread Andrzej Pietrasiewicz
W dniu 18.02.2014 17:40, Felipe Balbi pisze: On Fri, Jan 17, 2014 at 05:04:55PM +0100, Michal Nazarewicz wrote: On Thu, Jan 16 2014, Andrzej Pietrasiewicz wrote: Fix possible NULL pointer dereference introduced in 219580e64f035bb9018dbb08d340f90b0ac50f8c usb: f_fs: check quirk to pad epout

Re: [RFC 1/2] usb: gadget: zero: Add support for interrupt EP

2014-02-10 Thread Andrzej Pietrasiewicz
W dniu 10.02.2014 14:16, Amit Virdi pisze: Interrupt endpoints behave quite similar to the bulk endpoints with the difference that the endpoints expect data sending/reception request at particular intervals till the whole data has not been transmitted. The interrupt EP support is added to

[PATCH v2] usb: gadget: fix NULL pointer dereference

2014-01-19 Thread Andrzej Pietrasiewicz
it by moving the actual assignment to the local 'gadget' variable after the potential waiting has completed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c |7 ++- 1 files changed, 6 insertions(+), 1

Re: [PATCH] net: sk == 0xffffffff fix - not for commit

2014-01-17 Thread Andrzej Pietrasiewicz
W dniu 16.01.2014 17:29, Eric Dumazet pisze: On Thu, 2014-01-16 at 16:21 +0100, Andrzej Pietrasiewicz wrote: W dniu 10.12.2013 15:25, Eric Dumazet pisze: On Tue, 2013-12-10 at 07:55 +0100, Andrzej Pietrasiewicz wrote: W dniu 09.12.2013 16:31, Eric Dumazet pisze: On Mon, 2013-12-09 at 12:47

Re: [PATCH] net: sk == 0xffffffff fix - not for commit

2014-01-17 Thread Andrzej Pietrasiewicz
W dniu 17.01.2014 13:18, Andrzej Pietrasiewicz pisze: W dniu 16.01.2014 17:29, Eric Dumazet pisze: On Thu, 2014-01-16 at 16:21 +0100, Andrzej Pietrasiewicz wrote: W dniu 10.12.2013 15:25, Eric Dumazet pisze: On Tue, 2013-12-10 at 07:55 +0100, Andrzej Pietrasiewicz wrote: W dniu 09.12.2013 16

[PATCH] usb: gadget: fix NULL pointer dereference

2014-01-16 Thread Andrzej Pietrasiewicz
it. This patch fixes it by moving the actual assignment to the local 'gadget' variable after the potential waiting has completed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- @Michal: This has been detected with adb function implemented on top of FunctionFS and the gadget itself has been

[PATCH 0/3] Fixes for FuntionFS

2014-01-13 Thread Andrzej Pietrasiewicz
. Andrzej Pietrasiewicz (3): usb: gadget: FunctionFS: dereference ffs_dev conditionally usb: gadget: FunctionFS: staticize functions used only in f_fs.c usb: gadget: FunctionFS: use consistent naming with regard to ffs_lock drivers/usb/gadget/f_fs.c | 39

[PATCH 3/3] usb: gadget: FunctionFS: use consistent naming with regard to ffs_lock

2014-01-13 Thread Andrzej Pietrasiewicz
Consistently prefix function name with underscore if the function has to be called with ffs_lock taken. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH 2/3] usb: gadget: FunctionFS: staticize functions used only in f_fs.c

2014-01-13 Thread Andrzej Pietrasiewicz
ffs_alloc_dev and ffs_free_dev are used only in f_fs.c, so make them static. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c |6 -- drivers/usb/gadget/u_fs.h |2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[PATCH 1/3] usb: gadget: FunctionFS: dereference ffs_dev conditionally

2014-01-13 Thread Andrzej Pietrasiewicz
ffs_dev-ffs_release_dev_callback should be accessed only if ffs_dev is not NULL. Additionally whitespace error correction. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH v2 3/4] usb: gadget: FunctionFS: staticize functions used only in f_fs.c

2014-01-13 Thread Andrzej Pietrasiewicz
ffs_alloc_dev and ffs_free_dev are used only in f_fs.c, so make them static. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c |6 -- drivers/usb/gadget/u_fs.h |2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb

[PATCH v2 4/4] usb: gadget: FunctionFS: use consistent naming with regard to ffs_lock

2014-01-13 Thread Andrzej Pietrasiewicz
Consistently prefix function name with underscore if the function has to be called with ffs_lock taken. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git

[PATCH v2 0/4] Fixes for FuntionFS

2014-01-13 Thread Andrzej Pietrasiewicz
, its name starts with an underscore. v1..v2: - split the first patch into a fix proper and code cleanup Andrzej Pietrasiewicz (4): usb: gadget: FunctionFS: dereference ffs_dev conditionally usb: gadget: code cleanup usb: gadget: FunctionFS: staticize functions used only in f_fs.c usb

[PATCH v2 1/4] usb: gadget: FunctionFS: dereference ffs_dev conditionally

2014-01-13 Thread Andrzej Pietrasiewicz
ffs_dev-ffs_release_dev_callback should be accessed only if ffs_dev is not NULL. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb

[PATCH v2 2/4] usb: gadget: code cleanup

2014-01-13 Thread Andrzej Pietrasiewicz
Remove trailing whitespace Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- drivers/usb/gadget/f_fs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 78333f0..f0c657d 100644 --- a/drivers/usb

[PATCH v2] usb: gadget: nokia: fix error recovery path for optional functions

2013-12-17 Thread Andrzej Pietrasiewicz
. This patch changes the initial values of (obex1|obex2|phonet)_stat to a nonzero value so that if the err_conf label is hit while the respective functions have not been acquired the usb_remove_function() is not called for those functions. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com

Re: usb: gadget: nokia: convert to new interface of f_phonet

2013-12-13 Thread Andrzej Pietrasiewicz
Hello Dan Carpenter, Thank you for your comments. W dniu 13.12.2013 12:22, Dan Carpenter pisze: Hello Andrzej Pietrasiewicz, The patch 83167f12da05: usb: gadget: nokia: convert to new interface of f_phonet from May 23, 2013, leads to the following Smatch warnings: drivers/usb/gadget/nokia.c

[PATCH] usb: gadget: nokia: fix error recovery path for optional functions

2013-12-13 Thread Andrzej Pietrasiewicz
. This patch changes the initial values of (obex1|obex2|phonet)_stat to a nonzero value so that if the err_conf label is hit while the respective functions have not been acquired the usb_remove_function() is not called for those functions. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com

[PATCH] net: sk == 0xffffffff fix - not for commit

2013-12-09 Thread Andrzej Pietrasiewicz
) [ 54.033299] Code: e3043504 e5845010 e34c3030 e5843064 (e5d53012) Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com --- net/ipv4/tcp_ipv4.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index b14266b..c6a318f 100644

Re: [PATCH] gadget: make USB_CONFIGFS_MASS_STORAGE depend on BLOCK

2013-12-09 Thread Andrzej Pietrasiewicz
:242:3: error: implicit declaration of function 'blksize_bits' [-Werror=implicit-function-declaration] Signed-off-by: Randy Dunlap rdun...@infradead.org Cc: Andrzej Pietrasiewicz andrze...@samsung.com Cc: Felipe Balbi ba...@ti.com --- drivers/usb/gadget/Kconfig |2 +- 1 file changed, 1

Re: [PATCH] net: sk == 0xffffffff fix - not for commit

2013-12-09 Thread Andrzej Pietrasiewicz
W dniu 09.12.2013 16:31, Eric Dumazet pisze: On Mon, 2013-12-09 at 12:47 +0100, Andrzej Pietrasiewicz wrote: NOT FOR COMMITTING TO MAINLINE. With g_ether loaded the sk occasionally becomes 0x. It happens usually after transferring few hundreds of kilobytes to few tens of megabytes

[PATCH v5 06/16] usb/gadget: f_subset: remove compatibility layer

2013-12-03 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_subset.c | 60

[PATCH v5 01/16] usb/gadget: configfs: allow setting function instance's name

2013-12-03 Thread Andrzej Pietrasiewicz
with the instance name. In a typical case, the struct usb_function_instance is embedded in a larger struct which is retrieved in set_inst_name() with container_of(), and the larger struct contains a field to store the instance name. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed

[PATCH v5 07/16] usb/gadget: g_ffs: convert to new interface of f_rndis

2013-12-03 Thread Andrzej Pietrasiewicz
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v5 11/16] usb/gadget: FunctionFS: create utility file

2013-12-03 Thread Andrzej Pietrasiewicz
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c

[PATCH v5 16/16] usb/gadget: FunctionFS: add configfs support

2013-12-03 Thread Andrzej Pietrasiewicz
Add support for using FunctionFS in configfs-based USB gadgets. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- Documentation/ABI/testing/configfs-usb-gadget-ffs |9

[PATCH v5 00/16] Equivalent of g_ffs with configfs

2013-12-03 Thread Andrzej Pietrasiewicz
THE FUNCTIONS (actually there is only one) = FunctionFS) device: connect the gadget, enable it host: mount the ptp device, adb shell Andrzej Pietrasiewicz (16): usb/gadget: configfs: allow setting function instance's name usb/gadget: g_ffs: remove a reduntant gfs_ether_setup

[PATCH v5 05/16] usb/gadget: g_ffs: convert to new interface of f_subset

2013-12-03 Thread Andrzej Pietrasiewicz
There is a new function interface of f_subset and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers

[PATCH v5 14/16] usb/gadget: g_ffs: convert to new interface of f_fs

2013-12-03 Thread Andrzej Pietrasiewicz
Prepare for configfs integration. Use the new interface so that f_fs can be made a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 151

[PATCH v5 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-12-03 Thread Andrzej Pietrasiewicz
kmalloc and kfree calls. This version uses group vs struct since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH v5 04/16] usb/gadget: f_ecm: remove compatibility layer

2013-12-03 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmim Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_ecm.c | 73

[PATCH v5 02/16] usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable

2013-12-03 Thread Andrzej Pietrasiewicz
a comment to be consistent with the code. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/g_ffs.c | 13 + 1 files changed, 5 insertions(+), 8

[PATCH v5 13/16] usb/gadget: FunctionFS: convert to new function interface with backward compatibility

2013-12-03 Thread Andrzej Pietrasiewicz
This is required in order to integrate configfs support. f_fs needs to be a separately compiled module and so it needs to use the new interface. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig

[PATCH v5 15/16] usb/gadget: FunctionFS: Remove compatibility layer

2013-12-03 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c | 114

[PATCH v5 09/16] usb/gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

2013-12-03 Thread Andrzej Pietrasiewicz
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |7

[PATCH v5 08/16] usb/gadget: f_rndis: remove compatibility layer

2013-12-03 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_rndis.c | 72

[PATCH v4 10/16] usb/gadget: FunctionFS: Remove VLAIS usage from gadget code

2013-12-02 Thread Andrzej Pietrasiewicz
kmalloc and kfree calls. This version uses group vs struct since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois charl...@gmail.com

[PATCH v4 00/16] Equivalent of g_ffs with configfs

2013-12-02 Thread Andrzej Pietrasiewicz
the ptp device, adb shell Andrzej Pietrasiewicz (16): usb/gadget: configfs: allow setting function instance's name usb/gadget: g_ffs: remove a reduntant gfs_ether_setup variable usb/gadget: g_ffs: convert to new interface of f_ecm usb/gadget: f_ecm: remove compatibility layer usb/gadget

[PATCH v4 11/16] usb/gadget: FunctionFS: create utility file

2013-12-02 Thread Andrzej Pietrasiewicz
A header file to be used by f_fs.c and g_ffs.c will be required when f_fs.c is converted into a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_fs.c

[PATCH v4 16/16] usb/gadget: FunctionFS: add configfs support

2013-12-02 Thread Andrzej Pietrasiewicz
Add support for using FunctionFS in configfs-based USB gadgets. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- Documentation/ABI/testing/configfs-usb-gadget-ffs |9 +++ drivers/usb/gadget/Kconfig

[PATCH v4 13/16] usb/gadget: FunctionFS: convert to new function interface with backward compatibility

2013-12-02 Thread Andrzej Pietrasiewicz
This is required in order to integrate configfs support. f_fs needs to be a separately compiled module and so it needs to use the new interface. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min

[PATCH v4 06/16] usb/gadget: f_subset: remove compatibility layer

2013-12-02 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_subset.c | 60

[PATCH v4 07/16] usb/gadget: g_ffs: convert to new interface of f_rndis

2013-12-02 Thread Andrzej Pietrasiewicz
There is a new interface of f_rndis and g_ffs is the last to use the old one. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v4 03/16] usb/gadget: g_ffs: convert to new interface of f_ecm

2013-12-02 Thread Andrzej Pietrasiewicz
There is a new funtion interface and g_ffs is the last gadget to use the old. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb

[PATCH v4 04/16] usb/gadget: f_ecm: remove compatibility layer

2013-12-02 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmim Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/f_ecm.c | 73

[PATCH v4 15/16] usb/gadget: FunctionFS: Remove compatibility layer

2013-12-02 Thread Andrzej Pietrasiewicz
There are no old function interface users left, so the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/f_fs.c | 114 drivers/usb

[PATCH v4 14/16] usb/gadget: g_ffs: convert to new interface of f_fs

2013-12-02 Thread Andrzej Pietrasiewicz
Prepare for configfs integration. Use the new interface so that f_fs can be made a module. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/usb/gadget/Kconfig |1 + drivers/usb/gadget/g_ffs.c | 190

[PATCH v4 09/16] usb/gadget: rndis: merge u_rndis.ko with usb_f_rndis.ko

2013-12-02 Thread Andrzej Pietrasiewicz
The rndis function's users use only the new interface, so the two modules can be merged. Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb/gadget/Kconfig |7

[PATCH v4 12/16] usb/gadget: FunctionFS: add devices management code

2013-12-02 Thread Andrzej Pietrasiewicz
This will be required in order to use the new function interface (usb_get_function_instance/usb_put_function_instance) Signed-off-by: Andrzej Pietrasiewicz andrze...@samsung.com Signed-off-by: Kyunmgin Park kyungmin.p...@samsung.com Acked-by: Michal Nazarewicz min...@mina86.com --- drivers/usb

<    1   2   3   4   5   6   7   8   9   10   >