CVS commit: src/sys/arch/arm/omap

2012-08-24 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Fri Aug 24 15:25:11 UTC 2012

Modified Files:
src/sys/arch/arm/omap: omap_wdt.c

Log Message:
Defend against the case where omapwdt32k_enable() can be called via ddb if
the kernel crashes early on before the watchdog driver starts.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/omap/omap_wdt.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/omap/omap_wdt.c
diff -u src/sys/arch/arm/omap/omap_wdt.c:1.3 src/sys/arch/arm/omap/omap_wdt.c:1.4
--- src/sys/arch/arm/omap/omap_wdt.c:1.3	Fri Jul  1 20:30:21 2011
+++ src/sys/arch/arm/omap/omap_wdt.c	Fri Aug 24 15:25:11 2012
@@ -148,7 +148,13 @@ int
 omapwdt32k_enable(int enable)
 {
 	int s;
-	int prev_state = omapwdt32k_sc-sc_armed;
+	int prev_state;
+
+	/* Just return if ddb is entered before the watchdog driver starts. */
+	if (omapwdt32k_sc == NULL)
+		return (0);
+
+	prev_state = omapwdt32k_sc-sc_armed;
 
 	/* Normalize the int to a boolean so we can compare values directly.
 	 */



CVS commit: src/sys/dev/usb

2011-03-09 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Thu Mar 10 00:11:59 UTC 2011

Modified Files:
src/sys/dev/usb: usbdevs

Log Message:
Add entry for Toshiba version of a Novatel EU870D 3G/HSDPA WWAN Card.


To generate a diff of this commit:
cvs rdiff -u -r1.578 -r1.579 src/sys/dev/usb/usbdevs

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/usbdevs
diff -u src/sys/dev/usb/usbdevs:1.578 src/sys/dev/usb/usbdevs:1.579
--- src/sys/dev/usb/usbdevs:1.578	Sun Feb  6 23:11:11 2011
+++ src/sys/dev/usb/usbdevs	Thu Mar 10 00:11:59 2011
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp $
+$NetBSD: usbdevs,v 1.579 2011/03/10 00:11:59 scw Exp $
 
 /*
  * Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -2688,6 +2688,7 @@
 
 /* Toshiba Corporation products */
 product TOSHIBA POCKETPC_E740	0x0706	PocketPC e740
+product TOSHIBA HSDPA_MODEM_EU870DT1	0x1302	HSDPA 3G Modem Card
 
 /* Trek Technology products */
 product TREK THUMBDRIVE		0x	ThumbDrive



CVS commit: src/sys/dev/usb

2011-03-09 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Thu Mar 10 00:12:51 UTC 2011

Modified Files:
src/sys/dev/usb: usbdevs.h usbdevs_data.h

Log Message:
Regen for Toshiba version of Novatel EU870D 3G/HSDPA WWAN Card


To generate a diff of this commit:
cvs rdiff -u -r1.571 -r1.572 src/sys/dev/usb/usbdevs.h
cvs rdiff -u -r1.572 -r1.573 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h
diff -u src/sys/dev/usb/usbdevs.h:1.571 src/sys/dev/usb/usbdevs.h:1.572
--- src/sys/dev/usb/usbdevs.h:1.571	Sun Feb  6 23:11:54 2011
+++ src/sys/dev/usb/usbdevs.h	Thu Mar 10 00:12:51 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs.h,v 1.571 2011/02/06 23:11:54 njoly Exp $	*/
+/*	$NetBSD: usbdevs.h,v 1.572 2011/03/10 00:12:51 scw Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp
+ *	NetBSD: usbdevs,v 1.579 2011/03/10 00:11:59 scw Exp
  */
 
 /*
@@ -2695,6 +2695,7 @@
 
 /* Toshiba Corporation products */
 #define	USB_PRODUCT_TOSHIBA_POCKETPC_E740	0x0706		/* PocketPC e740 */
+#define	USB_PRODUCT_TOSHIBA_HSDPA_MODEM_EU870DT1	0x1302		/* HSDPA 3G Modem Card */
 
 /* Trek Technology products */
 #define	USB_PRODUCT_TREK_THUMBDRIVE	0x		/* ThumbDrive */

Index: src/sys/dev/usb/usbdevs_data.h
diff -u src/sys/dev/usb/usbdevs_data.h:1.572 src/sys/dev/usb/usbdevs_data.h:1.573
--- src/sys/dev/usb/usbdevs_data.h:1.572	Sun Feb  6 23:11:54 2011
+++ src/sys/dev/usb/usbdevs_data.h	Thu Mar 10 00:12:51 2011
@@ -1,10 +1,10 @@
-/*	$NetBSD: usbdevs_data.h,v 1.572 2011/02/06 23:11:54 njoly Exp $	*/
+/*	$NetBSD: usbdevs_data.h,v 1.573 2011/03/10 00:12:51 scw Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: usbdevs,v 1.578 2011/02/06 23:11:11 njoly Exp
+ *	NetBSD: usbdevs,v 1.579 2011/03/10 00:11:59 scw Exp
  */
 
 /*
@@ -7915,6 +7915,10 @@
 	PocketPC e740,
 	},
 	{
+	USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_HSDPA_MODEM_EU870DT1,
+	HSDPA 3G Modem Card,
+	},
+	{
 	USB_VENDOR_TREK, USB_PRODUCT_TREK_THUMBDRIVE,
 	ThumbDrive,
 	},
@@ -8411,4 +8415,4 @@
 	Prestige,
 	},
 };
-const int usb_nproducts = 1601;
+const int usb_nproducts = 1602;



CVS commit: src/sys/dev/usb

2011-03-09 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Thu Mar 10 00:13:56 UTC 2011

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

Log Message:
Match a Toshiba-branded version of Novatel's EU870D 3G/HSDPA WWAN Card.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/usb/u3g.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/u3g.c
diff -u src/sys/dev/usb/u3g.c:1.16 src/sys/dev/usb/u3g.c:1.17
--- src/sys/dev/usb/u3g.c:1.16	Sat Aug  7 20:43:46 2010
+++ src/sys/dev/usb/u3g.c	Thu Mar 10 00:13:56 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: u3g.c,v 1.16 2010/08/07 20:43:46 christos Exp $	*/
+/*	$NetBSD: u3g.c,v 1.17 2011/03/10 00:13:56 scw Exp $	*/
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: u3g.c,v 1.16 2010/08/07 20:43:46 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: u3g.c,v 1.17 2011/03/10 00:13:56 scw Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -241,6 +241,9 @@
 	{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781 },
 	{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MINI5725 },
 	{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_USB305 },
+
+	/* Toshiba */
+	{ USB_VENDOR_TOSHIBA, USB_PRODUCT_TOSHIBA_HSDPA_MODEM_EU870DT1 },
 };
 
 static int



CVS commit: src/sys/arch/arm/xscale

2010-03-24 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Wed Mar 24 13:55:04 UTC 2010

Modified Files:
src/sys/arch/arm/xscale: ixp425-fw.README

Log Message:
Update with new download link provided by Marcin M. Jessa in
http://mail-index.netbsd.org/port-arm/2010/03/24/msg000912.html.

Add a note about version 3.0 microcode.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/xscale/ixp425-fw.README

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/xscale/ixp425-fw.README
diff -u src/sys/arch/arm/xscale/ixp425-fw.README:1.1 src/sys/arch/arm/xscale/ixp425-fw.README:1.2
--- src/sys/arch/arm/xscale/ixp425-fw.README:1.1	Sun Dec 10 10:01:49 2006
+++ src/sys/arch/arm/xscale/ixp425-fw.README	Wed Mar 24 13:55:04 2010
@@ -1,4 +1,4 @@
-$NetBSD: ixp425-fw.README,v 1.1 2006/12/10 10:01:49 scw Exp $
+$NetBSD: ixp425-fw.README,v 1.2 2010/03/24 13:55:04 scw Exp $
 
 IXP425 NPE Microcode
 
@@ -19,7 +19,7 @@
 
 You must grab the NPE microcode from here:
 
- http://www.intel.com/design/network/products/npfamily/ixp400_current.htm
+ http://www.intel.com/design/network/products/npfamily/download_ixp400.htm
 
 Select the Download (without Crypto) link in the NPE Microcode
 section. Note that there is no benefit in selecting the with Cypto
@@ -29,6 +29,10 @@
 version 2.3. Newer versions may not work with NetBSD's native Ethernet
 driver. If this is the case, let us know via send-pr(1).
 
+Update: As of March 2010, NPE Microcode is at version 3.0 and has been
+confirmed to work. See:
+ http://mail-index.netbsd.org/port-arm/2010/03/24/msg000912.html
+
 After clicking the link, you will be directed to a click-through license
 page. Assuming you agree to the terms of the license (and you are
 *strongly* advised to print it out and read it carefully) you will then



CVS commit: src/sys/dev/usb

2010-03-13 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Sat Mar 13 16:28:13 UTC 2010

Modified Files:
src/sys/dev/usb: ucomvar.h uftdi.c

Log Message:
Fix PR kern/42838 using option #1 as described by KIYOHARA Takashi in
http://mail-index.netbsd.org/current-users/2010/02/20/msg012654.html

