Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4161963pxb; Tue, 10 Nov 2020 09:19:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu31rVzIDt+TFi4jgojD8ANFn0qL58kYLX/Si6bdoLODxncriXVVU5g5BpGO6/h3nkY7D5 X-Received: by 2002:a17:906:3acd:: with SMTP id z13mr21641339ejd.118.1605028788447; Tue, 10 Nov 2020 09:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605028788; cv=none; d=google.com; s=arc-20160816; b=BDE7Df3xMtW1MkpDZAVEgP72h0sJa09mfkW74RdX+JdAgAB2zfXWMBa3URzVTiKpON LIl9+UwAwTucCOT/gK3B7v00g1mcJQjfEKzm6pfLwL9G0TAAqD1iaCTL+0I4Jy2zjwLR Vlryj/k/jH4WsH6ylDXDZ80mW4JI4OiYMdn5UMxQiOQ1Lb6luH6WgkC57Z9xvJNaBwBU Y5JKKy7FBWjOWBapQct3Sxhzv+vUhv+dKIJsRau6ABlqhXy3i5xGKBXOexf5bcXfoVj4 JnUFC9o3iX/rKDlPvzogBaxaC0Q0pMjQ6J66jgNgDHGGe/y+3WzRmKWz4yJb8merFhTD WXjA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0OP3f2r9Fc4YLXQt0p33xjPKdjvoVQc+FeSrqLZFQSo=; b=ytOZME1AeZ2UstW8SXAmnvwLk0YeOIS59tHeBDjl0U/PMd3IxfX+0Ip/1wGUfnxaV5 KZW8DN0FgRa2qjyOkHGlGHW9GoPRhdO+Cqlh7aoYwPvS9ViHZJl7iIIdLrYhua1Dy4iE Ii8t+MAqUU2gtVrMfQ1JOHIUg9nq3LmKfc4zqkjoQwyh/KmxToiMwy9MuGc3ij9KPQ9H dft5NEaV4D4tqTd8G3Fh1gEaJvrqVRgFq+k06iZ8yPsVfkzH9agxMIgu+SGbzJhTlwzZ +8wdoBupez9SQKfljoNC+/fyODJPvR+tF9hjrn1odj7ujIv516iShZADc9ZwP2ed5775 bkZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rTE23E2Q; 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=fail (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 o22si9141440ejb.569.2020.11.10.09.19.18; Tue, 10 Nov 2020 09:19:48 -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=@kernel.org header.s=default header.b=rTE23E2Q; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729361AbgKJRRM (ORCPT + 99 others); Tue, 10 Nov 2020 12:17:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:42400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726344AbgKJRRM (ORCPT ); Tue, 10 Nov 2020 12:17:12 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 E8ADF206F1; Tue, 10 Nov 2020 17:17:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605028631; bh=IDiwP0RhYpD80ItMS9pgKMzinJ2j4RtNCNx75zFTLog=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rTE23E2QGj8kKIvhyewqMnyCvmBtSLIvI6AS3O7CXzihw1ZjpE+2bvb94mXPkcsoI SVG6lnO9M8KRECXAnxI94EM3ZlstbwM1R8BmKPWvV2Jrq5FBn/QhsOsLKYb8c+bFPw FS81r8caaLa+AF3dXMajMDqYq2OjVmAfvjYe5Sos= Date: Tue, 10 Nov 2020 18:18:08 +0100 From: Greg KH To: "Limonciello, Mario" Cc: Bastien Nocera , Mika Westerberg , Linux PM , "linux-usb@vger.kernel.org" , Linux Kernel Mailing List , "linux-input@vger.kernel.org" , Hans de Goede Subject: Re: How to enable auto-suspend by default Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 04:02:33PM +0000, Limonciello, Mario wrote: > > > > On Tue, Nov 10, 2020 at 11:57:07AM +0100, Bastien Nocera wrote: > > > Hey, > > > > > > systemd has been shipping this script to enable auto-suspend on a > > > number of USB and PCI devices: > > > > > https://github.com/systemd/systemd/blob/master/tools/chromiumos/gen_autosuspen > > d_rules.py > > > > > > The problem here is twofold. First, the list of devices is updated from > > > ChromeOS, and the original list obviously won't be updated by ChromeOS > > > developers unless a device listed exists in a ChromeBook computer, > > > which means a number of devices that do support autosuspend aren't > > > listed. > > > > > > The other problem is that this list needs to exist at all, and that it > > > doesn't seem possible for device driver developers (at various levels > > > of the stack) to opt-in to auto-suspend when all the variants of the > > > device (or at least detectable ones) support auto-suspend. > > > > A driver can say they support autosuspend today, but I think you are > > concerned about the devices that are controlled by class-compliant > > drivers, right? And for those, no, we can't do this in the kernel as > > there are just too many broken devices out there. > > > > I guess what Bastien is getting at is for newer devices supported by class > drivers rather than having to store an allowlist in udev rules, can we set > the allowlist in the kernel instead. Then distributions that either don't > use systemd or don't regularly update udev rules from systemd can take > advantage of better defaults on modern hardware. That's what the "hardware ids" database is supposed to be handling. It's easier to manage this in userspace than in the kernel. I just love systems where people feel it is safer to update the kernel than it is to update a hardware database file :) > The one item that stood out to me in that rules file was 8086:a0ed. > It's listed as "Volteer XHCI", but that same device ID is actually present > in an XPS 9310 in front of me as well and used by the xhci-pci kernel module. That's an Intel PCI device id. If someone else is abusing that number, I'm sure Intel would want to know about it and would be glad to go after them. But note, PCI devices can be behind lots of different types of busses, so maybe the "can this device autosuspend" differs for them because of different implementations of where the device is, right? > 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/6a7c533d4a1854f54901a065d8c672e890400d8a > > @Mika Westerberg should 8086:a0ed be quirked like the TCSS xHCI too? Submit a patch! thanks, greg k-h