Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1403324ybp; Thu, 17 Oct 2019 12:16:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfsYlQOH+XKuW5Zj2Cdxb2c4tRPivmvA5ag5NYh6/kjyHrYk5FIh2Odo4Uqw6STnB24JCy X-Received: by 2002:a05:6402:698:: with SMTP id f24mr5589874edy.172.1571339761551; Thu, 17 Oct 2019 12:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571339761; cv=none; d=google.com; s=arc-20160816; b=UGtoyJs+KN+C/IR7GZ6MCJc+GGD8a1ApktNo8l+gvdAhwC+3RR7wOEiE7MOoNUNJvE kR9bPmKt3nAmhY3Kn/abrkyLQ9c4ce1UWXNF5EF+NZq81b3pxUoMTPxgOVqvSoyiIiy7 fZ287sa0dGaUUofz9FhIMZrvFk4Klwk8RJz89Fp7/1eSGDdWRfYXMQ+VydKvxNqtHSOc 9RCzoiEh4MCKuC2KlDriXcMDKMe4+YoGVbJiQNmqVnegG2mQHJPeQ7fzeYrUorQzvGmq WjhHETCkljTn+bBSbm9cTAqXhp94aFgfbpqzp+eDBClZJCc65dCU3VISiJT0CKl9ynp7 s3pw== 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=AsXK7jK2lrll+EiupKpoSCG0S3WBhaBDmpB20ce59fk=; b=cSv0Ti/2P5gEXM1ihE6PL4vpYWgvvhhyA9HduG2ef2kRcQSye6Xk0rDknnVmZ7h2SD Pa9Qe7JE/lrYakjTtYg2+xxemKoFQk/SJKky9hWi5NvsKN5t2ixH+IKk341DUd56b6NM DBsYxeDKAah7vjIl7hj//IIhZsjSRtRHrRJ6/QAnixezXxjeGVikbLjdbyuBcoRWTBSl k+bPmbY46g2l8Q6FSAf1FLWhQMp3E3Gv7CSpdPAEARMhMGIX6L/VOtBnb4piPjoTgRTk DqmN68uA+5vovWk1ZGE5BSnM7/0ISSBkyzPwKyvJzJHsEucFwaNkq8mMUOoUckFnmO9d g54A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QjsUCSBj; 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 gf9si1999556ejb.230.2019.10.17.12.15.38; Thu, 17 Oct 2019 12:16:01 -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; dkim=pass header.i=@kernel.org header.s=default header.b=QjsUCSBj; 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 S2407414AbfJPWOg (ORCPT + 99 others); Wed, 16 Oct 2019 18:14:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:46632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395295AbfJPVzk (ORCPT ); Wed, 16 Oct 2019 17:55:40 -0400 Received: from localhost (unknown [192.55.54.58]) (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 026C3218DE; Wed, 16 Oct 2019 21:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262940; bh=xBv6euVUba1KDurWy57fxqcrbRNebHaS6oJgdEzMgek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QjsUCSBj2eWSY6bS4L7+QsOdals9XxAKH/O4XCzy9oFQDBfDRlgxyfsOENdOFxXW8 7TBbfAf4ygD+fsNEoVaUHVU/HX/zfdba4IeaxZQwkN7Bs7unhtoXBhlqfu6bwWBoEx wHhurZX8unvzXDNUEz5j8W2o7+kEhilSnOHIhUCk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Schmidt , Philipp Zabel , Mathias Nyman Subject: [PATCH 4.14 10/65] xhci: Check all endpoints for LPM timeout Date: Wed, 16 Oct 2019 14:50:24 -0700 Message-Id: <20191016214804.034964188@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214756.457746573@linuxfoundation.org> References: <20191016214756.457746573@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Jan Schmidt commit d500c63f80f2ea08ee300e57da5f2af1c13875f5 upstream. If an endpoint is encountered that returns USB3_LPM_DEVICE_INITIATED, keep checking further endpoints, as there might be periodic endpoints later that return USB3_LPM_DISABLED due to shorter service intervals. Without this, the code can set too high a maximum-exit-latency and prevent the use of multiple USB3 cameras that should be able to work. Cc: Signed-off-by: Jan Schmidt Tested-by: Philipp Zabel Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1570190373-30684-4-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4491,12 +4491,12 @@ static int xhci_update_timeout_for_endpo alt_timeout = xhci_call_host_update_timeout_for_endpoint(xhci, udev, desc, state, timeout); - /* If we found we can't enable hub-initiated LPM, or + /* If we found we can't enable hub-initiated LPM, and * the U1 or U2 exit latency was too high to allow - * device-initiated LPM as well, just stop searching. + * device-initiated LPM as well, then we will disable LPM + * for this device, so stop searching any further. */ - if (alt_timeout == USB3_LPM_DISABLED || - alt_timeout == USB3_LPM_DEVICE_INITIATED) { + if (alt_timeout == USB3_LPM_DISABLED) { *timeout = alt_timeout; return -E2BIG; }