Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Sep 2003 15:43:40 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 38203 for review
Message-ID:  <200309172243.h8HMhew5036848@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=38203

Change 38203 by marcel@marcel_nfs on 2003/09/17 15:43:37

	IFC @38201

Affected files ...

.. //depot/projects/uart/crypto/rijndael/rijndael-api-fst.c#2 integrate
.. //depot/projects/uart/dev/acpica/acpi_pci.c#4 integrate
.. //depot/projects/uart/dev/pci/pci.c#11 integrate
.. //depot/projects/uart/dev/pci/pci_private.h#4 integrate
.. //depot/projects/uart/dev/sio/sio.c#7 integrate
.. //depot/projects/uart/i386/acpica/acpi_machdep.c#4 integrate
.. //depot/projects/uart/isa/fd.c#5 integrate
.. //depot/projects/uart/net/bridge.c#3 integrate
.. //depot/projects/uart/netinet/ip_fw2.c#7 integrate
.. //depot/projects/uart/netinet/raw_ip.c#7 integrate
.. //depot/projects/uart/sys/param.h#8 integrate
.. //depot/projects/uart/vm/vm_object.c#6 integrate
.. //depot/projects/uart/vm/vm_pageout.c#7 integrate

Differences ...

==== //depot/projects/uart/crypto/rijndael/rijndael-api-fst.c#2 (text+ko) ====

@@ -16,7 +16,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.5 2003/06/10 21:43:49 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-api-fst.c,v 1.6 2003/09/17 08:51:43 ume Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -225,7 +225,7 @@
 			outBuffer += 16;
 		}
 		padLen = 16 - (inputOctets - 16*numBlocks);
-		if (padLen > 0 && padLen <= 16)
+		if (padLen <= 0 || padLen > 16)
 			return BAD_CIPHER_STATE;
 		bcopy(input, block, 16 - padLen);
 		for (cp = block + 16 - padLen; cp < block + 16; cp++)

==== //depot/projects/uart/dev/acpica/acpi_pci.c#4 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.5 2003/08/24 17:48:01 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pci.c,v 1.6 2003/09/17 08:32:44 iwasaki Exp $");
 
 #include "opt_bus.h"
 
@@ -79,7 +79,7 @@
 	DEVMETHOD(device_attach,	acpi_pci_attach),
 	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
 	DEVMETHOD(device_suspend,	bus_generic_suspend),
-	DEVMETHOD(device_resume,	bus_generic_resume),
+	DEVMETHOD(device_resume,	pci_resume),
 
 	/* Bus interface */
 	DEVMETHOD(bus_print_child,	pci_print_child),

==== //depot/projects/uart/dev/pci/pci.c#11 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pci/pci.c,v 1.232 2003/09/14 19:30:00 scottl Exp $
+ * $FreeBSD: src/sys/dev/pci/pci.c,v 1.233 2003/09/17 08:32:44 iwasaki Exp $
  *
  */
 
@@ -89,7 +89,7 @@
 	DEVMETHOD(device_attach,	pci_attach),
 	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
 	DEVMETHOD(device_suspend,	bus_generic_suspend),
-	DEVMETHOD(device_resume,	bus_generic_resume),
+	DEVMETHOD(device_resume,	pci_resume),
 
 	/* Bus interface */
 	DEVMETHOD(bus_print_child,	pci_print_child),
@@ -1509,3 +1509,35 @@
 
 	return (0);
 }
+
+int
+pci_resume(device_t dev)
+{
+	int			numdevs;
+	int			i;
+	device_t		*children;
+	device_t		child;
+	struct pci_devinfo	*dinfo;
+	pcicfgregs		*cfg;
+
+	device_get_children(dev, &children, &numdevs);
+
+	for (i = 0; i < numdevs; i++) {
+		child = children[i];
+
+		dinfo = device_get_ivars(child);
+		cfg = &dinfo->cfg;
+		if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) {
+			cfg->intline = PCI_ASSIGN_INTERRUPT(dev, child);
+			if (PCI_INTERRUPT_VALID(cfg->intline)) {
+				pci_write_config(child, PCIR_INTLINE,
+				    cfg->intline, 1);
+			}
+		}
+	}
+
+	free(children, M_TEMP);
+
+	return (bus_generic_resume(dev));
+}
+

