diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-05-15 01:16:43 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-17 18:15:25 +0200 |
commit | c75ca4ea8f071f91d35dc07eb193db70ccba7a0e (patch) | |
tree | cfa3accc8a1e607d184c81698a2b3e9e46cb7a6d /Kernel | |
parent | be57c424f3b74cf35097308bfcc1fbd99d7d9217 (diff) | |
download | serenity-c75ca4ea8f071f91d35dc07eb193db70ccba7a0e.zip |
Kernel: Bit mask line control options in SerialDevice::set_line_control
The line control option bits (parity, stop bits, word length) were
masked and then combined incorrectly, resulting in them not being set
when requested.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Devices/SerialDevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/SerialDevice.cpp b/Kernel/Devices/SerialDevice.cpp index aa25c4bb66..3198cc9e88 100644 --- a/Kernel/Devices/SerialDevice.cpp +++ b/Kernel/Devices/SerialDevice.cpp @@ -105,7 +105,7 @@ void SerialDevice::set_line_control(ParitySelect parity_select, StopBits stop_bi m_stop_bits = stop_bits; m_word_length = word_length; - IO::out8(m_base_addr + 3, IO::in8(m_base_addr + 3) & (0xc0 | parity_select | stop_bits | word_length)); + IO::out8(m_base_addr + 3, (IO::in8(m_base_addr + 3) & ~0x3f) | parity_select | stop_bits | word_length); } void SerialDevice::set_break_enable(bool break_enable) |