Re: USB3 xHCI Error, unable to acces the disk

2015-12-11 Thread Mathias Nyman
On 10.12.2015 18:18, Sébastien Deligny wrote: Hello I've report a bug on bug tracker but I've been advise to post it directly to th mailing list. Here is my problem : Connected on USB3 SSD as root partition, sometimes the system lags a lot and I'm not able to stop the system properly as the FS b

Re: [PATCH 1/4] usb: serial: remove redundant conditions

2015-12-11 Thread Johan Hovold
On Thu, Dec 10, 2015 at 05:50:09PM -0300, Geyslan G. Bem wrote: > This patch removes redundant conditions. > > (!A || (A && B)) is the same as (!A || B). > (length && length > 5) can be reduced to a single evaluation. > > Tested by compilation only. > Caught by cppcheck. > > Signed-off-by: Gey

Re: [PATCH 1/4] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
2015-12-11 6:16 GMT-03:00 Johan Hovold : > On Thu, Dec 10, 2015 at 05:50:09PM -0300, Geyslan G. Bem wrote: >> This patch removes redundant conditions. >> >> (!A || (A && B)) is the same as (!A || B). >> (length && length > 5) can be reduced to a single evaluation. >> >> Tested by compilation only

Re: [PATCH v7 0/4] usb/gadget: independent registration of gadgets and gadget drivers

2015-12-11 Thread Marek Szyprowski
Hello, On 2015-12-10 18:13, Felipe Balbi wrote: Felipe Balbi writes: Felipe Balbi writes: Marek Szyprowski writes: This is a resurrection of the patches initially submitted by Ruslan Bilovol in the following thread: https://lkml.org/lkml/2015/6/22/554 The changes since the original submis

[PATCH 2/2] usb: serial: remove redundant condition

2015-12-11 Thread Geyslan G. Bem
This patch removes redundant condition. (length && length > 5) can be reduced to a single evaluation. Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/serial/mos7840.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/

[PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
This patch removes redundant conditions. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/serial/io_edgeport.c | 35 ++- 1 file changed, 14 insertions(+), 21 deletions(-) d

Re: [PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Johan Hovold
On Fri, Dec 11, 2015 at 06:46:41AM -0300, Geyslan G. Bem wrote: > This patch removes redundant conditions. > > (!A || (A && B)) is the same as (!A || B). > > Tested by compilation only. > Caught by cppcheck. > > Signed-off-by: Geyslan G. Bem You forgot to update the commit summary (to include

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Johan Hovold
Dan and Björn, On Thu, Dec 10, 2015 at 04:42:52PM +0100, yegorsli...@googlemail.com wrote: > From: Yegor Yefremov > > Signed-off-by: Yegor Yefremov > --- > drivers/usb/serial/option.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/opt

Re: [PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Geyslan G. Bem
2015-12-11 7:13 GMT-03:00 Johan Hovold : > On Fri, Dec 11, 2015 at 06:46:41AM -0300, Geyslan G. Bem wrote: >> This patch removes redundant conditions. >> >> (!A || (A && B)) is the same as (!A || B). >> >> Tested by compilation only. >> Caught by cppcheck. >> >> Signed-off-by: Geyslan G. Bem > >

Re: [PATCH 1/2] usb: serial: remove redundant conditions

2015-12-11 Thread Johan Hovold
On Fri, Dec 11, 2015 at 07:25:51AM -0300, Geyslan G. Bem wrote: > 2015-12-11 7:13 GMT-03:00 Johan Hovold : > > On Fri, Dec 11, 2015 at 06:46:41AM -0300, Geyslan G. Bem wrote: > >> This patch removes redundant conditions. > >> > >> (!A || (A && B)) is the same as (!A || B). > >> > >> Tested by comp

Re: USB3 xHCI Error, unable to acces the disk

2015-12-11 Thread Sébastien Deligny
Hello, Thanks for your support, I don't know if the problem occur if the SSD is not connected as root partition and it will be difficult to test it as the internal SSD is windows7 type and I can't modify it (it's a professional laptop from my company). I will test with xhci debugging... Do I hav

Re: USB3 xHCI Error, unable to acces the disk

2015-12-11 Thread Mathias Nyman
On 11.12.2015 13:06, Sébastien Deligny wrote: Hello, Thanks for your support, I don't know if the problem occur if the SSD is not connected as root partition and it will be difficult to test it as the internal SSD is windows7 type and I can't modify it (it's a professional laptop from my compan

[PATCH v3 36/36] usb: gadget: f_mass_storage: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_mass_storage.c | 91 +--- driv

[PATCH v3 32/36] usb: gadget: f_phonet: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 33/36] usb: gadget: f_subset: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 28/36] usb: gadget: f_ncm: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 35/36] usb: gadget: f_uac2: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 34/36] usb: gadget: f_uac1: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 29/36] usb: gadget: f_printer: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 25/36] usb: gadget: f_hid: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Move cdev initialization to hidg_alloc(). Remove boilerplate code. Signed-off

