[PATCH -next] USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()

2018-01-23 Thread Wei Yongjun
Add the missing platform_device_put() before return from bdc_pci_probe() in the platform_device_add_resources() error handling case. Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC") Signed-off-by: Wei Yongjun --- drivers/usb/gadget/udc/bdc/bdc_pci

[PATCH 2/6] USB: move many drivers to use DEVICE_ATTR_RO

2018-01-23 Thread Greg Kroah-Hartman
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_RO() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches Cc: Ma

[PATCH 1/6] USB: move many drivers to use DEVICE_ATTR_RW

2018-01-23 Thread Greg Kroah-Hartman
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_RW() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches Cc: Ma

[PATCH 3/6] USB: move many drivers to use DEVICE_ATTR_WO

2018-01-23 Thread Greg Kroah-Hartman
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_WO() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches Cc: Pe

[PATCH 4/6] USB: atm: fix up some remaining DEVICE_ATTR() usage

2018-01-23 Thread Greg Kroah-Hartman
There's no need to have DEVICE_ATTR() in these crazy macros, so use the proper DEVICE_ATTR_*() versions intead. Cc: Matthieu CASTET Cc: Stanislaw Gruszka Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/cxacru.c | 18 -- drivers/usb/atm/ueagle-atm.c | 4 ++-- 2 files

[PATCH 6/6] USB: misc: fix up some remaining DEVICE_ATTR() usages

2018-01-23 Thread Greg Kroah-Hartman
For all of these, a simple DEVICE_ATTR_*() macro should be used instead, so convert the drivers to use them. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/cytherm.c | 45 +--- drivers/usb/misc/usbsevseg.c | 6 +++--- 2 files changed, 16 inserti

[PATCH 5/6] USB: musb: fix up one odd DEVICE_ATTR() usage

2018-01-23 Thread Greg Kroah-Hartman
It really should be DEVICE_ATTR_WO(), no need to "open code" it. Cc: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index f4f2693608e6

Re: [PATCH 1/6] USB: move many drivers to use DEVICE_ATTR_RW

2018-01-23 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_RW() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a script from Joe Perches, this was eas

Re: [PATCH 2/6] USB: move many drivers to use DEVICE_ATTR_RO

2018-01-23 Thread Felipe Balbi
Hi, Greg Kroah-Hartman writes: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_RO() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a script from Joe Perches, this was eas

Re: [PATCH 3/6] USB: move many drivers to use DEVICE_ATTR_WO

2018-01-23 Thread Felipe Balbi
Greg Kroah-Hartman writes: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_WO() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a script from Joe Perches, this was easily d

Re: [PATCH 1/6] USB: move many drivers to use DEVICE_ATTR_RW

2018-01-23 Thread Greg Kroah-Hartman
On Tue, Jan 23, 2018 at 12:26:38PM +0200, Felipe Balbi wrote: > > Hi, > > Greg Kroah-Hartman writes: > > Instead of "open coding" a DEVICE_ATTR() define, use the > > DEVICE_ATTR_RW() macro instead, which does everything properly instead. > > > > This does require a few static functions to be ren

Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume

2018-01-23 Thread Roger Quadros
Hi Manu, On 23/01/18 05:45, Manu Gautam wrote: > Hi, > > > On 1/22/2018 6:31 PM, Roger Quadros wrote: >> Adding/removing host/gadget controller before .pm_complete() >> causes a lock-up. Let's prevent any dual-role state change >> between .pm_prepare() and .pm_complete() to fix this. > > What k

Re: [BUG] SD card reader disappears after suspend

2018-01-23 Thread Samuel Sadok
Thanks Alan, While I was at it I also enabled debug logs for xhci_hcd and xhci_pci. $ echo module usbcore =p > /sys/kernel/debug/dynamic_debug/control $ echo module xhci_hcd =p > /sys/kernel/debug/dynamic_debug/control $ echo module xhci_pci =p > /sys/kernel/debug/dynamic_debug/control $ modprobe

[PATCH 4/4] arm64: dts: uniphier: add dwc3 usb node for LD20

2018-01-23 Thread Kunihiko Hayashi
Add usb node for LD20, which has 1 dwc3 controller instance, and enable this for LD20 boards. Signed-off-by: Kunihiko Hayashi --- .../boot/dts/socionext/uniphier-ld20-global.dts| 4 ++ .../arm64/boot/dts/socionext/uniphier-ld20-ref.dts | 4 ++ arch/arm64/boot/dts/socionext/uniphier-ld20.dt

