CVS commit: src/sys/dev/pci

2012-07-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Jul 20 04:13:06 UTC 2012

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add some Intel's devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1120 -r1.1121 src/sys/dev/pci/pcidevs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1120 src/sys/dev/pci/pcidevs:1.1121
--- src/sys/dev/pci/pcidevs:1.1120	Thu Jul 19 02:40:08 2012
+++ src/sys/dev/pci/pcidevs	Fri Jul 20 04:13:06 2012
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1120 2012/07/19 02:40:08 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1121 2012/07/20 04:13:06 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2604,7 +2604,7 @@ product INTEL 6SERIES_PCIE_6	0x1c1a	6 Se
 product INTEL 6SERIES_PCIE_7	0x1c1c	6 Series PCIE
 product INTEL 6SERIES_PCIE_8	0x1c1e	6 Series PCIE
 product INTEL 6SERIES_HDA	0x1c20	6 Series HD Audio
-product INTEL 6SERIES_SMB	0x1c22	6 Series SMBus
+product INTEL 6SERIES_SMB	0x1c22	6 Series SMBus Controller
 product INTEL 6SERIES_THERM	0x1c24	6 Series Thermal
 product INTEL 6SERIES_DMI	0x1c25	6 Series DMI-PCI
 product INTEL 6SERIES_EHCI_1	0x1c26	6 Series USB
@@ -2625,6 +2625,46 @@ product INTEL C202_LPC		0x1c52	C202 LPC
 product INTEL C204_LPC		0x1c54	C204 LPC
 product INTEL C206_LPC		0x1c56	C206 LPC
 product INTEL H61_LPC		0x1c5c	H61 LPC
+product INTEL C600_SATA_1	0x1d00	C600/X79 SATA
+product INTEL C600_AHCI		0x1d02	C600/X79 AHCI
+product INTEL C600_RAID_1	0x1d04	C600/X79 RAID
+product INTEL C600_RAID_2	0x1d06	C600/X79 Premium RAID
+product INTEL C600_SATA_2	0x1d08	C600/X79 SATA
+product INTEL C600_PCIE_1	0x1d10	C600/X79 PCIE
+product INTEL C600_PCIE_2	0x1d12	C600/X79 PCIE
+product INTEL C600_PCIE_3	0x1d14	C600/X79 PCIE
+product INTEL C600_PCIE_4	0x1d16	C600/X79 PCIE
+product INTEL C600_PCIE_5	0x1d18	C600/X79 PCIE
+product INTEL C600_PCIE_6	0x1d1a	C600/X79 PCIE
+product INTEL C600_PCIE_7	0x1d1c	C600/X79 PCIE
+product INTEL C600_PCIE_8	0x1d1e	C600/X79 PCIE
+product INTEL C600_HDA		0x1d20	C600 HD Audio
+product INTEL C600_SMB_1	0x1d22	C600/X79 SMBus Controller
+product INTEL C600_THERM	0x1d24	C600 Thermal Management Controller
+product INTEL C600_EHCI_1	0x1d26	C600 USB
+product INTEL C600_EHCI_2	0x1d2d	C600 USB
+product INTEL C600_LAN		0x1d33	C600 LAN
+product INTEL C600_MEI_1	0x1d3a	C600 MEI
+product INTEL C600_MEI_2	0x1d3b	C600 MEI
+product INTEL C600_VPCIE	0x1d3e	C600 Virtual PCIE
+product INTEL C600_LPC		0x1d41	C600 LPC
+product INTEL C600_SAS_1	0x1d60	C600 SAS Controller
+product INTEL C600_SAS_SATA_1	0x1d61	C600 SAS Controller (SATA)
+product INTEL C600_SAS_2	0x1d62	C600 SAS Controller
+product INTEL C600_SAS_3	0x1d63	C600 SAS Controller
+product INTEL C600_SAS_4	0x1d64	C600 SAS Controller
+product INTEL C600_SAS_5	0x1d65	C600 SAS Controller
+product INTEL C600_SAS_6	0x1d66	C600 SAS Controller
+product INTEL C600_SAS_7	0x1d67	C600 SAS Controller
+product INTEL C600_SAS_8	0x1d68	C600 SAS Controller
+product INTEL C600_SAS_9	0x1d69	C600 SAS Controller
+product INTEL C600_SAS_SATA_2	0x1d6a	C600 SAS Controller (SATA)
+product INTEL C600_SAS_SATA_3	0x1d6b	C600/X79 SAS Controller (SATA)
+product INTEL C600_SAS_10	0x1d6c	C600 SAS Controller
+product INTEL C600_SAS_11	0x1d6d	C600 SAS Controller
+product INTEL C600_SAS_12	0x1d6e	C600 SAS Controller
+product INTEL C600_SAS_SATA_4	0x1d6f	C600 SAS Controller (SATA)
+product INTEL C600_SMB_2	0x1d70	C600/X79 Series SMBus Controller
 product INTEL 82801AA_LPC	0x2410	82801AA LPC Interface Bridge
 product INTEL 82801AA_IDE	0x2411	82801AA IDE Controller
 product INTEL 82801AA_USB	0x2412	82801AA USB Controller
@@ -3055,6 +3095,52 @@ product INTEL 3400_PCIE_6	0x3b4c	3400 PC
 product INTEL 3400_PCIE_7	0x3b4e	3400 PCIE
 product INTEL 3400_PCIE_8	0x3b50	3400 PCIE
 product INTEL 3400_HDA		0x3b56	3400 HD Audio
+product INTEL QS57_HDA		0x3b57	QS57 HD Audio
+product INTEL 3400_MEI_1	0x3b64	3400 MEI
+product INTEL 3400_MEI_2	0x3b65	3400 MEI
+product INTEL 3400_PT_IDER	0x3b66	3400 PT IDER
+product INTEL 3400_KT		0x3b67	3400 KT
+product INTEL E5_HB		0x3c00	E5 Host
+product INTEL E5_PCIE_1		0x3c02	E5 PCIE
+product INTEL E5_PCIE_2		0x3c03	E5 PCIE
+product INTEL E5_PCIE_3		0x3c04	E5 PCIE
+product INTEL E5_PCIE_4		0x3c05	E5 PCIE
+product INTEL E5_PCIE_5		0x3c06	E5 PCIE
+product INTEL E5_PCIE_6		0x3c07	E5 PCIE
+product INTEL E5_PCIE_7		0x3c08	E5 PCIE
+product INTEL E5_PCIE_8		0x3c09	E5 PCIE
+product INTEL E5_PCIE_9		0x3c0a	E5 PCIE
+product INTEL E5_PCIE_10	0x3c0b	E5 PCIE
+product INTEL E5_DMA_1		0x3c20	E5 DMA
+product INTEL E5_DMA_2		0x3c21	E5 DMA
+product INTEL E5_DMA_3		0x3c22	E5 DMA
+product INTEL E5_DMA_4		0x3c23	E5 DMA
+product INTEL E5_DMA_5		0x3c24	E5 DMA
+product INTEL E5_DMA_6		0x3c25	E5 DMA
+product INTEL E5_DMA_7		0x3c26	E5 DMA
+product INTEL E5_DMA_8		0x3c27	E5 DMA
+product INTEL E5_ADDRMAP	0x3c28	E5 Address Map
+product INTEL E5_ERR		0x3c2a	E5 Error Reportin

CVS commit: src/sys/compat/netbsd32

2012-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 20 02:27:36 UTC 2012

Modified Files:
src/sys/compat/netbsd32: netbsd32_lwp.c