[PATCH v3 24/36] usb: gadget: f_hid: handle requests lifetime properly

2015-12-11 Thread Robert Baldyga
So far USB requests allocated in hidg_set_alt() were not freed. Now we free them in case of hidg_set_alt() failure (when we are not able to allocate and enqueue all the requests) or in hidg_disable() function. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_hid.c | 22 +++

[PATCH v3 31/36] usb: gadget: f_obex: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 22/36] usb: gadget: f_ecm: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Get rid of get_alt() which now is handled automatically. Remove boilerplate co

[PATCH v3 27/36] usb: gadget: f_eem: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 26/36] usb: gadget: f_acm: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadg

[PATCH v3 30/36] usb: gadget: f_serial: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/function/f_serial.c | 122 +++-- 1 fi

[PATCH v3 23/36] usb: gadget: f_rndis: conversion to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Implement prep_vendor_descs() to supply class specific descriptors. Change set_alt() implementation and implement clear_alt() operation. Remove boilerplate code. Change USB request lifetime management - now it's all

[PATCH v3 14/36] usb: gadget: composite: introduce clear_alt() operation

2015-12-11 Thread Robert Baldyga
Introduce clear_alt() callback, which is called when prevoiusly set altsetting is cleared. This can take place in two situations: - when another altsetting is selected, - during function disable. Thanks to symetry to set_alt(), clear_alt() simplifies managing of resources allocated in set_alt(). I

[PATCH v3 17/36] usb: gadget: composite: add usb_get_interface_id() function

2015-12-11 Thread Robert Baldyga
Introduce function returning id of interface at given index in function. The id value is equal bInterfaceNumber field in interface descriptor. This value can be useful during preparation of class or vendor specific descriptors in prep_vendor_descs() callback. It can be also necessary to handle some

[PATCH v3 18/36] usb: gadget: composite: enable adding USB functions using new API

2015-12-11 Thread Robert Baldyga
Enable adding USB functions which use new API. Check if all necessary function ops are supplied and call prep_descs() to allow function register it's entity descriptors. Notice that bind() function is not called for USB functions using new API, as now bind procedure is handled for them in composite

[PATCH v3 16/36] usb: gadget: composite: add usb_function_get_ep() function

2015-12-11 Thread Robert Baldyga
Introduce function returning endpoint of given index in active altsetting of specified interface. It's intended to be used in set_alt() callback to obtain endpoints of currently selected altsetting. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 33 +++

[PATCH v3 19/36] usb: gadget: configfs: add new composite API support

2015-12-11 Thread Robert Baldyga
Handle functions using new API properly. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/configfs.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 0557f80..153adf7 100644 --- a/drivers/usb/gadge

[PATCH v3 15/36] usb: gadget: composite: handle get_alt() automatically

2015-12-11 Thread Robert Baldyga
As now we store current altsetting number for each interface, we can handle USB_REQ_GET_INTERFACE automatically. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/us

[PATCH v3 21/36] usb: gadget: f_sourcesink: convert to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Get rid of get_alt() callback, as now USB_REQ_GET_INTERFACE is handled automatically by composite framwework. Remove unnecessary boilerplate code.

[PATCH v3 20/36] usb: gadget: f_loopback: convert to new API

