Subject: kern/1480: /sys/dev/isa/wd.c will not build with WDDEBUG defined
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hvozda@netcom.com>
List: netbsd-bugs
Date: 09/19/1995 14:21:33
>Number:         1480
>Category:       kern
>Synopsis:       /sys/dev/isa/wd.c will not build with WDDEBUG defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 14:35:01 1995
>Last-Modified:
>Originator:     Eric Hvozda
>Organization:
Klub Kev Kernel Hackers Anonymous
>Release:        NetBSD-current sup'd on 15Sep95
>Environment:
NetBSD kludge.psc.edu 1.0A NetBSD 1.0A (KLUDGE) #0: Fri Sep 15 13:52:28 EDT 1995     ksulliva@kludge.psc.edu:/usr/src/sys/arch/i386/compile/KLUDGE i386
System: NetBSD kludge.psc.edu 1.0A NetBSD 1.0A (KLUDGE) #0: Fri Sep 15 13:52:28 EDT 1995 ksulliva@kludge.psc.edu:/usr/src/sys/arch/i386/compile/KLUDGE i386
>Description:
/sys/dev/isa/wd.c will not build if WDDEBUG is defined
>How-To-Repeat:
Build a kernel with wd device defined and WDDEBUG as an options and watch
the make fail.
>Fix:
After rooting around, these look right.  Someone might want to check
the 3rd change; it was a shot in the dark :-)

*** wd.c.dist	Tue Sep 19 13:33:48 1995
--- wd.c	Tue Sep 19 13:50:43 1995
***************
*** 568,574 ****
  		wd->sc_blkno = blkno / (lp->d_secsize / DEV_BSIZE);
  	} else {
  #ifdef WDDEBUG
! 		printf(" %d)%x", wd->sc_skip, inb(wd->sc_iobase+wd_altsts));
  #endif
  	}
  
--- 568,574 ----
  		wd->sc_blkno = blkno / (lp->d_secsize / DEV_BSIZE);
  	} else {
  #ifdef WDDEBUG
! 		printf(" %d)%x", wd->sc_skip, inb(wdc->sc_iobase+wd_altsts));
  #endif
  	}
  
***************
*** 676,682 ****
  
  #ifdef WDDEBUG
  		printf("sector %d cylin %d head %d addr %x sts %x\n", sector,
! 		    cylin, head, bp->b_data, inb(wd->sc_iobase+wd_altsts));
  #endif
  	} else if (wd->sc_nblks > 1) {
  		/* The number of blocks in the last stretch may be smaller. */
--- 676,682 ----
  
  #ifdef WDDEBUG
  		printf("sector %d cylin %d head %d addr %x sts %x\n", sector,
! 		    cylin, head, bp->b_data, inb(wdc->sc_iobase+wd_altsts));
  #endif
  	} else if (wd->sc_nblks > 1) {
  		/* The number of blocks in the last stretch may be smaller. */
***************
*** 736,742 ****
  	bp = wd->sc_q.b_actf;
  
  #ifdef WDDEBUG
! 	printf("I%d ", ctrlr);
  #endif
  
  	if (wait_for_unbusy(wdc) < 0) {
--- 736,742 ----
  	bp = wd->sc_q.b_actf;
  
  #ifdef WDDEBUG
! 	printf("I%d ", wd->sc_dev.dv_unit);
  #endif
  
  	if (wait_for_unbusy(wdc) < 0) {
>Audit-Trail:
>Unformatted: