Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3681083ybi; Mon, 27 May 2019 04:16:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/hS0aU9rLI7dSHUHU6h9nJFXhmoIvzycMAkSoO2EYP5dlulyudmR6O/p+Oj0gcdgovoX2 X-Received: by 2002:a17:902:ba84:: with SMTP id k4mr27228666pls.55.1558955798262; Mon, 27 May 2019 04:16:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558955798; cv=none; d=google.com; s=arc-20160816; b=vV1jodaoDnU31opkFzWA2I9Fk6nkU+ulxA/FV46gRrkaDUTao7DFeqpbyI+3NK5Wua S6oDEfYvfXoF8H6gxMLDrkRLMlGxczfrqxd0FZIX+FY353jjg4hLbrjkeZtyp3grVeMo 6ZEE3KPAfwsl8UwhyUcOsmJXyUDCkajfA0EZsXvNtCnFlE07oXiF5fCybc4Wtqu6pP3K fWpnb9ISBe5vKJZ3e4HDozs9LGHqLOySjffzJAzfvAORGn7ceh6rYjZbOGfhy09Xea7g FDM0vD0Hc2am0FG6CFueC8rx1gzPfkQNNwt+6p2WVDd+72wGyPGLopWbWQfokWBymkbs fLEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=711dEKjrP4WgToHLC0iTG0WFrAyeKrkS23BRyExTm1g=; b=FMH5EqnyTyRditvSdX4QEpRuUlbyUcdxZTKXqJGX4pghGsreVitbvmkeoxsW7raE8C SMxFzvEoUs7XYfYY+E8+a0JnVrCkRRu6KAigdg1Hf5JsSczMSpdMCiiZ6MhiwsIRZHnK 7DhQ/HPl5lAEfJ/BmvhWhumUVi2eRoQ/yuCzW4YnAI6hP1Wiryqmz3DDoAKmP02/H58O SWtur2yp7kX8urC1GgDpr9O0iXHPJE/Yzi+WrSr8HzSMyFvEFQvuJdcT4jqNeytdjQQc rezsHKhu6yekkh/KMxZ7Q3Lw4V6pYHXOO3VqeXMnSXSD5a7+LNIoYFTBbjc/nDFF2SZe cBNg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s6si18619571pjc.39.2019.05.27.04.16.22; Mon, 27 May 2019 04:16:38 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfE0LOS (ORCPT + 99 others); Mon, 27 May 2019 07:14:18 -0400 Received: from mga17.intel.com ([192.55.52.151]:12544 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbfE0LOS (ORCPT ); Mon, 27 May 2019 07:14:18 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 04:14:17 -0700 X-ExtLoop1: 1 Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.164]) ([10.237.72.164]) by orsmga007.jf.intel.com with ESMTP; 27 May 2019 04:14:15 -0700 Subject: Re: [PATCH] xhci: clear port_remote_wakeup after resume failure To: Nicolas Saenz Julienne , Mathias Nyman Cc: oneukum@suse.com, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190524145231.6605-1-nsaenzjulienne@suse.de> From: Mathias Nyman Message-ID: Date: Mon, 27 May 2019 14:16:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190524145231.6605-1-nsaenzjulienne@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24.5.2019 17.52, Nicolas Saenz Julienne wrote: > This was seen on a Dell Precision 5520 using it's WD15 dock. The dock's > Ethernet device interfaces with the laptop through one of it's USB3 > ports. While idle, the Ethernet device and HCD are suspended by runtime > PM, being the only device connected on the bus. Then, both are resumed on > behalf of the Ethernet device, which has remote wake-up capabilities. > > The Ethernet device was observed to randomly disconnect from the USB > port shortly after submitting it's remote wake-up request. Probably a > weird timing issue yet to be investigated. This causes runtime PM to > busyloop causing some tangible CPU load. The reason is the port gets > stuck in the middle of a remote wake-up operation, waiting for the > device to switch to U0. This never happens, leaving "port_remote_wakeup" > enabled, and automatically triggering a failure on any further suspend > operation. > > This patch clears "port_remote_wakeup" upon detecting a device with a > wrong resuming port state (see Table 4-9 in 4.15.2.3). Making sure the > above mentioned situation doesn't trigger a PM busyloop. > There was a similar case where the USB3 link had transitioned to a lower power U1 or U2 state after resume, before driver read the state, leaving port_remote_wakeup flag uncleared. This was fixed in 5.1 kernel by commit: 6cbcf59 xhci: Fix port resume done detection for SS ports with LPM enable Can you check if you have it? It should be in recent stable releases as well. -Mathias