2015-12-11 Thread Robert Baldyga
Generate descriptors in new format and attach them to USB function in prep_descs(). Change set_alt() implementation and implement clear_alt() operation. Remove unnecessary boilerplate code. Call usb_config_do_bind() in legacy gadget zero, because it uses usb_add_config_only() instead of usb_add_co

[PATCH v3 04/36] usb: gadget: f_loopback: free requests in loopback_disable()

2015-12-11 Thread Robert Baldyga
USB requests in Loopback function are allocated in loopback_get_alt() function, so we prefer to free them rather in loopback_disable() than in loopback_complete() when request is completed with error. It provides better symetry in resource management and improves code readability. Signed-off-by: R

[PATCH v3 08/36] usb: gadget: composite: introduce new USB function ops

2015-12-11 Thread Robert Baldyga
Introduce two new USB function operations: 1. prep_descs() prepares and assigns entity (interface and endpoint) descriptors to USB function. It's mandatory, in the new function API, as each USB function should have at least minimalistic set of entity descriptors. The minimum is single inferface wi

[PATCH v3 10/36] usb: gadget: composite: handle vendor descs

2015-12-11 Thread Robert Baldyga
After binding all configurations in gadget, call prep_vendor_descs() for each function which uses new API and implements this callback. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 31 +++ include/linux/usb/composite.h | 2 ++ 2 files changed,

[PATCH v3 11/36] usb: gadget: composite: generate old descs for compatibility

2015-12-11 Thread Robert Baldyga
For now we generate descriptor arrays for each speed as it is done by old API functions, to allow use mixed new and old API based functions in single configurations. This will be removed after complete switch to new API. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/composite.c | 175 +++

[PATCH v3 07/36] usb: gadget: composite: add functions for descriptors handling

2015-12-11 Thread Robert Baldyga
Introduce functions and macros allowing to create and assign descriptors to function easily. Macros build structure hierarchy using pointers to USB descriptors, while functions assigning them to gadget make a deep copy. It allows for easy conversion of USB functions to make them using new descripto

[PATCH v3 12/36] usb: gadget: composite: disable eps before calling disable() callback

2015-12-11 Thread Robert Baldyga
Changes meaning of disable() operation for functions using new API. Before calling disable() callback composite automatically disables endpoints of active altsettings of given USB function. This reduces amount of boilerplate code in USB functions. Signed-off-by: Robert Baldyga --- drivers/usb/ga

[PATCH v3 06/36] usb: gadget: composite: introduce new descriptors format

2015-12-11 Thread Robert Baldyga
Introduce new structures designed to contain information about descriptors. It splits descriptors in two categories: 1. Entity descs - interface and endpoint descriptors 2. Vendor descs - all other vendor and class specific descriptors Entity descriptors are embedded in hierarchy of structures whi

[PATCH v3 13/36] usb: gadget: composite: enable eps before calling set_alt() callback

2015-12-11 Thread Robert Baldyga
Change set_alt() behavior for functions using new API. Before we call set_alt() callback, we disable endpoints of previously selected altsetting, and enable endpoints of currently selected altsetting, which reduces amount of boilerplate code in USB functions. We also calculate index of interface i

[PATCH v3 09/36] usb: gadget: composite: handle function bind

2015-12-11 Thread Robert Baldyga
As now USB function supplies entity descriptors to composite in prep_descs() callback, we can perform bind inside composite framework without involving bind() callback (which now is unused and will be removed after converting all functions in kernel to new API). For now we bind each configuration

[PATCH v3 02/36] usb: gadget: f_sourcesink: make ISO altset user-selectable

2015-12-11 Thread Robert Baldyga
So far it was decided during the bind process whether is iso altsetting included to f_sourcesink function or not. This decision was based on availability of isochronous endpoints. Since we can assemble gadget driver using composite framework and configfs from many different functions, availability

[PATCH v3 05/36] usb: gadget: configfs: fix error path

2015-12-11 Thread Robert Baldyga
As usb_gstrings_attach() failure can happen when some USB functions are are already added to some configurations (in previous loop iterations), we should always call purge_configs_funcs() to be sure that failure is be handled properly. Signed-off-by: Robert Baldyga --- drivers/usb/gadget/configf

[PATCH v3 01/36] Documentation: usb: update usb-tools repository address

2015-12-11 Thread Robert Baldyga
It seems that gitotious repository is no longer accessible, so we replace it with address to active repository. Signed-off-by: Robert Baldyga --- Documentation/usb/gadget-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/usb/gadget-testing.txt b/Docum

[PATCH v3 00/36] usb: gadget: composite: introduce new function API

2015-12-11 Thread Robert Baldyga
Hi Felipe, Here is my new patch series doing some changes in composite framework and modifying USB Function API. Some of concepts changed significantly, for example bind process is done automatically inside composite framework after collecting descriptors from all Functions. Hence bind() operation

[PATCH v3 03/36] usb: gadget: f_sourcesink: free requests in sourcesink_disable()

2015-12-11 Thread Robert Baldyga
USB requests in SourceSink function are allocated in sourcesink_get_alt() function, so we prefer to free them rather in sourcesink_disable() than in source_sink_complete() when request is completed with error. It provides better symetry in resource management and improves code readability. Signed-

Re: [PATCH v2] usb: gadget: ether: Allow changing the MTU

2015-12-11 Thread Mike Looijmans
Just a "ping" reminder, I'd like to inquire about the status of this patch... On 30-11-15 12:18, Mike Looijmans wrote: The gadget ethernet driver supports changing the MTU, but only allows this when the USB cable is removed. The comment indicates that this is because the "peer won't know". Even

Re: [PATCH v3 2/3] usb: renesas_usbhs: add fallback compatibility strings

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 5:12 AM, Simon Horman wrote: Add fallback compatibility strings for R-Car Gen2 and Gen3. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: Simon Horman --- v3 * Moved documentation of SoC names to a

Re: [PATCH 2/2] usb: serial: remove redundant condition

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 12:46 PM, Geyslan G. Bem wrote: It's a bad idea to send 2 different patches with the same subject. I'd use "mos7840: " as a prefix in this case. This patch removes redundant condition. (length && length > 5) can be reduced to a single evaluation. Tested by compila

[PATCH 0/1] xhci fix for usb-linus

2015-12-11 Thread Mathias Nyman
Hi Greg One more xhci patch for usb-linus that hopefully can make 4.4. An issue in xhci usb2 port resume code was found that sometimes prevents xhci usb2 roothub runtime suspend, always returning -EBUSY, leaving a kworker thread spinning in rpm_suspend. Mathias Nyman (1): xhci: fix usb2 resume

[PATCH 1/1] xhci: fix usb2 resume timing and races.

2015-12-11 Thread Mathias Nyman
According to USB 2 specs ports need to signal resume for at least 20ms, in practice even longer, before moving to U0 state. Both host and devices can initiate resume. On device initiated resume, a port status interrupt with the port in resume state in issued. The interrupt handler tags a resume_do

Re: [PATCH v3 01/36] Documentation: usb: update usb-tools repository address

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 2:24 PM, Robert Baldyga wrote: It seems that gitotious repository is no longer accessible, so we replace Gitorious. it with address to active repository. Signed-off-by: Robert Baldyga [...] MBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 2/2] usb: serial: remove redundant condition

2015-12-11 Thread Geyslan G. Bem
2015-12-11 9:30 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/11/2015 12:46 PM, Geyslan G. Bem wrote: > >It's a bad idea to send 2 different patches with the same subject. I'd > use "mos7840: " as a prefix in this case. Sergei, tks for the advice. Johan already applied for next. > >> This pa

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Bjørn Mork
Johan Hovold writes: > Dan and Björn, > > On Thu, Dec 10, 2015 at 04:42:52PM +0100, yegorsli...@googlemail.com wrote: >> From: Yegor Yefremov >> >> Signed-off-by: Yegor Yefremov >> --- >> drivers/usb/serial/option.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/usb/seri

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Yegor Yefremov
Hi Bjørn, On Fri, Dec 11, 2015 at 1:50 PM, Bjørn Mork wrote: > Johan Hovold writes: > >> Dan and Björn, >> >> On Thu, Dec 10, 2015 at 04:42:52PM +0100, yegorsli...@googlemail.com wrote: >>> From: Yegor Yefremov >>> >>> Signed-off-by: Yegor Yefremov >>> --- >>> drivers/usb/serial/option.c | 1

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Bjørn Mork
Yegor Yefremov writes: > Let me know, if you need any additional info or if I should make specific > tests. First of all: Does it work with qmi_wwan? There is already a device entry there. You'll need to use qmicli (from libqmi) or similar to verify the QMI support. The driver probing is too

