Re: [PATCH v2 5/5] rust: pci: expose the allocated interrupt type
"Gary Guo" <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <[email protected]> |
On Wed Aug 12, 2026 at 6:57 PM BST, Danilo Krummrich wrote:
> On Wed Aug 12, 2026 at 6:44 PM CEST, Gary Guo wrote:
>> On Wed Aug 12, 2026 at 12:39 AM BST, Danilo Krummrich wrote:
>>> + pub fn irq_type(&self) -> IrqType {
>>> + self.reg.irq_type()
>>
>> Do you expect people to call this on the `IrqVetor` (or even
>> `IrqVectorRegistration`)? This is really a property of the device, and not on a
>> specific IRQ vector/allocation.
>
> You are not wrong, but the C API sets msix_enabled and msi_enabled in
> pci_alloc_irq_vectors() and clears them in pci_free_irq_vectors().
Right, then putting it on `IrqVectorRegistration` does make sense. Speaking of
which, what prevents people from calling pci_alloc_irq_vectors twice with
different irq types or with both IrqType::Intx?
Best,
Gary