Re: [PATHCv10 1/2] usb: USB Type-C connector class

2016-11-17 Thread Heikki Krogerus
On Wed, Nov 16, 2016 at 04:31:07PM +0100, Greg KH wrote: > On Wed, Nov 16, 2016 at 05:20:24PM +0200, Heikki Krogerus wrote: > > Hi Greg, > > > > On Mon, Nov 14, 2016 at 10:51:48AM +0100, Greg KH wrote: > > > > +static int sysfs_strmatch(const char * const *array, size_t n, const > > > > char *str

[PATCH v3 1/1] usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices

2016-11-17 Thread Mathias Nyman
USB-3 does not have any link state that will avoid negotiating a connection with a plugged-in cable but will signal the host when the cable is unplugged. For USB-3 we used to first set the link to Disabled, then to RxDdetect to be able to detect cable connects or disconnects. But in RxDetect the c

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-17 Thread Wim Osterholt
On Thu, Nov 17, 2016 at 02:57:33AM +0100, Wim Osterholt wrote: > Now a retry of 4.9-rc5. I take the config of 4.8.8 and accept > the default for the new options. > SMP set. No call trace appears. > For completeness I should also try with SMP unset. That is for tomorrow > then. With CONFIG_SMP uns

Re: [PATCH 1/2] usb: gadget: serial: zero-initialize struct variable gscons_info

2016-11-17 Thread Felipe Balbi
Hi, Felix Hädicke writes: > There can be cases when members of the gscons_info struct are used > uninitialized, e. g. in, gserial_console_exit(), if gs_console_setup() > was not called before. > > Signed-off-by: Felix Hädicke > --- > drivers/usb/gadget/function/u_serial.c | 2 +- > 1 file chan

Re: [PATCH 0/6] musb-fixes for v4.9-rc6

2016-11-17 Thread Johan Hovold
[ +CC: Tony ] On Thu, Nov 17, 2016 at 08:10:55AM +0100, Greg Kroah-Hartman wrote: > On Wed, Nov 16, 2016 at 01:21:21PM -0600, Bin Liu wrote: > > Hi Greg, > > > > Hope this is not too late for -rc6. This set fixes a long standing musb > > regression introduced in v4.8. Please let me know if any c

Re: [PATCH 1/2] usb: gadget: serial: zero-initialize struct variable gscons_info

2016-11-17 Thread Felipe Balbi
Hi, (no top-posting, please) Felix Hädicke writes: > ok, thanks for the hint. I dind't know this. > > Just ignore this patch. fair enough, then just resend patch 2/2 with Oops message in commit log and Peter's Tested-by already added. thanks -- balbi signature.asc Description: PGP signatu

Re: [PATCH v3 1/1] usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices

2016-11-17 Thread Greg KH
On Thu, Nov 17, 2016 at 11:14:14AM +0200, Mathias Nyman wrote: > USB-3 does not have any link state that will avoid negotiating a connection > with a plugged-in cable but will signal the host when the cable is > unplugged. > > For USB-3 we used to first set the link to Disabled, then to RxDdetect

Re: add usb option device

2016-11-17 Thread Johan Hovold
On Wed, Nov 16, 2016 at 10:03:52PM +0100, Giuseppe Lippolis wrote: > Dear All, > thanks for the very interesting discussion. > > > > This will make option grab all the ports, as shown by your dmesg > > > output. But USB interfaces 0 and 1 are actually cdc-ether and should > > > *not* be grabbed b

Re: [PATCH] dmaengine: cppi41: More PM runtime fixes

2016-11-17 Thread Vinod Koul
On Wed, Nov 16, 2016 at 10:24:15AM -0800, Tony Lindgren wrote: > Fix use of u32 instead of int for checking for negative errors values > as pointed out by Dan Carpenter . > > And while testing the PM runtime error path by randomly returning > failed values in runtime resume, I noticed two more pla

[PATCHv11 2/3] usb: USB Type-C connector class

2016-11-17 Thread Heikki Krogerus
The purpose of USB Type-C connector class is to provide unified interface for the user space to get the status and basic information about USB Type-C connectors on a system, control over data role swapping, and when the port supports USB Power Delivery, also control over power role swapping and Alt

[PATCHv11 0/3] USB Type-C Connector class

2016-11-17 Thread Heikki Krogerus
The USB Type-C class is meant to provide unified interface to the userspace to present the USB Type-C ports in a system. Changes since v10: - Using ATTRIBUTE_GROUPS and DEVICE_ATTR marcos everywhere - Moved sysfs_match_string to lib/string.c - Rationalized uevents - Calling ida_destroy Changes si

[PATCHv11 3/3] usb: typec: add driver for Intel Whiskey Cove PMIC USB Type-C PHY

2016-11-17 Thread Heikki Krogerus
This adds driver for the USB Type-C PHY on Intel WhiskeyCove PMIC which is available on some of the Intel Broxton SoC based platforms. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/Kconfig | 14 ++ drivers/usb/typec/Makefile | 1 + drivers/usb/typec/typec_wcove.c | 372 +

[PATCHv11 1/3] lib/string: add sysfs_match_string helper

2016-11-17 Thread Heikki Krogerus
Make a simple helper for matching strings with sysfs attribute files. In most parts the same as match_string(), except sysfs_match_string() uses sysfs_streq() instead of strcmp() for matching. This is more convenient when used with sysfs attributes. Signed-off-by: Heikki Krogerus --- include/lin

Re: [PATCH] usb: dwc3: avoid empty-body warning

2016-11-17 Thread Felipe Balbi
Hi, Arnd Bergmann writes: > Building with W=1, we get a warning about harmless empty statements: > > drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_handle_intf': > drivers/usb/dwc3/ep0.c:491:4: error: suggest braces around empty body in an > 'if' statement [-Werror=empty-body] > > gcc does not w

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread Felipe Balbi
Hi, John Youn writes: > Add the "snps,ahb-burst" binding and read it in. > > This property controls which burst type to perform on the AHB bus as a > master in internal DMA mode. This overrides the legacy param value, > which we need to keep around for now since several platforms use it. > > Som

[PATCH v5 0/6] inherit dma configuration from parent dev

2016-11-17 Thread Sriram Dash
For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already does. The difference is that it also hand

[PATCH v5 6/6] usb: dwc3: Do not set dma coherent mask

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann The dma mask is correctly set up by the DT probe function, no need to override it any more. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash --- Changes in v5: - No update Changes in v4: - No update Changes in v3: - No update Changes in v2: - club the clea

[PATCH v5 2/6] usb: chipidea: use bus->sysdev for DMA configuration

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann Set the dma for chipidea from sysdev. This is inherited from its parent node. Also, do not set dma mask for child as it is not required now. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Acked-by: Peter Chen --- Changes in v5: - No update Changes in v4: - No

[PATCH v5 3/6] usb: ehci: fsl: use bus->sysdev for DMA configuration

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann For the dual role ehci fsl driver, sysdev will handle the dma config. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash --- Changes in v5: - No update Changes in v4: - No update Changes in v3: - fix compile errors Changes in v2: - fix compile warnings drive

[PATCH v5 4/6] usb: xhci: use bus->sysdev for DMA configuration

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. So, set the dma for xhci from sysdev. sysdev is pointing to device that is known to the system firmware or hardware. Signed-off-by: Arnd Bergmann Signed-off-by

[PATCH v5 5/6] usb: dwc3: use bus->sysdev for DMA configuration

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann The dma ops for dwc3 devices are not set properly. So, use a physical device sysdev, which will be inherited from parent, to set the hardware / firmware parameters like dma. Signed-off-by: Arnd Bergmann Signed-off-by: Sriram Dash Tested-by: Baolin Wang --- Changes in v5:

[PATCH v5 1/6] usb: separate out sysdev pointer from usb_bus

2016-11-17 Thread Sriram Dash
From: Arnd Bergmann For xhci-hcd platform device, all the DMA parameters are not configured properly, notably dma ops for dwc3 devices. The idea here is that you pass in the parent of_node along with the child device pointer, so it would behave exactly like the parent already does. The differenc

Re: add usb option device

2016-11-17 Thread Dan Williams
On Thu, 2016-11-17 at 11:15 +0100, Johan Hovold wrote: > On Wed, Nov 16, 2016 at 10:03:52PM +0100, Giuseppe Lippolis wrote: > > > > Dear All, > > thanks for the very interesting discussion. > > > > > > > > > > > > > This will make option grab all the ports, as shown by your > > > > dmesg > > >

Re: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-17 Thread Mark Lord
On 16-11-17 09:14 AM, Mark Lord wrote: .. Using coherent buffers (non-cacheable, allocated with usb_alloc_coherent), Note that the same behaviour also happens with the original kmalloc'd buffers. I can get it to fail extremely regularly by simply reducing the buffer size (agg_buf_sz) from 16K

Re: crash by cdc_acm driver in kernels 4.8-rc1/5

2016-11-17 Thread Wim Osterholt
On Thu, Nov 17, 2016 at 10:14:34AM +0100, Wim Osterholt wrote: > > For completeness I should also try with SMP unset. That is for tomorrow > > then. > > With CONFIG_SMP unset nothing goes wrong here either. > It looks like it has been fixed in 4.9-rc5, but I should also double check > several conb

Re: [PATCH 0/6] musb-fixes for v4.9-rc6

2016-11-17 Thread Tony Lindgren
* Johan Hovold [161117 01:20]: > [ +CC: Tony ] > > On Thu, Nov 17, 2016 at 08:10:55AM +0100, Greg Kroah-Hartman wrote: > > On Wed, Nov 16, 2016 at 01:21:21PM -0600, Bin Liu wrote: > > > Hi Greg, > > > > > > Hope this is not too late for -rc6. This set fixes a long standing musb > > > regression

Re: [PATCH v3 1/1] usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices

2016-11-17 Thread Mathias Nyman
On 17.11.2016 11:26, Greg KH wrote: On Thu, Nov 17, 2016 at 11:14:14AM +0200, Mathias Nyman wrote: USB-3 does not have any link state that will avoid negotiating a connection with a plugged-in cable but will signal the host when the cable is unplugged. For USB-3 we used to first set the link to

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread Stefan Wahren
Hi John, Am 17.11.2016 um 00:47 schrieb John Youn: > Add the "snps,ahb-burst" binding and read it in. > > This property controls which burst type to perform on the AHB bus as a > master in internal DMA mode. This overrides the legacy param value, > which we need to keep around for now since severa

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread John Youn
On 11/17/2016 7:35 AM, Stefan Wahren wrote: > Hi John, > > Am 17.11.2016 um 00:47 schrieb John Youn: >> Add the "snps,ahb-burst" binding and read it in. >> >> This property controls which burst type to perform on the AHB bus as a >> master in internal DMA mode. This overrides the legacy param valu

Re: AW: add usb option device

2016-11-17 Thread Dan Williams
On Wed, 2016-11-16 at 22:11 +0100, Giuseppe Lippolis wrote: > > > > > > > > This will make option grab all the ports, as shown by your dmesg > > > output.  But USB interfaces 0 and 1 are actually cdc-ether and > > > should > > > *not* be grabbed by option. > > I also have another curiosity: > Wh

Re: [RFC PATCH] xhci: Fix memory use after free in xhci_free_virt_device

2016-11-17 Thread Mathias Nyman
On 15.11.2016 22:36, Guenter Roeck wrote: The following use-after-free reports were seen on resume with a specific USB hub. BUG: KASAN: use-after-free in xhci_free_virt_device+0x8c/0x21c at addr ffc0cc1a2eb0 BUG: KASAN: use-after-free in xhci_update_tt_active_eps+0x9c/0xdc at

Re: [PATCH 0/6] musb-fixes for v4.9-rc6

2016-11-17 Thread Greg KH
On Thu, Nov 17, 2016 at 08:38:29AM -0600, Bin Liu wrote: > On Thu, Nov 17, 2016 at 10:20:10AM +0100, Johan Hovold wrote: > > [ +CC: Tony ] > > > > On Thu, Nov 17, 2016 at 08:10:55AM +0100, Greg Kroah-Hartman wrote: > > > On Wed, Nov 16, 2016 at 01:21:21PM -0600, Bin Liu wrote: > > > > Hi Greg, > >

Re: [PATCH] usb: dwc3: avoid empty-body warning

2016-11-17 Thread Arnd Bergmann
On Thursday, November 17, 2016 1:23:43 PM CET Felipe Balbi wrote: > Arnd Bergmann writes: > > Building with W=1, we get a warning about harmless empty statements: > > > > drivers/usb/dwc3/ep0.c: In function 'dwc3_ep0_handle_intf': > > drivers/usb/dwc3/ep0.c:491:4: error: suggest braces around empt

[PATCH 1/3] usb: xhci: add quirk flag for broken PED bits

2016-11-17 Thread Roger Quadros
From: Felipe Balbi Some devices from Texas Instruments [1] suffer from a silicon bug where Port Enabled/Disabled bit should not be used to silence an erroneous device. The bug is so that if port is disabled with PED bit, an IRQ for device removal (or attachment) will never fire. Just for the sa

[PATCH 2/3] usb: host: xhci-plat: enable BROKEN_PED quirk if platform requested

2016-11-17 Thread Roger Quadros
From: Felipe Balbi In case 'quirk-broken-port-ped' property is passed in via device property, we should enable the corresponding BROKEN_PED quirk flag for XHCI core. [rog...@ti.com] Updated code from platform data to device property and added DT binding. Signed-off-by: Felipe Balbi Signed-off-

[PATCH v2] usb: gadget: serial: fix possible Oops caused by calling kthread_stop(NULL)

2016-11-17 Thread Felix Hädicke
Add check for NULL before calling kthread_stop(). There were cases in which gserial_console_exit() was called, but the console thread was not started. This resulted in an invalid kthread_stop(NULL) call. Without this, the following Oops may occur: BUG: unable to handle kernel NULL p

[PATCH 3/3] usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions

2016-11-17 Thread Roger Quadros
From: Felipe Balbi dwc3 revisions <=3.00a have a limitation where Port Disable command doesn't work. Set the quirk-broken-port-ped property for such controllers so XHCI core can do the necessary workaround. [rog...@ti.com] Updated code from platform data to device property. Signed-off-by: Felip

Re: [PATCH] usb: gadget: f_fs: fix wrong parenthesis in ffs_func_req_match()

2016-11-17 Thread Felix Hädicke
Hello, > Properly check the return code of ffs_func_revmap_intf() and > ffs_func_revmap_ep() for a non-negative value. > > Instead of checking the return code, the comparison was performed for the last > parameter of the function calls, because of wrong parenthesis. > > This also fixes the followin

Re: [PATCH v2 2/4] usb: dwc2: Add binding for AHB burst

2016-11-17 Thread John Youn
On 11/17/2016 3:28 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> Add the "snps,ahb-burst" binding and read it in. >> >> This property controls which burst type to perform on the AHB bus as a >> master in internal DMA mode. This overrides the legacy param value, >> which we need to kee

[PATCH v3 2/4] usb: dwc2: Read in the AHB burst property

2016-11-17 Thread John Youn
Read in the "snps,ahb-burst" property and set the internal parameter. If this property is set, it overrides the legacy param value, except for BCM2835, which can't set this value. Cc: Stefan Wahren Signed-off-by: John Youn --- drivers/usb/dwc2/core.h | 9 +++ drivers/usb/dwc2/params.c |

Re: cdc_acm - fragmented notifications

2016-11-17 Thread Tobias Herzog
> If they mention it, it may be more widely used. > I'd welcome a patch for the ACM driver. > Would you provide one? Thank you for your reply. I think I'll give it a try. /Tobias -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.ker

[PATCH v3 0/4] usb: dwc2: Add AHB burst configuration

2016-11-17 Thread John Youn
This series adds a binding for AHB burst, reads it in, and configures the controller for the specified burst type. Tested on HAPS platform with DWC_hsotg IP version 3.30a. v3: * Split out binding documentation * Squash bcm2835 comment with binding implementation * Add warning for bcm2835 v2: * D

[PATCH v3 1/4] Documentation: devictree: dwc2: Add AHB burst binding

2016-11-17 Thread John Youn
Add the "snps,ahb-burst" property which controls the burst type to perform on the AHB bus as a master in internal DMA mode. Some platforms may see better or worse performance based on this value. The HAPS platform is one example where all INCRx have worse performance than INCR. Other platforms (s

[PATCH v3 3/4] usb: dwc2: Use the ahb_burst param

2016-11-17 Thread John Youn
Use the new ahb_burst (instead of ahbcfg) to program the GAHBCFG.HBSTLEN in both host and gadget mode. Signed-off-by: John Youn --- drivers/usb/dwc2/gadget.c | 2 +- drivers/usb/dwc2/hcd.c| 8 +++- drivers/usb/dwc2/params.c | 10 -- 3 files changed, 4 insertions(+), 16 deletion

[PATCH v3 4/4] usb: dwc2: pci: Add AHB burst property for HAPS

2016-11-17 Thread John Youn
Set the AHB burst to INCR for HAPS. Signed-off-by: John Youn --- drivers/usb/dwc2/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/pci.c b/drivers/usb/dwc2/pci.c index a23329e..146b7ce 100644 --- a/drivers/usb/dwc2/pci.c +++ b/drivers/usb/dwc2/pci.c @@ -67,6 +67,7 @@ st

[PATCH v2 1/5] cdc-acm: reindent log messages

2016-11-17 Thread Ladislav Michl
Use only one tab to indent dev_{(v)dbg,err} parameters. Signed-off-by: Ladislav Michl --- Changes: - v2: add changelog text. drivers/usb/class/cdc-acm.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drive

[PATCH v2 2/5] cdc-acm: avoid interface_to_usbdev call

2016-11-17 Thread Ladislav Michl
Pointer to usb_device is already stored in acm structure. Signed-off-by: Ladislav Michl --- Changes: - v2: None drivers/usb/class/cdc-acm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 4320069..6e3c

[PATCH v2 3/5] cdc-acm: refactor killing urbs

2016-11-17 Thread Ladislav Michl
Move urb killing code into separate function and use it instead of copying that code pattern over. Signed-off-by: Ladislav Michl --- Changes: - v2: None drivers/usb/class/cdc-acm.c | 43 --- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a

[PATCH v2 4/5] cdc-acm: store in and out pipes in acm structure

2016-11-17 Thread Ladislav Michl
Clearing stall needs pipe descriptor, store it in acm structure. Signed-off-by: Ladislav Michl --- Changes: - v2: None drivers/usb/class/cdc-acm.c | 27 ++- drivers/usb/class/cdc-acm.h | 1 + 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/usb/

[PATCH v2 5/5] cdc-acm: handle read pipe errors

2016-11-17 Thread Ladislav Michl
Read urbs are submitted back only on success, causing read pipe running out of urbs after few errors. No more characters can be read from tty device then until it is reopened and no errors are reported. Fix that by always submitting urbs back and clearing stall on -EPIPE. Signed-off-by: Ladislav M

RE: [PATCH net 1/2] r8152: fix the sw rx checksum is unavailable

2016-11-17 Thread Hayes Wang
Mark Lord [mailto:ml...@pobox.com] > Sent: Thursday, November 17, 2016 9:42 PM [...] > What the above sample shows, is the URB transfer buffer ran out of space in > the > middle > of a packet, and the hardware then tried to just continue that same packet in > the > next URB, > without an rx_desc