CVS commit: src/tests/fs/puffs/h_dtfs

2010-07-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jul 21 06:58:26 UTC 2010

Modified Files:
src/tests/fs/puffs/h_dtfs: dtfs.c dtfs_vnops.c

Log Message:
support pathconf (more or less copypasted from ufs).  for njoly's tests.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/puffs/h_dtfs/dtfs.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/puffs/h_dtfs/dtfs_vnops.c

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

Modified files:

Index: src/tests/fs/puffs/h_dtfs/dtfs.c
diff -u src/tests/fs/puffs/h_dtfs/dtfs.c:1.1 src/tests/fs/puffs/h_dtfs/dtfs.c:1.2
--- src/tests/fs/puffs/h_dtfs/dtfs.c:1.1	Tue Jul  6 14:16:44 2010
+++ src/tests/fs/puffs/h_dtfs/dtfs.c	Wed Jul 21 06:58:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtfs.c,v 1.1 2010/07/06 14:16:44 pooka Exp $	*/
+/*	$NetBSD: dtfs.c,v 1.2 2010/07/21 06:58:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006  Antti Kantee.  All Rights Reserved.
@@ -206,6 +206,7 @@
 	PUFFSOP_SET(pops, dtfs, node, readlink);
 	PUFFSOP_SET(pops, dtfs, node, mknod);
 	PUFFSOP_SET(pops, dtfs, node, inactive);
+	PUFFSOP_SET(pops, dtfs, node, pathconf);
 	PUFFSOP_SET(pops, dtfs, node, reclaim);
 
 	srandom(time(NULL)); /* for random generation numbers */

Index: src/tests/fs/puffs/h_dtfs/dtfs_vnops.c
diff -u src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.6 src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.7
--- src/tests/fs/puffs/h_dtfs/dtfs_vnops.c:1.6	Wed Jul 14 21:24:40 2010
+++ src/tests/fs/puffs/h_dtfs/dtfs_vnops.c	Wed Jul 21 06:58:25 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtfs_vnops.c,v 1.6 2010/07/14 21:24:40 pooka Exp $	*/
+/*	$NetBSD: dtfs_vnops.c,v 1.7 2010/07/21 06:58:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2006  Antti Kantee.  All Rights Reserved.
@@ -515,6 +515,47 @@
 }
 
 int
+dtfs_node_pathconf(struct puffs_usermount *pu, puffs_cookie_t opc,
+	int name, register_t *retval)
+{
+
+	switch (name) {
+	case _PC_LINK_MAX:
+		*retval = LINK_MAX;
+		return 0;
+	case _PC_NAME_MAX:
+		*retval = NAME_MAX;
+		return 0;
+	case _PC_PATH_MAX:
+		*retval = PATH_MAX;
+		return 0;
+	case _PC_PIPE_BUF:
+		*retval = PIPE_BUF;
+		return 0;
+	case _PC_CHOWN_RESTRICTED:
+		*retval = 1;
+		return 0;
+	case _PC_NO_TRUNC:
+		*retval = 1;
+		return 0;
+	case _PC_SYNC_IO:
+		*retval = 1;
+		return 0;
+	case _PC_FILESIZEBITS:
+		*retval = 43; /* this one goes to 11 */
+		return 0;
+	case _PC_SYMLINK_MAX:
+		*retval = MAXPATHLEN;
+		return 0;
+	case _PC_2_SYMLINKS:
+		*retval = 1;
+		return 0;
+	default:
+		return EINVAL;
+	}
+}
+
+int
 dtfs_node_inactive(struct puffs_usermount *pu, puffs_cookie_t opc)
 {
 	struct puffs_node *pn = opc;



CVS commit: src/sys/external/bsd/drm/conf

2010-07-20 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Jul 21 03:14:32 UTC 2010

Modified Files:
src/sys/external/bsd/drm/conf: files.drm

Log Message:
also make radeondrm depend upon firmload, not just r128drm.

should fix kern/43646 from kre.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm/conf/files.drm

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

Modified files:

Index: src/sys/external/bsd/drm/conf/files.drm
diff -u src/sys/external/bsd/drm/conf/files.drm:1.4 src/sys/external/bsd/drm/conf/files.drm:1.5
--- src/sys/external/bsd/drm/conf/files.drm:1.4	Tue Jul  6 16:33:31 2010
+++ src/sys/external/bsd/drm/conf/files.drm	Wed Jul 21 03:14:32 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: files.drm,v 1.4 2010/07/06 16:33:31 mrg Exp $
+#	$NetBSD: files.drm,v 1.5 2010/07/21 03:14:32 mrg Exp $
 
 # direct rendering modules
 define	drmbase
@@ -87,7 +87,7 @@
 file	external/bsd/drm/dist/shared-core/r128_irq.c		r128drm
 file	external/bsd/drm/dist/shared-core/r128_state.c		r128drm
 
-device	radeondrm: drmbase, drmpci
+device	radeondrm: drmbase, drmpci, firmload
 attach	radeondrm at drm
 file	external/bsd/drm/dist/bsd-core/radeon_drv.c		radeondrm
 file	external/bsd/drm/dist/shared-core/r300_cmdbuf.c		radeondrm



CVS commit: src/sys/arch/amiga/dev

2010-07-20 Thread John Klos
Module Name:src
Committed By:   jklos
Date:   Wed Jul 21 01:34:00 UTC 2010

Modified Files:
src/sys/arch/amiga/dev: ioblix_zbus.c

Log Message:
Fix the port order so that port ttyC0 refers to port 1 on the IOBlix,
ttyC1 to port 2, ttyC2 to port 3, and ttyC3 to port 4.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amiga/dev/ioblix_zbus.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/amiga/dev/ioblix_zbus.c
diff -u src/sys/arch/amiga/dev/ioblix_zbus.c:1.16 src/sys/arch/amiga/dev/ioblix_zbus.c:1.17
--- src/sys/arch/amiga/dev/ioblix_zbus.c:1.16	Tue Jul 20 05:32:46 2010
+++ src/sys/arch/amiga/dev/ioblix_zbus.c	Wed Jul 21 01:33:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ioblix_zbus.c,v 1.16 2010/07/20 05:32:46 jklos Exp $ */
+/*	$NetBSD: ioblix_zbus.c,v 1.17 2010/07/21 01:33:59 jklos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioblix_zbus.c,v 1.16 2010/07/20 05:32:46 jklos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioblix_zbus.c,v 1.17 2010/07/21 01:33:59 jklos Exp $");
 
 /* IOBlix Zorro driver */
 /* XXX to be done: we need to probe the com clock speed! */
@@ -89,10 +89,10 @@
 	unsigned off;
 	int arg;
 } iobzdevices[] = {
-	{ "com", 0x100, 2400 },	/* XXX see below */
-	{ "com", 0x108, 2400 },
-	{ "com", 0x110, 2400 },
+	{ "com", 0x108, 2400 },	/* XXX see below */
+	{ "com", 0x100, 2400 },
 	{ "com", 0x118, 2400 },
+	{ "com", 0x110, 2400 },
 	{ "lpt", 0x200, 0 },
 	{ "lpt", 0x300, 0 },
 	{ 0, 0, 0}



CVS commit: src/sys/dev/usb

2010-07-20 Thread Matthias Drochner
Module Name:src
Committed By:   drochner
Date:   Tue Jul 20 20:56:06 UTC 2010

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

Log Message:
another iteration in the eternal device enumeration struggle:
use a request of 64 bytes for the initial device descriptor fetch.
This is what windows does, and I've seen USB device firmware which
really depends on this. (sends 8 bytes if 64 are requested and
the full descriptor which is more than NetBSD's USB_MAX_IPACKET
otherwise) This is the world...


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/dev/usb/usb_subr.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_subr.c
diff -u src/sys/dev/usb/usb_subr.c:1.171 src/sys/dev/usb/usb_subr.c:1.172
--- src/sys/dev/usb/usb_subr.c:1.171	Sun Jun  6 18:58:26 2010
+++ src/sys/dev/usb/usb_subr.c	Tue Jul 20 20:56:06 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb_subr.c,v 1.171 2010/06/06 18:58:26 pgoyette Exp $	*/
+/*	$NetBSD: usb_subr.c,v 1.172 2010/07/20 20:56:06 drochner Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.171 2010/06/06 18:58:26 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.172 2010/07/20 20:56:06 drochner Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_usbverbose.h"
@@ -594,8 +594,10 @@
 
 	/* Get the short descriptor. */
 	err = usbd_get_config_desc(dev, index, &cd);
-	if (err)
+	if (err) {
+		DPRINTF(("usbd_set_config_index: get_config_desc=%d\n", err));
 		return (err);
+	}
 	len = UGETW(cd.wTotalLength);
 	cdp = malloc(len, M_USB, M_NOWAIT);
 	if (cdp == NULL)
@@ -608,9 +610,10 @@
 			break;
 		usbd_delay_ms(dev, 200);
 	}
