Re: [PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-31 Thread Cornelia Huck
On Tue, 30 Jul 2019 21:50:28 +0200 Arnd Bergmann wrote: > Each of these drivers has a copy of the same trivial helper function to > convert the pointer argument and then call the native ioctl handler. > > We now have a generic implementation of that, so use it. > > Acked-by: Greg Kroah-Hartman

Re: Oops in xhci_endpoint_reset

2019-07-31 Thread Enric Balletbo Serra
Hi Mathias, Thanks to look into this. Missatge de Mathias Nyman del dia dt., 30 de jul. 2019 a les 21:39: > > On 27.7.2019 23.43, Bob Gleitsmann wrote: > > OK, here's the result of the bisection: > > > > ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first bad commit > > commit ef513be0a9057cc6

Re: [RFC PATCH] usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests

2019-07-31 Thread Heikki Krogerus
On Tue, Jul 30, 2019 at 06:28:52AM -0700, Guenter Roeck wrote: > On 7/30/19 5:07 AM, Heikki Krogerus wrote: > > On Mon, Jul 29, 2019 at 10:31:04AM -0700, Guenter Roeck wrote: > > > On Mon, Jul 29, 2019 at 05:04:57PM +0300, Heikki Krogerus wrote: > > > > Hi, > > > > > > > > On Wed, Jul 24, 2019 at

[PATCH] usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"

2019-07-31 Thread Yoshihiro Shimoda
Since the role_store() uses strncmp(), it's possible to refer out-of-memory if the sysfs data size is smaller than strlen("host"). This patch fixes it by using sysfs_streq() instead of strncmp(). Fixes: cc995c9ec118 ("usb: gadget: udc: renesas_usb3: add support for usb role swap") Cc: # v4.12+ S

[PATCH v2 1/5] phy: Add phy ports in attrs

2019-07-31 Thread Srinath Mannam
Add phy ports bitmask to contain enabled PHY ports. set and get APIs added to set and get phy ports value. Signed-off-by: Srinath Mannam --- include/linux/phy/phy.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 15032f14..b

[PATCH v2 3/5] phy: sr-usb: Set phy ports

2019-07-31 Thread Srinath Mannam
set phy ports value in xlate handler which is taken from second argument of PHY phandle. Signed-off-by: Srinath Mannam --- drivers/phy/broadcom/phy-bcm-sr-usb.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadc

[PATCH v2 2/5] dt-bindings: phy: Modify Stingray USB PHY #phy-cells

2019-07-31 Thread Srinath Mannam
Increase #phy-cells from 1 to 2 to have bitmask of PHY enabled ports. Signed-off-by: Srinath Mannam --- .../devicetree/bindings/phy/brcm,stingray-usb-phy.txt | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/brcm,stingra

[PATCH v2 5/5] drivers: xhci: Add quirk to reset xHCI port PHY

2019-07-31 Thread Srinath Mannam
Stingray USB HS PHY has an issue, that USB High Speed device detects at Full Speed if the same port was connected to Full speed device. This problem can be resolved by resetting that port's PHY on disconnect. Add a quirk to reset xHCI port PHY on port disconnect event. XHCI_RESET_PHY_ON_DISCONNECT

[PATCH v2 0/4] Reset xHCI port PHY on disconnect

2019-07-31 Thread Srinath Mannam
This patch set adds a quirk in xHCI driver to reset PHY of xHCI port on its disconnect event. This patch set is based on Linux-5.2-rc4. Changes from v1: - Addressed Mathias's comments - Modified mapping of HC ports and their corresponding PHYs - Addressed Rob's comments - Removed usb-

[PATCH v2 4/5] dt-bindings: usb-xhci: Add platform specific compatible for Stingray xHCI

2019-07-31 Thread Srinath Mannam
Add Platform specific compatible, because xHCI of this SoC has an issue with HS port which has to reset on disconnect event. Signed-off-by: Srinath Mannam --- Documentation/devicetree/bindings/usb/usb-xhci.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/

Re: [PATCH] usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"

2019-07-31 Thread Geert Uytterhoeven
On Wed, Jul 31, 2019 at 1:17 PM Yoshihiro Shimoda wrote: > Since the role_store() uses strncmp(), it's possible to refer > out-of-memory if the sysfs data size is smaller than strlen("host"). > This patch fixes it by using sysfs_streq() instead of strncmp(). > > Fixes: cc995c9ec118 ("usb: gadget:

[RESEND PATCH] usb: host: xhci-plat: Prevent an abnormally restrictive PHY init skipping

2019-07-31 Thread Miquel Raynal
In the past, USB PHY handling has been moved in the HCD core. Some host controller drivers needing more control of the PHYs, they have been granted the freedom to handle themselves the PHY states and to prevent the HCD core to do so in commit 4e88d4c08301 ("usb: add a flag to skip PHY initializatio

[PATCH 0/2] usb: xhci: dbc: 2 smalll fixes for 'xhci_dbc_alloc_requests()'

2019-07-31 Thread Christophe JAILLET
Christophe JAILLET (2): usb: xhci: dbc: Simplify error handling in 'xhci_dbc_alloc_requests()' usb: xhci: dbc: Use GFP_KERNEL instead of GFP_ATOMIC in 'xhci_dbc_alloc_requests()' drivers/usb/host/xhci-dbgtty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1

[PATCH 2/2] usb: xhci: dbc: Use GFP_KERNEL instead of GFP_ATOMIC in 'xhci_dbc_alloc_requests()'

2019-07-31 Thread Christophe JAILLET
There is no need to use GFP_ATOMIC to allocate 'req'. GFP_KERNEL should be enough and is already used for another allocation juste a few lines below. Signed-off-by: Christophe JAILLET --- I've done my best to check if a spinlock can be hold when reaching this code. Apparently it is never the case

[PATCH 1/2] usb: xhci: dbc: Simplify error handling in 'xhci_dbc_alloc_requests()'

2019-07-31 Thread Christophe JAILLET
If the 'kmalloc()' fails, we need to undo the previous 'dbc_alloc_request()' call. Because of the more similar function name, it is more logical to use 'dbc_free_request()' instead of 'xhci_dbc_free_req()'. Both are equivalent here because: static void xhci_dbc_free_req(struct dbc_ep *dep, struc

[PATCH] usb: wusbcore: Spelling s/disconenct/disconnect/

2019-07-31 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- drivers/usb/wusbcore/devconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index a93837d57d53bd04..1170f8baf6084df9 100644 --- a/drivers/usb/wusbcore/devconnect.

Re: Oops in xhci_endpoint_reset

2019-07-31 Thread Mathias Nyman
On 31.7.2019 12.18, Enric Balletbo Serra wrote: Hi Mathias, Thanks to look into this. Missatge de Mathias Nyman del dia dt., 30 de jul. 2019 a les 21:39: On 27.7.2019 23.43, Bob Gleitsmann wrote: OK, here's the result of the bisection: ef513be0a9057cc6baf5d29566aaaefa214ba344 is the first

Re: Oops in xhci_endpoint_reset

2019-07-31 Thread Enric Balletbo Serra
Missatge de Mathias Nyman del dia dc., 31 de jul. 2019 a les 16:16: > > On 31.7.2019 12.18, Enric Balletbo Serra wrote: > > Hi Mathias, > > > > Thanks to look into this. > > > > Missatge de Mathias Nyman del dia dt., > > 30 de jul. 2019 a les 21:39: > >> > >> On 27.7.2019 23.43, Bob Gleitsmann wr

Re: [PATCH v2] usb: typec: tcpm: Add NULL check before dereferencing config

2019-07-31 Thread Douglas Gilbert
On 2019-07-24 4:38 p.m., Guenter Roeck wrote: When instantiating tcpm on an NXP OM 13588 board with NXP PTN5110, the following crash is seen when writing into the 'preferred_role' sysfs attribute. Unable to handle kernel NULL pointer dereference at virtual address 0028 pgd = f69149ad [00

Re: Fwd: Re: New USB Device

2019-07-31 Thread Markus Breunig
Am 16.07.2019 um 11:23 schrieb Johan Hovold: [ Pleas avoid top posting. ] On Sun, Jul 07, 2019 at 09:38:00PM +0200, Markus Breunig wrote: Hi Greg, also the company GNS has a fragmented homepage, the handbook ist available here: http://www.servicedocs.com/ARTIKELEN/7200284490001.pdf habe a l

[PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-07-31 Thread Arnd Bergmann
I revisited some older patches here, getting two of the remaining ARM platforms to build with ARCH_MULTIPLATFORM like most others do. In case of lpc32xx, I created a new set of patches, which seemed easier than digging out what I did for an older release many years ago. For dove, the patches are

[PATCH 01/14] usb: ohci-nxp: enable compile-testing

2019-07-31 Thread Arnd Bergmann
The driver hardcodes a hardware I/O address the way one should generally not do, and this prevents both compile-testing, and moving the platform to CONFIG_ARCH_MULTIPLATFORM. Change the code to be independent of the machine headers to allow those two. Removing the hardcoded address would be hard a

[PATCH 03/14] watchdog: pnx4008_wdt: allow compile-testing

2019-07-31 Thread Arnd Bergmann
The only thing that prevents building this driver on other platforms is the mach/hardware.h include, which is not actually used here at all, so remove the line and allow CONFIG_COMPILE_TEST. Signed-off-by: Arnd Bergmann --- drivers/watchdog/Kconfig | 2 +- drivers/watchdog/pnx4008_wdt.c |

[PATCH 02/14] usb: udc: lpc32xx: allow compile-testing

2019-07-31 Thread Arnd Bergmann
The only thing that prevents building this driver on other platforms is the mach/hardware.h include, which is not actually used here at all, so remove the line and allow CONFIG_COMPILE_TEST. Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/udc/Kconfig | 3 ++- drivers/usb/gadget/udc/lpc

[PATCH 04/14] serial: lpc32xx_hs: allow compile-testing

2019-07-31 Thread Arnd Bergmann
The only thing that prevents building this driver on other platforms is the mach/hardware.h include, which is not actually used here at all, so remove the line and allow CONFIG_COMPILE_TEST. Signed-off-by: Arnd Bergmann --- drivers/tty/serial/Kconfig | 3 ++- drivers/tty/serial/lpc32xx_hs.c

[PATCH 05/14] gpio: lpc32xx: allow building on non-lpc32xx targets

2019-07-31 Thread Arnd Bergmann
The driver uses hardwire MMIO addresses instead of the data that is passed in device tree. Change it over to only hardcode the register offset values and allow compile-testing. Signed-off-by: Arnd Bergmann --- drivers/gpio/Kconfig| 8 + drivers/gpio/Makefile | 2 +- drivers/g

[PATCH 06/14] net: lpc-enet: factor out iram access

2019-07-31 Thread Arnd Bergmann
The lpc_eth driver uses a platform specific method to find the internal sram. This prevents building it on other machines. Rework to only use one function call and keep the other platform internals where they belong. Ideally this would look up the sram location from DT, but as this is a rarely use

[PATCH 07/14] net: lpc-enet: move phy setup into platform code

2019-07-31 Thread Arnd Bergmann
Setting the phy mode requires touching a platform specific register, which prevents us from building the driver without its header files. Move it into a separate function in arch/arm/mach/lpc32xx to hide the core registers from the network driver. Signed-off-by: Arnd Bergmann --- arch/arm/mach-

[PATCH 08/14] net: lpc-enet: allow compile testing

2019-07-31 Thread Arnd Bergmann
The lpc-enet driver can now be built on all platforms, so allow compile testing as well. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/nxp/Kconfig | 2 +- drivers/net/ethernet/nxp/lpc_eth.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/nxp/Kc

[PATCH 09/14] serial: lpc32xx: allow compile testing

2019-07-31 Thread Arnd Bergmann
The lpc32xx_loopback_set() function in hte lpc32xx_hs driver is the one thing that relies on platform header files. Move that into the core platform code so we only need a variable declaration for it, and enable COMPILE_TEST building. Signed-off-by: Arnd Bergmann --- arch/arm/mach-lpc32xx/serial

[PATCH 10/14] ARM: lpc32xx: clean up header files

2019-07-31 Thread Arnd Bergmann
All device drivers have stopped relying on mach/*.h headers, so move the remaining headers into arch/arm/mach-lpc32xx/lpc32xx.h to prepare for multiplatform builds. The mach/entry-macro.S file has been unused for a long time now and can simply get removed. Signed-off-by: Arnd Bergmann --- arch/

[PATCH 11/14] ARM: lpc32xx: allow multiplatform build

2019-07-31 Thread Arnd Bergmann
All preparation work is done, so the platform can finally be moved into ARCH_MULTIPLATFORM. This requires a small change to the defconfig file to enable the platform. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 17 +-- arch/arm/configs/lpc32xx_defconfig

[PATCH 12/14] ARM: dove: clean up mach/*.h headers

2019-07-31 Thread Arnd Bergmann
This is a simple move of all header files that are no longer included by anything else from the include/mach directory to the platform directory itself as preparation for multiplatform support. The mach/uncompress.h headers are left in place for now, and are mildly modified to be independent of th

[PATCH 13/14] ARM: orion/mvebu: unify debug-ll virtual addresses

2019-07-31 Thread Arnd Bergmann
In a multiplatform configuration, enabling DEBUG_LL breaks booting on all platforms with incompatible settings. In case of the Marvell platforms of the Orion/MVEBU family, the physical addresses are all the same, we just map them at different virtual addresses, which makes it impossible to run a ke

[PATCH 14/14] ARM: dove: multiplatform support

2019-07-31 Thread Arnd Bergmann
The dove platform is now ready to be enabled for multiplatform support, this patch does the switch over by modifying the Kconfig file, the defconfig and removing the last mach/*.h header that becomes obsolete with this. This work was originally done in 2015 as all the ARMv7 machiens gove moved ove

Re: [PATCH 03/14] watchdog: pnx4008_wdt: allow compile-testing

2019-07-31 Thread Guenter Roeck
On Wed, Jul 31, 2019 at 09:56:45PM +0200, Arnd Bergmann wrote: > The only thing that prevents building this driver on other > platforms is the mach/hardware.h include, which is not actually > used here at all, so remove the line and allow CONFIG_COMPILE_TEST. > > Signed-off-by: Arnd Bergmann Rev

Re: [PATCH 03/14] watchdog: pnx4008_wdt: allow compile-testing

2019-07-31 Thread Arnd Bergmann
On Wed, Jul 31, 2019 at 10:23 PM Guenter Roeck wrote: > > On Wed, Jul 31, 2019 at 09:56:45PM +0200, Arnd Bergmann wrote: > > The only thing that prevents building this driver on other > > platforms is the mach/hardware.h include, which is not actually > > used here at all, so remove the line and a

Re: [PATCH 03/14] watchdog: pnx4008_wdt: allow compile-testing

2019-07-31 Thread Guenter Roeck
On Wed, Jul 31, 2019 at 10:26:35PM +0200, Arnd Bergmann wrote: > On Wed, Jul 31, 2019 at 10:23 PM Guenter Roeck wrote: > > > > On Wed, Jul 31, 2019 at 09:56:45PM +0200, Arnd Bergmann wrote: > > > The only thing that prevents building this driver on other > > > platforms is the mach/hardware.h incl

[PATCH] usb: musb: remove redundant assignment to variable ret

2019-07-31 Thread Colin King
From: Colin Ian King Variable ret is being initialized with a value that is never read and ret is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/usb/musb/musb_core.c | 2 +

Re: [PATCH 00/14] ARM: move lpc32xx and dove to multiplatform

2019-07-31 Thread Russell King - ARM Linux admin
On Wed, Jul 31, 2019 at 09:56:42PM +0200, Arnd Bergmann wrote: > For dove, the patches are basically what I had proposed back in > 2015 when all other ARMv6/ARMv7 machines became part of a single > kernel build. I don't know what the state is mach-dove support is, > compared to the DT based support

Re: [PATCH 01/14] usb: ohci-nxp: enable compile-testing

2019-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2019 at 09:56:43PM +0200, Arnd Bergmann wrote: > The driver hardcodes a hardware I/O address the way one should > generally not do, and this prevents both compile-testing, and > moving the platform to CONFIG_ARCH_MULTIPLATFORM. > > Change the code to be independent of the machine h

Re: [PATCH 02/14] usb: udc: lpc32xx: allow compile-testing

2019-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2019 at 09:56:44PM +0200, Arnd Bergmann wrote: > The only thing that prevents building this driver on other > platforms is the mach/hardware.h include, which is not actually > used here at all, so remove the line and allow CONFIG_COMPILE_TEST. > > Signed-off-by: Arnd Bergmann > --

Re: [PATCH 04/14] serial: lpc32xx_hs: allow compile-testing

2019-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2019 at 09:56:46PM +0200, Arnd Bergmann wrote: > The only thing that prevents building this driver on other > platforms is the mach/hardware.h include, which is not actually > used here at all, so remove the line and allow CONFIG_COMPILE_TEST. > > Signed-off-by: Arnd Bergmann > --

Re: [PATCH 09/14] serial: lpc32xx: allow compile testing

2019-07-31 Thread Greg Kroah-Hartman
On Wed, Jul 31, 2019 at 09:56:51PM +0200, Arnd Bergmann wrote: > The lpc32xx_loopback_set() function in hte lpc32xx_hs driver is the > one thing that relies on platform header files. Move that into the > core platform code so we only need a variable declaration for it, > and enable COMPILE_TEST bui

Re: [PATCH v2 2/2] usbip: Implement SG support to vhci

2019-07-31 Thread Suwan Kim
On Mon, Jul 29, 2019 at 10:32:31AM -0600, shuah wrote: > On 7/29/19 8:52 AM, Suwan Kim wrote: > > Hi Shuah, > > > > On Tue, Jul 23, 2019 at 06:21:53PM -0600, shuah wrote: > > > Hi Suwan, > > > > > > On 7/5/19 10:43 AM, Suwan Kim wrote: > > > > There are bugs on vhci with usb 3.0 storage device. O