==== //depot/projects/uart/dev/pci/pci_private.h#4 (text+ko) ====

@@ -25,7 +25,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/pci/pci_private.h,v 1.10 2003/08/22 03:11:53 imp Exp $
+ * $FreeBSD: src/sys/dev/pci/pci_private.h,v 1.11 2003/09/17 08:32:44 iwasaki Exp $
  *
  */
 
@@ -73,4 +73,5 @@
 int		pci_child_pnpinfo_str_method(device_t cbdev, device_t child,
 		    char *buf, size_t buflen);
 int		pci_assign_interrupt_method(device_t dev, device_t child);
+int		pci_resume(device_t dev);
 #endif /* _PCI_PRIVATE_H_ */

==== //depot/projects/uart/dev/sio/sio.c#7 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.405 2003/09/15 13:49:18 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.408 2003/09/17 17:26:00 bde Exp $");
 
 #include "opt_comconsole.h"
 #include "opt_compat.h"
@@ -113,21 +113,20 @@
 #define	COM_ISMULTIPORT(flags)	(0)
 #endif /* COM_MULTIPORT */
 
+#define	COM_C_IIR_TXRDYBUG	0x80000
 #define	COM_CONSOLE(flags)	((flags) & 0x10)
+#define	COM_DEBUGGER(flags)	((flags) & 0x80)
+#define	COM_FIFOSIZE(flags)	(((flags) & 0xff000000) >> 24)
 #define	COM_FORCECONSOLE(flags)	((flags) & 0x20)
+#define	COM_IIR_TXRDYBUG(flags)	((flags) & COM_C_IIR_TXRDYBUG)
 #define	COM_LLCONSOLE(flags)	((flags) & 0x40)
-#define	COM_DEBUGGER(flags)	((flags) & 0x80)
 #define	COM_LOSESOUTINTS(flags)	((flags) & 0x08)
-#define	COM_NOFIFO(flags)		((flags) & 0x02)
+#define	COM_NOFIFO(flags)	((flags) & 0x02)
+#define	COM_NOPROBE(flags)	((flags) & 0x40000)
+#define	COM_NOSCR(flags)	((flags) & 0x100000)
 #define	COM_PPSCTS(flags)	((flags) & 0x10000)
-#define COM_ST16650A(flags)	((flags) & 0x20000)
-#define COM_C_NOPROBE		(0x40000)
-#define COM_NOPROBE(flags)	((flags) & COM_C_NOPROBE)
-#define COM_C_IIR_TXRDYBUG	(0x80000)
-#define COM_IIR_TXRDYBUG(flags)	((flags) & COM_C_IIR_TXRDYBUG)
-#define COM_NOSCR(flags)	((flags) & 0x100000)
+#define	COM_ST16650A(flags)	((flags) & 0x20000)
 #define	COM_TI16754(flags)	((flags) & 0x200000)
-#define	COM_FIFOSIZE(flags)	(((flags) & 0xff000000) >> 24)
 
 #define	sio_getreg(com, off) \
 	(bus_space_read_1((com)->bst, (com)->bsh, (off)))
@@ -196,7 +195,6 @@
 	u_char	extra_state;	/* more flag bits, separate for order trick */
 	u_char	fifo_image;	/* copy of value written to FIFO */
 	bool_t	hasfifo;	/* nonzero for 16550 UARTs */
-	bool_t	st16650a;	/* Is a Startech 16650A or RTS/CTS compat */
 	bool_t	loses_outints;	/* nonzero if device loses output interrupts */
 	u_char	mcr_image;	/* copy of value written to MCR */
 #ifdef COM_MULTIPORT
@@ -206,6 +204,7 @@
 	bool_t  gone;		/* hardware disappeared */
 	bool_t	poll;		/* nonzero if polling is required */
 	bool_t	poll_output;	/* nonzero if polling for output is required */
+	bool_t	st16650a;	/* nonzero if Startech 16650A compatible */
 	int	unit;		/* unit	number */
 	int	dtr_wait;	/* time to hold DTR down on close (* 1/hz) */
 	u_int	tx_fifo_size;
@@ -450,7 +449,7 @@
 		device_printf(dev, "NULL com in siounload\n");
 		return (0);
 	}
