Subject: kern/4072: small patch for sys/dev/isa/lpt.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mason@primenet.com.au>
List: netbsd-bugs
Date: 09/01/1997 20:25:55
>Number:         4072
>Category:       kern
>Synopsis:       fix for lpt debug code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep  1 13:35:01 1997
>Last-Modified:
>Originator:     Geoff Wing
>Organization:
Geoff Wing [mason@primenet.com.au]                   Phone    : +61-3-9818 2977 
 Technical Manager: PrimeNet Computer Consultants    Facsimile: +61-3-9768 2909
 Web: <URL:http://www.primenet.com.au/>              Mobile   : 0412 162 441
        [ Boulderdash: <URL:http://ciips.ee.uwa.edu.au/~williams/bd/> ]
>Release:        -current
>Environment:
System: NetBSD coral.primenet.com.au 1.2G NetBSD 1.2G (CORAL) #0: Fri Aug 29 22:27:39 EST 1997 root@coral.primenet.com.au:/src/netbsd/src/sys/arch/i386/compile/CORAL i386


>Description:
	debug code in ISA lpt.c driver needs small fix
>How-To-Repeat:
	define debugging in lpt or look through code
>Fix:
	I did this ages ago, and looking at it now I can't remember why
	the second bit should be long - it's a bus_addr_t = caddr_t = (char *)
	Any NetBSD machines address more than it's local architecture's int
	size?  Anyway, the first part obviously needs the patch.  The second
	part can probably go to /dev/null


*** /usr/src/sys/dev/isa/lpt.c	Thu Dec  5 23:18:58 1996
--- /usr/obj/sys/dev/isa/lpt.c	Tue Sep  2 06:12:57 1997
***************
*** 80,86 ****
  #if !defined(DEBUG) || !defined(notdef)
  #define LPRINTF(a)
  #else
! #define LPRINTF		if (lptdebug) printf a
  int lptdebug = 1;
  #endif
  
--- 80,86 ----
  #if !defined(DEBUG) || !defined(notdef)
  #define LPRINTF(a)
  #else
! #define LPRINTF(a)		if (lptdebug) printf a
  int lptdebug = 1;
  #endif
  
***************
*** 163,169 ****
  		delay(10);
  		temp = bus_space_read_1(iot, ioh, off) & mask;
  	} while (temp != data && --timeout);
! 	LPRINTF(("lpt: port=0x%x out=0x%x in=0x%x timeout=%d\n", base + off,
  	    data, temp, timeout));
  	return (temp == data);
  }
--- 163,169 ----
  		delay(10);
  		temp = bus_space_read_1(iot, ioh, off) & mask;
  	} while (temp != data && --timeout);
! 	LPRINTF(("lpt: port=0x%lx out=0x%x in=0x%x timeout=%d\n", base + off,
  	    data, temp, timeout));
  	return (temp == data);
  }
>Audit-Trail:
>Unformatted: