Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp46508pxu; Tue, 24 Nov 2020 18:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6cdV3oRFmTe7amOi+l5MNYE2FUOReKH1k+GiEqkcv8GvPXaUdh6sWlmPCf+EBuroug4Dk X-Received: by 2002:a50:9f6c:: with SMTP id b99mr1462321edf.90.1606270167322; Tue, 24 Nov 2020 18:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606270167; cv=none; d=google.com; s=arc-20160816; b=z917fjcGM5HyurtS/WMHCAcxMVrfm+Kd3OC8rLGnEp8swiH+vzgU/RNHzf5nUgwGE2 Q6pLYXXOhb9rbgapY3XdQg3SaGtfSdm/aaLVTpbU9imHRATaKaxGBJFzls+3hm819FbB 4bzwrXzpZd4wmwan7iUtWlOc78BBMfozgwH0Md8KHrPHlq8aDE9dn3fzVvfH/8tv3fUQ OAGGqr6FfkWf4swjXsT7r3IHNT8hUqq9rL7j9wsgxPdiOM2gTd5bfCUgDmPzkheh/vsG iJghRf1vDYumvF8qiVoFJCTZnu2xy/YgLJGE3o3hp/jB67OaomvwiDRB5TesfjXHwixO AF8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tl/FkBC5AUL/b4adTrcgkSFodKfdiDaYlXtt839/C6I=; b=eTR47l0kfzx8j1EDeP3/DWenD+dFeIlBdf4aNGKYv4H1nW2iqjp6zBFQF44YBaHtEv JUhoqjbf9Op7kP2rqvHdd8VnjxLkcoYcVABXQeudViVBMnNQNi1BFHGqXCp/FL7hzAsI vyr45U18xN5cXzIkcuogelHjllK/9IdwKgMqRZeQqySHVA2s8bBdDkMytkYnGoidcdkP yYZOZptJFqj4ESlgroW+4NdGNm0WyEikjA4i3CoxLNNkbEHH05CGAGqsVkqGYl/lL6ox Rm4qHbLv/FSW9eRXjWfkKA/ifP/i89PahWI4xdE0OdKntm/4BGzt/jiv0VUrG2a0jCZN fHww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="E/d2C2Yy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c95si452683edf.197.2020.11.24.18.09.04; Tue, 24 Nov 2020 18:09:27 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b="E/d2C2Yy"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390017AbgKXQf5 (ORCPT + 99 others); Tue, 24 Nov 2020 11:35:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:40982 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgKXQf5 (ORCPT ); Tue, 24 Nov 2020 11:35:57 -0500 Received: from localhost (82-217-20-185.cable.dynamic.v4.ziggo.nl [82.217.20.185]) (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 BF5DF206F9; Tue, 24 Nov 2020 16:35:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606235756; bh=foyt3Sdsof8A/tOSmI4RMCw2Prkp9i6MW89/8Yspj+U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E/d2C2Yysn/58BfnYI0yICiGuEG9WNYYNy2Lya4lPQV3EXxYQizTNusGJuOZuFpgR smT90pvfe7sAMC8KXbc3RXoe0UBqJd5CwO4KC7lsHT5P4XgUzlWoSkVaPqnZE83xs2 F1XkyvFUk23alo+57M+RsU7hc9w9u230vik4AApc= Date: Tue, 24 Nov 2020 17:35:53 +0100 From: Greg KH To: Bastien Nocera Cc: "Limonciello, Mario" , Hans de Goede , Mika Westerberg , Linux PM , "linux-usb@vger.kernel.org" , Linux Kernel Mailing List , "linux-input@vger.kernel.org" , Mathias Nyman Subject: Re: How to enable auto-suspend by default Message-ID: References: <20201110172517.GC2495@lahna.fi.intel.com> <30957f1a-1fe5-5d9a-101b-25f12fb93907@redhat.com> <2585b668d9452c23902db46cf850ba7fa07167b7.camel@hadess.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2585b668d9452c23902db46cf850ba7fa07167b7.camel@hadess.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 05:02:18PM +0100, Bastien Nocera wrote: > On Wed, 2020-11-11 at 17:32 +0100, Greg KH wrote: > > On Wed, Nov 11, 2020 at 04:03:30PM +0000, Limonciello, Mario wrote: > > > > > > Given we're effectively ending up with the combination of > > > > > > runtime PM turned > > > > > > on by udev rules, do we need something like this for that ID: > > > > > > > > > > > > > > > > https://github.com/torvalds/linux/commit/6a7c533d4a1854f54901a065d8c672e890400 > > > > d8a > > > > > > > > > > > > @Mika Westerberg should 8086:a0ed be quirked like the TCSS > > > > > > xHCI too? > > > > > > > > > > I think this one is the TGL PCH xHCI. The quirk currently for > > > > > xHCI > > > > > controllers that are part of the TCSS (Type-C SubSystem) where > > > > > it is > > > > > important to put all devices into low power mode whenever > > > > > possible, > > > > > otherwise it keeps the whole block on. > > > > > > > > Note that there are currently some IDs missing from the xHCIs > > > > which > > > > are part of the TCSS too. At least the id for the xHCI in the > > > > thunderbolt > > > > controller on the Lenovo T14 gen 1 is missing. I started a > > > > discussion > > > > about extending the kernel quirk list for this vs switching to > > > > hwdb > > > > a while a go: > > > > > > > > https://lore.kernel.org/linux-usb/b8b21ba3-0a8a-ff54-5e12- > > > > cf8960651086@redhat.com/ > > > > > > > > The conclusion back then was to switch to hwdb, but I never got > > > > around to > > > > this. > > > > > > I guess the problem I see with switching to a hwdb for this type of > > > thing is > > > that if there is a "bug" in your kernel driver around autosuspend > > > you will > > > then be potentially causing it to occur more regularly on a kernel > > > that didn't > > > necessarily pick up the fix but does have the newer hwdb. > > > > > > I don't know how common that will really be though. > > > > > > Since Mika mentioned the really light userspace scenario, what > > > about shipping > > > the hwdb "with" the kernel in tree?? This could allow evicting all > > > these quirk > > > scenarios from the kernel at the same time as switching to a hwdb > > > and also cover > > > the problem I suggested might happen with a bug in older kernel and > > > newer userspace. > > > > We took things out of the kernel to put it in hwdb years ago as it > > was > > easier for people to update a "text file" than it was their kernel > > image.? I don't think you want to go backwards here :) > > There are (unfortunately) a couple of Linux based OSes that don't use > systemd, which is one of the problems we see. You don't have to use systemd to use hwdb. If you want to handle quirks for hardware issues that are done in userspace, the overall solution for this in Linux is hwdb. To try to reverse that decision we all made a long time ago is just going to duplicate work for almost no gain that I can see. What distros need this that can not pick this up from hwdb today? > I think it might be a good idea to have a repository or directory > that's accessible to same contributions as the drivers, where this sort > of data is kept, as close to the drivers as possible. And who is going to maintain that? The data that ends up in hwdb already comes from multiple places today, why add yet-another-one? Are you going to somehow unify all of those existing data sources into a single entity? Who is going to run that service and what would the end output look like (hint, you would have to provide hwdb support, so why not just use that?) > You could always split off your quirks into separate "works with any > kernel" and "works from this version of the kernel" files, We don't have those today, that's not a thing. > the goal here would be to make sure that there is a canonical list of > devices that can be autosuspended, without user-space always playing > catch-up (especially as is the case now where systemd is being fed by > ChromeOS which is fed in some other way). There is no way we can ever create such a "canonical list". Hint, another operating system tried it, they failed, and they actually had partnerships with most hardware vendors, and paid developers to do this work. What are you going to do differently than they did to solve this problem? > The Venn diagram of folks that contribute to hwdb quirks databases in > systemd and that contribute to kernel drivers has a pretty small > overlap. Moving much of those quirks to a kernel-controlled repository > (whatever format it ends up being in) would make sense so that the > "quirk enablement" and the "driver writing" sections overlap. But they don't overlap today, why make us do more work for no gain? thanks, greg k-h