-	com->gone = 1;
+	com->gone = TRUE;
 	for (i = 0 ; i < 6; i++)
 		destroy_dev(com->devs[i]);
 	if (com->irqres) {
@@ -1023,7 +1022,6 @@
 	}
 	sio_setreg(com, com_fifo, FIFO_ENABLE | FIFO_RX_HIGH);
 	DELAY(100);
-	com->st16650a = 0;
 	switch (inb(com->int_id_port) & IIR_FIFO_MASK) {
 	case FIFO_RX_LOW:
 		printf(" 16450");
@@ -1037,40 +1035,40 @@
 	case FIFO_RX_HIGH:
 		if (COM_NOFIFO(flags)) {
 			printf(" 16550A fifo disabled");
-		} else {
-			com->hasfifo = TRUE;
-			if (COM_ST16650A(flags)) {
-				com->st16650a = 1;
-				com->tx_fifo_size = 32;
-				printf(" ST16650A");
-			} else if (COM_TI16754(flags)) {
-				com->tx_fifo_size = 64;
-				printf(" TI16754");
-			} else {
-				com->tx_fifo_size = COM_FIFOSIZE(flags);
-				printf(" 16550A");
-			}
+			break;
+		}
+		com->hasfifo = TRUE;
+		if (COM_ST16650A(flags)) {
+			printf(" ST16650A");
+			com->st16650a = TRUE;
+			com->tx_fifo_size = 32;
+			break;
+		}
+		if (COM_TI16754(flags)) {
+			printf(" TI16754");
+			com->tx_fifo_size = 64;
+			break;
 		}
+		printf(" 16550A");
 #ifdef COM_ESP
 		for (espp = likely_esp_ports; *espp != 0; espp++)
 			if (espattach(com, *espp)) {
 				com->tx_fifo_size = 1024;
 				break;
 			}
+		if (com->esp != NULL)
+			break;
 #endif
-		if (!com->st16650a && !COM_TI16754(flags)) {
-			if (!com->tx_fifo_size)
-				com->tx_fifo_size = 16;
-			else
-				printf(" lookalike with %d bytes FIFO",
-				    com->tx_fifo_size);
-		}
-
+		com->tx_fifo_size = COM_FIFOSIZE(flags);
+		if (com->tx_fifo_size == 0)
+			com->tx_fifo_size = 16;
+		else
+			printf(" lookalike with %u bytes FIFO",
+			       com->tx_fifo_size);
 		break;
 	}
-	
 #ifdef COM_ESP
-	if (com->esp) {
+	if (com->esp != NULL) {
 		/*
 		 * Set 16550 compatibility mode.
 		 * We don't use the ESP_MODE_SCALE bit to increase the
@@ -2205,6 +2203,7 @@
 	u_int		divisor;
 	u_char		dlbh;
 	u_char		dlbl;
+	u_char		efr_flowbits;
 	int		s;
 	int		unit;
 
@@ -2309,18 +2308,13 @@
 			sio_setreg(com, com_dlbh, dlbh);
 	}
 
-	sio_setreg(com, com_cfcr, com->cfcr_image = cfcr);
-
 	if (!(tp->t_state & TS_TTSTOP))
 		com->state |= CS_TTGO;
+	efr_flowbits = 0;
 
 	if (cflag & CRTS_IFLOW) {
-		if (com->st16650a) {
-			sio_setreg(com, com_cfcr, 0xbf);
-			sio_setreg(com, com_fifo,
-				   sio_getreg(com, com_fifo) | 0x40);
-		}
 		com->state |= CS_RTS_IFLOW;
+		efr_flowbits |= EFR_AUTORTS;
 		/*
 		 * If CS_RTS_IFLOW just changed from off to on, the change
 		 * needs to be propagated to MCR_RTS.  This isn't urgent,
@@ -2334,14 +2328,8 @@
 		 * on here, since comstart() won't do it later.
 		 */
 		outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
-		if (com->st16650a) {
-			sio_setreg(com, com_cfcr, 0xbf);
-			sio_setreg(com, com_fifo,
-				   sio_getreg(com, com_fifo) & ~0x40);
-		}
 	}
 
-
 	/*
 	 * Set up state to handle output flow control.
 	 * XXX - worth handling MDMBUF (DCD) flow control at the lowest level?
@@ -2351,22 +2339,18 @@
 	com->state &= ~CS_CTS_OFLOW;
 	if (cflag & CCTS_OFLOW) {
 		com->state |= CS_CTS_OFLOW;
+		efr_flowbits |= EFR_AUTOCTS;
 		if (!(com->last_modem_status & MSR_CTS))
 			com->state &= ~CS_ODEVREADY;
-		if (com->st16650a) {
-			sio_setreg(com, com_cfcr, 0xbf);
-			sio_setreg(com, com_fifo,
-				   sio_getreg(com, com_fifo) | 0x80);
-		}
-	} else {
-		if (com->st16650a) {
-			sio_setreg(com, com_cfcr, 0xbf);
-			sio_setreg(com, com_fifo,
-				   sio_getreg(com, com_fifo) & ~0x80);
-		}
 	}
 
-	sio_setreg(com, com_cfcr, com->cfcr_image);
+	if (com->st16650a) {
+		sio_setreg(com, com_lcr, LCR_EFR_ENABLE);
+		sio_setreg(com, com_efr,
+			   (sio_getreg(com, com_efr)
+			    & ~(EFR_AUTOCTS | EFR_AUTORTS)) | efr_flowbits);
+	}
+	sio_setreg(com, com_cfcr, com->cfcr_image = cfcr);
 
 	/* XXX shouldn't call functions while intrs are disabled. */
 	disc_optim(tp, t, com);
@@ -3173,7 +3157,6 @@
 	return (c);
 }
 
