[PATCH 2/2 v5 RESEND] sierra_net: keep status interrupt URB active

2013-04-29 Thread Dan Williams
dication can be received even if the netdev is closed, which is the case right after device insertion. If the Reset indication is not received by the driver, it continues sending SYNC messages to the firmware, which crashes about 10 seconds later and the device stops responding. Signed-off-b

Re: [PATCH] Add Telewell TW-LTE 4G to option driver

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 07:53 +0200, Teppo Kotilainen wrote: > I've been testing this device for some time and it seems to work fine. > > some information about the device: > https://telewell.fi/en/product/3g4glte-products/TW-LTE4G/tw-lte-4g3g-modem > > Acked-By: Matthias Urlichs While you're at

[PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
A rebranded Novatel E371 for AT&T's LTE bands. Cc: Signed-off-by: Dan Williams --- See https://bugzilla.redhat.com/show_bug.cgi?id=955426 diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index 57136dc..299c53b 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/driver

Re: [PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 20:33 +0200, Bjørn Mork wrote: > Dan Williams writes: > > > A rebranded Novatel E371 for AT&T's LTE bands. > > I don't think we're handling the Novatel branded E371 yet? I tried > googling for ID of that, but were unable to f

Re: [PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 14:42 -0400, David Miller wrote: > From: Bjørn Mork > Date: Wed, 01 May 2013 20:33:10 +0200 > > > Dan Williams writes: > > > >> A rebranded Novatel E371 for AT&T's LTE bands. > > > > I don't think we're handli

Re: [PATCH 1/2 v5 RESEND] usbnet: allow status interrupt URB to always be active

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 14:54 -0400, David Miller wrote: > > For a patch set that you've submitted 5 times, I'm incredibly > surprised how whitespace damaged it is. WTH, I have no idea what happened here. I will fix this. Dan -- To unsubscribe from this list: send the line "unsubscribe linux-us

Re: [PATCH 1/2 v5 RESEND] usbnet: allow status interrupt URB to always be active

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 15:07 -0500, Dan Williams wrote: > On Wed, 2013-05-01 at 14:54 -0400, David Miller wrote: > > > > For a patch set that you've submitted 5 times, I'm incredibly > > surprised how whitespace damaged it is. > > WTH, I have no idea what happ

Re: [PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 13:01 -0500, Dan Williams wrote: > A rebranded Novatel E371 for AT&T's LTE bands. > > Cc: > Signed-off-by: Dan Williams Skip this patch as I'll split it up, and it's also whitespace damaged to to an Evolution issue I'm sorting out.

Re: [PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
On Wed, 2013-05-01 at 15:20 -0500, dag dg wrote: > Vendor ID is 413c Product ID is 819b Bjorn meant the actual Novatel E371 device IDs... Dan > > On Wed, May 1, 2013 at 3:19 PM, Bjørn Mork wrote: > > > Dan Williams writes: > > > > > On Wed, 2013-05-01

Re: [PATCH] usb: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-01 Thread Dan Williams
shed we had that ID. You don't need to go looking for it if you don't want to. Dan > On Wed, May 1, 2013 at 3:24 PM, Dan Williams wrote: > > On Wed, 2013-05-01 at 15:20 -0500, dag dg wrote: > >> Vendor ID is 413c Product ID is 819b > > > > Bjorn meant the act

Re: [PATCH] USB: Added support for Cinterion's PLxx WWAN Interface

2013-05-03 Thread Dan Williams
On Fri, 2013-05-03 at 09:39 +0200, Schemmel Hans-Christoph wrote: > /drivers/net/usb/qmi_wwan.c: Added support for Cinterion's PLxx WWAN > Interface by adding Cinterion's Vendor ID as well as Product ID and > QMI_FIXED_INTF. > > /drivers/usb/serial/option.c: Added support for Cinterion's PLxx WW

[PATCH] option: add device IDs for Dell 5804 (Novatel E371) WWAN card

2013-05-06 Thread Dan Williams
A rebranded Novatel E371 for AT&T's LTE bands. Cc: Signed-off-by: Dan Williams --- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 7343728..58cbb94 100644 --- a/drivers/usb/serial/optio

[PATCH 1/2 v6 RESEND] usbnet: allow status interrupt URB to always be active

2013-05-06 Thread Dan Williams
have stopped it. The URB is still killed and re-submitted for suspend/resume, as before, with the same refcount it had at suspend. Signed-off-by: Dan Williams --- NOTE: Oliver already ACK-ed this series, but Ming disagreed about the mem_flags argument to usbnet_status_start() and consensus seems far

[PATCH 2/2 v6 RESEND] sierra_net: keep status interrupt URB active

2013-05-06 Thread Dan Williams
dication can be received even if the netdev is closed, which is the case right after device insertion. If the Reset indication is not received by the driver, it continues sending SYNC messages to the firmware, which crashes about 10 seconds later and the device stops responding. Signed-off-b

Re: [PATCH] serial: Add Option GTM681W to qcserial device table.

2013-05-24 Thread Dan Williams
On Fri, 2013-05-24 at 20:25 +0200, Bjørn Mork wrote: > Richard Weinberger writes: > > Am 24.05.2013 15:18, schrieb Bjørn Mork: > >> Richard Weinberger writes: > >> > >>> The Option GTM681W uses a qualcomm chip and can be > >>> served by the qcserial device driver. > >> > >> Should it also be adde

Re: Mobile Broadband Interface Model (MBIM) support?

2013-05-24 Thread Dan Williams
On Fri, 2013-05-24 at 11:10 -0700, Sarah Sharp wrote: > Ccing Dan Williams, since Johannes Berg mentioned on IRC that Dan might > know the status of MBIM support. As Bjorn mentioned, libmbim just got a 1.0 release, and ModemManager 0.7.x (git master, basically) has support for MBIM devic

Re: zte_ev not properly handling ZTE AC2726 CDMA modems

2013-12-03 Thread Dan Williams
On Mon, 2013-12-02 at 21:46 -0800, 'Greg KH' wrote: > On Mon, Nov 25, 2013 at 07:46:40PM -0800, Dmitry Kunilov wrote: > > Hi Greg, > > > > All of them are the same model (AC2726), device ID is 19d2:fff1. Moving just > > that one line fixes my problem. > > Given that fixing this would be good to h

Re: Xhci Host not allowed to send get device desc at addr zero

2013-12-03 Thread Dan Williams
On Tue, Dec 3, 2013 at 9:54 AM, Sarah Sharp wrote: > On Wed, Nov 27, 2013 at 05:07:04PM +0100, Aymen BOUATTAY wrote: >> Hi Pratyush, >> >> Douglas Turner pointed me to this thread discussion >> http://www.spinics.net/lists/linux-usb/msg95103.html >> >> seems there is some issue to use new scheme

[PATCH] usb: fix leak of descriptor buffer on hub_enable_device failure

2013-12-05 Thread Dan Williams
Smatch says: drivers/usb/core/hub.c:4324 hub_port_init() warn: possible memory leak of 'buf' Fixes: 1e6ed41e7e29 ("usb: xhci: change enumeration scheme to 'new scheme' by default") Reported-by: Dan Carpenter Signed-off-by: Dan Williams --- drivers/usb/core/

Re: [PATCH] usb: fix leak of descriptor buffer on hub_enable_device failure

2013-12-05 Thread Dan Williams
On Thu, Dec 5, 2013 at 1:53 PM, Sarah Sharp wrote: > Hi Dan, > > Can you send me an updated patch for commit 1e6ed41e7e29 that includes > this fix? I haven't queued this to Greg yet, and I would like to avoid > introducing bugs on bisect. > Sure thing, was not sure if for-usb-next-queue rebased

[PATCH v3] usb: xhci: change enumeration scheme to 'new scheme' by default

2013-12-05 Thread Dan Williams
bMaxPacketSize0= 9 which results in the discovery process looping until falling back to 'old scheme' enumeration. Acked-by: Alan Stern Reported-by: David Moore Suggested-by: Sarah Sharp Reported-by: Dan Carpenter Signed-off-by: Dan Williams Signed-off-by: Sarah Sharp --- Squa

Re: [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs

2013-12-11 Thread Dan Williams
On Wed, Dec 11, 2013 at 11:36 AM, Sarah Sharp wrote: > On Wed, Dec 11, 2013 at 11:00:13AM -0800, Julius Werner wrote: >> > I don't know what you mean by "fails". The system goes to sleep and >> > then later on wakes up, doesn't it? >> > >> > Do you mean that the Jetflash device gets disconnected

Re: [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs

2013-12-11 Thread Dan Williams
On Wed, Dec 11, 2013 at 2:51 PM, Dan Williams wrote: > On Wed, Dec 11, 2013 at 11:36 AM, Sarah Sharp > wrote: >> On Wed, Dec 11, 2013 at 11:00:13AM -0800, Julius Werner wrote: >>> > I don't know what you mean by "fails". The system goes to sleep and &

Re: [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs

2013-12-13 Thread Dan Williams
On Fri, Dec 13, 2013 at 9:48 AM, Sarah Sharp wrote: > On Thu, Dec 12, 2013 at 11:05:04AM -0500, Alan Stern wrote: >> On Wed, 11 Dec 2013, Julius Werner wrote: >> >> > >> ...although, the spec says that it does not wait for the port resets >> > >> to complete. As far as I can see re-issuing a warm

Re: [PATCH] USB: core: Add warm reset while reset-resuming SuperSpeed HUBs

2013-12-13 Thread Dan Williams
On Fri, Dec 13, 2013 at 10:15 AM, Alan Stern wrote: > On Fri, 13 Dec 2013, Dan Williams wrote: > >> > I'm actually leaning towards enabling the check for warm reset broadly. >> > It seems like it wouldn't hurt to issue a warm reset on the USB 3.0 >> &g

Re: [PATCH 1/1] hso: fix problem with wrong status code sent by OPTION GTM601 during RING indication

2013-12-16 Thread Dan Williams
On Fri, 2013-12-13 at 15:43 +0100, Dr. H. Nikolaus Schaller wrote: > Hi, > > Am 02.10.2013 um 09:00 schrieb Dr. H. Nikolaus Schaller: > > > Hi Jan, > > > > we are using a GTM601 modem (Firmware 1.7) for a while and have spotted an > > issue that under some conditions the modem sends a packed wIn

Re: [PATCH 1/1] hso: fix problem with wrong status code sent by OPTION GTM601 during RING indication

2013-12-17 Thread Dan Williams
On Tue, 2013-12-17 at 20:56 +0100, Dr. H. Nikolaus Schaller wrote: > Hi Dan, > > Am 16.12.2013 um 20:40 schrieb Dan Williams: > > > On Fri, 2013-12-13 at 15:43 +0100, Dr. H. Nikolaus Schaller wrote: > >> Hi, > >> > >> Am 02.10.2013 um 09:00 schrieb

Re: [PATCH 1/1] hso: fix problem with wrong status code sent by OPTION GTM601 during RING indication

2013-12-18 Thread Dan Williams
On Wed, 2013-12-18 at 14:16 +0100, Dr. H. Nikolaus Schaller wrote: > Hi Dan, > > Am 17.12.2013 um 23:27 schrieb Dan Williams: > > > On Tue, 2013-12-17 at 20:56 +0100, Dr. H. Nikolaus Schaller wrote: > >> Hi Dan, > >> > >> Am 16.12.2013 um 20:40 schr

[RFC PATCH 1/4] usb: introduce hub->resume_bits and HCD_FLAG_RESET_RESUME

2013-12-20 Thread Dan Williams
: Dan Williams --- drivers/usb/core/driver.c | 40 +++- drivers/usb/core/hub.c| 29 - drivers/usb/core/hub.h|2 ++ include/linux/usb.h |1 - include/linux/usb/hcd.h |1 + 5 files changed, 54 insertions

[RFC PATCH 4/4] usb: port pm recovery

2013-12-20 Thread Dan Williams
arting usb_port_resume() for each attached child. 2/ The ->power_is_on flag is superseded by poweroff_bits and can be removed. [1]: http://marc.info/?l=linux-usb&m=138683173421509&w=2 Cc: Julius Werner Cc: Vikas Sajjan Signed-off-by: Dan Williams --- drivers/usb/core/generic.c

[RFC PATCH 3/4] usb: reset resume in khubd context

2013-12-20 Thread Dan Williams
usb_port_resume() runs. Signed-off-by: Dan Williams --- drivers/usb/core/generic.c | 23 --- drivers/usb/core/hub.c | 11 +-- drivers/usb/core/usb.c |1 + drivers/usb/core/usb.h |6 ++ include/linux/usb.h|3 +++ 5 files changed, 35

[RFC PATCH 0/4] port warm reset recovery

2013-12-20 Thread Dan Williams
itive feedback before rebasing the rest of the port power rework on top of this approach. [1]: http://marc.info/?l=linux-usb&m=138683173421509&w=2 --- Dan Williams (4): usb: introduce hub->resume_bits and HCD_FLAG_RESET_RESUME usb: convert khubd to a workqueue usb: reset

[RFC PATCH 2/4] usb: convert khubd to a workqueue

2013-12-20 Thread Dan Williams
is idle for the duration of a recovery event. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 135 +++- drivers/usb/core/hub.h |4 - 2 files changed, 31 insertions(+), 108 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb

Re: [RFC PATCH 0/4] port warm reset recovery

2013-12-22 Thread Dan Williams
Hi Alan, On Sat, Dec 21, 2013 at 9:34 AM, Alan Stern wrote: > On Fri, 20 Dec 2013, Dan Williams wrote: > >> Both the suspected quirky Synopsys xHC [1] and the >> port-pm-runtime-resume path need to issue warm resets to reliably bring >> ports back to an operational state.

Re: Alcatel usb modem

2014-01-02 Thread Dan Williams
On Sun, 2013-12-29 at 15:35 +0700, Lars Melin wrote: > On 2013-12-29 00:55, Greg KH wrote: > > On Sat, Dec 28, 2013 at 02:13:08PM +, thomas.takacs.a...@gmail.com > > wrote: > >> Hi, > >> I've seen this message: tell linux-usb... to add your device to a proper > >> device. > >> My USB modem is

[PATCH] hso: fix handling of modem port SERIAL_STATE notifications

2014-01-06 Thread Dan Williams
ch is set up to receive them by the driver. So instead of always expecting USB interface #2, instead validate the notification with the actual USB interface number of the Modem port. Signed-off-by: Dan Williams Tested-by: H. Nikolaus Schaller --- drivers/net/usb/hso.c | 13 +++-- 1 f

Re: [PATCH] hso: fix handling of modem port SERIAL_STATE notifications

2014-01-06 Thread Dan Williams
On Mon, 2014-01-06 at 16:30 -0500, David Miller wrote: > From: Dan Williams > Date: Mon, 06 Jan 2014 10:07:29 -0600 > > > The existing serial state notification handling expected older Option > > devices, having a hardcoded assumption that the Modem port was always > &

Re: [PATCH] RFC: Allow to blacklist xhci_hcd module and use ports with EHCI

2014-01-07 Thread Dan Williams
On Mon, Dec 23, 2013 at 11:21 AM, Holger Hans Peter Freyther wrote: > From: Holger Hans Peter Freyther > > xhci_hcd does not work with the Canon Lide scanners and has issues > with the suspend/resume handling. My Acer Aspire S5 notebook only > exposes USB3.0 ports and the distribution kernels gen

[PATCH v3 01/10] usb: assign default peer ports for root hubs

2014-01-07 Thread Dan Williams
Assume that the peer of a superspeed port is the port with the same id on the shared_hcd root hub. This may be a lie if tier mismatch is in effect. Platform firmware can fix it after the port is registered. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |5 drivers/usb/core

[PATCH v3 02/10] usb: find external hub port peers

2014-01-07 Thread Dan Williams
th the matching port id Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 8d3ec2daf6fe..7fd22020d7ee 100644 --- a/drivers/usb/core/port.c

[PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-07 Thread Dan Williams
long as superspeed hub parent ports remain powered. [1] http://marc.info/?l=linux-usb&m=138260013707007&w=2 [2] http://marc.info/?l=linux-usb&m=138511124910669&w=2 [3] http://marc.info/?l=linux-usb&m=138775577717546&w=2 [4] http://marc.info/?l=linux-usb&m=138759482824618&am

[PATCH v3 04/10] usb: sysfs link peer ports

2014-01-07 Thread Dan Williams
peer => ../../../usb2/2-0:1.0/port2 usb3/3-0:1.0/port3/peer => ../../../usb2/2-0:1.0/port3 usb3/3-0:1.0/port4/peer => ../../../usb2/2-0:1.0/port4 Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 40 +++- 1 files changed, 31 inserti

[PATCH v3 05/10] usb: defer suspension of superspeed port while peer is powered

2014-01-07 Thread Dan Williams
connection. Prevent this by blocking power-off of a usb3 port while its usb2 peer is active, and powering on a usb3 port before its usb2 peer. Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/drivers

[PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-07 Thread Dan Williams
cached as an opaque cookie in usb_port_location data. Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |6 +++ drivers/usb/core/port.c | 96 +++ drivers/usb/core/usb-acpi.c | 35 +--- drivers/usb/core/usb.h |2 +

[PATCH v3 06/10] usb: gate clearing FEAT_C_ENABLE to usb2 hubs

2014-01-07 Thread Dan Williams
The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. It also takes steps to re-disable the port if it fails to reconnect which again is broken on usb3 ports and unnecessary on usb2 ports. Signed-off-by: Dan

[PATCH v3 09/10] usb: make khubd and subsequent suspension wait for port recovery

2014-01-07 Thread Dan Williams
ism is also used to rate limit power toggling as the port will not suspend again until the child device has been given a chance to wake up. This mitigates devices downgrading their connection on perceived instability of the host connection. Signed-off-by: Dan Williams --- drivers/usb/core/hu

[PATCH v3 07/10] usb: synchronize port poweroff and khubd

2014-01-07 Thread Dan Williams
->change_bits for the port (3) hub_events() starts, but at the same time the port suspends (4) hub_connect_change() sees the disabled port and triggers disconnect Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 38 +- 1 files changed, 33 insertions(+)

[PATCH v3 10/10] usb: documentation for usb port power off mechanisms

2014-01-07 Thread Dan Williams
From: Lan Tianyu describe the mechanisms for controlling port power policy and discovering the port power state. Cc: Oliver Neukum Signed-off-by: Lan Tianyu Signed-off-by: Sarah Sharp Signed-off-by: Dan Williams --- Documentation/usb/power-management.txt | 210

[PATCH v3 08/10] usb: cleanup straggling C_PORT_RESET C_PORT_LINK_STATE notifications

2014-01-07 Thread Dan Williams
Port power testing sometimes result in a port being powered-off while C_PORT_RESET and C_PORT_LINK_STATE are active. Per the spec these bits should be automatically cleared by being in the logical powered off state. Handle this for hubs that do not follow the spec. Signed-off-by: Dan Williams

Re: [PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-07 Thread Dan Williams
On Tue, Jan 7, 2014 at 1:58 PM, Greg KH wrote: > On Tue, Jan 07, 2014 at 12:29:28PM -0800, Dan Williams wrote: >> Alan, Sarah, >> >> This revision boils down the port power control fixes to the >> bare minimum to get the implementation functional and reliable. &g

Re: [PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-13 Thread Dan Williams
On Mon, Jan 13, 2014 at 11:01 AM, Sarah Sharp wrote: > On Tue, Jan 07, 2014 at 12:29:28PM -0800, Dan Williams wrote: >> Alan, Sarah, >> >> This revision boils down the port power control fixes to the >> bare minimum to get the implementation functional and reliable. &g

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-13 Thread Dan Williams
On Mon, Jan 13, 2014 at 2:56 PM, Sarah Sharp wrote: > On Tue, Jan 07, 2014 at 12:29:44PM -0800, Dan Williams wrote: >> ACPI identifies peer ports by setting their 'group_token' and >> 'group_position' >> _PLD data to the same value. If a platform has ti

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-14 Thread Dan Williams
On Tue, Jan 14, 2014 at 1:42 PM, Sarah Sharp wrote: > On Mon, Jan 13, 2014 at 08:57:38PM -0500, Alan Stern wrote: >> On Mon, 13 Jan 2014, Sarah Sharp wrote: >> >> > On Mon, Jan 13, 2014 at 02:56:57PM -0800, Sarah Sharp wrote: >> >> > > I haven't looked at this too closely, but what happens if: >>

Re: [PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-14 Thread Dan Williams
On Tue, Jan 14, 2014 at 3:22 PM, Sarah Sharp wrote: > On Tue, Jan 07, 2014 at 12:29:28PM -0800, Dan Williams wrote: >> Alan, Sarah, >> >> This revision boils down the port power control fixes to the >> bare minimum to get the implementation functional and reliable. &g

Re: [PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-14 Thread Dan Williams
On Tue, Jan 14, 2014 at 5:27 PM, Dan Williams wrote: > On Tue, Jan 14, 2014 at 3:22 PM, Sarah Sharp > wrote: >> On Tue, Jan 07, 2014 at 12:29:28PM -0800, Dan Williams wrote: >>> Alan, Sarah, >>> >>> This revision boils down the port power control f

Re: [PATCH v3 10/10] usb: documentation for usb port power off mechanisms

2014-01-14 Thread Dan Williams
On Mon, Jan 13, 2014 at 1:48 PM, Sarah Sharp wrote: > A couple comments below. > > On Tue, Jan 07, 2014 at 12:30:21PM -0800, Dan Williams wrote: >> From: Lan Tianyu >> >> describe the mechanisms for controlling port power policy and >> discovering the port pow

Re: [PATCH v3 00/10] Just the essential port power control fixes for 3.14

2014-01-15 Thread Dan Williams
On Tue, 2014-01-14 at 15:22 -0800, Sarah Sharp wrote: > On Tue, Jan 07, 2014 at 12:29:28PM -0800, Dan Williams wrote: > > Alan, Sarah, > > > > This revision boils down the port power control fixes to the > > bare minimum to get the implementation functional and r

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-15 Thread Dan Williams
On Tue, Jan 14, 2014 at 1:47 PM, Dan Williams wrote: > On Tue, Jan 14, 2014 at 1:42 PM, Sarah Sharp > wrote: >> On Mon, Jan 13, 2014 at 08:57:38PM -0500, Alan Stern wrote: >>> On Mon, 13 Jan 2014, Sarah Sharp wrote: >>> >>> > On Mon, Jan 13, 2

Re: [PATCH v3 06/10] usb: gate clearing FEAT_C_ENABLE to usb2 hubs

2014-01-16 Thread Dan Williams
On Thu, Jan 16, 2014 at 8:35 AM, Sarah Sharp wrote: > On Tue, Jan 07, 2014 at 12:30:00PM -0800, Dan Williams wrote: >> The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE >> after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. >> >>

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-16 Thread Dan Williams
On Thu, 2014-01-16 at 16:18 -0500, Alan Stern wrote: > On Thu, 16 Jan 2014, Sarah Sharp wrote: > > > > > What do you think about the rest of the patchset? > > > > > > I regret that I haven't taken the time to look through it yet. :-( > > > I'll do my best to go through it soon. > > > > No wo

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-17 Thread Dan Williams
On Fri, 2014-01-17 at 10:53 -0500, Alan Stern wrote: > On Thu, 16 Jan 2014, Dan Williams wrote: > > > Maybe I need to consider it a bit longer, but introducing a per-port > > mutex adds at least 2 new lock ordering constraints. A replacement of > > hub->busy_b

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-21 Thread Dan Williams
On Sat, 2014-01-18 at 08:59 -0500, Alan Stern wrote: > On Fri, 17 Jan 2014, Dan Williams wrote: > > > > The basic idea of using runtime PM synchronization to prevent khubd and > > > port power operations from interfering sounds good, and it is simpler > > > than

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-21 Thread Dan Williams
> The lock hangs off the usb_device rather than the the usb_port since it > is meant to prevent unintended disconnects. Any portstatus vs khubd > collisions are handled by pm runtime synchronization since there is no > expectation that khubd resumes a usb_port. > > Once khubd has made a determinat

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-21 Thread Dan Williams
On Tue, Jan 21, 2014 at 2:05 PM, Alan Stern wrote: > On Tue, 21 Jan 2014, Dan Williams wrote: > >> > > We want to: >> > > >> > > 1/ prevent khubd from running while reset is in progress >> > >> > This is the open question mentioned ab

Re: [PATCH v3 03/10] usb: find internal hub tier mismatch via acpi

2014-01-22 Thread Dan Williams
On Wed, Jan 22, 2014 at 6:48 AM, Alan Stern wrote: > On Tue, 21 Jan 2014, Dan Williams wrote: > >> >> I think we agree that khubd needs to not look at the portstatus while >> >> the port is down. pm runtime synchronization takes care of that and >> >> p

[PATCH v4 03/14] usb: find internal hub tier mismatch via acpi

2014-01-31 Thread Dan Williams
r association scheme. Location data is cached as an opaque cookie in usb_port_location data. Note that we only consider the group_token and group_position attributes from the _PLD data as ACPI specifies that group_token is a unique identifier. [1]: xhci 1.1 appendix D figure 131 [2]: acpi 5 section 6.1.8

[PATCH v4 02/14] usb: assign usb3 external hub port peers

2014-01-31 Thread Dan Williams
th the matching port id Note that this assumes the port labelling scheme required by the specification [1]. [1]: usb3 3.1 section 10.3.3 Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH v4 04/14] usb: sysfs link peer ports

2014-01-31 Thread Dan Williams
peer => ../../../usb2/2-0:1.0/port2 usb3/3-0:1.0/port3/peer => ../../../usb2/2-0:1.0/port3 usb3/3-0:1.0/port4/peer => ../../../usb2/2-0:1.0/port4 Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 40 +++- 1 files changed, 31 inserti

[PATCH v4 00/14] port power control fixes

2014-01-31 Thread Dan Williams
Toggling port power currently leads to three unintended disconnect scenarios that are addressed by this rework of port power recovery and usb device resume: 1/ Superspeed devices downgrade to their hispeed connection: fix this by preventing superspeed poweroff until the peer port is suspended.

[PATCH v4 05/14] usb: defer suspension of superspeed port while peer is powered

2014-01-31 Thread Dan Williams
connection. Prevent this by blocking power-off of a usb3 port while its usb2 peer is active, and powering on a usb3 port before its usb2 peer. Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff

[PATCH v4 01/14] usb: assign default peer ports for root hubs

2014-01-31 Thread Dan Williams
. For now, simply perform the nominal association. [1]: usb 3.1 section 10.3.3 [2]: xhci 1.1 appendix D Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |5 drivers/usb/core/hub.h |6 drivers/usb/core/port.c | 64 +++ 3

[PATCH v4 06/14] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-01-31 Thread Dan Williams
Three reasons: 1/ It's an invalid operation on usb3 ports 2/ There's no guarantee of when / if a usb2 port has entered an error state relative to PORT_POWER request 3/ The port is active / powered at this point, so khubd will clear it as a matter of course Signed-off-by: Da

[PATCH v4 10/14] xhci: cancel in-flight resume requests when the port is powered off

2014-01-31 Thread Dan Williams
n-flight request otherwise we can end up in an infinite loop. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-hub.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 9992fbfec85f..2333ec57359

[PATCH v4 08/14] usb: refactor port handling in hub_events()

2014-01-31 Thread Dan Williams
. Other cleanups include: 1/ reflowing to 80 columns 2/ replacing redundant usages of 'hub->hdev' with 'hdev' 3/ baseline debug prints on a common format of "port%d: " Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 235 ++--

[PATCH v4 09/14] usb: synchronize port poweroff and khubd

2014-01-31 Thread Dan Williams
->change_bits for the port (3) hub_events() starts, but at the same time the port suspends (4) hub_connect_change() sees the disabled port and triggers disconnect Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 55 1 files changed,

[PATCH v4 07/14] usb: usb3 ports do not support FEAT_C_ENABLE

2014-01-31 Thread Dan Williams
The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. We expect khubd to be suspended at this time so we need to clear any errors for usb2 ports. Signed-off-by: Dan Williams --- drivers/usb/core/port.c

[PATCH v4 11/14] usb: introduce port status lock

2014-01-31 Thread Dan Williams
e usb_port. We attempt to hold the status_lock for the duration of a port_event() run, and drop/re-aquire it when needing to take the device_lock. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 93 +++ drivers/usb/core/hub.h |2 +

[PATCH v4 14/14] usb: documentation for usb port power off mechanisms

2014-01-31 Thread Dan Williams
From: Lan Tianyu describe the mechanisms for controlling port power policy and discovering the port power state. Cc: Oliver Neukum Signed-off-by: Lan Tianyu [sarah]: wordsmithing [djbw]: updates for peer port changes Signed-off-by: Dan Williams --- Documentation/usb/power-management.txt

[PATCH v4 12/14] usb: guarantee child device resume on port poweron

2014-01-31 Thread Dan Williams
ING state. khubd executes a pm_runtime_barrier() on the port device to flush the port recovery, holds the port active while it resumes the child, and completes child device resume before acting on the current portstatus. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 17 +

[PATCH v4 13/14] usb: force warm reset to break resume livelock

2014-01-31 Thread Dan Williams
adakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 25 + drivers/usb/core/hub.h |2 ++ drivers/usb/core/port.c | 32 ++-- 3 files changed, 41 inserti

Re: [PATCH v4 00/14] port power control fixes

2014-02-01 Thread Dan Williams
On Sat, Feb 1, 2014 at 10:44 AM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> Toggling port power currently leads to three unintended disconnect >> scenarios that are addressed by this rework of port power recovery and >> usb device resume: >

Re: [PATCH v4 00/14] port power control fixes

2014-02-01 Thread Dan Williams
On Sat, 2014-02-01 at 15:39 -0500, Alan Stern wrote: > On Sat, 1 Feb 2014, Dan Williams wrote: > > > Unfortunate that what goes for net/, or drivers/md/ doesn't go for > > drivers/usb/... sounds like checkpatch needs subsystem specific style > > rules to avoid this t

Re: [PATCH v4 00/14] port power control fixes

2014-02-03 Thread Dan Williams
On Sun, Feb 2, 2014 at 1:35 AM, Greg KH wrote: > On Sat, Feb 01, 2014 at 11:16:24AM -0800, Dan Williams wrote: >> On Sat, Feb 1, 2014 at 10:44 AM, Alan Stern >> wrote: >> > On Fri, 31 Jan 2014, Dan Williams wrote: >> > >> >> Toggling port power c

Re: [RFCv2 01/10] xhci: Use command structures when calling xhci_configure_endpoint

2014-02-04 Thread Dan Williams
Hi Mathias, comments below: On Thu, Jan 30, 2014 at 6:10 AM, Mathias Nyman wrote: > To create a global command queue we need to fill a command structure > for each entry on the command ring. > > We start by requiring xhci_configure_endpoint() to be called with > a proper command structure. Functi

Re: [RFCv2 00/10] xhci: re-work command queue management

2014-02-04 Thread Dan Williams
On Thu, Jan 30, 2014 at 6:25 AM, David Laight wrote: > From: Mathias Nyman >> Only changes since v1 are fixing smatch warnings and errors. >> patch 01/10 >> Check for null return from alloc_command, release lock in error path and >> don't dereference possible null pointer in error path.

Re: [RFCv2 08/10] xhci: Add a global command queue

2014-02-04 Thread Dan Williams
On Thu, Jan 30, 2014 at 6:10 AM, Mathias Nyman wrote: > Create a list to store command structures, add a strucure to it every time > a command is submitted, and remove it from the list once we get a > command completion event matching the command. > > Signed-off-by: Mathias Nyman > --- > drivers

Re: [RFCv2 00/10] xhci: re-work command queue management

2014-02-05 Thread Dan Williams
On Wed, Feb 5, 2014 at 1:22 AM, David Laight wrote: > From: Dan Williams >> > Adding another list that will have its own set of bugs seems retrograde >> > top me. >> >> What bugs? Please be specific. The problem to be addressed is not >> the allocatio

Re: [RFCv2 00/10] xhci: re-work command queue management

2014-02-05 Thread Dan Williams
On Wed, Feb 5, 2014 at 9:05 AM, David Laight wrote: > From: Dan Williams >> Yes, but I think we need to centralize the context under which >> commands are submitted. The complicating factor is the mix of >> synchronous command submission and interrupt driven asynchronous &

Re: [PATCH v4 01/14] usb: assign default peer ports for root hubs

2014-02-06 Thread Dan Williams
On Thu, Feb 6, 2014 at 12:07 PM, Alan Stern wrote: > But come to think of it, you don't _really_ depend on the fact that the > USB-2 root hub is registered first. What matters is that the _primary_ > hcd is registered first. > >> + */ >> + if (!hdev->parent) { >> + struct usb

Re: [PATCH v4 01/14] usb: assign default peer ports for root hubs

2014-02-06 Thread Dan Williams
Hi Alan, Thanks for the time and effort on the review, really appreciate it. On Thu, Feb 6, 2014 at 12:07 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> Assume that the peer of a superspeed port is the port with the same id >> on the shared_h

Re: [PATCH v4 03/14] usb: find internal hub tier mismatch via acpi

2014-02-07 Thread Dan Williams
On Thu, Feb 6, 2014 at 12:46 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> ACPI identifies peer ports by setting their 'group_token' and >> 'group_position' _PLD data to the same value. If a platform has tier >> mismatch [1] ,

Re: [PATCH v4 04/14] usb: sysfs link peer ports

2014-02-07 Thread Dan Williams
On Thu, Feb 6, 2014 at 12:57 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> For example: > > Topic sentence? A reader seeing this could be forgiven for wondering > "Example of what?". > Ok, fixed. >> usb2/2-1/2-1:1.0/port1/pe

Re: [PATCH v4 05/14] usb: defer suspension of superspeed port while peer is powered

2014-02-07 Thread Dan Williams
On Thu, Feb 6, 2014 at 1:05 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> ClearPortFeature(PORT_POWER) on a usb3 port places the port in either a >> DSPORT.Powered-off-detect / DSPORT.Powered-off-reset loop, or the >> DSPORT.Powered-off state. T

Re: [PATCH v4 06/14] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-02-07 Thread Dan Williams
I On Thu, Feb 6, 2014 at 1:09 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> Three reasons: >> 1/ It's an invalid operation on usb3 ports >> 2/ There's no guarantee of when / if a usb2 port has entered an error >>state relative

Re: [PATCH v4 07/14] usb: usb3 ports do not support FEAT_C_ENABLE

2014-02-07 Thread Dan Williams
On Thu, Feb 6, 2014 at 1:12 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE >> after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. >> We expect khubd to be susp

Re: [PATCH v4 03/14] usb: find internal hub tier mismatch via acpi

2014-02-07 Thread Dan Williams
On Fri, Feb 7, 2014 at 7:15 AM, Alan Stern wrote: > On Fri, 7 Feb 2014, Dan Williams wrote: > >> >> +static int pair_port(struct device *dev, void *data) >> >> +{ >> >> + struct usb_port *peer = data; >> >> + struct usb_port *port

Re: [PATCH v4 05/14] usb: defer suspension of superspeed port while peer is powered

2014-02-07 Thread Dan Williams
On Fri, Feb 7, 2014 at 7:17 AM, Alan Stern wrote: > On Fri, 7 Feb 2014, Dan Williams wrote: > >> >> + /* power on our usb3 peer before this usb2 port to prevent a usb3 >> >> + * device from degrading to its usb2 connection >> >> + */ >&g

Re: [PATCH v4 05/14] usb: defer suspension of superspeed port while peer is powered

2014-02-07 Thread Dan Williams
On Fri, Feb 7, 2014 at 12:08 PM, Alan Stern wrote: > On Fri, 7 Feb 2014, Dan Williams wrote: > >> On Fri, Feb 7, 2014 at 7:17 AM, Alan Stern wrote: >> > On Fri, 7 Feb 2014, Dan Williams wrote: >> > >> >> >> + /* power on our u

Re: [PATCH v4 13/14] usb: force warm reset to break resume livelock

2014-02-10 Thread Dan Williams
On Mon, Feb 10, 2014 at 1:26 PM, Alan Stern wrote: > On Fri, 31 Jan 2014, Dan Williams wrote: > >> Resuming a powered down port sometimes results in the port state being >> stuck in USB_SS_PORT_LS_POLLING: >> >> hub 3-0:1.0: debounce: port 1: total 2000ms stable 0ms

Re: [PATCH] hub: make compile without CONFIG_PM

2014-02-11 Thread Dan Williams
On Tue, Feb 11, 2014 at 6:47 AM, wrote: > From: Oliver Neukum > > Define usb_lock_port and usb_unlock_port in all cases > > Signed-off-by: Oliver Neukum > --- > drivers/usb/core/hub.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > i

<    1   2   3   4   5   6   7   >