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-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 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: 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-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: [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 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 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 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

[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

[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 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 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 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 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 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 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 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 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 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 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 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

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

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-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 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 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 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 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

[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

[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 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

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 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

[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

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

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 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 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 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 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: 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: 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
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 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

[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: [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

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: Huawei E3131

2015-08-12 Thread Dan Williams
On Wed, 2015-08-12 at 23:17 +0200, Martin Mokrejs wrote: > Hi Bjorn, > my have a new USB 3G modem sold in Czech Republic by T-Mobile. So far it > works for me only using the option driver and pppd. The 'qmi-network > /dev/cdc-wdm0' does not work for me. Maybe it has no QMI interface ('modprob

Re: ax88179_178a hang over xhci

2014-09-07 Thread Dan Williams
On Sat, Sep 6, 2014 at 10:05 AM, Andrea Arcangeli wrote: > On Sat, Sep 06, 2014 at 05:33:19PM +0200, Andrea Arcangeli wrote: >> without weaking any /sysfs pm runtime related file, and I'll let you >> know if it hangs again. > > No luck... it already hung again with the patches applied. > > try #1:

[PATCH] option: add Haier CE81B CDMA modem

2014-10-14 Thread Dan Williams
Port layout: 0: QCDM/DIAG 1: NMEA 2: AT 3: AT/PPP 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 d1a3f60..8d8764d 100644 --- a/drivers/usb/serial/option.c +++ b

Re: [PATCH] option: add Haier CE81B CDMA modem

2014-10-22 Thread Dan Williams
On Wed, 2014-10-22 at 10:18 +0200, Johan Hovold wrote: > On Tue, Oct 14, 2014 at 11:10:41AM -0500, Dan Williams wrote: > > Port layout: > > > > 0: QCDM/DIAG > > 1: NMEA > > 2: AT > > 3: AT/PPP > > > > Signed-off-by: Dan Williams > >

Re: [PATCH] USB: cdc-acm: add device id for GW Instek AFG-2225

2014-10-27 Thread Dan Williams
On Mon, 2014-10-27 at 20:40 +0100, Oliver Neukum wrote: > On Mon, 2014-10-27 at 19:07 +0100, Johan Hovold wrote: > > > I guess we could use that quirk, but I'm actually leaning towards just > > removing that quirk and reducing the log level of the message to info. > > > > Oliver, what do you say?

Re: [PATCH] USB: cdc-acm: add device id for GW Instek AFG-2225

2014-10-28 Thread Dan Williams
On Tue, 2014-10-28 at 10:26 +0100, Oliver Neukum wrote: > On Tue, 2014-10-28 at 10:05 +0100, Bjørn Mork wrote: > > Johan Hovold writes: > > > > > Today, only one device has the "NOT_A_MODEM" flag (*only* to prevent one > > > message during probe), and most devices are simply matched on the > > >

[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

[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 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

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

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-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 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: 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: 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: [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: [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: 03f0:521d Hewlett-Packard (HP hs3110)

2014-07-23 Thread Dan Williams
On Wed, 2014-07-23 at 14:33 +, Stanescu Victor wrote: > /dev/cdc-wdm2 doesn't work. Further more, instead of freezing at cat, it > freezes from echo. > > Ctrl-c doesn't stop the frozen echo. I'm pretty sure this device does not expose QMI at all, from looking at through the drivers. The dri

Re: Problem with D-Link USB 3.0 to Gigabit Ethernet Adapter DUB-1312

2014-07-25 Thread Dan Williams
On Wed, Jul 23, 2014 at 6:52 AM, Marek Uher wrote: > > Hi Sarah, > > Thank you very much for your answer. I bought three same all-in-one, > low-energy > and space effective computers from ASUS. There isn’t any possibility to add an > additional extension PCIe card. There is only the optio

Re: [xhci] kernel BUG at include/linux/scatterlist.h:115!

2014-07-30 Thread Dan Williams
> Author: Dan Williams > AuthorDate: Tue Jul 22 00:08:51 2014 -0700 > Commit: Dan Williams > CommitDate: Thu Jul 24 18:12:38 2014 -0700 > > xhci: unit test ring enqueue/dequeue routines > > Given the complexity of satisfying xhci 1.0+ host trb boundary > co

Re: USB modem interface not detected sometimes

2014-08-01 Thread Dan Williams
On Fri, 2014-08-01 at 21:44 +0530, Rahul Bedarkar wrote: > Hi, > > I have USB modem which has also support for micro SD card. > > With kernel version 3.15 and later, I am facing a issue with modem > interface detection. When I connect it first time only storage > interface is detected. I had to d

Re: [PATCH] serial/option: Add support for Option GTM671WFS

2014-08-01 Thread Dan Williams
On Fri, 2014-08-01 at 14:00 +0200, Ricardo Ribalda Delgado wrote: > After this patch: > > [5.389385] usbserial: USB Serial support registered for GSM modem (1-port) > [5.390181] option 2-1.4:1.0: GSM modem (1-port) converter detected > [5.390556] usb 2-1.4: GSM modem (1-port) converter

Re: [PATCH] net/usb/hso: Add support for Option GTM671WFS

2014-08-04 Thread Dan Williams
On Mon, 2014-08-04 at 11:20 +0200, Ricardo Ribalda Delgado wrote: > Suggested-by: Dan Williams Before we apply this patch though, can you grab for the following for me? cat /sys/class/tty/*/hsotype and lets see if the firmware actually responds. Also, do you get an 'hso0' network

Re: [PATCH] net/usb/hso: Add support for Option GTM671WFS

2014-08-05 Thread Dan Williams
,,*1E > $GPGSV,4,1,16,04242712,,,*7F > $GPGSV,4,2,16,32313029,,,*73 > $GPGSV,4,3,16,28262523,,,*71 > $GPGSV,4,4,16,22,,,,212019,,,*77 > $GPGGA,,0*66 > $PQXFI,,*56 > $GPVTG,,T,,M,,N,,K,N*2C > $GPRMC,,V,,N*5

Re: [PATCH] net/usb/hso: Add support for Option GTM671WFS

2014-08-05 Thread Dan Williams
5022:~# ls /dev/ttyHS* > /dev/ttyHS0 /dev/ttyHS1 /dev/ttyHS2 /dev/ttyHS3 /dev/ttyHS4 > /dev/ttyHS5 Acked-by: Dan Williams > root@qt5022:~# lsusb -d 0af0: -vvv > > Bus 002 Device 003: ID 0af0:9200 Option > Device Descriptor: > bLength18 > bDescripto

Re: [PATCH] serial/option: Add support for Option GTM671WFS

2014-08-05 Thread Dan Williams
On Mon, 2014-08-04 at 11:12 +0200, Ricardo Ribalda Delgado wrote: > Hello Dan > > > > > Are you 100% sure these don't go into the 'hso' driver? 'option' is > > used for mostly older Option devices (like 5+ years old). I tried to > > find information about this module, and the closest I could com

[RFC PATCH 01/20] xhci: cleanup remaining cycle bit toggles via ternary conditional

2014-08-22 Thread Dan Williams
These can simply be toggled via xor. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 749fc68eb5c1..0efbbf0b6233 100644 --- a/drivers

[RFC PATCH 02/20] xhci: remove invalid cast of xhci to a usb_device in xhci_log_ctx trace

2014-08-22 Thread Dan Williams
An xhci controller device is a pci or a platform device, never a usb_device. Cc: Xenia Ragiadakou Signed-off-by: Dan Williams --- drivers/usb/host/xhci-trace.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-trace.h b/drivers/usb/host/xhci

[RFC PATCH 04/20] xhci: increase trb segment size, kill ->segment_pool

2014-08-22 Thread Dan Williams
first instance. In support of freeing segments from irq context struct xhci_segment grows a ->dev and ->ew field (exectue_work). As a result there is no longer a need to pass a 'xhci' parameter down to xhci_free_segment(). Signed-off-by: Dan Williams --- drivers/usb/h

[RFC PATCH 05/20] xhci: prepare for mid-segment link-trbs

2014-08-22 Thread Dan Williams
ard coded "link at the end" assumption. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-mem.c | 17 +++-- drivers/usb/host/xhci-ring.c |7 ++- drivers/usb/host/xhci.c | 12 drivers/usb/host/xhci.h |1 + 4 files changed, 18 inse

[RFC PATCH 03/20] xhci: introduce xhci_to_dev

2014-08-22 Thread Dan Williams
Replace many occurrences of xhci_to_hcd(xhci)->self.controller with a helper. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-mem.c | 29 - drivers/usb/host/xhci.c |6 +++--- drivers/usb/host/xhci.h | 13 + 3 files changed,

[RFC PATCH 11/20] xhci: provide helpers for retrieving 'enqueue' and 'dequeue' pointers

2014-08-22 Thread Dan Williams
In prepartion for converting ring management from pointers to power-of-2 indexes, introduce xhci_ring_dequeue(), xhci_ring_enqueue(), xhci_ring_set_dequeue(), and xhci_ring_set_enqueue(). Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c | 16 ++-- drivers/usb/host/xhci-mem.c

[RFC PATCH 06/20] xhci: drop 'xhci' argument to last_trb

2014-08-22 Thread Dan Williams
last_trb() can simply distinguish event rings by the ring ->type. With this in place the 'xhci' parameter can be removed from last_trb_on_last_seg(), next_trb(), and inc_deq(). Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 75

[RFC PATCH 07/20] xhci: make xhci_segments doubly linked

2014-08-22 Thread Dan Williams
-by: Dan Williams --- drivers/usb/host/xhci-dbg.c |7 + drivers/usb/host/xhci-mem.c | 325 +- drivers/usb/host/xhci-ring.c | 34 ++-- drivers/usb/host/xhci.c | 15 +- drivers/usb/host/xhci.h | 31 +++- 5 files changed, 217 insertions

[RFC PATCH 08/20] xhci: refactor inc_enq(), share a common advance_enq() with prepare_ring()

2014-08-22 Thread Dan Williams
endpoint rings into event_ring_inc_enq() and common_inc_enq(). Unfortunately this isn't a net win in the diffstat, but it does eliminate the liability of failing to update one of the instances especially in preparation for overhauling TD-fragment handling for xhci1.0+ hosts. Signed-off-by: Dan Wil

[RFC PATCH 12/20] xhci: introduce struct xhci_ring_pointer

2014-08-22 Thread Dan Williams
Consolidate ring pointer tracking variables into their own type. This simplifies the calling convention of some routines and allows for the later introduction of integer ring index variables. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c |8 + drivers/usb/host/xhci-mem.c

[RFC PATCH 13/20] xhci: use %pad for printing dma_addr_t

2014-08-22 Thread Dan Williams
Clean up verbose (unsigned long long) casts. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-dbg.c | 70 - drivers/usb/host/xhci-mem.c | 46 --- drivers/usb/host/xhci-ring.c | 41 +++- drivers

[RFC PATCH 09/20] xhci: introduce ring ops to handle event vs non-event rings

2014-08-22 Thread Dan Williams
trb(). Finally, this is a preparation for xhci1.0+ ring handling which will have it's own ring ops. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-mem.c | 63 ++--- drivers/usb/host/xhci-ring.c | 306 +- drivers/usb/host/xhci.h |

[RFC PATCH 00/20] xhci: implement xhci-v1+ td-fragment rules, test

2014-08-22 Thread Dan Williams
reports are appreciated to verify that it indeed does not break those hosts. --- For testing convenience these patches are available via git at: git://git.kernel.org/pub/scm/linux/kernel/git/djbw/usb td-fragments-v1 Note that this branch may be rebased and/or abandoned (in favor of a td-f

[RFC PATCH 10/20] xhci: clarify "ring valid" checks

2014-08-22 Thread Dan Williams
All rings have ->dequeue = ->enqueue = "first trb in first segment", so it is redundant to check if ->dequeue is NULL when ->ring is set. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-hub.c |5 ++--- drivers/usb/host/xhci-ring.c |2 +- 2 files chang

[RFC PATCH 17/20] xhci: combine xhci_queue_bulk_tx() and queue_bulk_sg_tx()

2014-08-22 Thread Dan Williams
The only difference between these two routines is that the latter handles a scatterlist of more than one entry. Fake a single entry scatterlist for the non-sg case, and delete the duplicate code. Signed-off-by: Dan Williams --- drivers/usb/host/xhci-ring.c | 158

<    1   2   3   4   5   6   7   >