Bug 94822

Summary: [kbd] [patch] Fix keyboard hang for IBM / Intel blade servers
Product: Base System Reporter: Devon H. O'Dell <dodell>
Component: kernAssignee: Doug White <dwhite>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 6.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

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.