Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4720415ybv; Tue, 11 Feb 2020 02:04:29 -0800 (PST) X-Google-Smtp-Source: APXvYqygbTGnbBEvvmXMFgcPtYspyL5+DIA6BCja/Ih+7bcYS87g5KQ/XSEdQF74SBYUrj8YLTVg X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr4362009otr.167.1581415469130; Tue, 11 Feb 2020 02:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581415469; cv=none; d=google.com; s=arc-20160816; b=PHdPXVdpHfrbUVS8TKgBS/VHGEi9hyryzS3CLYrZJh9l0Ui//MbUj8qHQK7ZUZASoi MObk8t44pUXKtb59F5fPT0OcaGk+vynNbGY656okwYAfJTUZE16cL1TyFDkPmzuh2ohU Vo/h918yOBh8Mk9zrNwoIfKPj+Xsp5/PMuF2HdqxIy+TrRKW8POAHejsvWG/JQNdOdME bPZFDOvz9+w+EqbwHmmluD6MR3K3BPwRgEaYlQmbstNy4c1UuOHVEaty+zUxNsavJpip 2a5VMvcAa5PH7jsHl3ZauOq2r6B/QN7FblWzPYKlTMKzAmMFr7LYhgwHHkZv7qLX3foj 6Xpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=htoz3mcQQT1qBHc/1zsKnyxhg/kFuYiYDiM+0gh8bmQ=; b=vFoW4L5ouCWBqyeSncdCS5keNvcJ8DFg/dPlJE2hRXBLN734COlhswTU7olx+krTSN C3HSV8WDyGKvpNAve0SM2gQGbX/vd6nY3YDw+B4uqZa0sqUFYDRNJvDEEzUw7FqAykhn jfEH8kJaKCp8NmAz5QUtZSqWtc2zavtvEwHOKq1swTxDQAuCsr4UDu0A04xEn1NCUzRA +H565NZ0K8cfRRL+Df5qQBkDfg3rUu3z6wYEFXParfQk1/qSClBuHmyNjQ8iGJr50glC xPzaq/lMo5SYzW176nkEMGl6DzkqVLFW0T9THiTVC8Oo3sC+TarnJZ+lG1kW2EZZuz3s I++Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si1363064oib.26.2020.02.11.02.04.16; Tue, 11 Feb 2020 02:04:29 -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; 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 S1728186AbgBKKDD (ORCPT + 99 others); Tue, 11 Feb 2020 05:03:03 -0500 Received: from mx2.suse.de ([195.135.220.15]:55194 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728073AbgBKKDC (ORCPT ); Tue, 11 Feb 2020 05:03:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D3190B150; Tue, 11 Feb 2020 10:02:57 +0000 (UTC) Message-ID: <28f7ea832ead04dd93cd582480fb946604bb407d.camel@suse.de> Subject: Re: [PATCH] usb: xhci: Enable LPM for VIA LABS VL805 From: Nicolas Saenz Julienne To: Stefan Wahren , Mathias Nyman , Greg Kroah-Hartman , Mathias Nyman Cc: linux-usb@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Tue, 11 Feb 2020 11:02:55 +0100 In-Reply-To: <19e1d141-2033-782f-e5a3-dcba6bdc0a8a@i2se.com> References: <20200120142422.3907-1-nsaenzjulienne@suse.de> <20200210185921.GA1058087@kroah.com> <1478f170-f0ec-96df-79cf-f7c44bebc290@linux.intel.com> <19e1d141-2033-782f-e5a3-dcba6bdc0a8a@i2se.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-4mJyqWT1X0J6LlfdjyE7" User-Agent: Evolution 3.34.3 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-4mJyqWT1X0J6LlfdjyE7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Stefan, Mathias. On Tue, 2020-02-11 at 10:49 +0100, Stefan Wahren wrote: > Hi Mathias, >=20 > On 11.02.20 10:34, Mathias Nyman wrote: > > On 10.2.2020 20.59, Greg Kroah-Hartman wrote: > > > On Mon, Jan 20, 2020 at 03:24:22PM +0100, Nicolas Saenz Julienne wrot= e: > > > > This PCIe controller chip is used on the Raspberry Pi 4 and multipl= e > > > > adapter cards. There is no publicly available documentation for the > > > > chip, yet both the downstream RPi4 kernel and the controller cards > > > > support/advertise LPM support. > > > >=20 > > > > Signed-off-by: Nicolas Saenz Julienne > > > > --- > > > > drivers/usb/host/xhci-pci.c | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > >=20 > > > > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pc= i.c > > > > index 4917c5b033fa..c1976e98992b 100644 > > > > --- a/drivers/usb/host/xhci-pci.c > > > > +++ b/drivers/usb/host/xhci-pci.c > > > > @@ -241,6 +241,9 @@ static void xhci_pci_quirks(struct device *dev, > > > > struct xhci_hcd *xhci) > > > > pdev->device =3D=3D 0x3432) > > > > xhci->quirks |=3D XHCI_BROKEN_STREAMS; > > > > =20 > > > > + if (pdev->vendor =3D=3D PCI_VENDOR_ID_VIA && pdev->device =3D=3D = 0x3483) > > > > + xhci->quirks |=3D XHCI_LPM_SUPPORT; > > > > + > > > > if (pdev->vendor =3D=3D PCI_VENDOR_ID_ASMEDIA && > > > > pdev->device =3D=3D 0x1042) > > > > xhci->quirks |=3D XHCI_BROKEN_STREAMS; > > > Mathias, is this in your review queue? > > >=20 > > Ah yes, before adding link power management support for this controller= we > > should check that it has sane (or any) exit latency values set in its > > HCSPARAMS3 capability register. I did some checks myself before sending the patch, and tested with some dev= ices I own. The latencies seemd reasonable. For example I just hooked up an USB3= HD, the root HUB exposes: bU1DevExitLat 4 micro seconds bU2DevExitLat 231 micro seconds And xhci configured the device with: bU1DevExitLat 10 micro seconds bU2DevExitLat 2047 micro seconds > > Nicolas, if you have this controller could you show the capability > > registers: > >=20 > > cat /sys/kernel/debug/usb/xhci/*/reg-cap CAPLENGTH =3D 0x01000020 HCSPARAMS1 =3D 0x05000420 HCSPARAMS2 =3D 0xfc000031 HCSPARAMS3 =3D 0x00e70004 HCCPARAMS1 =3D 0x002841eb DOORBELLOFF =3D 0x00000100 RUNTIMEOFF =3D 0x00000200 HCCPARAMS2 =3D 0x00000000 > sorry for the naive question, but do you need the dump with or without > this patch applied? IIRC these are dumps from xhci's extended registers. Shouldn't matter at al= l.=20 Regards, Nicolas --=-4mJyqWT1X0J6LlfdjyE7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEErOkkGDHCg2EbPcGjlfZmHno8x/4FAl5Ce88ACgkQlfZmHno8 x/7F9Qf+KWPtMeGt4zPdB2ls5zaDGQPrv3QRvhIdmu/ovQXjdcwOghNJtYpYtfod p75/dlkegGgfNF+6nlZSMydSAPlvy1/stxk12OhPASHLTA2knxSOUhlfmX82PC4P AGcGqCC7mXzeqYh4Bw1+MUkHHjNivZEOGswGkzZ8j6g/DabCEyMgByoYl1/G+hdM REqOtzfuxCQF+2BJLyRC7LHBO42cOLg2vGz+whF6PjmkSBJEr8MUGlOuCrtpJP2g ajtbxF8u7DcL+cI4m48gpIiWP/TPVb4qJOJ3B2/qKjO8NcXPveo08DGa/sy8wcDg 8wicmtAbbG37PAVtD0R2XUmBnWudbw== =9y0c -----END PGP SIGNATURE----- --=-4mJyqWT1X0J6LlfdjyE7--