Re: [PATCH 1/9v2] usb: host: ehci.h: remove space before comma

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:30PM -0300, Geyslan G. Bem wrote: > Get rid of spaces before comma. > > Caught by checkpatch: "ERROR: space prohibited before that ','" > > Signed-off-by: Geyslan G. Bem > --- It is a good idea to include here (after the ---) what changed from V1. Other than that: A

Re: [PATCH 3/9v2] usb: host: ehci.h: remove space before open square bracket

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:32PM -0300, Geyslan G. Bem wrote: > Get rid of space before open square bracket. > > Caught by checkpatch: "ERROR: space prohibited before open square > bracket '['" > > Signed-off-by: Geyslan G. Bem As with previous, missing the changelog, but other than that the p

Re: [PATCH 2/9v2] usb: host: ehci.h: remove space before function open parenthesis

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:31PM -0300, Geyslan G. Bem wrote: > Get rid of space between function name and open parenthesis. > > Caught by checkpatch: "WARNING: space prohibited between function name > and open parenthesis '('" > > Signed-off-by: Geyslan G. Bem > --- As with previous, missing

Re: [PATCH v2 2/2] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-10 Thread Geert Uytterhoeven
Hi Simon, On Thu, Dec 10, 2015 at 6:40 AM, Simon Horman wrote: > Simply document new compatibility string. > As a previous patch adds a generic R-Car Gen2 compatibility string > there appears to be no need for a driver updates. > > Signed-off-by: Simon Horman > Acked-by: Rob Herring > --- > Do

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

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:33PM -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 As with previous, missing

Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:34PM -0300, Geyslan G. Bem wrote: > Prefer to use __aligned(size) macro instead of > __attribute__((aligned(size))). > > Caught by checkpatch: "WARNING" Not sure about the WARNING here, maybe just remove this line? > > Signed-off-by: Geyslan G. Bem As with previous

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:35PM -0300, Geyslan G. Bem wrote: > Put space after comma. > > This patch also changes QH_NEXT macro for better reading. > > Caught by checkpatch: "ERROR: space required after that ','" > > Signed-off-by: Geyslan G. Bem > --- > drivers/usb/host/ehci.h | 5 +++-- >

Re: [PATCH 7/9v2] usb: host: ehci.h: remove macros trailing semicolon

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:36PM -0300, Geyslan G. Bem wrote: > Removes trailing semicolon from macros. > > Caught by checkpatch: > "WARNING: macros should not use a trailing semicolon" > > Signed-off-by: Geyslan G. Bem As with previous, missing the changelog, but other than that the patch loo

Re: [PATCH 8/9v2] usb: host: ehci.h: move pointer operator to name side

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:32:37PM -0300, Geyslan G. Bem wrote: > The pointer operator must be sticked to name. > > Caught by checkpatch: > ERROR: "foo * bar" should be "foo *bar" > > Signed-off-by: Geyslan G. Bem As with previous, missing the changelog, but other than that the patch looks good

Re: [PATCH 9/9] usb: host: ehci.h: move constant to right

2015-12-10 Thread Peter Senna Tschudin
On Wed, Dec 09, 2015 at 07:15:37PM -0300, Geyslan G. Bem wrote: > This patch moves the constant 0x3ff to right and put spaces > in the right shift. > > Caught by coccinelle: > scripts/coccinelle/misc/compare_const_fl.cocci > > Signed-off-by: Geyslan G. Bem Acked-by: Peter Senna Tschudin > --- >

Re: [PATCH 5/9v2] usb: host: ehci.h: remove direct use of __attribute__ keyword

2015-12-10 Thread Geyslan G. Bem
2015-12-10 7:01 GMT-03:00 Peter Senna Tschudin : > On Wed, Dec 09, 2015 at 07:32:34PM -0300, Geyslan G. Bem wrote: >> Prefer to use __aligned(size) macro instead of >> __attribute__((aligned(size))). >> >> Caught by checkpatch: "WARNING" > Not sure about the WARNING here, maybe just remove this lin

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Johan Hovold
On Wed, Dec 09, 2015 at 10:52:42PM -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. > > Caught by: cppcheck > > Signed-off-by: Geyslan G. Bem > --- > driv

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 7:44 GMT-03:00 Johan Hovold : > On Wed, Dec 09, 2015 at 10:52:42PM -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. >> >> Caught by: cppcheck >>

