Re: [PATCH v2 06/14] USB: ch341: reinitialize chip on reconfiguration

2016-04-10 Thread Clemens Ladisch
Grigori Goronzy wrote: > Changing the LCR register after initialization does not seem to be > reliable on all chips (particularly not on CH341A). Restructure > initialization and configuration to always reinit the chip on > configuration changes instead and pass the LCR register value directly >

Re: [PATCH v5 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-04-10 Thread Hans de Goede
Hi, On 10-04-16 00:44, kbuild test robot wrote: Hi Reinder, [auto build test ERROR on robh/for-next] [also build test ERROR on v4.6-rc2 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] As mentioned in the cover letter, these

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Alan Stern
On Sun, 10 Apr 2016, Sam Sany wrote: > Alan Stern writes: > > > > > On Sat, 9 Apr 2016, Sam Sany wrote: > > > --- usb-3.15.orig/drivers/usb/core/hub.c > > +++ usb-3.15/drivers/usb/core/hub.c > > -130,6 +130,8 struct usb_hub > *usb_hub_to_struct_hub(st > > > > static

Re: [PATCH v7 1/4] gadget: Introduce the usb charger framework

2016-04-10 Thread Pavel Machek
Hi! > > It's your HW :-) You tell me if it's really necessary. But, hey, if you > > get enumerated @500mA, this is the host telling you it _CAN_ give you > > 500mA. In that case, why wouldn't you ? Dunno, perhaps not to drain battery in host too quickly? Or perhaps you are charging from external

Re: [PATCH v7 1/4] gadget: Introduce the usb charger framework

2016-04-10 Thread Pavel Machek
Hi! > >>> +#define DEFAULT_SDP_CUR_LIMIT(500 - DEFAULT_CUR_PROTECT) > >> > >> According to the spec we should always be talking about unit loads (1 > >> unit load is 100mA for HS/FS/LS and 150mA for SS). Also, this will not > >> work for SS capable ports and SS gadgets (we have quite a

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

2016-04-10 Thread Janna Martl
On 2016-04-04 9:06:28, Olliver Schinagl wrote: > Hi list, > > I have a Apple Inc. MacBookPro11,1 (with the most recent 'bios': BIOS > MBP111.88Z.0138.B16.1509081438 09/08/2015). > At the beginning, USB worked normally. After a while (and after newer kernel > versions released by debian?) things

Re: [PATCH] phy: bcm-ns-usb2: new driver for USB 2.0 PHY on Northstar

2016-04-10 Thread Rafał Miłecki
On 5 April 2016 at 21:34, Jon Mason wrote: > On Wed, Mar 30, 2016 at 5:32 PM, Jon Mason wrote: >> On Tue, Mar 29, 2016 at 10:01 AM, Rafał Miłecki wrote: >>> Northstar is a family of SoCs used in home routers. They have USB 2.0

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Sam Sany
Alan Stern writes: > > On Sun, 10 Apr 2016, Sam Sany wrote: > > > Alan Stern ...> writes: > > > > > > > > On Sat, 9 Apr 2016, Sam Sany wrote: > > > > > --- usb-3.15.orig/drivers/usb/core/hub.c > > > +++ usb-3.15/drivers/usb/core/hub.c > > > -130,6 +130,8 struct

Re: [PATCH] phy: phy-mt65xx-usb3: add support for mt2701 platform

2016-04-10 Thread chunfeng yun
On Fri, 2016-04-08 at 15:57 +0200, Matthias Brugger wrote: > > On 08/04/16 11:13, Chunfeng Yun wrote: > > A new compatible string, "mediatek,mt2701-u3phy", is added. > > > > Some register settings to avoid RX sensitivity level degradation > > which may arise on mt8173 platform are separated from

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Alan Stern
On Sun, 10 Apr 2016, Peter Hurley wrote: > On 04/09/2016 08:00 AM, Alan Stern wrote: > > On Sat, 9 Apr 2016, Sam Sany wrote: > >> I have yet to try the 4.5 kernel. I prefer to use a low-latency kernel, > >> bc > >> the primary purpose of this machine is recording music. So I have been > >>

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Sam Sany
Alan Stern writes: > > On Sun, 10 Apr 2016, Peter Hurley wrote: > > > On 04/09/2016 08:00 AM, Alan Stern wrote: > > > On Sat, 9 Apr 2016, Sam Sany wrote: > > >> I have yet to try the 4.5 kernel. I prefer to use a low-latency kernel, bc > > >> the primary purpose of this machine

RE: [PATCH v10 1/4] gadget: Introduce the usb charger framework

2016-04-10 Thread Jun Li
Hi > -Original Message- > From: Baolin Wang [mailto:baolin.w...@linaro.org] > Sent: Friday, April 08, 2016 7:51 PM > To: Jun Li > Cc: ba...@kernel.org; gre...@linuxfoundation.org; s...@kernel.org; > dbarysh...@gmail.com; dw...@infradead.org; peter.c...@freescale.com; >

Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence

2016-04-10 Thread chunfeng yun
On Fri, 2016-04-08 at 07:07 -0700, Greg Kroah-Hartman wrote: > On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote: > > NULL pointer dereferrence will happen when class driver > > wants to allocate zero length buffer and pool_max[0] > > can't be used, so skip reserved pool in this case. >

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Sam Sany
Sam Sany writes: No go. Just booted into the newly compiled kernel, and I still have the exact same symptoms. The edited portion of the hub.c file I used to compile looks as such: int usb_device_supports_lpm(struct usb_device *udev) { return 0; /* USB 2.1

RE: [PATCH] usb: xhci: Fix incomplete PM resume operation due to XHCI commmand timeout

2016-04-10 Thread Rajesh Bhagat
> -Original Message- > From: Mathias Nyman [mailto:mathias.ny...@linux.intel.com] > Sent: Friday, April 01, 2016 4:20 PM > To: Rajesh Bhagat > Cc: gre...@linuxfoundation.org; linux-usb@vger.kernel.org; linux- > ker...@vger.kernel.org; Sriram Dash

Re: [PATCH v3 08/13] USB: ch341: add support for RTS/CTS flow control

2016-04-10 Thread kbuild test robot
Hi Grigori, [auto build test ERROR on v4.5-rc7] [cannot apply to usb/usb-testing usb-serial/usb-next v4.6-rc2 v4.6-rc1 next-20160408] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url:

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Sam Sany
Sam Sany writes: Since the dmesg output always prints "usb_set_interface failed" could it have something to do with the portions of the hub.c file that deal with those functions? It only occurs twice through out the hub.c file... -- To unsubscribe from this list: send the

Re: PROBLEM: Mouse connected to USB-3 stopped working 2.6.38->39 regression

2016-04-10 Thread Peter Hurley
On 04/09/2016 08:00 AM, Alan Stern wrote: > On Sat, 9 Apr 2016, Sam Sany wrote: >> I have yet to try the 4.5 kernel. I prefer to use a low-latency kernel, bc >> the primary purpose of this machine is recording music. So I have been >> downloading the newest source code available in the Ubuntu

[PATCH v3 06/13] USB: ch341: add support for parity, frame length, stop bits

2016-04-10 Thread Grigori Goronzy
With the new reinitialization method, configuring parity, different frame lengths and different stop bit settings work as expected on both CH340G and CH341A. This has been extensively tested with a logic analyzer. v2: only set mark/space when parity is enabled, simplifications, patch termios HW

[PATCH v3 01/13] USB: ch341: fix error handling on resume

2016-04-10 Thread Grigori Goronzy
This may fail, do not assume it always works. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index c73808f..63df8ce 100644 ---

[PATCH v3 02/13] USB: ch341: add LCR register definitions

2016-04-10 Thread Grigori Goronzy
BREAK2 seems to be a misnomer, the register configures various aspects of the UART configuration. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/ch341.c

[PATCH v3 04/13] USB: ch341: fix USB buffer allocations

2016-04-10 Thread Grigori Goronzy
Use the correct types and sizes. v2: use u8 shorthand for unsigned char. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index

[PATCH v3 07/13] USB: ch341: add debug output for chip version

2016-04-10 Thread Grigori Goronzy
There are at least two hardware revisions, this may be helpful in case compatibility issues need to be debugged. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/ch341.c

[PATCH v3 09/13] USB: ch341: fix coding style

2016-04-10 Thread Grigori Goronzy
No functional change. The following adjustments were made to be more in line with official coding style and to be more consistent. Stop mixing tabs and spaces for alignment. Stop putting labels and statements into the same line. Use braces consistently for a single statement. v2: drop most

[PATCH v3 12/13] USB: ch341: get rid of default configuration

2016-04-10 Thread Grigori Goronzy
If the serial port hasn't been opened yet, no baud rate should be set and RTS/DTR need to be deasserted. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/usb/serial/ch341.c

[PATCH v3 11/13] USB: ch341: improve B0 handling

2016-04-10 Thread Grigori Goronzy
Check for B0 in a more idiomatic way and make sure to not enable RTS/CTS hardware flow control in B0 as it may override the control lines. Also make sure to only enable RTS/DTR if there's a transition from B0. v2: use c_cflag macros. Signed-off-by: Grigori Goronzy ---

[PATCH v3 05/13] USB: ch341: reinitialize chip on reconfiguration

2016-04-10 Thread Grigori Goronzy
Changing the LCR register after initialization does not seem to be reliable on all chips (particularly not on CH341A). Restructure initialization and configuration to always reinit the chip on configuration changes instead and pass the LCR register value directly to the initialization command.

[PATCH v3 03/13] USB: ch341: add definitions for modem control

2016-04-10 Thread Grigori Goronzy
Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 1ab4384..db4b561 100644 --- a/drivers/usb/serial/ch341.c +++

[PATCH v3 10/13] USB: ch341: clean up messages

2016-04-10 Thread Grigori Goronzy
No functional change. Remove explicit function name printing, it's easy to use dynamic debug to print it every time, if required. Fix capitalization and phrasing in some cases. Drop useless information like a USB buffer pointer, which is not helpful. Signed-off-by: Grigori Goronzy

[PATCH v3 08/13] USB: ch341: add support for RTS/CTS flow control

2016-04-10 Thread Grigori Goronzy
v2: use correct flag variable. Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 94e6016..135370b 100644 --- a/drivers/usb/serial/ch341.c

[PATCH v3 13/13] USB: ch341: implement tx_empty callback

2016-04-10 Thread Grigori Goronzy
The status bit was found with USB captures of the Windows driver and some luck. Tested on CH340G and CH341A. v2: unify general status definitions Signed-off-by: Grigori Goronzy --- drivers/usb/serial/ch341.c | 26 +- 1 file changed, 21 insertions(+),

Major improvements to the ch341 driver v3

2016-04-10 Thread Grigori Goronzy
Hi, here's a revised v3 of my ch341 patchset sent earlier this month. Thanks to everyone who provided feedback. Changes compared to the last submission have been indicated in the commit messages. Please review. Best regards Grigori -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCHv2 / RESEND 2/2] usb: storage: scsiglue: limit USB3 devices to 2048 sectors

2016-04-10 Thread Felipe Balbi
Alan Stern writes: > On Fri, 8 Apr 2016, Felipe Balbi wrote: > >> > Aside from the multi-line comment formatting, you should avoid adding a >> >> I can fix the multiline comment style, but I'm merely following what's >> already in the file. What do people prefer in

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

2016-04-10 Thread Felipe Balbi
Hi, Janna Martl writes: > On 2016-04-04 9:06:28, Olliver Schinagl wrote: >> Hi list, >> >> I have a Apple Inc. MacBookPro11,1 (with the most recent 'bios': BIOS >> MBP111.88Z.0138.B16.1509081438 09/08/2015). >> At the beginning, USB worked normally. After a while

Re: [PATCH] drivers/usb/gadget/udc/r8a66597-udc.c: Deinline pipe_change, save 2176 bytes

2016-04-10 Thread Felipe Balbi
Hi, Denys Vlasenko writes: > This function compiles to 298 bytes of machine code, has ~10 callsites. fair enough > This is a USB 2.0 device, USB 2.0 is limited to 35 MB/s, so should be it's not limited to 35MB/sec, sorry. USB 2.0 has a theoretical maximum of 60MB/sec.

Re: USB xHCI regression after upgrading from kernel 3.19.0-51 to 4.2.0-34.]

2016-04-10 Thread Felipe Balbi
Hi, Matthew Giassa writes: > *Migrating from linux-media mailing list. > > Good day, > > I maintain an SDK for USB2.0 and USB3.0 U3V machine vision cameras, and > several of our customers have reported severe issues since upgrading > from > kernel 3.19.0-51 (Ubuntu 14.04.3

Re: [PATCH] usb: core: buffer: avoid NULL pointer dereferrence

2016-04-10 Thread Felipe Balbi
Hi, chunfeng yun writes: > On Fri, 2016-04-08 at 07:07 -0700, Greg Kroah-Hartman wrote: >> On Fri, Apr 08, 2016 at 05:08:03PM +0800, Chunfeng Yun wrote: >> > NULL pointer dereferrence will happen when class driver >> > wants to allocate zero length buffer and

Re: [PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-10 Thread Felipe Balbi
Hi, John Youn writes: > Set the reserved fields of the SuperSpeed Plus Device Capability > descriptor to 0. Otherwise there might be stale data there which will > cause USB CV to fail. > > Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") >