From freefall.cdrom.com!owner-freebsd-hackers Wed Aug 24 23:39:17 1994
Return-Path: <owner-freebsd-hackers@freefall.cdrom.com>
Received: from freefall.cdrom.com by tfs.com (smail3.1.28.1) with SMTP
	id m0qdYSt-0003y3a; Wed, 24 Aug 94 23:39 PDT
Received: (from root@localhost) by freefall.cdrom.com (8.6.8/8.6.6) id XAA01140 for freebsd-hackers-outgoing; Wed, 24 Aug 1994 23:37:22 -0700
Received: from warrane.connect.com.au (warrane.connect.com.au [192.189.54.33]) by freefall.cdrom.com (8.6.8/8.6.6) with SMTP id XAA01134 for <freebsd-hackers@freefall.cdrom.com>; Wed, 24 Aug 1994 23:37:18 -0700
Received: from kralizec.zeta.org.au by warrane.connect.com.au with SMTP id AA08561
  (5.67b8/IDA-1.5 for <freebsd-hackers@freefall.cdrom.com>); Thu, 25 Aug 1994 16:35:59 +1000
Received: (from bde@localhost) by kralizec.zeta.org.au (8.6.9/8.6.9) id QAA18497; Thu, 25 Aug 1994 16:35:35 +1000
Date: Thu, 25 Aug 1994 16:35:35 +1000
From: Bruce Evans <bde@kralizec.zeta.org.au>
Message-Id: <199408250635.QAA18497@kralizec.zeta.org.au>
To: freebsd-hackers@freefall.cdrom.com, rivers%ponds@ncren.net
Subject: Re:  wd driver problems (1.1.5.1) with LAPTOP.
Sender: freebsd-hackers-owner@freefall.cdrom.com
Precedence: bulk
Status: RO

> Anyway... it has an IDE drive that experiences the same time-out problems
> that LAPTOP drives appear to (although the disk doesn't actually spin
> down.)

> Anyway, when I built a kernel with LAPTOP, to get rid of those "wd timeout"
> messages... they didn't go away.

The 1.1.5 version seems to have the ifdef in the wrong place.  Try these
changes.

Bruce

*** src/sysc/i386/isa/wd.c	Sat Jun 18 02:56:45 1994
--- src/sys/i386/isa/wd.c	Fri Jul  1 00:20:05 1994
***************
*** 667,671 ****
  		return;		/* intr in wdflushirq() */
  	if (!wdtab[unit].b_active) {
! #ifndef LAPTOP
  		printf("wdc%d: extra interrupt\n", unit);
  #endif
--- 697,701 ----
  		return;		/* intr in wdflushirq() */
  	if (!wdtab[unit].b_active) {
! #ifndef THIS_HAS_NOTHING_TO_DO_WITH_LAPTOP /* XXX */
  		printf("wdc%d: extra interrupt\n", unit);
  #endif
***************
*** 1697,1701 ****
--- 1721,1728 ----
  	x = splbio();
  	if (du->dk_timeout != 0 && --du->dk_timeout == 0) {
+ #ifdef WDDEBUG
+ 		/* XXX timeouts are normal after power-save modes. */
  		wderror((struct buf *)NULL, du, "interrupt timeout");
+ #endif
  		wdunwedge(du);
  		wdflushirq(du, x);
*** src/sysc/i386/isa/syscons.c	Mon May 30 13:15:44 1994
--- src/sys/i386/isa/syscons.c	Sun Jun  5 16:19:49 1994
***************
*** 415,419 ****
  		scp->bell_pitch = BELL_PITCH;
  		scp->bell_duration = BELL_DURATION;
! 		scp->status = NLKED;
  		scp->pid = 0;
  		scp->proc = NULL;
--- 413,420 ----
  		scp->bell_pitch = BELL_PITCH;
  		scp->bell_duration = BELL_DURATION;
! 		/*
! 		 * Don't blow away number lock state.  Get it from BIOS.
! 		 */
! 		scp->status = *(char *)(KERNBASE + 0x417) & 0x20 ? NLKED : 0;
  		scp->pid = 0;
  		scp->proc = NULL;
***************
*** 2090,2093 ****
--- 2098,2104 ----
  		crtc_vga = 1;
  
+ 	/*
+ 	 * XXX too much duplication.
+ 	 */
  	current_default = &user_default;
  	console[0].crtat = crtat;
***************
*** 2102,2106 ****
  	console[0].xsize = COL;
  	console[0].ysize = ROW;
! 	console[0].status = NLKED;
  	console[0].pid = 0;
  	console[0].proc = NULL;
--- 2113,2117 ----
  	console[0].xsize = COL;
  	console[0].ysize = ROW;
! 	console[0].status = *(char *)(KERNBASE + 0x417) & 0x20 ? NLKED : 0;
  	console[0].pid = 0;
  	console[0].proc = NULL;
