Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Sven Brauch
Hey, On 22/07/15 01:34, Peter Hurley wrote: > I'd like to see that data, if you can, which will help me understand > at least the timing. Sure, please see below for the code which produced the output and the actual output. Let me know if you need anything else. This was run with the unmodified ver

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Peter Hurley
On 07/21/2015 05:43 PM, Sven Brauch wrote: > Hi, > > Thank you for your comments. > > On 21/07/15 15:43, Oliver Neukum wrote: >> But others won't and we'd preserve stale data in preference over fresh >> data. > If that is important for your device, you should be using an isochronous > endpoint, n

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Sven Brauch
Hi, Thank you for your comments. On 21/07/15 15:43, Oliver Neukum wrote: > But others won't and we'd preserve stale data in preference over fresh > data. If that is important for your device, you should be using an isochronous endpoint, not bulk, no? Also note that the driver currently does this

Re: [PATCH] usb: phy: msm: Add D+/D- lines route control

2015-07-21 Thread Felipe Balbi
On Wed, Jul 08, 2015 at 12:45:54PM +0300, Ivan T. Ivanov wrote: > apq8016-sbc board is using Dual SPDT USB Switch (TC7USB40MU), > witch is controlled by GPIO to de/multiplex D+/D- USB lines to > USB2513B Hub and uB connector. Add support for this. > > Signed-off-by: Ivan T. Ivanov doesn't apply:

Re: [PATCH v4 4/5] usb: gadget: mass_storage: Use static array for luns

2015-07-21 Thread Felipe Balbi
On Mon, Jul 20, 2015 at 08:15:20PM +0200, Krzysztof Opasiak wrote: > This patch replace dynamicly allocated luns array with static one. > This simplifies the code of mass storage function and modules. > > Signed-off-by: Krzysztof Opasiak > Acked-by: Michal Nazarewicz this breaks compilation of

Re: [PATCH v4 5/5] usb: gadget: mass_storage: Warn if LUNs ids are not contiguous

2015-07-21 Thread Felipe Balbi
On Mon, Jul 20, 2015 at 09:40:48PM +0300, Sergei Shtylyov wrote: > Hello. > > On 07/20/2015 09:15 PM, Krzysztof Opasiak wrote: > > >According to mass storage specification: > > >"Logical Unit Numbers on the device shall be numbered contiguously > > starting from LUN 0 to a maximum LUN of 15 (Fh

Re: [PATCH 1/1] usb: chipidea: ehci_init_driver is intended to call one time