-
 static int
 siocngetc(struct consdev *cd)
 {

==== //depot/projects/uart/i386/acpica/acpi_machdep.c#4 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.12 2003/09/10 05:29:30 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.13 2003/09/17 08:47:39 iwasaki Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -98,6 +98,15 @@
 	if (battp->state & ACPI_BATT_STAT_CHARGING)
 		state = 3;		/* charging */
 
+	/* If still unknown, determine it based on the battery capacity. */
+	if (state == 0xff) {
+		if (battp->cap >= 50) {
+			state = 0;	/* high */
+		} else {
+			state = 1;	/* low */
+		}
+	}
+
 	return (state);
 }
 

==== //depot/projects/uart/isa/fd.c#5 (text+ko) ====

@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/isa/fd.c,v 1.258 2003/09/11 19:27:24 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/isa/fd.c,v 1.260 2003/09/17 07:40:00 phk Exp $");
 
 #include "opt_fdc.h"
 #include "card.h"
@@ -404,10 +404,10 @@
 static int fd_in(struct fdc_data *, int *);
 static int out_fdc(struct fdc_data *, int);
 /*
- * The open function is named Fdopen() to avoid confusion with fdopen()
+ * The open function is named fdopen() to avoid confusion with fdopen()
  * in fd(4).  The difference is now only meaningful for debuggers.
  */
-static	d_open_t	Fdopen;
+static	d_open_t	fdopen;
 static	d_close_t	fdclose;
 static	d_strategy_t	fdstrategy;
 static void fdstart(struct fdc_data *);
@@ -483,7 +483,7 @@
 
 #define CDEV_MAJOR 9
 static struct cdevsw fd_cdevsw = {
-	.d_open =	Fdopen,
+	.d_open =	fdopen,
 	.d_close =	fdclose,
 	.d_read =	physread,
 	.d_write =	physwrite,
@@ -1171,6 +1171,7 @@
 						UID_ROOT, GID_OPERATOR, 0640,
 						name);
 				fd->clonedevs[i] = *dev;
+				fd->clonedevs[i]->si_drv1 = fd;
 				return;
 			}
 	}
@@ -1336,6 +1337,7 @@
 #endif
 	fd->masterdev = make_dev(&fd_cdevsw, fd->fdu << 6,
 				 UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu);
+	fd->masterdev->si_drv1 = fd;
 #ifdef GONE_IN_5
 	{
 	int i;
@@ -1560,15 +1562,15 @@
  * auxiliary functions).
  */
 static int
-Fdopen(dev_t dev, int flags, int mode, struct thread *td)
+fdopen(dev_t dev, int flags, int mode, struct thread *td)
 {
- 	fdu_t fdu = FDUNIT(minor(dev));
 	int type = FDTYPE(minor(dev));
 	fd_p	fd;
 	fdc_p	fdc;
  	int rv, unitattn, dflags;
 
-	if ((fd = devclass_get_softc(fd_devclass, fdu)) == 0)
+	fd = dev->si_drv1;
+	if (fd == NULL)
 		return (ENXIO);
 	fdc = fd->fdc;
 	if ((fdc == NULL) || (fd->type == FDT_NONE))
@@ -1664,10 +1666,9 @@
 static int
 fdclose(dev_t dev, int flags, int mode, struct thread *td)
 {
- 	fdu_t fdu = FDUNIT(minor(dev));
 	struct fd_data *fd;
 
-	fd = devclass_get_softc(fd_devclass, fdu);
+	fd = dev->si_drv1;
 	fd->flags &= ~(FD_OPEN | FD_NONBLOCK);
 	fd->options &= ~(FDOPT_NORETRY | FDOPT_NOERRLOG | FDOPT_NOERROR);
 
@@ -1685,8 +1686,8 @@
 	size_t	fdblk;
 
  	fdu = FDUNIT(minor(bp->bio_dev));
-	fd = devclass_get_softc(fd_devclass, fdu);
-	if (fd == 0)
+	fd = bp->bio_dev->si_drv1;
+	if (fd == NULL)
 		panic("fdstrategy: buf for nonexistent device (%#lx, %#lx)",
 		      (u_long)major(bp->bio_dev), (u_long)minor(bp->bio_dev));
 	fdc = fd->fdc;
@@ -1883,7 +1884,7 @@
 	int i, n, oopts, rv;
 
  	fdu = FDUNIT(minor(dev));
-	fd = devclass_get_softc(fd_devclass, fdu);
+	fd = dev->si_drv1;
 
 	switch (fd->type) {
 	default:
@@ -2010,7 +2011,7 @@
  		return (0);
 	}
 	fdu = FDUNIT(minor(bp->bio_dev));
-	fd = devclass_get_softc(fd_devclass, fdu);
+	fd = bp->bio_dev->si_drv1;
 	fdblk = 128 << fd->ft->secsize;
 	if (fdc->fd && (fd != fdc->fd))
 		device_printf(fd->dev, "confused fd pointers\n");
@@ -2513,7 +2514,7 @@
 
 	/* XXX shouldn't this be cached somewhere?  */
 	fdu = FDUNIT(minor(bp->bio_dev));
-	fd = devclass_get_softc(fd_devclass, fdu);
+	fd = bp->bio_dev->si_drv1;
 	if (fd->options & FDOPT_NORETRY)
 		goto fail;
 
@@ -2584,7 +2585,7 @@
 	int error;
 
  	fdu = FDUNIT(minor(dev));
-	fd = devclass_get_softc(fd_devclass, fdu);
+	fd = dev->si_drv1;
 	fdblk = 128 << fd->ft->secsize;
 	finfo = (struct fd_formb *)data;
 	idfield = (struct fdc_readid *)data;
@@ -2636,7 +2637,7 @@
 
  	fdu = FDUNIT(minor(dev));
 	type = FDTYPE(minor(dev));
- 	fd = devclass_get_softc(fd_devclass, fdu);
+ 	fd = dev->si_drv1;
 
 	/*
 	 * First, handle everything that could be done with

==== //depot/projects/uart/net/bridge.c#3 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net/bridge.c,v 1.68 2003/09/17 00:50:33 sam Exp $
+ * $FreeBSD: src/sys/net/bridge.c,v 1.69 2003/09/17 18:14:49 sam Exp $
  */
 
 /*
@@ -852,7 +852,7 @@
 	eh->ether_shost, ".",
 	eh->ether_dhost, ".",
 	ntohs(eh->ether_type),
-	(dst <= BDG_FORWARD) ? bdg_dst_names[(int)dst] :
+	(dst <= BDG_FORWARD) ? bdg_dst_names[(uintptr_t)dst] :
 		dst->if_name,
 	(dst <= BDG_FORWARD) ? 0 : dst->if_unit));
 

==== //depot/projects/uart/netinet/ip_fw2.c#7 (text+ko) ====

@@ -22,7 +22,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.38 2003/09/17 00:56:50 sam Exp $
+ * $FreeBSD: src/sys/netinet/ip_fw2.c,v 1.39 2003/09/17 22:06:47 sam Exp $
  */
 
 #define        DEB(x)
@@ -111,7 +111,8 @@
 	struct mtx	mtx;		/* lock guarding rule list */
 };
 #define	IPFW_LOCK_INIT(_chain) \
-	mtx_init(&(_chain)->mtx, "IPFW static rules", NULL, MTX_DEF)
+	mtx_init(&(_chain)->mtx, "IPFW static rules", NULL, \
+		MTX_DEF | MTX_RECURSE)
 #define	IPFW_LOCK_DESTROY(_chain)	mtx_destroy(&(_chain)->mtx)
 #define	IPFW_LOCK(_chain)	mtx_lock(&(_chain)->mtx)
 #define	IPFW_UNLOCK(_chain)	mtx_unlock(&(_chain)->mtx)

==== //depot/projects/uart/netinet/raw_ip.c#7 (text+ko) ====

@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)raw_ip.c	8.7 (Berkeley) 5/15/95
- * $FreeBSD: src/sys/netinet/raw_ip.c,v 1.117 2003/09/01 04:27:34 sam Exp $
+ * $FreeBSD: src/sys/netinet/raw_ip.c,v 1.118 2003/09/17 21:13:16 sam Exp $
  */
 
 #include "opt_inet6.h"
