Re: [PATCH v2 2/2] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-05-16 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > f_mass_storage has a memorry barrier issue with the sleep and wake > functions that can cause a deadlock. This results in intermittent hangs > during MSC file transfer. The host will reset the device after receiving > no response to resume the transfer. This issue is s

Re: [usb-gadget-udc] question about null check after calling phys_to_virt() function

2017-05-16 Thread Felipe Balbi
Hi, "Gustavo A. R. Silva" writes: > Hello everybody, > > While looking into Coverity ID 145958 I ran into the following piece > of code at drivers/usb/gadget/udc/amd5536udc.c:852: > > } else if (i == buf_len) { > /* first td */ > td = (struct udc_data_dma *)phys_to_virt( >

[PATCH v3] usb: gadget: gserial: check if console kthread exists

2017-05-16 Thread Mirea, Bogdan-Stefan
Hello, Any input on this topic? Kind Regards, Bogdan On Sun, 30 Apr 2017 03:22:10 Bogdan Mirea wrote: > Check for bad pointer that may result because of kthread_create failure. > This check is needed since the gserial setup callback function > (gs_console_setup()) is only freeing the info->con_b

Re: OHCI-PCI: Thin client does not shutdown properly

2017-05-16 Thread Rainer Koenig
Am 15.05.2017 um 20:56 schrieb Alan Stern: >> Interesting in this case is that we see a "USB disconnect" message >> for device number 3. And even more strange are the last 3 lines >> that show that new low-speed SUB devices are found even after all >> USB controllers are shutdown. > > The shutdown

Re: [PATCH v2] usb: usbip: let urb_destroy the transfer_buffer

2017-05-16 Thread Michael Grzeschik
On Mon, May 15, 2017 at 05:37:52PM +0200, Michael Grzeschik wrote: > The usbip stack dynamically allocates the transfer_buffer of each urb in > stub_recv_cmd_submit depending on the requested transfer_buffer_length > set via the received tcp packet. As the usbip layer never reuses the > always diff

Re: [PATCH v2] ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs

2017-05-16 Thread Johan Hovold
On Tue, May 16, 2017 at 01:08:23AM +0300, Andrey Korolyov wrote: > This patch adds support for recognition of ARM-USB-TINY(H) devices which are > almost > identical to ARM-USB-OCD(H) but lacking separate barrel jack and serial > console. Please wrap your commit messages at 72 cols or so. > Sign

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2017-05-16 Thread Maël Lavault
On Wed, 2017-05-10 at 16:04 +0300, Mathias Nyman wrote: > On 09.05.2017 16:50, Maël Lavault wrote: > > On Tue, 2017-05-09 at 11:34 +0300, Felipe Balbi wrote: > > > Hi, > > > > > > Maël Lavault writes: > > > > Le 28 avr. 2017 15:57, "Maël Lavault" > > > enue > > > > .com > > > > > a écrit : > > >

Re: [PATCH v5 1/3] phy: qcom-usb: Remove unused ulpi phy header

2017-05-16 Thread Kishon Vijay Abraham I
Hi Vivek, On Thursday 11 May 2017 12:17 PM, Vivek Gautam wrote: > Ulpi phy header is not used for anything. Remove the same > from qcom-hs and qcom-hsic phy drivers. > > Signed-off-by: Vivek Gautam > Suggested-by: Stephen Boyd > Cc: Kishon Vijay Abraham I > Cc: linux-arm-ker...@lists.infradead

Re: [PATCH v5 3/3] phy: Group vendor specific phy drivers

2017-05-16 Thread Kishon Vijay Abraham I
Hi Vivek, On Thursday 11 May 2017 12:17 PM, Vivek Gautam wrote: > Adding vendor specific directories in phy to group > phy drivers under their respective vendor umbrella. > > Also updated the MAINTAINERS file to reflect the correct > directory structure for phy drivers. > > Signed-off-by: Vivek

[PATCH] USB: core: replace %p with %pK

2017-05-16 Thread Greg KH
From: Vamsi Krishna Samavedam Format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. When kptr_restrict is set to (1), kernel pointers printed using the %pK format specifier will be replaced with Zeros. Debugging Note : &pK prints only Zeros as address.

Re: XHCI is slow during boot (bios/efi) and leaves many dmesg messages

2017-05-16 Thread Mathias Nyman
On 16.05.2017 13:00, Maël Lavault wrote: On Wed, 2017-05-10 at 16:04 +0300, Mathias Nyman wrote: On 09.05.2017 16:50, Maël Lavault wrote: On Tue, 2017-05-09 at 11:34 +0300, Felipe Balbi wrote: Hi, Maël Lavault writes: Le 28 avr. 2017 15:57, "Maël Lavault" a écrit : On Fri, 2017-04-28 at

Re: [PATCH] USB: core: replace %p with %pK

2017-05-16 Thread Bjørn Mork
Greg KH writes: > --- a/drivers/usb/core/devio.c > +++ b/drivers/usb/core/devio.c > @@ -475,11 +475,11 @@ static void snoop_urb(struct usb_device > > if (userurb) { /* Async */ > if (when == SUBMIT) > - dev_info(&udev->dev, "userurb %p, ep%d %s-%

Re: [PATCH] USB: core: replace %p with %pK

2017-05-16 Thread Greg KH
On Tue, May 16, 2017 at 01:18:50PM +0200, Bjørn Mork wrote: > Greg KH writes: > > > --- a/drivers/usb/core/devio.c > > +++ b/drivers/usb/core/devio.c > > @@ -475,11 +475,11 @@ static void snoop_urb(struct usb_device > > > > if (userurb) { /* Async */ > > if (when == SUB

Re: [PATCH] USB: core: replace %p with %pK

2017-05-16 Thread Greg KH
On Tue, May 16, 2017 at 01:23:37PM +0200, Greg KH wrote: > On Tue, May 16, 2017 at 01:18:50PM +0200, Bjørn Mork wrote: > > Greg KH writes: > > > > > --- a/drivers/usb/core/devio.c > > > +++ b/drivers/usb/core/devio.c > > > @@ -475,11 +475,11 @@ static void snoop_urb(struct usb_device > > > > >

Re: [PATCH] USB: core: replace %p with %pK

2017-05-16 Thread Bjørn Mork
Greg KH writes: > On Tue, May 16, 2017 at 01:23:37PM +0200, Greg KH wrote: >> On Tue, May 16, 2017 at 01:18:50PM +0200, Bjørn Mork wrote: >> > Greg KH writes: >> > >> > > --- a/drivers/usb/core/devio.c >> > > +++ b/drivers/usb/core/devio.c >> > > @@ -475,11 +475,11 @@ static void snoop_urb(stru

[PATCH] usb: host: xhci-plat: propagate return value of platform_get_irq()

2017-05-16 Thread Thomas Petazzoni
platform_get_irq() returns an error code, but the xhci-plat driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Signed-off-by: Thomas Petazzoni --- drivers/usb/host/xhci-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH 1/3] usb: typec: update partner power delivery support with opmode

2017-05-16 Thread Heikki Krogerus
If USB PD contract is established after creation of the partner, the power delivery support attribute of the partner needs to be updated separately. This can be done in typec_set_pwr_opmode() by checking if the port has already partner and updating the value if it does. Signed-off-by: Heikki Kroge

[PATCH 3/3] usb: typec: ucsi: Add ACPI driver

2017-05-16 Thread Heikki Krogerus
Driver for ACPI UCSI interface method. This driver replaces the previous UCSI driver drivers/usb/misc/ucsi.c. Signed-off-by: Heikki Krogerus --- drivers/usb/misc/Kconfig | 26 -- drivers/usb/misc/Makefile | 1 - drivers/usb/misc/ucsi.c| 478 -

[PATCH 0/3] usb: typec: Add proper UCSI support

2017-05-16 Thread Heikki Krogerus
Hi, This series replaces the current UCSI driver (which was only trying to fix the data role of the port to host) with a new driver that registers itself to the typec class. The driver is split in two. The core part is separated from the (ACPI) interface method part so we can easily add support f

[PATCH 2/3] usb: typec: Add support for UCSI interface

2017-05-16 Thread Heikki Krogerus
UCSI - USB Type-C Connector System Software Interface - is a specification that defines set of registers and data structures for controlling the USB Type-C ports. It's designed for systems where an embedded controller (EC) is in charge of the USB Type-C PHY or USB Power Delivery controller. It is d

Re: [PATCH] usb: host: xhci-plat: propagate return value of platform_get_irq()

2017-05-16 Thread Mathias Nyman
On 16.05.2017 15:08, Thomas Petazzoni wrote: platform_get_irq() returns an error code, but the xhci-plat driver ignores it and always returns -ENODEV. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Signed-off-by: Thomas Petazzoni Thanks, added -Mathias -- To

[PATCH v2] USB: core: replace %p with %pK

2017-05-16 Thread Greg KH
From: Vamsi Krishna Samavedam Format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. When kptr_restrict is set to (1), kernel pointers printed using the %pK format specifier will be replaced with Zeros. Debugging Note : &pK prints only Zeros as address.

[PATCH] usb: rndis_host: error during probe

2017-05-16 Thread Ridgway, Keith
Problem description: - Harris radios that use the rndis_host driver do not work with Linux kernels from version 3.16 to 4.11. They give the following timeout errors in dmesg. [ 426.016082] usbcore: registered new interface driver cdc_ether [ 472.169327] rndis_host 2-1.2

Re: [PATCH v2 2/2] usb: gadget: f_mass_storage: Serialize wake and sleep execution

2017-05-16 Thread Alan Stern
On Tue, 16 May 2017, Felipe Balbi wrote: > Hi, > > Thinh Nguyen writes: > > f_mass_storage has a memorry barrier issue with the sleep and wake > > functions that can cause a deadlock. This results in intermittent hangs > > during MSC file transfer. The host will reset the device after receiving

Re: OHCI-PCI: Thin client does not shutdown properly

2017-05-16 Thread Alan Stern
On Tue, 16 May 2017, Rainer Koenig wrote: > >> We also attached an USB analyzer to the system to see what is going on. > >> In the "bad" case we actually see a "resume" on the USB bus when the > >> machine is shutdown. Problem is that we cannot see *who* initiated this > >> resume, but my own gues

[PATCH 2/2] USB: core: of: document reference taken by companion helper

2017-05-16 Thread Johan Hovold
Document that the new companion-device lookup helper takes a reference to the companion device which needs to be dropped after use. Signed-off-by: Johan Hovold --- drivers/usb/core/of.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c index d78

[PATCH 1/2] USB: ehci-platform: fix companion-device leak

2017-05-16 Thread Johan Hovold
Make sure do drop the reference taken to the companion device during resume. Fixes: d4d75128b8fd ("usb: host: ehci-platform: fix usb 1.1 device is not connected in system resume") Cc: stable # 4.11 Cc: Yoshihiro Shimoda Signed-off-by: Johan Hovold --- drivers/usb/host/ehci-platform.c | 4

Re: usb: usbtmc: Questions of the IVI Foundation

2017-05-16 Thread Guido . Kiener
linux-usb-ow...@vger.kernel.org schrieb am 15.05.2017 15:20:22: > Von: Greg KH > Datum: 15.05.2017 15:20 > Betreff: Re: usb: usbtmc: Questions of the IVI Foundation > Gesendet von: linux-usb-ow...@vger.kernel.org > > On Mon, May 15, 2017 at 02:47:48PM +0200, Guido.Kiener@x > wrote: > > H

Re: [PATCH 2/2] USB: core: of: document reference taken by companion helper

2017-05-16 Thread Alan Stern
On Tue, 16 May 2017, Johan Hovold wrote: > Document that the new companion-device lookup helper takes a reference > to the companion device which needs to be dropped after use. > > Signed-off-by: Johan Hovold > --- > drivers/usb/core/of.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --g

[PATCH 0/6] USB: ene_usb6250: fix numerous errors

2017-05-16 Thread Alan Stern
Greg: The following series fixes quite a few errors in the ene_usb6250 sub-driver for usb-storage. According to Andreas Hartmann, the driver has never worked very well, but recently it began failing completely because it does DMA to buffers allocated on the stack. Accordingly, the first patch in

[PATCH 1/6] USB: ene_usb6250: fix DMA to the stack

2017-05-16 Thread Alan Stern
The ene_usb6250 sub-driver in usb-storage does USB I/O to buffers on the stack, which doesn't work with vmapped stacks. This patch fixes the problem by allocating a separate 512-byte buffer at probe time and using it for all of the offending I/O operations. Signed-off-by: Alan Stern Reported-and

[PATCH 2/6] USB: ene_usb6250: fix first command execution

2017-05-16 Thread Alan Stern
In the ene_usb6250 sub-driver for usb-storage, the ene_transport() routine is supposed to initialize the driver before executing the current command, if the initialization has not already been performed. However, a bug in the routine causes it to skip the command after doing the initialization. Al

[PATCH 3/6] USB: ene_usb6250: fix SCSI residue overwriting

2017-05-16 Thread Alan Stern
In the ene_usb6250 sub-driver for usb-storage, the SCSI residue is not reported correctly. The residue is initialized to 0, but this value is overwritten whenever the driver sends firmware to the card reader before performing the current command. As a result, a valid READ or WRITE operation appea

[PATCH 4/6] USB: ene_usb6250: implement REQUEST SENSE

2017-05-16 Thread Alan Stern
In the ene_usb6250 sub-driver for usb-storage, there is no support for the REQUEST SENSE command. This command is issued whenever a failure occurs, and without it the driver has no way to tell the SCSI core what the reason for the failure was. This patch adds a do_scsi_request_sense() routine to

[PATCH 6/6] USB: ene_usb6250: turn off the Removable flag

2017-05-16 Thread Alan Stern
In the ene_usb6250 sub-driver for usb-storage, the INQUIRY data returned by the driver indicates that the device has removable media. While this is technically correct (memory cards can be removed from the reader), it is not useful because the device automatically disconnects itself from the USB bu

[PATCH 5/6] USB: ene_usb6250: remove subroutine duplication

2017-05-16 Thread Alan Stern
In the ene_usb6250 sub-driver for usb-storage, the sd_scsi_inquiry() and ms_scsi_inquiry() subroutines (one meant for use with SD memory cards and the other for use with MS memory cards) are exact duplicates. This patch removes the duplication by creating a single do_scsi_inquiry() command and usi

Re: [PATCH] usb: ohci: Allow ohci on omap5 also

2017-05-16 Thread Tony Lindgren
Hi, * Tony Lindgren [160913 15:48]: > * Alan Stern [160910 19:27]: > > On Fri, 9 Sep 2016, Alan Stern wrote: > > > > > On Fri, 9 Sep 2016, Tony Lindgren wrote: > > > > > > > * Alan Stern [160909 13:41]: > > > > > On Fri, 9 Sep 2016, Tony Lindgren wrote: > > > > > > > > > > > * Alan Stern [1

Re: [PATCH] usb: rndis_host: error during probe

2017-05-16 Thread Bjørn Mork
"Ridgway, Keith" writes: > diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index > f3ae88fdf332..87c7ff190c29 100644 > --- a/drivers/net/usb/cdc_ether.c > +++ b/drivers/net/usb/cdc_ether.c > @@ -315,8 +315,10 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct > usb

Re: [usb-gadget-udc] question about null check after calling phys_to_virt() function

2017-05-16 Thread Gustavo A. R. Silva
Hi Felipe, Quoting Felipe Balbi : Hi, "Gustavo A. R. Silva" writes: Hello everybody, While looking into Coverity ID 145958 I ran into the following piece of code at drivers/usb/gadget/udc/amd5536udc.c:852: } else if (i == buf_len) { /* first td */ td = (struct udc_data_dm

Re: [PATCH v13 00/12] power: add power sequence library

2017-05-16 Thread Krzysztof Kozlowski
On Wed, Feb 15, 2017 at 09:38:09AM +0800, Peter Chen wrote: > On Tue, Feb 14, 2017 at 12:21:48PM +0200, Roger Quadros wrote: > > Peter, > > > > On 11/02/17 03:27, Peter Chen wrote: > > > Hi all, > > > > > > This is a follow-up for my last power sequence framework patch set [1]. > > > According to

[RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-16 Thread Jim Baxter
The CDC-NCM driver can require large amounts of memory to create skb's and this can be a problem when the memory becomes fragmented. This especially affects embedded systems that have constrained resources but wish to maximise the throughput of CDC-NCM with 16KiB NTB's. The issue is after running

[RFC V1 0/1] Reduce cdc_ncm memory use when kernel memory low

2017-05-16 Thread Jim Baxter
Please review this patch Problem --- We are using an ARM embedded platform and require 16KiB NTB's to allow for fast data transfer. Unfortunately we have found that there are times after running the kernel for a while and transferring a lot of data over the CDC-NCM connection that it can bec

[PATCH v2 51/53] usb: fix the comment with regards to DocBook

2017-05-16 Thread Mauro Carvalho Chehab
The USB gadget documentation is not at DocBook anymore. The main file was converted to ReST, and stored at Documentation/driver-api/usb/gadget.rst, but there are still several plain text files related to gadget under Documentation/usb. So, be generic and just mention documentation without specifyi

Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low

2017-05-16 Thread Bjørn Mork
Jim Baxter writes: > The CDC-NCM driver can require large amounts of memory to create > skb's and this can be a problem when the memory becomes fragmented. > > This especially affects embedded systems that have constrained > resources but wish to maximise the throughput of CDC-NCM with 16KiB > NT

[PATCH v3] ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs

2017-05-16 Thread Andrey Korolyov
This patch adds support for recognition of ARM-USB-TINY(H) devices which are almost identical to ARM-USB-OCD(H) but lacking separate barrel jack and serial console. By suggestion from Johan Hovold it is possible to replace ftdi_jtag_quirk with a bit more generic construction. Since all Olimex-ARM

kernel does not receive any USB3.0 plug/unplug events from the Renesas upd720202 chipset

2017-05-16 Thread Xavier .
Hello. I have one problem with chip Renesas uPD720202 (card Startech PCIUSB3S22). In Windows XP run fine, very fine, but in GNU/Linux kernel does not receive any USB3.0 plug/unplug events, why? No usb device is recognized, it is as if the card had nothing connected. I have tried the following GNU/

Re: [PATCH v13 00/12] power: add power sequence library

2017-05-16 Thread Peter Chen
On Tue, May 16, 2017 at 07:28:55PM +0200, Krzysztof Kozlowski wrote: > On Wed, Feb 15, 2017 at 09:38:09AM +0800, Peter Chen wrote: > > On Tue, Feb 14, 2017 at 12:21:48PM +0200, Roger Quadros wrote: > > > Peter, > > > > > > On 11/02/17 03:27, Peter Chen wrote: > > > > Hi all, > > > > > > > > This

Re: [PATCH v5 3/3] phy: Group vendor specific phy drivers

2017-05-16 Thread Vivek Gautam
On 05/16/2017 03:40 PM, Kishon Vijay Abraham I wrote: Hi Vivek, On Thursday 11 May 2017 12:17 PM, Vivek Gautam wrote: Adding vendor specific directories in phy to group phy drivers under their respective vendor umbrella. Also updated the MAINTAINERS file to reflect the correct directory stru

RE: [PATCH 1/2] USB: ehci-platform: fix companion-device leak

2017-05-16 Thread Yoshihiro Shimoda
Hi Johan, > From: Johan Hovold > Sent: Tuesday, May 16, 2017 11:26 PM > > Make sure do drop the reference taken to the companion device during > resume. > > Fixes: d4d75128b8fd ("usb: host: ehci-platform: fix usb 1.1 device is not > connected in system resume") > Cc: stable # 4.11 > Cc: Yo

Re: [PATCH] usb: class: usblp: Fixed assignments inside if conditions

2017-05-16 Thread Alberto Ladron
On Tue, May 16, 2017 at 01:44:47PM +0800, kbuild test robot wrote: Hi, Here is the fix. Or I have to resubmit the whole patch? Signed-off-by: Alberto Ladron --- diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index b1879ff..c335878 100644 --- a/drivers/usb/class/usblp.c ++

Re: kernel does not receive any USB3.0 plug/unplug events from the Renesas upd720202 chipset

2017-05-16 Thread Felipe Balbi
Hi, "Xavier ." writes: > Hello. > I have one problem with chip Renesas uPD720202 (card Startech PCIUSB3S22). > In Windows XP run fine, very fine, but in GNU/Linux kernel does not > receive any USB3.0 plug/unplug events, why? > No usb device is recognized, it is as if the card had nothing connect