Re: [PATCH] extcon-usb-gpio: add enable pin support

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 07:05 AM, Chanwoo Choi wrote: Sometimes there's a real OTG chip behind the USB ID signal mapped to a GPIO pin: in my case it's Maxim Integrated MAX3355E which integrates Vbus charge pump and comparators and passes thru the ID signal from an OTG connector. s/thru/thr

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Yegor Yefremov
On Fri, Dec 11, 2015 at 2:46 PM, Bjørn Mork wrote: > Yegor Yefremov writes: > >> Let me know, if you need any additional info or if I should make specific >> tests. > > First of all: Does it work with qmi_wwan? There is already a device > entry there. You'll need to use qmicli (from libqmi) or

[PATCHv5 03/18] fs: configfs: Factor out configfs_find_subsys_dentry()

2015-12-11 Thread Andrzej Pietrasiewicz
From: Krzysztof Opasiak configfs_depend_item() is quite complicated and should be split up into smaller functions. This also allow to share this code with other functions. Signed-off-by: Krzysztof Opasiak Cc: Joel Becker Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- fs/configf

[PATCHv5 00/18] Equivalent of tcm_usb_gadget with configfs

2015-12-11 Thread Andrzej Pietrasiewicz
Dear All, This series adds support to tcm usb gadget for composing it with configfs. @Felipe: The v4 series was rebased onto Nicholas' tree (target-pending). Consequently, the recent fixing patches were based against that tree. This (v5) series is rebased onto your tree in case you want to apply

[PATCHv5 09/18] usb: gadget: tcm: follow naming conventions

2015-12-11 Thread Andrzej Pietrasiewicz
Prepare for splitting tcm_usb_gadget into legacy gadget proper and f_tcm. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/legacy/tcm_usb_gadget.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadge

[PATCHv5 18/18] usb: gadget: f_tcm: add configfs support

2015-12-11 Thread Andrzej Pietrasiewicz
Allow using the tcm function as a component of a gadget composed with ConfigFS. Signed-off-by: Andrzej Pietrasiewicz --- Documentation/ABI/testing/configfs-usb-gadget-tcm | 6 ++ drivers/usb/gadget/Kconfig| 14 + drivers/usb/gadget/function/f_tcm.c | 72

[PATCHv5 04/18] fs: configfs: Add unlocked version of configfs_depend_item()

2015-12-11 Thread Andrzej Pietrasiewicz
From: Krzysztof Opasiak This change is necessary for the SCSI target usb gadget composed with configfs. In this case configfs will be used for two different purposes: to compose a usb gadget and to configure the target part. If an instance of tcm function is created in $CONFIGFS_ROOT/usb_gadget//

[PATCHv5 15/18] usb: gadget: f_tcm: remove compatibility layer

2015-12-11 Thread Andrzej Pietrasiewicz
There are no old function interface users left. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_tcm.c | 87 +++-- 1 file changed, 6 insertions(+), 81 deletions(-) diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/functi

[PATCHv5 11/18] usb: gadget: tcm: simplify attribute store function

2015-12-11 Thread Andrzej Pietrasiewicz
Simplify function code. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/legacy/tcm_usb_gadget.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c b/drivers/usb/gadget/legacy/tcm_usb_gadget.c index 9

[PATCHv5 14/18] usb: gadget: tcm: convert to use new function registration interface

2015-12-11 Thread Andrzej Pietrasiewicz
Convert the only user of old tcm function interface so that the old interface can be removed. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/legacy/Kconfig | 1 + drivers/usb/gadget/legacy/tcm_usb_gadget.c | 62 +- 2 files changed, 53 insertions