[PATCHv2] usb: gadget: f_tcm: ignore return value of queue_work

2015-12-10 Thread Andrzej Pietrasiewicz
queue_work() has never returned anything less than zero. Signed-off-by: Andrzej Pietrasiewicz --- This patch depends on the series adding configfs support to tcm usb gadget: http://www.spinics.net/lists/target-devel/msg11215.html v1..v2: removed unused "ret" variable drivers/usb/gadget/functi

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

2015-12-10 Thread Sergei Shtylyov
Hello. On 12/10/2015 1:32 AM, 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 --- drivers/usb/host/ehci.h | 4 ++-- 1 fil

Re: [PATCH v2 1/2] usb: renesas_usbhs: add fallback compatibility strings

2015-12-10 Thread Sergei Shtylyov
Hello. On 12/10/2015 8:40 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. Also add SoC names. Signed-off-by: Simon Horman --- v2 * Add R-Car Gen2 a

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

2015-12-10 Thread Geyslan G. Bem
2015-12-10 8:54 GMT-03:00 Sergei Shtylyov : > Hello. > > On 12/10/2015 1:32 AM, 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

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

2015-12-10 Thread Geyslan G. Bem
2015-12-10 9:20 GMT-03:00 Geyslan G. Bem : > 2015-12-10 8:54 GMT-03:00 Sergei Shtylyov > : >> Hello. >> >> On 12/10/2015 1:32 AM, 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

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

2015-12-10 Thread Sergei Shtylyov
On 12/10/2015 04:05 PM, 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 --- drivers/usb/host/ehci.h | 4 ++-- 1 file cha

[PATCH v1 1/1] usb: core: use kbasename() instead of open-coded variant

2015-12-10 Thread Andy Shevchenko
kbasename() helper is dedicated to find a last part of the filename or pathname. USB core uses open-coded variant of that helper. Replace some lines of code by kbasename() call. The current users do not have trailing slash and we are on the safe side to make such change. I dig a history of the co

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Felipe Balbi
Hi, "Geyslan G. Bem" writes: > This patch removes redundant conditions. > > - (!A || (A && B)) is the same as (!A || B). > - (length && length > 5) can be reduced to a single evaluation. > > Caught by: cppcheck > > Signed-off-by: Geyslan G. Bem Can you split this into one patch per driver, t

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

2015-12-10 Thread Geyslan G. Bem
2015-12-10 11:44 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 04:05 PM, 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" > > Sign

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 11:50 GMT-03:00 Felipe Balbi : > > Hi, > > "Geyslan G. Bem" writes: >> This patch removes redundant conditions. >> >> - (!A || (A && B)) is the same as (!A || B). >> - (length && length > 5) can be reduced to a single evaluation. >> >> Caught by: cppcheck >> >> Signed-off-by: Geyslan

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Felipe Balbi
"Geyslan G. Bem" writes: > This patch removes redundant conditions. > > - (!A || (A && B)) is the same as (!A || B). > - (length && length > 5) can be reduced to a single evaluation. > > Caught by: cppcheck > > Signed-off-by: Geyslan G. Bem > --- I guess you didn't get previous comment in tim

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:13 GMT-03:00 Felipe Balbi : > "Geyslan G. Bem" writes: > >> This patch removes redundant conditions. >> >> - (!A || (A && B)) is the same as (!A || B). >> - (length && length > 5) can be reduced to a single evaluation. >> >> Caught by: cppcheck >> >> Signed-off-by: Geyslan G. Bem

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:17 GMT-03:00 David Laight : > From: Felipe Balbi >> Sent: 10 December 2015 15:14 >> "Geyslan G. Bem" writes: >> >> > This patch removes redundant conditions. >> > >> > - (!A || (A && B)) is the same as (!A || B). >> > - (length && length > 5) can be reduced to a single evaluation.

RE: [PATCH] usb: remove redundant conditions

