Subject: typo in /sys/arch/i386/isa/if_ep.c
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: netbsd-bugs
Date: 04/16/1994 16:06:59
 I think there's a typo in if_ep.c.
The comment in if_ep.c says:
	/*
	 * a very specific search order:
	 * 	exact port & irq                   <------------
	 * 	exact port, wildcard irq
	 * 	wildcard port, exact irq
	 *	wildcard port & irq
	 * else fail..
	 */
 Exact port & irq translates in the original source code to:
ia->iobase != (u_short)-1 || ia->ia_irq != (u_short)-1
                         ^^^^
 change || to && and the behaviour in the source agrees with the
comment. Patch to do this below.

Onno van der Linden         c/o    vdlinden@fwi.uva.nl (Frank van der Linden)

*** /usr/src/sys/arch/i386/isa/if_ep.c.orig	Sat Apr 16 15:11:08 1994
--- /usr/src/sys/arch/i386/isa/if_ep.c	Sat Apr 16 15:12:34 1994
***************
*** 221,225 ****
  	 * else fail..
  	 */
! 	if (ia->ia_iobase != (u_short)-1 || ia->ia_irq != (u_short)-1) {
  		for (i = 0; i<nepcards; i++) {
  			if (epcards[i].available == 0)
--- 221,225 ----
  	 * else fail..
  	 */
! 	if (ia->ia_iobase != (u_short)-1 && ia->ia_irq != (u_short)-1) {
  		for (i = 0; i<nepcards; i++) {
  			if (epcards[i].available == 0)

------------------------------------------------------------------------------