Re: [PATCH] Add kyocera 680 to airprime

2008-02-04 Thread Dan Williams
On Mon, 2008-02-04 at 08:03 -0800, Greg KH wrote: > On Mon, Feb 04, 2008 at 09:05:34AM -0500, Dan Williams wrote: > > Signed-off-by: Dan Williams <[EMAIL PROTECTED]> > > > > diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c > > index

[PATCH] Add kyocera 680 to airprime

2008-02-04 Thread Dan Williams
Signed-off-by: Dan Williams <[EMAIL PROTECTED]> diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c index 77bb893..16ce823 100644 --- a/drivers/usb/serial/airprime.c +++ b/drivers/usb/serial/airprime.c @@ -18,6 +18,7 @@ static struct usb_device_id id

[PATCH] option: Add Kyocera KPC680 ids

2008-02-19 Thread Dan Williams
Signed-off-by: Dan Williams <[EMAIL PROTECTED]> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d1185f5..c5508bc 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -113,6 +113,9 @@ static int option_send_setup(struct usb_serial_port

Re: right place for CDMA / GSM modem IDs for usbserial autoloading?

2008-02-25 Thread Dan Williams
On Mon, 2008-02-25 at 03:07 -0500, David Zeuthen wrote: > On Sun, 2008-02-24 at 21:18 -0800, Greg KH wrote: > > I have no problem exporting a simple sysfs attribute showing if the > > device is either CDMA or GSDM. I would think with that, HAL would not > > need to keep any kind of tables at all,

Re: right place for CDMA / GSM modem IDs for usbserial autoloading?

2008-02-25 Thread Dan Williams
On Mon, 2008-02-25 at 11:38 -0800, Greg KH wrote: > On Mon, Feb 25, 2008 at 01:32:04PM -0500, Dan Williams wrote: > > On Mon, 2008-02-25 at 03:07 -0500, David Zeuthen wrote: > > > On Sun, 2008-02-24 at 21:18 -0800, Greg KH wrote: > > > > I have no problem exporting a

Re: Understanding what's going on when using a Huawei E173 USB 3G web-stick (UMTS/HSPA)

2014-11-04 Thread Dan Williams
On Tue, 2014-11-04 at 16:11 +0100, Sedat Dilek wrote: > Hi, > > I wanted to understand what is going on the kernel-side when > connecting to the Internet via a Huawei E173 USB web-stick (3rd > Generation: UMTS / HSPA). > > Especially the correlation between the diverse USB/NET kernel-drivers > an

Re: Understanding what's going on when using a Huawei E173 USB 3G web-stick (UMTS/HSPA)

2014-11-14 Thread Dan Williams
On Fri, 2014-11-14 at 11:56 +0100, Sedat Dilek wrote: > On Wed, Nov 12, 2014 at 2:21 PM, Sedat Dilek wrote: > > On Tue, Nov 4, 2014 at 5:55 PM, Dan Williams wrote: > >> On Tue, 2014-11-04 at 16:11 +0100, Sedat Dilek wrote: > >>> Hi, > >>> > >>&

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

2014-02-14 Thread Dan Williams
On Mon, Feb 10, 2014 at 1:01 PM, Alan Stern wrote: > The patch description here could be improved substantially. It should > start out with an explanation of the basic reason for the patch and a > clear indication of what the patch does. > > On Fri, 31 Jan 2014, Dan Williams w

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

2014-02-18 Thread Dan Williams
On Tue, Feb 18, 2014 at 2:40 PM, Julius Werner wrote: >> Can you take a look at it, and see if it would address your issue? I >> think it will catch the case where we transition from SS.Inactive -> >> RxDetect -> Polling. > > I don't think that's targeting the same problem. Hans seems to be > des

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

2014-02-18 Thread Dan Williams
On Tue, Feb 18, 2014 at 3:39 PM, Julius Werner wrote: >>> We don't need to change hub_port_debounce() right away... that was >>> just an additional suggestion to make things more efficient for >>> SuperSpeed devices in general. I think for now (in order to solve >>> Dan's problem), it would be bes

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

2014-02-20 Thread Dan Williams
On Fri, Feb 7, 2014 at 2:11 PM, Alan Stern wrote: > On Fri, 31 Jan 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 port pm runtime operations. > > The nomenclature is a little conf

Re: [RFC PATCH] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-21 Thread Dan Williams
On Fri, Feb 21, 2014 at 5:19 AM, Mathias Nyman wrote: > If autosuspend is set to zero the usb-2 roothub will try to suspend > the controller before usb-3 parts are initialized. > > Prevent this by incrementing the usage counter before usb-2 registers > its roothub. Decrement the counter when usb-3

Re: [RFC PATCH] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-21 Thread Dan Williams
On Fri, Feb 21, 2014 at 11:45 AM, Sarah Sharp wrote: > On Fri, Feb 21, 2014 at 01:57:25PM -0500, Alan Stern wrote: >> On Fri, 21 Feb 2014, Mathias Nyman wrote: >> > This is how I gather it works: >> > >> > Round 1: add usb2 hcd >> > >> > usb_add_hcd() // primary usb2 hcd >> >hcd->self.root_hu

Re: [RFC PATCH] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-21 Thread Dan Williams
On Fri, Feb 21, 2014 at 10:45 AM, Mathias Nyman wrote: >>> @@ -4753,6 +4753,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, >>> xhci_get_quirks_t get_quirks) >>> * companion controller. >>> */ >>> hcd->has_tt = 1; >>> + /* prevent USB

[PATCH v5 01/16] usb: disable port power control if not supported in wHubCharacteristics

2014-02-21 Thread Dan Williams
. This also consolidates support checks into a hub_is_port_power_switchable() helper. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |8 ++-- drivers/usb/core/hub.h | 10 ++ drivers/usb/core/port.c | 12 +++- 3 files changed, 19 insertions(+), 11 deletions

[PATCH v5 02/16] usb: assign default peer ports for root hubs

2014-02-21 Thread Dan Williams
. For now, simply perform the nominal association. [1]: usb 3.1 section 10.3.3 [2]: xhci 1.1 appendix D Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |2 + drivers/usb/core/port.c | 98 --- 2 files changed, 94 insertions(+), 6

[PATCH v5 03/16] usb: assign usb3 external hub port peers

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

[PATCH v5 06/16] usb: defer suspension of superspeed port while peer is powered

2014-02-21 Thread Dan Williams
connection. Prevent this by blocking power-off of a usb3 port while its usb2 peer is active, and powering on a usb3 port before its usb2 peer. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |5 - drivers/usb/core/hub.h |5 + drivers/usb/core/port.c | 50

[PATCH v5 08/16] usb: usb3 ports do not support FEAT_C_ENABLE

2014-02-21 Thread Dan Williams
The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. We expect khubd to be prevented from running because the port state is not RPM_ACTIVE, so we need to clear any errors for usb2 ports. Signed-off-by: Dan

[PATCH v5 07/16] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

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

[PATCH v5 04/16] usb: find internal hub tier mismatch via acpi

2014-02-21 Thread Dan Williams
implemented in this patch). [1]: xhci 1.1 appendix D figure 131 [2]: acpi 5 section 6.1.8 Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |6 ++ drivers/usb/core/port.c | 161 ++- drivers/usb/core/usb-acpi.c | 35 +++-- dr

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

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

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

2014-02-21 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 | 39 ++

[RFC PATCH v5 16/16] usb, xhci: flush initial hub discovery to gate port power control

2014-02-21 Thread Dan Williams
Until all root hubs have been discovered and tier mismatch identified, port power control is unreliable. When a USB3 port is paired with an incorrect peer port there is chance a connected device will downgrade its connection to its USB2 pins. The downgrade occurs when the USB3 port is powered off

[PATCH v5 05/16] usb: sysfs link peer ports

2014-02-21 Thread Dan Williams
-1:1.0/port4 usb3/3-0:1.0/port1/peer => ../../../usb2/2-0:1.0/port1 usb3/3-0:1.0/port2/peer => ../../../usb2/2-0:1.0/port2 usb3/3-0:1.0/port3/peer => ../../../usb2/2-0:1.0/port3 usb3/3-0:1.0/port4/peer => ../../../usb2/2-0:1.0/port4 Signed-off-by: D

[PATCH v5 09/16] usb: refactor port handling in hub_events()

2014-02-21 Thread Dan Williams
: 1/ reflowing to 80 columns 2/ replacing redundant usages of 'hub->hdev' with 'hdev' 3/ baseline debug prints on a common format of "port%d: " 4/ consolidate clearing of ->change_bits() in hub_port_connect_change Signed-off-by: Dan Willi

[PATCH v5 00/16] port power control rework

2014-02-21 Thread Dan Williams
Toggling port power currently leads to three unintended disconnect scenarios that are addressed by this rework of port power recovery and usb device resume: 1/ Superspeed devices downgrade to their hispeed connection when rx-detection fails on the superspeed pins. Address this by preventing su

[PATCH v5 10/16] usb: synchronize port poweroff and khubd

2014-02-21 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 | 62 +--- 1 files changed,

[PATCH v5 15/16] usb: convert khubd to a workqueue

2014-02-21 Thread Dan Williams
Both a cleanup, as khubd open codes several facilities that are provided by workqueue, and an enabling step for flushing initial port discovery operations. A do { } while (0) loop in hub_event() is used to minimize code thrash. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 146

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

2014-02-21 Thread Dan Williams
in Kim Cc: Vincent Palatin Cc: Lan Tianyu Cc: Ksenia Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 23 --- drivers/usb/core/hub.h |2 ++ drivers/usb/core/por

[PATCH v5 11/16] usb: introduce port status lock

2014-02-21 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. Signed-off-by: Dan Williams --- drivers/usb/core/hcd.c |2 - drivers/usb/core/hub.c | 102 +

Re: [RFC PATCH v5 16/16] usb, xhci: flush initial hub discovery to gate port power control

2014-02-22 Thread Dan Williams
On Fri, Feb 21, 2014 at 4:11 PM, Dan Williams wrote: > Until all root hubs have been discovered and tier mismatch identified, > port power control is unreliable. When a USB3 port is paired with an > incorrect peer port there is chance a connected device will downgrade > its conne

Re: [RFC PATCH] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-22 Thread Dan Williams
On Fri, Feb 21, 2014 at 1:17 PM, Alan Stern wrote: > On Fri, 21 Feb 2014, Dan Williams wrote: > >> > Round 2: add usb 3 hcd >> > >> > usb_add_hcd() // secondary usb3 hcd >> > hcd->self.root_hub = usb_alloc_dev() >> > hcd->drive

Re: [RFC PATCH] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 8:22 AM, Mathias Nyman wrote: > On 02/23/2014 12:51 AM, Alan Stern wrote: > > > Right, but I assume you'd want to hold the reference until after the > hub is registered, otherwise there's still a chance we suspend right > before register. So I'm saying hold

Re: [RFC PATCH v2] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-24 Thread Dan Williams
gt; busses and should not need to have it's usage count increased during probe. > > Signed-off-by: Mathias Nyman Acked-by: Dan Williams -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v5 14/16] usb: documentation for usb port power off mechanisms

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 2:17 AM, Oliver Neukum wrote: > On Fri, 2014-02-21 at 16:10 -0800, Dan Williams wrote: >> From: Lan Tianyu >> >> describe the mechanisms for controlling port power policy and >> discovering the port power state. >> >> Cc: Oliv

Re: [PATCH v5 14/16] usb: documentation for usb port power off mechanisms

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 9:58 AM, Oliver Neukum wrote: > On Mon, 2014-02-24 at 08:55 -0800, Dan Williams wrote: >> On Mon, Feb 24, 2014 at 2:17 AM, Oliver Neukum wrote: >> > On Fri, 2014-02-21 at 16:10 -0800, Dan Williams wrote: >> >> From: Lan Tianyu > >>

Re: [PATCH v5 14/16] usb: documentation for usb port power off mechanisms

2014-02-24 Thread Dan Williams
On Mon, 2014-02-24 at 18:58 +0100, Oliver Neukum wrote: > On Mon, 2014-02-24 at 08:55 -0800, Dan Williams wrote: > > On Mon, Feb 24, 2014 at 2:17 AM, Oliver Neukum wrote: > > > On Fri, 2014-02-21 at 16:10 -0800, Dan Williams wrote: > > >> From: Lan Tianyu

[PATCH] xhci: 'noxhci_port_switch' kernel parameter

2014-02-24 Thread Dan Williams
Freyther Suggested-by: Alan Stern Signed-off-by: Dan Williams --- Documentation/kernel-parameters.txt |3 +++ drivers/usb/host/pci-quirks.c | 15 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parame

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

2014-02-24 Thread Dan Williams
n Cc: Sarah Sharp Cc: Mathias Nyman Signed-off-by: Dan Williams --- drivers/usb/core/hcd.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 2518c3250750..ff7cd489f55d 100644 --- a/drivers/usb/core/hcd.c +++ b/driver

Re: [PATCH v5 14/16] usb: documentation for usb port power off mechanisms

2014-02-24 Thread Dan Williams
On Mon, 2014-02-24 at 14:11 -0500, Alan Stern wrote: > On Mon, 24 Feb 2014, Dan Williams wrote: > > > 8<--- > > Subject: usb: documentation for usb port power off mechanisms > > > > From: Lan Tianyu > > > > describe the mechanisms for controll

Re: [PATCH] xhci: 'noxhci_port_switch' kernel parameter

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 12:37 PM, Greg KH wrote: > On Mon, Feb 24, 2014 at 11:37:35AM -0800, Dan Williams wrote: >> Add a command line switch for disabling ehci port switchover. Useful >> for working around / debugging xhci incompatibilities where ehci >> operation is avail

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

2014-02-24 Thread Dan Williams
On Mon, 2014-02-24 at 15:44 -0500, Alan Stern wrote: > On Mon, 24 Feb 2014, Dan Williams 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

Re: [PATCH v5 02/16] usb: assign default peer ports for root hubs

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 1:46 PM, Alan Stern wrote: > On Fri, 21 Feb 2014, Dan Williams wrote: > >> Assume that the peer of a superspeed port is the port with the same id >> on the shared_hcd root hub. This identification scheme is required of >> external hubs by the USB3

Re: [PATCH v5 02/16] usb: assign default peer ports for root hubs

2014-02-24 Thread Dan Williams
On Mon, Feb 24, 2014 at 2:12 PM, Alan Stern wrote: > On Mon, 24 Feb 2014, Dan Williams wrote: > >> > Also, the gyrations you have to go through here and elsewhere to print >> > useful names indicate that we should set up better names for the port

Re: [PATCH v5 02/16] usb: assign default peer ports for root hubs

2014-02-24 Thread Dan Williams
On Mon, 2014-02-24 at 16:46 -0500, Alan Stern wrote: > On Fri, 21 Feb 2014, Dan Williams wrote: > > > Assume that the peer of a superspeed port is the port with the same id > > on the shared_hcd root hub. This identification scheme is required of > > external hubs by the

Re: [PATCH v5 05/16] usb: sysfs link peer ports

2014-02-24 Thread Dan Williams
On Fri, 2014-02-21 at 16:09 -0800, Dan Williams wrote: > The usb topology after this change will have symlinks between usb3 ports > and their usb2 peers, for example: > > usb2/2-1/2-1:1.0/port1/peer => ../../../../usb3/3-1/3-1:1.0/port1 > usb2/2-1/2-1:1.0/port2/peer => ../

Re: [PATCH v5 06/16] usb: defer suspension of superspeed port while peer is powered

2014-02-24 Thread Dan Williams
On Fri, 2014-02-21 at 16:09 -0800, Dan Williams wrote: > ClearPortFeature(PORT_POWER) on a usb3 port places the port in either a > DSPORT.Powered-off-detect / DSPORT.Powered-off-reset loop, or the > DSPORT.Powered-off state. There is no way to ensure that RX > terminations will per

Re: [PATCH v5 11/16] usb: introduce port status lock

2014-02-24 Thread Dan Williams
On Fri, 2014-02-21 at 16:10 -0800, 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 testing has been able to trigger an > unintended d

Re: [PATCH v5 06/16] usb: defer suspension of superspeed port while peer is powered

2014-02-24 Thread Dan Williams
On Mon, 2014-02-24 at 19:01 -0800, Dan Williams wrote: > As mentioned in the comments on patch 2, while ->peer is being modified > we don't want usb_port_runtime_{suspend|resume} to run. Introduce > pre_modify_peers() and post_modify_peers() to close that hole. ...thinking about

Re: [PATCH v5 02/16] usb: assign default peer ports for root hubs

2014-02-25 Thread Dan Williams
On Tue, Feb 25, 2014 at 12:20 PM, Alan Stern wrote: > On Mon, 24 Feb 2014, Dan Williams wrote: > >> @@ -163,12 +227,18 @@ int usb_hub_create_port_device(struct usb_hub *hub, >> int port1) >> port_dev->dev.parent = hub->intfdev; >> p

Re: [PATCH v5 06/16] usb: defer suspension of superspeed port while peer is powered

2014-02-25 Thread Dan Williams
On Tue, 2014-02-25 at 13:19 -0500, Alan Stern wrote: > On Mon, 24 Feb 2014, Dan Williams wrote: > > > On Mon, 2014-02-24 at 19:01 -0800, Dan Williams wrote: > > > As mentioned in the comments on patch 2, while ->peer is being modified > > > we don't want us

Re: [PATCH v5 06/16] usb: defer suspension of superspeed port while peer is powered

2014-02-26 Thread Dan Williams
On Wed, 2014-02-26 at 10:49 -0500, Alan Stern wrote: > On Tue, 25 Feb 2014, Dan Williams wrote: > > > > Look, we guarantee that the peer relation is dropped when either of the > > > devices is unregistered. Therefore there's no need to take a reference > >

Re: [PATCH v5 04/16] usb: find internal hub tier mismatch via acpi

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

Re: [PATCH v5 04/16] usb: find internal hub tier mismatch via acpi

2014-02-27 Thread Dan Williams
On Wed, Feb 26, 2014 at 2:07 PM, Alan Stern wrote: > On Wed, 26 Feb 2014, Dan Williams wrote: > >> > I've been thinking about this. Maybe it isn't a problem, because now >> > you don't set up the peer matching until after the port has been >> > r

Re: [PATCH v5 04/16] usb: find internal hub tier mismatch via acpi

2014-02-27 Thread Dan Williams
On Thu, Feb 27, 2014 at 10:48 AM, Alan Stern wrote: > On Thu, 27 Feb 2014, Dan Williams wrote: > >> > If the port's ACPI data agrees with the default matching, there's no >> > issue. But if they disagree, don't accept the default match. That way >>

Re: [RFC PATCH v2] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-28 Thread Dan Williams
On Fri, Feb 28, 2014 at 12:32 PM, Sarah Sharp wrote: > On Mon, Feb 24, 2014 at 12:44:46PM -0500, Alan Stern wrote: >> On Mon, 24 Feb 2014, Mathias Nyman wrote: >> >> > xHCI driver has its own pci probe function that will call usb_hcd_pci_probe >> > to register its usb-2 bus, and then continue to m

Re: [RFC PATCH v2] xhci: Prevent runtime pm from autosuspending during initialization

2014-02-28 Thread Dan Williams
On Fri, Feb 28, 2014 at 1:57 PM, Greg KH wrote: > On Fri, Feb 28, 2014 at 12:41:31PM -0800, Dan Williams wrote: >> On Fri, Feb 28, 2014 at 12:32 PM, Sarah Sharp >> wrote: >> > On Mon, Feb 24, 2014 at 12:44:46PM -0500, Alan Stern wrote: >> >> On M

[PATCH v6 part1 1/8] usb: disable port power control if not supported in wHubCharacteristics

2014-02-28 Thread Dan Williams
. This also consolidates support checks into a hub_is_port_power_switchable() helper. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |8 ++-- drivers/usb/core/hub.h | 10 ++ drivers/usb/core/port.c | 12 +++- 3 files changed, 19 insertions(+), 11 deletions

[PATCH v6 part1 0/8] port power control: cleanups and port peering

2014-02-28 Thread Dan Williams
Per Alan's request this is the first half of the series that addresses the following disconnect scenarios when attempting to use port power-off. These 8 patches address scenario 1. Scenarios 2 and 3 are addressed in part2 of this series (to be re-posted once part1 is accepted). 1/ Superspeed dev

[PATCH v6 part1 5/8] usb: assign usb3 external hub port peers

2014-02-28 Thread Dan Williams
igned-off-by: Dan Williams --- drivers/usb/core/hub.c | 13 +++-- drivers/usb/core/port.c | 26 -- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index e5742b888ac8..c463c09c0d37 100644 --- a/driv

[PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-02-28 Thread Dan Williams
not much the kernel can do in that case. [1]: xhci 1.1 appendix D figure 131 [2]: acpi 5 section 6.1.8 [alan]: don't do default peering when acpi data present Suggested-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.h |2 + drivers/u

[PATCH v6 part1 2/8] usb: rename usb_port device objects

2014-02-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 Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 268 ++- drive

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

2014-02-28 Thread Dan Williams
connection. Prevent this by blocking power-off of a usb3 port while its usb2 peer is active, and powering on a usb3 port before its usb2 peer. Signed-off-by: Dan Williams --- drivers/usb/core/hub.c |5 --- drivers/usb/core/hub.h |5 +++ drivers/usb/core/port.c | 72

[PATCH v6 part1 7/8] usb: sysfs link peer ports

2014-02-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. Signed-off-by: Dan Williams --- drivers/usb/core/port.c | 39 +

[PATCH v6 part1 3/8] usb: cleanup setting udev->removable from port_dev->connect_type

2014-02-28 Thread Dan Williams
fault setting determined from the hub descriptor. Suggested-by: Alan Stern Signed-off-by: Dan Williams --- drivers/usb/core/hub.c | 22 +- drivers/usb/core/usb-acpi.c | 30 +- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/dri

[PATCH v6 part1 4/8] usb: assign default peer ports for root hubs

2014-02-28 Thread Dan Williams
. For now, simply perform the nominal association. Once the root hub is marked as unregistered we block attempts to walk the ->shared_hcd pointer to find a root-peer port. [1]: usb 3.1 section 10.3.3 [2]: xhci 1.1 appendix D Signed-off-by: Dan Williams --- drivers/usb/core/hcd.c |

Re: [PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-02-28 Thread Dan Williams
On Fri, Feb 28, 2014 at 3:18 PM, Dan Williams wrote: > ACPI identifies peer ports by setting their 'group_token' and > 'group_position' _PLD data to the same value. If a platform has tier > mismatch [1] , ACPI can override the default (USB3 defined) peer port &g

Re: [PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-02-28 Thread Dan Williams
On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > ACPI identifies peer ports by setting their 'group_token' and > 'group_position' _PLD data to the same value. If a platform has tier > mismatch [1] , ACPI can override the default (USB3 defined) peer port &g

Re: [PATCH v6 part1 1/8] usb: disable port power control if not supported in wHubCharacteristics

2014-03-03 Thread Dan Williams
On Mon, 2014-03-03 at 16:18 -0500, Alan Stern wrote: > On Fri, 28 Feb 2014, Dan Williams wrote: > > > A hub indicates whether it supports per-port power control via the > > wHubCharacteristics field in its descriptor. If it is not supported > > a hub will still emulate C

Re: [PATCH v6 part1 2/8] usb: rename usb_port device objects

2014-03-03 Thread Dan Williams
On Mon, 2014-03-03 at 16:31 -0500, Alan Stern wrote: > On Fri, 28 Feb 2014, Dan Williams wrote: > > > The current port name "portX" is ambiguous. Before adding more port > > messages rename ports to "-portX" > > > > This is an ABI change,

Re: [PATCH v6 part1 3/8] usb: cleanup setting udev->removable from port_dev->connect_type

2014-03-03 Thread Dan Williams
On Mon, 2014-03-03 at 16:36 -0500, Alan Stern wrote: > On Fri, 28 Feb 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 v6 part1 4/8] usb: assign default peer ports for root hubs

2014-03-03 Thread Dan Williams
On Mon, 2014-03-03 at 17:21 -0500, Alan Stern wrote: > On Fri, 28 Feb 2014, Dan Williams wrote: > > > Assume that the peer of a superspeed port is the port with the same id > > on the shared_hcd root hub. This identification scheme is required of > > external hubs by the

Re: [PATCH v6 part1 4/8] usb: assign default peer ports for root hubs

2014-03-03 Thread Dan Williams
On Mon, Mar 3, 2014 at 5:13 PM, Dan Williams wrote: > On Mon, 2014-03-03 at 17:21 -0500, Alan Stern wrote: >> On Fri, 28 Feb 2014, Dan Williams wrote: >> >> > Assume that the peer of a superspeed port is the port with the same id >> > on the shared_hcd root hu

Re: [PATCH v6 part1 4/8] usb: assign default peer ports for root hubs

2014-03-03 Thread Dan Williams
On Mon, 2014-03-03 at 17:13 -0800, Dan Williams wrote: > On Mon, 2014-03-03 at 17:21 -0500, Alan Stern wrote: > > On Fri, 28 Feb 2014, Dan Williams wrote: > > > > > Assume that the peer of a superspeed port is the port with the same id > > > on the shared_hcd root

Re: [PATCH v6 part1 5/8] usb: assign usb3 external hub port peers

2014-03-03 Thread Dan Williams
On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > Given that root hub port peers are already established, external hub peer > ports can be determined by traversing the device topology: > > 1/ ascend to the parent hub and find the upstream port_dev > > 2/ walk ->peer

Re: [PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-03-03 Thread Dan Williams
On Fri, 2014-02-28 at 16:29 -0800, Dan Williams wrote: > On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > > ACPI identifies peer ports by setting their 'group_token' and > > 'group_position' _PLD data to the same value. If a platform has tier >

Re: [PATCH v6 part1 7/8] usb: sysfs link peer ports

2014-03-03 Thread Dan Williams
On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > The usb topology after this change will have symlinks between usb3 ports > and their usb2 peers, for example: > > usb2/2-1/2-1:1.0/2-1-port1/peer => ../../../../usb3/3-1/3-1:1.0/3-1-port1 > usb2/2-1/2-1:

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

2014-03-03 Thread Dan Williams
On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > ClearPortFeature(PORT_POWER) on a usb3 port places the port in either a > DSPORT.Powered-off-detect / DSPORT.Powered-off-reset loop, or the > DSPORT.Powered-off state. There is no way to ensure that RX > terminations will per

Re: [PATCH v6 part1 4/8] usb: assign default peer ports for root hubs

2014-03-05 Thread Dan Williams
On Tue, 2014-03-04 at 10:58 -0500, Alan Stern wrote: > On Mon, 3 Mar 2014, Dan Williams wrote: > > > Ok, so the root issue is that the peering code needs to see > > hcd->primary_hcd = NULL to know that there is no longer a peer. I > > update usb_remove_hcd() to

Re: [PATCH v6 part1 5/8] usb: assign usb3 external hub port peers

2014-03-05 Thread Dan Williams
On Mon, 2014-03-03 at 18:33 -0800, Dan Williams wrote: > Subject: usb: assign usb3 external hub port peers > > From: Dan Williams > > Given that root hub port peers are already established, external hub peer > ports can be determined by traversing the device topology: >

Re: [PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-03-05 Thread Dan Williams
ORT_SYMBOL_GPL(usb_acpi_power_manageable); > > > > +static void usb_acpi_check_port_peer(struct usb_device *hdev, > > + acpi_handle *handle, int port1, struct acpi_pld_info *pld) > > +{ > > + if (!pld) > > + return; > > + > > + #define USB_ACPI_

Re: [PATCH v6 part1 7/8] usb: sysfs link peer ports

2014-03-05 Thread Dan Williams
On Mon, 2014-03-03 at 18:39 -0800, Dan Williams wrote: > On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > > The usb topology after this change will have symlinks between usb3 ports > > and their usb2 peers, for example: > > > > usb2/2-1/2-1:1.0/2-1-port1/peer

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

2014-03-05 Thread Dan Williams
On Mon, 2014-03-03 at 18:42 -0800, Dan Williams wrote: > On Fri, 2014-02-28 at 15:18 -0800, Dan Williams wrote: > > ClearPortFeature(PORT_POWER) on a usb3 port places the port in either a > > DSPORT.Powered-off-detect / DSPORT.Powered-off-reset loop, or the > > DSPORT.Powered

Re: [PATCH v6 part1 4/8] usb: assign default peer ports for root hubs

2014-03-05 Thread Dan Williams
On Wed, Mar 5, 2014 at 12:18 PM, Alan Stern wrote: > On Wed, 5 Mar 2014, Dan Williams wrote: > >> Please have a look at the following. I'm sure Greg will be happy that >> we are killing these bugs before they become fodder for -stable. Thanks > > Wow, do you really

Re: [PATCH RESEND] SCSI: sd: don't fail if the device doesn't recognize SYNCHRONIZE CACHE

2014-03-05 Thread Dan Williams
mann > Tested-by: Daniel Mack > CC: Oliver Neukum > CC: > --- > Hi, > > this patch has been around for awhile, but hasn't gained much > attraction, and hasn't been merged anywhere yet. Which is sad, > as it fixes a bug on real hardware when going to suspend :

Re: [PATCH v6 part1 6/8] usb: find internal hub tier mismatch via acpi

2014-03-05 Thread Dan Williams
On Wed, 2014-03-05 at 16:44 -0500, Alan Stern wrote: > On Wed, 5 Mar 2014, Dan Williams wrote: > > > 8< > > Subject: usb: find internal hub tier mismatch via acpi > > > > From: Dan Williams > > > > ACPI identifies peer ports by settin

Re: uhci_hcd: DMA-API: cpu touching an active dma mapped cacheline

2014-03-06 Thread Dan Williams
On Thu, Mar 6, 2014 at 10:04 AM, Alan Stern wrote: > On Wed, 5 Mar 2014, Dave Jones wrote: > >> WARNING: CPU: 3 PID: 25477 at lib/dma-debug.c:593 >> debug_dma_assert_idle+0x1ba/0x223() >> uhci_hcd :00:1d.2: DMA-API: cpu touching an active dma mapped cacheline >> [cln=0x02355f80] >> M

Re: uhci_hcd: DMA-API: cpu touching an active dma mapped cacheline

2014-03-06 Thread Dan Williams
On Thu, Mar 6, 2014 at 10:31 AM, Dan Williams wrote: > On Thu, Mar 6, 2014 at 10:04 AM, Alan Stern wrote: >> On Wed, 5 Mar 2014, Dave Jones wrote: >> >>> WARNING: CPU: 3 PID: 25477 at lib/dma-debug.c:593 >>> debug_dma_assert_idle+0x1ba/0x223() >>> uhci_

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

2014-03-13 Thread Dan Williams
-0500, Alan Stern wrote: > On Wed, 5 Mar 2014, Dan Williams wrote: > > > 8<- > > Subject: usb: block suspension of superspeed port while hispeed peer is > > active > > > > From: Dan Williams > > > > ClearPortFeature(PORT_POWER) on a

[PATCH v6 part2 3/8] usb: refactor port handling in hub_events()

2014-03-13 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 | 346 1

[PATCH v6 part2 4/8] usb: synchronize port poweroff and khubd

2014-03-13 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 v6 part2 1/8] usb: don't clear FEAT_C_ENABLE on usb_port_runtime_resume failure

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

[PATCH v6 part2 0/8] port power control: pm and portstatus synchronization

2014-03-13 Thread Dan Williams
Per Alan's request this is the second half of the series that addresses the following disconnect scenarios when attempting to use port power-off. Now that part1 is mostly acked, these 8 patches address scenarios 2 and 3. Scenario one was addressed in part1 [1] 1/ Superspeed devices downgrade to

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

2014-03-13 Thread Dan Williams
The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE after clearing PORT_POWER, but the bit is reserved on usb3 hub ports. We expect khubd to be prevented from running because the port state is not RPM_ACTIVE, so we need to clear any errors for usb2 ports. Signed-off-by: Dan

[PATCH v6 part2 7/8] usb: force warm reset to break link re-connect livelock

2014-03-13 Thread Dan Williams
alatin Cc: Lan Tianyu Cc: Ksenia Ragiadakou Cc: Vivek Gautam Cc: Douglas Anderson Cc: Felipe Balbi Cc: Sunil Joshi 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 v6 part2 6/8] usb: resume (wakeup) child device when port is powered on

2014-03-13 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 v6 part2 8/8] usb: documentation for usb port power off mechanisms

2014-03-13 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 v6 part2 5/8] usb: introduce port status lock

2014-03-13 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 net-next v6 0/3] The huawei_cdc_ncm driver / E3276 problem

2014-03-13 Thread Dan Williams
On Thu, 2014-03-13 at 22:25 +0200, Pasi Kärkkäinen wrote: > On Mon, Nov 04, 2013 at 09:50:46AM +0100, Bjørn Mork wrote: > > > > [quote Enrico Mioso] > > > > So this is a new, revised, edition of the huawei_cdc_ncm.c driver, which > > supports devices resembling the NCM standard, but using it als

<    1   2   3   4   5   6   7   >