2015-12-10 Thread David Laight
From: Felipe Balbi > Sent: 10 December 2015 15:14 > "Geyslan G. Bem" writes: > > > This patch removes redundant conditions. > > > > - (!A || (A && B)) is the same as (!A || B). > > - (length && length > 5) can be reduced to a single evaluation. > > > > Caught by: cppcheck > > > > Signed-off-by:

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Felipe Balbi
Hi, "Geyslan G. Bem" writes: > 2015-12-10 12:13 GMT-03:00 Felipe Balbi : >> "Geyslan G. Bem" writes: >> >>> This patch removes redundant conditions. >>> >>> - (!A || (A && B)) is the same as (!A || B). >>> - (length && length > 5) can be reduced to a single evaluation. >>> >>> Caught by: cppc

Re: [PATCH] usb: remove redundant conditions

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:29 GMT-03:00 Geyslan G. Bem : > 2015-12-10 12:17 GMT-03:00 David Laight : >> From: Felipe Balbi >>> Sent: 10 December 2015 15:14 >>> "Geyslan G. Bem" writes: >>> >>> > This patch removes redundant conditions. >>> > >>> > - (!A || (A && B)) is the same as (!A || B). >>> > - (length

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

2015-12-10 Thread yegorslists
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/option.c index f228060..e0950bf 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Alan Stern
On Thu, 10 Dec 2015, Peter Senna Tschudin wrote: > > /* next async queue entry, or pointer to interrupt/periodic QH */ > > -#define QH_NEXT(ehci,dma) (cpu_to_hc32(ehci, > > (((u32)dma)&~0x01f)|Q_TYPE_QH)) > > +#define QH_NEXT(ehci, dma) \ > > + (cpu_to_hc32(ehci, (((u32) dma) & ~0x01f

Locking problem in USB/IP

2015-12-10 Thread Andrew Goodbody
I have an application using the USB/IP drivers and I turned on the lock debugging and checking options in the kernel. I now get this deadlock report in syslog Dec 11 15:03:20 cbrx-fw01 kernel: [ 220.497958] usbip_core: USB/IP Core v1.0.0 Dec 10 15:03:20 cbrx-fw01 kernel: [ 220.499707] vhci_hcd

Re: [PATCH 6/9v2] usb: host: ehci.h: use space after comma

2015-12-10 Thread Geyslan G. Bem
2015-12-10 12:57 GMT-03:00 Alan Stern : > On Thu, 10 Dec 2015, Peter Senna Tschudin wrote: > >> > /* next async queue entry, or pointer to interrupt/periodic QH */ >> > -#define QH_NEXT(ehci,dma) (cpu_to_hc32(ehci, >> > (((u32)dma)&~0x01f)|Q_TYPE_QH)) >> > +#define QH_NEXT(ehci, dma) \ >> > +

USB3 xHCI Error, unable to acces the disk

2015-12-10 Thread Sébastien Deligny
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 become readonly. Tested with 4.2 kernel. With tes

Re: [PATCHv2] usb: gadget: f_tcm: ignore return value of queue_work

2015-12-10 Thread Felipe Balbi
Hi, Andrzej Pietrasiewicz writes: > queue_work() has never returned anything less than zero. > > Signed-off-by: Andrzej Pietrasiewicz I don't have f_tcm.c anywhere. Where did you base this commit ? -- balbi signature.asc Description: PGP signature

Re: [patch] usb: gadget: f_tcm: memory leak on error in tcm_alloc_inst()

2015-12-10 Thread Felipe Balbi
Dan Carpenter writes: > We need to kfree(opts) on error. Also it's nicer to allocate opts > before taking the lock. > > Signed-off-by: Dan Carpenter what's the base for this commit ? I don't have f_tcm.c anywhere. -- balbi signature.asc Description: PGP signature

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

2015-12-10 Thread Felipe Balbi
Hi, Marek Szyprowski writes: > Hello, > > 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 submission (v5) includes rebase onto > latest linux-next branch, simplification

Re: [PATCHv2] usb: gadget: f_tcm: ignore return value of queue_work

2015-12-10 Thread Andrzej Pietrasiewicz
Hi W dniu 10.12.2015 o 17:51, Felipe Balbi pisze: Hi, Andrzej Pietrasiewicz writes: queue_work() has never returned anything less than zero. Signed-off-by: Andrzej Pietrasiewicz I don't have f_tcm.c anywhere. Where did you base this commit ? The comment after the scissors line states t

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

2015-12-10 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Marek Szyprowski writes: >> Hello, >> >> 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 submission (v5) includes rebase onto >> latest lin

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

2015-12-10 Thread Felipe Balbi
Hi, Felipe Balbi writes: > Felipe Balbi writes: >> Marek Szyprowski writes: >>> Hello, >>> >>> 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 submission (v5) inc

Re: [PATCHv2] usb: gadget: f_tcm: ignore return value of queue_work

2015-12-10 Thread Felipe Balbi
Hi, Andrzej Pietrasiewicz writes: >> Andrzej Pietrasiewicz writes: >>> queue_work() has never returned anything less than zero. >>> >>> Signed-off-by: Andrzej Pietrasiewicz >> >> I don't have f_tcm.c anywhere. Where did you base this commit ? >> > The comment after the scissors line states tha

Re: [PATCH] usb: gadget: make usb_ep_enable return -EBUSY if ep has already enabled

2015-12-10 Thread Felipe Balbi
Hi, changbin...@intel.com writes: > From: "Du, Changbin" > > When usb_ep_enable on a enabled ep, the configuration of the ep probably > has changed. In this scenario, the ep configuration in hw should be > reprogrammed by udc driver. Hence, it is better to return an error to > inform the caller.

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

2015-12-10 Thread Sergei Shtylyov
On 12/10/2015 05:56 PM, 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 --- drivers/usb/host/ehci.h | 4 ++-- 1 file c

Re: [PATCH 1/2] usb: dwc2: add ep enabled flag to avoid double enable/disable

2015-12-10 Thread Felipe Balbi
Hi, changbin...@intel.com writes: > From: "Du, Changbin" > > Enabling a already enabled ep is illegal, because the ep may has trbs > running. Reprogram the ep may break running transfer. So udc driver > must avoid this happening by return an error -EBUSY. Gadget function > driver also should avo

Re: [PATCH 2/2] usb: dwc2: forbid queuing request to a disabled ep

2015-12-10 Thread Felipe Balbi
Hi, changbin...@intel.com writes: > From: "Du, Changbin" > > Queue a request to disabled ep doesn't make sense, and induce caller > make mistakes. > > Here is a example for the android mtp gadget function driver. A mem > corruption can happen on below senario. > 1) On disconnect, mtp driver dis

Re: [PATCH] usb: gadget: forbid queuing request to a disabled ep

2015-12-10 Thread Felipe Balbi
Hi, changbin...@intel.com writes: > From: "Du, Changbin" > > Queue a request to disabled ep doesn't make sense, and induce caller > make mistakes. > > Here is a example for the android mtp gadget function driver. A mem > corruption can happen on below senario. > 1) On disconnect, mtp driver dis

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

2015-12-10 Thread Geyslan G. Bem
2015-12-10 14:26 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 05:56 PM, 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" >>>

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

2015-12-10 Thread Sergei Shtylyov
On 12/10/2015 08:40 PM, 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 --- drivers/usb/host/ehci.h | 4 ++-- 1 file

Re: [PATCH 2/2] usb: host: ehci-msm: Use posted data writes on AHB

2015-12-10 Thread Timur Tabi
On Fri, Nov 6, 2015 at 12:04 AM, Andy Gross wrote: > This patch sets the AHBMODE to allow for posted data writes. This > results in higher performance. > > Signed-off-by: Andy Gross I know it's a little late, but ... Acked-by: Timur Tabi -- Qualcomm Innovation Center, Inc. The Qualcomm Inno

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

2015-12-10 Thread Geyslan G. Bem
2015-12-10 14:47 GMT-03:00 Sergei Shtylyov : > On 12/10/2015 08:40 PM, 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

Re: USB to serial(ttyUSB) port crash in debian. task khubd:369 blocked for more than 120 seconds

2015-12-10 Thread Greg KH
On Wed, Dec 09, 2015 at 02:45:37PM -0600, SaRaVanAn wrote: > Our device went for reset. So it starts loading and unloading the > serial USB port. Not good. > Here the serious concern is kernel lock. Once it happens the system > is unusable and hard reboot is the only way of recovering it. > > Ke

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

2015-12-10 Thread Geyslan G. Bem
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: - There's no need to evaluate COUNT(x) in #ifdef EHCI_STATS false branch. Thus a

[PATCH] usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

2015-12-10 Thread Felipe Balbi
instead of using: if (condition) { dev_WARN_ONCE(dev, true, "foo"); return -EINVAL; } let's use: if (dev_WARN_ONCE(dev, condition, "foo")) return -EINVAL; Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 14 +++

Re: [PATCH] usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

2015-12-10 Thread kbuild test robot
Hi Felipe, [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.4-rc4 next-20151210] url: https://github.com/0day-ci/linux/commits/Felipe-Balbi/usb-dwc3-gadget-pass-a-condition-to-dev_WARN_ONCE/20151211-031232 base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi

[PATCH] USB: add quirk for devices with broken LPM

2015-12-10 Thread Alan Stern
Some USB device / host controller combinations seem to have problems with Link Power Management. For example, Steinar found that his xHCI controller wouldn't handle bandwidth calculations correctly for two video cards simultaneously when LPM was enabled, even though the bus had plenty of bandwidth

[PATCH 2/4] usb: gadget: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/gadget/udc/s3c-hsudc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/s3

[PATCH 4/4] usb: musb: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Fixes indentation too. Tested by: compilation only Caught by: cppcheck Signed-off-by: Geyslan G. Bem --- drivers/usb/musb/musb_gadget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/

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

2015-12-10 Thread Geyslan G. Bem
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: Geyslan G. Bem --- drivers/usb/serial/io_edgeport.c | 35 ++

[PATCH 3/4] usb: host: remove redundant condition

2015-12-10 Thread Geyslan G. Bem
This patch removes redundant condition. (!A || (A && B)) is the same as (!A || B). Tested by compilation only. Caught by cppcheck. Signed-off-by: Geyslan G. Bem --- drivers/usb/host/fhci-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/fhci-sched.c

Re: [PATCH] usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

2015-12-10 Thread David Cohen
Hi Felipe, On Thu, Dec 10, 2015 at 01:09:58PM -0600, Felipe Balbi wrote: > instead of using: > > if (condition) { > dev_WARN_ONCE(dev, true, "foo"); > return -EINVAL; > } > > let's use: > > if (dev_WARN_ONCE(dev, condition, "foo")) > r

Re: [PATCH] usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

2015-12-10 Thread Felipe Balbi
Hi, kbuild test robot writes: > Hi Felipe, > > [auto build test ERROR on balbi-usb/next] > [also build test ERROR on v4.4-rc4 next-20151210] > > url: > https://github.com/0day-ci/linux/commits/Felipe-Balbi/usb-dwc3-gadget-pass-a-condition-to-dev_WARN_ONCE/20151211-0

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-10 Thread John Youn
On 12/9/2015 8:45 PM, Doug Anderson wrote: > John, > > On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: >> This commit adds separate functions for getting the host and device >> specific hardware params. These functions check whether the parameters >> need to be read at all, depending on dr_mode

Re: [PATCH] usb: dwc3: gadget: pass a condition to dev_WARN_ONCE()

2015-12-10 Thread Felipe Balbi
Hi, David Cohen writes: > Hi Felipe, > > On Thu, Dec 10, 2015 at 01:09:58PM -0600, Felipe Balbi wrote: >> instead of using: >> >> if (condition) { >> dev_WARN_ONCE(dev, true, "foo"); >> return -EINVAL; >> } >> >> let's use: >> >> if (dev_WARN_ONCE(dev,

Re: [PATCH 18/18] usb: dwc2: Reduce delay when forcing mode in reset

2015-12-10 Thread John Youn
On 12/9/2015 8:45 PM, Doug Anderson wrote: > John, > > On Wed, Dec 2, 2015 at 11:15 AM, John Youn wrote: >> The delay for force mode is only 25ms according to the databook. >> >> Signed-off-by: John Youn >> --- >> drivers/usb/dwc2/core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 2/2] usb: xhci: add Broadcom specific fake doorbell

