CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Thu Mar 26 08:22:22 UTC 2009 Modified Files: src/sys/rump/librump/rumpvfs: genfs_io.c Log Message: Handle eof a bit differently. E.g. ffs and msdosfs seem to have a quite different opinion about what happens in bmap beyond EOF, so avoid calling it. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpvfs/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/rump/librump/rumpvfs/genfs_io.c diff -u src/sys/rump/librump/rumpvfs/genfs_io.c:1.9 src/sys/rump/librump/rumpvfs/genfs_io.c:1.10 --- src/sys/rump/librump/rumpvfs/genfs_io.c:1.9 Mon Mar 23 11:48:33 2009 +++ src/sys/rump/librump/rumpvfs/genfs_io.c Thu Mar 26 08:22:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.9 2009/03/23 11:48:33 pooka Exp $ */ +/* $NetBSD: genfs_io.c,v 1.10 2009/03/26 08:22:22 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -29,7 +29,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.9 2009/03/23 11:48:33 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: genfs_io.c,v 1.10 2009/03/26 08:22:22 pooka Exp $); #include sys/param.h #include sys/buf.h @@ -376,7 +376,7 @@ mbp = getiobuf(vp, true); mbp-b_bufsize = MAXPHYS; mbp-b_data = datap; - mbp-b_resid = mbp-b_bcount = curoff-smallest; + mbp-b_resid = mbp-b_bcount = MIN(curoff,eof)-smallest; mbp-b_cflags |= BC_BUSY; mbp-b_flags = B_WRITE; if (async) { @@ -388,7 +388,7 @@ mutex_exit(vp-v_interlock); /* then we write */ - for (bufoff = 0; bufoff curoff-smallest; bufoff+=xfersize) { + for (bufoff = 0; bufoff MIN(curoff,eof)-smallest; bufoff+=xfersize) { struct vnode *devvp; daddr_t bn, lbn; size_t iotodo; @@ -419,12 +419,6 @@ iotodo -= (smallest+bufoff+xfersize) - eof; iotodo = (iotodo + DEV_BSIZE-1) ~(DEV_BSIZE-1); - /* - * Compensate for potentially smaller write. This will - * be zero except near eof. - */ - skipbytes += xfersize - iotodo; - KASSERT(iotodo 0); KASSERT(smallest = 0);
CVS commit: [netbsd-5] src/sys/kern
Module Name:src Committed By: snj Date: Thu Mar 26 17:17:31 UTC 2009 Modified Files: src/sys/kern [netbsd-5]: kern_uidinfo.c Log Message: Pull up following revision(s) (requested by ad in ticket #601): sys/kern/kern_uidinfo.c: revision 1.5 uid_init: maxproc - maxcpus To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.6.1 src/sys/kern/kern_uidinfo.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/kern/kern_uidinfo.c diff -u src/sys/kern/kern_uidinfo.c:1.3 src/sys/kern/kern_uidinfo.c:1.3.6.1 --- src/sys/kern/kern_uidinfo.c:1.3 Tue Oct 14 09:17:23 2008 +++ src/sys/kern/kern_uidinfo.c Thu Mar 26 17:17:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_uidinfo.c,v 1.3 2008/10/14 09:17:23 ad Exp $ */ +/* $NetBSD: kern_uidinfo.c,v 1.3.6.1 2009/03/26 17:17:31 snj Exp $ */ /*- * Copyright (c) 1982, 1986, 1991, 1993 @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_uidinfo.c,v 1.3 2008/10/14 09:17:23 ad Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_uidinfo.c,v 1.3.6.1 2009/03/26 17:17:31 snj Exp $); #include sys/param.h #include sys/systm.h @@ -43,6 +43,7 @@ #include sys/proc.h #include sys/atomic.h #include sys/uidinfo.h +#include sys/cpu.h static SLIST_HEAD(uihashhead, uidinfo) *uihashtbl; static u_long uihash; @@ -58,7 +59,7 @@ * write-back for every modified 'uidinfo', thus we try to keep the * lists short. */ - const u_int uihash_sz = (maxproc 1 ? 1024 : 64); + const u_int uihash_sz = (maxcpus 1 ? 1024 : 64); uihashtbl = hashinit(uihash_sz, HASH_SLIST, true, uihash);
CVS commit: src/sys/lib/libkern
Module Name:src Committed By: he Date: Thu Mar 26 22:18:15 UTC 2009 Modified Files: src/sys/lib/libkern: crc32.c Log Message: Make the function declaration the same for the big-endian case as for the little-endian case, and consistent with the libkern.h declaration. Fixes build problem for at least hp700 and evbbarm-eb. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/lib/libkern/crc32.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/lib/libkern/crc32.c diff -u src/sys/lib/libkern/crc32.c:1.3 src/sys/lib/libkern/crc32.c:1.4 --- src/sys/lib/libkern/crc32.c:1.3 Wed Mar 25 19:21:39 2009 +++ src/sys/lib/libkern/crc32.c Thu Mar 26 22:18:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: crc32.c,v 1.3 2009/03/25 19:21:39 tls Exp $ */ +/* $NetBSD: crc32.c,v 1.4 2009/03/26 22:18:14 he Exp $ */ /* crc32.c -- compute the CRC-32 of a data stream * @@ -80,10 +80,7 @@ #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 /* = */ -uint32_t crc32( -uint32_t crc, -const unsigned char *buf, -unsigned len) +uint32_t crc32(uint32_t crc, const uint8_t *buf, size_t len) { register u4 c; register const u4 *buf4;
CVS commit: src/sys/dev/mii
Module Name:src Committed By: cegger Date: Fri Mar 27 04:42:51 UTC 2009 Modified Files: src/sys/dev/mii: atphy.c Log Message: use auto-negotiation for manual media type selection. This should fix establishment of 10/100Mbps link on L1E. Helpful to reduce watchdog timeout problems on L1 (age(4)) reported by Jochen Kunz. From FreeBSD via OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/mii/atphy.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/mii/atphy.c diff -u src/sys/dev/mii/atphy.c:1.4 src/sys/dev/mii/atphy.c:1.5 --- src/sys/dev/mii/atphy.c:1.4 Thu Feb 12 13:38:49 2009 +++ src/sys/dev/mii/atphy.c Fri Mar 27 04:42:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atphy.c,v 1.4 2009/02/12 13:38:49 cegger Exp $ */ +/* $NetBSD: atphy.c,v 1.5 2009/03/27 04:42:50 cegger Exp $ */ /* $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $ */ /*- @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.4 2009/02/12 13:38:49 cegger Exp $); +__KERNEL_RCSID(0, $NetBSD: atphy.c,v 1.5 2009/03/27 04:42:50 cegger Exp $); #include sys/param.h #include sys/systm.h @@ -218,7 +218,8 @@ /* * Reset the PHY so all changes take effect. */ - PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET); + PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_RESET | BMCR_AUTOEN | + BMCR_STARTNEG); done: break;