[PATCHv5 08/18] usb: gadget: tcm: split string definitions into function and device

2015-12-11 Thread Andrzej Pietrasiewicz
Prepare for factoring out f_tcm from a legacy gadget. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/legacy/tcm_usb_gadget.c | 25 + drivers/usb/gadget/legacy/tcm_usb_gadget.h | 3 +-- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/u

[PATCHv5 13/18] usb: gadget: f_tcm: convert to new function interface with backward compatibility

2015-12-11 Thread Andrzej Pietrasiewicz
Converting tcm to the new function interface requires converting USB tcm's function code and its users. This patch converts the f_tcm.c to the new function interface. The file can be now compiled into a separate module usb_f_tcm.ko. The old function interface is provided by means of preprocessor

[PATCHv5 16/18] usb: gadget: f_tcm: remove redundant singleton

2015-12-11 Thread Andrzej Pietrasiewicz
The only instance is guaranteed with TPG_INSTANCES defined to 1. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_tcm.c | 9 - drivers/usb/gadget/function/tcm.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/u

[PATCHv5 10/18] usb: gadget: tcm: use strtobool for a boolean value

2015-12-11 Thread Andrzej Pietrasiewicz
Simplify the function. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/legacy/tcm_usb_gadget.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c b/drivers/usb/gadget/legacy/tcm_usb_gadget.c index b6e46a0..98064b

[PATCHv5 05/18] tcm_usb_gadget: Don't strip off nexus WWPN prefix

2015-12-11 Thread Andrzej Pietrasiewicz
From: Nicholas Bellinger Avoid stripping off the 'naa.' I_T nexus prefix from configfs attribute store input, so that user-space will get back what it originaly wrote into ../usb_gadget/$WWPN/$TPGT/nexus. Note the SCSI initiator WWPN is purely symbolic for UAS + BOT, so it will not effect host s

[PATCHv5 12/18] usb: gadget: tcm: factor out f_tcm

2015-12-11 Thread Andrzej Pietrasiewicz
Prepare for converting tcm to new function registration interface. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_tcm.c| 2145 drivers/usb/gadget/function/tcm.h | 132 ++ drivers/usb/gadget/legacy/tcm_usb_gadget.c | 2132 +---

[PATCHv5 01/18] fs: configfs: Drop unused parameter from configfs_undepend_item()

2015-12-11 Thread Andrzej Pietrasiewicz
From: Krzysztof Opasiak subsys parameter is never used by configfs_undepend_item() so there is no point in passing it to this function. Signed-off-by: Krzysztof Opasiak Cc: Joel Becker Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_configfs.c | 2 +-

[PATCHv5 07/18] tcm_usb_gadget: Fix enabled attribute failure

