cvs commit: src/sys/amd64/amd64 machdep.c

M. Warner Losh imp at bsdimp.com
Fri Apr 25 02:14:54 UTC 2008


In message: <200804241559.26710.jhb at freebsd.org>
            John Baldwin <jhb at freebsd.org> writes:
: --- //depot/projects/smpng/sys/dev/sio/sio.c	2008/01/21 18:58:30
: +++ //depot/user/jhb/intr/dev/sio/sio.c	2008/04/24 14:51:42
: @@ -85,6 +85,11 @@
:  #endif
:  #include <dev/ic/ns16550.h>
:  
: +#if defined(__i386__) || defined(__amd64__)
: +#define	PROBE_IRQ
: +#include <machine/intr_machdep.h>
: +#endif
: +
:  #define	LOTS_OF_EVENTS	64	/* helps separate urgent events from input */
:  
:  #ifdef COM_MULTIPORT

noprobe is true for all busses except isa and cbus.  So really, you
could make this patch a lot simpler.

Index: sio.c
===================================================================
RCS file: /cache/ncvs/src/sys/dev/sio/sio.c,v
retrieving revision 1.473
diff -u -r1.473 sio.c
--- sio.c	25 Dec 2007 17:51:57 -0000	1.473
+++ sio.c	25 Apr 2008 02:11:08 -0000
@@ -430,8 +430,10 @@
 	int		fn;
 	device_t	idev;
 	Port_t		iobase;
+#ifdef	DEV_ISA
 	intrmask_t	irqmap[4];
 	intrmask_t	irqs;
+#endif
 	u_char		mcr_image;
 	int		result;
 	u_long		xirq;
@@ -700,9 +702,10 @@
 			device_set_softc(dev, NULL);
 			free(com, M_DEVBUF);
 		}
-		return (result == 0 ? BUS_PROBE_DEFAULT + 1 : result);
+		return (result == 0 ? BUS_PROBE_DEFAULT - 1 : result);
 	}
 
+#ifdef	DEV_ISA
 	/*
 	 * Check that
 	 *	o the CFCR, IER and MCR in UART hold the values written to them
@@ -777,7 +780,10 @@
 		device_set_softc(dev, NULL);
 		free(com, M_DEVBUF);
 	}
-	return (result == 0 ? BUS_PROBE_DEFAULT + 1 : result);
+	return (result == 0 ? BUS_PROBE_DEFAULT - 1 : result);
+#else
+	return (BUS_PROBE_DEFAULT - 1);
+#endif
 }
 
 #ifdef COM_ESP


Warner


More information about the cvs-src mailing list