Re: [PATCH v6 part1 8/8] usb: block suspension of superspeed port while hispeed peer is active

2014-03-13 Thread Dan Williams
On Thu, 2014-03-13 at 17:33 -0400, Alan Stern wrote: > On Thu, 13 Mar 2014, Dan Williams wrote: > > > Sorry for the delay, I know it's distracting to lose context like this. > > No problem. > > > > In fact, do we need the pre/post_modify actions at all? Wou

Re: [PATCH net-next v6 0/3] The huawei_cdc_ncm driver / E3276 problem

2014-03-14 Thread Dan Williams
On Fri, 2014-03-14 at 16:25 +0200, Pasi Kärkkäinen wrote: > On Fri, Mar 14, 2014 at 02:33:36PM +0100, Bjørn Mork wrote: > > Pasi Kärkkäinen writes: > > > On Fri, Mar 14, 2014 at 10:24:51AM +0100, Bjørn Mork wrote: > > >> Pasi Kärkkäinen writes: > > >> > > >> > # ifconfig wwp0s26u1u5i1 > > >> > w

Re: [PATCH v6 part1 8/8] usb: block suspension of superspeed port while hispeed peer is active

2014-03-14 Thread Dan Williams
On Fri, 2014-03-14 at 10:25 -0400, Alan Stern wrote: > On Thu, 13 Mar 2014, Dan Williams wrote: > > > > You're right. But maybe a simple solution would be for the > > > runtime-suspend and -resume routines to acquire the usb_port_peer_mutex > > > whenever

Re: [PATCH v6 part2 1/8] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-03-14 Thread Dan Williams
On Fri, 2014-03-14 at 12:11 -0400, Alan Stern wrote: > On Thu, 13 Mar 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 relati

Re: [PATCH v6 part2 2/8] usb: usb3 ports do not support FEAT_C_ENABLE

2014-03-14 Thread Dan Williams
On Fri, 2014-03-14 at 12:12 -0400, Alan Stern wrote: > On Thu, 13 Mar 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 b

Re: Support for new USB Modem 4G drive

2014-03-19 Thread Dan Williams
On Wed, 2014-03-19 at 06:25 -0300, Julio Araujo wrote: > Hello, > > My name is Julio and I'm trying to use a USB Modem 4G model OLICARD500 > from the manufacture Olivetti and I got the follow message from syslog: > Mar 19 05:23:29 mynote kernel: [ 265.072844] usbserial_generic > 1-1.3:1.0: Tell

Re: Support for new USB Modem 4G drive

2014-03-19 Thread Dan Williams
TypeBulk >Synch Type None >Usage Type Data > wMaxPacketSize 0x0200 1x 512 bytes > bInterval 0 > Device Qualifier (for other device speed): >bLength10 > bDescrip

Re: Deadlock in usb-storage error handling

2014-03-19 Thread Dan Williams
On Wed, Mar 19, 2014 at 1:31 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Andreas Reis wrote: > >> I've uploaded a dmesg with the new debugging patch to bugzilla: >> https://bugzilla.kernel.org/attachment.cgi?id=130041 > > Thanks. I have now managed to reproduce many of the features of this > pro

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

2014-03-19 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 v7 03/16] usb: cleanup setting udev->removable from port_dev->connect_type

2014-03-19 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 Signed-off-by: Dan Williams --- driver

[PATCH v7 10/16] usb: usb3 ports do not support FEAT_C_ENABLE

2014-03-19 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 191d7c3c9791..4917473de203 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -136,7 +136,8

[PATCH v7 07/16] usb: sysfs link peer ports

2014-03-19 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 v7 13/16] usb: introduce port status lock

2014-03-19 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 v7 01/16] usb: disable port power control if not supported in wHubCharacteristics

2014-03-19 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 v7 02/16] usb: rename usb_port device objects

2014-03-19 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 v7 05/16] usb: assign usb3 external hub port peers

2014-03-19 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 v7 12/16] usb: synchronize port poweroff and khubd

2014-03-19 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 Most of the code thrash here is just indenting the portions of port_event() that require the port to be runtime pm active. Signed-off-by:

[PATCH v7 04/16] usb: assign default peer ports for root hubs

2014-03-19 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 v7 06/16] usb: find internal hub tier mismatch via acpi

2014-03-19 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 v7 00/16] port power control reworks