2015-12-10 Thread Hauke Mehrtens
On 12/08/2015 03:31 PM, Sergei Shtylyov wrote: > Hello. > > On 12/08/2015 01:31 AM, Hauke Mehrtens wrote: > >> From: Rafał Miłecki >> >> This fixes problem with controller seeing devices only in some small >> percentage of cold boots. >> This quirk is also added to the platform data so we can ac

[PATCH v3 2/2] usb: xhci: add Broadcom specific fake doorbell

2015-12-10 Thread Hauke Mehrtens
From: Rafał Miłecki This fixes a problem with the XHCI controller found in the Broadcom Northstar SoCs. These controllers see the devices connected via USB only in a small percentage of cold boots. This quirk is also added to the platform data so we can activate it when we register our platform d

[PATCH v3 1/2] usb: xhci: plat: fix adding usb3-lpm-capable quirk

2015-12-10 Thread Hauke Mehrtens
The xhci->quirks member is overwritten in xhci_gen_setup() with the quirks given through the module load parameter. Without this patch the usb3-lpm-capable quirk will be over written before it gets used. This patch moves the quirks code to the xhci_plat_quirks() callback function which gets called

[PATCH v3 0/2] usb: xhci: fix platform quirks and add fake doorbell

2015-12-10 Thread Hauke Mehrtens
These patches are needed to make the Broadcom XHCI controller work. We will submit support for the controller later. It would be nice if someone from Broadcom could elaborate a bit why this workaround is needed. I took this code from a GPL tar of a home router using a Broadcom Northstar SoC. chan

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-10 Thread Felipe Balbi
Hi, John Youn writes: >> Interesting. You're getting a new parameter that's never been needed >> in the code before and (as far as I can tell) isn't used anywhere in >> your series. I presume this is in prep for a future patch that uses >> this? >> >> At the moment you're burning a decent del

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

