RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Felipe Balbi
Peter Chen writes: >> >> >> +irqreturn_t ret = IRQ_NONE; >> >> >> +unsigned long flags; >> >> >> +u32 reg; >> >> >> + >> >> >> +priv_dev = cdns->gadget_dev; >> >> >> +spin_lock_irqsave(&priv_dev->lock, flags); >> >> > >> >> >you're already running in hardirq context. Why do you

RE: RESEND: About VBUS glitch happen on DWC3 host mode enabling process.

2018-12-12 Thread Ran Wang
Hi Felipe & Mathias, It seems that my below reply mail failed to be shown on lkml.org. So I have to resend it. Like to have your comment/suggestion before I begin the solution implement work. Thanks Ran Wang wrote: > > Hello Felipe, > > Felipe Balbi wrote: > > > > Hi Ran, > > > > Ran W

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Peter Chen
> > > > Interrupt handler (hardirq context) at CPU0, and process at CPU1, eg > > role switch, unload module, etc. > > the process at CPU1 would need to disable interrupts (spin_lock_irq() or > spin_lock_irqsave()), not the hardirq on CPU0 as that already runs with > interrrupts > disabled. > >

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-12 Thread Adam Thomson
On 12 December 2018 02:47, Kyle Tso wrote: > On Mon, Dec 10, 2018 at 7:36 PM Adam Thomson > wrote: > > > > On 10 December 2018 09:01, Adam Thomson wrote: > > > > > On 06 December 2018 03:02, Kyle Tso wrote: > > > > > > > Current matching rules ensure that the voltage range of selected > > > > Sou

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-12 Thread Greg Kroah-Hartman
On Tue, Dec 11, 2018 at 02:43:38PM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Some places in the kernel check the iommu_group pointer in > 'struct device' in order to find ot whether a device is > mapped by an IOMMU. > > This is not good way to make this check, as the pointer will > be

Re: [PATCH 1/6] driver core: Introduce device_iommu_mapped() function

2018-12-12 Thread Joerg Roedel
On Wed, Dec 12, 2018 at 12:04:35PM +0100, Greg Kroah-Hartman wrote: > On Tue, Dec 11, 2018 at 02:43:38PM +0100, Joerg Roedel wrote: > > Cc: Greg Kroah-Hartman > > Acked-by: Greg Kroah-Hartman > > No need to have a cc: line if I have already acked it :) Right, I'll remove it, sorry for the noise

[GIT PULL] USB changes for v4.21

2018-12-12 Thread Felipe Balbi
Hi Greg, here's my pull request for the next merge window. Patches have been around soaking for quite a while and I've tested them on platforms I have available. Let me know if you want anything to be changed. Happy holidays The following changes since commit 2e6e902d185027f8e3cb8b7305238f7e35

Re: [PATCH v3 1/2] USB: quirks: Check device interface LPM capability

2018-12-12 Thread Greg Kroah-Hartman
On Fri, Dec 07, 2018 at 08:47:21PM -0500, Kyle Williams wrote: > From: Kyle Williams > > Description: enable the ability to disable LPM for all devices matched > by interface information Why have "Description:" in here? Of course this is the description :) And the subject doesn't make much sen

Re: [PATCH v3 2/2] USB: quirks: Disable LPM for Logitech UVC devices

2018-12-12 Thread Greg Kroah-Hartman
On Fri, Dec 07, 2018 at 08:47:22PM -0500, Kyle Williams wrote: > From: Kyle Williams > > Description: Some USB device / host controller combinations seem to have > problems with Link Power management. In particular it is described that > the combination of certain Logitech uvc devices and other p

Re: [PATCH v2] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-12 Thread Greg KH
On Mon, Dec 10, 2018 at 01:50:20PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-12-10 09:04:43 [+0100], Greg KH wrote: > > From: Hui Peng > > > > The function hso_probe reads if_num from the USB device (as an u8) and uses > > it without a length check to index an array, resulting in an OOB m

[PATCH v3] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-12 Thread Greg KH
From: Hui Peng The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to bail on error. This issue h

[PATCH] usb: dwc2: Reset device address on EnumDone

2018-12-12 Thread Minas Harutyunyan
Initially resetting device address was done in USB RESET interrupt handler. In case, when power saving mode enabled (hibernation) USB RESET interrupt handled in dwc2_handle_gpwrdn_intr() and then it not seen in dwc2_hsotg_irq() handler. This is why reset device address to zero moved from USB RESET

Re: [GIT PULL] USB changes for v4.21

