serenity/Kernel/Net/Intel
Liav A 0cede94c39 Kernel/Net: Introduce a new mechanism to initialize a PCI device
Instead of using a clunky if-statement paradigm, we now have all drivers
being declaring two methods for their adapter class - create and probe.
These methods are linked in each PCINetworkDriverInitializer structure,
in a new s_initializers static list of them.
Then, when we probe for a PCI device, we use each probe method and if
there's a match, then the corresponding create method is called. After
the adapter instance is created, we call the virtual initialize method
on it, because many drivers actually require a sort of post-construction
initialization sequence to ensure the network adapter can properly
function.

As a result of this change, it's much more easy to add more drivers and
the initialization code is more readable and it's easier to understand
when and where things could fail in the whole initialization sequence.
2023-01-07 12:36:57 +01:00
..
E1000ENetworkAdapter.cpp Kernel/Net: Introduce a new mechanism to initialize a PCI device 2023-01-07 12:36:57 +01:00
E1000ENetworkAdapter.h Kernel/Net: Introduce a new mechanism to initialize a PCI device 2023-01-07 12:36:57 +01:00
E1000NetworkAdapter.cpp Kernel/Net: Introduce a new mechanism to initialize a PCI device 2023-01-07 12:36:57 +01:00
E1000NetworkAdapter.h Kernel/Net: Introduce a new mechanism to initialize a PCI device 2023-01-07 12:36:57 +01:00