2014-03-19 Thread Dan Williams
Status: To date Alan has acked 9 of 16 patches (patch 1, 2, and 4 - 10), thanks Alan! Of course, if others want to jump in please feel free. Changes since v6 [1] [2] are simply rebasing/testing on top of current usb-next (commit 6aec044cc2f5 "USB: unbind all interfaces before rebinding any"), fix

[PATCH v7 11/16] usb: refactor port handling in hub_events()

2014-03-19 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 Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 379 1

[PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-03-19 Thread Dan Williams
UMING state. khubd in turn performs 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 | 40 +++

[PATCH v7 15/16] usb: force warm reset to break link re-connect livelock

2014-03-19 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 v7 09/16] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-03-19 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 24faa88a25c4..191d7c3c9791 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -106,7 +106,6 @@

[PATCH v7 08/16] usb: block suspension of superspeed port while hispeed peer is active

2014-03-19 Thread Dan Williams
recommended power_on_good delay. Acked-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 22 +++--- drivers/usb/core/hub.h | 14 + drivers/usb/core/port.c | 72 +++ 3 files changed, 91 insertions(+), 17 deletions

Re: [PATCH v7 03/16] usb: cleanup setting udev->removable from port_dev->connect_type

2014-03-20 Thread Dan Williams
On Thu, 2014-03-20 at 11:58 -0400, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: > > > Once usb-acpi has set the port's connect type the usb_device's > > ->removable attribute can be set in the standard location > > set_usb_port_removable(). &

Re: [PATCH] usb: serial: Add USB identifier for the Motorola/Telit H24 HSPA module

2014-03-26 Thread Dan Williams
On Tue, 2014-03-25 at 10:34 +0100, Alexander Stein wrote: > As the module does not use the standard USB mechanism, the appropriate > product and vendor IDs have to be added. Should these really be going into usb-serial-simple? If they are indeed the PPP/Modem interface, then isn't something like

Re: [PATCH v7 13/16] usb: introduce port status lock

2014-03-26 Thread Dan Williams
On Wed, Mar 26, 2014 at 1:46 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: > >> In general we do not want khubd to act on port status changes that are >> the result of in progress resets or USB runtime PM operations. >> Specifically port power control

Re: [PATCH 2/2] USB: serial: add dell wwan card(413c:81a9)

2014-03-28 Thread Dan Williams
On Fri, 2014-03-28 at 10:56 +0100, Johan Hovold wrote: > [ +CC: Dan and Bjørn ] > > On Fri, Mar 28, 2014 at 03:25:06PM +0800, AceLan Kao wrote: > > This patch adds support for Dell Computer Corp. Wireless 5808e 4G LTE > > Mobile Broadband Card. > > Shouldn't this device be handled by the option d

Re: [PATCH 1/2] USB: serial: fixed the product id typo

2014-03-28 Thread Dan Williams
On Fri, 2014-03-28 at 11:37 -0500, Dan Williams wrote: > On Fri, 2014-03-28 at 15:25 +0800, AceLan Kao wrote: > > Fixed the product id typo and replace whitespace with tab. > > > > Signed-off-by: AceLan Kao > > --- > > drivers/usb/serial/sierra.c | 2 +- >

Re: [PATCH 2/2] USB: serial: add dell wwan card(413c:81a9)

2014-03-28 Thread Dan Williams
On Fri, 2014-03-28 at 11:25 +0100, Bjørn Mork wrote: > Johan Hovold writes: > > > [ +CC: Dan and Bjørn ] > > > > On Fri, Mar 28, 2014 at 03:25:06PM +0800, AceLan Kao wrote: > >> This patch adds support for Dell Computer Corp. Wireless 5808e 4G LTE > >> Mobile Broadband Card. > > > > Shouldn't thi

Re: [PATCH 1/2] USB: serial: fixed the product id typo

2014-03-28 Thread Dan Williams
On Fri, 2014-03-28 at 15:25 +0800, AceLan Kao wrote: > Fixed the product id typo and replace whitespace with tab. > > Signed-off-by: AceLan Kao > --- > drivers/usb/serial/sierra.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/

linux-usb@vger.kernel.org

2014-04-14 Thread Dan Williams
On Mon, 2014-04-14 at 00:22 +0800, treeui@gmail.com wrote: > From: "shu.suo" > > Signed-off-by: shu.suo > --- > linux-3.14/drivers/usb/serial/option.c | 47 > +++--- > 1 file changed, 43 insertions(+), 4 deletions(-) Some of these devices look like Android hots

Re: [PATCH v7 11/16] usb: refactor port handling in hub_events()

2014-04-25 Thread Dan Williams
On Wed, Mar 26, 2014 at 12:44 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: > >> In preparation for synchronizing port handling with pm_runtime >> transitions refactor port handling into its own subroutine. >> >> We expect that clearing some

Re: [PATCH v7 12/16] usb: synchronize port poweroff and khubd

2014-04-25 Thread Dan Williams
On Wed, Mar 26, 2014 at 1:10 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: > >> If a port is powered-off, or in the process of being powered-off, prevent >> khubd from operating on it. Otherwise, the following sequence of events >> leading to an uninten

Re: [PATCH v7 12/16] usb: synchronize port poweroff and khubd

2014-04-28 Thread Dan Williams
On Mon, Apr 28, 2014 at 11:25 AM, Alan Stern wrote: > On Fri, 25 Apr 2014, Dan Williams wrote: > >> >> @@ -4892,11 +4897,17 @@ static void hub_events(void) >> >> >> >> /* deal with port status changes */ >> >

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-28 Thread Dan Williams
On Mon, Apr 28, 2014 at 1:29 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: > >> Unconditionally wake up the child device when the power session is >> recovered. >> >> This address the following scenarios: >> >> 1/ The device may need a

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-28 Thread Dan Williams
On Mon, Apr 28, 2014 at 2:00 PM, Dan Williams wrote: > On Mon, Apr 28, 2014 at 1:29 PM, Alan Stern wrote: >> On Wed, 19 Mar 2014, Dan Williams wrote: [..] >> But this got me thinking... It looks like the reference to >> port_dev->child in usb_port_runtime_resume() alread

[PATCH v8 03/18] usb: cleanup setting udev->removable from port_dev->connect_type

2014-04-28 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 v8 01/18] usb: disable port power control if not supported in wHubCharacteristics

2014-04-28 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 v8 00/18] port power control reworks

2014-04-28 Thread Dan Williams
Changes since v7 [1]: * Added patch 8 "usb: make usb_port flags atomic" * Added patch 15 "usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y" * Fixed patch 16 "usb: resume (wakeup) child device when port is powered on" - added USB_PORTDEV_WAKE flag to force usb_remote_wakeup() i

[PATCH v8 02/18] usb: rename usb_port device objects

2014-04-28 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 v8 05/18] usb: assign usb3 external hub port peers

2014-04-28 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 v8 06/18] usb: find internal hub tier mismatch via acpi

2014-04-28 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 v8 07/18] usb: sysfs link peer ports

2014-04-28 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 v8 16/18] usb: resume (wakeup) child device when port is powered on

2014-04-28 Thread Dan Williams
triggered is when the user changes the port power policy (pm_qos_no_poweroff). When that is set to 1 we want to revalidate the child device, where the revalidation is handled by usb_port_resume(). Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 32 +-

[PATCH v8 10/18] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

2014-04-28 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 539555d627f1..32e61913c085 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -106,7 +106,6 @@

[PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-28 Thread Dan Williams
port restores power is added in a later patch. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 26 +++--- drivers/usb/core/hub.h |8 drivers/usb/core/port.c |2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/usb/core

[PATCH v8 13/18] usb: synchronize port poweroff and khubd

2014-04-28 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 v8 12/18] usb: refactor port handling in hub_events()

2014-04-28 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 v8 15/18] usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y

2014-04-28 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 v8 04/18] usb: assign default peer ports for root hubs

2014-04-28 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 v8 09/18] usb: block suspension of superspeed port while hispeed peer is active

2014-04-28 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 | 19 d

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

2014-04-28 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 v8 11/18] usb: usb3 ports do not support FEAT_C_ENABLE

2014-04-28 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 32e61913c085..d3a23fee7247 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -136,7 +136,8

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

2014-04-28 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 v8 14/18] usb: introduce port status lock

2014-04-28 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

Re: [PATCH v8 00/18] port power control reworks

2014-04-28 Thread Dan Williams
On Mon, Apr 28, 2014 at 4:46 PM, Dan Williams wrote: > Changes since v7 [1]: > * Added patch 8 "usb: make usb_port flags atomic" > > * Added patch 15 "usb: hub_handle_remote_wakeup() depends on > CONFIG_PM_RUNTIME=y" > > * Fixed patch 16 "usb: res

