CVS commit: src/sys/dev/nor

2015-09-18 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Sep 18 21:30:02 UTC 2015

Modified Files:
src/sys/dev/nor: cfi.c

Log Message:
Size of erase block is 128 bytes when sector density (z) is zero.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nor/cfi.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/nor/cfi.c
diff -u src/sys/dev/nor/cfi.c:1.7 src/sys/dev/nor/cfi.c:1.8
--- src/sys/dev/nor/cfi.c:1.7	Sat Dec 17 19:42:41 2011
+++ src/sys/dev/nor/cfi.c	Fri Sep 18 21:30:02 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cfi.c,v 1.7 2011/12/17 19:42:41 phx Exp $	*/
+/*	$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $	*/
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -33,7 +33,7 @@
 #include "opt_cfi.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.7 2011/12/17 19:42:41 phx Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $"); 
 
 #include 
 #include 
@@ -476,7 +476,8 @@ cfi_scan_media(device_t self, struct nor
 	 */
 	chip->nc_num_luns = 1;
 	chip->nc_lun_blocks = cfi->cfi_qry_data.erase_blk_info[0].y + 1;
-	chip->nc_block_size = cfi->cfi_qry_data.erase_blk_info[0].z * 256;
+	chip->nc_block_size = cfi->cfi_qry_data.erase_blk_info[0].z ?
+	cfi->cfi_qry_data.erase_blk_info[0].z * 256 : 128;
 
 	switch (cfi->cfi_qry_data.id_pri) {
 	case 0x0002:
@@ -880,7 +881,8 @@ cfi_print(device_t self, struct cfi * co
 	aprint_normal_dev(self, "%d Erase Block Region(s)\n",
 		qryp->erase_blk_regions);
 	for (u_int r=0; r < qryp->erase_blk_regions; r++) {
-		size_t sz = qryp->erase_blk_info[r].z * 256;
+		size_t sz = qryp->erase_blk_info[r].z ?
+		qryp->erase_blk_info[r].z * 256 : 128;
 		format_bytes(pbuf, sizeof(pbuf), sz);
 		aprint_normal("%d: %d blocks, size %s\n", r,
 			qryp->erase_blk_info[r].y + 1, pbuf);



CVS commit: src/sys/dev/i2c

2015-09-18 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Fri Sep 18 17:21:43 UTC 2015

Modified Files:
src/sys/dev/i2c: hytp14.c

Log Message:
Declare sensor data invalid when reading the sensor failed (device is gone).


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/hytp14.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/i2c/hytp14.c
diff -u src/sys/dev/i2c/hytp14.c:1.5 src/sys/dev/i2c/hytp14.c:1.6
--- src/sys/dev/i2c/hytp14.c:1.5	Wed Sep  9 17:16:20 2015
+++ src/sys/dev/i2c/hytp14.c	Fri Sep 18 17:21:43 2015
@@ -37,7 +37,7 @@
  */ 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.5 2015/09/09 17:16:20 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.6 2015/09/18 17:21:43 phx Exp $");
 
 #include 
 #include 
@@ -230,6 +230,7 @@ hytp14_measurement_request(void *aux)
 			DPRINTF(2, ("%s: %s: failed read from 0x%02x - error %d\n",
 			device_xname(sc->sc_dev), __func__,
 			sc->sc_addr, error));
+			sc->sc_valid = ENVSYS_SINVALID;
 		} else {
 			DPRINTF(3, ("%s(%s): DF success : "
 			"0x%02x%02x%02x%02x\n",
@@ -288,6 +289,7 @@ hytp14_refresh_sensor(struct hytp14_sc *
 			DPRINTF(2, ("%s: %s: failed read from 0x%02x - error %d\n",
 			device_xname(sc->sc_dev), __func__,
 			sc->sc_addr, error));
+			sc->sc_valid = ENVSYS_SINVALID;
 		} else {
 			DPRINTF(3, ("%s(%s): DF success : "
 			"0x%02x%02x%02x%02x\n",
@@ -317,7 +319,7 @@ hytp14_refresh_sensor(struct hytp14_sc *
 		DPRINTF(2, ("%s: %s: failed acquire i2c bus - error %d\n",
 		device_xname(sc->sc_dev), __func__, error));
 	}
-	
+
 	return sc->sc_valid;
 }
 



CVS commit: src/share/misc

2015-09-18 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Sep 18 13:40:10 UTC 2015

Modified Files:
src/share/misc: acronyms

Log Message:
tgif


To generate a diff of this commit:
cvs rdiff -u -r1.239 -r1.240 src/share/misc/acronyms

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.239 src/share/misc/acronyms:1.240
--- src/share/misc/acronyms:1.239	Fri Aug 21 09:46:43 2015
+++ src/share/misc/acronyms	Fri Sep 18 13:40:10 2015
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.239 2015/08/21 09:46:43 pgoyette Exp $
+$NetBSD: acronyms,v 1.240 2015/09/18 13:40:10 wiz Exp $
 10Q	thank you
 10X	thanks
 1337	elite ("leet")
@@ -469,6 +469,7 @@ TCB	taking care of business
 TCO	taken care of
 TCO	total cost of ownership
 TFOA	things falling off aircraft
+TGIF	thank goodness it's Friday
 THNX	thanks
 THX	thanks
 TIA	thanks in advance



CVS commit: src/lib/librumpuser

2015-09-18 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Sep 18 10:56:26 UTC 2015

Modified Files:
src/lib/librumpuser: rumpuser_pth.c

Log Message:
Fix typos to match values from rumpuser_config.h

from Hajime Tazaki via rumpkernel-users


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/librumpuser/rumpuser_pth.c

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

Modified files:

Index: src/lib/librumpuser/rumpuser_pth.c
diff -u src/lib/librumpuser/rumpuser_pth.c:1.44 src/lib/librumpuser/rumpuser_pth.c:1.45
--- src/lib/librumpuser/rumpuser_pth.c:1.44	Tue Dec 16 17:00:17 2014
+++ src/lib/librumpuser/rumpuser_pth.c	Fri Sep 18 10:56:25 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $	*/
+/*	$NetBSD: rumpuser_pth.c,v 1.45 2015/09/18 10:56:25 pooka Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include "rumpuser_port.h"
 
 #if !defined(lint)
-__RCSID("$NetBSD: rumpuser_pth.c,v 1.44 2014/12/16 17:00:17 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_pth.c,v 1.45 2015/09/18 10:56:25 pooka Exp $");
 #endif /* !lint */
 
 #include 
@@ -80,11 +80,11 @@ rumpuser_thread_create(void *(*f)(void *
 		nanosleep(&ts, NULL);
 	}
 
-#if defined(HAVE_PTHREAD_SETNAME_3)
+#if defined(HAVE_PTHREAD_SETNAME3)
 	if (rv == 0 && thrname) {
 		pthread_setname_np(*ptidp, thrname, NULL);
 	}
-#elif defined(HAVE_PTHREAD_SETNAME_2)
+#elif defined(HAVE_PTHREAD_SETNAME2)
 	if (rv == 0 && thrname) {
 		pthread_setname_np(*ptidp, thrname);
 	}