Date: Wed, 13 Jan 1999 23:21:43 +0900 From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> To: FreeBSD Current <freebsd-current@FreeBSD.ORG> Cc: yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: New Con Driver Panics using PCVT Message-ID: <199901131421.XAA09805@zodiac.mech.utsunomiya-u.ac.jp> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901131421.XAA09805>