Add a comment in struct ucom_methods to explain usage of 'ptr' and 'count'
in the ucom_read handler.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/usb/ucomvar.h
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/uftdi.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/ucomvar.h
diff -u src/sys/dev/usb/ucomvar.h:1.17 src/sys/dev/usb/ucomvar.h:1.18
--- src/sys/dev/usb/ucomvar.h:1.17	Sat May 24 16:40:58 2008
+++ src/sys/dev/usb/ucomvar.h	Sat Mar 13 16:28:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: ucomvar.h,v 1.17 2008/05/24 16:40:58 cube Exp $	*/
+/*	$NetBSD: ucomvar.h,v 1.18 2010/03/13 16:28:13 scw Exp $	*/
 
 /*
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -47,6 +47,14 @@
 			  void *data, int flag, usb_proc_ptr p);
 	int (*ucom_open)(void *sc, int portno);
 	void (*ucom_close)(void *sc, int portno);
+	/*
+	 * Note: The 'ptr' and 'count' pointers can be adjusted as follows:
+	 *  ptr: If consuming characters from the start of the buffer,
+	 *   advance '*ptr' to skip the data consumed.
+	 *  count: If consuming characters at the end of the buffer,
+	 * decrement '*count' by the number of characters consumed.
+	 * If consuming all characters, set '*count' to zero.
+	 */
 	void (*ucom_read)(void *sc, int portno, u_char **ptr, u_int32_t *count);
 	void (*ucom_write)(void *sc, int portno, u_char *to, u_char *from,
 			   u_int32_t *count);

Index: src/sys/dev/usb/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.45 src/sys/dev/usb/uftdi.c:1.46
--- src/sys/dev/usb/uftdi.c:1.45	Mon Jan 18 20:57:13 2010
+++ src/sys/dev/usb/uftdi.c	Sat Mar 13 16:28:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdi.c,v 1.45 2010/01/18 20:57:13 martin Exp $	*/
+/*	$NetBSD: uftdi.c,v 1.46 2010/03/13 16:28:13 scw Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.45 2010/01/18 20:57:13 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.46 2010/03/13 16:28:13 scw Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -426,9 +426,8 @@
 		ucom_status_change(device_private(sc-sc_subdev[portno-1]));
 	}
 
-	/* Pick up status and adjust data part. */
+	/* Adjust buffer pointer to skip status prefix */
 	*ptr += 2;
-	*count -= 2;
 }
 
 Static void



CVS commit: src/sys/arch/arm/arm32

2009-11-28 Thread Steve Woodford
Module Name:src
Committed By:   scw
Date:   Sat Nov 28 11:44:45 UTC 2009

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Apply some band-aid to pmap_activate() for PR kern/41058:

There's a corner case here which can leave turds in the cache as
reported in kern/41058. They're probably left over during tear-down and
switching away from an exiting process. Until the root cause is identified
and fixed, zap the cache when switching pmaps. This will result in a few
unnecessary cache flushes, but that's better than silently corrupting data.

Also remove an extraneous return statement in pmap_page_protect() which
crept in during the matt-armv6 merge.


To generate a diff of this commit:
cvs rdiff -u -r1.202 -r1.203 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.202 src/sys/arch/arm/arm32/pmap.c:1.203
--- src/sys/arch/arm/arm32/pmap.c:1.202	Sat Nov 21 20:32:18 2009
+++ src/sys/arch/arm/arm32/pmap.c	Sat Nov 28 11:44:45 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.202 2009/11/21 20:32:18 rmind Exp $	*/
+/*	$NetBSD: pmap.c,v 1.203 2009/11/28 11:44:45 scw Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
 #include machine/param.h
 #include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.202 2009/11/21 20:32:18 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.203 2009/11/28 11:44:45 scw Exp $);
 
 #ifdef PMAP_DEBUG
 
@@ -3703,7 +3703,6 @@
 	pg, VM_PAGE_TO_PHYS(pg), prot));
 
 	switch(prot) {
-		return;
 	case VM_PROT_READ|VM_PROT_WRITE:
 #if defined(PMAP_CHECK_VIPT)  defined(PMAP_APX)
 		pmap_clearbit(pg, PVF_EXEC);
@@ -4124,6 +4123,15 @@
 	 * entire cache.
 	 */
 	rpm = pmap_recent_user;
+
+/*
+ * XXXSCW: There's a corner case here which can leave turds in the cache as
+ * reported in kern/41058. They're probably left over during tear-down and
+ * switching away from an exiting process. Until the root cause is identified
+ * and fixed, zap the cache when switching pmaps. This will result in a few
+ * unnecessary cache flushes, but that's better than silently corrupting data.
+ */
+#if 0
 	if (npm != pmap_kernel()  rpm  npm != rpm 
 	rpm-pm_cstate.cs_cache) {
 		rpm-pm_cstate.cs_cache = 0;
@@ -4131,6 +4139,16 @@
 		cpu_idcache_wbinv_all();
 #endif
 	}
+#else
+	if (rpm) {
+		rpm-pm_cstate.cs_cache = 0;
+		if (npm == pmap_kernel())
+			pmap_recent_user = NULL;
+#ifdef PMAP_CACHE_VIVT
+		cpu_idcache_wbinv_all();
+#endif
+	}
+#endif
 
 	/* No interrupts while we frob the TTB/DACR */
 	oldirqstate = disable_interrupts(IF32_bits);