FreeBSD Bugzilla – Attachment 204401 Details for
Bug 237924
Possible infinite loop in function empty_aux_buffer of sys/dev/atkbdc/atkbdc.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Avoid-an-infinite-loop-in-empty_aux_buffers-by-addin.patch (text/plain), 1.34 KB, created by
Young
on 2019-05-16 12:34:43 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Young
Created:
2019-05-16 12:34:43 UTC
Size:
1.34 KB
patch
obsolete
>From 0e88231b6bcf7b9c475f8a61bdb7794267ffe833 Mon Sep 17 00:00:00 2001 >From: Young Xiao <92siuyang@gmail.com> >Date: Thu, 16 May 2019 20:29:51 +0800 >Subject: [PATCH] Avoid an infinite loop in empty_aux_buffers() by adding a > timeout. This helps systems that don't actually have atkbd controllers, such > as the Intel SBX82 blade, boot without device.hints hacks. > >See commit 3631541670c8 ("Avoid an infinite loop in empty_both_buffers() by >adding a timeout.") for details. > >Signed-off-by: Young Xiao <92siuyang@gmail.com> >--- > sys/dev/atkbdc/atkbdc.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c >index adf55ec..81520bf 100644 >--- a/sys/dev/atkbdc/atkbdc.c >+++ b/sys/dev/atkbdc/atkbdc.c >@@ -907,6 +907,7 @@ empty_aux_buffer(KBDC p, int wait) > int t; > int b; > int f; >+ int waited = 0; > #if KBDIO_DEBUG >= 2 > int c1 = 0; > int c2 = 0; >@@ -929,6 +930,16 @@ empty_aux_buffer(KBDC p, int wait) > } else { > t -= delta; > } >+ >+ /* >+ * Some systems (Intel/IBM blades) do not have keyboard devices and >+ * will thus hang in this procedure. Time out after delta seconds to >+ * avoid this hang -- the keyboard attach will fail later on. >+ */ >+ waited += (delta * 1000); >+ if (waited == (delta * 1000000)) >+ return; >+ > DELAY(delta*1000); > } > #if KBDIO_DEBUG >= 2 >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 237924
: 204401