Re: [PATCH 2/2] hso: fix deadlock when receiving bursts of data

2014-07-07 Thread Dan Williams
On Mon, 2014-07-07 at 11:06 +0200, Olivier Sobrie wrote: > When the module sends bursts of data, sometimes a deadlock happens in > the hso driver when the tty buffer doesn't get the chance to be flushed > quickly enough. > > To avoid this, first, we remove the endless while loop in > put_rx_bufdat

Re: [RFC] xhci: Fix xhci block system enter system suspend state.

2014-06-23 Thread Dan Williams
On Sun, Jun 22, 2014 at 7:33 AM, Alan Stern wrote: > On Sun, 22 Jun 2014, Wang, Yu wrote: > >> From: "Wang, Yu" >> >> The system suspend flow as following: >> 1, Freeze all user processes and kenrel threads. >> >> 2, Trying to suspend all devices. >> >> 2.1, If pci device under RPM suspended stat

Re: Re:Re: move ZTE CDMA device pid from zte_ev.c back to option.c and modify a parameter in zte_ev.ko

2014-06-23 Thread Dan Williams
On Mon, 2014-06-23 at 18:15 +0800, 刘磊 wrote: > >Could you try the first patch (only) and see if it fixes the problem? > >Does it also fix the problem you're having with PID 0xfffe? > > yes, the first patch could solve the problem with pid 0xfffe. > > > >When you you have tested the first patch,

Re: move ZTE CDMA device pid from zte_ev.c back to option.c and modify a parameter in zte_ev.ko

2014-06-20 Thread Dan Williams
On Fri, 2014-06-20 at 18:30 +0800, 刘磊 wrote: > dear linuxfoundation: > I'm very sorry has some problems in before's submit. now i divided the > problems in two patches. > > patch1:move ZTE CDMA device pid from zte_ev.c back to option.c. > reason: the pid of 0xfffe device can't re-conn

Re: [PATCH 3/3] usb: fix hub-port pm_runtime_enable() vs runtime pm transitions

2014-06-18 Thread Dan Williams
On Wed, Jun 18, 2014 at 7:54 AM, Alan Stern wrote: > On Tue, 17 Jun 2014, Dan Williams wrote: > >> Commit 9262c19d14c4 "usb: disable port power control if not supported in >> wHubCharacteristics" gated enabling runtime pm for usb_port devices on >> whether the

Re: [PATCH 0/3] port power control fixes for 3.16-rc2

2014-06-18 Thread Dan Williams
On Wed, Jun 18, 2014 at 1:18 AM, Bjørn Mork wrote: > Dan Williams writes: > >> I put patch 3 "usb: fix hub-port pm_runtime_enable() vs runtime pm >> transitions" through it's paces, but I'd still like to see a positive >> test report from Bjørn.

Re: [PATCH net,stable] net: huawei_cdc_ncm: increase command buffer size

2014-06-18 Thread Dan Williams
s like a reasonable value for now. > > Fixes: 41c47d8cfd68 ("net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm > driver") > Cc: Enrico Mioso > Reported-by: Dan Williams > Signed-off-by: Bjørn Mork Tested-by: Dan Williams '^SYSCFGEX: ("00","01&

Re: [PATCH 0/3] port power control fixes for 3.16-rc2

2014-06-17 Thread Dan Williams
On Tue, Jun 17, 2014 at 5:06 PM, Greg KH wrote: > On Tue, Jun 17, 2014 at 04:16:16PM -0700, Dan Williams wrote: >> Fallout / regression fixes for the port power control rework that landed >> in 3.16-rc1. >> >> 1/ Cosmetic fix to an error message >> >> 2/ H

[PATCH 3/3] usb: fix hub-port pm_runtime_enable() vs runtime pm transitions

2014-06-17 Thread Dan Williams
in wHubCharacteristics") Reported-by: Bjørn Mork Reported-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |6 drivers/usb/core/hub.h |2 + drivers/usb/core/port.c | 65 +-- 3 files changed, 54 insertions(+), 1

[PATCH 1/3] usb: improve "not suspended yet" message in hub_suspend()

2014-06-17 Thread Dan Williams
ce 3-4: not suspended yet" [1]: http://marc.info/?l=linux-usb&m=140290586301336&w=2 Reported-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c in

[PATCH 2/3] usb: quiet peer failure warning, disable poweroff

2014-06-17 Thread Dan Williams
In the case where platform firmware has specified conflicting values for port locations it is confusing and otherwise not helpful to throw a backtrace. Instead, include enough information to determine that firmware has done something wrong and globally disable port poweroff. Signed-off-by: Dan

