Bug 94822 - [kbd] [patch] Fix keyboard hang for IBM / Intel blade servers
Summary: [kbd] [patch] Fix keyboard hang for IBM / Intel blade servers
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug White
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-22 06:50 UTC by Devon H. O'Dell
Modified: 2006-09-22 02:22 UTC (History)
0 users

See Also:


Attachments
file.diff (822 bytes, patch)
2006-03-22 06:50 UTC, Devon H. O'Dell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devon H. O'Dell 2006-03-22 06:50:09 UTC
On Intel / IBM blade machines, there is no atkbd(4) device. Previously, booting GENERIC on these blades would hang the machine. With this patch, this behavior is no more!

Yes! After many printf()'s, reboots of the blade (and the MM because the new firmware is horribly broken), I've found the hang and fixed it. Simply put, there's a keyboard / auxillary device drain procedure (empty_both_buffers) that expects to drain the buffers, but can't, because the buffers aren't what they think.

This patch fixes the issue by adding a timeout to the empty_both_buffers procedure. After two seconds of not being able to drain the buffer, it will give up and return to the caller.

Full use of the keyboard (via the VNC-based Java KVM on the MM or local USB) is afforded, and the system boots.

Fix: This patch is alternatively available at http://www.sitetronics.com/~dodell/atkbdc_fix.patch in case the whitespace is goofed up by the paste into the web form.

-- begin patch --
How-To-Repeat: Obtain relevant machine (SBX82, in this case), chassis, and boot the GENERIC kernel. Order pizza. Play poker. Notice it's still hung. Take shower. Sleep. Wake up. Notice it's still hung. Apply patch and live happily ever after.
Comment 1 Doug White freebsd_committer freebsd_triage 2006-09-04 01:05:04 UTC
Responsible Changed
From-To: freebsd-bugs->dwhite

Taking
Comment 2 Doug White freebsd_committer freebsd_triage 2006-09-04 01:19:37 UTC
State Changed
From-To: open->feedback

Committed, thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2006-09-22 02:06:01 UTC
dwhite      2006-09-22 01:05:30 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/dev/atkbdc       atkbdc.c 
  Log:
  MFC rev 1.25:
     Avoid an infinite loop in empty_both_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.
  
  PR:             94822
  Submitted by:   Devon H. O'Dell <devon.odell@coyotepoint.com>
  Approved by:    re
  
  Revision  Changes    Path
  1.21.2.2  +11 -0     src/sys/dev/atkbdc/atkbdc.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Doug White freebsd_committer freebsd_triage 2006-09-22 02:21:46 UTC
State Changed
From-To: feedback->closed

MFC completed. This change will be present in 6.2-R.