DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th October 2011
tcleamy tcleamy is offline
New User
 
Join Date: Mar 2011
Posts: 5
Default ddb and USB keyboard

I have some new Dell T310 servers and one becomes non-responsive under heavy network load. So I'm trying to go into ddb to do a problem report. However, my USB keyboard doesn't seem to work with ddb. I was able to use the Non-Masking Interrupt to get to the ddb prompt. But I couldn't type in commands. The servers do not have PS2 keyboard ports so USB keyboards are the only option.

I found a note that work on the issues was done at the f2k9 hackathon:
"Finally krw@ worked with miod@ on fixing USB keyboard usage on legacy-free machines such as the one our Blu-ray/HDDVD drive was in. These changes will enable use of USB keyboards in ddb(4). "

Does anyone know if this was implemented? Can you use a USB keyboard in ddb?
Reply With Quote
  #2   (View Single Post)  
Old 7th October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by tcleamy View Post
The servers do not have PS2 keyboard ports so USB keyboards are the only option.
What about DB9 connectors for serial connections?
Reply With Quote
  #3   (View Single Post)  
Old 7th October 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Poking through CVS logs, I did not find anything directly addressing your question. I found the following patches.

1) USB keyboard support was initially added for ddb(4) in 2001:
Code:
CVSROOT:    /cvs
Module name:    src
Changes by:    drahn@cvs.openbsd.org    2001/10/25 09:20:07

Modified files:
    sys/dev/usb    : ukbd.c 

Log message:
ddb entry support using usb (console) keyboard.
Do not send characters directly from usb interrupt handler for
console keyboard. entering ddb from within the usb interrupt handler
is _bad_. Instead delay until next timeout check and deliver characters
then. Tested on mappc.
From NetBSD.
Support for usb keyboard management for i386/amd64 architectures without PS/2 keyboard interfaces was put in place in 2009:
Code:
CVSROOT:    /cvs
Module name:    src
Changes by:    miod@cvs.openbsd.org    2009/08/25 13:16:36

Modified files:
    sys/arch/amd64/amd64: wscons_machdep.c 
    sys/arch/i386/i386: wscons_machdep.c 
    sys/dev/ic     : pckbc.c 
    sys/dev/pckbc  : pckbd.c 

Log message:
Legacy-free PC hardware do not have a real PS/2 keyboard controller, but
rather have the USB HCI emulate it during boot, while legacy mode is enabled.

This causes pckbd0 to attach as the console device, but is lost as soon as
the USB HCI driver attaches.

The disappearance of the emulated PS/2 controller can however be detected
in pckbc(4) - which is supposed to attach after [eou]hci(4), with the controller
refusing to ack commands and replying ``please resend'' instead.

In that case, the kernel will now no longer attach pckbd, and will perform a
new console input device selection, allowing the (real) usb keyboard to
become the console.

Thanks to krw@ for countless tests on legacy-free hardware; also tested on
more conventional hardware by naddy@ and I.

Only amd64 and i386 platforms are affected by this change.
If you have the time, you should test with -current; it may be that your problem has already been addressed. If not, a complete problem report will be accepted by the Project. Use misc@ for informal queries, bugs@ for a formal report. FYI: the Project's problem reporting database is currently offline and is not expected to return.

http://www.openbsd.org/report.html
http://www.openbsd.org/mail.html

Edited to add: For formal reporting, since the database (gnats@) is inoperative, if this were me I would use sendbug(1) but manually edit the template, then post the result to bugs@ via Email.
Code:
# sendbug -P > myreport
# $EDITOR myreport
# grep -v SENDBUG myreport > final.report.for.mailing

Last edited by jggimi; 7th October 2011 at 10:25 PM.
Reply With Quote
  #4   (View Single Post)  
Old 8th October 2011
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I should point out that if your servers have serial adapters, then using a serial console as described in boot.conf(5) and in FAQ 7.6 would at least circumvent your secondary problem, ddb communication, allowing you to go further with your primary problem, a non-responsive server.
Reply With Quote
  #5   (View Single Post)  
Old 15th October 2011
tcleamy tcleamy is offline
New User
 
Join Date: Mar 2011
Posts: 5
Default

Thanks for the responses. I tried --current to see if whatever caused the hang was fixed. The good news is that I no longer seethe problem. So I'll probably just wait for 5.0 and resinstall with it.

I'm still not sure why the USB keyboard didn't work for me in ddb. Perhaps it only works on the "first" USB port or something. Or perhaps I had to unplug & replug it. If I get some time I'll play around with it some more.
Reply With Quote
  #6   (View Single Post)  
Old 15th October 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by tcleamy View Post
I tried --current to see if whatever caused the hang was fixed. The good news is that I no longer seethe problem. So I'll probably just wait for 5.0 and resinstall with it.
OpenBSD 5.0-release was tagged in CVS mid-August. If the changes made in a recent snapshot fixes the malady you describe were indeed fixed after tagging, installing 5.0-release will not provide the desired end result.

Keeping your snapshot installation may be warranted.
Reply With Quote
  #7   (View Single Post)  
Old 16th October 2011
tcleamy tcleamy is offline
New User
 
Join Date: Mar 2011
Posts: 5
Default

From what I saw I am guessing the root cause was somewhere in the network stack. There were a few network fixes listed in the 5.0 changes webpage including:
-Fixed READ/WRITE confusion in bnx(4)
-Prevent the network stack from enqueueing mbuf(9)s on sockets marked as SS_CANTRCVMORE, as was done for routing sockets.

The second in particular sounds likes my problem. I will probably end up trying both and seeing which works best in my environment.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New keyboard fossala General Hardware 18 1st September 2011 09:03 AM
How to change keyboard key? newbsdied OpenBSD General 5 7th November 2010 02:45 AM
Ztupid question :-) What keyboard? Broodjegehaktmetmayo General Hardware 10 1st September 2010 05:51 PM
Keyboard Layout mfaridi FreeBSD General 6 26th June 2008 07:13 PM
Keyboard delboy FreeBSD Installation and Upgrading 2 23rd May 2008 05:55 PM


All times are GMT. The time now is 01:13 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick