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 clear out -shared_hcd and -primary_hcd

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

2014-03-05 Thread Alan Stern
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 think all these changes will ever go into -stable? I'm doubtful; they're rather large.

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 st...@rowland.harvard.edu 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 think all

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

2014-03-04 Thread Alan Stern
On Mon, 3 Mar 2014, Dan Williams wrote: In general I agree, and I like the compartmentalization of only needing to take the lock in hub.c. But I still think we have a hole with a scenario like the following (granted, this should never happen in current code...): CPU1

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

2014-03-04 Thread Alan Stern
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 clear out -shared_hcd and -primary_hcd under the peer lock before we allow the root hub to be freed.

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

2014-03-03 Thread Alan Stern
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 USB3 spec [1]. However, for root hubs, tier mismatch may be in effect [2]. Tier

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 USB3 spec [1]. However, for

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 dan.j.willi...@intel.com 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 hub. This identification

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 hub. This identification scheme is

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

2014-02-28 Thread Dan Williams
Assume that the peer of a superspeed port is the port with the same id on the shared_hcd root hub. This identification scheme is required of external hubs by the USB3 spec [1]. However, for root hubs, tier mismatch may be in effect [2]. Tier mismatch can only be enumerated via platform