2015-07-21 Thread Alan Stern
On Tue, 21 Jul 2015, Peter Chen wrote: > The ehci_init_driver is used to initialize hcd APIs for each > ehci controller driver, it is designed to be called only one time > and before driver register is called. The current design will > cause ehci_init_driver is called multiple times at probe proce

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Peter Hurley
Hi Sven, On 07/21/2015 05:18 AM, Johan Hovold wrote: > On Mon, Jul 20, 2015 at 08:07:33PM +0200, Sven Brauch wrote: >> On 20/07/15 19:25, Johan Hovold wrote: > >>> The idea of adding another layer of buffering in the cdc-acm driver has >>> been suggested in the past but was rejected (or at least

Re: [PATCH v3 07/46] usb: dwc3: gadget: add ep capabilities support

2015-07-21 Thread Felipe Balbi
Hi, On Wed, Jul 15, 2015 at 08:31:54AM +0200, Robert Baldyga wrote: > Convert endpoint configuration to new capabilities model. > > Signed-off-by: Robert Baldyga > --- > drivers/usb/dwc3/gadget.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/drivers/usb/dwc3/gadget.c

Re: [PATCH v5 0/6] usb: interface authorization

2015-07-21 Thread Greg KH
On Tue, Jul 21, 2015 at 02:22:20PM +0200, Stefan Koch wrote: > Am Montag, den 29.06.2015, 15:41 -0700 schrieb Greg KH: > > On Mon, Jun 29, 2015 at 11:23:47PM +0200, Stefan Koch wrote: > > > Am Donnerstag, den 18.06.2015, 13:30 -0400 schrieb Alan Stern: > > > > On Thu, 18 Jun 2015, Stefan Koch wrote

Re: xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 2 comp_code 1

2015-07-21 Thread Mathias Nyman
On 20.07.2015 23:13, Arkadiusz Miskiewicz wrote: > On Saturday 18 of July 2015, Arkadiusz Miskiewicz wrote: >> Hi. >> >> I'm on 4.2.0-rc2-00077-gf760b87 kernel and while trying to copy some file >> from usb storage (sata disk behind sata-usb bridge or pendrive; hapens in >> both cases) copying proc

[PATCH] usb: dwc3: Reset the transfer resource index on SET_INTERFACE

2015-07-21 Thread Felipe Balbi
From: John Youn This fixes an issue introduced in commit b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would only use DEPSTARTCFG once per SetConfig. The trick is that we should use one DEPSTARTCFG per SetConfig *OR* SetInterface. SetInterface was completely

[PATCH] usb: dwc3: Reset the transfer resource index on SET_INTERFACE

2015-07-21 Thread Felipe Balbi
From: John Youn This fixes an issue introduced in commit b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would only use DEPSTARTCFG once per SetConfig. The trick is that we should use one DEPSTARTCFG per SetConfig *OR* SetInterface. SetInterface was completely

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-21 Thread Oliver Neukum
On Mon, 2015-07-20 at 21:13 +0300, Eugene Shatokhin wrote: > And here, the code clears EVENT_RX_KILL bit in dev->flags, which may > execute concurrently with the above operation: > #0 clear_bit (bitops.h:113, inlined) > #1 usbnet_bh (usbnet.c:1475) > /* restart RX again after disabling due

[PATCH 3/7] usb: xhci: Bugfix for NULL pointer deference in xhci_endpoint_init() function

2015-07-21 Thread Mathias Nyman
From: AMAN DEEP virt_dev->num_cached_rings counts on freed ring and is not updated correctly. In xhci_free_or_cache_endpoint_ring() function, the free ring is added into cache and then num_rings_cache is incremented as below: virt_dev->ring_cache[rings_cached] =

[PATCH 6/7] xhci: prevent bus_suspend if SS port resuming in phase 1

2015-07-21 Thread Mathias Nyman
From: Zhuang Jin Can When the link is just waken, it's in Resume state, and driver sets PLS to U0. This refers to Phase 1. Phase 2 refers to when the link has completed the transition from Resume state to U0. With the fix of xhci: report U3 when link is in resume state, it also exposes an issue

[PATCH 4/7] xhci: Calculate old endpoints correctly on device reset

2015-07-21 Thread Mathias Nyman
From: Brian Campbell When resetting a device the number of active TTs may need to be corrected by xhci_update_tt_active_eps, but the number of old active endpoints supplied to it was always zero, so the number of TTs and the bandwidth reserved for them was not updated, and could rise unnecessaril

[PATCH 2/7] xhci: Workaround to get D3 working in Intel xHCI

2015-07-21 Thread Mathias Nyman
From: Rajmohan Mani The xHCI in Intel CherryView / Braswell Platform requires a driver workaround to get xHCI D3 working. Without this workaround, xHCI might not enter D3. Workaround is to configure SSIC PORT as "unused" before D3 entry and "used" after D3 exit. This is done through a vendor spe

[PATCH 5/7] xhci: report U3 when link is in resume state

2015-07-21 Thread Mathias Nyman
From: Zhuang Jin Can xhci_hub_report_usb3_link_state() returns pls as U0 when the link is in resume state, and this causes usb core to think the link is in U0 while actually it's in resume state. When usb core transfers control request on the link, it fails with TRB error as the link is not ready

[PATCH 0/7] xhci fixes for 4.2 rc

2015-07-21 Thread Mathias Nyman
Hi Greg These xhci fixes for 4.2-rc4 are mostly powermanagement related. Fixing xhci SuperSpeed port resume state issues, and Intel Braswell xhci specific D3 issues. A couple other fixes correcting software TT bandwidth calculation, and a fix for a "off by one" ring cache issue that caused NULL p

[PATCH 1/7] xhci: call BIOS workaround to enable runtime suspend on Intel Braswell

2015-07-21 Thread Mathias Nyman
Intel xhci hw that require XHCI_PME_STUCK quirk have as default disabled xhci from going to D3 state in runtime suspend. Driver needs to verify it can deal with the hw by calling an ACPI _DSM method to get D3 enabled. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 17

[PATCH 7/7] xhci: do not report PLC when link is in internal resume state

2015-07-21 Thread Mathias Nyman
From: Zhuang Jin Can Port link change with port in resume state should not be reported to usbcore, as this is an internal state to be handled by xhci driver. Reporting PLC to usbcore may cause usbcore clearing PLC first and port change event irq won't be generated. Cc: Signed-off-by: Zhuang Jin

Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver

2015-07-21 Thread Yann Cantin
Hi, Le 21/07/2015 00:40, Greg KH a écrit : On Mon, Jul 20, 2015 at 03:26:40PM -0700, Dmitry Torokhov wrote: On Mon, Jul 20, 2015 at 02:59:56PM -0700, Greg KH wrote: On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: Signed-off-by: Yann Cantin + + /* sysfs setup */ +

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Oliver Neukum
On Mon, 2015-07-20 at 20:07 +0200, Sven Brauch wrote: > On 20/07/15 19:25, Johan Hovold wrote: > > What kernel version are you using? > I'm using linux 4.1.2. > > > The idea of adding another layer of buffering in the cdc-acm driver has > > been suggested in the past but was rejected (or at least

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-21 Thread Oliver Neukum
On Mon, 2015-07-20 at 21:13 +0300, Eugene Shatokhin wrote: > Races on dev->rx_qlen. Reproduced these by repeatedly changing MTU > (1500 > <-> 1400) while downloading large files. Hi, I don't see how it matters much. The number of buffers is just an optimization. As long as it eventually is corre

Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver

2015-07-21 Thread Yann Cantin
Hi, Le 21/07/2015 10:19, Oliver Neukum a écrit : On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote: diff --git a/drivers/input/misc/ebeam.c b/drivers/input/misc/ebeam.c new file mode 100644 index 000..79cac51 --- /dev/null +++ b/drivers/input/misc/ebeam.c +/* Electronics For Imaging

Re: [PATCH v5 0/6] usb: interface authorization

2015-07-21 Thread Stefan Koch
Am Montag, den 29.06.2015, 15:41 -0700 schrieb Greg KH: > On Mon, Jun 29, 2015 at 11:23:47PM +0200, Stefan Koch wrote: > > Am Donnerstag, den 18.06.2015, 13:30 -0400 schrieb Alan Stern: > > > On Thu, 18 Jun 2015, Stefan Koch wrote: > > > > > > > This patch introduces an interface authorization for

Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver

2015-07-21 Thread Yann Cantin
Hi, Le 20/07/2015 23:59, Greg KH a écrit : On Mon, Jul 20, 2015 at 11:03:19PM +0200, Yann Cantin wrote: diff --git a/Documentation/ABI/testing/sysfs-driver-ebeam b/Documentation/ABI/testing/sysfs-driver-ebeam +++ b/Documentation/ABI/testing/sysfs-driver-ebeam @@ -0,0 +1,53 @@ +What: /

Re: Several races in "usbnet" module (kernel 4.1.x)

2015-07-21 Thread Oliver Neukum
On Mon, 2015-07-20 at 21:13 +0300, Eugene Shatokhin wrote: > Hi, > > I have recently found several data races in "usbnet" module, checked on > vanilla kernel 4.1.0 on x86_64. The races do actually happen, I have > confirmed it by adding delays and using hardware breakpoints to detect > the conf

Re: [PATCH v3 07/11] usb: otg: add OTG core

2015-07-21 Thread Li Jun
Hi, [...] > >> + otg_timer_init(A_WAIT_ENUM, otgd, set_tmout, TB_SRP_FAIL, NULL); > > > > 2 timers are missing: B_DATA_PLS, B_SSEND_SRP. > > Those 2 are not used by usb-otg-fsm.c. We can add it when usb-otg-fsm.c is > updated. > ok. > > > >> +} [...] > >> + > >> +/** > >> + * OTG FSM op

Re: [PATCH v3 0/5] ARM: dts: OMAP2+: Enable USB dual-role on supported boards

2015-07-21 Thread Tony Lindgren
* Roger Quadros [150708 03:45]: > Hi, > > Enables dual-role feaure on supported boards. > > Depends on > [1] - core USB DRD support - > http://thread.gmane.org/gmane.linux.kernel/1991413 > [2] - dwc3 DRD support - > http://thread.gmane.org/gmane.linux.usb.general/127890 Is this series safe to

Re: [PATCH] Fix data loss in cdc-acm

2015-07-21 Thread Johan Hovold
On Mon, Jul 20, 2015 at 08:07:33PM +0200, Sven Brauch wrote: > On 20/07/15 19:25, Johan Hovold wrote: > > The idea of adding another layer of buffering in the cdc-acm driver has > > been suggested in the past but was rejected (or at least questioned). > > See for example this thread: > > > >

Re: [RFC ebeam PATCH 2/2] input: misc: New USB eBeam input driver

2015-07-21 Thread Oliver Neukum
On Mon, 2015-07-20 at 23:03 +0200, Yann Cantin wrote: > Signed-off-by: Yann Cantin > --- > Documentation/ABI/testing/sysfs-driver-ebeam | 53 ++ > drivers/input/misc/Kconfig | 22 + > drivers/input/misc/Makefile | 1 + > drivers/input/misc/ebeam.c