2015-12-10 Thread Sergei Shtylyov
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 also has the SHDN# pin which should be driven high for

Re: [PATCH 15/18] usb: dwc2: Improve handling of host and device hwparams

2015-12-10 Thread John Youn
On 12/10/2015 2:55 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> Interesting. You're getting a new parameter that's never been needed >>> in the code before and (as far as I can tell) isn't used anywhere in >>> your series. I presume this is in prep for a future patch that uses >>>

[PATCH] usb: ehci: refactor scan_isoc function

2015-12-10 Thread 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 were corrected conforming coding style. Tested by compilation only. Caught by checkpatch: WARNING: Too many leading tabs - consider code refactoring Signed-off-by:

[PATCH 5/5] [v2] usb: host: ehci-msm: Register usb shutdown function

2015-12-10 Thread Timur Tabi
From: Azriel Samson Registering usb_hcd_platform_shutdown to be called during shutdown. This is a generic function that performs the generic host stack's shutdown. It ensures that USB operations do not continue while kexec boots a new kernel. Signed-off-by: Azriel Samson Signed-off-by: Timur Ta

[PATCH 4/5] [v2] usb: host: ehci-msm: Fix register initialization

2015-12-10 Thread Timur Tabi
From: Jack Pham The default value for the 'transceiver select' field of the PORTSC register may not always be correct. Previously the phy-msm-usb driver would do this for us, but since ehci-msm can now be instantiated standalone without any PHY driver, the register needs to be explicitly initiali

