summaryrefslogtreecommitdiff
path: root/Kernel/Bus
diff options
context:
space:
mode:
authorSviatoslav Peleshko <speles@mail.ua>2022-02-20 19:05:14 +0200
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-02-20 20:32:22 -0800
commit073f472c51dd4684357e1dfc5992c3d1d1b41d10 (patch)
tree880f40da09135b33b3628225f9a53552bfd043e0 /Kernel/Bus
parent9399698aaa61af67714612458829296d9cc16f4a (diff)
downloadserenity-073f472c51dd4684357e1dfc5992c3d1d1b41d10.zip
Kernel: Init receive buffer for dynamically created VirtIO console port
We already init receive buffer if we have singleport console, but if we have multiport console that dynamically allocates ports we never initted their receive buffers.
Diffstat (limited to 'Kernel/Bus')
-rw-r--r--Kernel/Bus/VirtIO/Console.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Kernel/Bus/VirtIO/Console.cpp b/Kernel/Bus/VirtIO/Console.cpp
index b46475286e..6aa6bde2bc 100644
--- a/Kernel/Bus/VirtIO/Console.cpp
+++ b/Kernel/Bus/VirtIO/Console.cpp
@@ -162,7 +162,9 @@ void Console::process_control_message(ControlMessage message)
return;
}
- m_ports.at(id) = MUST(DeviceManagement::the().try_create_device<VirtIO::ConsolePort>(id, *this));
+ auto port = MUST(DeviceManagement::the().try_create_device<VirtIO::ConsolePort>(id, *this));
+ port->init_receive_buffer({});
+ m_ports.at(id) = port;
ControlMessage ready_event {
.id = static_cast<u32>(id),