Re: [PATCH] phy: cpcap-usb: Fix missing return statement

2017-06-15 Thread Kishon Vijay Abraham I
On Monday 12 June 2017 01:42 PM, Tony Lindgren wrote: > Commit 8ae904e3c236 ("phy: cpcap-usb: Add CPCAP PMIC USB support") > is missing return statement as noted by Colin Ian King > . If the optional pins are not configured, > we just want to return early and not

RE: [PATCH net-next v2 0/2] r8152: adjust runtime suspend/resume

2017-06-15 Thread Hayes Wang
David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, June 14, 2017 1:02 AM > > v2: > > For #1, replace GFP_KERNEL with GFP_NOIO for usb_submit_urb(). > > > > v1: > > Improve the flow about runtime suspend/resume and make the code > > easy to read. > > Series applied. Excuse me. I don't

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 10:12 PM, Alan Stern wrote: > On Thu, 15 Jun 2017, Kai-Heng Feng wrote: > >> On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: >> > >> > The lspci output [1] shows: >> > >> > 00:12.0 USB controller: Advanced Micro

Re: [PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread Ian Pilcher
On 06/15/2017 03:17 PM, Greg KH wrote: wait_usec is a count here: Well ... I was trying to convert it into a parameter that was less confusing. I've eliminated it in "suggestion v2" below. You aren't sleeping any :( Oh $DIETY! Always return real error codes, never make up random

Re: [PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread Greg KH
On Thu, Jun 15, 2017 at 02:59:35PM -0500, Ian Pilcher wrote: > On 06/15/2017 01:58 AM, Jiahau Chang wrote: > > +void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) > > +{ > > + unsigned char value; > > + unsigned long wait_time_count; > > + > > + /*check device can accept command*/ > >

Re: [PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread Ian Pilcher
On 06/15/2017 01:58 AM, Jiahau Chang wrote: +void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev) +{ + unsigned char value; + unsigned long wait_time_count; + + /*check device can accept command*/ + wait_time_count = 1000; + while (wait_time_count) { +

Re: [PATCH net-next 0/3] r8152: support new chips

2017-06-15 Thread David Miller
From: Hayes Wang Date: Thu, 15 Jun 2017 14:44:01 +0800 > These patches are used to support new chips. Series applied, thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH v3 1/2] usb: typec: Add support for UCSI interface

2017-06-15 Thread Guenter Roeck
On Mon, Jun 12, 2017 at 05:40:08PM +0300, Heikki Krogerus wrote: > 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

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-15 Thread Benjamin Tissoires
On Jun 15 2017 or thereabouts, Jiri Kosina wrote: > On Tue, 13 Jun 2017, Benjamin Tissoires wrote: > > > BTW, the merge with your for-next branch is going to be tricky :( > > I've just pushed the for-next merge. Second/third pair of eyes (scripted > eyes even better :) ) would be appreciated. >

Re: [PATCH v2 1/8] tty: add a poll() callback in struct tty_operations

2017-06-15 Thread Tal Shorer
On Wed, Jun 14, 2017 at 4:33 PM, Alan Cox wrote: >> That would cut it, but TIOCPKT is too coupled with having a linked tty. >> I could make acm behave like a pty (accept TIOCPKT and issue the >> ctrl_status bits), but for that I need n_tty to know that packet does >>

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Alan Stern
On Thu, 15 Jun 2017, Kai-Heng Feng wrote: > On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: > > > > The lspci output [1] shows: > > > > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI > > Controller (rev 39) (prog-if 20 [EHCI]) > >

Re: Gadget driver ->disconnect callback during unbinding

2017-06-15 Thread Alan Stern
On Thu, 15 Jun 2017, Peter Chen wrote: > > > No, ->pullup is expected to be called from UDC core, and the UDC core > > > makes sure the coming ->disconnect at kinds of situations. > > > > I think you are wrong. The UDC core calls ->pullup from the > > usb_gadget_disconnect() routine, but it

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Bjorn Helgaas
On Thu, Jun 15, 2017 at 03:02:25PM +0800, Kai-Heng Feng wrote: > On Thu, Jun 15, 2017 at 2:55 AM, Alan Stern wrote: > > On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > > > >> [+cc Rafael, linux-pm] > >> > >> On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: >

Re: Oddity with EP configuration

2017-06-15 Thread Benjamin Herrenschmidt
On Thu, 2017-06-15 at 14:13 +0300, Felipe Balbi wrote: > > I don't have a clear idea of the best approach for this problem.  > > Perhaps Felipe will suggest something. > > I wonder if introducing the idea of "gadget ports" would be better > here. It might be simpler to implement a single gadget

Re: Oddity with EP configuration

2017-06-15 Thread Felipe Balbi
Hi, Alan Stern writes: >> > I think the problem is that you misunderstand how epautoconf is >> > intended to work. >> > >> > I'm not the expert on this stuff -- Felipe is.  Still, as best I >> > understand, the idea is that a gadget driver or the composite core will

Re: [PATCH] HID: let generic driver yield control iff specific driver has been enabled (was Re: Two regressions on BYT/T ASUS T100TA 4.12-rc: #2 Keyboard no longer works)

2017-06-15 Thread Jiri Kosina
On Tue, 13 Jun 2017, Benjamin Tissoires wrote: > BTW, the merge with your for-next branch is going to be tricky :( I've just pushed the for-next merge. Second/third pair of eyes (scripted eyes even better :) ) would be appreciated. Thanks, -- Jiri Kosina SUSE Labs -- To unsubscribe from

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-15 Thread Peter Chen
On Thu, Jun 15, 2017 at 11:35:20AM +0200, Ulf Hansson wrote: > On 15 June 2017 at 11:11, Peter Chen wrote: > > On Thu, Jun 15, 2017 at 10:11:45AM +0200, Ulf Hansson wrote: > >> > Yes, you are right. This is the limitation for this power sequence > >> > library, the

Re: [PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread kbuild test robot
Hi Jiahau, [auto build test ERROR on usb/usb-testing] [also build test ERROR on v4.12-rc5 next-20170615] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jiahau-Chang/xhci-Bad-Ethernet

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-15 Thread Ulf Hansson
On 15 June 2017 at 11:11, Peter Chen wrote: > On Thu, Jun 15, 2017 at 10:11:45AM +0200, Ulf Hansson wrote: >> > Yes, you are right. This is the limitation for this power sequence >> > library, the registration for the 1st power sequence instance must >> > be finished before

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-15 Thread Peter Chen
On Thu, Jun 15, 2017 at 10:11:45AM +0200, Ulf Hansson wrote: > > Yes, you are right. This is the limitation for this power sequence > > library, the registration for the 1st power sequence instance must > > be finished before device driver uses it. I am appreciated that > > you can supply some

[PATCH] usb: gadget: bdc: 64-bit pointer capability check

2017-06-15 Thread Srinath Mannam
Corrected the register to check the 64-bit pointer capability state. 64-bit pointer implementation capability was checking in wrong register, which causes the BDC enumeration failure in 64-bit memory address. Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller

[PATCH 8/8] xhci: cleanup finish_td() skip option

2017-06-15 Thread Mathias Nyman
finish_td() could be called with a skip option to bypass most of the function and only call xhci_td_cleanup() at the end. Remove this skip option and call xhci_td_cleanup() directly instead when needed No functional changes Signed-off-by: Mathias Nyman ---

[PATCH 0/8] xhci features for usb-next

2017-06-15 Thread Mathias Nyman
Hi Greg In addition to xhci transfer event handling changes, this series also removes unnecessary Link PM on/off toggling at suspend and resume in usb core/hub.c Thanks Mathias Mathias Nyman (8): usb: Avoid unnecessary LPM enabling and disabling during suspend and resume xhci: remove

[PATCH 4/8] xhci: Add support for endpoint soft reset

2017-06-15 Thread Mathias Nyman
xhci supports soft retry recovery when the host halted the host side of an endopint but the connected USB device is not aware of the halt. In this case xhci needs to issue a reset endopint command with a TSP (Transfer State Preserve) flag set which preserves the Data toggle and Sequence number

[PATCH 5/8] xhci: support calling cleanup_halted_endpoint with soft retry

2017-06-15 Thread Mathias Nyman
Add soft reset support to cleanup_halted_endpoint(). using soft reset will prevent it from setting a new dequeue pointer to start the transfer from. Let it continue where it halted. Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 16

[PATCH 7/8] xhci: cleanup virtual endoint structure, remove stopped_stream

2017-06-15 Thread Mathias Nyman
Get rid of stopped_stream member in virtual endpoint structure as it is only used in one case when cleaning a halted endpoint. Pass it as function parameter instead. No functional changes Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 7 ++-

[PATCH 1/8] usb: Avoid unnecessary LPM enabling and disabling during suspend and resume

2017-06-15 Thread Mathias Nyman
The original motivation for disabling/enabling Link PM at device suspend/resume was to force link state to go via U0 before suspend sets the link state to U3. Going directly from U2 to U3 is not allowed. Disabling LPM will forced the link state to U0, but will send a lot of Set port feature

[PATCH 6/8] xhci: handle transfer events without TRB pointer

2017-06-15 Thread Mathias Nyman
Most transfer events have a TRB pointer indicating which TRB caused the event. In the case of streams, transfer events such as USB Transaction error may have its TRB pointer set to zero. driver won't know which stream or what TRB on that stream caused the error, but it can issue a soft reset to

[PATCH 3/8] xhci: refactor transfer event errors and completion codes

2017-06-15 Thread Mathias Nyman
Parse the transfer event first, and remove duplicate debugging code. Reorder completion codes according to endpoint state. No functional changes We are not handling some transfer events correcly and need to clean up this before fixing it Signed-off-by: Mathias Nyman

[PATCH 2/8] xhci: remove endpoint ring cache

2017-06-15 Thread Mathias Nyman
Anurag Kumar Vulisha reported several issues with xhci endpoint ring caching. 31 Rings are cached per device before a ring is freed. These cached rings are not used as default if a new ring is needed. They are only used if the driver fails to allocate memory for a ring. The current ring cache is

[RFC/PATCH] usb/gadget: Add driver for Aspeed SoC virtual hub

2017-06-15 Thread Benjamin Herrenschmidt
[ This is marked RFC as it depends on the RFC patch I posted earlier adding the EP dispose() callback, and while I welcome reviews already on the overall driver structure and operations, there are a few HW bits notably around suspend/resume and request cancellation that I'm still trying to

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-15 Thread Ulf Hansson
On 15 June 2017 at 08:58, Peter Chen wrote: > On Wed, Jun 14, 2017 at 10:53:29AM +0200, Ulf Hansson wrote: >> On 14 June 2017 at 03:53, Peter Chen wrote: >> > On Tue, Jun 13, 2017 at 12:24:42PM +0200, Ulf Hansson wrote: >> >> [...] >> >> >> >> > + >>

Re: [PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread Greg KH
On Thu, Jun 15, 2017 at 02:58:21PM +0800, Jiahau Chang wrote: > When USB Ethernet is plugged in ASMEDIA ASM1042A xHCI host, bad > performance was manifesting in Web browser use (like download > large file such as ISO image). It is known limitation of > ASM1042A that is not compatible with driver

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Thu, Jun 15, 2017 at 2:55 AM, Alan Stern wrote: > On Tue, 13 Jun 2017, Bjorn Helgaas wrote: > >> [+cc Rafael, linux-pm] >> >> On Tue, Jun 13, 2017 at 12:21:15PM +0800, Kai-Heng Feng wrote: >> > On Mon, Jun 12, 2017 at 10:18 PM, Alan Stern

Re: [PATCH v15 2/7] power: add power sequence library

2017-06-15 Thread Peter Chen
On Wed, Jun 14, 2017 at 10:53:29AM +0200, Ulf Hansson wrote: > On 14 June 2017 at 03:53, Peter Chen wrote: > > On Tue, Jun 13, 2017 at 12:24:42PM +0200, Ulf Hansson wrote: > >> [...] > >> > >> > + > >> > +/** > >> > + * of_pwrseq_on - Carry out power sequence on for device

[PATCH v3] xhci: Bad Ethernet performance plugged in ASM1042A host

2017-06-15 Thread Jiahau Chang
When USB Ethernet is plugged in ASMEDIA ASM1042A xHCI host, bad performance was manifesting in Web browser use (like download large file such as ISO image). It is known limitation of ASM1042A that is not compatible with driver scheduling, As a workaround we can modify flow control handling of

Re: [PATCH] usb: host: ehci: workaround PME bug on AMD EHCI controller

2017-06-15 Thread Kai-Heng Feng
On Wed, Jun 14, 2017 at 1:28 AM, Bjorn Helgaas wrote: > > The lspci output [1] shows: > > 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI > Controller (rev 39) (prog-if 20 [EHCI]) > Capabilities: [c0] Power Management version 2 > Flags:

[PATCH net-next 0/3] r8152: support new chips

2017-06-15 Thread Hayes Wang
These patches are used to support new chips. Hayes Wang (3): r8152: support new chip 8050 r8152: support RTL8153B r8152: add byte_enable for ocp_read_word function drivers/net/usb/r8152.c | 687 ++-- 1 file changed, 671 insertions(+), 16

[PATCH net-next 1/3] r8152: support new chip 8050

2017-06-15 Thread Hayes Wang
The settings of the new chip are the same with RTL8152, except that its product ID is 0x8050. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index

[PATCH net-next 3/3] r8152: add byte_enable for ocp_read_word function

2017-06-15 Thread Hayes Wang
Add byte_enable for ocp_read_word() to replace reading 4 bytes data with reading the desired 2 bytes data. This is used to avoid the issue which is described in commit b4d99def0938 ("r8152: remove sram_read"). The original method always reads 4 bytes data, and it may have problem when reading the

[PATCH net-next 2/3] r8152: support RTL8153B

2017-06-15 Thread Hayes Wang
This patch supports two new chips for RTL8153B. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 673 ++-- 1 file changed, 658 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c