Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp850240imu; Fri, 11 Jan 2019 10:06:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN7zZaJ3KN5WAeuAvUSoKnqCOdI6dOLndD/2HjoxS+98UHYi26F1TlU2VfYcv/KxPAzlGvOA X-Received: by 2002:a17:902:d891:: with SMTP id b17mr15876345plz.80.1547230012931; Fri, 11 Jan 2019 10:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547230012; cv=none; d=google.com; s=arc-20160816; b=EgvvcknbO+VGjGBPjjkzZnrgzMTAFB8B1e2LjO9fKziSGcSbQWH7/udH/jwY3r0ip0 HKTX1BY9zQTARCb498hja1OK8rjxIlpmD7d6KSls1q+yGgxZCuvi+xOcKQVd7XVQdf5V nWADEClIRGZar3Po8OU0Np9foIpPSQYEOpBoI/hidLGP1XOQSEwMJULYLLXWC5fZcdmQ YEPJc1lP0U+2R6QzQk8ZKL/TXq3GDHjwGbW/2qCHbZCrjDjADwNnHurG/D07mrH3CF6X aiPfzrQBE94UtXQwWV3N724u3yFTgli0ZLoAAOFfgDg6gDWX68MOYrOtZuVoZKtqIAKF rIUQ== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mmRYHbBkUP8dOOjPTGY//Sz+SjawvXjkcKmiPv5NPuQ=; b=QBtJkpiMXLU9L3gZ3UWFBeetB69oTv9V+rvQoViXL3X3Jfs+ZZyFl1szWntxOfgXsS vvZOW04iLaxDKMOQ+XHNsK7rik3U4dDEV56ZoPit3Wm1q8wKR5Z7ioOaCuBvuBTUpT0z 4Ns6hJPlqli/hPiu/jQ01UnyRctrDRZJDcvoToonDT/jQldMZbYT1vly6niltoBMQBgB RvfUIVrfpnlRBkar0fUo5zDCdCf4X4oft7BBdsBSaPWTwgV25B1TmK+fr9i3ArTlE9Zx LlNKDIHH826Ty/nSl/xxWMqAAabuU8FMOmDux6WsDFdnn9ZbqBAqjqZqkxDOI4RSnL0w OFzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bsp6vf2m; 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 p9si32634850pll.63.2019.01.11.10.06.37; Fri, 11 Jan 2019 10:06:52 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=Bsp6vf2m; 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 S2387680AbfAKOQh (ORCPT + 99 others); Fri, 11 Jan 2019 09:16:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:32814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731311AbfAKOQf (ORCPT ); Fri, 11 Jan 2019 09:16:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 587FA214D8; Fri, 11 Jan 2019 14:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547216194; bh=Yi7UWpode7Q2FAbhuyp5t7reHFre/Nh0HpwnsFO47KE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bsp6vf2mUaWCtLzn8hMAhKeFEQCyKWkVRan4MrYPBIEoS68ioHLlgNSQ+3sQxF+cE qwMFZs4xUh3S70jud5rH/Ee4FFvFC3gMji79HwBrmH4SA5ckY2Ozzh086BRUKqxto+ kYk7PZRcUA+so5KcSY9iR/lQZXwKmaTToe5O7txM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mathias Nyman Subject: [PATCH 4.4 02/88] xhci: Dont prevent USB2 bus suspend in state check intended for USB3 only Date: Fri, 11 Jan 2019 15:07:31 +0100 Message-Id: <20190111131046.711762405@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111131045.137499039@linuxfoundation.org> References: <20190111131045.137499039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mathias Nyman commit 45f750c16cae3625014c14c77bd9005eda975d35 upstream. The code to prevent a bus suspend if a USB3 port was still in link training also reacted to USB2 port polling state. This caused bus suspend to busyloop in some cases. USB2 polling state is different from USB3, and should not prevent bus suspend. Limit the USB3 link training state check to USB3 root hub ports only. The origial commit went to stable so this need to be applied there as well Fixes: 2f31a67f01a8 ("usb: xhci: Prevent bus suspend if a port connect change or polling state is detected") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-hub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -1329,7 +1329,8 @@ int xhci_bus_suspend(struct usb_hcd *hcd portsc_buf[port_index] = 0; /* Bail out if a USB3 port has a new device in link training */ - if ((t1 & PORT_PLS_MASK) == XDEV_POLLING) { + if ((hcd->speed >= HCD_USB3) && + (t1 & PORT_PLS_MASK) == XDEV_POLLING) { bus_state->bus_suspended = 0; spin_unlock_irqrestore(&xhci->lock, flags); xhci_dbg(xhci, "Bus suspend bailout, port in polling\n");