From 073f472c51dd4684357e1dfc5992c3d1d1b41d10 Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Sun, 20 Feb 2022 19:05:14 +0200 Subject: 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. --- Kernel/Bus/VirtIO/Console.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Kernel/Bus') 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(id, *this)); + auto port = MUST(DeviceManagement::the().try_create_device(id, *this)); + port->init_receive_buffer({}); + m_ports.at(id) = port; ControlMessage ready_event { .id = static_cast(id), -- cgit v1.2.3