[usb:usb-next 72/107] drivers/usb/host/xhci-mem.c:2250 xhci_create_rhub_port_array() error: potential null dereference 'rhub->ports'. (kcalloc returns null)

2018-05-25 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next head: 58c38116c6cc5bcb6d952ca72111a7a15d4604a2 commit: bcaa9d5c59005eceed5f2112c13240401f0fb93b [72/107] xhci: Create new structures to store xhci port information New smatch warnings:

Re: Serdev: USB device and sysdev probing ala i2c

2018-05-25 Thread Johan Hovold
On Thu, May 24, 2018 at 07:38:41PM +0200, Ricardo Ribalda Delgado wrote: > On Thu, May 24, 2018 at 6:49 PM Rob Herring wrote: > > The fundamental problem here is you need a parent device node to apply > > a DT overlay to and a USB device hotplugged has no DT device node. The >

Re: [RFT/PATCH 00/38] usb: dwc3: gadget: Rework & Refactoring

2018-05-25 Thread Bin Liu
Hi laurent, On Thu, May 24, 2018 at 10:59:18PM +0300, Laurent Pinchart wrote: > Hi Felipe, > > On Friday, 20 April 2018 13:57:23 EEST Felipe Balbi wrote: > > Bin Liu writes: > > >> Felipe Balbi writes: > > > Bin Liu writes: > >

[PATCH] usb: gadget: composite: fix delayed_status race condition when set_interface

2018-05-25 Thread Chunfeng Yun
It happens when enable debug log, if set_alt() returns USB_GADGET_DELAYED_STATUS and usb_composite_setup_continue() is called before increasing count of @delayed_status, so fix it by using spinlock of @cdev->lock. Signed-off-by: Chunfeng Yun Tested-by: Jay Hsu

[PATCH net-next] qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID

2018-05-25 Thread Bjørn Mork
SIMCOM are reusing a single device ID for many (all of their?) different modems, based on different chipsets and firmwares. Newer Qualcomm chipset generations require setting DTR to wake the QMI function. The SIM7600E modem is using such a chipset, making it fail to work with this driver despite

Re: Serdev: USB device and sysdev probing ala i2c

2018-05-25 Thread Johan Hovold
On Thu, May 24, 2018 at 02:18:57PM +0200, Ricardo Ribalda Delgado wrote: > Hi Johan, > > On Thu, May 24, 2018 at 2:07 PM Johan Hovold wrote: > > > Hi Ricardo, > > > On Wed, May 23, 2018 at 11:17:20AM +0200, Ricardo Ribalda Delgado wrote: > > > Hi > > > > > > I have a flash

Re: [PATCH] usb: gadget: dwc2: fix memory leak in gadget_init()

2018-05-25 Thread Minas Harutyunyan
Acked-by: Minas Harutyunyan On 5/24/2018 6:22 PM, Grigor Tovmasyan wrote: > Freed allocated request for ep0 to prevent memory leak in case when > dwc2_driver_probe() failed. > > Signed-off-by: Grigor Tovmasyan > Cc: Stefan Wahren

Re: Serdev: USB device and sysdev probing ala i2c

2018-05-25 Thread Johan Hovold
On Thu, May 24, 2018 at 11:49:24AM -0500, Rob Herring wrote: > On Thu, May 24, 2018 at 7:18 AM, Ricardo Ribalda Delgado > wrote: > > Hi Johan, > > > > On Thu, May 24, 2018 at 2:07 PM Johan Hovold wrote: > >> Serdev currently only supports device tree

[RFC PATCH 3/3] dbg: ARM: dts: boneblack: add USB topology and serdev nodes

2018-05-25 Thread Johan Hovold
Add a hub device and two USB devices, of which one has a combined node. Note that we need to represent the serial ports as well -- consider devices with multiple ports per interface; which one should serdev use? Sibling devices can also be described this way (e.g. gpio@0), and would need to use

[RFC PATCH 0/3] USB: serial: add device tree (and serdev) support

2018-05-25 Thread Johan Hovold
These are some patches I've been using to test out using serdev with USB serial. Adding device-tree support to USB serial is really a separate matter and could be merged before the remaining issues related to hotplug are addressed for serdev. Note that this has been a low-intensity on-going

[RFC PATCH 1/3] USB: serial: add device-tree support

