From owner-freebsd-current Wed Jan 13 11:01:38 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA01106 for freebsd-current-outgoing; Wed, 13 Jan 1999 11:01:38 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA01084 for ; Wed, 13 Jan 1999 11:01:32 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:BVmze4WHlTia9LkeaQEZtpZ/c97wWGG1@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.1/8.9.1) with ESMTP id XAA13775 for ; Wed, 13 Jan 1999 23:19:21 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id XAA09805; Wed, 13 Jan 1999 23:21:48 +0900 (JST) Message-Id: <199901131421.XAA09805@zodiac.mech.utsunomiya-u.ac.jp> To: FreeBSD Current cc: yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: New Con Driver Panics using PCVT In-reply-to: Your message of "Tue, 12 Jan 1999 16:00:07 CST." <19990112160006.A5715@slim.TOJ.org> References: <19990112160006.A5715@slim.TOJ.org> Date: Wed, 13 Jan 1999 23:21:43 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Does anybody else has this problem? If you have, please try the attached patch. Apply it in /sys/i386/isa/pcvt and rebuild the kernel. >Tried the update for the new con driver. On two boxes using the pcvt >driver, it fails. On my server if I leave the rc.local from the pcvt >directory, it page faults with the display flipping like loss of vertical >hold so I can't read anything. If I remove the rc.local, it boots to >the login prompt and then the keyboard freezes. > >On the second box, after getting to the login prompt it page faults >with no dump ( keyboard and display freezes at the beginning of dump). >Current process shows it running kcon. Trap 12 message can be provided >if needed. Kazu Index: pcvt_drv.c =================================================================== RCS file: /src/CVS/src/sys/i386/isa/pcvt/pcvt_drv.c,v retrieving revision 1.47 diff -u -r1.47 pcvt_drv.c --- pcvt_drv.c 1999/01/11 03:18:38 1.47 +++ pcvt_drv.c 1999/01/13 06:12:20 @@ -169,13 +169,12 @@ #ifdef _DEV_KBD_KBDREG_H_ int i; - kbd = NULL; - kbd_configure(KB_CONF_PROBE_ONLY); - i = kbd_allocate("*", -1, (void *)&kbd, pcevent, (void *)dev->id_unit); - if ((i < 0) || ((kbd = kbd_get_keyboard(i)) == NULL)) - { + if (kbd == NULL) { reset_keyboard = 0; - return (-1); + kbd_configure(KB_CONF_PROBE_ONLY); + i = kbd_allocate("*", -1, (void *)&kbd, pcevent, (void *)dev->id_unit); + if ((i < 0) || ((kbd = kbd_get_keyboard(i)) == NULL)) + return (-1); } reset_keyboard = 1; /* it's now safe to do kbd reset */ #endif /* _DEV_KBD_KBDREG_H_ */ @@ -898,6 +897,7 @@ pcrint(unit); return 0; case KBDIO_UNLOADING: + reset_keyboard = 0; kbd = NULL; kbd_release(thiskbd, (void *)&kbd); timeout(detect_kbd, (void *)unit, hz*4); @@ -1182,17 +1182,17 @@ } #ifdef _DEV_KBD_KBDREG_H_ - kbd = NULL; - kbd_configure(KB_CONF_PROBE_ONLY); - i = kbd_allocate("*", -1, (void *)&kbd, pcevent, (void *)dvp->id_unit); - if (i >= 0) - kbd = kbd_get_keyboard(i); - /* * Don't reset the keyboard via `kbdio' just yet. * The system clock has not been calibrated... */ reset_keyboard = 0; + if (kbd == NULL) { + kbd_configure(KB_CONF_PROBE_ONLY); + i = kbd_allocate("*", -1, (void *)&kbd, pcevent, (void *)dvp->id_unit); + if (i >= 0) + kbd = kbd_get_keyboard(i); + } #if PCVT_SCANSET == 2 /* Index: pcvt_kbd.c =================================================================== RCS file: /src/CVS/src/sys/i386/isa/pcvt/pcvt_kbd.c,v retrieving revision 1.26 diff -u -r1.26 pcvt_kbd.c --- pcvt_kbd.c 1999/01/11 03:18:39 1.26 +++ pcvt_kbd.c 1999/01/13 06:23:38 @@ -346,9 +346,10 @@ else if(kbd_cmd(tpmrate) != 0) printf("Keyboard TYPEMATIC data timeout\n"); #else + if (kbd == NULL) + return; tpmrate = rate & 0x7f; - if ((*kbdsw[kbd->kb_index]->ioctl)(kbd, KDSETRAD, - (caddr_t)&tpmrate) == 0) + if ((*kbdsw[kbd->kb_index]->ioctl)(kbd, KDSETRAD, (caddr_t)&tpmrate)) printf("pcvt: failed to set keyboard TYPEMATIC.\n"); #endif /* !_DEV_KBD_KBDREG_H_ */ } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message