Log Message:
always allocate a full ucontext structure so that we don't corrupt memory.
XXX: needs pullup to 6?


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/compat/netbsd32/netbsd32_lwp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/compat/netbsd32/netbsd32_lwp.c
diff -u src/sys/compat/netbsd32/netbsd32_lwp.c:1.13 src/sys/compat/netbsd32/netbsd32_lwp.c:1.14
--- src/sys/compat/netbsd32/netbsd32_lwp.c:1.13	Mon May 21 10:15:19 2012
+++ src/sys/compat/netbsd32/netbsd32_lwp.c	Thu Jul 19 22:27:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_lwp.c,v 1.13 2012/05/21 14:15:19 martin Exp $	*/
+/*	$NetBSD: netbsd32_lwp.c,v 1.14 2012/07/20 02:27:36 christos Exp $	*/
 
 /*
  *  Copyright (c) 2005, 2006, 2007 The NetBSD Foundation.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.13 2012/05/21 14:15:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_lwp.c,v 1.14 2012/07/20 02:27:36 christos Exp $");
 
 #include 
 #include 
@@ -60,7 +60,7 @@ netbsd32__lwp_create(struct lwp *l, cons
 
 	KASSERT(p->p_emul->e_ucsize == sizeof(*newuc));
 
-	newuc = kmem_alloc(sizeof(ucontext32_t), KM_SLEEP);
+	newuc = kmem_alloc(sizeof(ucontext_t), KM_SLEEP);
 	error = copyin(SCARG_P32(uap, ucp), newuc, p->p_emul->e_ucsize);
 	if (error)
 		goto fail;
@@ -85,7 +85,7 @@ netbsd32__lwp_create(struct lwp *l, cons
 	return copyout(&lid, SCARG_P32(uap, new_lwp), sizeof(lid));
 
 fail:
-	kmem_free(newuc, sizeof(*newuc));
+	kmem_free(newuc, sizeof(ucontext_t));
 	return error;
 }
 



CVS commit: src/sys/dev/usb

2012-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jul 20 02:23:35 UTC 2012

Modified Files:
src/sys/dev/usb: usb.c

Log Message:
don't access memory outside the array bounds.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/usb/usb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/usb.c
diff -u src/sys/dev/usb/usb.c:1.132 src/sys/dev/usb/usb.c:1.133
--- src/sys/dev/usb/usb.c:1.132	Tue Jul 17 06:33:46 2012
+++ src/sys/dev/usb/usb.c	Thu Jul 19 22:23:35 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.c,v 1.132 2012/07/17 10:33:46 cegger Exp $	*/
+/*	$NetBSD: usb.c,v 1.133 2012/07/20 02:23:35 christos Exp $	*/
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.132 2012/07/17 10:33:46 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.133 2012/07/20 02:23:35 christos Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_usb.h"
@@ -362,15 +362,14 @@ usb_add_task(usbd_device_handle dev, str
 void
 usb_rem_task(usbd_device_handle dev, struct usb_task *task)
 {
-	struct usb_taskq *taskq;
 
-	taskq = &usb_taskq[task->queue];
-	mutex_enter(&taskq->lock);
 	if (task->queue != -1) {
+		struct usb_taskq *taskq = &usb_taskq[task->queue];
+		mutex_enter(&taskq->lock);
 		TAILQ_REMOVE(&taskq->tasks, task, next);
 		task->queue = -1;
+		mutex_exit(&taskq->lock);
 	}
-	mutex_exit(&taskq->lock);
 }
 
 void



CVS commit: src/sys/arch

2012-07-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 20 02:14:02 UTC 2012

Modified Files:
src/sys/arch/arm/gemini: obio_ehci.c
src/sys/arch/arm/imx: imxusb.c
src/sys/arch/arm/omap: omap3_ehci.c
src/sys/arch/mips/atheros/dev: ehci_arbus.c
src/sys/arch/mips/ralink: ralink_ehci.c
src/sys/arch/mips/rmi: rmixl_ehci.c
src/sys/arch/powerpc/booke/dev: pq3ehci.c

Log Message:
EHCI_USBINTR is 4 bytes long so use EOWRITE4


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/gemini/obio_ehci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imxusb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/omap/omap3_ehci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/atheros/dev/ehci_arbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ralink/ralink_ehci.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/rmi/rmixl_ehci.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/booke/dev/pq3ehci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/gemini/obio_ehci.c
diff -u src/sys/arch/arm/gemini/obio_ehci.c:1.2 src/sys/arch/arm/gemini/obio_ehci.c:1.3
--- src/sys/arch/arm/gemini/obio_ehci.c:1.2	Fri Oct 24 17:31:24 2008
+++ src/sys/arch/arm/gemini/obio_ehci.c	Fri Jul 20 02:14:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: obio_ehci.c,v 1.2 2008/10/24 17:31:24 matt Exp $	*/
+/*	$NetBSD: obio_ehci.c,v 1.3 2012/07/20 02:14:01 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.2 2008/10/24 17:31:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.3 2012/07/20 02:14:01 matt Exp $");
 
 #include "locators.h"
 
@@ -122,7 +122,7 @@ ehci_obio_attach(device_t parent, device
 	/* Disable interrupts, so we don't get any spurious ones. */
 	sc->sc_offs = EREAD1(sc, EHCI_CAPLENGTH);
 	DPRINTF(("%s: offs=%d\n", devname, sc->sc_offs));
-	EOWRITE2(sc, EHCI_USBINTR, 0);
+	EOWRITE4(sc, EHCI_USBINTR, 0);
 	bus_space_write_4(sc->iot, sc->ioh, EHCI_HCOTGDEV_INTR_MASK,
 	OTG_INT|DEV_INT);
 

Index: src/sys/arch/arm/imx/imxusb.c
diff -u src/sys/arch/arm/imx/imxusb.c:1.1 src/sys/arch/arm/imx/imxusb.c:1.2
--- src/sys/arch/arm/imx/imxusb.c:1.1	Tue Nov 30 13:05:27 2010
+++ src/sys/arch/arm/imx/imxusb.c	Fri Jul 20 02:14:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: imxusb.c,v 1.1 2010/11/30 13:05:27 bsh Exp $	*/
+/*	$NetBSD: imxusb.c,v 1.2 2012/07/20 02:14:01 matt Exp $	*/
 /*
  * Copyright (c) 2009, 2010  Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi and Hiroyuki Bessho for Genetec Corporation.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.1 2010/11/30 13:05:27 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.2 2012/07/20 02:14:01 matt Exp $");
 
 #include 
 #include 
@@ -186,7 +186,7 @@ imxehci_attach(device_t parent, device_t
 	}
 
 	/* Disable interrupts, so we don't get any spurious ones. */
-	EOWRITE2(hsc, EHCI_USBINTR, 0);
+	EOWRITE4(hsc, EHCI_USBINTR, 0);
 
 	intr_establish(aa->aa_irq, IPL_USB, IST_LEVEL, ehci_intr, hsc);
 

Index: src/sys/arch/arm/omap/omap3_ehci.c
diff -u src/sys/arch/arm/omap/omap3_ehci.c:1.1 src/sys/arch/arm/omap/omap3_ehci.c:1.2
--- src/sys/arch/arm/omap/omap3_ehci.c:1.1	Thu Jul 12 03:38:50 2012
+++ src/sys/arch/arm/omap/omap3_ehci.c	Fri Jul 20 02:14:01 2012
@@ -1,7 +1,7 @@
-/*	$Id: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $	*/
+/*	$Id: omap3_ehci.c,v 1.2 2012/07/20 02:14:01 matt Exp $	*/
 
 /* adapted from: */
-/*	$NetBSD: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $	*/
+/*	$NetBSD: omap3_ehci.c,v 1.2 2012/07/20 02:14:01 matt Exp $	*/
 /*	$OpenBSD: pxa2x0_ehci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
 
 /*
@@ -23,7 +23,7 @@
 #include "opt_omap.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: omap3_ehci.c,v 1.1 2012/07/12 03:38:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap3_ehci.c,v 1.2 2012/07/20 02:14:01 matt Exp $");
 
 #include 
 #include 
@@ -136,7 +136,7 @@ obioehci_attach(device_t parent, device_
 	sc->sc.sc_offs = EREAD1(&sc->sc, EHCI_CAPLENGTH);
 
 	/* Disable interrupts, so we don't get any spurious ones. */
-	EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
+	EOWRITE4(&sc->sc, EHCI_USBINTR, 0);
 
 #if 1
 	sc->sc_ih = intr_establish(obio->obio_intr, IPL_USB, IST_LEVEL,

Index: src/sys/arch/mips/atheros/dev/ehci_arbus.c
diff -u src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.1 src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.2
--- src/sys/arch/mips/atheros/dev/ehci_arbus.c:1.1	Sun Jul 10 06:26:02 2011
+++ src/sys/arch/mips/atheros/dev/ehci_arbus.c	Fri Jul 20 02:14:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_arbus.c,v 1.1 2011/07/10 06:26:02 matt Exp $	*/
+/*	$NetBSD: ehci_arbus.c,v 1.2 2012/07/20 02:14:02 matt Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci_arbus.c,v 1.1 2011/

CVS commit: src/sys/dev/sdmmc

2012-07-19 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Fri Jul 20 02:04:13 UTC 2012

Modified Files:
src/sys/dev/sdmmc: sdhc.c sdhcreg.h sdmmc_mem.c sdmmcreg.h

Log Message:
Add use of watermark register when PIO to an ESDHC.  After every kill or
drain of watermask words, pause a bit to give time for the fifo to recover.
Always the command response in BE byteorder.  Rewrite __bitfield to deal
with this.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/sdhcreg.h
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/sdmmc/sdmmc_mem.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/sdmmc/sdmmcreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.22 src/sys/dev/sdmmc/sdhc.c:1.23
--- src/sys/dev/sdmmc/sdhc.c:1.22	Tue Jul 17 21:35:26 2012
+++ src/sys/dev/sdmmc/sdhc.c	Fri Jul 20 02:04:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.22 2012/07/17 21:35:26 matt Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.23 2012/07/20 02:04:13 matt Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.22 2012/07/17 21:35:26 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.23 2012/07/20 02:04:13 matt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -1012,23 +1012,15 @@ sdhc_exec_command(sdmmc_chipset_handle_t
 	 */
 	mutex_enter(&hp->host_mtx);
 	if (cmd->c_error == 0 && ISSET(cmd->c_flags, SCF_RSP_PRESENT)) {
-		uint32_t *p = cmd->c_resp;
-		int i;
-
-		for (i = 0; i < 4; i++) {
-#ifdef __BUS_SPACE_HAS_STREAM_METHODS
-			*p++ = bus_space_read_stream_4(hp->iot, hp->ioh,
-			SDHC_RESPONSE + i * 4);
-#else
-			*p++ = htole32(bus_space_read_4(hp->iot, hp->ioh,
-			SDHC_RESPONSE + i * 4));
-#endif
-			if (!ISSET(cmd->c_flags, SCF_RSP_136))
-break;
+		cmd->c_resp[0] = HREAD4(hp, SDHC_RESPONSE + 0);
+		if (ISSET(cmd->c_flags, SCF_RSP_136)) {
+			cmd->c_resp[1] = HREAD4(hp, SDHC_RESPONSE + 4);
+			cmd->c_resp[2] = HREAD4(hp, SDHC_RESPONSE + 8);
+			cmd->c_resp[3] = HREAD4(hp, SDHC_RESPONSE + 12);
 		}
 	}
 	mutex_exit(&hp->host_mtx);
-	DPRINTF(1,("%s: resp = %08x\n", HDEVNAME(hp), cmd->c_resp[0]));
+	DPRINTF(1,("%s: resp = %08x\n", HDEVNAME(hp), be32toh(cmd->c_resp[0])));
 
 	/*
 	 * If the command has data to transfer in any direction,
@@ -1403,15 +1395,30 @@ esdhc_read_data_pio(struct sdhc_host *hp
 	uint16_t status = HREAD2(hp, SDHC_NINTR_STATUS);
 	uint32_t v;
 
+	const size_t watermark = (HREAD4(hp, SDHC_WATERMARK_LEVEL) >> SDHC_WATERMARK_READ_SHIFT) & SDHC_WATERMARK_READ_MASK;
+	size_t count = 0;
+
 	while (datalen > 3 && !ISSET(status, SDHC_TRANSFER_COMPLETE)) {
+		if (count == 0) {
+			/*
+			 * If we've drained "watermark" words, we need to wait
+			 * a little bit so the read FIFO can refill.
+			 */
+			sdmmc_delay(10);
+			count = watermark;
+		}
 		v = HREAD4(hp, SDHC_DATA);
 		v = le32toh(v);
 		*(uint32_t *)data = v;
 		data += 4;
 		datalen -= 4;
 		status = HREAD2(hp, SDHC_NINTR_STATUS);
+		count--;
 	}
 	if (datalen > 0 && !ISSET(status, SDHC_TRANSFER_COMPLETE)) {
+		if (count == 0) {
+			sdmmc_delay(10);
+		}
 		v = HREAD4(hp, SDHC_DATA);
 		v = le32toh(v);
 		do {
@@ -1427,15 +1434,26 @@ esdhc_write_data_pio(struct sdhc_host *h
 	uint16_t status = HREAD2(hp, SDHC_NINTR_STATUS);
 	uint32_t v;
 
+	const size_t watermark = (HREAD4(hp, SDHC_WATERMARK_LEVEL) >> SDHC_WATERMARK_WRITE_SHIFT) & SDHC_WATERMARK_WRITE_MASK;
+	size_t count = watermark;
+
 	while (datalen > 3 && !ISSET(status, SDHC_TRANSFER_COMPLETE)) {
+		if (count == 0) {
+			sdmmc_delay(10);
+			count = watermark;
+		}
 		v = *(uint32_t *)data;
 		v = htole32(v);
 		HWRITE4(hp, SDHC_DATA, v);
 		data += 4;
 		datalen -= 4;
 		status = HREAD2(hp, SDHC_NINTR_STATUS);
+		count--;
 	}
 	if (datalen > 0 && !ISSET(status, SDHC_TRANSFER_COMPLETE)) {
+		if (count == 0) {
+			sdmmc_delay(10);
+		}
 		v = *(uint32_t *)data;
 		v = htole32(v);
 		HWRITE4(hp, SDHC_DATA, v);

Index: src/sys/dev/sdmmc/sdhcreg.h
diff -u src/sys/dev/sdmmc/sdhcreg.h:1.7 src/sys/dev/sdmmc/sdhcreg.h:1.8
--- src/sys/dev/sdmmc/sdhcreg.h:1.7	Thu Jul 12 16:34:30 2012
+++ src/sys/dev/sdmmc/sdhcreg.h	Fri Jul 20 02:04:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcreg.h,v 1.7 2012/07/12 16:34:30 jakllsch Exp $	*/
+/*	$NetBSD: sdhcreg.h,v 1.8 2012/07/20 02:04:13 matt Exp $	*/
 /*	$OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $	*/
 
 /*
@@ -154,6 +154,11 @@
 #define  SDHC_TIMEOUT_FREQ_UNIT		(1<<7)	/* 0=KHz, 1=MHz */
 #define  SDHC_TIMEOUT_FREQ_SHIFT	0
 #define  SDHC_TIMEOUT_FREQ_MASK		0x1f
+#define	SDHC_WATERMARK_LEVEL		0x44	/* ESDHC */
+#define	 SDHC_WATERMARK_WRITE_SHIFT	16
+#define	 SDHC_WATERMARK_WRITE_MASK	0xff
+#define	 SDHC_WATERMARK_READ_SHIFT	0
+#define	 SDHC_WATERMARK_READ_MASK	0xff
 #define SDHC_MAX_CAPABILITIES		0x48
 #define	SDHC_HOST_VER			0xFC
 #define  SDHC_VVN_

CVS commit: xsrc/external/mit/xf86-video-xgi/dist/src

2012-07-19 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Fri Jul 20 01:35:41 UTC 2012

Modified Files:
xsrc/external/mit/xf86-video-xgi/dist/src: xgi_setup.c

Log Message:
some more gcc appeasing
( now why did that fire a warning on i386 but not amd64? )


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.2 xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.3
--- xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c:1.2	Thu Jul 19 19:18:20 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c	Fri Jul 20 01:35:41 2012
@@ -679,7 +679,7 @@ bAccessVGAPCIInfo(PXGI_HW_DEVICE_INFO pH
 	err = pci_device_cfg_write_u32(pXGI->PciInfo, *pulValue,
    ulOffset & ~3);
 } else {
-	err = pci_device_cfg_read_u32(pXGI->PciInfo, pulValue,
+	err = pci_device_cfg_read_u32(pXGI->PciInfo, (uint32_t *)pulValue,
    ulOffset & ~3);
 }
 



CVS commit: src/sys/dev/pci

2012-07-19 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Fri Jul 20 01:26:19 UTC 2012

Modified Files:
src/sys/dev/pci: ehci_pci.c

Log Message:
EHCI_USBINTR is 4 bytes wide, use proper access ops.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/ehci_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ehci_pci.c
diff -u src/sys/dev/pci/ehci_pci.c:1.55 src/sys/dev/pci/ehci_pci.c:1.56
--- src/sys/dev/pci/ehci_pci.c:1.55	Sun Jun 10 06:15:53 2012
+++ src/sys/dev/pci/ehci_pci.c	Fri Jul 20 01:26:19 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.55 2012/06/10 06:15:53 mrg Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.56 2012/07/20 01:26:19 uwe Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.55 2012/06/10 06:15:53 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.56 2012/07/20 01:26:19 uwe Exp $");
 
 #include 
 #include 
@@ -145,7 +145,7 @@ ehci_pci_attach(device_t parent, device_
 	/* Disable interrupts, so we don't get any spurious ones. */
 	sc->sc.sc_offs = EREAD1(&sc->sc, EHCI_CAPLENGTH);
 	DPRINTF(("%s: offs=%d\n", device_xname(self), sc->sc.sc_offs));
-	EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
+	EOWRITE4(&sc->sc, EHCI_USBINTR, 0);
 
 	sc->sc_pc = pc;
 	sc->sc_tag = tag;
@@ -285,9 +285,9 @@ ehci_pci_detach(device_t self, int flags
 	ehci_shutdown(self, flags);
 
 	/* disable interrupts */
-	EOWRITE2(&sc->sc, EHCI_USBINTR, 0);
+	EOWRITE4(&sc->sc, EHCI_USBINTR, 0);
 	/* XXX grotty hack to flush the write */
-	(void)EOREAD2(&sc->sc, EHCI_USBINTR);
+	(void)EOREAD4(&sc->sc, EHCI_USBINTR);
 
 	if (sc->sc_ih != NULL) {
 		pci_intr_disestablish(sc->sc_pc, sc->sc_ih);



CVS commit: src/sys/dev/raidframe

2012-07-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jul 19 22:47:52 UTC 2012

Modified Files:
src/sys/dev/raidframe: rf_disks.c

Log Message:
Initialize values to squelch gcc.

from Greg Oster


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/raidframe/rf_disks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/raidframe/rf_disks.c
diff -u src/sys/dev/raidframe/rf_disks.c:1.82 src/sys/dev/raidframe/rf_disks.c:1.83
--- src/sys/dev/raidframe/rf_disks.c:1.82	Fri Oct 14 09:23:30 2011
+++ src/sys/dev/raidframe/rf_disks.c	Thu Jul 19 22:47:52 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_disks.c,v 1.82 2011/10/14 09:23:30 hannken Exp $	*/
+/*	$NetBSD: rf_disks.c,v 1.83 2012/07/19 22:47:52 pooka Exp $	*/
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -60,7 +60,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.82 2011/10/14 09:23:30 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.83 2012/07/19 22:47:52 pooka Exp $");
 
 #include 
 
@@ -759,6 +759,8 @@ rf_CheckLabels(RF_Raid_t *raidPtr, RF_Co
 
 	ser_values[0] = ser_values[1] = ser_values[2] = ser_values[3] = 0;
 	ser_count[0] = ser_count[1] = ser_count[2] = ser_count[3] = 0;
+	mod_values[0] = mod_values[1] = mod_values[2] = mod_values[3] = 0;
+	mod_count[0] = mod_count[1] = mod_count[2] = mod_count[3] = 0;
 
 	for (c = 0; c < raidPtr->numCol; c++) {
 		if (raidPtr->Disks[c].status != rf_ds_optimal)



CVS commit: src/sys/sys

2012-07-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jul 19 22:46:41 UTC 2012

Modified Files:
src/sys/sys: stdarg.h

Log Message:
... aaand re-add lint compat.  I still got it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/sys/stdarg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/stdarg.h
diff -u src/sys/sys/stdarg.h:1.2 src/sys/sys/stdarg.h:1.3
--- src/sys/sys/stdarg.h:1.2	Thu Jul 19 22:34:54 2012
+++ src/sys/sys/stdarg.h	Thu Jul 19 22:46:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdarg.h,v 1.2 2012/07/19 22:34:54 pooka Exp $	*/
+/*	$NetBSD: stdarg.h,v 1.3 2012/07/19 22:46:41 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -43,6 +43,9 @@
 #define	__builtin_va_arg(a, t)		((a) ? (t) 0 : (t) 0)
 #define	__builtin_va_end(a)		/* nothing */
 #define	__builtin_va_copy(d, s)		((d) = (s))
+#elif !(__GNUC_PREREQ__(4, 5) || \
+(__GNUC_PREREQ__(4, 4) && __GNUC_PATCHLEVEL__ > 2))
+#define __builtin_va_start(ap, last)__builtin_stdarg_start((ap), (last))
 #endif
 
 #ifndef __VA_LIST_DECLARED
@@ -50,11 +53,7 @@ typedef __va_list va_list;
 #define __VA_LIST_DECLARED
 #endif
 
-#if __GNUC_PREREQ__(4, 5) || (__GNUC_PREREQ__(4, 4) && __GNUC_PATCHLEVEL__ > 2)
 #define	va_start(ap, last)	__builtin_va_start((ap), (last))
-#else
-#define	va_start(ap, last)	__builtin_stdarg_start((ap), (last))
-#endif
 #define	va_arg			__builtin_va_arg
 #define	va_end(ap)		__builtin_va_end(ap)
 #define	__va_copy(dest, src)	__builtin_va_copy((dest), (src))



CVS commit: src/sys/sys

2012-07-19 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Thu Jul 19 22:34:54 UTC 2012

Modified Files:
src/sys/sys: stdarg.h

Log Message:
Make the condition for __builtin_va_start more accurate.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/sys/stdarg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/stdarg.h
diff -u src/sys/sys/stdarg.h:1.1 src/sys/sys/stdarg.h:1.2
--- src/sys/sys/stdarg.h:1.1	Sun Jul 17 20:54:54 2011
+++ src/sys/sys/stdarg.h	Thu Jul 19 22:34:54 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdarg.h,v 1.1 2011/07/17 20:54:54 joerg Exp $	*/
+/*	$NetBSD: stdarg.h,v 1.2 2012/07/19 22:34:54 pooka Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -43,8 +43,6 @@
 #define	__builtin_va_arg(a, t)		((a) ? (t) 0 : (t) 0)
 #define	__builtin_va_end(a)		/* nothing */
 #define	__builtin_va_copy(d, s)		((d) = (s))
-#elif !__GNUC_PREREQ__(4, 5)
-#define	__builtin_va_start(ap, last)	__builtin_stdarg_start((ap), (last))
 #endif
 
 #ifndef __VA_LIST_DECLARED
@@ -52,7 +50,11 @@ typedef __va_list va_list;
 #define __VA_LIST_DECLARED
 #endif
 
+#if __GNUC_PREREQ__(4, 5) || (__GNUC_PREREQ__(4, 4) && __GNUC_PATCHLEVEL__ > 2)
 #define	va_start(ap, last)	__builtin_va_start((ap), (last))
+#else
+#define	va_start(ap, last)	__builtin_stdarg_start((ap), (last))
+#endif
 #define	va_arg			__builtin_va_arg
 #define	va_end(ap)		__builtin_va_end(ap)
 #define	__va_copy(dest, src)	__builtin_va_copy((dest), (src))



CVS commit: src/usr.sbin/npf/npfctl

2012-07-19 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Thu Jul 19 22:22:53 UTC 2012

Modified Files:
src/usr.sbin/npf/npfctl: npf_data.c npfctl.c

Log Message:
- npfctl_print_stats: beautification a la French style.
- npfctl_icmpcode: fix the build break.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/npf/npfctl/npf_data.c \
src/usr.sbin/npf/npfctl/npfctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/npf/npfctl/npf_data.c
diff -u src/usr.sbin/npf/npfctl/npf_data.c:1.16 src/usr.sbin/npf/npfctl/npf_data.c:1.17
--- src/usr.sbin/npf/npfctl/npf_data.c:1.16	Thu Jul 19 21:52:29 2012
+++ src/usr.sbin/npf/npfctl/npf_data.c	Thu Jul 19 22:22:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_data.c,v 1.16 2012/07/19 21:52:29 spz Exp $	*/
+/*	$NetBSD: npf_data.c,v 1.17 2012/07/19 22:22:53 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npf_data.c,v 1.16 2012/07/19 21:52:29 spz Exp $");
+__RCSID("$NetBSD: npf_data.c,v 1.17 2012/07/19 22:22:53 rmind Exp $");
 
 #include 
 #include 
@@ -471,7 +471,7 @@ npfctl_icmptype(int proto, const char *t
 uint8_t
 npfctl_icmpcode(int proto, uint8_t type, const char *code)
 {
-	const char **arr;
+	const char * const *arr;
 
 	switch (proto) {
 	case IPPROTO_ICMP:
Index: src/usr.sbin/npf/npfctl/npfctl.c
diff -u src/usr.sbin/npf/npfctl/npfctl.c:1.16 src/usr.sbin/npf/npfctl/npfctl.c:1.17
--- src/usr.sbin/npf/npfctl/npfctl.c:1.16	Thu Jul 19 06:31:26 2012
+++ src/usr.sbin/npf/npfctl/npfctl.c	Thu Jul 19 22:22:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npfctl.c,v 1.16 2012/07/19 06:31:26 joerg Exp $	*/
+/*	$NetBSD: npfctl.c,v 1.17 2012/07/19 22:22:53 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: npfctl.c,v 1.16 2012/07/19 06:31:26 joerg Exp $");
+__RCSID("$NetBSD: npfctl.c,v 1.17 2012/07/19 22:22:53 rmind Exp $");
 
 #include 
 #include 
@@ -171,48 +171,64 @@ npfctl_parsecfg(const char *cfg)
 static int
 npfctl_print_stats(int fd)
 {
+	static const struct stats_s {
+		/* Note: -1 indicates a new section. */
+		int		index;
+		const char *	name;
+	} stats[] = {
+		{ -1, "Packets passed"	},
+		{ NPF_STAT_PASS_DEFAULT,	"default pass"		},
+		{ NPF_STAT_PASS_RULESET,	"ruleset pass"		},
+		{ NPF_STAT_PASS_SESSION,	"session pass"		},
+
+		{ -1, "Packets blocked"	},
+		{ NPF_STAT_BLOCK_DEFAULT,	"default block"		},
+		{ NPF_STAT_BLOCK_RULESET,	"ruleset block"		},
+
+		{ -1, "Session and NAT entries"},
+		{ NPF_STAT_SESSION_CREATE,	"session allocations"	},
+		{ NPF_STAT_SESSION_DESTROY,	"session destructions"	},
+		{ NPF_STAT_NAT_CREATE,		"NAT entry allocations"	},
+		{ NPF_STAT_NAT_DESTROY,		"NAT entry destructions"},
+
+		{ -1, "Invalid packet state cases"			},
+		{ NPF_STAT_INVALID_STATE,	"cases in total"	},
+		{ NPF_STAT_INVALID_STATE_TCP1,	"TCP case I"		},
+		{ NPF_STAT_INVALID_STATE_TCP2,	"TCP case II"		},
+		{ NPF_STAT_INVALID_STATE_TCP3,	"TCP case III"		},
+
+		{ -1, "Packet race cases"},
+		{ NPF_STAT_RACE_NAT,		"NAT association race"	},
+		{ NPF_STAT_RACE_SESSION,	"duplicate session race"},
+
+		{ -1, "Rule procedure cases"},
+		{ NPF_STAT_RPROC_LOG,		"packets logged"	},
+		{ NPF_STAT_RPROC_NORM,		"packets normalised"	},
+
+		{ -1, "Fragmentation"	},
+		{ NPF_STAT_FRAGMENTS,		"fragments"		},
+		{ NPF_STAT_REASSEMBLY,		"reassembled"		},
+		{ NPF_STAT_REASSFAIL,		"failed reassembly"	},
+
+		{ -1, "Other"		},
+		{ NPF_STAT_ERROR,		"unexpected errors"	},
+	};
 	uint64_t *st = zalloc(NPF_STATS_SIZE);
 
 	if (ioctl(fd, IOC_NPF_STATS, &st) != 0) {
 		err(EXIT_FAILURE, "ioctl(IOC_NPF_STATS)");
 	}
 
-	printf("Packets passed:\n\t%"PRIu64" default pass\n\t"
-	"%"PRIu64 " ruleset pass\n\t%"PRIu64" session pass\n\n",
-	st[NPF_STAT_PASS_DEFAULT], st[NPF_STAT_PASS_RULESET],
-	st[NPF_STAT_PASS_SESSION]);
-
-	printf("Packets blocked:\n\t%"PRIu64" default block\n\t"
-	"%"PRIu64 " ruleset block\n\n", st[NPF_STAT_BLOCK_DEFAULT],
-	st[NPF_STAT_BLOCK_RULESET]);
-
-	printf("Session and NAT entries:\n\t%"PRIu64" session allocations\n\t"
-	"%"PRIu64" session destructions\n\t%"PRIu64" NAT entry allocations\n\t"
-	"%"PRIu64" NAT entry destructions\n\n", st[NPF_STAT_SESSION_CREATE],
-	st[NPF_STAT_SESSION_DESTROY], st[NPF_STAT_NAT_CREATE],
-	st[NPF_STAT_NAT_DESTROY]);
-
-	printf("Invalid packet state cases:\n\t%"PRIu64" cases in total\n\t"
-	"%"PRIu64" TCP case I\n\t%"PRIu64" TCP case II\n\t%"PRIu64
-	" TCP case III\n\n", st[NPF_STAT_INVALID_STATE],
-	st[NPF_STAT_INVALID_STATE_TCP1], st[NPF_STAT_INVALID_STATE_TCP2],
-	st[NPF_STAT_INVALID_STATE_TCP3]);
-
-	printf("Packet race cases:\n\t%"PRIu64" NAT association race\n\t"
-	"%"PRIu64" duplicate session race\n\n", st[NPF_STAT_RACE_NAT],
-	st[NPF_STAT_RACE_SESSION]);
-
-	printf("Rule p

CVS commit: src

2012-07-19 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Jul 19 21:52:29 UTC 2012

Modified Files:
src/sys/net/npf: npf.h npf_alg_icmp.c npf_impl.h npf_inet.c npf_instr.c
npf_ncode.h npf_processor.c npf_session.c
src/usr.sbin/npf/npfctl: npf_build.c npf_data.c npf_disassemble.c
npf_ncgen.c npf_parse.y npf_scan.l npf_var.h npfctl.h

Log Message:
teach npf ipv6-icmp
reviewed by rmind@


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/net/npf/npf.h
cvs rdiff -u -r1.10 -r1.11 src/sys/net/npf/npf_alg_icmp.c
cvs rdiff -u -r1.18 -r1.19 src/sys/net/npf/npf_impl.h
cvs rdiff -u -r1.14 -r1.15 src/sys/net/npf/npf_inet.c
cvs rdiff -u -r1.13 -r1.14 src/sys/net/npf/npf_instr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/net/npf/npf_ncode.h
cvs rdiff -u -r1.11 -r1.12 src/sys/net/npf/npf_processor.c
cvs rdiff -u -r1.15 -r1.16 src/sys/net/npf/npf_session.c
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/npf/npfctl/npf_build.c
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/npf/npfctl/npf_data.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/npf/npfctl/npf_disassemble.c
cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/npf/npfctl/npf_ncgen.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/npf/npfctl/npf_parse.y
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/npf/npfctl/npf_scan.l
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/npf/npfctl/npf_var.h
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/npf/npfctl/npfctl.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/npf/npf.h
diff -u src/sys/net/npf/npf.h:1.19 src/sys/net/npf/npf.h:1.20
--- src/sys/net/npf/npf.h:1.19	Sun Jul 15 00:23:00 2012
+++ src/sys/net/npf/npf.h	Thu Jul 19 21:52:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf.h,v 1.19 2012/07/15 00:23:00 rmind Exp $	*/
+/*	$NetBSD: npf.h,v 1.20 2012/07/19 21:52:29 spz Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -74,6 +74,7 @@ typedef struct npf_rproc	npf_rproc_t;
 #include 
 #include 
 #include 
+#include 
 
 #define	NPC_IP4		0x01	/* Indicates fetched IPv4 header. */
 #define	NPC_IP6		0x02	/* Indicates IPv6 header. */
@@ -104,9 +105,10 @@ typedef struct {
 	} npc_ip;
 	/* TCP, UDP, ICMP. */
 	union {
-		struct tcphdr	tcp;
-		struct udphdr	udp;
-		struct icmp	icmp;
+		struct tcphdr		tcp;
+		struct udphdr		udp;
+		struct icmp		icmp;
+		struct icmp6_hdr	icmp6;
 	} npc_l4;
 } npf_cache_t;
 

Index: src/sys/net/npf/npf_alg_icmp.c
diff -u src/sys/net/npf/npf_alg_icmp.c:1.10 src/sys/net/npf/npf_alg_icmp.c:1.11
--- src/sys/net/npf/npf_alg_icmp.c:1.10	Sun Jul 15 00:23:00 2012
+++ src/sys/net/npf/npf_alg_icmp.c	Thu Jul 19 21:52:29 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_alg_icmp.c,v 1.10 2012/07/15 00:23:00 rmind Exp $	*/
+/*	$NetBSD: npf_alg_icmp.c,v 1.11 2012/07/19 21:52:29 spz Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.10 2012/07/15 00:23:00 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.11 2012/07/19 21:52:29 spz Exp $");
 
 #include 
 #include 
@@ -46,6 +46,7 @@ __KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "npf_impl.h"
@@ -156,54 +157,102 @@ npfa_icmp_match(npf_cache_t *npc, nbuf_t
 static bool
 npf_icmp_uniqid(const int type, npf_cache_t *npc, nbuf_t *nbuf, void *n_ptr)
 {
-	struct icmp *ic;
-	u_int offby;
-
-	/* Per RFC 792. */
-	switch (type) {
-	case ICMP_UNREACH:
-	case ICMP_SOURCEQUENCH:
-	case ICMP_REDIRECT:
-	case ICMP_TIMXCEED:
-	case ICMP_PARAMPROB:
-		/* Should contain original IP header. */
-		offby = offsetof(struct icmp, icmp_ip);
-		if ((n_ptr = nbuf_advance(&nbuf, n_ptr, offby)) == NULL) {
-			return false;
-		}
-		/* Fetch into the cache. */
-		if (!npf_fetch_ip(npc, nbuf, n_ptr)) {
-			return false;
-		}
-		switch (npf_cache_ipproto(npc)) {
-		case IPPROTO_TCP:
-			return npf_fetch_tcp(npc, nbuf, n_ptr);
-		case IPPROTO_UDP:
-			return npf_fetch_udp(npc, nbuf, n_ptr);
+	struct icmp  *ic;
+	struct icmp6_hdr *ic6;
+	u_intoffby;
+
+	if (npf_iscached(npc, NPC_IP4)) {
+		/* Per RFC 792. */
+		switch (type) {
+		case ICMP_UNREACH:
+		case ICMP_SOURCEQUENCH:
+		case ICMP_REDIRECT:
+		case ICMP_TIMXCEED:
+		case ICMP_PARAMPROB:
+			/* Should contain original IP header. */
+			offby = offsetof(struct icmp, icmp_ip);
+			if ((n_ptr = nbuf_advance(&nbuf, n_ptr, offby)) == NULL) {
+return false;
+			}
+			/* Fetch into the cache. */
+			if (!npf_fetch_ip(npc, nbuf, n_ptr)) {
+return false;
+			}
+			switch (npf_cache_ipproto(npc)) {
+			case IPPROTO_TCP:
+return npf_fetch_tcp(npc, nbuf, n_ptr);
+			case IPPROTO_UDP:
+return npf_fetch_udp(npc, nbuf, n_ptr);
+			default:
+return false;
+			}
+			return true;
+
+		case ICMP_ECHOREPLY:
+		case ICMP_ECHO:
+		case ICMP_TSTAMP:
+		case ICMP_TSTAMPREPLY:
+		case ICMP_IREQ:
+		case ICMP_IREQREPLY:
+			/* Should contain ICMP query ID. */
+			ic = &npc->npc_l4.

CVS commit: src/sys/netinet

2012-07-19 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Jul 19 21:08:43 UTC 2012

Modified Files:
src/sys/netinet: icmp6.h

Log Message:
whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/netinet/icmp6.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/icmp6.h
diff -u src/sys/netinet/icmp6.h:1.45 src/sys/netinet/icmp6.h:1.46
--- src/sys/netinet/icmp6.h:1.45	Thu Jul 19 20:57:43 2012
+++ src/sys/netinet/icmp6.h	Thu Jul 19 21:08:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.h,v 1.45 2012/07/19 20:57:43 spz Exp $	*/
+/*	$NetBSD: icmp6.h,v 1.46 2012/07/19 21:08:42 spz Exp $	*/
 /*	$KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $	*/
 
 
@@ -741,7 +741,7 @@ extern int	icmp6_redirtimeout;	/* cache 
 /* Info: http://www.iana.org/assignments/icmpv6-parameters */
 
 static const char * const icmp6_type_err[] = {
-"reserved0", "unreach", "packet_too_big", "timxceed", "paramprob",
+	"reserved0", "unreach", "packet_too_big", "timxceed", "paramprob",
 	NULL
 };
 
@@ -759,16 +759,16 @@ static const char * const icmp6_type_inf
 static const char * const icmp6_code_none[] = { "none", NULL };
 
 static const char * const icmp6_code_unreach[] = {
-"noroute", "admin", "beyondscope", "addr", "port",
+	"noroute", "admin", "beyondscope", "addr", "port",
 	"srcaddr_policy", "reject_route", "source_route_err", NULL
 };
 
 static const char * const icmp6_code_timxceed[] = {
-"intrans", "reass", NULL
+	"intrans", "reass", NULL
 };
 
 static const char * const icmp6_code_paramprob[] = {
-"hdr_field", "nxthdr_type", "option", NULL
+	"hdr_field", "nxthdr_type", "option", NULL
 };  
 
 /* not all informational icmps that have codes have a names array */



CVS commit: src/sys/netinet

2012-07-19 Thread S.P.Zeidler
Module Name:src
Committed By:   spz
Date:   Thu Jul 19 20:57:43 UTC 2012

Modified Files:
src/sys/netinet: icmp6.h

Log Message:
this commit contains two sets of unrelated changes:
"while I was here" I checked other KAME implementations for their icmp6.h
version, and thus:
  - added a define for MLDV2_LISTENER_REPORT from FreeBSD
  - added defines for the missing ICMP6_DST_UNREACH codes

then on to what I actually wanted to do:
  - adds strings for the types and codes (encapsulated by ICMP6_STRINGS)
for the use of npfctl and other tools that might want to parse
human-friendly names instead of the corresponding number for ipv6-icmp
types and codes.
The strings are ordered such that their index is (as far as is practical)
the number belonging to the name, which is why there are
icmp6_type_err (use directly) and icmp6_type_info (add 128)


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/netinet/icmp6.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/icmp6.h
diff -u src/sys/netinet/icmp6.h:1.44 src/sys/netinet/icmp6.h:1.45
--- src/sys/netinet/icmp6.h:1.44	Sat Dec 10 19:14:29 2011
+++ src/sys/netinet/icmp6.h	Thu Jul 19 20:57:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: icmp6.h,v 1.44 2011/12/10 19:14:29 roy Exp $	*/
+/*	$NetBSD: icmp6.h,v 1.45 2012/07/19 20:57:43 spz Exp $	*/
 /*	$KAME: icmp6.h,v 1.84 2003/04/23 10:26:51 itojun Exp $	*/
 
 
@@ -125,6 +125,7 @@ struct icmp6_hdr {
 #define ICMP6_FQDN_REPLY		140	/* FQDN reply */
 #define ICMP6_NI_QUERY			139	/* node information request */
 #define ICMP6_NI_REPLY			140	/* node information reply */
+#define MLDV2_LISTENER_REPORT		143	/* RFC3810 listener report */
 
 /* The definitions below are experimental. TBA */
 #define MLD_MTRACE_RESP			200	/* mtrace response(to sender) */
@@ -144,6 +145,9 @@ struct icmp6_hdr {
 #define ICMP6_DST_UNREACH_BEYONDSCOPE	2	/* beyond scope of source address */
 #define ICMP6_DST_UNREACH_ADDR		3	/* address unreachable */
 #define ICMP6_DST_UNREACH_NOPORT	4	/* port unreachable */
+#define ICMP6_DST_UNREACH_POLICY	5	/* source address failed ingress/egress policy */
+#define ICMP6_DST_UNREACH_REJROUTE	6	/* reject route to destination */
+#define ICMP6_DST_UNREACH_SOURCERT	7	/* error in source routing header */
 
 #define ICMP6_TIME_EXCEED_TRANSIT 	0	/* ttl==0 in transit */
 #define ICMP6_TIME_EXCEED_REASSEMBLY	1	/* ttl==0 in reass */
@@ -733,4 +737,41 @@ extern int	icmp6_rediraccept;	/* accept/
 extern int	icmp6_redirtimeout;	/* cache time for redirect routes */
 #endif /* _KERNEL */
 
+#ifdef ICMP6_STRINGS
+/* Info: http://www.iana.org/assignments/icmpv6-parameters */
+
+static const char * const icmp6_type_err[] = {
+"reserved0", "unreach", "packet_too_big", "timxceed", "paramprob",
+	NULL
+};
+
+static const char * const icmp6_type_info[] = {
+	"echo", "echoreply",
+	"mcastlistenq", "mcastlistenrep", "mcastlistendone",
+	"rtsol", "rtadv", "neighsol", "neighadv", "redirect",
+	"routerrenum", "nodeinfoq", "nodeinfor", "invneighsol", "invneighrep",
+	"mcastlistenrep2", "haad_req", "haad_rep",
+	"mobile_psol", "mobile_padv", "cga_sol", "cga_adv",
+	"experimental150", "mcast_rtadv", "mcast_rtsol", "mcast_rtterm",
+	"fmipv6_msg", "rpl_control", NULL
+};
+
+static const char * const icmp6_code_none[] = { "none", NULL };
+
+static const char * const icmp6_code_unreach[] = {
+"noroute", "admin", "beyondscope", "addr", "port",
+	"srcaddr_policy", "reject_route", "source_route_err", NULL
+};
+
+static const char * const icmp6_code_timxceed[] = {
+"intrans", "reass", NULL
+};
+
+static const char * const icmp6_code_paramprob[] = {
+"hdr_field", "nxthdr_type", "option", NULL
+};  
+
+/* not all informational icmps that have codes have a names array */
+#endif
+
 #endif /* !_NETINET_ICMP6_H_ */



CVS commit: src/share/mk

2012-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 19 19:42:45 UTC 2012

Modified Files:
src/share/mk: bsd.gcc.mk bsd.lib.mk

Log Message:
>From pooka: Fix EXTERNAL_TOOLCHAIN compilation where crti/crtn are not in the
same directory as crtbegin


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/mk/bsd.gcc.mk
cvs rdiff -u -r1.321 -r1.322 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.gcc.mk
diff -u src/share/mk/bsd.gcc.mk:1.3 src/share/mk/bsd.gcc.mk:1.4
--- src/share/mk/bsd.gcc.mk:1.3	Sat Oct 25 15:11:28 2008
+++ src/share/mk/bsd.gcc.mk	Thu Jul 19 15:42:45 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.gcc.mk,v 1.3 2008/10/25 19:11:28 mrg Exp $
+#	$NetBSD: bsd.gcc.mk,v 1.4 2012/07/19 19:42:45 christos Exp $
 
 .if !defined(_BSD_GCC_MK_)
 _BSD_GCC_MK_=1
@@ -8,6 +8,8 @@ _GCC_CRTBEGIN!=		${CC} --print-file-name
 _GCC_CRTBEGINS!=	${CC} --print-file-name=crtbeginS.o
 _GCC_CRTEND!=		${CC} --print-file-name=crtend.o
 _GCC_CRTENDS!=		${CC} --print-file-name=crtendS.o
+_GCC_CRTI!=		${CC} --print-file-name=crti.o
+_GCC_CRTN!=		${CC} --print-file-name=crtn.o
 _GCC_CRTDIR!=		dirname ${_GCC_CRTBEGIN}
 _GCC_LIBGCCDIR!=	dirname `${CC} --print-libgcc-file-name`
 .else
@@ -15,6 +17,8 @@ _GCC_CRTBEGIN?=		${DESTDIR}/usr/lib/crtb
 _GCC_CRTBEGINS?=	${DESTDIR}/usr/lib/crtbeginS.o
 _GCC_CRTEND?=		${DESTDIR}/usr/lib/crtend.o
 _GCC_CRTENDS?=		${DESTDIR}/usr/lib/crtendS.o
+_GCC_CRTI?=		${DESTDIR}/usr/lib/crti.o
+_GCC_CRTN?=		${DESTDIR}/usr/lib/crtn.o
 _GCC_CRTDIR?=		${DESTDIR}/usr/lib
 _GCC_LIBGCCDIR?=	${DESTDIR}/usr/lib
 .endif

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.321 src/share/mk/bsd.lib.mk:1.322
--- src/share/mk/bsd.lib.mk:1.321	Sun Feb 19 18:19:37 2012
+++ src/share/mk/bsd.lib.mk	Thu Jul 19 15:42:45 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.321 2012/02/19 23:19:37 matt Exp $
+#	$NetBSD: bsd.lib.mk,v 1.322 2012/07/19 19:42:45 christos Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include 
@@ -193,8 +193,8 @@ MKSHLIBOBJS= no
 SHLIB_SOVERSION=	${SHLIB_MAJOR}
 SHLIB_SHFLAGS=		-Wl,-soname,${_LIB_PREFIX}${LIB}.so.${SHLIB_SOVERSION}
 SHLIB_SHFLAGS+=		-Wl,--warn-shared-textrel
-SHLIB_LDSTARTFILE?=	${_GCC_CRTDIR}/crti.o ${_GCC_CRTBEGINS}
-SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${_GCC_CRTDIR}/crtn.o
+SHLIB_LDSTARTFILE?=	${_GCC_CRTI} ${_GCC_CRTBEGINS}
+SHLIB_LDENDFILE?=	${_GCC_CRTENDS} ${_GCC_CRTN}
 
 CFLAGS+=	${COPTS}
 OBJCFLAGS+=	${OBJCOPTS}



CVS commit: src

2012-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 19 19:34:27 UTC 2012

Modified Files:
src/external/bsd/file/dist: config.guess
src/external/gpl3/binutils/dist: config.guess
src/external/gpl3/gcc/dist: config.guess
src/external/lgpl2/mpc/dist: config.guess
src/external/lgpl3/mpfr/dist: config.guess
src/gnu/dist/gmake/config: config.guess
src/gnu/dist/texinfo: config.guess

Log Message:
PR/46704: Antti Kantee: Recognize tilera in config.guess


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/file/dist/config.guess
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/gpl3/binutils/dist/config.guess
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/config.guess
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl2/mpc/dist/config.guess
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/mpfr/dist/config.guess
cvs rdiff -u -r1.1.1.1 -r1.2 src/gnu/dist/gmake/config/config.guess
cvs rdiff -u -r1.1.1.7 -r1.2 src/gnu/dist/texinfo/config.guess

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/file/dist/config.guess
diff -u src/external/bsd/file/dist/config.guess:1.4 src/external/bsd/file/dist/config.guess:1.5
--- src/external/bsd/file/dist/config.guess:1.4	Sun Sep 25 14:18:43 2011
+++ src/external/bsd/file/dist/config.guess	Thu Jul 19 15:34:26 2012
@@ -977,6 +977,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
 vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;

Index: src/external/gpl3/binutils/dist/config.guess
diff -u src/external/gpl3/binutils/dist/config.guess:1.1.1.2 src/external/gpl3/binutils/dist/config.guess:1.2
--- src/external/gpl3/binutils/dist/config.guess:1.1.1.2	Sat Sep 24 18:11:26 2011
+++ src/external/gpl3/binutils/dist/config.guess	Thu Jul 19 15:34:26 2012
@@ -968,6 +968,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
 vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;

Index: src/external/gpl3/gcc/dist/config.guess
diff -u src/external/gpl3/gcc/dist/config.guess:1.1.1.1 src/external/gpl3/gcc/dist/config.guess:1.2
--- src/external/gpl3/gcc/dist/config.guess:1.1.1.1	Mon Jun 20 21:19:46 2011
+++ src/external/gpl3/gcc/dist/config.guess	Thu Jul 19 15:34:26 2012
@@ -968,6 +968,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
 vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;

Index: src/external/lgpl2/mpc/dist/config.guess
diff -u src/external/lgpl2/mpc/dist/config.guess:1.1.1.1 src/external/lgpl2/mpc/dist/config.guess:1.2
--- src/external/lgpl2/mpc/dist/config.guess:1.1.1.1	Mon Jun 20 01:50:20 2011
+++ src/external/lgpl2/mpc/dist/config.guess	Thu Jul 19 15:34:26 2012
@@ -968,6 +968,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
 vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;

Index: src/external/lgpl3/mpfr/dist/config.guess
diff -u src/external/lgpl3/mpfr/dist/config.guess:1.1.1.1 src/external/lgpl3/mpfr/dist/config.guess:1.2
--- src/external/lgpl3/mpfr/dist/config.guess:1.1.1.1	Mon Jun 20 01:53:06 2011
+++ src/external/lgpl3/mpfr/dist/config.guess	Thu Jul 19 15:34:26 2012
@@ -968,6 +968,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
 vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;

Index: src/gnu/dist/gmake/config/config.guess
diff -u src/gnu/dist/gmake/config/config.guess:1.1.1.1 src/gnu/dist/gmake/config/config.guess:1.2
--- src/gnu/dist/gmake/config/config.guess:1.1.1.1	Wed Mar 29 16:09:30 2006
+++ src/gnu/dist/gmake/config/config.guess	Thu Jul 19 15:34:27 2012
@@ -861,6 +861,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
 x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
 	exit 0 ;;

Index: src/gnu/dist/texinfo/config.guess
diff -u src/gnu/dist/texinfo/config.guess:1.1.1.7 src/gnu/dist/texinfo/config.guess:1.2
--- src/gnu/dist/texinfo/config.guess:1.1.1.7	Tue Sep  2 03:46:19 2008
+++ src/gnu/dist/texinfo/config.guess	Thu Jul 19 15:34:27 2012
@@ -923,6 +923,9 @@ EOF
 sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit 0 ;;
+tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
 x86_64:Linux

CVS commit: src/distrib/sets/lists/xserver

2012-07-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 19 19:30:39 UTC 2012

Modified Files:
src/distrib/sets/lists/xserver: md.amd64 md.i386

Log Message:
add files belonging to the xf86-video-xgi driver


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/distrib/sets/lists/xserver/md.amd64
cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/lists/xserver/md.i386

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/xserver/md.amd64
diff -u src/distrib/sets/lists/xserver/md.amd64:1.63 src/distrib/sets/lists/xserver/md.amd64:1.64
--- src/distrib/sets/lists/xserver/md.amd64:1.63	Wed Sep  7 20:26:13 2011
+++ src/distrib/sets/lists/xserver/md.amd64	Thu Jul 19 19:30:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.63 2011/09/07 20:26:13 riz Exp $
+# $NetBSD: md.amd64,v 1.64 2012/07/19 19:30:38 macallan Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -487,6 +487,8 @@
 ./usr/X11R7/lib/modules/drivers/ws_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/wsfb_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/xgi_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/xgi_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/extensions/libGLcore.a		-unknown-	obsolete
 ./usr/X11R7/lib/modules/extensions/libGLcore.so		-unknown-	obsolete
 ./usr/X11R7/lib/modules/extensions/libGLcore.so.0	-unknown-	obsolete
@@ -701,6 +703,7 @@
 ./usr/X11R7/man/html4/void.html-unknown-	obsolete
 ./usr/X11R7/man/html4/ws.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/wsfb.html-unknown-	html,xorg
+./usr/X11R7/man/html4/xgi.html-unknown-	html,xorg
 ./usr/X11R7/man/html5/xorg.conf.html			-unknown-	html,xorg
 ./usr/X11R7/man/man1/Xorg.1-unknown-	.man,xorg
 ./usr/X11R7/man/man1/cvt.1-unknown-	.man,xorg
@@ -745,5 +748,6 @@
 ./usr/X11R7/man/man4/void.4-unknown-	obsolete
 ./usr/X11R7/man/man4/ws.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/wsfb.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/xgi.4-unknown-	.man,xorg
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg

Index: src/distrib/sets/lists/xserver/md.i386
diff -u src/distrib/sets/lists/xserver/md.i386:1.82 src/distrib/sets/lists/xserver/md.i386:1.83
--- src/distrib/sets/lists/xserver/md.i386:1.82	Wed Aug  3 01:19:47 2011
+++ src/distrib/sets/lists/xserver/md.i386	Thu Jul 19 19:30:38 2012
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.82 2011/08/03 01:19:47 mrg Exp $
+# $NetBSD: md.i386,v 1.83 2012/07/19 19:30:38 macallan Exp $
 ./usr/X11R6/bin/X	-unknown-	x11
 ./usr/X11R6/bin/XFree86	-unknown-	x11
 ./usr/X11R6/bin/gtf	-unknown-	x11
@@ -563,6 +563,8 @@
 ./usr/X11R7/lib/modules/drivers/ws_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/wsfb_drv.so		-unknown-	xorg
 ./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/xgi_drv.so		-unknown-	xorg
+./usr/X11R7/lib/modules/drivers/xgi_drv.so.1		-unknown-	xorg
 ./usr/X11R7/lib/modules/extensions/libGLcore.a		-unknown-	obsolete
 ./usr/X11R7/lib/modules/extensions/libGLcore.so		-unknown-	obsolete
 ./usr/X11R7/lib/modules/extensions/libGLcore.so.0	-unknown-	obsolete
@@ -792,6 +794,7 @@
 ./usr/X11R7/man/html4/void.html-unknown-	obsolete
 ./usr/X11R7/man/html4/ws.html-unknown-	html,xorg
 ./usr/X11R7/man/html4/wsfb.html-unknown-	html,xorg
+./usr/X11R7/man/html4/xgi.html-unknown-	html,xorg
 ./usr/X11R7/man/html5/xorg.conf.html			-unknown-	html,xorg
 ./usr/X11R7/man/man1/Xorg.1-unknown-	.man,xorg
 ./usr/X11R7/man/man1/cvt.1-unknown-	.man,xorg
@@ -837,5 +840,6 @@
 ./usr/X11R7/man/man4/void.4-unknown-	obsolete
 ./usr/X11R7/man/man4/ws.4-unknown-	.man,xorg
 ./usr/X11R7/man/man4/wsfb.4-unknown-	.man,xorg
+./usr/X11R7/man/man4/xgi.4-unknown-	.man,xorg
 ./usr/X11R7/man/man5/xorg.conf.5			-unknown-	.man,xorg
 ./usr/X11R7/share/aclocal/xorg-server.m4		-unknown-	xorg



CVS commit: src/external/mit/xorg/server/drivers

2012-07-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 19 19:23:52 UTC 2012

Modified Files:
src/external/mit/xorg/server/drivers: Makefile

Log Message:
build the xf86-video-xgi driver on i386 and amd64


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/external/mit/xorg/server/drivers/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/server/drivers/Makefile
diff -u src/external/mit/xorg/server/drivers/Makefile:1.62 src/external/mit/xorg/server/drivers/Makefile:1.63
--- src/external/mit/xorg/server/drivers/Makefile:1.62	Mon May 14 08:42:04 2012
+++ src/external/mit/xorg/server/drivers/Makefile	Thu Jul 19 19:23:52 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.62 2012/05/14 08:42:04 abs Exp $
+#	$NetBSD: Makefile,v 1.63 2012/07/19 19:23:52 macallan Exp $
 
 # xf86-input drivers
 
@@ -61,7 +61,8 @@ SUBDIR+= \
 	xf86-video-tseng \
 	xf86-video-vmware \
 	xf86-video-vesa \
-	xf86-video-wsfb
+	xf86-video-wsfb \
+	xf86-video-xgi
 #	xf86-video-rendition
 
 .if ${MACHINE_ARCH} == "i386"



CVS commit: src/external/mit/xorg/server/drivers/xf86-video-xgi

2012-07-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 19 19:21:50 UTC 2012

Added Files:
src/external/mit/xorg/server/drivers/xf86-video-xgi: Makefile

Log Message:
reachover for xf86-video-xgi


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 \
src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile
diff -u /dev/null src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile:1.1
--- /dev/null	Thu Jul 19 19:21:50 2012
+++ src/external/mit/xorg/server/drivers/xf86-video-xgi/Makefile	Thu Jul 19 19:21:50 2012
@@ -0,0 +1,19 @@
+#	$NetBSD: Makefile,v 1.1 2012/07/19 19:21:50 macallan Exp $
+
+DRIVER=		xf86-video-xgi
+DRIVER_NAME=	xgi_drv
+
+SRCS=		init.c vb_ext.c vb_i2c.c vb_setmode.c xgi_accel.c
+#SRC+=		vb_init.c
+SRCS+=		xgi_cursor.c  xgi_dac.c xgi_dga.c xgi_driver.c xgi_opt.c
+SRCS+=		xgi_setup.c  xgi_vb.c xgi_vga.c xgi_video.c xgi_videohw.c
+
+MAN=		xgi.4
+
+CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11
+CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/X11/dri
+CPPFLAGS+=	-I${DESTDIR}${X11INCDIR}/libdrm
+# for now, I'd like to see this thing work first
+CPPFLAGS+=	-DHAVE_UNISTD_H -Wno-deprecated-declarations
+
+.include "../Makefile.xf86-driver"



CVS commit: xsrc/external/mit/xf86-video-xgi/dist/src

2012-07-19 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Jul 19 19:18:20 UTC 2012

Modified Files:
xsrc/external/mit/xf86-video-xgi/dist/src: vb_ext.c vb_i2c.c vb_i2c.h
vb_init.c vb_setmode.c vb_table.h vgatypes.h xgi.h xgi_accel.c
xgi_driver.c xgi_driver.h xgi_opt.c xgi_setup.c xgi_video.c

Log Message:
make this compile on NetBSD, still needs to be tested on actual hardware
( hi msaitoh@ )


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c \
xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h \
xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c \
xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c:1.1.1.1	Thu Jul 19 15:24:38 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c	Thu Jul 19 19:18:20 2012
@@ -139,7 +139,7 @@ void XGI_GetSenseStatus( PXGI_HW_DEVICE_
 USHORT tempax = 0 , tempbx , tempcx , temp ,
P2reg0 = 0 , SenseModeNo = 0 , OutputSelect = pVBInfo->OutputSelect,
ModeIdIndex , i ;
-pVBInfo->BaseAddr = ( USHORT )HwDeviceExtension->pjIOAddress ;
+pVBInfo->BaseAddr = ( ULONG )HwDeviceExtension->pjIOAddress ;
 
 {		/* for 301 */
 if ( pVBInfo->VBInfo & SetCRT2ToHiVisionTV )
Index: xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c
diff -u xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.1.1.1 xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.2
--- xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c:1.1.1.1	Thu Jul 19 15:24:39 2012
+++ xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c	Thu Jul 19 19:18:20 2012
@@ -3,6 +3,7 @@
 #include "config.h"
 #endif
 
+#include 
 #include "osdef.h"
 #include "vgatypes.h"
 /* #include "vb_util.h" */ /* Jong@08032009 */
@@ -114,7 +115,7 @@ typedef enum _I2C_ACCESS_CMD
 #define ENABLE_GPIOC  0x04
 VOID
 EnableGPIOA(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
 {
 	PDEBUGI2C(ErrorF("EnableGPIOA()-pjIOPort=0x%x...\n", pjIOPort));
 
@@ -134,7 +135,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
 
 VOID
 EnableGPIOB(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
 {
 UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III);
 
@@ -152,7 +153,7 @@ PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
 
 VOID
 EnableGPIOC(
-PUCHAR pjIOPort, I2C_ACCESS_CMD CmdType)
+XGIIOADDRESS pjIOPort, I2C_ACCESS_CMD CmdType)
 {
 UCHAR ujCR4A = XGI_GetReg(pjIOPort, IND_CR4A_GPIO_REG_III);
 
@@ -1174,8 +1175,8 @@ UCHAR ReverseUCHAR(UCHAR data)
 */
 VOID vWriteClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
 {
-UCHAR   temp;
-PUCHAR  pjI2cIOBase;
+UCHARtemp;
+XGIIOADDRESS pjI2cIOBase;
 
 	PDEBUGI2C(ErrorF("vWriteClockLineDVI()...begin\n"));
 
@@ -1224,8 +1225,8 @@ VOID vWriteClockLineDVI(PXGI_HW_DEVICE_I
 */
 VOID vWriteDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE, UCHAR data)
 {
-UCHAR   temp;
-PUCHAR  pjI2cIOBase;
+UCHARtemp;
+XGIIOADDRESS pjI2cIOBase;
 
 	PDEBUGI2C(ErrorF("vWriteDataLineDVI()...begin\n"));
 
@@ -1277,8 +1278,8 @@ VOID vWriteDataLineDVI(PXGI_HW_DEVICE_IN
 */
 BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE_INFO pHWDE)
 {
-UCHAR   cPortData;
-PUCHAR  pjI2cIOBase;
+UCHARcPortData;
+XGIIOADDRESS pjI2cIOBase;
 
 	PDEBUGI2C(ErrorF("bReadClockLineDVI()...begin\n"));
 
@@ -1318,7 +1319,7 @@ BOOLEAN bReadClockLineDVI(PXGI_HW_DEVICE
 BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_INFO pHWDE)
 {
 UCHAR   cPortData;
-PUCHAR  pjI2cIOBase; 
+XGIIOADDRESS  pjI2cIOBase; 
 
 	PDEBUGI2C(ErrorF("bReadDataLineDVI()...begin\n"));
 
@@ -1357,7 +1358,7 @@ BOOLEAN bReadDataLineDVI(PXGI_HW_DEVICE_
 //*//

CVS commit: src/sys/dev/acpi

2012-07-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 19 18:03:32 UTC 2012

Modified Files:
src/sys/dev/acpi: acpi_tz.c

Log Message:
Treat empty package returned from _AL method the same as non-existent.
>From jmcneill.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/acpi/acpi_tz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_tz.c
diff -u src/sys/dev/acpi/acpi_tz.c:1.85 src/sys/dev/acpi/acpi_tz.c:1.86
--- src/sys/dev/acpi/acpi_tz.c:1.85	Thu Feb  2 14:43:02 2012
+++ src/sys/dev/acpi/acpi_tz.c	Thu Jul 19 14:03:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_tz.c,v 1.85 2012/02/02 19:43:02 tls Exp $ */
+/* $NetBSD: acpi_tz.c,v 1.86 2012/07/19 18:03:32 christos Exp $ */
 
 /*
  * Copyright (c) 2003 Jared D. McNeill 
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.85 2012/02/02 19:43:02 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.86 2012/07/19 18:03:32 christos Exp $");
 
 #include 
 #include 
@@ -536,7 +536,7 @@ acpitz_get_zone(void *opaque, int verbos
 
 		obj = sc->sc_zone.al[i].Pointer;
 
-		if (obj->Type != ACPI_TYPE_PACKAGE) {
+		if (obj->Type != ACPI_TYPE_PACKAGE || obj->Package.Count == 0) {
 			sc->sc_zone.al[i].Pointer = NULL;
 			ACPI_FREE(obj);
 			continue;



CVS commit: src/share/man/man9

2012-07-19 Thread Julian Fagir
Module Name:src
Committed By:   jdf
Date:   Thu Jul 19 17:48:55 UTC 2012

Modified Files:
src/share/man/man9: bus_space.9

Log Message:
Added missing newline, as proposed by Petri Laakso in PR kern/46721.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/share/man/man9/bus_space.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man9/bus_space.9
diff -u src/share/man/man9/bus_space.9:1.45 src/share/man/man9/bus_space.9:1.46
--- src/share/man/man9/bus_space.9:1.45	Fri Jul  8 19:40:24 2011
+++ src/share/man/man9/bus_space.9	Thu Jul 19 17:48:55 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: bus_space.9,v 1.45 2011/07/08 19:40:24 wiz Exp $
+.\" $NetBSD: bus_space.9,v 1.46 2012/07/19 17:48:55 jdf Exp $
 .\"
 .\" Copyright (c) 1997 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -585,6 +585,7 @@ type is used to describe a mapping of a 
 Its contents are machine-dependent and should be considered opaque by
 machine-independent code.
 This type is used when performing bus space access operations.
+.Pp
 .It Fa bus_space_reservation_t
 .Pp
 The



CVS commit: xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache

2012-07-19 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Jul 19 15:29:26 UTC 2012

Removed Files:
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache: output.0 output.1
requests traces.0 traces.1

Log Message:
remove accitentially imported garbage


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 \
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/output.0 \
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/output.1 \
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/requests \
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/traces.0 \
xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/traces.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: xsrc/external/mit/xf86-video-xgi

2012-07-19 Thread Michael Lorenz
Module Name:xsrc
Committed By:   macallan
Date:   Thu Jul 19 15:24:47 UTC 2012

Update of /cvsroot/xsrc/external/mit/xf86-video-xgi
In directory ivanova.netbsd.org:/tmp/cvs-serv5746

Log Message:
initial import of xf86-video-xgi-1.6.0

Status:

Vendor Tag: xorg
Release Tags:   xf86-video-xgi-1-6-0

N xsrc/external/mit/xf86-video-xgi/dist/.gitignore
N xsrc/external/mit/xf86-video-xgi/dist/COPYING
N xsrc/external/mit/xf86-video-xgi/dist/Makefile.am
N xsrc/external/mit/xf86-video-xgi/dist/README
N xsrc/external/mit/xf86-video-xgi/dist/autogen.sh
N xsrc/external/mit/xf86-video-xgi/dist/aclocal.m4
N xsrc/external/mit/xf86-video-xgi/dist/configure
N xsrc/external/mit/xf86-video-xgi/dist/ltmain.sh
N xsrc/external/mit/xf86-video-xgi/dist/man/Makefile.am
N xsrc/external/mit/xf86-video-xgi/dist/man/xgi.man
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_videohw.c
N xsrc/external/mit/xf86-video-xgi/dist/src/Makefile.am
N xsrc/external/mit/xf86-video-xgi/dist/src/init.c
N xsrc/external/mit/xf86-video-xgi/dist/src/init.h
N xsrc/external/mit/xf86-video-xgi/dist/src/osdef.h
N xsrc/external/mit/xf86-video-xgi/dist/src/valid_mode.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_def.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.c
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_ext.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.c
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_i2c.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.c
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_init.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.c
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_setmode.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_struct.h
N xsrc/external/mit/xf86-video-xgi/dist/src/vb_table.h
N xsrc/external/mit/xf86-video-xgi/dist/src/ver.info
N xsrc/external/mit/xf86-video-xgi/dist/src/vgatypes.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_accel.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_common.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_dac.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_cursor.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_cursor.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_dac.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_dga.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_dri.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_dri.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_driver.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_memcpy.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_opt.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_pci.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_regs.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_setup.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_vb.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_vb.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_vga.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.c
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_video.h
N xsrc/external/mit/xf86-video-xgi/dist/src/xgi_videohw.h
N xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/requests
N xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/output.0
N xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/traces.0
N xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/output.1
N xsrc/external/mit/xf86-video-xgi/dist/autom4te.cache/traces.1

No conflicts created by this import



CVS commit: src/share/mk

2012-07-19 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Thu Jul 19 15:16:32 UTC 2012

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
add xgi to the list of known Xorg drivers just to make sure I don't forget
to add it here when I actually import it


To generate a diff of this commit:
cvs rdiff -u -r1.700 -r1.701 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.700 src/share/mk/bsd.own.mk:1.701
--- src/share/mk/bsd.own.mk:1.700	Sat Jul 14 16:04:06 2012
+++ src/share/mk/bsd.own.mk	Thu Jul 19 15:16:31 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.700 2012/07/14 16:04:06 spz Exp $
+#	$NetBSD: bsd.own.mk,v 1.701 2012/07/19 15:16:31 macallan Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1092,7 +1092,7 @@ X11SRCDIR.xf86-input-${_i}?=	${X11SRCDIR
 	r128 radeonhd rendition \
 	s3 s3virge savage siliconmotion sis suncg14 \
 	suncg6 sunffb sunleo suntcx \
-	tdfx tga trident tseng vesa vga via vmware wsfb
+	tdfx tga trident tseng vesa vga via vmware wsfb xgi
 X11SRCDIR.xf86-video-${_v}?=	${X11SRCDIRMIT}/xf86-video-${_v}/dist
 .endfor
 



CVS commit: src/tests/dev/sysmon

2012-07-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 19 13:36:18 UTC 2012

Modified Files:
src/tests/dev/sysmon: t_swsensor.sh

Log Message:
Add new test cases for entropy-providing sensors


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/dev/sysmon/t_swsensor.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/dev/sysmon/t_swsensor.sh
diff -u src/tests/dev/sysmon/t_swsensor.sh:1.4 src/tests/dev/sysmon/t_swsensor.sh:1.5
--- src/tests/dev/sysmon/t_swsensor.sh:1.4	Fri Dec 31 00:35:42 2010
+++ src/tests/dev/sysmon/t_swsensor.sh	Thu Jul 19 13:36:18 2012
@@ -1,4 +1,4 @@
-# $NetBSD: t_swsensor.sh,v 1.4 2010/12/31 00:35:42 pgoyette Exp $
+# $NetBSD: t_swsensor.sh,v 1.5 2012/07/19 13:36:18 pgoyette Exp $
 
 get_sensor_info() {
 	rump.envstat -x | \
@@ -13,6 +13,14 @@ get_powerd_event_count() {
 	grep "not running" powerd.log | wc -l
 }
 
+get_rnd_bits_count() {
+	env RUMPHIJACK=blanket=/dev/random:/dev/urandom	\
+	RUMP_SERVER=unix://t_swsensor_socket	\
+	LD_PRELOAD=/usr/lib/librumphijack.so	  rndctl -l | \
+	grep "swsensor-sensor" | \
+	awk '{print $2}'
+}
+
 check_powerd_event() {
 	event=$(grep "not running" powerd.log | \
 		sed -e "$1p" -e "d" )
@@ -40,7 +48,7 @@ check_powerd_event() {
 # requested properties
 
 start_rump() {
-	rump_server -l rumpvfs -l rumpdev -l rumpdev_sysmon ${RUMP_SERVER}
+	rump_allserver -l rumpvfs -l rumpdev -l rumpdev_sysmon ${RUMP_SERVER}
 	if [ $( get_sensor_info | wc -l ) -ne 0 ] ; then
 		rump.modunload swsensor
 		rump.modload -f $1 swsensor
@@ -55,7 +63,8 @@ common_head() {
 	atf_set	timeout		60
 	atf_set	require.progs	rump.powerd rump.envstat rump.modload	\
 rump.halt   rump.sysctl  rump_server	\
-sed grep
+sed grep awk		\
+rndctl  expr
 }
 
 common_cleanup() {
@@ -87,10 +96,12 @@ ENV2
 #	$3	initial limit
 #	$4	amount to lower limit
 #	$5	difference from limit to trigger event
+#	$6	sensor flags, for FHAS_ENTROPY and FMONNOTSUPP
 
 common_body() {
 	# Start the rump-server process and load the module
-	start_rump "-i mode=$1 -i value=$2 -i limit=$3"
+	modload_args="-i mode=$1 -i value=$2 -i limit=$3 ${6:+-i flags=$6}"
+	start_rump "$modload_args"
 
 	# create configuration files for updates
 	create_envsys_conf_files $3 $4
@@ -173,81 +184,138 @@ common_body() {
 	fi
 
 	# Step 7 - verify that we can set our own limit
-	rump.envstat -c env1.conf
-	if [ $( get_sensor_key critical-min ) -ne $(( $3 - $4 )) ] ; then
-		atf_fail "7: Limit not set by envstat -c"
-	fi
 
-	# Step 8 - make sure user-set limit works
-	if [ ${skip_events} -eq 0 ] ; then
-		rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $4 - $5 ))
-		sleep 5
-		cnt=$(get_powerd_event_count)
-		if [ ${cnt} -lt ${expected_event} ] ; then
-			atf_fail "8: No event triggered"
-		elif [ ${cnt} -gt ${expected_event} ] ; then
-			atf_fail "8: Multiple events triggered"
+	# Steps 7 thru 12 are skipped if the sensor cannot be monitored
+	if [ $( expr \( 0$6 / 2048 \) % 2 ) -ne 1 ] ; then
+		rump.envstat -c env1.conf
+		if [ $( get_sensor_key critical-min ) -ne $(( $3 - $4 )) ] ; then
+			atf_fail "7: Limit not set by envstat -c"
 		fi
-		evt=$( check_powerd_event ${cnt} "critical-under")
-		if [ -n "${evt}" ] ; then
-			atf_fail "8: ${evt}"
+
+	# Step 8 - make sure user-set limit works
+		if [ ${skip_events} -eq 0 ] ; then
+			rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $4 - $5 ))
+			sleep 5
+			cnt=$(get_powerd_event_count)
+			if [ ${cnt} -lt ${expected_event} ] ; then
+atf_fail "8: No event triggered"
+			elif [ ${cnt} -gt ${expected_event} ] ; then
+atf_fail "8: Multiple events triggered"
+			fi
+			evt=$( check_powerd_event ${cnt} "critical-under")
+			if [ -n "${evt}" ] ; then
+atf_fail "8: ${evt}"
+			fi
+			expected_event=$(( 1 + ${expected_event} ))
 		fi
-		expected_event=$(( 1 + ${expected_event} ))
-	fi
 
 	# Step 9 - verify that we return to normal state
-	if [ ${skip_events} -eq 0 ] ; then
-		rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $4 + $5 ))
-		sleep 5
-		cnt=$(get_powerd_event_count)
-		if [ ${cnt} -lt ${expected_event} ] ; then
-			atf_fail "9: No event triggered"
-		elif [ ${cnt} -gt ${expected_event} ] ; then
-			atf_fail "9: Multiple events triggered"
-		fi
-		evt=$( check_powerd_event ${cnt} "normal")
-		if [ -n "${evt}" ] ; then
-			atf_fail "9: ${evt}"
+		if [ ${skip_events} -eq 0 ] ; then
+			rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $4 + $5 ))
+			sleep 5
+			cnt=$(get_powerd_event_count)
+			if [ ${cnt} -lt ${expected_event} ] ; then
+atf_fail "9: No event triggered"
+			elif [ ${cnt} -gt ${expected_event} ] ; then
+atf_fail "9: Multiple events triggered"
+			fi
+			evt=$( check_powerd_event ${cnt} "normal")
+			if [ -n "${evt}" ] ; then
+atf_fail "9: ${evt}"
+			fi
+			expected_event=$(( 1 + ${expected_event} ))
 		fi
-		expected_event=$(( 1 + ${expected_event} ))
-	fi
 
 	# St

CVS commit: src/sys/dev/sysmon

2012-07-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 19 13:31:06 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys.c

Log Message:
Make sure to re-add the sensor as an entropy source after user request
to reset (via envstat -S)


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/dev/sysmon/sysmon_envsys.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sysmon/sysmon_envsys.c
diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.121 src/sys/dev/sysmon/sysmon_envsys.c:1.122
--- src/sys/dev/sysmon/sysmon_envsys.c:1.121	Mon Jul 16 13:55:01 2012
+++ src/sys/dev/sysmon/sysmon_envsys.c	Thu Jul 19 13:31:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysmon_envsys.c,v 1.121 2012/07/16 13:55:01 pgoyette Exp $	*/
+/*	$NetBSD: sysmon_envsys.c,v 1.122 2012/07/19 13:31:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.121 2012/07/16 13:55:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.122 2012/07/19 13:31:06 pgoyette Exp $");
 
 #include 
 #include 
@@ -1062,6 +1062,7 @@ sme_remove_userprops(void)
 	prop_dictionary_t sdict;
 	envsys_data_t *edata = NULL;
 	char tmp[ENVSYS_DESCLEN];
+	char rnd_name[sizeof(edata->rnd_src.name)];
 	sysmon_envsys_lim_t lims;
 	const struct sme_descr_entry *sdt_units;
 	uint32_t props;
@@ -1168,21 +1169,29 @@ sme_remove_userprops(void)
 			sme_event_unregister(sme, edata->desc,
 			PENVSYS_EVENT_LIMITS);
 
+			/*
+			 * Find the correct units for this sensor.
+			 */
+			sdt_units = sme_find_table_entry(SME_DESC_UNITS,
+			edata->units);
+
 			if (props & PROP_LIMITS) {
 DPRINTF(("%s: install limits for %s %s\n",
 	__func__, sme->sme_name, edata->desc));
 
-
-/*
- * Find the correct units for this sensor.
- */
-sdt_units = sme_find_table_entry(SME_DESC_UNITS,
-edata->units);
-
 sme_event_register(sdict, edata, sme,
 &lims, props, PENVSYS_EVENT_LIMITS,
 sdt_units->crittype);
 			}
+			if (edata->flags & ENVSYS_FHAS_ENTROPY) {
+sme_event_register(sdict, edata, sme,
+&lims, props, PENVSYS_EVENT_NULL,
+sdt_units->crittype);
+snprintf(rnd_name, sizeof(rnd_name), "%s-%s",
+sme->sme_name, edata->desc);
+rnd_attach_source(&edata->rnd_src, rnd_name,
+RND_TYPE_ENV, 0);
+			}
 		}
 
 		/*



CVS commit: src/sys/dev/sysmon

2012-07-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu Jul 19 13:30:01 UTC 2012

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
If previously there was only a dummy event entry (to force refresh for
entropy gathering), allow it to be updated for the current request to
add a real entry.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/sysmon/sysmon_envsys_events.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.102 src/sys/dev/sysmon/sysmon_envsys_events.c:1.103
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.102	Wed Jul 18 20:50:40 2012
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Thu Jul 19 13:30:01 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.103 2012/07/19 13:30:01 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.102 2012/07/18 20:50:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.103 2012/07/19 13:30:01 pgoyette Exp $");
 
 #include 
 #include 
@@ -143,7 +143,8 @@ sme_event_register(prop_dictionary_t sdi
 	LIST_FOREACH(osee, &sme->sme_events_list, see_list) {
 		if (strcmp(edata->desc, osee->see_pes.pes_sensname) != 0)
 			continue;
-		if (crittype != osee->see_type)
+		if (crittype != osee->see_type &&
+		osee->see_type != PENVSYS_EVENT_NULL)
 			continue;
 
 		/*
@@ -184,6 +185,9 @@ sme_event_register(prop_dictionary_t sdi
 props &= ~(PROP_CRITMIN | PROP_BATTCAP);
 			}
 		}
+		if (props && see->see_type == PENVSYS_EVENT_NULL)
+			see->see_type = crittype;
+
 		break;
 	}
 	if (crittype == PENVSYS_EVENT_NULL && see != NULL) {



CVS commit: src/sys/dev/ic

2012-07-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Thu Jul 19 12:39:09 UTC 2012

Modified Files:
src/sys/dev/ic: mvsata.c

Log Message:
Fix MVSATA_WDC_* macros to actually access the Shadow Register Block.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/mvsata.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/mvsata.c
diff -u src/sys/dev/ic/mvsata.c:1.20 src/sys/dev/ic/mvsata.c:1.21
--- src/sys/dev/ic/mvsata.c:1.20	Sun Jul 15 10:55:30 2012
+++ src/sys/dev/ic/mvsata.c	Thu Jul 19 12:39:08 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: mvsata.c,v 1.20 2012/07/15 10:55:30 dsl Exp $	*/
+/*	$NetBSD: mvsata.c,v 1.21 2012/07/19 12:39:08 jakllsch Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,11 +26,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.20 2012/07/15 10:55:30 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.21 2012/07/19 12:39:08 jakllsch Exp $");
 
 #include "opt_mvsata.h"
 
-/* ATAPI implementation not finished. Also don't work shadow registers? */
+/* ATAPI implementation not finished. */
 //#include "atapibus.h"
 
 #include 
@@ -76,13 +76,17 @@ __KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1
 #define MVSATA_EDMA_WRITE_4(mvport, reg, val) \
 	bus_space_write_4((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
 #define MVSATA_WDC_READ_2(mvport, reg) \
-	bus_space_read_2((mvport)->port_iot, (mvport)->port_ioh, (reg))
+	bus_space_read_2((mvport)->port_iot, (mvport)->port_ioh, \
+	SHADOW_REG_BLOCK_OFFSET + (reg))
 #define MVSATA_WDC_READ_1(mvport, reg) \
-	bus_space_read_1((mvport)->port_iot, (mvport)->port_ioh, (reg))
+	bus_space_read_1((mvport)->port_iot, (mvport)->port_ioh, \
+	SHADOW_REG_BLOCK_OFFSET + (reg))
 #define MVSATA_WDC_WRITE_2(mvport, reg, val) \
-	bus_space_write_2((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
+	bus_space_write_2((mvport)->port_iot, (mvport)->port_ioh, \
+	SHADOW_REG_BLOCK_OFFSET + (reg), (val))
 #define MVSATA_WDC_WRITE_1(mvport, reg, val) \
-	bus_space_write_1((mvport)->port_iot, (mvport)->port_ioh, (reg), (val))
+	bus_space_write_1((mvport)->port_iot, (mvport)->port_ioh, \
+	SHADOW_REG_BLOCK_OFFSET + (reg), (val))
 
 #ifdef MVSATA_DEBUG
 #define DPRINTF(x)	if (mvsata_debug) printf x



CVS commit: src/share/man/man4

2012-07-19 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jul 19 10:27:58 UTC 2012

Modified Files:
src/share/man/man4: tdvfb.4

Log Message:
Whitespace, wording, typos.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/tdvfb.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/tdvfb.4
diff -u src/share/man/man4/tdvfb.4:1.1 src/share/man/man4/tdvfb.4:1.2
--- src/share/man/man4/tdvfb.4:1.1	Thu Jul 19 08:57:09 2012
+++ src/share/man/man4/tdvfb.4	Thu Jul 19 10:27:58 2012
@@ -1,4 +1,4 @@
-.\"	$NetBSD: tdvfb.4,v 1.1 2012/07/19 08:57:09 rkujawa Exp $
+.\"	$NetBSD: tdvfb.4,v 1.2 2012/07/19 10:27:58 wiz Exp $
 .\"
 .\" Copyright (c) 2012 Radoslaw Kujawa
 .\" All rights reserved.
@@ -38,7 +38,7 @@
 The
 .Nm
 driver provides support for the 3Dfx Voodoo 2 graphics card and provides an
-interface for machine independent
+interface for the machine independent
 .Xr wscons 4
 driver.
 .Pp
@@ -46,10 +46,11 @@ Since Voodoo2 was originally designed as
 have any kind of firmware.
 The
 .Nm
-driver is albe to do low level initialization (boot) of the board, which means
+driver is able to do low level initialization (boot) of the board, which means
 that it can be used on all architectures and is truly machine independent.
-However, it also means that driver is can not detect automatically if Voodoo2
+However, it also means that driver is cannot detect automatically if Voodoo2
 is used as a console.
+The
 .Dv TDVFB_CONSOLE
 option is provided and should be set if the
 .Nm
@@ -75,21 +76,21 @@ driver was written by
 were used as reference.
 The
 .Xr wscons 4
-attachment code is based mostly on a
+attachment code is based mostly on the
 .Xr genfb 4
 driver by
 .An Michael Lorenz .
 .Sh BUGS
 The
-.Nm 
-driver is unaccelerated. 3Dfx Voodoo2 has a simple 2D graphics engine but it is
-unsupported yet.
+.Nm
+driver is unaccelerated.
+3Dfx Voodoo2 has a simple 2D graphics engine but it is unsupported yet.
 .Pp
-Video mode is hard coded to 800x600 at 60Hz in 32-bits, it should be selectable
-at least via kernel configuration file. 
-It is not possibe to detect what resolutions are supported by the monitor,
+Video mode is hard-coded to 800x600 at 60Hz in 32-bits, it should be selectable
+at least via kernel configuration file.
+It is not possible to detect what resolutions are supported by the monitor,
 since Voodoo2 has no DDC interface.
 .Pp
-8-bit depth is not supported by the hardware. 
-16-bit depth is supported by the hardware and is a prefered depth, however it 
-does not work corretly at the moment (this is a driver problem).
+8-bit depth is not supported by the hardware.
+16-bit depth is supported by the hardware and is the preferred depth, however it
+does not work correctly at the moment (this is a driver problem).



CVS commit: src/libexec/httpd

2012-07-19 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jul 19 09:53:06 UTC 2012

Modified Files:
src/libexec/httpd: CHANGES bozohttpd.c bozohttpd.h dir-index-bozo.c

Log Message:
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.31 -r1.32 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.22 -r1.23 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.14 -r1.15 src/libexec/httpd/dir-index-bozo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/CHANGES
diff -u src/libexec/httpd/CHANGES:1.11 src/libexec/httpd/CHANGES:1.12
--- src/libexec/httpd/CHANGES:1.11	Fri Nov 18 09:51:31 2011
+++ src/libexec/httpd/CHANGES	Thu Jul 19 09:53:06 2012
@@ -1,5 +1,8 @@
 $eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
 
+changes since bozohttpd 2018:
+	o  properly escape generated URIs
+
 changes since bozohttpd 20100920:
 	o  add -P  option, from j...@netbsd.org
 	o  avoid crashes with http basic auth, from po...@netbsd.org

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.31 src/libexec/httpd/bozohttpd.c:1.32
--- src/libexec/httpd/bozohttpd.c:1.31	Mon Feb 20 09:26:56 2012
+++ src/libexec/httpd/bozohttpd.c	Thu Jul 19 09:53:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.31 2012/02/20 09:26:56 elric Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.32 2012/07/19 09:53:06 mrg Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -847,6 +847,67 @@ parse_http_date(const char *val, time_t 
 }
 
 /*
+ * given an url, encode it ala rfc 3986.  ie, escape ? and friends.
+ * note that this function returns a static buffer, and thus needs
+ * to be updated for any sort of parallel processing.
+ */
+char *
+escape_rfc3986(bozohttpd_t *httpd, const char *url)
+{
+	static char *buf;
+	static size_t buflen = 0;
+	size_t len;
+	const char *s;
+	char *d;
+
+	len = strlen(url);
+	if (buflen < len * 3 + 1) {
+		buflen = len * 3 + 1;
+		buf = bozorealloc(httpd, buf, buflen);
+	}
+	
+	if (url == NULL) {
+		buf[0] = 0;
+		return buf;
+	}
+
+	for (s = url, d = buf; *s;) {
+		if (*s & 0x80)
+			goto encode_it;
+		switch (*s) {
+		case ':':
+		case '/':
+		case '?':
+		case '#':
+		case '[':
+		case ']':
+		case '@':
+		case '!':
+		case '$':
+		case '&':
+		case '\'':
+		case '(':
+		case ')':
+		case '*':
+		case '+':
+		case ',':
+		case ';':
+		case '=':
+		encode_it:
+			snprintf(d, 4, "%%%2X", *s++);
+			d += 3;
+			len += 3;
+		default:
+			*d++ = *s++;
+			len++;
+		}
+	}
+	buf[len] = 0;
+
+	return buf;
+}
+
+/*
  * checks to see if this request has a valid .bzdirect file.  returns
  * 0 on failure and 1 on success.
  */
@@ -898,10 +959,10 @@ handle_redirect(bozo_httpreq_t *request,
 		url = urlbuf;
 	} else
 		urlbuf = NULL;
+	url = escape_rfc3986(request->hr_httpd, url);
 
-	if (request->hr_query && strlen(request->hr_query)) {
+	if (request->hr_query && strlen(request->hr_query))
 		query = 1;
-	}
 
 	if (request->hr_serverport && strcmp(request->hr_serverport, "80") != 0)
 		snprintf(portbuf, sizeof(portbuf), ":%s",
@@ -918,9 +979,9 @@ handle_redirect(bozo_httpreq_t *request,
 		if (absolute == 0)
 			bozo_printf(httpd, "%s%s", httpd->virthostname, portbuf);
 		if (query) {
-		  bozo_printf(httpd, "%s?%s\r\n", url, request->hr_query);
+			bozo_printf(httpd, "%s?%s\r\n", url, request->hr_query);
 		} else {
-		  bozo_printf(httpd, "%s\r\n", url);
+			bozo_printf(httpd, "%s\r\n", url);
 		}
 	}
 	bozo_printf(httpd, "\r\n");
@@ -930,16 +991,17 @@ handle_redirect(bozo_httpreq_t *request,
 	bozo_printf(httpd, "Document Moved\n");
 	bozo_printf(httpd, "This document had moved http://";);
 	if (query) {
-	  if (absolute)
-	bozo_printf(httpd, "%s?%s", url, request->hr_query);
-	  else
-	bozo_printf(httpd, "%s%s%s?%s", httpd->virthostname, portbuf, url,
-			request->hr_query);
-} else {
-	  if (absolute)
-	bozo_printf(httpd, "%s", url);
-	  else
-	bozo_printf(httpd, "%s%s%s", httpd->virthostname, portbuf, url);
+		if (absolute)
+			bozo_printf(httpd, "%s?%s", url, request->hr_query);
+		else
+			bozo_printf(httpd, "%s%s%s?%s", httpd->virthostname,
+portbuf, url, request->hr_query);
+	} else {
+		if (absolute)
+			bozo_printf(httpd, "%s", url);
+		else
+			bozo_printf(httpd, "%s%s%s", httpd->virthostname,
+portbuf, url);
 	}
 	bozo_printf(httpd, "\">here\n");
 	bozo_printf(httpd, "\n");

Index: src/libexec/httpd/bozohttpd.h
diff -u src/libexec/httpd/bozohttpd.h:1.22 src/libexec/httpd/bozohttpd.h:1.23
--- src/libexec/httpd/bozohttpd.h:1.22	Wed Mar 14 23:47:19 2012
+++ src/libexec/httpd/bozohttpd.h	Thu Jul 19 09:53:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.h,v 1.22 2012/03/14 23:47:19 joerg Exp $	*/
+/*	$NetBSD: bozohttpd.h,v 1.23 2012/0

CVS commit: src/sys/arch/macppc/conf

2012-07-19 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Jul 19 09:20:41 UTC 2012

Modified Files:
src/sys/arch/macppc/conf: GENERIC

Log Message:
Add tdvfb (Voodoo2 driver) to GENERIC.


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 src/sys/arch/macppc/conf/GENERIC

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/macppc/conf/GENERIC
diff -u src/sys/arch/macppc/conf/GENERIC:1.300 src/sys/arch/macppc/conf/GENERIC:1.301
--- src/sys/arch/macppc/conf/GENERIC:1.300	Sat Mar 17 19:57:14 2012
+++ src/sys/arch/macppc/conf/GENERIC	Thu Jul 19 09:20:41 2012
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.300 2012/03/17 19:57:14 riz Exp $
+# $NetBSD: GENERIC,v 1.301 2012/07/19 09:20:41 rkujawa Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include		"arch/macppc/conf/std.macppc"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.300 $"
+#ident 		"GENERIC-$Revision: 1.301 $"
 
 maxusers	32
 
@@ -293,6 +293,7 @@ radeonfb*	at pci? function ?	# ATI Radeo
 options 	RADEONFB_MMAP_BARS	# allow mmap()ing BARs - needed for X
 
 voodoofb*	at pci? function ?	# 3Dfx Voodoo3 
+tdvfb*		at pci? function ?	# 3Dfx Voodoo2
 r128fb*		at pci? function ?	# ATI Rage 128
 genfb*		at pci? function ?
 



CVS commit: src/sys/dev

2012-07-19 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Jul 19 09:09:46 UTC 2012

Modified Files:
src/sys/dev: DEVNAMES

Log Message:
Add tdvfb.


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/sys/dev/DEVNAMES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/DEVNAMES
diff -u src/sys/dev/DEVNAMES:1.276 src/sys/dev/DEVNAMES:1.277
--- src/sys/dev/DEVNAMES:1.276	Sat Jul 14 07:59:48 2012
+++ src/sys/dev/DEVNAMES	Thu Jul 19 09:09:46 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: DEVNAMES,v 1.276 2012/07/14 07:59:48 matt Exp $
+#	$NetBSD: DEVNAMES,v 1.277 2012/07/19 09:09:46 rkujawa Exp $
 #
 # This file contains all used device names and defined attributes in
 # alphabetical order. New devices added to the system somewhere should first
@@ -1286,6 +1286,7 @@ tcom			MI
 tctrl			sparc
 tcx			sparc
 tcx			sparc64
+tdvfb			MI
 te			vax
 tea5757			MI
 tfb			MI



CVS commit: src/distrib/sets/lists/man

2012-07-19 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Jul 19 09:06:34 UTC 2012

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
Add tdvfb(4) man page do distr list.


To generate a diff of this commit:
cvs rdiff -u -r1.1398 -r1.1399 src/distrib/sets/lists/man/mi

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1398 src/distrib/sets/lists/man/mi:1.1399
--- src/distrib/sets/lists/man/mi:1.1398	Tue Jul 17 14:34:31 2012
+++ src/distrib/sets/lists/man/mi	Thu Jul 19 09:06:33 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1398 2012/07/17 14:34:31 njoly Exp $
+# $NetBSD: mi,v 1.1399 2012/07/19 09:06:33 rkujawa Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1652,6 +1652,7 @@
 ./usr/share/man/cat4/tcom.0			man-sys-catman		.cat
 ./usr/share/man/cat4/tcp.0			man-sys-catman		.cat
 ./usr/share/man/cat4/tdfxdrm.0			man-sys-catman		.cat
+./usr/share/man/cat4/tdvfb.0			man-sys-catman		.cat
 ./usr/share/man/cat4/termios.0			man-sys-catman		.cat
 ./usr/share/man/cat4/tfb.0			man-sys-catman		.cat
 ./usr/share/man/cat4/thinkpad.0			man-sys-catman		.cat
@@ -4459,6 +4460,7 @@
 ./usr/share/man/html4/tcom.html			man-sys-htmlman		html
 ./usr/share/man/html4/tcp.html			man-sys-htmlman		html
 ./usr/share/man/html4/tdfxdrm.html		man-sys-htmlman		html
+./usr/share/man/html4/tdvfb.html		man-sys-htmlman		html
 ./usr/share/man/html4/termios.html		man-sys-htmlman		html
 ./usr/share/man/html4/tfb.html			man-sys-htmlman		html
 ./usr/share/man/html4/thinkpad.html		man-sys-htmlman		html
@@ -7189,6 +7191,7 @@
 ./usr/share/man/man4/tcom.4			man-sys-man		.man
 ./usr/share/man/man4/tcp.4			man-sys-man		.man
 ./usr/share/man/man4/tdfxdrm.4			man-sys-man		.man
+./usr/share/man/man4/tdvfb.4			man-sys-man		.man
 ./usr/share/man/man4/termios.4			man-sys-man		.man
 ./usr/share/man/man4/tfb.4			man-sys-man		.man
 ./usr/share/man/man4/thinkpad.4			man-sys-man		.man



CVS commit: src/share/man/man4

2012-07-19 Thread Radoslaw Kujawa
Module Name:src
Committed By:   rkujawa
Date:   Thu Jul 19 08:57:10 UTC 2012

Modified Files:
src/share/man/man4: Makefile
Added Files:
src/share/man/man4: tdvfb.4

Log Message:
Add man page for recently introduced tdvfb(4).


To generate a diff of this commit:
cvs rdiff -u -r1.588 -r1.589 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/tdvfb.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.588 src/share/man/man4/Makefile:1.589
--- src/share/man/man4/Makefile:1.588	Fri Jul 13 22:58:45 2012
+++ src/share/man/man4/Makefile	Thu Jul 19 08:57:09 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.588 2012/07/13 22:58:45 abs Exp $
+#	$NetBSD: Makefile,v 1.589 2012/07/19 08:57:09 rkujawa Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -57,7 +57,7 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \
 	st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \
 	svwsata.4 swsensor.4 swwdog.4 sysmon.4 \
-	tap.4 tc.4 tcds.4 tcp.4 termios.4 tfb.4 thinkpad.4 \
+	tap.4 tc.4 tcds.4 tcp.4 tdvfb.4 termios.4 tfb.4 thinkpad.4 \
 	ti.4 tl.4 tlp.4 tlphy.4 tp.4 tpm.4 tprof.4 tr.4 tra.4 \
 	trm.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
 	uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \

Added files:

Index: src/share/man/man4/tdvfb.4
diff -u /dev/null src/share/man/man4/tdvfb.4:1.1
--- /dev/null	Thu Jul 19 08:57:10 2012
+++ src/share/man/man4/tdvfb.4	Thu Jul 19 08:57:09 2012
@@ -0,0 +1,95 @@
+.\"	$NetBSD: tdvfb.4,v 1.1 2012/07/19 08:57:09 rkujawa Exp $
+.\"
+.\" Copyright (c) 2012 Radoslaw Kujawa
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd July 19, 2012
+.Dt TDVFB 4
+.Os
+.Sh NAME
+.Nm tdvfb
+.Nd 3Dfx Voodoo 2 framebuffer driver
+.Sh SYNOPSIS
+.Cd "tdvfb* at pci?"
+.Cd "wsdisplay* at tdvfb?"
+.Cd "options TDVFB_CONSOLE"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the 3Dfx Voodoo 2 graphics card and provides an
+interface for machine independent
+.Xr wscons 4
+driver.
+.Pp
+Since Voodoo2 was originally designed as a 3D-only solution, most boards do not
+have any kind of firmware.
+The
+.Nm
+driver is albe to do low level initialization (boot) of the board, which means
+that it can be used on all architectures and is truly machine independent.
+However, it also means that driver is can not detect automatically if Voodoo2
+is used as a console.
+.Dv TDVFB_CONSOLE
+option is provided and should be set if the
+.Nm
+driver is intended to be used as a console.
+.Sh SEE ALSO
+.Xr genfb 4 ,
+.Xr voodoofb 4 ,
+.Xr wsdisplay 4
+.Rs
+.%A 3Dfx Interactive, Inc.
+.%T Voodoo2 Graphics Engine for 3D Game Acceleration
+.%N Revision 1.16
+.%D December 1, 1999
+.Re
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Radoslaw Kujawa .
+3Dfx Glide 2.x source code, Linux driver by
+.An Ghozlane Toumi
+were used as reference.
+The
+.Xr wscons 4
+attachment code is based mostly on a
+.Xr genfb 4
+driver by
+.An Michael Lorenz .
+.Sh BUGS
+The
+.Nm 
+driver is unaccelerated. 3Dfx Voodoo2 has a simple 2D graphics engine but it is
+unsupported yet.
+.Pp
+Video mode is hard coded to 800x600 at 60Hz in 32-bits, it should be selectable
+at least via kernel configuration file. 
+It is not possibe to detect what resolutions are supported by the monitor,
+since Voodoo2 has no DDC interface.
+.Pp
+8-bit depth is not supported by the hardware. 
+16-bit depth is supported by the hardware and is a prefered depth, however it 
+does not work corretly at the moment (th