From: Dan Williams <dan.j.williams@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jon Derrick <jonathan.derrick@intel.com>,
Bjorn Helgaas <helgaas@kernel.org>,
linux-pci@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Alan Cox <alan@linux.intel.com>
Subject: Re: [RFC 1/3] PCI: pci-driver: Introduce pci device delete list
Date: Thu, 28 Sep 2017 08:58:29 -0700 [thread overview]
Message-ID: <CAPcyv4iWTFCte_KTe8N6w5yQ6MuwFqBnitquJ8sVTmvhrF-MKQ@mail.gmail.com> (raw)
In-Reply-To: <20170928090901.GC12599@kroah.com>
On Thu, Sep 28, 2017 at 2:09 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> 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:
>> <driver>.delete_id=1234:5678
>> <driver>.delete_id=ffffffff:ffffffff
>> <driver>.delete_id=ffffffff:ffffffff:ffffffff:ffffffff:010802
>> <driver>.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 :(
I assume other buses could define their own "delete_id" format and
it's up to those bus_type implementations to check for "delete_id"
statements for the drivers attached to it. Somewhat similar to what we
have for "new_id" where it appears to be global sysfs attribute, but
implemented per-bus.
> 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?
Unbind after the fact may be too late, and builtin-drivers eliminate
modprobe blacklisting. I've missed having this functionality in the
past for platform bring up.
next prev parent reply other threads:[~2017-09-28 15:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 20:40 [RFC 0/3] Introduce PCI device blacklisting Jon Derrick
2017-09-27 20:40 ` [RFC 1/3] PCI: pci-driver: Introduce pci device delete list Jon Derrick
2017-09-28 9:09 ` Greg Kroah-Hartman
2017-09-28 15:53 ` Jon Derrick
2017-09-28 15:58 ` Dan Williams [this message]
2017-09-27 20:40 ` [RFC 2/3] module: Ignore delete_id parameter Jon Derrick
2017-09-28 6:03 ` Dan Williams
2017-09-28 15:57 ` Jon Derrick
2017-09-28 9:02 ` Greg Kroah-Hartman
2017-09-28 15:57 ` Jon Derrick
2017-09-27 20:40 ` [RFC 3/3] Documentation: Add pci device delete_id interface Jon Derrick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPcyv4iWTFCte_KTe8N6w5yQ6MuwFqBnitquJ8sVTmvhrF-MKQ@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=alan@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=helgaas@kernel.org \
--cc=jonathan.derrick@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).