@@ -709,10 +709,8 @@
 	for (inp = LIST_FIRST(ripcbinfo.listhead), i = 0; inp && i < n;
 	     inp = LIST_NEXT(inp, inp_list)) {
 		INP_LOCK(inp);
-		if (inp->inp_gencnt <= gencnt) {
-			if (cr_canseesocket(req->td->td_ucred,
-			    inp->inp_socket))
-				continue;
+		if (inp->inp_gencnt <= gencnt &&
+		    cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0) {
 			/* XXX held references? */
 			inp_list[i++] = inp;
 		}

==== //depot/projects/uart/sys/param.h#8 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)param.h	8.3 (Berkeley) 4/4/95
- * $FreeBSD: src/sys/sys/param.h,v 1.166 2003/09/08 11:54:59 tjr Exp $
+ * $FreeBSD: src/sys/sys/param.h,v 1.167 2003/09/17 20:37:02 jhb Exp $
  */
 
 #ifndef _SYS_PARAM_H_
@@ -57,7 +57,7 @@
  * scheme is:  <major><two digit minor><0 if release branch, otherwise 1>xx
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 501106	/* Master, propagated to newvers */
+#define __FreeBSD_version 501107	/* Master, propagated to newvers */
 
 #ifndef NULL
 #define	NULL	0

==== //depot/projects/uart/vm/vm_object.c#6 (text+ko) ====

@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_object.c,v 1.305 2003/09/15 05:58:27 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_object.c,v 1.306 2003/09/17 07:00:14 alc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1093,8 +1093,6 @@
 	vm_object_t source;
 	vm_object_t result;
 
-	GIANT_REQUIRED;
-
 	source = *object;
 
 	/*

==== //depot/projects/uart/vm/vm_pageout.c#7 (text+ko) ====

@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_pageout.c,v 1.242 2003/08/31 00:00:46 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_pageout.c,v 1.243 2003/09/17 06:55:42 alc Exp $");
 
 #include "opt_vm.h"
 #include <sys/param.h>
@@ -926,13 +926,14 @@
 			 */
 			if (object->type == OBJT_VNODE) {
 				vp = object->handle;
-
 				mp = NULL;
 				if (vp->v_type == VREG)
 					vn_start_write(vp, &mp, V_NOWAIT);
 				vm_page_unlock_queues();
+				VI_LOCK(vp);
 				VM_OBJECT_UNLOCK(object);
-				if (vget(vp, LK_EXCLUSIVE|LK_TIMELOCK, curthread)) {
+				if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK |
+				    LK_TIMELOCK, curthread)) {
 					VM_OBJECT_LOCK(object);
 					vm_page_lock_queues();
 					++pageout_lock_miss;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309172243.h8HMhew5036848>