2015-12-11 Thread Andrzej Pietrasiewicz
From: Nicholas Bellinger Fix up tcm_usbg_tpg_store_enable() return value to propagate usbg_attach() failure up to user-space if no HDC is found. Reported-by: Andrzej Pietrasiewicz Cc: Andrzej Pietrasiewicz Cc: Sebastian Andrzej Siewior Signed-off-by: Nicholas Bellinger [split unrelated chang

[PATCHv5 17/18] usb: gadget: f_tcm: use usb_gstrings_attach

2015-12-11 Thread Andrzej Pietrasiewicz
Do not directly use file static strings definitions in instances of f_tcm. Instead use usb_gstrings_attach. Signed-off-by: Andrzej Pietrasiewicz --- drivers/usb/gadget/function/f_tcm.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/gadget/func

[PATCHv5 06/18] tcm_usb_gadget: Fix nexus leak

2015-12-11 Thread Andrzej Pietrasiewicz
From: Nicholas Bellinger This patch adds the missing tcm_usbg_drop_nexus() to properly release tcm_usbg_nexus memory during typical ->fabric_drop_tpg() callback shutdown. Reported-by: Andrzej Pietrasiewicz Cc: Andrzej Pietrasiewicz Cc: Sebastian Andrzej Siewior Signed-off-by: Nicholas Belling

[PATCHv5 02/18] fs: configfs: Factor out configfs_do_depend_item()

2015-12-11 Thread Andrzej Pietrasiewicz
From: Krzysztof Opasiak configfs_depend_item() is quite complicated and should be split up into smaller functions. This also allow to share this code with other functions. Signed-off-by: Krzysztof Opasiak Cc: Joel Becker Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- fs/configf

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Lars Melin
Seems it follows the layout given by the windows drivers, no special Quectel layout. MI_00 Qualcomm HS-USB Diagnostics 9003 MI_01 Qualcomm HS-USB NMEA 9003 MI_02 Qualcomm HS-USB AT Port 9003 MI_03 Qualcomm HS-USB Modem 9003 MI_04 Qualcomm Wireless HS-USB Ethernet Adapter 9003 wbr /Lars -- T

[PATCH v4 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-12-11 Thread Hans de Goede
Use of_match_node instead of calling of_device_is_compatible a ton of times to get model specific config data. Signed-off-by: Hans de Goede --- Changes in v3: -New patch in v3 of this patch-set Changes in v4: -Use of_device_get_match_data() -Add phyctl_offset to sun4i_usb_phy_cfg, get rid of mode

[PATCH v4 2/2] phy-sun4i-usb: Add support for the host usb-phys found on the H3 SoC

2015-12-11 Thread Hans de Goede
From: Reinder de Haan Note this commit only adds support for phys 1-3, phy 0, the otg phy, is not yet (fully) supported after this commit. Signed-off-by: Reinder de Haan Signed-off-by: Hans de Goede --- Changes in v2: -Change break; after dev_err() to return, as intended, fixing a compiler wa

[PATCH v2 1/3] reset: Add shared reset_control_[de]assert variants

2015-12-11 Thread Hans de Goede
Add reset_control_deassert_shared / reset_control_assert_shared functions which are intended for use by drivers for hw blocks which (may) share a reset line with another driver / hw block. Unlike the regular reset_control_[de]assert functions these functions keep track of how often deassert_shared

[PATCH v2 3/3] ohci-platform: Add support for controllers with multiple reset lines

2015-12-11 Thread Hans de Goede
At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for its companion is still asserted, which means we need to de-assert 2 resets for the controller to work. Signed-off-by: Hans de Goede --- Changes in v2: -New patc

[PATCH v2 2/3] ehci-platform: Add support for controllers with multiple reset lines

2015-12-11 Thread Hans de Goede
From: Reinder de Haan At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for its companion is still asserted, which means we need to de-assert 2 resets for the controller to work. Signed-off-by: Reinder de Haan Si

Re: [PATCH v6 0/3] USB MIDI Gadget improvements and bug fixes

2015-12-11 Thread Felipe Ferreri Tonello
Hi all, On 01/12/15 18:30, Felipe F. Tonello wrote: > Fixed all comments suggested by the linux-usb list. > > changes in v6: > - Removed patches already applied in Balbi's tree > - Cleanups on pre-allocation usb requrests patch > - Fixed indentention on patch 1 > - Added patch which fails set

Re: [PATCH v2 1/3] reset: Add shared reset_control_[de]assert variants

2015-12-11 Thread Philipp Zabel
Hi Hans, thanks for moving this forward. Am Freitag, den 11.12.2015, 16:41 +0100 schrieb Hans de Goede: > Add reset_control_deassert_shared / reset_control_assert_shared > functions which are intended for use by drivers for hw blocks which > (may) share a reset line with another driver / hw block

Re: [PATCH v2 2/3] ehci-platform: Add support for controllers with multiple reset lines

2015-12-11 Thread Philipp Zabel
Am Freitag, den 11.12.2015, 16:41 +0100 schrieb Hans de Goede: > From: Reinder de Haan > > At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple > reset lines, the controller will not initialize while the reset for > its companion is still asserted, which means we need to de-assert

Re: [PATCH v2 1/3] reset: Add shared reset_control_[de]assert variants

2015-12-11 Thread Hans de Goede
Hi, On 11-12-15 18:10, Philipp Zabel wrote: Hi Hans, thanks for moving this forward. Thanks for the quick review, I've a couple of (simple) questions about your review remarks once those are cleared up I'll post a new version (of just this patch). Am Freitag, den 11.12.2015, 16:41 +0100 sch

Re: [PATCH v2 2/3] ehci-platform: Add support for controllers with multiple reset lines

2015-12-11 Thread Hans de Goede
Hi, On 11-12-15 18:13, Philipp Zabel wrote: Am Freitag, den 11.12.2015, 16:41 +0100 schrieb Hans de Goede: From: Reinder de Haan At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for its companion is still asse

Re: [PATCH] extcon-usb-gpio: add enable pin support

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 06:53 AM, Rob Herring wrote: Sometimes there's a real OTG chip behind the USB ID signal mapped to a GPIO pin: in my case it's Maxim Integrated MAX3355E which integrates Vbus charge pump and comparators and passes thru the ID signal from an OTG connector. This chip als

[PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write

2015-12-11 Thread David Eccher
Fix bad unlock balance: ep0_write enter with the locks locked from inode.c:1769, hence it must exit with spinlock held to avoid double unlock in dev_config. Signed-off-by: David Eccher --- drivers/usb/gadget/legacy/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/le

Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write

2015-12-11 Thread Al Viro
On Fri, Dec 11, 2015 at 08:56:26PM +0100, David Eccher wrote: > Fix bad unlock balance: ep0_write enter with the locks locked from > inode.c:1769, > hence it must exit with spinlock held to avoid double unlock in dev_config. *Ugh* Just take that spinlock before the if (retval < 0) and don't drop

Re: [PATCH v3 4/9] usb: host: ehci.h: fix single statement macros

2015-12-11 Thread Greg Kroah-Hartman
On Thu, Dec 10, 2015 at 03:18:19PM -0300, Geyslan G. Bem wrote: > Don't use the 'do {} while (0)' wrapper in a single statement macro. > > Caught by checkpatch: "WARNING: Single statement macros should not > use a do {} while (0) loop" > > Signed-off-by: Geyslan G. Bem > --- > Change in v3: > -

Re: [PATCH v2] usb: Use memdup_user to reuse the code

2015-12-11 Thread gre...@linuxfoundation.org
On Wed, Dec 09, 2015 at 08:02:53AM +, Pathak, Rahul (R.) wrote: > Hello Alan, > > Should I resend this patch version with the tear line correction? Yes please. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v2] usb: ehci: refactor scan_isoc function

2015-12-11 Thread Geyslan G. Bem
2015-12-10 21:55 GMT-03:00 Geyslan G. Bem : > This patch removes an infinite for loop and makes use of the already > existing 'restart' tag, reducing one leading tab. > > The comments and code were corrected conforming coding style. > > Tested by compilation only. > Caught by checkpatch: > WARNING

Re: [PATCH] USB: serial: option: add support for Quectel UC20

2015-12-11 Thread Bjørn Mork
Yegor Yefremov writes: > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 138 > bNumInterfaces 5 So that's one interface more than the standard "Gobi" modems, meaning that it doesn't directly fit qcserial. I bel

Re: [PATCH v3 4/9] usb: host: ehci.h: fix single statement macros

2015-12-11 Thread Geyslan G. Bem
2015-12-11 13:30 GMT-03:00 Greg Kroah-Hartman : > On Thu, Dec 10, 2015 at 03:18:19PM -0300, Geyslan G. Bem wrote: >> Don't use the 'do {} while (0)' wrapper in a single statement macro. >> >> Caught by checkpatch: "WARNING: Single statement macros should not >> use a do {} while (0) loop" >> >> Sig

Re: [PATCH 1/1] USB: inode.c: fix unbalanced spin_lock in ep0_write

2015-12-11 Thread Sergei Shtylyov
Hello. On 12/11/2015 10:56 PM, David Eccher wrote: Fix bad unlock balance: ep0_write enter with the locks locked from inode.c:1769, hence it must exit with spinlock held to avoid double unlock in dev_config. Signed-off-by: David Eccher --- drivers/usb/gadget/legacy/inode.c | 1 + 1 file ch

  1   2   >