[PATCH 2/5] [v2] usb: host: ehci-msm: Remove dependency on OTG PHY

2015-12-10 Thread Timur Tabi
From: Jack Pham Currently the EHCI MSM driver has a hard dependency to be created by an OTG layer, namely the phy-msm-usb driver. In some cases or board configurations we want to allow the EHCI host to be instantiated without OTG capability. Instead, relax the dependency on having an OTG PHY bein

[PATCH 3/5] [v2] usb: host: ehci-msm: Add support for ACPI probing

2015-12-10 Thread Timur Tabi
From: Jack Pham Allow the EHCI MSM driver to probe against an ACPI enumerated device with ID QCOM8040. Signed-off-by: Jack Pham Signed-off-by: Timur Tabi --- drivers/usb/host/ehci-msm.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/

[PATCH 1/5] [v2] usb: host: ehci-msm: Allow LS devices to work

2015-12-10 Thread Timur Tabi
From: Jack Pham Disable the silicon quirk which is normally enabled for HSIC host mode. This would otherwise prevent low speed devices from enumerating properly. Signed-off-by: Jack Pham Signed-off-by: Timur Tabi --- drivers/usb/host/ehci-msm.c | 2 ++ include/linux/usb/msm_hsusb_hw.h |

[PATCH v2] usb: ehci: refactor scan_isoc function

