Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467AbdI1JJG (ORCPT ); Thu, 28 Sep 2017 05:09:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57086 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217AbdI1JJE (ORCPT ); Thu, 28 Sep 2017 05:09:04 -0400 Date: Thu, 28 Sep 2017 11:09:01 +0200 From: Greg Kroah-Hartman To: Jon Derrick Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Arjan van de Ven , Alan Cox , Dan J Williams Subject: Re: [RFC 1/3] PCI: pci-driver: Introduce pci device delete list Message-ID: <20170928090901.GC12599@kroah.com> References: <1506544822-2632-1-git-send-email-jonathan.derrick@intel.com> <1506544822-2632-2-git-send-email-jonathan.derrick@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506544822-2632-2-git-send-email-jonathan.derrick@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1762 Lines: 51 On Wed, Sep 27, 2017 at 04:40:20PM -0400, Jon Derrick wrote: > This patch introduces a new kernel command line parameter to mask pci > device ids from pci driver id tables. This prevents masked devices from > automatically binding to both built-in and module drivers. > > Devices can be later attached through the driver's sysfs new_id > inteface. > > The use cases for this are primarily for debugging, eg, being able to > prevent attachment before probes are set up. It can also be used to mask > off faulty built-in hardware or faulty simulated hardware. > > Another use case is to prevent attachment of devices which will be > passed to VMs, shortcutting the detachment effort. Is the "shortcut" really that big of a deal? unbind actually causes problems? Is this an attempt to deal with devices being handled by more than one driver and then you want to manually bind it later on? > The format is similar to the sysfs new_id format. Device ids are > specified with: > > VVVV:DDDD[:SVVV:SDDD][:CCCC][:MMMM] > > Where: > VVVV = Vendor ID > DDDD = Device ID > SVVV = Subvendor ID > SDDD = Subdevice ID > CCCC = Class > MMMM = Class Mask > > IDs can be chained with commas. > > Examples: > .delete_id=1234:5678 > .delete_id=ffffffff:ffffffff > .delete_id=ffffffff:ffffffff:ffffffff:ffffffff:010802 > .delete_id=1234:5678,abcd:ef01,2345:ffffffff What about drivers that handle more than one bus type (i.e. USB and PCI?) This format is specific to PCI, yet you are defining it as a "global" for all drivers :( This feels hacky, what is the real reason for this? It feels like we have so many different ways to blacklist and unbind and bind devices to drivers already, why add yet-another way? thanks, greg k-h