diff options
author | Tom <tomut@yahoo.com> | 2020-11-14 13:45:34 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-14 22:09:48 +0100 |
commit | 13383f3267187008f510b78ece1408c683e18e4c (patch) | |
tree | f43a1af95a2dcaf0030c1af54f76ea5a5d6a95aa /Kernel/Devices | |
parent | 467f6c74a4d2bfd46fdd04c7ef3ff35ab88e1384 (diff) | |
download | serenity-13383f3267187008f510b78ece1408c683e18e4c.zip |
Revert "Kernel: Keep reading from i8042 until the buffer is empty"
This reverts commit 467f6c74a4d2bfd46fdd04c7ef3ff35ab88e1384.
Diffstat (limited to 'Kernel/Devices')
-rw-r--r-- | Kernel/Devices/I8042Controller.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Kernel/Devices/I8042Controller.cpp b/Kernel/Devices/I8042Controller.cpp index dc723b8291..ed65c1ef9b 100644 --- a/Kernel/Devices/I8042Controller.cpp +++ b/Kernel/Devices/I8042Controller.cpp @@ -149,15 +149,13 @@ void I8042Controller::irq_process_input_buffer(Device) { ASSERT(Processor::current().in_irq()); - for (;;) { - u8 status = IO::in8(I8042_STATUS); - if (!(status & I8042_BUFFER_FULL)) - return; - Device data_for_device = ((status & I8042_WHICH_BUFFER) == I8042_MOUSE_BUFFER) ? Device::Mouse : Device::Keyboard; - u8 byte = IO::in8(I8042_BUFFER); - if (auto* device = m_devices[data_for_device == Device::Keyboard ? 0 : 1].device) - device->irq_handle_byte_read(byte); - } + u8 status = IO::in8(I8042_STATUS); + if (!(status & I8042_BUFFER_FULL)) + return; + Device data_for_device = ((status & I8042_WHICH_BUFFER) == I8042_MOUSE_BUFFER) ? Device::Mouse : Device::Keyboard; + u8 byte = IO::in8(I8042_BUFFER); + if (auto* device = m_devices[data_for_device == Device::Keyboard ? 0 : 1].device) + device->irq_handle_byte_read(byte); } void I8042Controller::do_drain() |