ladybird/Kernel/Net
Andreas Kling 30d3f2789e Kernel: Propagate errors during network adapter detection/initialization
When scanning for network adapters, we give each driver a chance to
claim the PCI device and whoever claims it first gets to keep it.
Before this patch, the driver API returned a LockRefPtr<AdapterType>,
which made it impossible to propagate errors that occurred during
detection and/or initialization.

This patch changes the API so that errors can bubble all the way out
the PCI enumeration in NetworkingManagement::initialize() where we
perform all the network adapter auto-detection on boot.

When we eventually start to support hot-plugging network adapter in the
future, it will be even more important to propagate errors instead of
swallowing them.

Importantly, before this patch, some errors were "handled" by panicking
the kernel. This is no longer the case.

7 FIXMEs were killed in the making of this commit. :^)
2022-12-13 11:20:11 +01:00
..
Intel Kernel: Propagate errors during network adapter detection/initialization 2022-12-13 11:20:11 +01:00
NE2000 Kernel: Propagate errors during network adapter detection/initialization 2022-12-13 11:20:11 +01:00
Realtek Kernel: Propagate errors during network adapter detection/initialization 2022-12-13 11:20:11 +01:00
ARP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EthernetFrameHeader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EtherType.h
ICMP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv4.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IPv4Socket.cpp AK+Kernel: Handle some allocation failures in IPv4Socket and TCPSocket 2022-11-01 14:31:48 +00:00
IPv4Socket.h Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy 2022-08-21 16:45:42 +02:00
IPv4SocketTuple.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LocalSocket.cpp Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy 2022-08-21 16:45:42 +02:00
LocalSocket.h Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy 2022-08-21 16:45:42 +02:00
LoopbackAdapter.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
LoopbackAdapter.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
NetworkAdapter.cpp Kernel: Move InterruptDisabler out of Arch directory 2022-10-17 20:11:31 +02:00
NetworkAdapter.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
NetworkingManagement.cpp Kernel: Propagate errors during network adapter detection/initialization 2022-12-13 11:20:11 +01:00
NetworkingManagement.h Kernel: Propagate errors during network adapter detection/initialization 2022-12-13 11:20:11 +01:00
NetworkTask.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
NetworkTask.h
Routing.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
Routing.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
Socket.cpp Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy 2022-08-21 16:45:42 +02:00
Socket.h Kernel: Make sys$recvfrom() with MSG_DONTWAIT not so racy 2022-08-21 16:45:42 +02:00
TCP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TCPSocket.cpp AK+Kernel: Handle some allocation failures in IPv4Socket and TCPSocket 2022-11-01 14:31:48 +00:00
TCPSocket.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
UDP.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UDPSocket.cpp Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00
UDPSocket.h Kernel: Make self-contained locking smart pointers their own classes 2022-08-20 17:20:43 +02:00