2018-05-25 Thread Johan Hovold
Lookup and associate serial-port device-tree nodes given a parent USB-interface node during probe. Note that a serial-port node must be named "serial" and have a "reg" property so that ports on multi-port interfaces can be distinguished. _interface { #address-cells = <1>;

Re: Documentation On Gadget Drivers (g_ffs)

2018-05-25 Thread Krzysztof Opasiak
On 24.05.2018 07:11, R0b0t1 wrote: > All that is in tree is ./Documentation/usb/functionfs.txt which I can > not get the information I need from. I happened to find > https://events.static.linuxfound.org/sites/events/files/slides/LinuxConNA-Make-your-own-USB-gadget-Andrzej.Pietrasiewicz.pdf, >

[RFC PATCH 2/3] USB: serial: enable serdev support

2018-05-25 Thread Johan Hovold
Enable serdev support by using the serdev opt-in tty-port registration helpers. FIXME: serdev core always allocates and registers a serdev controller during port registration only to immediately roll back in the common case when there is no serdev slave defined in firmware FIXME: serdev does not

[PATCH] usb: dwc3: qcom: mark PM functions as __maybe_unused

2018-05-25 Thread Arnd Bergmann
The #ifdef guards around these are wrong, resulting in warnings in certain configurations: drivers/usb/dwc3/dwc3-qcom.c:244:12: error: 'dwc3_qcom_resume' defined but not used [-Werror=unused-function] static int dwc3_qcom_resume(struct dwc3_qcom *qcom) ^~~~

[PATCH] usb/gadget: aspeed-vhub: add USB_LIBCOMPOSITE dependency

2018-05-25 Thread Arnd Bergmann
Without that option, we run into a link failure: drivers/usb/gadget/udc/aspeed-vhub/hub.o: In function `ast_vhub_std_hub_request': hub.c:(.text+0x5b0): undefined reference to `usb_gadget_get_string' Fixes: 7ecca2a4080c ("usb/gadget: Add driver for Aspeed SoC virtual hub") Signed-off-by: Arnd

[PATCH v4] usbip: dynamically allocate idev by nports found in sysfs

2018-05-25 Thread Michael Grzeschik
As the amount of available ports varies by the kernels build configuration. To remove the limitation of the fixed 128 ports we allocate the amount of idevs by using the number we get from the kernel. Signed-off-by: Michael Grzeschik --- v1 -> v2: - reworked memory

Re: Serdev: USB device and sysdev probing ala i2c

2018-05-25 Thread Rob Herring
On Fri, May 25, 2018 at 7:08 AM, Johan Hovold wrote: > On Thu, May 24, 2018 at 11:49:24AM -0500, Rob Herring wrote: >> On Thu, May 24, 2018 at 7:18 AM, Ricardo Ribalda Delgado >> wrote: >> > Hi Johan, >> > >> > On Thu, May 24, 2018 at 2:07 PM Johan

[PATCH] usb: core: message: remove extra endianness conversion in usb_set_isoch_delay

2018-05-25 Thread Ruslan Bilovol
No need to do extra endianness conversion in usb_set_isoch_delay because it is already done in usb_control_msg() Fixes: 886ee36e7205 ("usb: core: add support for USB_REQ_SET_ISOCH_DELAY") Cc: Dmytro Panchenko Cc: Felipe Balbi Cc:

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-25 Thread Ken Goldman
On 5/10/2018 10:31 AM, David R. Bild wrote: Could this be implemented as a first priority to daemon. If it turns out to be bad approach we can reconsider kernel. If we land it to kernel it is harder to take steps back. Is the daemon an implementation of the TCG resource manager spec? The

[PATCH] usb: host: ohci: fix sfr kernel warning in ohci-at91 driver

2018-05-25 Thread Prasanthi Chellakumar
The USB Host Controller driver 'ohci-at91.c' reads a Special Function Register - OHCI Interrupt Configuration Register (AT91_SFR_OHCIICR) for bits SUSPEND_A/B/C. These bits are defined in sama5d2 alone, so sfr register mapping is done with compatible string "atmel,sama5d2-sfr". This gives a kernel

[PATCH] usb: dwc3: Remove DEBUG define from Qualcomm DWC3 glue driver

2018-05-25 Thread Douglas Anderson
It appears that a "#define DEBUG" was left in on the recent patch landed for the Qualcomm DWC3 glue driver. Let's remove it. Fixes: a4333c3a6ba9 ("usb: dwc3: Add Qualcomm DWC3 glue driver") Signed-off-by: Douglas Anderson --- drivers/usb/dwc3/dwc3-qcom.c | 1 - 1 file

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-25 Thread Ken Goldman
On 5/8/2018 11:36 AM, James Bottomley wrote: On Tue, 2018-05-08 at 10:29 -0500, David R. Bild wrote: On Tue, May 8, 2018 at 10:25 AM, James Bottomley I don't see any reason to set an unreachable password for the platform hierarchy if the UEFI didn't.  If the desire is to disable the

Re: [PATCH] usb: hub: Per-port setting to use old enumeration scheme

2018-05-25 Thread Greg Kroah-Hartman
On Fri, May 25, 2018 at 06:05:16AM +0800, Nicolas Boichat wrote: > On Fri, May 25, 2018 at 12:21 AM, Greg Kroah-Hartman > wrote: > > On Thu, May 24, 2018 at 07:42:00AM +0800, Nicolas Boichat wrote: > >> On Thu, May 24, 2018 at 12:39 AM, Greg Kroah-Hartman > >>

Re: [PATCH] usb: hub: Per-port setting to use old enumeration scheme

2018-05-25 Thread Greg Kroah-Hartman
On Wed, May 23, 2018 at 10:16:56AM +0800, Nicolas Boichat wrote: > The "old" enumeration scheme is considerably faster (it takes > ~294ms instead of ~439ms to get the descriptor). > > It is currently only possible to use the old scheme globally > (/sys/module/usbcore/parameters/old_scheme_first),

[PATCH v5] usb: gadget: udc: renesas_usb3: Add register of usb role switch

2018-05-25 Thread Yoshihiro Shimoda
This patch adds role switch support for R-Car SoCs into the USB 3.0 peripheral driver. Some R-Car SoCs (e.g. R-Car H3) have USB 3.0 dual-role device controller which has the USB 3.0 xHCI host and Renesas USB 3.0 peripheral. Unfortunately, the mode change register (DRD_CON) contains the USB 3.0

Re: [PATCH] usb: gadget: dwc2: fix memory leak in gadget_init()

2018-05-25 Thread Stefan Wahren
Hi Grigor, > Grigor Tovmasyan hat am 24. Mai 2018 um 16:22 > geschrieben: > > > Freed allocated request for ep0 to prevent memory leak in case when > dwc2_driver_probe() failed. > > Signed-off-by: Grigor Tovmasyan > Cc: Stefan Wahren