2015-12-10 Thread 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: Too many leading tabs - consider code refactoring Signe

Re: [PATCH v2 1/2] usb: renesas_usbhs: add fallback compatibility strings

2015-12-10 Thread Simon Horman
On Thu, Dec 10, 2015 at 07:28:06AM +, Kuninori Morimoto wrote: > > Hi Simon > > Thank you for your patch > > > 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. > >

[PATCH v3 1/3] usb: renesas_usbhs: add SoC names to compatibility string documentation

2015-12-10 Thread Simon Horman
This extends the documentation of compatibility strings a little to include the SoC names. Signed-off-by: Simon Horman --- v3 * Split into separate patch --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Docume

[PATCH v3 3/3] usb: renesas_usbhs: add device tree support for r8a779[23]

2015-12-10 Thread Simon Horman
Simply document new compatibility string. As a previous patch adds a generic R-Car Gen2 compatibility string there appears to be no need for a driver updates. Signed-off-by: Simon Horman Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 2 ++ 1 file changed, 2

[PATCH v3 0/3] usb: renesas_usbhs: More compat strings

2015-12-10 Thread Simon Horman
Hi, this short series adds generic, and soc-specific r8a7792 and r8a7793 compat strings to the Renesas USBHS driver. The intention is to provide a complete set of compat strings for known R-Car SoCs. Changes since v2: * Split documentation of SoC names into separate patch * Use correct fallback c

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

2015-12-10 Thread Simon Horman
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 separate patch * Use correct fallback compatibility s

Re: [PATCH v3 0/3] usb: renesas_usbhs: More compat strings

2015-12-10 Thread Kuninori Morimoto
Hi > this short series adds generic, and soc-specific r8a7792 and r8a7793 compat > strings to the Renesas USBHS driver. The intention is to provide a complete > set of compat strings for known R-Car SoCs. > > Changes since v2: > * Split documentation of SoC names into separate patch > * Use corr

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

2015-12-10 Thread Rob Herring
On Fri, Dec 11, 2015 at 02:07:05AM +0300, Sergei Shtylyov 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 connect

Re: [PATCH v3 1/3] usb: renesas_usbhs: add SoC names to compatibility string documentation

2015-12-10 Thread Rob Herring
On Fri, Dec 11, 2015 at 11:12:25AM +0900, Simon Horman wrote: > This extends the documentation of compatibility strings a little to > include the SoC names. > > Signed-off-by: Simon Horman Acked-by: Rob Herring > --- > v3 > * Split into separate patch > --- > Documentation/devicetree/bindings

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

2015-12-10 Thread Rob Herring
On Fri, Dec 11, 2015 at 11:12:26AM +0900, 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 Binding looks okay, but one

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

2015-12-10 Thread Simon Horman
On Thu, Dec 10, 2015 at 09:56:24PM -0600, Rob Herring wrote: > On Fri, Dec 11, 2015 at 11:12:26AM +0900, 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

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

2015-12-10 Thread Chanwoo Choi
Hi Sergei, On 2015년 12월 11일 08:07, Sergei Shtylyov 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

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

2015-12-10 Thread Pathak, Rahul (R.)
From: Rahul Pathak Fixing coccicheck warning which recommends to use memdup_user instead to reimplement its code, using memdup_user simplifies the code ./drivers/usb/core/devio.c:1398:11-18: WARNING opportunity for memdup_user Signed-off-by: Rahul Pathak --- Changes after v1: setting isopkt