Re: [PATCH] rust: pci: rework device enabling API

"Maurice Hieronymus" <[email protected]> Sat, 11 Jul 2026 17:25:45 +0200
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Sun Jul 5, 2026 at 11:04 PM CEST, Maurice Hieronymus wrote:
>
> The one question is where the bit should live. pci_dev already has
> priv_flags, but its bit definitions and accessors are private to
> drivers/pci, while is_busmaster is accessed directly from outside:
> xen-pciback writes it, lpfc and sfc read it. So either priv_flags
> grows public accessors for this bit, or struct pci_dev gets a public
> flags bitmap with an accessor macro, like struct device.
>
> Bjorn, would you take such a patch, and which of the two would you
> prefer?
>
I went ahead and sent a series implementing the second option, a
public flags bitmap with generated accessors following the driver
core precedent, converting is_busmaster and broken_parity_status:

https://lore.kernel.org/r/[email protected]

Happy to respin on top of priv_flags instead if that is preferred.

Best,

Maurice