Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4161139ybg; Mon, 8 Jun 2020 00:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2H6yWReci/sk8UnwfOH/f0J913RIOw/nW14g4Q2d2LuVN7jbYlXCAnuN+kBg9pou23zAN X-Received: by 2002:a17:906:e05:: with SMTP id l5mr20972513eji.318.1591600069719; Mon, 08 Jun 2020 00:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591600069; cv=none; d=google.com; s=arc-20160816; b=ZBVfoikhqDvv6weZ7KRfnU9obaHYeoCaMyGbZJZcJAMh9niMZ2hxCOGL2HOhCvkKSh zJ5Vi8a2lAEdEl62kdkssO9oUPcJMsQX+WSdvCD7XmSDS5WQ3Wnay5lsJGjw3mIvVBqf Hs3pLwiqPkxrj4Gzwqd6KJiMwr6HJ18ri8WsHxCxdIMfba//0f25eVvv6AVIOsfMrRiu FFmbmhxW5x/osVC6zX4dvwKyZHaZefHCdyHp46CMLEA0TLrByNt1h1EKHHA5odM/YT9Y saNwbtbRpuiFIKQ4Fv515YJi3MUuRi79VTp1pZ/4ZQzWeeto8xUTGIzXaZRC8eVlueEy Wgrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=8LkwTmiJXn4Ff7ug8h4J3kHT40OO0djkY67maQnU+64=; b=XCl2sVvW+9N+Nx+50GSeuF1ZUEgfoMGvmtYvh7SQ7XaN5GrddwzQkVj7tt8JSAOO3e 6uC4bPUflSBW634nuqHjyOjau/Q3mocFo1m8CMlzrr1+eaQuLfQM+VTc3ESWoLQgkT8u FnFNu4H+0cnxkYqpBhF34VhMttpVnE2uPf4th0e3oqIBkSgj0BLXA/aD3M4Li+0AcDph b+wzP8otfTcojUxzyZrkOGpCs+oM2Ss4PsI3JFNyAEfFshSHcgve8WUN+/8PdFSWDBJE l5ZGdhnAT16VidZWqlvPBzNn1LfATK3q9XBi03A6MDu+fUmfcOKVGq6bkuVfL90z7vdq AdFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O7C2gTuG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be6si7542802edb.405.2020.06.08.00.07.27; Mon, 08 Jun 2020 00:07:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O7C2gTuG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728986AbgFHHF3 (ORCPT + 99 others); Mon, 8 Jun 2020 03:05:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:59292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728053AbgFHHF2 (ORCPT ); Mon, 8 Jun 2020 03:05:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 82AAC204EF; Mon, 8 Jun 2020 07:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591599927; bh=Cwb5EvcljlGuWZibUThhRbS8xMa0vQTQolaLMZ/c5as=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O7C2gTuGrrDXWc++jYwOGas+TIDhSEWNm3KD/ejRL6r6ydrkpOQTJGVr/sjRYQCvO 0GBbVJ7ubizOlA6x2IGxvJDOyRw2XUdVaMvnUF/mdGxAf0ea8yutP1E1enV2XIS+0C Emmez8U3uopmEehE/09yMvgmv4CrqM+kMJY3zXbE= Date: Mon, 8 Jun 2020 09:05:24 +0200 From: Greg Kroah-Hartman To: Kai-Heng Feng Cc: mathias.nyman@intel.com, "open list:USB XHCI DRIVER" , open list Subject: Re: [PATCH 2/2] xhci: Poll for U0 after disabling USB2 LPM Message-ID: <20200608070524.GB247853@kroah.com> References: <20200520101811.2623-1-kai.heng.feng@canonical.com> <20200520101811.2623-2-kai.heng.feng@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 11:58:40AM +0800, Kai-Heng Feng wrote: > > > > On May 20, 2020, at 18:18, Kai-Heng Feng wrote: > > > > USB2 devices with LPM enabled may interrupt the system suspend: > > [ 932.510475] usb 1-7: usb suspend, wakeup 0 > > [ 932.510549] hub 1-0:1.0: hub_suspend > > [ 932.510581] usb usb1: bus suspend, wakeup 0 > > [ 932.510590] xhci_hcd 0000:00:14.0: port 9 not suspended > > [ 932.510593] xhci_hcd 0000:00:14.0: port 8 not suspended > > .. > > [ 932.520323] xhci_hcd 0000:00:14.0: Port change event, 1-7, id 7, portsc: 0x400e03 > > .. > > [ 932.591405] PM: pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16 > > [ 932.591414] PM: dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -16 > > [ 932.591418] PM: Device 0000:00:14.0 failed to suspend async: error -16 > > > > During system suspend, USB core will let HC suspends the device if it > > doesn't have remote wakeup enabled and doesn't have any children. > > However, from the log above we can see that the usb 1-7 doesn't get bus > > suspended due to not in U0. After a while the port finished U2 -> U0 > > transition, interrupts the suspend process. > > > > The observation is that after disabling LPM, port doesn't transit to U0 > > immediately and can linger in U2. xHCI spec 4.23.5.2 states that the > > maximum exit latency for USB2 LPM should be BESL + 10us. The BESL for > > the affected device is advertised as 400us, which is still not enough > > based on my testing result. > > > > So let's use the maximum permitted latency, 10000, to poll for U0 > > status to solve the issue. > > > > Signed-off-by: Kai-Heng Feng > > A gentle ping... It is the middle of the merge window, we can't do anything with any new patch until after -rc1 is out. You know this... greg k-h