[PATCH 0/3] port power control fixes for 3.16-rc2

2014-06-17 Thread Dan Williams
power off by enforcing the PM_QOS_NO_POWER_OFF constraint from the kernel rather than disabling runtime power management. --- Dan Williams (3): usb: improve "not suspended yet" message in hub_suspend() usb: quiet peer failure warning, disable poweroff usb: fi

Re: [PATCH] xhci: Fix sleeping with IRQs disabled in xhci_stop_device()

2014-06-09 Thread Dan Williams
On Mon, Jun 9, 2014 at 9:07 AM, Mathias Nyman wrote: > xhci_stop_device() allocates and issues stop commands for each active > endpoint. > This is done with spinlock held and interrupt disabled so we can't sleep > during > memory allocation. Use GFP_ATOMIC instead > > Regressiong from commit ddb

Re: [PATCH 07/10] xhci: Use command structures when queuing commands on the command ring

2014-06-05 Thread Dan Williams
Hi Mathias, hit a small issue playing with -next: On Thu, May 8, 2014 at 9:26 AM, Mathias Nyman wrote: > To create a global command queue we require that each command put on the > command ring is submitted with a command structure. > > Functions that queue commands and wait for completion need to

[boot regression PATCH] usb: fix ->update_hub_device() vs hdev->maxchild

2014-06-05 Thread Dan Williams
es depends on hdev->maxchild already being set. Do the minimal fix and move it after the setting of hdev->maxchild. Cc: Mathias Nyman Reported-by: Valdis Kletnieks Tested-by: Valdis Kletnieks Signed-off-by: Dan Williams --- For 3.16-rc1 drivers/usb/core/hub.c | 24 --

Re: linux-next crash in xhci_add_ep_to_interval

2014-06-05 Thread Dan Williams
On Thu, Jun 5, 2014 at 2:10 PM, wrote: > On Thu, 05 Jun 2014 12:05:56 -0700, Dan Williams said: > >> Subject: usb: fix ->update_hub_device() vs hdev->maxchild >> >> From: Dan Williams >> >> Commit d8521afe3586 "usb: assign default peer ports for

Re: linux-next crash in xhci_add_ep_to_interval

2014-06-05 Thread Dan Williams
On Thu, 2014-06-05 at 13:29 -0400, valdis.kletni...@vt.edu wrote: > On Thu, 05 Jun 2014 09:35:48 -0700, Dan Williams said: > > > Actually, on second look I bet xhci_alloc_tt_info() is being called > > while hdev->maxchild is not set. Let me throw together a debug >

Re: linux-next crash in xhci_add_ep_to_interval

2014-06-05 Thread Dan Williams
On Thu, Jun 5, 2014 at 9:24 AM, wrote: > On Thu, 05 Jun 2014 08:55:07 -0700, Dan Williams said: > >> > On a working boot, it progresses: >> >> Is a working boot after reverting that change, or it intermittently >> works? If it's the latter I'm not sur

Re: linux-next crash in xhci_add_ep_to_interval

2014-06-05 Thread Dan Williams
evice 002: ID 413c:2134 Dell Computer Corp. > Bus 003 Device 004: ID 045e:0023 Microsoft Corp. Trackball Optical > Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > > > Git bisect comes down to this: > > commit d8521afe35862f4fbe3ccd6ca37897c0a304edf3 >

Re: [PATCH 1/1] usb: add xhci warm reset if get device descripor return error

2014-06-03 Thread Dan Williams
On Mon, Jun 2, 2014 at 6:28 AM, vichy wrote: > hi Greg: > > 2014-05-31 0:02 GMT+08:00 Greg KH : >> On Fri, May 30, 2014 at 11:28:36PM +0800, che-chun Kuo wrote: >>> We found when we plug in/out usb3.0 device for stress testing, once >>> usb_get_device_descriptor fail in hub_port_init, we will call

Re: [PATCH v2 4/4] usb: move hub power management routines to hub_pm.c

2014-06-03 Thread Dan Williams
On Tue, Jun 3, 2014 at 11:50 AM, Alan Stern wrote: > On Tue, 3 Jun 2014, Dan Williams wrote: > >> On Tue, Jun 3, 2014 at 8:51 AM, Dan Williams >> wrote: >> > On Tue, Jun 3, 2014 at 8:39 AM, Alan Stern >> > wrote: >> >> On Mon, 2 Jun 2014, Dan Wi

Re: [PATCH v2 4/4] usb: move hub power management routines to hub_pm.c