Re: [PATCH v8 08/18] usb: make usb_port flags atomic

2014-04-29 Thread Dan Williams
On Tue, Apr 29, 2014 at 8:14 AM, Alan Stern wrote: > On Tue, 29 Apr 2014, David Laight wrote: > >> From: Dan Williams >> > Before we add another 2 bitfields to the port state, convert it to an >> > unsigned long and use bitops helpers to manipulate it. This late

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-29 Thread Dan Williams
On Tue, Apr 29, 2014 at 8:12 AM, Alan Stern wrote: > On Mon, 28 Apr 2014, Dan Williams wrote: > >> > Can you include a brief description of situations in which this would >> > be needed, i.e., when something would runtime-resume the port without >> > also resuming

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-29 Thread Dan Williams
On Tue, Apr 29, 2014 at 12:25 PM, Alan Stern wrote: > On Tue, 29 Apr 2014, Dan Williams wrote: > >> > However, either way we still have bad interactions between >> > hub_{quiesce|activate}() and usb_port_runtime_{suspend|resume}(). >> > Consider, for example,

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-30 Thread Dan Williams
On Wed, 2014-04-30 at 10:04 -0400, Alan Stern wrote: > On Tue, 29 Apr 2014, Dan Williams wrote: > > > > What happens if a thread tries to resume or suspend a port while the > > > hub is being reset? With nothing to prevent it, the request sent to > > > the hub

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-04-30 Thread Dan Williams
On Wed, 2014-04-30 at 15:51 -0400, Alan Stern wrote: > On Wed, 30 Apr 2014, Dan Williams wrote: > > > On Wed, 2014-04-30 at 10:04 -0400, Alan Stern wrote: > > > On Tue, 29 Apr 2014, Dan Williams wrote: > > > > > > > > What happens if a threa

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-05-01 Thread Dan Williams
On Thu, May 1, 2014 at 12:02 PM, Alan Stern wrote: > On Thu, 1 May 2014, Dan Williams wrote: > >> > @@ -122,6 +127,11 @@ static int usb_port_runtime_suspend(stru >> > == PM_QOS_FLAGS_ALL) >> > return -EAGAIN; &g

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-05-01 Thread Dan Williams
On Thu, May 1, 2014 at 12:09 PM, Dan Williams wrote: > On Thu, May 1, 2014 at 12:02 PM, Alan Stern wrote: >> On Thu, 1 May 2014, Dan Williams wrote: >> >>> > @@ -122,6 +127,11 @@ static int usb_port_runtime_suspend(stru >>> >

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-05-01 Thread Dan Williams
On Tue, Apr 29, 2014 at 8:12 AM, Alan Stern wrote: > On Mon, 28 Apr 2014, Dan Williams wrote: >> ...and as I go to add this I notice that prior to the "use >> pm_request_resume" suggestion we don't de-reference port_dev->child in >> usb_port_runtime_res

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-05-01 Thread Dan Williams
On Mon, Apr 28, 2014 at 1:29 PM, Alan Stern wrote: > On Wed, 19 Mar 2014, Dan Williams wrote: [..] >> --- a/drivers/usb/core/port.c >> +++ b/drivers/usb/core/port.c >> @@ -104,6 +104,8 @@ static int usb_port_runtime_resume(struct device *dev) >>

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

2014-05-05 Thread Dan Williams
On Mon, 2014-05-05 at 11:07 +0530, Suresh Kumar N. wrote: > Hi, > > I am new to udev and device enumeration. > > I am interested to know how USB Data Card would get enumerated. > > Based on my understanding Data Card can get enumerated below 2 possible ways - > 1. As a modem > 2. As a Networ

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

2014-05-06 Thread Dan Williams
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:07 +0530, Suresh Kumar N. wrote: > >> Hi, > >> > >> I am new to udev and device enumeration. > >> > >&g

Re: [PATCH v7 14/16] usb: resume (wakeup) child device when port is powered on

2014-05-06 Thread Dan Williams
On Fri, May 2, 2014 at 12:09 PM, Alan Stern wrote: > On Thu, 1 May 2014, Dan Williams wrote: > >> I've been testing this and the pm_request_resume() ends up leaving the >> usb device enabled indefinitely. It needs to be paired with a >> pm_runtime_autosuspend(), b

[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

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

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

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

<    1   2   3   4   5   6   7   >