Re: mass storage behaviour

2015-10-16 Thread Paul Jones
On 06 Oct 2015, at 12:34, Paul Jones wrote: > On 06 Oct 2015, at 16:44, Alan Stern wrote: > >> On Tue, 6 Oct 2015, Paul Jones wrote: >> >>> On 05 Oct 2015, at 23:09, Alan Stern wrote: >>> On Mon, 5 Oct 2015,

Re: [PATCH] usb: dwc2: host: Protect PCGCTL with lock in dwc2_port_resume()

2015-10-16 Thread John Youn
On 10/14/2015 3:58 PM, Douglas Anderson wrote: > From code inspection, it appears to be unsafe to do a read-modify-write > of PCGCTL in dwc2_port_resume(). Let's make sure the spinlock is held > around this operation. > > Signed-off-by: Douglas Anderson > --- >

Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-10-16 Thread Greg KH
On Fri, Oct 16, 2015 at 01:03:42PM -0700, Lee Duncan wrote: > Adding linux-usb and linux-hotplug to cc list, in case they wish to comment. > > Summary: I want to change SCSI host number so that it gets re-used, like > disk index numbers, instead of always increasing. > > Please see below. > >

Re: mass storage behaviour

2015-10-16 Thread Alan Stern
On Fri, 16 Oct 2015, Paul Jones wrote: > Added some debugging statements in f_mass_storage/net2280 to get an idea of > what is going on on the wire (as I unfortunately don’t have any tools to > figure it out any other way). > Additional debug statement locations: ... > Log for a single large

Re: [GIT PULL] On-demand device probing

2015-10-16 Thread Olof Johansson
Hi, I've bisected boot failures in next-20151016 down to patches in this branch: On Thu, Oct 15, 2015 at 4:42 AM, Tomeu Vizoso <tomeu.viz...@collabora.com> wrote: > Tomeu Vizoso (20): > driver core: handle -EPROBE_DEFER from bus_type.match() The machine it happened on was OMAP

[PATCH v3] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread Douglas Anderson
From: Doug Anderson While plugging / unplugging on a DWC2 host port with "slub_debug=FZPUA" enabled, I found a crash that was quite obviously a use after free. It appears that in some cases when we handle the various sub-cases of HCINT we may end up freeing the QTD. If

Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-10-16 Thread Lee Duncan
Adding linux-usb and linux-hotplug to cc list, in case they wish to comment. Summary: I want to change SCSI host number so that it gets re-used, like disk index numbers, instead of always increasing. Please see below. On 10/14/2015 11:53 AM, James Bottomley wrote: > On Wed, 2015-10-14 at 11:34

Re: [PATCH v1 14/14] usb: dwc2: host: use kmem cache to allocate descriptors

2015-10-16 Thread Herrero, Gregory
Hi Doug, On Thu, Oct 15, 2015 at 04:50:55PM -0700, Doug Anderson wrote: > Gregory, > > On Mon, Oct 12, 2015 at 2:17 AM, Gregory Herrero > wrote: > > - qh->desc_list = kzalloc(qh->desc_list_sz, flags | GFP_DMA32); > > + qh->desc_list =

Re: mass storage behaviour

2015-10-16 Thread Felipe Balbi
Hi, Paul Jones writes: > First DMA to first IRQ = 116us. > > Second DMA to second IRQ = 107us. > > These seem fairly stable as the last request in a 500+MB transfer had > exactly the same timings. > > Each IRQ is taking around 14us to handle, during which most of the > time

Re: mass storage behaviour