-	if (err)
+	if (err) {
+		DPRINTF(("usbd_set_config_index: get_desc=%d\n", err));
 		goto bad;
-
+	}
 	if (cdp->bDescriptorType != UDESC_CONFIG) {
 		DPRINTFN(-1,("usbd_set_config_index: bad desc %d\n",
 			 cdp->bDescriptorType));
@@ -1024,6 +1027,34 @@
 }
 
 /*
+ * Get the first 8 bytes of the device descriptor.
+ * Do as Windows does: try to read 64 bytes -- there are devices which
+ * recognize the initial descriptor fetch (before the control endpoint's
+ * MaxPacketSize is known by the host) by exactly this length.
+ */
+static usbd_status
+usbd_get_initial_ddesc(usbd_device_handle dev, usb_device_descriptor_t *desc)
+{
+	usb_device_request_t req;
+	char buf[64];
+	int res, actlen;
+
+	req.bmRequestType = UT_READ_DEVICE;
+	req.bRequest = UR_GET_DESCRIPTOR;
+	USETW2(req.wValue, UDESC_DEVICE, 0);
+	USETW(req.wIndex, 0);
+	USETW(req.wLength, 64);
+	res = usbd_do_request_flags(dev, &req, buf, USBD_SHORT_XFER_OK,
+		&actlen, USBD_DEFAULT_TIMEOUT);
+	if (res)
+		return res;
+	if (actlen < 8)
+		return USBD_SHORT_XFER;
+	memcpy(desc, buf, 8);
+	return USBD_NORMAL_COMPLETION;
+}
+
+/*
  * Called when a new device has been put in the powered state,
  * but not yet in the addressed state.
  * Get initial descriptor, set the address, get full descriptor,
@@ -1065,10 +1096,12 @@
 	dev->def_ep_desc.bDescriptorType = UDESC_ENDPOINT;
 	dev->def_ep_desc.bEndpointAddress = USB_CONTROL_ENDPOINT;
 	dev->def_ep_desc.bmAttributes = UE_CONTROL;
-	if (speed == USB_SPEED_HIGH)
-		USETW(dev->def_ep_desc.wMaxPacketSize, 64);
-	else
-		USETW(dev->def_ep_desc.wMaxPacketSize, USB_MAX_IPACKET);
+	/*
+	 * temporary, will be fixed after first descriptor fetch
+	 * (which uses 64 bytes so it shouldn't be less),
+	 * highspeed devices must support 64 byte packets anyway
+	 */
+	USETW(dev->def_ep_desc.wMaxPacketSize, 64);
 	dev->def_ep_desc.bInterval = 0;
 
 	dev->quirks = &usbd_no_quirk;
@@ -1114,11 +1147,7 @@
 	/* Try a few times in case the device is slow (i.e. outside specs.) */
 	for (i = 0; i < 10; i++) {
 		/* Get the first 8 bytes of the device descriptor. */
-		err = usbd_get_desc(dev, UDESC_DEVICE, 0, 
-			(speed == USB_SPEED_HIGH) ? USB_DEVICE_DESCRIPTOR_SIZE
-		  : USB_MAX_IPACKET,
-			 dd);
-
+		err = usbd_get_initial_ddesc(dev, dd);
 		if (!err)
 			break;
 		usbd_delay_ms(dev, 200);



CVS commit: src/sys/dev/ic

2010-07-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jul 20 19:24:11 UTC 2010

Modified Files:
src/sys/dev/ic: ahcisata_core.c ahcisatareg.h

Log Message:
Prepare ahcisata(4) to work with 64-bit bus_dma_tag_t.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/ahcisatareg.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/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.27 src/sys/dev/ic/ahcisata_core.c:1.28
--- src/sys/dev/ic/ahcisata_core.c:1.27	Tue Jul 20 18:50:48 2010
+++ src/sys/dev/ic/ahcisata_core.c	Tue Jul 20 19:24:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.28 2010/07/20 19:24:11 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.28 2010/07/20 19:24:11 jakllsch Exp $");
 
 #include 
 #include 
@@ -190,9 +190,9 @@
 	achp = &sc->sc_channels[i];
 
 	AHCI_WRITE(sc, AHCI_P_CLB(i), achp->ahcic_bus_cmdh);
-	AHCI_WRITE(sc, AHCI_P_CLBU(i), 0);
+	AHCI_WRITE(sc, AHCI_P_CLBU(i), (uint64_t)achp->ahcic_bus_cmdh>>32);
 	AHCI_WRITE(sc, AHCI_P_FB(i), achp->ahcic_bus_rfis);
-	AHCI_WRITE(sc, AHCI_P_FBU(i), 0);
+	AHCI_WRITE(sc, AHCI_P_FBU(i), (uint64_t)achp->ahcic_bus_rfis>>32);
 }
 
 void
@@ -353,9 +353,10 @@
 		achp->ahcic_bus_rfis = sc->sc_cmd_hdrd->dm_segs[0].ds_addr +
 		 AHCI_CMDH_SIZE * sc->sc_atac.atac_nchannels + 
 		 AHCI_RFIS_SIZE * port;