2014-06-03 Thread Dan Williams
On Tue, Jun 3, 2014 at 8:51 AM, Dan Williams wrote: > On Tue, Jun 3, 2014 at 8:39 AM, Alan Stern wrote: >> On Mon, 2 Jun 2014, Dan Williams wrote: [..] >>> static inline bool usb_device_supports_ltm(struct usb_device *udev) >>> { >>> if (udev->

Re: [PATCH v2 4/4] usb: move hub power management routines to hub_pm.c

2014-06-03 Thread Dan Williams
On Tue, Jun 3, 2014 at 8:39 AM, Alan Stern wrote: > On Mon, 2 Jun 2014, Dan Williams wrote: > >> A rather asymmetric response to the compile breakage reported by -next >> and the kbuild robot: >> >> drivers/usb/core/hub.c: In function 'port_event'

Re: [PATCH v2 3/4] usb: introduce usb_set_reset_resume

2014-06-03 Thread Dan Williams
On Tue, Jun 3, 2014 at 8:22 AM, Alan Stern wrote: > On Mon, 2 Jun 2014, Dan Williams wrote: > >> In preparation for moving hub power management logic to its own file and >> removing instances of #ifdef CONFIG_PM in hub.c, introduce a >> usb_set_reset_resume() helper.

Re: [PATCH v2 0/4] port power control rework stragglers

2014-06-02 Thread Dan Williams
On Mon, Jun 2, 2014 at 3:02 PM, Greg KH wrote: > On Mon, Jun 02, 2014 at 02:49:57PM -0700, Dan Williams wrote: >> Changes since v1 [1]: >> >> 1/ Deleted "usb: fix hub_handle_remote_wakeup() only exists for >>CONFIG_PM=y" in favor of the full refactori

[PATCH v2 1/4] usb: force warm reset to break link re-connect livelock

2014-06-02 Thread Dan Williams
Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Cc: Hans de Goede Acked-by: Julius Werner Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 36 +--- drivers/usb/core/hub.h |2 ++ driver

[PATCH v2 3/4] usb: introduce usb_set_reset_resume

2014-06-02 Thread Dan Williams
In preparation for moving hub power management logic to its own file and removing instances of #ifdef CONFIG_PM in hub.c, introduce a usb_set_reset_resume() helper. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |5 ++--- include/linux/usb.h| 11 +++ 2 files changed

[PATCH v2 2/4] usb: documentation for usb port power off mechanisms

2014-06-02 Thread Dan Williams
Stern Signed-off-by: Lan Tianyu Signed-off-by: Dan Williams --- Documentation/usb/power-management.txt | 245 1 files changed, 243 insertions(+), 2 deletions(-) diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index

[PATCH v2 0/4] port power control rework stragglers

2014-06-02 Thread Dan Williams
m the v10 posting [3]. [1]: http://marc.info/?l=linux-usb&m=140139351920273&w=2 [2]: http://marc.info/?l=linux-usb&m=140146126207527&w=2 [3]: http://marc.info/?l=linux-usb&m=140063512208229&w=2 --- Dan Williams (3): usb: force warm reset to break link re-conne

Re: [PATCH 1/3] usb: fix hub_handle_remote_wakeup() only exists for CONFIG_PM=y

2014-05-30 Thread Dan Williams
On Fri, May 30, 2014 at 7:47 AM, Alan Stern wrote: > On Thu, 29 May 2014, Dan Williams wrote: > >> > Duplicating code like this is a little awkward. My preference would be >> > to move both usb_remote_wakeup() and hub_handle_remote_wakeup() out >> > from und

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

2014-05-29 Thread Dan Williams
: Lan Tianyu Signed-off-by: Dan Williams --- Documentation/usb/power-management.txt | 245 1 files changed, 243 insertions(+), 2 deletions(-) diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index 1392b61d6ebe

[PATCH 1/3] usb: fix hub_handle_remote_wakeup() only exists for CONFIG_PM=y

2014-05-29 Thread Dan Williams
obot also reported this. Reported-by: kbuild test robot Signed-off-by: Stephen Rothwell Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 6346fb2acbd7..db6287025

[PATCH 0/3] port power control rework stragglers

2014-05-29 Thread Dan Williams
xed up clearing warm_reset_bits 3/ Patch 19 "usb: documentation for usb port power off mechanisms" from v10 updated to address Alan's comments. * Fixed up the names of port devices in sysfs * Grammar fix. [1]: v10: http://marc.info/?l=linux-usb&m=140063512208229&w=2 --- D

[PATCH 2/3] usb: force warm reset to break link re-connect livelock

2014-05-29 Thread Dan Williams
Tianyu Cc: Ksenia Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Cc: Hans de Goede Acked-by: Julius Werner Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 36 +--- drivers/usb/core/hub.h |2 ++ drivers/usb/c

Re: [PATCH v10 19/19] usb: documentation for usb port power off mechanisms

2014-05-29 Thread Dan Williams
On Wed, May 21, 2014 at 1:29 PM, Alan Stern wrote: > On Tue, 20 May 2014, Dan Williams wrote: > >> From: Lan Tianyu >> >> describe the mechanisms for controlling port power policy and >> discovering the port power state. > > >> +Example of

Re: [PATCH v10 18/19] usb: force warm reset to break link re-connect livelock

2014-05-29 Thread Dan Williams
On Wed, May 21, 2014 at 1:12 PM, Alan Stern wrote: > On Tue, 20 May 2014, Dan Williams wrote: > >> Resuming a powered down port sometimes results in the port state being >> stuck in the training sequence. >> >> hub 3-0:1.0: debounce: port 1: total 2000ms stable 0ms

Re: [PATCH v10 00/19] port power control reworks

2014-05-28 Thread Dan Williams
On Wed, May 28, 2014 at 12:41 PM, Alan Stern wrote: > On Wed, 28 May 2014, Dan Williams wrote: > >> On Tue, May 27, 2014 at 5:26 PM, Greg KH wrote: >> > On Tue, May 20, 2014 at 06:08:01PM -0700, Dan Williams wrote: >> >> Greg, >> >> >>

Re: [PATCH v10 00/19] port power control reworks

2014-05-28 Thread Dan Williams
On Tue, May 27, 2014 at 5:26 PM, Greg KH wrote: > On Tue, May 20, 2014 at 06:08:01PM -0700, Dan Williams wrote: >> Greg, >> >> Here is the port power control rework for your consideration now that >> Alan has finished acking it (see summary below). Patch 9 had one &g

Re: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter

2014-05-24 Thread Dan Williams
On Fri, May 23, 2014 at 11:39 PM, Holger Hans Peter Freyther wrote: > On Tue, May 20, 2014 at 03:40:16PM -0700, Dan Williams wrote: > > Dear Dan, > >> Sorry, I don't think it is fair to users to force them to re-compile >> their kernel to get their device to w

Re: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter

2014-05-21 Thread Dan Williams
On Tue, May 20, 2014 at 11:31 PM, Greg KH wrote: > On Tue, May 20, 2014 at 11:21:03PM -0700, Dan Williams wrote: >> On Tue, May 20, 2014 at 5:27 PM, Greg KH wrote: >> >> Greg, >> >> >> >> Sorry, I don't think it is fair to users to force them to

Re: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter

2014-05-20 Thread Dan Williams
On Tue, May 20, 2014 at 5:27 PM, Greg KH wrote: >> Greg, >> >> Sorry, I don't think it is fair to users to force them to re-compile >> their kernel to get their device to work. > > I totally agree. > >> Granted, I'm new to USB >> development, but the rate of reports of endpoint devices that mess u

[PATCH v10 15/19] usb: introduce port status lock

2014-05-20 Thread Dan Williams
quired during hub_port_reconnect(). This patch also deletes hub->busy_bits as all use cases are now covered by port PM runtime synchronization or the port->status_lock and it pushes down usb_device_lock() into usb_remote_wakeup(). Acked-by: Alan Stern Signed-off-by: Dan Williams

[PATCH v10 00/19] port power control reworks

2014-05-20 Thread Dan Williams
clusion for resetting a hub and power-managing a port Dan Williams (17): usb: disable port power control if not supported in wHubCharacteristics usb: rename usb_port device objects usb: cleanup setting udev->removable from port_dev->connect_type usb: assign default pe

[PATCH v10 06/19] usb: assign usb3 external hub port peers

2014-05-20 Thread Dan Williams
th the matching port id Note that this assumes the port labeling scheme required by the specification [1]. [1]: usb3 3.1 section 10.3.3 Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 32 1 files changed, 24 insertions(+), 8 del

[PATCH v10 04/19] usb: cleanup setting udev->removable from port_dev->connect_type

2014-05-20 Thread Dan Williams
fault setting determined from the hub descriptor. Note, we no longer pass udev->portnum to acpi_find_child_device() in the root hub case since: 1/ the usb-core sets this to zero 2/ acpi always expects zero ...just pass zero. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Willia

[PATCH v10 14/19] usb: synchronize port poweroff and khubd

2014-05-20 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 Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 21 - 1 files changed, 20 inserti

[PATCH v10 16/19] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y

2014-05-20 Thread Dan Williams
IME" portion of hub.c, along with the other suspend/resume code." Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 90 ++-- drivers/usb/core/usb.h |5 --- 2 files changed, 49 insertions(

[PATCH v10 19/19] usb: documentation for usb port power off mechanisms

2014-05-20 Thread Dan Williams
: Dan Williams --- Documentation/usb/power-management.txt | 242 1 files changed, 240 insertions(+), 2 deletions(-) diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index 1392b61d6ebe..6c3e0f04f6cb 100644 --- a

[PATCH v10 18/19] usb: force warm reset to break link re-connect livelock

2014-05-20 Thread Dan Williams
Tianyu Cc: Ksenia Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Cc: Hans de Goede Acked-by: Julius Werner Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 23 --- drivers/usb/core/hub.h |2 ++ drivers/usb/core/por

[PATCH v10 10/19] usb: block suspension of superspeed port while hispeed peer is active

2014-05-20 Thread Dan Williams
disctinction at port creation so that we don't need to keep looking up the parent hub device. Acked-by: Alan Stern [alan]: add a 'superspeed' flag to the port Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 22 +++--- drivers/usb/core/hub.h | 15 ++ d

[PATCH v10 17/19] usb: resume child device when port is powered on

2014-05-20 Thread Dan Williams
g acted on in usb_disconnect() (prompted-by sharp eyes from Alan). Cc: Rafael J. Wysocki Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 42 +- drivers/usb/core/port.c |9 - 2 files changed, 37 insertions(+), 14 dele

[PATCH v10 13/19] usb: refactor port handling in hub_events()

2014-05-20 Thread Dan Williams
: 1/ reflowing to 80 columns 2/ replacing redundant usages of 'hub->hdev' with 'hdev' 3/ consolidate clearing of ->change_bits() in hub_port_connect_change 4/ consolidate calls to usb_reset_device Acked-by: Alan Stern Signed-off-by: Dan Williams ---

[PATCH v10 07/19] usb: find internal hub tier mismatch via acpi

2014-05-20 Thread Dan Williams
6.1.8 [alan]: don't do default peering when acpi data present Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |2 ++ drivers/usb/core/port.c | 56 --- driver

[PATCH v10 12/19] usb: usb3 ports do not support FEAT_C_ENABLE

2014-05-20 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/usb/core/port.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index f41f0512307e..fb83c2c13920 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -142,7 +142,8

[PATCH v10 11/19] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-05-20 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/usb/core/port.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 827b0d38f73d..f41f0512307e 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -110,7 +110,6 @@

[PATCH v10 05/19] usb: assign default peer ports for root hubs

2014-05-20 Thread Dan Williams
ointers. [1]: usb 3.1 section 10.3.3 [2]: xhci 1.1 appendix D Cc: Alan Stern [alan: usb_port_peer_mutex locking scheme] Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hcd.c | 43 +++- drivers/usb/core/hub.c | 42 ++-

[PATCH v10 03/19] usb: rename usb_port device objects

2014-05-20 Thread Dan Williams
-1-port3" rather than the subsystem-ambiguous " 1-1-port3". Finally, it corrects an odd usage of sscanf("port%d") in usb-acpi.c. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 273 ++---

[PATCH v10 09/19] usb: make usb_port flags atomic, rename did_runtime_put to child_usage

2014-05-20 Thread Dan Williams
tanding in for the fact that usb_devices are not the device_model children of their parent port. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 39 --- drivers/usb/core/hub.h |7 +++ drivers/usb/core/port.c |4 ++-- 3 files changed, 25

[PATCH v10 08/19] usb: sysfs link peer ports

2014-05-20 Thread Dan Williams
=> ../../../usb2/2-0:1.0/usb2-port3 usb3/3-0:1.0/usb3-port4/peer => ../../../usb2/2-0:1.0/usb2-port4 Introduce link_peers_report() to notify on all link_peers() failure cases. Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 39

[PATCH v10 02/19] usb: disable port power control if not supported in wHubCharacteristics

2014-05-20 Thread Dan Williams
. This also consolidates support checks into a hub_is_port_power_switchable() helper. Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |8 ++-- drivers/usb/core/hub.h | 10 ++ drivers/usb/core/port.c | 13 - 3 files changed, 20

[PATCH v10 01/19] USB: mutual exclusion for resetting a hub and power-managing a port

2014-05-20 Thread Dan Williams
omatically restore each port to the proper power state. Signed-off-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 12 drivers/usb/core/hub.h |1 + drivers/usb/core/port.c |6 ++ 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/d

Re: [PATCH v9 09/19] usb: make usb_port flags atomic, rename did_runtime_put to child_usage

2014-05-20 Thread Dan Williams
On Fri, May 16, 2014 at 11:32 AM, Alan Stern wrote: > On Wed, 7 May 2014, Dan Williams wrote: > >> We want to manipulate ->did_runtime_put in usb_port_runtime_resume(), >> but we don't want that to collide with other updates. Move usb_port >> flags to n

Re: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter

2014-05-20 Thread Dan Williams
On Tue, May 20, 2014 at 1:34 PM, Greg KH wrote: > On Tue, May 20, 2014 at 11:25:37AM -0700, Dan Williams wrote: >> On Tue, May 20, 2014 at 2:51 AM, Takashi Iwai wrote: >> > At Tue, 20 May 2014 12:47:36 +0300, >> > Mathias Nyman wrote: >> >> >> >>

Re: [PATCH 02/10] xhci: 'noxhci_port_switch' kernel parameter

2014-05-20 Thread Dan Williams
On Tue, May 20, 2014 at 2:51 AM, Takashi Iwai wrote: > At Tue, 20 May 2014 12:47:36 +0300, > Mathias Nyman wrote: >> >> On 05/20/2014 04:01 AM, Greg KH wrote: >> > On Thu, May 08, 2014 at 07:25:55PM +0300, Mathias Nyman wrote: >> >> From: Dan Williams &g

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-16 Thread Dan Williams
[ adding Greg to the cc as a ping and in case he was curious of the current review state of this patchset ] On Thu, May 15, 2014 at 12:41 PM, Dan Williams wrote: > On Mon, 2014-05-12 at 15:14 -0400, Alan Stern wrote: >> On Mon, 12 May 2014, Dan Williams wrote: >> >> > Fix

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-15 Thread Dan Williams
On Mon, 2014-05-12 at 15:14 -0400, Alan Stern wrote: > On Mon, 12 May 2014, Dan Williams wrote: > > > Fixed. And dropped "wakeup" out of the patch subject. > > > > > There's a nasty bug here. I'll let you figure it out for yourself. :-) > >

Re: Clarification regarding USB Data Card (3G Dongle) enumeration in Linux udev

2014-05-13 Thread Dan Williams
On Tue, 2014-05-13 at 17:58 +0530, Suresh Kumar N. wrote: > On Thu, May 8, 2014 at 9:08 PM, Dan Williams wrote: > > On Wed, 2014-05-07 at 15:30 +0530, Suresh Kumar N. wrote: > >> On Tue, May 6, 2014 at 9:42 PM, Dan Williams wrote: > >> > On Tue, 2014-05-06 at 14:2

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-12 Thread Dan Williams
On Mon, 2014-05-12 at 10:22 -0400, Alan Stern wrote: > On Fri, 9 May 2014, Dan Williams wrote: > > > Testing looks good. In my objection to this approach I neglected to > > consider that the port_status_lock now protects us from port_event() > > usb_port_{suspend_res

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-12 Thread Dan Williams
On Mon, May 12, 2014 at 7:22 AM, Alan Stern wrote: > On Fri, 9 May 2014, Dan Williams wrote: > >> Testing looks good. In my objection to this approach I neglected to >> consider that the port_status_lock now protects us from port_event() >> usb_port_{suspend_resume} col

Re: [PATCH v9 16/19] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y

2014-05-09 Thread Dan Williams
On Thu, 2014-05-08 at 14:11 -0400, Alan Stern wrote: > On Thu, 8 May 2014, Dan Williams wrote: > > > > Also, instead of adding another #ifdef here, you could add a #else > > > section to the existing #ifdef in which you define an inline version of > > > hub_h

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-09 Thread Dan Williams
On Thu, 2014-05-08 at 15:14 -0400, Alan Stern wrote: > On Thu, 8 May 2014, Dan Williams wrote: > > > On Thu, May 8, 2014 at 11:09 AM, Alan Stern > > wrote: > > > On Thu, 8 May 2014, Dan Williams wrote: > > > > > >> On Thu, May 8, 2014 at 9:09 A

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 11:09 AM, Alan Stern wrote: > On Thu, 8 May 2014, Dan Williams wrote: > >> On Thu, May 8, 2014 at 9:09 AM, Alan Stern wrote: >> > On Thu, 8 May 2014, Dan Williams wrote: >> > >> >> > I don't understand this last part. Wh

Re: [PATCH v9 16/19] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 9:01 AM, Alan Stern wrote: > On Wed, 7 May 2014, Dan Williams wrote: > >> Per Alan: >> "You mean from within hub_handle_remote_wakeup()? That routine will >> never get called if CONFIG_PM_RUNTIME isn't enabled, because khubd >>

Re: [PATCH 03/10] usb: catch attempts to submit urbs with a vmalloc'd transfer buffer

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 9:47 AM, Joe Perches wrote: > On Thu, 2014-05-08 at 19:25 +0300, Mathias Nyman wrote: >> Save someone else the debug cycles of figuring out why a driver's >> transfer request is failing or causing undefined system behavior. >> Buffers submitted for dma must come from GFP all

Re: [PATCH 03/10] usb: catch attempts to submit urbs with a vmalloc'd transfer buffer

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 9:22 AM, David Laight wrote: > From: Mathias Nyman >> From: Dan Williams >> >> Save someone else the debug cycles of figuring out why a driver's >> transfer request is failing or causing undefined system behavior. >> Buffers submitte

Re: [PATCH 03/10] usb: catch attempts to submit urbs with a vmalloc'd transfer buffer

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 9:25 AM, Mathias Nyman wrote: > From: Dan Williams > > Save someone else the debug cycles of figuring out why a driver's > transfer request is failing or causing undefined system behavior. > Buffers submitted for dma must come from GFP allocated

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 9:09 AM, Alan Stern wrote: > On Thu, 8 May 2014, Dan Williams wrote: > >> > I don't understand this last part. Why do we need to guarantee the >> > child device has recovered from power loss? Why not proceed the same >> > way

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 8:44 AM, Alan Stern wrote: > On Wed, 7 May 2014, Dan Williams wrote: > >> Unconditionally wake up the child device when the power session is >> recovered. > > ... > >> 1, 2, and 4 are not a problem in the system dpm_resume() case because,

Re: [PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-08 Thread Dan Williams
On Thu, May 8, 2014 at 4:09 AM, Rafael J. Wysocki wrote: > On Wednesday, May 07, 2014 10:37:24 PM Dan Williams wrote: >> Unconditionally wake up the child device when the power session is >> recovered. > > [cut] > >> + /* >> +

Re: Clarification regarding USB Data Card (3G Dongle) enumeration in Linux udev

2014-05-08 Thread Dan Williams
On Wed, 2014-05-07 at 15:30 +0530, Suresh Kumar N. wrote: > On Tue, May 6, 2014 at 9:42 PM, Dan Williams wrote: > > On Tue, 2014-05-06 at 14:27 +0530, Suresh Kumar N. wrote: > >> On Mon, May 5, 2014 at 8:38 PM, Dan Williams wrote: > >> > On Mon, 2014-05-05 at 11:0

[PATCH v9 17/19] usb: resume (wakeup) child device when port is powered on

2014-05-07 Thread Dan Williams
, where the revalidation is handled by usb_port_resume(). Given that this patch de-references port_dev->child we need to make sure not to collide with usb_disconnect(). The hub_port_reconnect() case is handled by the fact that port_event() is run with the port_dev pinned active. Cc: Rafae

[PATCH v9 18/19] usb: force warm reset to break link re-connect livelock

2014-05-07 Thread Dan Williams
Tianyu Cc: Ksenia Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Cc: Hans de Goede Acked-by: Julius Werner Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 23 --- drivers/usb/core/hub.h |3 ++- drivers/usb/core/por

[PATCH v9 14/19] usb: synchronize port poweroff and khubd

2014-05-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 | 21 - 1 files changed, 20 insertions(+), 1 deletions(-) d

[PATCH v9 16/19] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y

2014-05-07 Thread Dan Williams
IME" portion of hub.c, along with the other suspend/resume code." Suggested-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |4 drivers/usb/core/usb.h |5 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/usb/core/hub.c b/dri

[PATCH v9 15/19] usb: introduce port status lock

2014-05-07 Thread Dan Williams
quired during hub_port_reconnect(). This patch also deletes hub->busy_bits as all use cases are now covered by port PM runtime synchronization or the port->status_lock and it pushes down usb_device_lock() into usb_remote_wakeup(). Signed-off-by: Dan Williams

[PATCH v9 19/19] usb: documentation for usb port power off mechanisms

2014-05-07 Thread Dan Williams
: Dan Williams --- Documentation/usb/power-management.txt | 242 1 files changed, 240 insertions(+), 2 deletions(-) diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index 1392b61d6ebe..6c3e0f04f6cb 100644 --- a

[PATCH v9 09/19] usb: make usb_port flags atomic, rename did_runtime_put to child_usage

2014-05-07 Thread Dan Williams
tanding in for the fact that usb_devices are not the device_model children of their parent port. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 34 ++ drivers/usb/core/hub.h |8 drivers/usb/core/port.c |4 ++-- 3 files changed, 24 insertio

[PATCH v9 10/19] usb: block suspension of superspeed port while hispeed peer is active

2014-05-07 Thread Dan Williams
disctinction at port creation so that we don't need to keep looking up the parent hub device. Acked-by: Alan Stern [alan]: add a 'superspeed' flag to the port Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 22 +++--- drivers/usb/core/hub.h | 15 ++ d

[PATCH v9 07/19] usb: find internal hub tier mismatch via acpi

2014-05-07 Thread Dan Williams
6.1.8 [alan]: don't do default peering when acpi data present Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |2 ++ drivers/usb/core/port.c | 56 --- driver

[PATCH v9 05/19] usb: assign default peer ports for root hubs

2014-05-07 Thread Dan Williams
ointers. [1]: usb 3.1 section 10.3.3 [2]: xhci 1.1 appendix D Cc: Alan Stern [alan: usb_port_peer_mutex locking scheme] Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hcd.c | 43 +++- drivers/usb/core/hub.c | 42 ++-

[PATCH v9 06/19] usb: assign usb3 external hub port peers

2014-05-07 Thread Dan Williams
th the matching port id Note that this assumes the port labeling scheme required by the specification [1]. [1]: usb3 3.1 section 10.3.3 Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 32 1 files changed, 24 insertions(+), 8 del

[PATCH v9 02/19] usb: disable port power control if not supported in wHubCharacteristics

2014-05-07 Thread Dan Williams
. This also consolidates support checks into a hub_is_port_power_switchable() helper. Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |8 ++-- drivers/usb/core/hub.h | 10 ++ drivers/usb/core/port.c | 13 - 3 files changed, 20

[PATCH v9 13/19] usb: refactor port handling in hub_events()

2014-05-07 Thread Dan Williams
: 1/ reflowing to 80 columns 2/ replacing redundant usages of 'hub->hdev' with 'hdev' 3/ consolidate clearing of ->change_bits() in hub_port_connect_change 4/ consolidate calls to usb_reset_device Signed-off-by: Dan Williams ---

[PATCH v9 11/19] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-05-07 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/usb/core/port.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 827b0d38f73d..f41f0512307e 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -110,7 +110,6 @@

[PATCH v9 12/19] usb: usb3 ports do not support FEAT_C_ENABLE

2014-05-07 Thread Dan Williams
Signed-off-by: Dan Williams --- drivers/usb/core/port.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index f41f0512307e..fb83c2c13920 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -142,7 +142,8

[PATCH v9 08/19] usb: sysfs link peer ports

2014-05-07 Thread Dan Williams
=> ../../../usb2/2-0:1.0/usb2-port3 usb3/3-0:1.0/usb3-port4/peer => ../../../usb2/2-0:1.0/usb2-port4 Introduce link_peers_report() to notify on all link_peers() failure cases. Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 39

[PATCH v9 04/19] usb: cleanup setting udev->removable from port_dev->connect_type

2014-05-07 Thread Dan Williams
fault setting determined from the hub descriptor. Note, we no longer pass udev->portnum to acpi_find_child_device() in the root hub case since: 1/ the usb-core sets this to zero 2/ acpi always expects zero ...just pass zero. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Willia

[PATCH v9 01/19] USB: mutual exclusion for resetting a hub and power-managing a port

2014-05-07 Thread Dan Williams
omatically restore each port to the proper power state. Signed-off-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 12 drivers/usb/core/hub.h |1 + drivers/usb/core/port.c |6 ++ 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/d

[PATCH v9 03/19] usb: rename usb_port device objects

2014-05-07 Thread Dan Williams
-1-port3" rather than the subsystem-ambiguous " 1-1-port3". Finally, it corrects an odd usage of sscanf("port%d") in usb-acpi.c. Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 273 ++---

[PATCH v9 00/19] port power control reworks

2014-05-07 Thread Dan Williams
Changes since v8 [1]: * Added patch 1 from Alan "USB: mutual exclusion for resetting a hub and power-managing a port" * Reworked patch 9 "usb: make usb_port flags atomic, rename did_runtime_put to child_usage" to move the flags from struct usb_port to struct usb_hub. Also clarified that did

<    1   2   3   4   5   6   7   >