Re: [PATCH v2 4/4] rust: samples: add EDU PCI driver sample
From: Danilo Krummrich
Date: Thu Jul 02 2026 - 11:43:17 EST
On Thu Jul 2, 2026 at 5:24 PM CEST, Maurice Hieronymus wrote:
> On Sun Jun 21, 2026 at 2:27 PM CEST, Danilo Krummrich wrote:
>>> +impl pci::Driver for EduDriver {
>>> + type IdInfo = ();
>>> + type Data<'bound> = Self;
>>
>> Please make this a new type and take advantage of Rust native lifetimes for
>> device resources, just like the existing sample driver and nova-core does.
>>
>> I understand that the existing IRQ infrastructure is a bit in the way and you
>> have to work around it.
>>
>> I'm going to send a patch to make the irq::Registration compatible with the
>> device driver lifetime rework soon. Please rebase onto that once it's sent, so
>> this sample can land as idiomatic as possible.
>
> If you haven't started on the irq::Registration rework yet, I'd be happy to take a
> try at it myself. I saw the DevresLt/ForLt work on your driver-lifetime branch;
> is stacking on the I/O generalization series the direction you have in mind for the
> handler data?
I do have the code already, I just have to get to sending it out. I will
probably send it tomorrow.
But I think there's some room for subsequent improvements on the device enable
and bus mastering stuff; going to reply there.
Thanks,
Danilo