2018-12-12 Thread Greg Kroah-Hartman
On Wed, Dec 12, 2018 at 01:22:58PM +0200, Felipe Balbi wrote: > > Hi Greg, > > here's my pull request for the next merge window. Patches have been > around soaking for quite a while and I've tested them on platforms I > have available. > > Let me know if you want anything to be changed. > > Hap

[PATCH] usb: dwc2: gadget: Fix Remote Wakeup interrupt bit clearing

2018-12-12 Thread Minas Harutyunyan
To clear GINTSTS2_WKUP_ALERT_INT bit in GINTSTS2 register require to write 1. This bit is implemented as "Write to clear". Fixes: 187c5298a122 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 inse

Re: [PATCH] usb: dwc2: gadget: Fix Remote Wakeup interrupt bit clearing

2018-12-12 Thread Minas Harutyunyan
Hi Greg, Filipe, On 12/12/2018 4:44 PM, Minas Harutyunyan wrote: > To clear GINTSTS2_WKUP_ALERT_INT bit in GINTSTS2 register > require to write 1. This bit is implemented as "Write to clear". > > Fixes: 187c5298a122 ("usb: dwc2: gadget: Add handler for WkupAlert > interrupt") > > Signed-off-by:

[PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature

2018-12-12 Thread Igor Russkikh
From: Dmitry Bezrukov Lab testing shows that chip may get overheated when network link is connected on high speed (2.5G/5G). Default hardware design uses only passive heatsink without a cooler, and that makes things worse. To prevent possible chip damage here we add throttling mechanism. There

[PATCH net 0/2] aqc111: Thermal throttling feature

2018-12-12 Thread Igor Russkikh
This patches introduce the thermal throttling feature to prevent possible heat damage to the hardware. Dmitry Bezrukov (2): net: usb: aqc111: Add read_mdio operation net: usb: aqc111: Support for thermal throttling feature drivers/net/usb/aqc111.c | 83 +++

[PATCH net 1/2] net: usb: aqc111: Add read_mdio operation

2018-12-12 Thread Igor Russkikh
From: Dmitry Bezrukov Add necessary defines to read phy registers and temparature Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh --- drivers/net/usb/aqc111.c | 5 + drivers/net/usb/aqc111.h | 11 +++ 2 files changed, 16 insertions(+) diff --git a/drivers/net/usb/aqc

RE: [PATCH v7 01/10] usb: gadget: udc: Add timer support for usb requests

2018-12-12 Thread Anurag Kumar Vulisha
Hi Felipe, >-Original Message- >From: Alan Stern [mailto:st...@rowland.harvard.edu] >Sent: Friday, December 07, 2018 10:40 PM >To: Felipe Balbi >Cc: Anurag Kumar Vulisha ; Greg Kroah-Hartman >; Shuah Khan ; Johan Hovold >; Jaejoong Kim ; Benjamin >Herrenschmidt ; Roger Quadros ; Manu >G

Re: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Bin Liu
Peter, On Wed, Dec 12, 2018 at 10:04:25AM +0800, Peter Chen wrote: [snip] > > >I strongly advise against using dev_dbg() for debugging. Even more so > > >inside your IRQ handler. > > Felipe, I use Dynamic Debug for debugging, and show debug messages with > "dmesg" after testing/debugging. I see

Re: [PATCH] USB: serial: option: add Fibocom NL668 series

2018-12-12 Thread Johan Hovold
On Tue, Dec 11, 2018 at 02:22:50PM +0100, Jörgen Storvist wrote: > Den Tue, 11 Dec 2018 09:32:36 +0100 > skrev Re: [PATCH] USB: serial: option: add Fibocom NL668 series: > > > On Tue, Dec 11, 2018 at 08:41:24AM +0100, Jörgen Storvist wrote: > > > > > > Added USB serial option driver support for F

Re: [PATCH] USB: serial: option: add GosunCn ZTE WeLink ME3630

2018-12-12 Thread Johan Hovold
On Tue, Dec 11, 2018 at 06:28:28PM +0100, Jörgen Storvist wrote: > Added USB serial option driver support for GosunCn ZTE WeLink ME3630 > series cellular modules for USB modes ECM/NCM and MBIM. > > Signed-off-by: Jörgen Storvist > --- > > usb-devices output MBIM mode: > T: Bus=01 Lev=01 Prnt=01

Re: [PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature

2018-12-12 Thread Andrew Lunn
On Wed, Dec 12, 2018 at 01:50:10PM +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Lab testing shows that chip may get overheated when > network link is connected on high speed (2.5G/5G). > > Default hardware design uses only passive heatsink without a cooler, > and that makes things wor

Re: [PATCH net 1/2] net: usb: aqc111: Add read_mdio operation

2018-12-12 Thread Andrew Lunn
On Wed, Dec 12, 2018 at 01:50:08PM +, Igor Russkikh wrote: > From: Dmitry Bezrukov > > Add necessary defines to read phy registers and temparature Hi Igor [Puts tongue in cheek] I thought the firmware was supposed to manage the PHY. So maybe the better fix is to add code to allow firmware

Re: [PATCH] USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)

2018-12-12 Thread Johan Hovold
On Wed, Dec 12, 2018 at 08:39:39AM +0100, Jörgen Storvist wrote: > > Added USB serial option driver support for Simcom SIM7500/SIM7600 series > cellular modules exposing MBIM interface (VID 0x1e0e,PID 0x9003) > > Signed-off-by: Jörgen Storvist Applied, thanks. Johan

usb: CPU 100% hog upon device removal

2018-12-12 Thread Ju Hyung Park
Hi, I'm using the latest stable tree v4.19.8, and I'm noticing kworker and ksoftirqd hogging up the CPU upon removing any USB devices on my laptop. This issue was not present on any kernels below v4.19. Doing a simple: echo 1 > /sys/devices/pci:00/:00:14.0/usb1/1-6/remove (or any other U

[PATCH] usb: roles: Add a description for the class to Kconfig

2018-12-12 Thread Heikki Krogerus
That makes the USB role switch support option visible and selectable for the user. The class driver is also moved to drivers/usb/roles/ directory. This will fix an issue that we have with the Intel USB role switch driver on systems that don't have USB Type-C connectors: Intel USB role switch driv

Re: usb: CPU 100% hog upon device removal

2018-12-12 Thread Greg KH
On Thu, Dec 13, 2018 at 01:28:36AM +0900, Ju Hyung Park wrote: > Hi, > > I'm using the latest stable tree v4.19.8, > and I'm noticing kworker and ksoftirqd hogging up the CPU > upon removing any USB devices on my laptop. > > This issue was not present on any kernels below v4.19. Can you run 'git

Re: usb: CPU 100% hog upon device removal

2018-12-12 Thread Ju Hyung Park
Hi, On Thu, Dec 13, 2018 at 3:17 AM Greg KH wrote: > > On Thu, Dec 13, 2018 at 01:28:36AM +0900, Ju Hyung Park wrote: > > Hi, > > > > I'm using the latest stable tree v4.19.8, > > and I'm noticing kworker and ksoftirqd hogging up the CPU > > upon removing any USB devices on my laptop. > > > > Thi

Re: [PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature

2018-12-12 Thread Igor Russkikh
Hi Andrew, >> When the PHY's temparature is back to normal (low threshold, it is >> 85 degrees) it restores user/default link speed settings. > > Hi Igor > > Please could you also export the temperature using HWMON. The Marvell > PHY drivers are good examples. > > I also have a patch for driver

Re: [PATCH net 1/2] net: usb: aqc111: Add read_mdio operation

2018-12-12 Thread Igor Russkikh
>> >> Add necessary defines to read phy registers and temparature > > Hi Igor > > [Puts tongue in cheek] > > I thought the firmware was supposed to manage the PHY. FW team due to various reasons do not want to have thermal throttling in their control, Thus at this moment we are trying to rele

Re: [PATCH net 2/2] net: usb: aqc111: Support for thermal throttling feature

2018-12-12 Thread Andrew Lunn
> NORMAL_TEMP and CRITICAL_TEMP values are actually a hysteresis. In > cool down case only after TEMP_NORMAL temperature link will be > flipped back again. Ah, yes, sorry, i read that wrong. Andrew

[PATCH v2] USB: serial: option: add Fibocom NL668 series

2018-12-12 Thread Jörgen Storvist
Added USB serial option driver support for Fibocom NL668 series cellular modules. Reserved USB endpoints 4, 5 and 6 for network + ADB interfaces. usb-devices output (QMI mode) T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs

Re: usb: CPU 100% hog upon device removal

2018-12-12 Thread Alan Stern
On Thu, 13 Dec 2018, Ju Hyung Park wrote: > Hi, > > On Thu, Dec 13, 2018 at 3:17 AM Greg KH wrote: > > > > On Thu, Dec 13, 2018 at 01:28:36AM +0900, Ju Hyung Park wrote: > > > Hi, > > > > > > I'm using the latest stable tree v4.19.8, > > > and I'm noticing kworker and ksoftirqd hogging up the CP

Re: usb: CPU 100% hog upon device removal

2018-12-12 Thread Ju Hyung Park
Hi, I've just tried out Ubuntu's kernel PPA and this issue is still there. At least I didn't screw something up on my personal builds. I've used the following for activating USB dynamic debug: echo "file drivers/usb/* +p" > /sys/kernel/debug/dynamic_debug/control Let me know if I should have done

Re: [PATCH v3] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-12 Thread David Miller
From: Greg KH Date: Wed, 12 Dec 2018 12:42:24 +0100 > From: Hui Peng > > The function hso_probe reads if_num from the USB device (as an u8) and uses > it without a length check to index an array, resulting in an OOB memory read > in hso_probe or hso_get_config_data. > > Add a length check for

Re: [PATCH net 0/2] aqc111: Thermal throttling feature

2018-12-12 Thread David Miller
From: Igor Russkikh Date: Wed, 12 Dec 2018 13:50:06 + > This patches introduce the thermal throttling feature to prevent possible > heat damage to the hardware. I see what seems to be a bit of a conflict here, maybe you can explain the situation better to me. Andrew suggested that the firmw

RE: [PATCH v1 2/2] usb:cdns3 Add Cadence USB3 DRD Driver

2018-12-12 Thread Peter Chen
> > > > Felipe, I use Dynamic Debug for debugging, and show debug messages > > with "dmesg" after testing/debugging. I see dwc3 using trace, any > > benefits for switching to trace? > > The benefits I see are > Thanks, bin. > - *by default*, the debug log doesn't have to go through uart cons

[PATCH] USB: ehci-omap: Fix deferred probe for phy handling

2018-12-12 Thread Tony Lindgren
The only case where we can bail out safely without a phy is port_mode is OMAP_USBHS_PORT_MODE_UNUSED. It used to be that OMAP_EHCI_PORT_MODE_PHY was optional, but that's not a good assumption. We should already have "ehci-phy" in all the dts files using OMAP_EHCI_PORT_MODE_PHY. Note that this fix

[PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set

2018-12-12 Thread YueHaibing
with CONFIG_PM not set, gcc warning this: drivers/usb/renesas_usbhs/common.c:844:12: warning: 'usbhsc_suspend' defined but not used [-Wunused-function] drivers/usb/renesas_usbhs/common.c:860:12: warning: 'usbhsc_resume' defined but not used [-Wunused-function] fix this by adding #ifdef around it

[PATCH] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.

2018-12-12 Thread macpaul.lin
From: Macpaul Lin Mediatek Preloader is a proprietary embedded boot loader for loading Little Kernel and Linux into device DRAM. This boot loader also handle firmware updating. Mediatek Preloader will be enumerated as a virtual COM port when the device is connected to Windows or Linux OS via CDC

RE: [PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set

2018-12-12 Thread Yoshihiro Shimoda
Hi, > From: YueHaibing, Sent: Thursday, December 13, 2018 12:19 PM > > with CONFIG_PM not set, gcc warning this: > drivers/usb/renesas_usbhs/common.c:844:12: > warning: 'usbhsc_suspend' defined but not used [-Wunused-function] > drivers/usb/renesas_usbhs/common.c:860:12: > warning: 'usbhsc_resu

Re: [PATCH] USB: ehci-omap: Fix deferred probe for phy handling

2018-12-12 Thread Peter Ujfalusi
On 13/12/2018 4.17, Tony Lindgren wrote: > The only case where we can bail out safely without a phy is port_mode > is OMAP_USBHS_PORT_MODE_UNUSED. It used to be that OMAP_EHCI_PORT_MODE_PHY > was optional, but that's not a good assumption. We should already have > "ehci-phy" in all the dts files

Re: [PATCH 4.19 014/110] usb: xhci: Prevent bus suspend if a port connect change or polling state is detected

2018-12-12 Thread Greg Kroah-Hartman
On Wed, Dec 12, 2018 at 11:53:34PM +0100, Thomas Zeitlhofer wrote: > Hello, > > On Thu, Nov 29, 2018 at 03:11:45PM +0100, Greg Kroah-Hartman wrote: > > 4.19-stable review patch. If anyone has any objections, please let me > > know. > > > > -- > > > > From: Mathias Nyman > > >

Re: usb: CPU 100% hog upon device removal

2018-12-12 Thread Greg KH
On Thu, Dec 13, 2018 at 07:15:10AM +0900, Ju Hyung Park wrote: > Hi, > > I've just tried out Ubuntu's kernel PPA and this issue is still there. > At least I didn't screw something up on my personal builds. > > I've used the following for activating USB dynamic debug: > echo "file drivers/usb/* +p