Re: [PATCH v2 10/12] dt-bindings: connector: add properties for typec power delivery

2018-03-08 Thread Heikki Krogerus
On Thu, Mar 08, 2018 at 01:41:23AM +, Jun Li wrote: > > If you are asking my opinion, the data role must be handled as separate > > capability of the port, i.e. you probable want to have separate properties > > for > > the power role and data role, even if we did not support that yet in the

[PATCH] usb: Read text within supplied buffer size

2018-03-08 Thread Pete Zaitcev
This change fixes buffer overflows and silent data corruption with the usbmon device driver text file read operations. Signed-off-by: Fredrik Noring Signed-off-by: Pete Zaitcev --- diff --git a/drivers/usb/mon/mon_text.c b/drivers/usb/mon/mon_text.c index

[PATCH v2] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variable param-sglen. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding --- drivers/usb/misc/usbtest.c

Re: [PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 04:55:35PM +1100, Tobin C. Harding wrote: > Signed-off-by: Tobin C. Harding > --- Please drop this. To much on github not writing proper commit logs :( v2 to come. thanks, Tobin. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in

[PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
Signed-off-by: Tobin C. Harding --- drivers/usb/misc/usbtest.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 90028ef541e3..9e1142b8b91b 100644 --- a/drivers/usb/misc/usbtest.c +++

Re: [PATCH 4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Kai Heng Feng
Hi, On Mar 9, 2018, at 1:06 AM, Greg KH wrote: On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote: From: Kai-Heng Feng When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the xHC stops working: [

[PATCHv4] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-08 Thread Tony Lindgren
Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. It is used on some Motorola Mapphone series of phones and tablets such as Droid 4. The MDM6600 is hardwired to the first OHCI port in the Droid 4 case, and is controlled by several GPIOs. The USB PHY is integrated into the

RE: [PATCH 3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"

2018-03-08 Thread Yoshihiro Shimoda
Hi Greg, > From: Greg KH, Sent: Friday, March 9, 2018 2:06 AM > > On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote: > > From: Yoshihiro Shimoda > > > > This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat: > > enable clk in resume

Re: [PATCH v1 1/1] USB: serial: Add boundry check for read_urbs array access

2018-03-08 Thread sathyanarayanan kuppuswamy
On 03/08/2018 03:43 PM, Greg KH wrote: On Thu, Mar 08, 2018 at 03:29:48PM -0800, sathyanarayanan kuppuswamy wrote: On 03/08/2018 12:54 AM, Oliver Neukum wrote: Am Mittwoch, den 07.03.2018, 13:41 -0800 schrieb sathyanarayanan kuppuswamy : On 03/07/2018 12:58 PM, Greg KH wrote: So I

Re: [PATCH v1 1/1] USB: serial: Add boundry check for read_urbs array access

2018-03-08 Thread Greg KH
On Thu, Mar 08, 2018 at 03:29:48PM -0800, sathyanarayanan kuppuswamy wrote: > > > On 03/08/2018 12:54 AM, Oliver Neukum wrote: > > Am Mittwoch, den 07.03.2018, 13:41 -0800 schrieb sathyanarayanan > > kuppuswamy : > > > On 03/07/2018 12:58 PM, Greg KH wrote: > > > > So I don't see why your

Re: [PATCH v1 1/1] USB: serial: Add boundry check for read_urbs array access

2018-03-08 Thread sathyanarayanan kuppuswamy
On 03/08/2018 12:54 AM, Oliver Neukum wrote: Am Mittwoch, den 07.03.2018, 13:41 -0800 schrieb sathyanarayanan kuppuswamy : On 03/07/2018 12:58 PM, Greg KH wrote: So I don't see why your check is needed, what other code path would ever call this function in a way that the bounds check

[PATCH v2] usb: musb: Fix external abort in musb_remove on omap2430

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload (on the musb omap2430 platform). musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 22:15, Bin Liu wrote: > please add patch version numbers in the subject when necessary. This > helps cross-referencing. Will do. I naively assumed that the first patch would implicitly be number 1. Will send out v2 now. >> >> +musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >

Re: [PATCH 2/3] usb: xhci: tegra: Add runtime PM support

2018-03-08 Thread Jon Hunter
On 01/03/18 14:18, Mathias Nyman wrote: > On 14.02.2018 18:34, Jon Hunter wrote: >> Add runtime PM support to the Tegra XHCI driver and move the function >> calls to enable/disable the clocks, regulators and PHY into the runtime >> PM callbacks. >> >> Signed-off-by: Jon Hunter

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. Please also mention here that it happens on omap2430 platform. (omap2430 is the only platform affected by this bug.) Regards, -Bin. -- To unsubscribe from this list: send the line

Re: [PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, please add patch version numbers in the subject when necessary. This helps cross-referencing. On Thu, Mar 08, 2018 at 09:40:47PM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. > > musb_remove function now calls musb_platform_exit before disabling > runtime pm. >

[PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload. musb_remove function now calls musb_platform_exit before disabling runtime pm. Signed-off-by: Merlijn Wajer --- drivers/usb/musb/musb_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
On Thu, Mar 08, 2018 at 07:00:16PM +0100, Merlijn Wajer wrote: > Hi, > > On 08/03/18 17:46, Bin Liu wrote: > > > > No need to flush, the work is already cancelled at this point. > > > >> + > >>musb_writeb(musb->mregs, MUSB_DEVCTL, 0); > >> + musb_platform_exit(musb); > > > > This can be

Re: [PATCH] USB: serial: cp210x: add ELDAT Easywave RX09 id

2018-03-08 Thread Greg KH
On Tue, Mar 06, 2018 at 09:32:43AM +0100, Johan Hovold wrote: > Add device id for ELDAT Easywave RX09 tranceiver. > > Reported-by: Jan Jansen > Cc: stable > Signed-off-by: Johan Hovold Reviewed-by: Greg Kroah-Hartman

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
Hi, On 08/03/18 17:46, Bin Liu wrote: > No need to flush, the work is already cancelled at this point. > >> + >> musb_writeb(musb->mregs, MUSB_DEVCTL, 0); >> +musb_platform_exit(musb); > > This can be move down to out side of holding the spinlock, > >>

Re: [PATCH] usb: dwc2: Print error if unable to set DMA coherent mask

2018-03-08 Thread Stefan Wahren
> Stefan Wahren hat am 12. Februar 2018 um 21:20 > geschrieben: > > > We better print an error in case probing of dwc2 fails on > setting the DMA coherent mask. > > Signed-off-by: Stefan Wahren > --- > drivers/usb/dwc2/platform.c | 4 +++- >

Re: [PATCH 4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Greg KH
On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote: > From: Kai-Heng Feng > > When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the > xHC stops working: > [ 549.114587] xhci_hcd :02:00.0: WARN: xHC CMD_RUN timeout > [ 549.114608]

Re: [PATCH 3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"

2018-03-08 Thread Greg KH
On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote: > From: Yoshihiro Shimoda > > This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat: > enable clk in resume timing") because this driver also has runtime PM > and the commit 560869100b99

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-08 Thread Brian Norris
Hi, On Thu, Mar 08, 2018 at 12:43:40PM +0200, Felipe Balbi wrote: > William Wu writes: > > The dwc3_core_init() gets the PHYs and initializes the PHYs with > > the usb_phy_init() and phy_init() functions before initializing > > core, and power on the PHYs after core

Re: [RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Bin Liu
Hi, On Thu, Mar 08, 2018 at 10:31:21AM +0100, Merlijn Wajer wrote: > This fixes an oops on unbind / module unload. The fix is similar to the > one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: > fix late external abort on suspend), which only fixes the issue for >

Re: [PATCHv3] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-08 Thread Tony Lindgren
* Kishon Vijay Abraham I [180308 08:23]: > On Wednesday 07 March 2018 08:26 PM, Tony Lindgren wrote: > > +config PHY_MAPPHONE_MDM6600 > > + tristate "Motorola Mapphone MDM6600 modem USB PHY driver" > > + depends on OF && USB_SUPPORT > > + select GENERIC_PHY > > + select

Re: [GIT PULL] USB: fixes for v4.16-rc4

2018-03-08 Thread Greg Kroah-Hartman
On Thu, Mar 08, 2018 at 10:43:32AM +0200, Felipe Balbi wrote: > > Hi Greg, > > here's my second pull request for this -rc cycle. Things seem to be > calming down rather early this time around. > > Let me know if you want anything to be changed. > > cheers > > The following changes since

[PATCH 2/4] usb: xhci: dbc: Fix lockdep warning

2018-03-08 Thread Mathias Nyman
From: Lu Baolu The xHCI DbC implementation might enter a deadlock situation because there is no sufficient protection against the shared data between process and softirq contexts. This can lead to the following lockdep warnings. This patch changes to use

[PATCH 3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"

2018-03-08 Thread Mathias Nyman
From: Yoshihiro Shimoda This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing") because this driver also has runtime PM and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module clocks during resume") will

[PATCH 4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Mathias Nyman
From: Kai-Heng Feng When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the xHC stops working: [ 549.114587] xhci_hcd :02:00.0: WARN: xHC CMD_RUN timeout [ 549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110 [ 549.114638]

[PATCH 0/4] xhci fixes for usb-linus

2018-03-08 Thread Mathias Nyman
Hi Greg A few more xhci fixes for usb-linus, fixing tracing output, a lock error in xhci debug capability and a few platform specific fixes -Mathias Kai-Heng Feng (1): xhci: Fix front USB ports on ASUS PRIME B350M-A Lu Baolu (1): usb: xhci: dbc: Fix lockdep warning Mathias Nyman (1):

[PATCH 1/4] xhci: fix endpoint context tracer output

2018-03-08 Thread Mathias Nyman
Fix incorrent values showed for max Primary stream and Linear stream array (LSA) values in the endpoint context decoder. Fixes: 19a7d0d65c4a ("usb: host: xhci: add Slot and EP Context tracers") Cc: # v4.12+ Signed-off-by: Mathias Nyman ---

Re: [PATCH v1 1/1] USB: serial: Add boundry check for read_urbs array access

2018-03-08 Thread Greg KH
On Wed, Mar 07, 2018 at 01:41:51PM -0800, sathyanarayanan kuppuswamy wrote: > > > On 03/07/2018 12:58 PM, Greg KH wrote: > > On Wed, Mar 07, 2018 at 12:23:56PM -0800, > > sathyanarayanan.kuppusw...@linux.intel.com wrote: > > > From: Kuppuswamy Sathyanarayanan > > >

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Hi, Roger Quadros writes: > Felipe, > > On 08/03/18 12:39, Felipe Balbi wrote: >> Roger Quadros writes: >> >>> This is useful on platforms (e.g. TI AM437x) that don't >>> have ID available on a GPIO but do have the OTG block. >>> >>> We can obtain the ID state

Re: [PATCH v2] xhci: Fix front USB ports on ASUS PRIME B350M-A

2018-03-08 Thread Mathias Nyman
On 07.03.2018 08:09, Kai Heng Feng wrote: Hi Matthias, Do you have any concern about this patch? Adding patch and sending forward Thanks -Mathias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATH 0/4] usbip: make vhci_hcd.* objects independent of vhci_hcd.0

2018-03-08 Thread Salvador Fandiño
On 03/06/2018 09:58 PM, Shuah Khan wrote: On 03/06/2018 01:35 AM, Salvador Fandiño wrote: On 03/06/2018 01:03 AM, Shuah Khan wrote: On 03/05/2018 02:00 AM, Salvador Fandiño wrote: On 02/21/2018 01:35 AM, Shuah Khan wrote: Hi Salvador, On 01/30/2018 01:36 AM, Salvador Fandino wrote: Let me

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Roger Quadros
Felipe, On 08/03/18 12:39, Felipe Balbi wrote: > Roger Quadros writes: > >> This is useful on platforms (e.g. TI AM437x) that don't >> have ID available on a GPIO but do have the OTG block. >> >> We can obtain the ID state via the OTG block and use it >> for dual-role switching.

[PATCH v2 1/2] net: usb: asix88179_178a: set permanent address once only

2018-03-08 Thread Alexander Kurz
The permanent address of asix88179_178a devices is read at probe time and should not be overwritten later. Otherwise it may be overwritten unintentionally with a configured address. Signed-off-by: Alexander Kurz --- drivers/net/usb/ax88179_178a.c | 1 - 1 file changed, 1

[PATCH v2 2/2] net: usb: asix88179_178a: de-duplicate code

2018-03-08 Thread Alexander Kurz
Remove the duplicated code for asix88179_178a bind and reset methods. Signed-off-by: Alexander Kurz --- drivers/net/usb/ax88179_178a.c | 117 +++-- 1 file changed, 31 insertions(+), 86 deletions(-) diff --git a/drivers/net/usb/ax88179_178a.c

Re: [PATCH] usb: dwc3: core: power on PHYs before initializing core

2018-03-08 Thread Felipe Balbi
Hi Roger, William Wu writes: > The dwc3_core_init() gets the PHYs and initializes the PHYs with > the usb_phy_init() and phy_init() functions before initializing > core, and power on the PHYs after core initialization is done. > > However, some platforms (e.g.

Re: [PATCH v2 2/2] usb: dwc3: add dual role support using OTG block

2018-03-08 Thread Felipe Balbi
Roger Quadros writes: > This is useful on platforms (e.g. TI AM437x) that don't > have ID available on a GPIO but do have the OTG block. > > We can obtain the ID state via the OTG block and use it > for dual-role switching. > > Signed-off-by: Roger Quadros patch

Re: [RFC PATCH] usb: hcd: complete URBs in threaded-IRQ context instead of tasklet

2018-03-08 Thread Sebastian Andrzej Siewior
On 2018-02-27 14:39:34 [-0300], Mauro Carvalho Chehab wrote: > Hi Sebastian, Hi Mauro, > Sorry for taking some time to test it, has been busy those days... :) > Anyway, I tested it today. Didn't work. It keep losing data. Okay, this was unexpected. What I learned from the thread is that you use

Re: High CPU load produced by USB (DW2)

2018-03-08 Thread Paul Zimmerman
On 03/06/2018 09:09 AM, Minas Harutyunyan wrote: > Hi, > > On 3/6/2018 10:45 AM, Minas Harutyunyan wrote: >> Hi, >> >> On 3/5/2018 11:14 PM, Marek Vasut wrote: >>> On 02/20/2018 06:51 AM, Minas Harutyunyan wrote: >>> [...] >>> Is there a way to reduce that or is that the absolute minimum in

[RFC PATCH] usb: musb: Fix external abort in musb_remove

2018-03-08 Thread Merlijn Wajer
This fixes an oops on unbind / module unload. The fix is similar to the one in this commit: 0c3aae9bd59978fb8c3557d7883380bef0f2cfa1 (USB: musb: fix late external abort on suspend), which only fixes the issue for musb_suspend. musb_remove function now also flushes any work and also calls

Re: [PATCH v1 1/1] USB: serial: Add boundry check for read_urbs array access

2018-03-08 Thread Oliver Neukum
Am Mittwoch, den 07.03.2018, 13:41 -0800 schrieb sathyanarayanan kuppuswamy : > > On 03/07/2018 12:58 PM, Greg KH wrote: > > So I don't see why your check is needed, what other code path would ever > > call this function in a way that the bounds check would be needed? > void

Re: [PATCH v5 2/3] USB3/DWC3: Add property "snps, incr-burst-type-adjustment" for INCR burst type

2018-03-08 Thread Shawn Guo
On Tue, Mar 06, 2018 at 04:59:10PM +0800, Ran Wang wrote: > Property "snps,incr-burst-type-adjustment = , ..." for USB3.0 DWC3. > When only one value means INCRx mode with fix burst type. > When more than one value, means undefined length burst mode, USB controller > can use the length less than

Re: [PATCH usb-next v2 0/3] DWC3 support for Amlogic Meson AXG and GXL SoCs

2018-03-08 Thread Felipe Balbi
Hi, Martin Blumenstingl writes: >>> Martin Blumenstingl (3): >>> dt-bindings: usb: add support for dwc3 controller on Amlogic Meson GX >>> usb: dwc3: of-simple: add support for shared and pulsed reset lines >>> usb: dwc3: of-simple: add support for the

[GIT PULL] USB: fixes for v4.16-rc4

2018-03-08 Thread Felipe Balbi
Hi Greg, here's my second pull request for this -rc cycle. Things seem to be calming down rather early this time around. Let me know if you want anything to be changed. cheers The following changes since commit 4a3928c6f8a53fa1aed28ccba227742486e8ddcb: Linux 4.16-rc3 (2018-02-25 18:50:41

Re: [PATCHv3] phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4

2018-03-08 Thread Kishon Vijay Abraham I
Hi Tony, On Wednesday 07 March 2018 08:26 PM, Tony Lindgren wrote: > Let's add support for the GPIO controlled USB PHY on the MDM6600 modem. > It is used on some Motorola Mapphone series of phones and tablets such > as Droid 4. > > The MDM6600 is hardwired to the first OHCI port in the Droid 4