-		AHCIDEBUG_PRINT(("port %d cmdh %p (0x%x) rfis %p (0x%x)\n", i,
-		   achp->ahcic_cmdh, (u_int)achp->ahcic_bus_cmdh,
-		   achp->ahcic_rfis, (u_int)achp->ahcic_bus_rfis),
+		AHCIDEBUG_PRINT(("port %d cmdh %p (0x%" PRIx64 ") "
+ "rfis %p (0x%" PRIx64 ")\n", i,
+		   achp->ahcic_cmdh, (uint64_t)achp->ahcic_bus_cmdh,
+		   achp->ahcic_rfis, (uint64_t)achp->ahcic_bus_rfis),
 		   DEBUG_PROBE);
 		
 		for (j = 0; j < sc->sc_ncmds; j++) {
@@ -365,11 +366,10 @@
 			 achp->ahcic_cmd_tbld->dm_segs[0].ds_addr +
 			 AHCI_CMDTBL_SIZE * j;
 			achp->ahcic_cmdh[j].cmdh_cmdtba =
-			htole32(achp->ahcic_bus_cmd_tbl[j]);
-			achp->ahcic_cmdh[j].cmdh_cmdtbau = htole32(0);
-			AHCIDEBUG_PRINT(("port %d/%d tbl %p (0x%x)\n", i, j,
+			htole64(achp->ahcic_bus_cmd_tbl[j]);
+			AHCIDEBUG_PRINT(("port %d/%d tbl %p (0x%" PRIx64 ")\n", i, j,
 			achp->ahcic_cmd_tbl[j],
-			(u_int)achp->ahcic_bus_cmd_tbl[j]), DEBUG_PROBE);
+			(uint64_t)achp->ahcic_bus_cmd_tbl[j]), DEBUG_PROBE);
 			/* The xfer DMA map */
 			error = bus_dmamap_create(sc->sc_dmat, MAXPHYS,
 			AHCI_NPRD, 0x40 /* 4MB */, 0,
@@ -1152,9 +1152,8 @@
 	achp->ahcic_datad[slot]->dm_mapsize, 
 	(op == BUS_DMA_READ) ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
 	for (seg = 0; seg <  achp->ahcic_datad[slot]->dm_nsegs; seg++) {
-		cmd_tbl->cmdt_prd[seg].prd_dba = htole32(
+		cmd_tbl->cmdt_prd[seg].prd_dba = htole64(
 		 achp->ahcic_datad[slot]->dm_segs[seg].ds_addr);
-		cmd_tbl->cmdt_prd[seg].prd_dbau = 0;
 		cmd_tbl->cmdt_prd[seg].prd_dbc = htole32(
 		achp->ahcic_datad[slot]->dm_segs[seg].ds_len - 1);
 	}

Index: src/sys/dev/ic/ahcisatareg.h
diff -u src/sys/dev/ic/ahcisatareg.h:1.6 src/sys/dev/ic/ahcisatareg.h:1.7
--- src/sys/dev/ic/ahcisatareg.h:1.6	Tue Jul 20 18:50:48 2010
+++ src/sys/dev/ic/ahcisatareg.h	Tue Jul 20 19:24:11 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisatareg.h,v 1.6 2010/07/20 18:50:48 jakllsch Exp $	*/
+/*	$NetBSD: ahcisatareg.h,v 1.7 2010/07/20 19:24:11 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -34,8 +34,7 @@
 /* in-memory structures used by the controller */
 /* physical region descriptor: points to a region of data (max 4MB) */
 struct ahci_dma_prd {
-	uint32_t prd_dba; /* data base address (64 bits) */
-	uint32_t prd_dbau;
+	uint64_t prd_dba; /* data base address */
 	uint32_t prd_res; /* reserved */
 	uint32_t prd_dbc; /* data byte count */
 #define AHCI_PRD_DBC_MASK 0x003f
@@ -76,8 +75,7 @@
 #define AHCI_CMDH_F_CFL_SHIFT	0
 	uint16_t cmdh_prdtl;	/* number of cmdt_prd */
 	uint32_t cmdh_prdbc;	/* physical region descriptor byte count */
-	uint32_t cmdh_cmdtba;	/* phys. addr. of cmd_tbl */
-	uint32_t cmdh_cmdtbau;	/* (64bits, 128bytes aligned) */
+	uint64_t cmdh_cmdtba;	/* phys. addr. of cmd_tbl, 128bytes aligned */
 	uint32_t cmdh_res[4];	/* reserved */
 } __packed;
 



CVS commit: src/sys/dev/ic

2010-07-20 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Tue Jul 20 18:50:48 UTC 2010

Modified Files:
src/sys/dev/ic: ahcisata_core.c ahcisatareg.h ahcisatavar.h

Log Message:
Convert ahcisata(4) to C99 exact-width integer types.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/ahcisatareg.h \
src/sys/dev/ic/ahcisatavar.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/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.26 src/sys/dev/ic/ahcisata_core.c:1.27
--- src/sys/dev/ic/ahcisata_core.c:1.26	Wed Apr  7 17:51:16 2010
+++ src/sys/dev/ic/ahcisata_core.c	Tue Jul 20 18:50:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.26 2010/04/07 17:51:16 jakllsch Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.26 2010/04/07 17:51:16 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.27 2010/07/20 18:50:48 jakllsch Exp $");
 
 #include 
 #include 
@@ -142,7 +142,7 @@
 void
 ahci_setup_ports(struct ahci_softc *sc)
 {
-	u_int32_t ahci_ports;
+	uint32_t ahci_ports;
 	int i, port;
 	
 	ahci_ports = AHCI_READ(sc, AHCI_PI);
@@ -161,7 +161,7 @@
 void
 ahci_reprobe_drives(struct ahci_softc *sc)
 {
-	u_int32_t ahci_ports;
+	uint32_t ahci_ports;
 	int i, port;
 	struct ahci_channel *achp;
 	struct ata_channel *chp;
@@ -208,7 +208,7 @@
 void
 ahci_attach(struct ahci_softc *sc)
 {
-	u_int32_t ahci_cap, ahci_rev, ahci_ports;
+	uint32_t ahci_cap, ahci_rev, ahci_ports;
 	int i, j, port;
 	struct ahci_channel *achp;
 	struct ata_channel *chp;
@@ -412,7 +412,7 @@
 ahci_intr(void *v)
 {
 	struct ahci_softc *sc = v;
-	u_int32_t is;
+	uint32_t is;
 	int i, r = 0;
 
 	while ((is = AHCI_READ(sc, AHCI_IS))) {
@@ -430,7 +430,7 @@
 void
 ahci_intr_port(struct ahci_softc *sc, struct ahci_channel *achp)
 {
-	u_int32_t is, tfd;
+	uint32_t is, tfd;
 	struct ata_channel *chp = &achp->ata_channel;
 	struct ata_xfer *xfer = chp->ch_queue->active_xfer;
 	int slot;
@@ -556,7 +556,7 @@
 	struct ahci_softc *sc = (struct ahci_softc *)chp->ch_atac;
 	struct ahci_channel *achp = (struct ahci_channel *)chp;
 	int i, s;
-	u_int32_t sig;
+	uint32_t sig;
 
 	/* XXX This should be done by other code. */
 	for (i = 0; i < chp->ch_ndrive; i++) {

Index: src/sys/dev/ic/ahcisatareg.h
diff -u src/sys/dev/ic/ahcisatareg.h:1.5 src/sys/dev/ic/ahcisatareg.h:1.6
--- src/sys/dev/ic/ahcisatareg.h:1.5	Mon Oct 19 18:41:12 2009
+++ src/sys/dev/ic/ahcisatareg.h	Tue Jul 20 18:50:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisatareg.h,v 1.5 2009/10/19 18:41:12 bouyer Exp $	*/
+/*	$NetBSD: ahcisatareg.h,v 1.6 2010/07/20 18:50:48 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -34,10 +34,10 @@
 /* in-memory structures used by the controller */
 /* physical region descriptor: points to a region of data (max 4MB) */
 struct ahci_dma_prd {
-	u_int32_t prd_dba; /* data base address (64 bits) */
-	u_int32_t prd_dbau;
-	u_int32_t prd_res; /* reserved */
-	u_int32_t prd_dbc; /* data byte count */
+	uint32_t prd_dba; /* data base address (64 bits) */
+	uint32_t prd_dbau;
+	uint32_t prd_res; /* reserved */
+	uint32_t prd_dbc; /* data byte count */
 #define AHCI_PRD_DBC_MASK 0x003f
 #define AHCI_PRD_DBC_IPC  0x8000 /* interrupt on completion */
 } __packed;
@@ -46,9 +46,9 @@
 
 /* command table: describe a command to send to drive */
 struct ahci_cmd_tbl {
-	u_int8_t cmdt_cfis[64]; /* command FIS */
-	u_int8_t cmdt_acmd[16]; /* ATAPI command */
-	u_int8_t cmdt_res[48]; /* reserved */
+	uint8_t cmdt_cfis[64]; /* command FIS */
+	uint8_t cmdt_acmd[16]; /* ATAPI command */
+	uint8_t cmdt_res[48]; /* reserved */
 	struct ahci_dma_prd cmdt_prd[1]; /* extended to AHCI_NPRD */
 } __packed;
 
@@ -63,7 +63,7 @@
  * of theses.
  */
 struct ahci_cmd_header {
-	u_int16_t cmdh_flags;
+	uint16_t cmdh_flags;
 #define AHCI_CMDH_F_PMP_MASK	0xf000 /* port multiplier port */
 #define AHCI_CMDH_F_PMP_SHIFT	12
 #define AHCI_CMDH_F_CBSY	0x0400 /* clear BSY on R_OK */
@@ -74,23 +74,23 @@
 #define AHCI_CMDH_F_A		0x0020 /* ATAPI */
 #define AHCI_CMDH_F_CFL_MASK	0x001f /* command FIS length (in dw) */
 #define AHCI_CMDH_F_CFL_SHIFT	0
-	u_int16_t cmdh_prdtl;	/* number of cmdt_prd */
-	u_int32_t cmdh_prdbc;	/* physical region descriptor byte count */
-	u_int32_t cmdh_cmdtba;	/* phys. addr. of cmd_tbl */
-	u_int32_t cmdh_cmdtbau;	/* (64bits, 128bytes aligned) */
-	u_int32_t cmdh_res[4];	/* reserved */
+	uint16_t cmdh_prdtl;	/* number of cmdt_prd */
+	uint32_t cmdh_prdbc;	/* physical region descriptor byte count */
+	uint32_t cmdh_cmdtba;	/* phys. addr. of cmd_tbl */
+	uint32_t cmdh_cmdtbau;	/* (64bits, 128bytes aligned) */
+	uint32_t cmdh_res[4];	/* reserved */
 } __packed;
 
 #define AHCI_CMDH_SIZE (sizeof

CVS commit: src/tests/fs/common

2010-07-20 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Tue Jul 20 17:44:01 UTC 2010

Modified Files:
src/tests/fs/common: h_fsmacros.h

Log Message:
Update ATF_TC_FSADD macro use ATF cleanup function. And call
xx_fstest_delfs() from here instead of test body.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/fs/common/h_fsmacros.h

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

Modified files:

Index: src/tests/fs/common/h_fsmacros.h
diff -u src/tests/fs/common/h_fsmacros.h:1.12 src/tests/fs/common/h_fsmacros.h:1.13
--- src/tests/fs/common/h_fsmacros.h:1.12	Mon Jul 19 16:21:22 2010
+++ src/tests/fs/common/h_fsmacros.h	Tue Jul 20 17:44:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_fsmacros.h,v 1.12 2010/07/19 16:21:22 pooka Exp $	*/
+/*	$NetBSD: h_fsmacros.h,v 1.13 2010/07/20 17:44:01 njoly Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -56,25 +56,31 @@
 #define FSTEST_MNTNAME "/mnt"
 
 #define ATF_TC_FSADD(fs,type,func,desc) \
-  ATF_TC(fs##_##func); \
+  ATF_TC_WITH_CLEANUP(fs##_##func); \
   ATF_TC_HEAD(fs##_##func,tc) \
   { \
 atf_tc_set_md_var(tc, "descr", type " test for " desc); \
 atf_tc_set_md_var(tc, "use.fs", "true"); \
 atf_tc_set_md_var(tc, "X-fs.type", type); \
   } \
+  void *fs##func##tmp; \
   ATF_TC_BODY(fs##_##func,tc) \
   { \
-void *tmp; \
-atf_check_fstype(tc, type); \
-if (fs##_fstest_newfs(tc, &tmp, FSTEST_IMGNAME, FSTEST_IMGSIZE) != 0) \
+if (!atf_check_fstype(tc, type)) \
+  atf_tc_skip("filesystem not selected"); \
+if (fs##_fstest_newfs(tc, &fs##func##tmp, FSTEST_IMGNAME, FSTEST_IMGSIZE) != 0) \
   atf_tc_fail("newfs failed"); \
-if (fs##_fstest_mount(tc, tmp, FSTEST_MNTNAME, 0) != 0) \
+if (fs##_fstest_mount(tc, fs##func##tmp, FSTEST_MNTNAME, 0) != 0) \
   atf_tc_fail("mount failed"); \
 func(tc,FSTEST_MNTNAME); \
 if (fs##_fstest_unmount(tc, FSTEST_MNTNAME, 0) != 0) \
   atf_tc_fail("unmount failed"); \
-if (fs##_fstest_delfs(tc, tmp) != 0) \
+  } \
+  ATF_TC_CLEANUP(fs##_##func,tc) \
+  { \
+if (!atf_check_fstype(tc, type)) \
+  return; \
+if (fs##_fstest_delfs(tc, fs##func##tmp) != 0) \
   atf_tc_fail("delfs failed"); \
   }
 
@@ -107,17 +113,17 @@
 return atf_no_error(); \
   }
 
-static __inline void
+static __inline bool
 atf_check_fstype(const atf_tc_t *tc, const char *fs)
 {
   const char *fstype;
 
   if (!atf_tc_has_config_var(tc, "fstype"))
-return;
+return true;
   fstype = atf_tc_get_config_var(tc, "fstype");
   if (strcmp(fstype, fs) == 0)
-return;
-  atf_tc_skip("filesystem not selected");
+return true;
+  return false;
 }
 
 #define FSTYPE_EXT2FS(tc)\



CVS commit: src/sys/coda

2010-07-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 20 17:26:04 UTC 2010

Modified Files:
src/sys/coda: coda.h coda_venus.c coda_vnops.c

Log Message:
Correct incomplete size checks for the coda ioctls. From Dan Rosenberg.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/coda/coda.h
cvs rdiff -u -r1.27 -r1.28 src/sys/coda/coda_venus.c
cvs rdiff -u -r1.75 -r1.76 src/sys/coda/coda_vnops.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/coda/coda.h
diff -u src/sys/coda/coda.h:1.15 src/sys/coda/coda.h:1.16
--- src/sys/coda/coda.h:1.15	Mon Sep 28 06:51:35 2009
+++ src/sys/coda/coda.h	Tue Jul 20 13:26:03 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: coda.h,v 1.15 2009/09/28 10:51:35 blymn Exp $ */
+/* $NetBSD: coda.h,v 1.16 2010/07/20 17:26:03 christos Exp $ */
 
 /*
 
@@ -793,8 +793,8 @@
 #define PIOCPARM_MASK 0x
 struct ViceIoctl {
 void *in, *out;		/* Data to be transferred in, or out */
-short in_size;  /* Size of input buffer <= 2K */
-short out_size; /* Maximum size of output buffer, <= 2K */
+unsigned short in_size; /* Size of input buffer <= 2K */
+unsigned short out_size;/* Maximum size of output buffer, <= 2K */
 };
 
 struct PioctlData {

Index: src/sys/coda/coda_venus.c
diff -u src/sys/coda/coda_venus.c:1.27 src/sys/coda/coda_venus.c:1.28
--- src/sys/coda/coda_venus.c:1.27	Sat Apr 18 10:58:02 2009
+++ src/sys/coda/coda_venus.c	Tue Jul 20 13:26:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_venus.c,v 1.27 2009/04/18 14:58:02 tsutsui Exp $	*/
+/*	$NetBSD: coda_venus.c,v 1.28 2010/07/20 17:26:03 christos Exp $	*/
 
 /*
  *
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.27 2009/04/18 14:58:02 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_venus.c,v 1.28 2010/07/20 17:26:03 christos Exp $");
 
 #include 
 #include 
@@ -308,7 +308,7 @@
 tmp = ((com >> 16) & IOCPARM_MASK) - sizeof (char *) - sizeof (int);
 inp->cmd |= (tmp & IOCPARM_MASK) <<	16;
 
-if (iap->vi.in_size < 0 || iap->vi.in_size > VC_MAXMSGSIZE) {
+if (iap->vi.in_size > VC_MAXMSGSIZE || iap->vi.out_size > VC_MAXMSGSIZE) {
 	CODA_FREE(inp, coda_ioctl_size);
 	return (EINVAL);
 }

Index: src/sys/coda/coda_vnops.c
diff -u src/sys/coda/coda_vnops.c:1.75 src/sys/coda/coda_vnops.c:1.76
--- src/sys/coda/coda_vnops.c:1.75	Thu Jul  1 09:00:54 2010
+++ src/sys/coda/coda_vnops.c	Tue Jul 20 13:26:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: coda_vnops.c,v 1.75 2010/07/01 13:00:54 hannken Exp $	*/
+/*	$NetBSD: coda_vnops.c,v 1.76 2010/07/20 17:26:03 christos Exp $	*/
 
 /*
  *
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.75 2010/07/01 13:00:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_vnops.c,v 1.76 2010/07/20 17:26:03 christos Exp $");
 
 #include 
 #include 
@@ -539,7 +539,7 @@
 	return(EINVAL);
 }
 
-if (iap->vi.in_size > VC_MAXDATASIZE) {
+if (iap->vi.in_size > VC_MAXDATASIZE || iap->vi.out_size > VC_MAXDATASIZE) {
 	vrele(tvp);
 	return(EINVAL);
 }



CVS commit: src/usr.bin/make

2010-07-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Jul 20 16:39:28 UTC 2010

Modified Files:
src/usr.bin/make: job.c

Log Message:
PR/43643: David A. Holland: dash prefix broken with make -j
As the comment says in JobPrintJob set JOB_IGNERR with - commands. Fix
whitespace so that the output is consistent, although there are two separate
execution logic implementations (command.c, job.c)


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/usr.bin/make/job.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.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.151 src/usr.bin/make/job.c:1.152
--- src/usr.bin/make/job.c:1.151	Wed Jun 16 23:36:05 2010
+++ src/usr.bin/make/job.c	Tue Jul 20 12:39:27 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.151 2010/06/17 03:36:05 sjg Exp $	*/
+/*	$NetBSD: job.c,v 1.152 2010/07/20 16:39:27 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.151 2010/06/17 03:36:05 sjg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.152 2010/07/20 16:39:27 christos Exp $";
 #else
 #include 
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.151 2010/06/17 03:36:05 sjg Exp $");
+__RCSID("$NetBSD: job.c,v 1.152 2010/07/20 16:39:27 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -713,6 +713,7 @@
 	shutUp = DEBUG(LOUD) ? FALSE : TRUE;
 	break;
 	case '-':
+	job->flags |= JOB_IGNERR;
 	errOff = TRUE;
 	break;
 	case '+':
@@ -761,7 +762,7 @@
 }
 
 if (errOff) {
-	if ( !(job->flags & JOB_IGNERR) && !noSpecials) {
+	if (!noSpecials) {
 	if (commandShell->hasErrCtl) {
 		/*
 		 * we don't want the error-control commands showing
@@ -1019,7 +1020,7 @@
 		(void)printf("*** [%s] Error code %d%s\n",
 job->node->name,
 			   WEXITSTATUS(status),
-			   (job->flags & JOB_IGNERR) ? "(ignored)" : "");
+			   (job->flags & JOB_IGNERR) ? " (ignored)" : "");
 		if (job->flags & JOB_IGNERR) {
 		status = 0;
 		} else {
@@ -1232,11 +1233,11 @@
 	}
 
 	if (gn->type & OP_OPTIONAL) {
-		(void)fprintf(stdout, "%s%s %s(ignored)\n", progname,
+		(void)fprintf(stdout, "%s%s %s (ignored)\n", progname,
 		msg, gn->name);
 		(void)fflush(stdout);
 	} else if (keepgoing) {
-		(void)fprintf(stdout, "%s%s %s(continuing)\n", progname,
+		(void)fprintf(stdout, "%s%s %s (continuing)\n", progname,
 		msg, gn->name);
 		(void)fflush(stdout);
   		return FALSE;



CVS commit: [uebayasi-xip] src/sys/miscfs/genfs

2010-07-20 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Tue Jul 20 15:43:48 UTC 2010

Modified Files:
src/sys/miscfs/genfs [uebayasi-xip]: genfs_io.c

Log Message:
genfs_do_getpages_xip: Simplify code.


To generate a diff of this commit:
cvs rdiff -u -r1.36.2.16 -r1.36.2.17 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.36.2.16 src/sys/miscfs/genfs/genfs_io.c:1.36.2.17
--- src/sys/miscfs/genfs/genfs_io.c:1.36.2.16	Thu Jul 15 14:13:11 2010
+++ src/sys/miscfs/genfs/genfs_io.c	Tue Jul 20 15:43:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.36.2.16 2010/07/15 14:13:11 uebayasi Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.36.2.17 2010/07/20 15:43:48 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.16 2010/07/15 14:13:11 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.17 2010/07/20 15:43:48 uebayasi Exp $");
 
 #include "opt_xip.h"
 
@@ -791,7 +791,6 @@
 	int npages;
 	int fs_bshift, fs_bsize, dev_bshift, dev_bsize;
 	int i;
-	paddr_t phys_addr;
 
 	UVMHIST_FUNC("genfs_do_getpages_xip"); UVMHIST_CALLED(ubchist);
 
@@ -840,24 +839,22 @@
 			pps[i] = xip_zero_page;
 		} else {
 			struct vm_physseg *seg;
+			daddr_t seg_off;
 			struct vm_page *pg;
 
 			seg = devvp->v_physseg;
 			KASSERT(seg != NULL);
 			/* bus_space_mmap cookie -> paddr_t */
-			phys_addr = pmap_phys_address(seg->start) +
-			(blkno << dev_bshift) +
-			(off - (lbn << fs_bshift));
-			pg = seg->pgs +
-			((phys_addr >> PAGE_SHIFT) - seg->start);
-			KASSERT(pg->phys_addr == phys_addr);
+			seg_off = (blkno << dev_bshift) + (off - (lbn << fs_bshift));
+			pg = seg->pgs + (seg_off >> PAGE_SHIFT);
+			KASSERT(pg->phys_addr == pmap_phys_address(seg->start) + seg_off);
 
 			pps[i] = pg;
 		}
 
 		UVMHIST_LOG(ubchist, "xip pgs %d => phys_addr=0x%lx (%p)",
 			i,
-			(long)phys_addr,
+			(long)pg->phys_addr,
 			pps[i],
 			0);
 



CVS commit: src/tests/fs

2010-07-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jul 20 15:09:32 UTC 2010

Modified Files:
src/tests/fs: Makefile

Log Message:
common cannot be a TESTS_SUBDIR, since one of those without a test
behind it confuses atf-run.  change to SUBDIR as hinted by jmmv.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/fs/Makefile

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

Modified files:

Index: src/tests/fs/Makefile
diff -u src/tests/fs/Makefile:1.16 src/tests/fs/Makefile:1.17
--- src/tests/fs/Makefile:1.16	Mon Jul 19 16:09:07 2010
+++ src/tests/fs/Makefile	Tue Jul 20 15:09:32 2010
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.16 2010/07/19 16:09:07 pooka Exp $
+# $NetBSD: Makefile,v 1.17 2010/07/20 15:09:32 pooka Exp $
 
 .include 
 
 TESTSDIR=	${TESTSBASE}/fs
 
-TESTS_SUBDIRS+=	common .WAIT ffs kernfs lfs msdosfs nullfs psshfs ptyfs puffs
+SUBDIR+= 	common .WAIT
+
+TESTS_SUBDIRS+=	ffs kernfs lfs msdosfs nullfs psshfs ptyfs puffs
 TESTS_SUBDIRS+=	tmpfs umapfs union
 TESTS_SUBDIRS+=	vfs
 



CVS commit: src/sys/arch/hpcmips/dev

2010-07-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jul 20 15:06:44 UTC 2010

Modified Files:
src/sys/arch/hpcmips/dev: plumohci.c

Log Message:
Remove (possibly) unnecessary boundary arg from bus_space_alloc(9)
for DMA shared memory. PR port-hpcmips/43473 by Risto Sainio.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/hpcmips/dev/plumohci.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/hpcmips/dev/plumohci.c
diff -u src/sys/arch/hpcmips/dev/plumohci.c:1.12 src/sys/arch/hpcmips/dev/plumohci.c:1.13
--- src/sys/arch/hpcmips/dev/plumohci.c:1.12	Thu Apr  3 17:04:40 2008
+++ src/sys/arch/hpcmips/dev/plumohci.c	Tue Jul 20 15:06:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: plumohci.c,v 1.12 2008/04/03 17:04:40 drochner Exp $ */
+/*	$NetBSD: plumohci.c,v 1.13 2010/07/20 15:06:43 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 UCHIYAMA Yasushi
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plumohci.c,v 1.12 2008/04/03 17:04:40 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumohci.c,v 1.13 2010/07/20 15:06:43 tsutsui Exp $");
 
 #include 
 #include 
@@ -241,7 +241,7 @@
 	 */
 	error = bus_space_alloc(sc->sc.iot, PLUM_OHCI_SHMEMBASE,
 	PLUM_OHCI_SHMEMBASE + PLUM_OHCI_SHMEMSIZE - 1,
-	size, OHCI_PAGE_SIZE, OHCI_PAGE_SIZE, 0,
+	size, OHCI_PAGE_SIZE, 0, 0,
 	(bus_addr_t *)(void *)&caddr, &bsh);
 	if (error)
 		return (1);



CVS commit: src/sys/arch/hpcmips/tx

2010-07-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Jul 20 15:03:53 UTC 2010

Modified Files:
src/sys/arch/hpcmips/tx: txcom.c

Log Message:
Replace callout(9) with softint(9) which is more appropriate there.
Inspired by PR port-hpcmips/43472 and tested by Risto Sainio.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hpcmips/tx/txcom.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/hpcmips/tx/txcom.c
diff -u src/sys/arch/hpcmips/tx/txcom.c:1.43 src/sys/arch/hpcmips/tx/txcom.c:1.44
--- src/sys/arch/hpcmips/tx/txcom.c:1.43	Fri Jul 16 15:30:10 2010
+++ src/sys/arch/hpcmips/tx/txcom.c	Tue Jul 20 15:03:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $ */
+/*	$NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.43 2010/07/16 15:30:10 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: txcom.c,v 1.44 2010/07/20 15:03:53 tsutsui Exp $");
 
 #include "opt_tx39uart_debug.h"
 
@@ -99,8 +99,8 @@
 	struct tty		*sc_tty;
 	struct txcom_chip	*sc_chip;
 
-	struct callout		sc_txsoft_ch;
-	struct callout		sc_rxsoft_ch;
+	void		*sc_txsoft_cookie;
+	void		*sc_rxsoft_cookie;
 
  	u_int8_t	*sc_tba;	/* transmit buffer address */
  	int		sc_tbc;		/* transmit byte count */
@@ -249,10 +249,6 @@
 
 	printf("\n");
 
-	/* initialize callouts */
-	callout_init(&sc->sc_txsoft_ch, 0);
-	callout_init(&sc->sc_rxsoft_ch, 0);
-
 	/* 
 	 * Enable interrupt
 	 */
@@ -273,6 +269,11 @@
 	tx_intr_establish(tc, TXCOMINTR(BREAK, slot), IST_EDGE, IPL_TTY,
 	txcom_break_intr, sc);
 
+	sc->sc_txsoft_cookie =
+	softint_establish(SOFTINT_SERIAL, txcom_txsoft, sc);
+	sc->sc_rxsoft_cookie =
+	softint_establish(SOFTINT_SERIAL, txcom_rxsoft, sc);
+
 	/*
 	 * UARTA has external signal line. (its wiring is platform dependent)
 	 */
@@ -700,7 +701,7 @@
 	sc->sc_rbuf[sc->sc_rbput] = c;
 	sc->sc_rbput = (sc->sc_rbput + 1) % TXCOM_RING_MASK;
 	
-	callout_reset(&sc->sc_rxsoft_ch, 1, txcom_rxsoft, sc);
+	softint_schedule(sc->sc_rxsoft_cookie);
 
 	return 0;
 }
@@ -749,7 +750,7 @@
 		sc->sc_tbc--;
 		sc->sc_tba++;
 	} else {
-		callout_reset(&sc->sc_txsoft_ch, 1, txcom_txsoft, sc);
+		softint_schedule(sc->sc_txsoft_cookie);
 	}
 
 	return 0;



CVS commit: src/usr.sbin/puffs/rump_nfs

2010-07-20 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Jul 20 14:42:03 UTC 2010

Modified Files:
src/usr.sbin/puffs/rump_nfs: Makefile

Log Message:
Remove unused LDADD lines.  They need work to work, and if anyone
ever does that work, they surely can come up with the LDADD line as
well.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/puffs/rump_nfs/Makefile

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/puffs/rump_nfs/Makefile
diff -u src/usr.sbin/puffs/rump_nfs/Makefile:1.5 src/usr.sbin/puffs/rump_nfs/Makefile:1.6
--- src/usr.sbin/puffs/rump_nfs/Makefile:1.5	Mon Sep 14 17:24:20 2009
+++ src/usr.sbin/puffs/rump_nfs/Makefile	Tue Jul 20 14:42:03 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2009/09/14 17:24:20 skrll Exp $
+#	$NetBSD: Makefile,v 1.6 2010/07/20 14:42:03 pooka Exp $
 #
 
 .include 
@@ -6,19 +6,7 @@
 MOUNTNAME=	nfs
 
 SRCS+=		getnfsargs.c
-
-# One or the other of the following.  Compile-time selection for now.
-# The first one uses host sockets to provide a networking stack, the
-# second one runs the real NetBSD kernel networking stack in userspace
-# and uses /dev/tap to access the network.
-#
-.ifdef RUMPKMOD
-LDADD+= 	-lrumpnet -lrumpnet_sockin
-.else
 LDADD+= 	-lrumpfs_nfs -lrumpnet -lrumpnet_sockin
-.endif
-#LDADD+= 	-lrumpfs_nfs -lrumpnet -lrumpnet_net -lrumpnet_netinet	\
-		-lrumpnet_virtif
 
 ISRUMP=		# gives me nightmares
 #CPPFLAGS+=	-DINET6 # for getnfsargs?



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

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 12:14:17 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: std.gumstix std.overo

Log Message:
Add options EVBARM_BOARDTYPE.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/std.gumstix
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/std.overo

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/evbarm/conf/std.gumstix
diff -u src/sys/arch/evbarm/conf/std.gumstix:1.6 src/sys/arch/evbarm/conf/std.gumstix:1.7
--- src/sys/arch/evbarm/conf/std.gumstix:1.6	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/std.gumstix	Tue Jul 20 12:14:16 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: std.gumstix,v 1.6 2010/07/10 08:17:48 kiyohara Exp $
+#	$NetBSD: std.gumstix,v 1.7 2010/07/20 12:14:16 kiyohara Exp $
 #
 # standard NetBSD/evbarm for GUMSTIX options
 
@@ -17,6 +17,7 @@
 options 	KERNEL_BASE_EXT=0xc000
 makeoptions	LOADADDRESS="0xc020"
 makeoptions	BOARDTYPE="gumstix"
+options 	EVBARM_BOARDTYPE=gumstix
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.gumstix"
 
 options 	ARM_INTR_IMPL=""

Index: src/sys/arch/evbarm/conf/std.overo
diff -u src/sys/arch/evbarm/conf/std.overo:1.1 src/sys/arch/evbarm/conf/std.overo:1.2
--- src/sys/arch/evbarm/conf/std.overo:1.1	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/std.overo	Tue Jul 20 12:14:16 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: std.overo,v 1.1 2010/07/10 08:17:48 kiyohara Exp $
+#	$NetBSD: std.overo,v 1.2 2010/07/20 12:14:16 kiyohara Exp $
 #
 # standard NetBSD/evbarm for OVERO options
 
@@ -20,6 +20,7 @@
 options 	KERNEL_BASE_EXT=0x8000
 makeoptions	LOADADDRESS="0x8020"
 makeoptions	BOARDTYPE="overo"
+options 	EVBARM_BOARDTYPE=overo
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.gumstix"
 makeoptions	CPPFLAGS+="-I$S/../../../include"
 



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

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 12:13:18 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: OVERO

Log Message:
Add CPPFLAGS like to BEAGLEBOAD.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/OVERO

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/evbarm/conf/OVERO
diff -u src/sys/arch/evbarm/conf/OVERO:1.2 src/sys/arch/evbarm/conf/OVERO:1.3
--- src/sys/arch/evbarm/conf/OVERO:1.2	Tue Jul 20 12:09:50 2010
+++ src/sys/arch/evbarm/conf/OVERO	Tue Jul 20 12:13:18 2010
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: OVERO,v 1.2 2010/07/20 12:09:50 kiyohara Exp $
+#	$NetBSD: OVERO,v 1.3 2010/07/20 12:13:18 kiyohara Exp $
 #
 #	OVERO -- Gumstix. Inc. Overo platforms kernel
 #
@@ -17,6 +17,7 @@
 options 	CPU_CORTEXA8
 options 	OMAP_3530
 options 	PMAPCOUNTERS
+makeoptions	CPUFLAGS="-mcpu=arm1136jf-s"
 
 # Architecture options
 



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

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 12:09:51 UTC 2010

Modified Files:
src/sys/arch/evbarm/conf: OVERO

Log Message:
Remove unexist device(omapnand0).


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/OVERO

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/evbarm/conf/OVERO
diff -u src/sys/arch/evbarm/conf/OVERO:1.1 src/sys/arch/evbarm/conf/OVERO:1.2
--- src/sys/arch/evbarm/conf/OVERO:1.1	Sat Jul 10 08:17:48 2010
+++ src/sys/arch/evbarm/conf/OVERO	Tue Jul 20 12:09:50 2010
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: OVERO,v 1.1 2010/07/10 08:17:48 kiyohara Exp $
+#	$NetBSD: OVERO,v 1.2 2010/07/20 12:09:50 kiyohara Exp $
 #
 #	OVERO -- Gumstix. Inc. Overo platforms kernel
 #
@@ -175,7 +175,6 @@
 
 # General Purpose Memory Controller
 gpmc0		at mainbus? base 0x6e00
-omapnand0 at gpmc0 addr 0x3000
 
 # Interrupt Controller
 omapicu0	at obio0 addr 0x4820 size 0x1000 intrbase 0



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 12:01:33 UTC 2010

Modified Files:
src/sys/dev/marvell: marvellreg.h

Log Message:
Remove some attribute macros.  Its specifically for Orion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/marvell/marvellreg.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/marvell/marvellreg.h
diff -u src/sys/dev/marvell/marvellreg.h:1.4 src/sys/dev/marvell/marvellreg.h:1.5
--- src/sys/dev/marvell/marvellreg.h:1.4	Tue Jul 20 11:56:47 2010
+++ src/sys/dev/marvell/marvellreg.h	Tue Jul 20 12:01:33 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvellreg.h,v 1.4 2010/07/20 11:56:47 kiyohara Exp $	*/
+/*	$NetBSD: marvellreg.h,v 1.5 2010/07/20 12:01:33 kiyohara Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -67,16 +67,5 @@
 #define MARVELL_ATTR_SDRAM_CS1		0x0d
 #define MARVELL_ATTR_SDRAM_CS2		0x0b
 #define MARVELL_ATTR_SDRAM_CS3		0x07
-#define MARVELL_ATTR_PEX_CFG		0x79	/* bug workaround ?? */
-#define MARVELL_ATTR_PEX_MEM		0x59
-#define MARVELL_ATTR_PEX_IO		0x51
-#define MARVELL_ATTR_PCI_MEM		0x59
-#define MARVELL_ATTR_PCI_IO		0x51
-#define MARVELL_ATTR_DEVICE_CS0		0x1e
-#define MARVELL_ATTR_DEVICE_CS1		0x1d
-#define MARVELL_ATTR_DEVICE_CS2		0x1b
-#define MARVELL_ATTR_FLASH_CS		0x1b
-#define MARVELL_ATTR_BOOT_CS		0x0f
-#define MARVELL_ATTR_CRYPT		0x00
 
 #endif	/* _DEV_MARVELL_MARVELLREG_H_ */



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 11:56:47 UTC 2010

Modified Files:
src/sys/dev/marvell: marvellreg.h

Log Message:
Add macro MARVELL_ORION_1_88F6183.
Add some comments.
  Product ID of Discovery V maybe 0x6450.
  Product ID of Discovery VI maybe 0x6490.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/marvell/marvellreg.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/marvell/marvellreg.h
diff -u src/sys/dev/marvell/marvellreg.h:1.3 src/sys/dev/marvell/marvellreg.h:1.4
--- src/sys/dev/marvell/marvellreg.h:1.3	Tue Jul 13 14:00:07 2010
+++ src/sys/dev/marvell/marvellreg.h	Tue Jul 20 11:56:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvellreg.h,v 1.3 2010/07/13 14:00:07 kiyohara Exp $	*/
+/*	$NetBSD: marvellreg.h,v 1.4 2010/07/20 11:56:47 kiyohara Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -34,9 +34,9 @@
 #define MARVELL_DISCOVERY_II		PCI_PRODUCT_MARVELL_MV64360
 #define MARVELL_DISCOVERY_III		PCI_PRODUCT_MARVELL_MV64460
 #if 0
-#define MARVELL_DISCOVERY_LT		/*  */
-#define MARVELL_DISCOVERY_V		/*  */
-#define MARVELL_DISCOVERY_VI		/*  */
+#define MARVELL_DISCOVERY_LT		/* : 0x */
+#define MARVELL_DISCOVERY_V		/* : 0x6450 ? */
+#define MARVELL_DISCOVERY_VI		/* : 0x6490 ? */
 #endif
 
 #define MARVELL_ORION_1_88F1181		PCI_PRODUCT_MARVELL_88F1181
@@ -45,6 +45,7 @@
 #define MARVELL_ORION_1_88F5181		PCI_PRODUCT_MARVELL_88F5181
 #define MARVELL_ORION_1_88F5182		PCI_PRODUCT_MARVELL_88F5182
 #define MARVELL_ORION_1_88F6082		PCI_PRODUCT_MARVELL_88F6082
+#define MARVELL_ORION_1_88F6183		PCI_PRODUCT_MARVELL_88F6183
 #define MARVELL_ORION_1_88W8660		PCI_PRODUCT_MARVELL_88W8660
 
 #define MARVELL_ORION_2_88F1281		PCI_PRODUCT_MARVELL_88F1281



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 11:50:18 UTC 2010

Modified Files:
src/sys/dev/marvell: com_mv.c

Log Message:
Add some Kirkwood/Discovery Innovation products.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/marvell/com_mv.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/marvell/com_mv.c
diff -u src/sys/dev/marvell/com_mv.c:1.1 src/sys/dev/marvell/com_mv.c:1.2
--- src/sys/dev/marvell/com_mv.c:1.1	Tue Jul 13 11:16:02 2010
+++ src/sys/dev/marvell/com_mv.c	Tue Jul 20 11:50:18 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: com_mv.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $	*/
+/*	$NetBSD: com_mv.c,v 1.2 2010/07/20 11:50:18 kiyohara Exp $	*/
 /*
  * Copyright (c) 2007, 2010 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_mv.c,v 1.1 2010/07/13 11:16:02 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_mv.c,v 1.2 2010/07/20 11:50:18 kiyohara Exp $");
 
 #include 
 #include 
@@ -92,6 +92,11 @@
 	case MARVELL_ORION_1_88W8660:
 	case MARVELL_ORION_2_88F1281:
 	case MARVELL_ORION_2_88F5281:
+	case MARVELL_KIRKWOOD_88F6180:
+	case MARVELL_KIRKWOOD_88F6192:
+	case MARVELL_KIRKWOOD_88F6281:
+	case MARVELL_MV78XX0_MV78100:
+	case MARVELL_MV78XX0_MV78200:
 		break;
 
 	default:



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 11:48:00 UTC 2010

Modified Files:
src/sys/dev/marvell: gtidmac.c

Log Message:
Fix information on the product with comment-out.  This was obtained from
the data sheet of Marvell.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/marvell/gtidmac.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/marvell/gtidmac.c
diff -u src/sys/dev/marvell/gtidmac.c:1.4 src/sys/dev/marvell/gtidmac.c:1.5
--- src/sys/dev/marvell/gtidmac.c:1.4	Sun Jul 11 08:43:36 2010
+++ src/sys/dev/marvell/gtidmac.c	Tue Jul 20 11:47:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtidmac.c,v 1.4 2010/07/11 08:43:36 kiyohara Exp $	*/
+/*	$NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $	*/
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.4 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtidmac.c,v 1.5 2010/07/20 11:47:59 kiyohara Exp $");
 
 #include 
 #include 
@@ -316,15 +316,8 @@
 	case MARVELL_DISCOVERY:
 	case MARVELL_DISCOVERY_II:
 	case MARVELL_DISCOVERY_III:
-#if 0
-	case MARVELL_DISCOVERY_V:	
-#endif
 		break;
 
-#if 0
-	case MARVELL_DISCOVERY_LT:	
-	case MARVELL_DISCOVERY_VI:	
-#endif
 	case MARVELL_ORION_1_88F1181:
 	case MARVELL_ORION_1_88F5082:
 	case MARVELL_ORION_1_88F5180N:
@@ -335,6 +328,11 @@
 		idmac_nchan = 4;
 		break;
 
+#if 0
+	case MARVELL_DISCOVERY_LT:
+	case MARVELL_DISCOVERY_V:
+	case MARVELL_DISCOVERY_VI:	
+#endif
 	case MARVELL_ORION_1_88F5182:
 		idmac_nchan = 4;
 		xore_nchan = 2;



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 11:42:22 UTC 2010

Modified Files:
src/sys/dev/marvell: gt.c

Log Message:
Add notes for remembrance' sake.  This is information obtained looking for
www.marvell.com.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/marvell/gt.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/marvell/gt.c
diff -u src/sys/dev/marvell/gt.c:1.25 src/sys/dev/marvell/gt.c:1.26
--- src/sys/dev/marvell/gt.c:1.25	Sun Jul 11 08:43:36 2010
+++ src/sys/dev/marvell/gt.c	Tue Jul 20 11:42:22 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: gt.c,v 1.25 2010/07/11 08:43:36 kiyohara Exp $	*/
+/*	$NetBSD: gt.c,v 1.26 2010/07/20 11:42:22 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.25 2010/07/11 08:43:36 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.26 2010/07/20 11:42:22 kiyohara Exp $");
 
 #include "opt_marvell.h"
 #include "gtmpsc.h"
@@ -147,6 +147,32 @@
 	{ MARVELL_DISCOVERY_III,"gtpci",   1,	OFFSET_DEFAULT,	IRQ_DEFAULT },
 	{ MARVELL_DISCOVERY_III,"gttwsi",  0,	0xc000,		37 },
 	{ MARVELL_DISCOVERY_III,"mvgbec",  0,	0x,		IRQ_DEFAULT },
+
+#if 0	/* XX: from www.marvell.com */
+	/* Discovery LT (Discovery Light) MV644[23]0 */
+	{ MARVELL_DISCOVERY_LT,	"gtidmac", 0,	0x?000,		? /*...? */ },
+	{ MARVELL_DISCOVERY_LT,	"gtmpsc",  0,	0x?000,		? },
+	{ MARVELL_DISCOVERY_LT,	"gtmpsc",  1,	0x?000,		? },
+	{ MARVELL_DISCOVERY_LT,	"gtpci",   0,	OFFSET_DEFAULT,	IRQ_DEFAULT },
+	{ MARVELL_DISCOVERY_LT,	"gtpci",   1,	OFFSET_DEFAULT,	IRQ_DEFAULT },
+	{ MARVELL_DISCOVERY_LT,	"gttwsi",  0,	0x?000,		? },
+	{ MARVELL_DISCOVERY_LT,	"mvgbec",  0,	0x?000,		IRQ_DEFAULT },
+
+	/* Discovery V MV64560 */
+	{ MARVELL_DISCOVERY_V,	"com", ?,	0x?,	? },
+	{ MARVELL_DISCOVERY_V,	"ehci",0,	0x?,	? },
+	{ MARVELL_DISCOVERY_V,	"ehci",1,	0x?,	? },
+	{ MARVELL_DISCOVERY_V,	"gtidmac", 0,	0x?,	? /*...? */ },
+	{ MARVELL_DISCOVERY_V,	"gtpci",   0,	0x?,	IRQ_DEFAULT },
+	{ MARVELL_DISCOVERY_V,	"gttwsi",  0,	0x?,	? },
+	{ MARVELL_DISCOVERY_V,	"mvgbec",  0,	0x?,	IRQ_DEFAULT },
+	{ MARVELL_DISCOVERY_V,	"mvpex or gtpci?", 0, 0x?,	IRQ_DEFAULT },
+	{ MARVELL_DISCOVERY_V,	"obio",0,	OFFSET_DEFAULT,	IRQ_DEFAULT },
+
+	/* Discovery VI MV64660 */
+	/* MV64560 + SATA? */
+	{ MARVELL_DISCOVERY_VI, "mvsata",  0,	0x?,	? },
+#endif
 };
 
 



CVS commit: src/sys/dev/marvell

2010-07-20 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue Jul 20 11:37:40 UTC 2010

Modified Files:
src/sys/dev/marvell: marvellvar.h

Log Message:
Add MARVELL_TAG_MAX to enum marvell_tags.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/marvell/marvellvar.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/marvell/marvellvar.h
diff -u src/sys/dev/marvell/marvellvar.h:1.2 src/sys/dev/marvell/marvellvar.h:1.3
--- src/sys/dev/marvell/marvellvar.h:1.2	Sun Jul 11 08:43:36 2010
+++ src/sys/dev/marvell/marvellvar.h	Tue Jul 20 11:37:39 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: marvellvar.h,v 1.2 2010/07/11 08:43:36 kiyohara Exp $	*/
+/*	$NetBSD: marvellvar.h,v 1.3 2010/07/20 11:37:39 kiyohara Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -34,6 +34,8 @@
 	MARVELL_TAG_SDRAM_CS2,
 	MARVELL_TAG_SDRAM_CS3,
 
+	MARVELL_TAG_MAX,
+
 	MARVELL_TAG_UNDEFINED = -1,
 };
 



CVS commit: src/sys/dev/pci

2010-07-20 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Tue Jul 20 09:17:24 UTC 2010

Modified Files:
src/sys/dev/pci: if_age.c if_ale.c

Log Message:
PR kern/38871: Fix VLAN


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/pci/if_age.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/pci/if_ale.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/if_age.c
diff -u src/sys/dev/pci/if_age.c:1.38 src/sys/dev/pci/if_age.c:1.39
--- src/sys/dev/pci/if_age.c:1.38	Mon Apr  5 07:20:24 2010
+++ src/sys/dev/pci/if_age.c	Tue Jul 20 09:17:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_age.c,v 1.38 2010/04/05 07:20:24 joerg Exp $ */
+/*	$NetBSD: if_age.c,v 1.39 2010/07/20 09:17:24 cegger Exp $ */
 /*	$OpenBSD: if_age.c,v 1.1 2009/01/16 05:00:34 kevlo Exp $	*/
 
 /*-
@@ -31,7 +31,7 @@
 /* Driver for Attansic Technology Corp. L1 Gigabit Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.38 2010/04/05 07:20:24 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_age.c,v 1.39 2010/07/20 09:17:24 cegger Exp $");
 
 #include "vlan.h"
 
@@ -2235,7 +2235,7 @@
 
 	reg = CSR_READ_4(sc, AGE_MAC_CFG);
 	reg &= ~MAC_CFG_VLAN_TAG_STRIP;
-	if (sc->sc_ec.ec_capabilities & ETHERCAP_VLAN_HWTAGGING)
+	if (sc->sc_ec.ec_capenable & ETHERCAP_VLAN_HWTAGGING)
 		reg |= MAC_CFG_VLAN_TAG_STRIP;
 	CSR_WRITE_4(sc, AGE_MAC_CFG, reg);
 }

Index: src/sys/dev/pci/if_ale.c
diff -u src/sys/dev/pci/if_ale.c:1.11 src/sys/dev/pci/if_ale.c:1.12
--- src/sys/dev/pci/if_ale.c:1.11	Mon Apr  5 07:20:25 2010
+++ src/sys/dev/pci/if_ale.c	Tue Jul 20 09:17:24 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ale.c,v 1.11 2010/04/05 07:20:25 joerg Exp $	*/
+/*	$NetBSD: if_ale.c,v 1.12 2010/07/20 09:17:24 cegger Exp $	*/
 
 /*-
  * Copyright (c) 2008, Pyun YongHyeon 
@@ -32,7 +32,7 @@
 /* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.11 2010/04/05 07:20:25 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.12 2010/07/20 09:17:24 cegger Exp $");
 
 #include "vlan.h"
 
@@ -1973,12 +1973,11 @@
 static void
 ale_rxvlan(struct ale_softc *sc)
 {
-	struct ifnet *ifp = &sc->sc_ec.ec_if;
 	uint32_t reg;
 
 	reg = CSR_READ_4(sc, ALE_MAC_CFG);
 	reg &= ~MAC_CFG_VLAN_TAG_STRIP;
-	if (ifp->if_capabilities & ETHERCAP_VLAN_HWTAGGING)
+	if (sc->sc_ec.ec_capenable & ETHERCAP_VLAN_HWTAGGING)
 		reg |= MAC_CFG_VLAN_TAG_STRIP;
 	CSR_WRITE_4(sc, ALE_MAC_CFG, reg);
 }