2015-10-16 Thread Paul Jones
On 16 Oct 2015, at 15:59, Alan Stern wrote: > On Fri, 16 Oct 2015, Paul Jones wrote: > >> Added some debugging statements in f_mass_storage/net2280 to get an idea of >> what is going on on the wire (as I unfortunately don’t have any tools to >> figure it out any

Re: [PATCH v2] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread John Youn
On 10/15/2015 4:38 PM, Doug Anderson wrote: > John, > > On Thu, Oct 15, 2015 at 4:21 PM, John Youn wrote: >> Passing a NULL qtd to some of the subcases will lead to a NULL >> pointer dereference in that function or some function that it >> calls. >> >> I think you could

RE: Crash in usb_f_mass_storage

2015-10-16 Thread Kaukab, Yousaf
> -Original Message- > From: Paul Jones [mailto:p.jo...@teclyn.com] > Sent: Friday, October 16, 2015 3:40 AM > To: Kaukab, Yousaf > Cc: Alan Stern; Felipe Balbi; Linux USB Mailing List > Subject: Re: Crash in usb_f_mass_storage > > > On 15 Oct 2015, at 04:12, Kaukab, Yousaf

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: > Occasionally, writing data and immediately closing the port makes cp2108 > stop responding. The device had to be unplugged to clear the error. > The failure is induced by shutting down the device while its Tx queue still > has

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Sergei Shtylyov
Hello. On 10/16/2015 1:07 AM, Konstantin Shkolnyy wrote: Occasionally, writing data and immediately closing the port makes cp2108 stop responding. The device had to be unplugged to clear the error. The failure is induced by shutting down the device while its Tx queue still has unsent data.

Re: [PATCH] arm: dts: ls1021a: Add quirk for Erratum A009116

2015-10-16 Thread Shawn Guo
On Wed, Oct 14, 2015 at 11:04:12AM +0530, Rajesh Bhagat wrote: > Add "snps,quirk-frame-length-adjustment" property to > USB3 node for erratum A009116. This property provides > value of GFLADJ_30MHZ for post silicon frame length > adjustment. > > Signed-off-by: Nikhil Badola

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Konstantin Shkolnyy
Hello, On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov wrote: [...] >> >> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const >> serial_drivers[] = { >> #define CP210X_GET_CHARS 0x0E >> #define CP210X_GET_PROPS 0x0F >> #define

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 07:35:02AM -0500, Konstantin Shkolnyy wrote: > Hello, > > On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov > wrote: > [...] > >> > >> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const > >> serial_drivers[] = { > >> #define

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: > cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. > However, SET_LINE_CTL functions properly. When the driver tries to modify > the register, it reads it, modifies some bits and writes back. Because the >

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 7:55 AM, Johan Hovold wrote: > On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: >> Occasionally, writing data and immediately closing the port makes cp2108 >> stop responding. The device had to be unplugged to clear the error. >> The

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 08:48:39AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 7:55 AM, Johan Hovold wrote: > > On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: > >> Occasionally, writing data and immediately closing the port makes cp2108 > >>

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 10:27 AM, Johan Hovold wrote: > On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: >> On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: >> > On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: >> >>

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 10:39:13AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 10:27 AM, Johan Hovold wrote: > > On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: > >> On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: > >>

Re: [PATCH 0/3] gpio: rcar: Remove obsolete platform data support

2015-10-16 Thread Linus Walleij
On Wed, Oct 7, 2015 at 10:23 AM, Geert Uytterhoeven wrote: > Hi Greg, Linus, Alexandre, > > Since commit 4baadb9e05c68962 ("ARM: shmobile: r8a7778: remove obsolete > setup code"), which is now in arm-soc/for-next, Renesas R-Car SoCs are > only supported in

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Konstantin Shkolnyy
On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: > On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: >> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. >> However, SET_LINE_CTL functions properly. When the driver tries to modify >>

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: > > On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: > >> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. > >>

Re: [PATCH 2/3] pinctrl: sh-pfc: Stop including

2015-10-16 Thread Linus Walleij
On Wed, Oct 7, 2015 at 10:23 AM, Geert Uytterhoeven wrote: > This header file will be removed soon. > > Copy the helper macro RCAR_GP_PIN(), which is used by the pinctrl > drivers only, to sh_pfc.h, and drop the #include. > > Signed-off-by: Geert Uytterhoeven

Re: Crash in usb_f_mass_storage

2015-10-16 Thread Paul Jones
On 16 Oct 2015, at 05:55, Kaukab, Yousaf wrote: >> -Original Message- >> From: Paul Jones [mailto:p.jo...@teclyn.com] >> Sent: Friday, October 16, 2015 3:40 AM >> To: Kaukab, Yousaf >> Cc: Alan Stern; Felipe Balbi; Linux USB Mailing List >> Subject: Re: Crash in

uPD720200 errors kernel with Superspeed (USB3) devices.

2015-10-16 Thread Stuart Foster
When I try to use a Superspeed device with the USB 3 ports provided by this device I get kernel errors (see attached). The device works fine with HiSpeed (USB2) etc. devices. Please advise. [0.00] Initializing cgroup subsys cpu [0.00] Linux version 4.2.3 (root@Alice) (gcc

[RFC PATCH] usb: gadget: Introduce Cadence USB2 UDC Driver

2015-10-16 Thread Neil Armstrong
Introduces UDC support for the Device-Mode only version of the Cadence USB2 Controller IP Core. Host mode and OTG mode are not implemented by lack of hardware. Support for Isochronous endpoints is not implemented by lack of time. Internal DMA is supported and can be activated by DT property.

Re: [PATCH v1 14/14] usb: dwc2: host: use kmem cache to allocate descriptors

2015-10-16 Thread Doug Anderson
Gregory, On Fri, Oct 16, 2015 at 1:44 PM, Herrero, Gregory wrote: > I can't reproduce this issue so far but using GFP_DMA32 is obviously > wrong here, so I will replace with GFP_DMA. With that, I can definitely boot up. :) >> When I reverted this patch and tried to

net2280 crash during testusb

2015-10-16 Thread Paul Jones
Youssaf, if I run test 13 of testusb I get the following crash: [ 963.504860] WARNING: CPU: 1 PID: 0 at drivers/usb/gadget/udc/net2280.c:893 start_dma+0x218/0x220 [net2280]() [ 963.504861] Modules linked in: g_zero usbtest usb_f_ss_lb libcomposite configfs ccm arc4 iwlmvm i915 mac80211

Re: mass storage behaviour

2015-10-16 Thread Paul Jones
On 16 Oct 2015, at 18:06, Felipe Balbi wrote: > > Hi, > > Paul Jones writes: >> First DMA to first IRQ = 116us. >> >> Second DMA to second IRQ = 107us. >> >> These seem fairly stable as the last request in a 500+MB transfer had >> exactly the same timings.

[PATCH 2/2] usb: dwc2: host: Clear interrupts before handling them

2015-10-16 Thread Douglas Anderson
In general it is wise to interrupts before processing them. If you don't do that, you can get: 1. Interrupt happens 2. You look at system state and process interrupt 3. A new interrupt happens 4. You clear interrupt without processing it. This patch was actually a first attempt to fix

[PATCH 1/2] usb: dwc2: host: Fix missing device insertions

2015-10-16 Thread Douglas Anderson
If you've got your interrupt signals bouncing a bit as you insert your USB device, you might end up in a state when the device is connected but the driver doesn't know it. Specifically, the observed order is: 1. hardware sees connect 2. hardware sees disconnect 3. hardware sees connect 4.

[PATCH v4] usb: dwc2: host: Fix use after free w/ simultaneous irqs

2015-10-16 Thread Douglas Anderson
From: Doug Anderson While plugging / unplugging on a DWC2 host port with "slub_debug=FZPUA" enabled, I found a crash that was quite obviously a use after free. It appears that in some cases when we handle the various sub-cases of HCINT we may end up freeing the QTD. If

Re: [ANNOUNCE] tree closed for v4.4 merge window

2015-10-16 Thread John Youn
On 10/15/2015 8:32 AM, Felipe Balbi wrote: > > Hi guys, > > it's already -rc5 and I need to close my tree for this merge > window. Major fixes will still be queued. I still have 3 patches on DWC2 > pending John's Ack, so those are the last ones which will get into my > tree; after that, only bug

[PATCH] usb: gadget: fix platform_no_drv_owner.cocci warnings

2015-10-16 Thread kbuild test robot
drivers/usb/gadget/udc/cadence_hsudc.c:2127:6-11: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Neil Armstrong Signed-off-by:

Re: [RFC PATCH] usb: gadget: Introduce Cadence USB2 UDC Driver

2015-10-16 Thread kbuild test robot
Hi Neil, [auto build test ERROR on balbi-usb/next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Neil-Armstrong/usb-gadget-Introduce-Cadence-USB2-UDC-Driver/20151016-225656 config: i386-allmodconfig

[PATCH] usb: gadget: fix bugon.cocci warnings

2015-10-16 Thread kbuild test robot
drivers/usb/gadget/udc/cadence_hsudc.c:1303:2-5: WARNING: Use BUG_ON instead of if condition followed by BUG. Please make sure the condition has no side effects (see conditional BUG_ON definition in include/asm-generic/bug.h) Use BUG_ON instead of a if condition followed by BUG. Semantic