[PATCH 3/4] ARM: dts: uniphier: add dwc3 usb node for PXs2

2018-01-23 Thread Kunihiko Hayashi
Add usb node for PXs2 SoC which has 2 dwc3 controller instances, and enable this for PXs2 boards. Signed-off-by: Kunihiko Hayashi --- arch/arm/boot/dts/uniphier-pxs2-gentil.dts | 8 ++ arch/arm/boot/dts/uniphier-pxs2-vodka.dts | 4 +++ arch/arm/boot/dts/uniphier-pxs2.dtsi | 43 +

[PATCH 0/4] usb: dwc3: add UniPhier dwc3 glue layer support

2018-01-23 Thread Kunihiko Hayashi
This patch series adds support for DWC3 glue layer implemented on UniPhier SoCs. It supports PXs2 and LD20 SoCs. In case of LD20, since some trimming values for PHY initialization are included in nvmem, This series includes the way to access to nvmem and bitmap definitions of nvmem in DT. Thank y

[PATCH 1/4] dt-bindings: dwc3: add binding documentation for UniPhier dwc3 glue driver

2018-01-23 Thread Kunihiko Hayashi
Add devicetree binding documentation for dwc3 glue driver implemented on Socionext UniPhier SoCs. Signed-off-by: Kunihiko Hayashi --- .../devicetree/bindings/usb/dwc3-uniphier.txt | 58 ++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/devicetree/bind

[PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-01-23 Thread Kunihiko Hayashi
Add a specific glue layer for UniPhier SoC platform to support USB host mode. It manages hardware operating sequences to enable multiple clock gates and assert resets, and to prepare to use dwc3 controller on the SoC. This patch also handles the physical layer that has same register space as the g

Re: [PATCH 2/4] usb: dwc3: add dwc3 glue layer for UniPhier SoCs

2018-01-23 Thread Felipe Balbi
Hi, Kunihiko Hayashi writes: > Add a specific glue layer for UniPhier SoC platform to support > USB host mode. It manages hardware operating sequences to enable multiple > clock gates and assert resets, and to prepare to use dwc3 controller > on the SoC. > > This patch also handles the physical

Re: [PATCH 1/6] USB: move many drivers to use DEVICE_ATTR_RW

2018-01-23 Thread Alan Stern
On Tue, 23 Jan 2018, Greg Kroah-Hartman wrote: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_RW() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a script from Joe Perche

Re: [PATCH 3/6] USB: move many drivers to use DEVICE_ATTR_WO

2018-01-23 Thread Shuah Khan
On 01/23/2018 03:24 AM, Greg Kroah-Hartman wrote: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_WO() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a script from Joe Perc

[PATCH] USB: misc: chaoskey: Use true and false for boolean values

2018-01-23 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/usb/misc/chaoskey.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/misc/chaoskey.c b/

[PATCH] usb: dwc2: gadget: Use true and false for boolean values

2018-01-23 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/usb/dwc2/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/driver

Re: [BUG] SD card reader disappears after suspend

2018-01-23 Thread Alan Stern
On Tue, 23 Jan 2018, Samuel Sadok wrote: > Thanks Alan, > > While I was at it I also enabled debug logs for xhci_hcd and xhci_pci. > > $ echo module usbcore =p > /sys/kernel/debug/dynamic_debug/control > $ echo module xhci_hcd =p > /sys/kernel/debug/dynamic_debug/control > $ echo module xhci_pci

USB-C Devices only show up if connected at boot

2018-01-23 Thread Mike Lothian
Hi I raised https://bugzilla.kernel.org/show_bug.cgi?id=198557 but was informed by Greg bugs should be raised on the mailing list not in bugzilla So USB-C devices only show up in dmesg or for use if they are connected during boot Once booted and the device is disconnected the following message a

Re: [PATCH 1/6] USB: move many drivers to use DEVICE_ATTR_RW

2018-01-23 Thread Bin Liu
On Tue, Jan 23, 2018 at 11:24:05AM +0100, Greg Kroah-Hartman wrote: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_RW() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a sc

Re: USB-C Devices only show up if connected at boot

2018-01-23 Thread Greg KH
On Tue, Jan 23, 2018 at 05:12:03PM +, Mike Lothian wrote: > Hi > > I raised https://bugzilla.kernel.org/show_bug.cgi?id=198557 but was > informed by Greg bugs should be raised on the mailing list not in > bugzilla > > So USB-C devices only show up in dmesg or for use if they are > connected d

Re: USB-C Devices only show up if connected at boot

2018-01-23 Thread Mike Lothian
On Tue, 23 Jan 2018 at 17:30 Greg KH wrote: > > On Tue, Jan 23, 2018 at 05:12:03PM +, Mike Lothian wrote: > > Hi > > > > I raised https://bugzilla.kernel.org/show_bug.cgi?id=198557 but was > > informed by Greg bugs should be raised on the mailing list not in > > bugzilla > > > > So USB-C devic

Re: USB-C Devices only show up if connected at boot

2018-01-23 Thread Adrian Bocaniciu
On Tue, 23 Jan 2018 17:43:27 + Mike Lothian wrote: > Hi > > I've applied all BIOS updates for my laptop including the pulled one > for Spectre/Meltdown & ME bugs the other week > http://www.dell.com/support/home/uk/en/ukdhs1/product-support/servicetag/8k5w662/drivers > > If it helps, I don'

Re: USB-C Devices only show up if connected at boot

2018-01-23 Thread Mike Lothian
> > Hi Mike, > > You did not specify what provides the USB-C port. > > I suppose that your USB-C port is actually a Thunderbolt 3 port from an Intel > controller. > > What you describe is a well known bug that affects all Thunderbolt 3 ports > and this bug has always existed in Linux, including u

Re: [PATCH] USB: misc: chaoskey: Use true and false for boolean values

2018-01-23 Thread Keith Packard
"Gustavo A. R. Silva" writes: > Assign true or false to boolean variables instead of an integer value. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature

Re: [PATCH 3/6] USB: move many drivers to use DEVICE_ATTR_WO

2018-01-23 Thread Johan Hovold
On Tue, Jan 23, 2018 at 11:24:07AM +0100, Greg Kroah-Hartman wrote: > Instead of "open coding" a DEVICE_ATTR() define, use the > DEVICE_ATTR_WO() macro instead, which does everything properly instead. > > This does require a few static functions to be renamed to work properly, > but thanks to a sc

Re: [PATCH 2/6] USB: move many drivers to use DEVICE_ATTR_RO

2018-01-23 Thread Pete Zaitcev
On Tue, 23 Jan 2018 11:24:06 +0100 Greg Kroah-Hartman wrote: > +++ b/drivers/usb/class/usblp.c > -static ssize_t usblp_show_ieee1284_id(struct device *dev, struct > device_attribute *attr, char *buf) > +static ssize_t ieee1284_id_show(struct device *dev, struct device_attribute > *attr, char *

[PATCH v10] xhci : AMD Promontory USB disable port support

2018-01-23 Thread Joe Lee
For AMD Promontory xHCI host,although you can disable USB ports in BIOSsettings,those ports will be enabled anyway after you remove a device onthat port and re-plug it in again. It's a known limitation of the chip.As a workaround we can clear the PORT_WAKE_BITS. Signed-off-by: Joe Lee --- v10:Cha

Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-01-23 Thread kbuild test robot
Hi Benjamin, I love your patch! Yet something to improve: [auto build test ERROR on balbi-usb/next] [also build test ERROR on v4.15-rc9] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Benjamin-

[PATCH 3/3] firmware: Fix up docs referring to FIRMWARE_IN_KERNEL

2018-01-23 Thread Benjamin Gilbert
We've removed the option, so stop talking about it. Signed-off-by: Benjamin Gilbert Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin --- Documentation/driver-api/firmware/built-in-fw.rst | 7 +-- Documentation/x86/microcode.txt | 5 ++--- arch/

[PATCH 1/3] USB: serial: keyspan: Drop firmware Kconfig options

2018-01-23 Thread Benjamin Gilbert
The USB_SERIAL_KEYSPAN_* firmware options no longer do anything. Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware") Signed-off-by: Benjamin Gilbert Cc: Greg Kroah-Hartman Cc: Johan Hovold --- arch/mips/configs/rm200_defconfig | 9 arch/powerpc/configs/c2k_defconfig| 12 -

[PATCH 0/3] Drop config options left over from in-kernel firmware

2018-01-23 Thread Benjamin Gilbert
5620a0d1aacd ("firmware: delete in-kernel firmware") left behind several config options which no longer do anything. Remove them and fix up documentation. Benjamin Gilbert (3): USB: serial: keyspan: Drop firmware Kconfig options firmware: Drop FIRMWARE_IN_KERNEL Kconfig option firmware: Fix

[PATCH 2/3] firmware: Drop FIRMWARE_IN_KERNEL Kconfig option

2018-01-23 Thread Benjamin Gilbert
It doesn't actually do anything. Merge its help text into EXTRA_FIRMWARE. Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware") Fixes: 0946b2fb38fd ("firmware: cleanup FIRMWARE_IN_KERNEL message") Signed-off-by: Benjamin Gilbert Cc: Greg Kroah-Hartman Cc: Robin H. Johnson --- arch/arc/c

Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-01-23 Thread Benjamin Herrenschmidt
On Wed, 2018-01-24 at 09:50 +0800, kbuild test robot wrote: > Hi Benjamin, > > I love your patch! Yet something to improve: > > [auto build test ERROR on balbi-usb/next] > [also build test ERROR on v4.15-rc9] > [if your patch is applied to the wrong git tree, please drop us a note to > help impr

[PATCH 4.9] usbip: prevent vhci_hcd driver from leaking a socket pointer address

2018-01-23 Thread Shuah Khan
commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a socket pointer address") When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output whe

[PATCH 4.9] usbip: Fix implicit fallthrough warning

2018-01-23 Thread Shuah Khan
From: Jonathan Dieter Upstream commit cfd6ed4537a9 ("usbip: Fix implicit fallthrough warning") GCC 7 now warns when switch statements fall through implicitly, and with -Werror enabled in configure.ac, that makes these tools unbuildable. We fix this by notifying the compiler that this particular

[PATCH 4.9] usbip: Fix potential format overflow in userspace tools

2018-01-23 Thread Shuah Khan
From: Jonathan Dieter Upstream commit e5dfa3f902b9 ("usbip: Fix potential format overflow in userspace tools") The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC

[PATCH 4.4] usbip: prevent vhci_hcd driver from leaking a socket pointer address

2018-01-23 Thread Shuah Khan
commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a socket pointer address") When a client has a USB device attached over IP, the vhci_hcd driver is locally leaking a socket pointer address via the /sys/devices/platform/vhci_hcd/status file (world-readable) and in debug output whe

[PATCH 4.4] usbip: Fix potential format overflow in userspace tools

2018-01-23 Thread Shuah Khan
Upstream commit e5dfa3f902b9 ("usbip: Fix potential format overflow in userspace tools") The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these

[PATCH 4.4] usbip: Fix implicit fallthrough warning

2018-01-23 Thread Shuah Khan
From: Jonathan Dieter Upstream commit cfd6ed4537a9 ("usbip: Fix implicit fallthrough warning") GCC 7 now warns when switch statements fall through implicitly, and with -Werror enabled in configure.ac, that makes these tools unbuildable. We fix this by notifying the compiler that this particular

Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-01-23 Thread kbuild test robot
Hi Benjamin, I love your patch! Perhaps something to improve: [auto build test WARNING on balbi-usb/next] [also build test WARNING on v4.15-rc9 next-20180119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/l

Re: USB-C Devices only show up if connected at boot

2018-01-23 Thread Greg KH
On Tue, Jan 23, 2018 at 05:43:27PM +, Mike Lothian wrote: > On Tue, 23 Jan 2018 at 17:30 Greg KH wrote: > > > > On Tue, Jan 23, 2018 at 05:12:03PM +, Mike Lothian wrote: > > > Hi > > > > > > I raised https://bugzilla.kernel.org/show_bug.cgi?id=198557 but was > > > informed by Greg bugs sho

Re: [PATCH 2/3] firmware: Drop FIRMWARE_IN_KERNEL Kconfig option

2018-01-23 Thread Robin H. Johnson
+1 on this series. Signed-off-by: Robin H. Johnson On Tue, Jan 23, 2018 at 06:06:31PM -0800, Benjamin Gilbert wrote: > It doesn't actually do anything. Merge its help text into > EXTRA_FIRMWARE. > > Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware") > Fixes: 0946b2fb38fd ("firmware: c

Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub

2018-01-23 Thread kbuild test robot
Hi Benjamin, I love your patch! Perhaps something to improve: [auto build test WARNING on balbi-usb/next] [also build test WARNING on v4.15-rc9 next-20180119] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/l

Re: [PATCH 3/3] firmware: Fix up docs referring to FIRMWARE_IN_KERNEL

2018-01-23 Thread Ingo Molnar
* Benjamin Gilbert wrote: > We've removed the option, so stop talking about it. > > Signed-off-by: Benjamin Gilbert > Cc: Borislav Petkov > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > --- > Documentation/driver-api/firmware/built-in-fw.rst | 7 +-- > Documentation/x86