mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Increase i8042 IO attempt counts, again
This is very similar to the change that was done in 32053e8
, except it
turned out that the new limit of 50 iterations was not enough when
testing on bare metal - most IO operations would succeed in the first or
second iteration, but two of them took 140 and 150 iterations
respectively.
Increase the limit from 50 to 250 to account for this, and have some
additional headroom.
This commit is contained in:
parent
37a04b739a
commit
eca8208a34
Notes:
sideshowbarker
2024-07-18 00:34:07 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/eca8208a34 Pull-request: https://github.com/SerenityOS/serenity/pull/12641 Reviewed-by: https://github.com/IdanHo ✅ Reviewed-by: https://github.com/supercomputer7
1 changed files with 2 additions and 2 deletions
|
@ -268,7 +268,7 @@ ErrorOr<void> I8042Controller::prepare_for_input(HIDDevice::Type device)
|
|||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
u8 const second_port_flag = device == HIDDevice::Type::Keyboard ? 0 : I8042StatusFlag::SecondPS2PortOutputBuffer;
|
||||
for (int attempt = 0; attempt < 50; attempt++) {
|
||||
for (int attempt = 0; attempt < 250; attempt++) {
|
||||
u8 status = IO::in8(I8042Port::Status);
|
||||
if (!(status & I8042StatusFlag::OutputBuffer)) {
|
||||
IO::delay(1000);
|
||||
|
@ -286,7 +286,7 @@ ErrorOr<void> I8042Controller::prepare_for_input(HIDDevice::Type device)
|
|||
ErrorOr<void> I8042Controller::prepare_for_output()
|
||||
{
|
||||
VERIFY(m_lock.is_locked());
|
||||
for (int attempt = 0; attempt < 50; attempt++) {
|
||||
for (int attempt = 0; attempt < 250; attempt++) {
|
||||
u8 status = IO::in8(I8042Port::Status);
|
||||
if (!(status & I8042StatusFlag::InputBuffer))
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue