Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp501464ybn; Thu, 3 Oct 2019 08:07:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqx55ZqObcDRSfvnqxMMoHPSKbkeAt+tm+EjVcMp6QyDQosO9kR1OcTCE1S86eX0PACOpBYe X-Received: by 2002:a2e:4704:: with SMTP id u4mr6525511lja.203.1570115234162; Thu, 03 Oct 2019 08:07:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570115234; cv=none; d=google.com; s=arc-20160816; b=vjjq6pPtS/dCzVN6eXE9+O5g4LPQP3rDmV4G+Tyj4f088BaDkqXw3pGtRto+NTejpj AQPF0icXSGEnqWaiyFjKTvQtZQ+xyQzIvaDOKH8/W/mUd69Tl2vPjXl2LF2pcUKdErb7 5mL89fGnmYzeNdqtjThvJHO1Z5gxKCjQ3nB5RLPe4dzOcW72kTbvZaSLKlGZHLdw6uln rKLRczhLdZ306KJgOHofDc/Bnyri8vY1uXZ+Y3hUDqISX5XJjhEpe7XeLJ0aibUvQj89 A9L0dKkw1nxb79DWaXEUv/H8cIVH2S/I4603j739zskqYUEls3H2mgbxkI5SdpLaBdV5 4OlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=xmxUI7JPdfcNudNLzePuLBKv/MrkuGXmGDRw04vWjKQ=; b=tswd7JehF4QI8UC/HFr8j/Pq704jrO6g+PNeoA9spnIGzngt/LSdOqLYTd8azFU1dw aCyiIQfOZCNtkbBe/LLgUMILDnmQAaxubGbmH5631YRamCYkDCaurQGCrpQKXiwUAvEL xHwQQ5HPkBaRt4m8kdhZ06QWWDa1tUTHZjq6oRwGmi7rCknaqN7B51CTUmvmim4MWuUd CUVXFNSxGqUQ5AUMntCrdeAOA8xPEzdqYJfnJ5ze7HH3zJqbB/VYTdxG6rOzvud5p8s2 cyv9LkU6CpJOcOh35TrFvElpABieE4c9xCWzoU/7tDc3GMCREgja+a/mOlsE1idtbRjz K0WA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si1258935eju.329.2019.10.03.08.06.45; Thu, 03 Oct 2019 08:07:14 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729992AbfJCO5k convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Oct 2019 10:57:40 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50271 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfJCO5k (ORCPT ); Thu, 3 Oct 2019 10:57:40 -0400 Received: from mail-pg1-f200.google.com ([209.85.215.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iG2Xy-00004q-J6 for linux-kernel@vger.kernel.org; Thu, 03 Oct 2019 14:57:38 +0000 Received: by mail-pg1-f200.google.com with SMTP id z7so2139504pgk.11 for ; Thu, 03 Oct 2019 07:57:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W0SWomT5SY0yDSTtHUSDJc9LHcZaOyfwcQXgQs9p9z4=; b=pYkH9fwwoSXBo7fT5FfxZ9Ngk58OkMv54PMua7PqE6inJdbj31q3WooILFQy3wHnsW wG9Mj9zcYr069Tiro50jiStNjZcSzUb4Pui93QeoC5DPhmwmNWxD2MdpGXYA7kWDI2IW FQ4C/0oGw6HZ5waD3/HtlWn2JtWVJjaUYVCUVAI+qkU85R7fnBO75HzguncHN2vGrNAm v3xk9P/0oUUYoOO5SYSTs68nIeqmFVzreNZpkjlJ1ID5ADWeTd/IHJN2LoT9AneF1/A8 FOuFRY5aARBryI8J2C7ej+s4//fgTJCBC1SvFx/DoRx93ZSNPksg/A9ZLXBjHTu02YFx cb5w== X-Gm-Message-State: APjAAAWqgR2NySx3vG7F8NQeqqyka8aisZt4/9ESMU4ASvSeQFTIzh+P 1cZM2E0votcc+wVDsrOGf+LL4mqCYUTFz8HOIl8aPLnY+KYqm/3cbmKPbzdXyo1yl9DeuDuk0TS YDsvY/RLOUr2ocQxTksVnMga+MU/y9974Gg/72Gfvxg== X-Received: by 2002:a62:2b4d:: with SMTP id r74mr11513014pfr.30.1570114657200; Thu, 03 Oct 2019 07:57:37 -0700 (PDT) X-Received: by 2002:a62:2b4d:: with SMTP id r74mr11512986pfr.30.1570114656861; Thu, 03 Oct 2019 07:57:36 -0700 (PDT) Received: from 2001-b011-380f-3c42-0c4b-be14-8894-cacf.dynamic-ip6.hinet.net (2001-b011-380f-3c42-0c4b-be14-8894-cacf.dynamic-ip6.hinet.net. [2001:b011:380f:3c42:c4b:be14:8894:cacf]) by smtp.gmail.com with ESMTPSA id p66sm3205097pfg.127.2019.10.03.07.57.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Oct 2019 07:57:36 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.18\)) Subject: Re: [PATCH] Revert "usb: Avoid unnecessary LPM enabling and disabling during suspend and resume" From: Kai-Heng Feng In-Reply-To: Date: Thu, 3 Oct 2019 22:57:33 +0800 Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: To: Alan Stern X-Mailer: Apple Mail (2.3594.4.18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Oct 3, 2019, at 22:26, Alan Stern wrote: > > 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. Hmm, okay, this is ambiguous to a non-native speaker like me. I'll use a quirk instead. Kai-Heng > > Alan Stern >