mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Alice Ryhl <aliceryhl@google.com>, Maurice Hieronymus <mhi@mailbox.org>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Lyude Paul" <lyude@redhat.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	linux-pci@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org, nova-gpu@lists.linux.dev,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 3/5] rust: pci: make Vendor::from_raw() public
Date: Thu, 24 Sep 2026 12:03:56 -0700	[thread overview]
Message-ID: <caceec40-4ae4-46ed-8ff8-594fd4046ab2@nvidia.com> (raw)
In-Reply-To: <ao2Lef62ZvkP9eWI@google.com>

On 8/25/26 5:32 AM, Alice Ryhl wrote:
> On Wed, Aug 12, 2026 at 09:52:37PM +0200, Maurice Hieronymus wrote:
>> `Vendor::from_raw()` is currently `pub(super)`, so a Vendor can only be
>> obtained through the named constants generated from the
>> `PCI_VENDOR_ID_*` defines in `<linux/pci_ids.h>`. A driver therefore
>> cannot match a device whose vendor ID has no symbolic name.
>>
>> Such devices exist. QEMU's "edu" educational device and the legacy
>> qemu/Bochs stdvga both use vendor ID 0x1234, which is not registered in
>> `pci_ids.h`. Per the policy stated at the top of that header, IDs are
>> only added there when shared between multiple drivers; a single-driver
>> ID is expected to be open-coded in the driver instead. C drivers already
>> do this -- see `drivers/gpu/drm/tiny/bochs.c`, which matches with a bare
>> ".vendor = 0x1234".
> 
> IMO we should just add Qemu to the list. No reason to hard-code it per
> driver for this case.
> 
I strongly agree. There is no need to break the nice type system here,
just to avoid adding an "edu 0x1234" entry.

thanks,
-- 
John Hubbard


  reply	other threads:[~2026-09-24 19:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 19:52 [PATCH v3 0/5] rust: samples: add an EDU PCI driver sample (MMIO + IRQ + DMA) Maurice Hieronymus
2026-08-12 19:52 ` [PATCH v3 1/5] samples: rust: remove the rust_driver_pci sample Maurice Hieronymus
2026-08-12 19:52 ` [PATCH v3 2/5] rust: pci: rework device enabling API Maurice Hieronymus
2026-09-24 17:32   ` Danilo Krummrich
2026-08-12 19:52 ` [PATCH v3 3/5] rust: pci: make Vendor::from_raw() public Maurice Hieronymus
2026-08-25 12:32   ` Alice Ryhl
2026-09-24 19:03     ` John Hubbard [this message]
2026-08-12 19:52 ` [PATCH v3 4/5] rust: completion: add complete() Maurice Hieronymus
2026-08-12 19:52 ` [PATCH v3 5/5] rust: samples: add EDU PCI driver sample Maurice Hieronymus
2026-09-24 18:02   ` Danilo Krummrich

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=caceec40-4ae4-46ed-8ff8-594fd4046ab2@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=mhi@mailbox.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /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

all inboxes | Powered by JetHome®