Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp485150ybn; Thu, 3 Oct 2019 07:54:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCCsfSIGRqi+/pXunv69+ErHEnN+C5+5lYvdTAgzR4JN2aBgHoIhjHOOvjgclbvp61BOVq X-Received: by 2002:aa7:d883:: with SMTP id u3mr9801370edq.281.1570114481741; Thu, 03 Oct 2019 07:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570114481; cv=none; d=google.com; s=arc-20160816; b=TQfU/GbCiaGgJ+H7WYN0XfhF6enobPjvWFyfoMHNo3QJLFrgHNjbHsEfy2gd38sstQ 6SnCQX2UiF/wa9gUsfpU6i846HJm5g/ec3Tc4jp/BdGX0BhYY9DIhNwcLjJ7SJVSUdfi mgyPYPrUp4zc97JUaJFIKTPCSfkWI/3xei7dKXpTa9BHTyJnZ9rBU6U1NPClGTb0vTyp ksgipOUEWYnijZfPBHf0/uIWZuhXcFXHYVmY3U7X1A8/xDLXy1dDPW0uvVku3SgHWdgK ujIp2qIifDh3zSzFO9lQRg7tlD+Jt29FxPcx3S+mYgPtNUKHk++BRMNFKrDfGbJ0s14A bWsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=JZQFKlg7F9XDByowfYIG35fWK7/j/f5mAxvy/MfHZ54=; b=B4/YUCr1k8OlGwbeS3BR0bixkQ3XMZ7wqCiWkyldNa82QSHNSLp0C/hvbWGTWiuu4Y yUytt411oedoyrmh2LreDNilsfq8jOmT7LR3DLS7XwqC9qM+o2p7Z1EnNPhKTfz7x44C be9/wfAi4Afcmu1VUrDrtVm/qyIHip7AyTYxnYuDeiMOdTHi3TZzy9ls8rS1HMQAp++b uiP04gE5iLbXWHm6zmda7j3p8gvWkRW9HH6fwI6zkTmamJLggt2vWTCUdZcSj9KhNWX8 BSVSyrCAujEGY+bOgbsbqEeyXbnYTcegbRp7sf+6vIlV1GEKpOfyR80XXAONeOZH8eVL YoWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si1733772eda.284.2019.10.03.07.54.16; Thu, 03 Oct 2019 07:54:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730140AbfJCO0U (ORCPT + 99 others); Thu, 3 Oct 2019 10:26:20 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:44202 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726393AbfJCO0U (ORCPT ); Thu, 3 Oct 2019 10:26:20 -0400 Received: (qmail 3509 invoked by uid 2102); 3 Oct 2019 10:26:19 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 3 Oct 2019 10:26:19 -0400 Date: Thu, 3 Oct 2019 10:26:19 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Kai-Heng Feng cc: mathias.nyman@intel.com, , , Subject: Re: [PATCH] Revert "usb: Avoid unnecessary LPM enabling and disabling during suspend and resume" In-Reply-To: <123BCB7F-5ABA-4DDD-9599-46D3240903F6@canonical.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Oct 2019, Kai-Heng Feng wrote: > > On Oct 2, 2019, at 23:47, Alan Stern wrote: > > > > On Wed, 2 Oct 2019, Kai-Heng Feng wrote: > > > >> This reverts commit d590c23111505635e1beb01006612971e5ede8aa. > >> > >> Dell WD15 dock has a topology like this: > >> /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M > >> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/7p, 5000M > >> |__ Port 2: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M > >> > >> Their IDs: > >> Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub > >> Bus 004 Device 002: ID 0424:5537 Standard Microsystems Corp. > >> Bus 004 Device 004: ID 0bda:8153 Realtek Semiconductor Corp. > >> > >> Ethernet cannot be detected after plugging ethernet cable to the dock, > >> the hub and roothub get runtime resumed and runtime suspended > >> immediately: > >> ... > > > >> After some trial and errors, the issue goes away if LPM on the SMSC hub > >> is disabled. Digging further, enabling and disabling LPM during runtime > >> resume and runtime suspend respectively can solve the issue. > >> > >> So bring back the old LPM behavior, which the SMSC hub inside Dell WD15 > >> depends on. > >> > >> Fixes: d590c2311150 ("usb: Avoid unnecessary LPM enabling and disabling during suspend and resume") > >> Signed-off-by: Kai-Heng Feng > > > > Maybe it would be better to have a VID/PID-specific quirk for this? > > Re-reading the spec, I think we need some clarification: > "If the value is 3, then host software wants to selectively suspend the > device connected to this port. The hub shall transition the link to U3 > from any of the other U states using allowed link state transitions. > If the port is not already in the U0 state, then it shall transition the > port to the U0 state and then initiate the transition to U3." > > The phrase "then it shall transition the port to the U0 state" what does "it" here refer to? > Is it the hub or the software? > If it's the former then it's indeed a buggy hub, but if it's the latter I think reverting the commit is the right thing to do. In my opinion, "it" here refers to the hub. This is because of the parallel construction with the preceding sentence ("... shall transition the link/port"), which indicates that the subjects should be the same. Alan Stern