From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 17:03:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8126A106566C; Sun, 14 Jun 2009 17:03:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E5EA8FC08; Sun, 14 Jun 2009 17:03:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EH3xZw054945; Sun, 14 Jun 2009 17:03:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EH3x04054944; Sun, 14 Jun 2009 17:03:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200906141703.n5EH3x04054944@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Jun 2009 17:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194199 - stable/7/bin/chflags X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 17:04:00 -0000 Author: jilles Date: Sun Jun 14 17:03:59 2009 New Revision: 194199 URL: http://svn.freebsd.org/changeset/base/194199 Log: MFC r192687: fix chflags -h PR: bin/131999 Submitted by: bde Approved by: ed (mentor) Modified: stable/7/bin/chflags/ (props changed) stable/7/bin/chflags/chflags.c Modified: stable/7/bin/chflags/chflags.c ============================================================================== --- stable/7/bin/chflags/chflags.c Sun Jun 14 17:00:35 2009 (r194198) +++ stable/7/bin/chflags/chflags.c Sun Jun 14 17:03:59 2009 (r194199) @@ -115,7 +115,7 @@ main(int argc, char *argv[]) fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; /* XXX: Why don't chflags and lchflags have compatible prototypes? */ if (hflag) From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 17:05:55 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F40AE106564A; Sun, 14 Jun 2009 17:05:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E19EC8FC0A; Sun, 14 Jun 2009 17:05:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EH5sTs055023; Sun, 14 Jun 2009 17:05:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EH5sHg055022; Sun, 14 Jun 2009 17:05:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <200906141705.n5EH5sHg055022@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 14 Jun 2009 17:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194200 - stable/7/bin/ps X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 17:05:55 -0000 Author: jilles Date: Sun Jun 14 17:05:54 2009 New Revision: 194200 URL: http://svn.freebsd.org/changeset/base/194200 Log: MFC r192688: fix nonsense in ps etime field for swapped out processes PR: bin/123069 Submitted by: Vladimir Kozbin Approved by: ed (mentor) Modified: stable/7/bin/ps/ (props changed) stable/7/bin/ps/print.c Modified: stable/7/bin/ps/print.c ============================================================================== --- stable/7/bin/ps/print.c Sun Jun 14 17:03:59 2009 (r194199) +++ stable/7/bin/ps/print.c Sun Jun 14 17:05:54 2009 (r194200) @@ -572,6 +572,10 @@ elapsed(KINFO *k, VARENT *ve) char obuff[128]; v = ve->var; + if (!k->ki_valid) { + (void)printf("%-*s", v->width, "-"); + return; + } val = now - k->ki_p->ki_start.tv_sec; days = val / (24 * 60 * 60); val %= 24 * 60 * 60; From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 18:04:22 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6511065670; Sun, 14 Jun 2009 18:04:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9953B8FC18; Sun, 14 Jun 2009 18:04:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EI4MCR056334; Sun, 14 Jun 2009 18:04:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EI4MOO056333; Sun, 14 Jun 2009 18:04:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906141804.n5EI4MOO056333@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Jun 2009 18:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194205 - in stable/7/sys: . contrib/pf dev/ath/ath_hal fs/pseudofs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 18:04:23 -0000 Author: kib Date: Sun Jun 14 18:04:22 2009 New Revision: 194205 URL: http://svn.freebsd.org/changeset/base/194205 Log: MFC r193176: Unlock the pseudofs vnode before calling fill method for pfs_readlink(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/fs/pseudofs/pseudofs_vnops.c Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/7/sys/fs/pseudofs/pseudofs_vnops.c Sun Jun 14 18:01:35 2009 (r194204) +++ stable/7/sys/fs/pseudofs/pseudofs_vnops.c Sun Jun 14 18:04:22 2009 (r194205) @@ -746,9 +746,10 @@ pfs_readlink(struct vop_readlink_args *v struct pfs_node *pn = pvd->pvd_pn; struct uio *uio = va->a_uio; struct proc *proc = NULL; + struct thread *td = curthread; char buf[PATH_MAX]; struct sbuf sb; - int error; + int error, locked; PFS_TRACE(("%s", pn->pn_name)); pfs_assert_not_owned(pn); @@ -770,14 +771,19 @@ pfs_readlink(struct vop_readlink_args *v _PHOLD(proc); PROC_UNLOCK(proc); } + vhold(vn); + locked = VOP_ISLOCKED(vn, td); + VOP_UNLOCK(vn, 0, td); /* sbuf_new() can't fail with a static buffer */ sbuf_new(&sb, buf, sizeof buf, 0); - error = pn_fill(curthread, proc, pn, &sb, NULL); + error = pn_fill(td, proc, pn, &sb, NULL); if (proc != NULL) PRELE(proc); + vn_lock(vn, locked | LK_RETRY, td); + vdrop(vn); if (error) { sbuf_delete(&sb); From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 20:12:13 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42D8B10656B5; Sun, 14 Jun 2009 20:12:13 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30F4E8FC27; Sun, 14 Jun 2009 20:12:13 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EKCDCq059168; Sun, 14 Jun 2009 20:12:13 GMT (envelope-from ps@svn.freebsd.org) Received: (from ps@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EKCDRY059167; Sun, 14 Jun 2009 20:12:13 GMT (envelope-from ps@svn.freebsd.org) Message-Id: <200906142012.n5EKCDRY059167@svn.freebsd.org> From: Paul Saab Date: Sun, 14 Jun 2009 20:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194211 - stable/7/lib/libstand X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 20:12:14 -0000 Author: ps Date: Sun Jun 14 20:12:12 2009 New Revision: 194211 URL: http://svn.freebsd.org/changeset/base/194211 Log: Merge r192679 Increase the number of available file descriptors to 64. This fixes the reported zfsboot problems for systems where more than seven drives are part of ZFS pools. Modified: stable/7/lib/libstand/ (props changed) stable/7/lib/libstand/stand.h Modified: stable/7/lib/libstand/stand.h ============================================================================== --- stable/7/lib/libstand/stand.h Sun Jun 14 19:53:52 2009 (r194210) +++ stable/7/lib/libstand/stand.h Sun Jun 14 20:12:12 2009 (r194211) @@ -167,7 +167,7 @@ struct open_file { #define SOPEN_RASIZE 512 }; -#define SOPEN_MAX 8 +#define SOPEN_MAX 64 extern struct open_file files[]; /* f_flags values */ From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 21:11:39 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1AE1106564A; Sun, 14 Jun 2009 21:11:39 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFFC18FC1E; Sun, 14 Jun 2009 21:11:39 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ELBdSN060526; Sun, 14 Jun 2009 21:11:39 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ELBdWv060525; Sun, 14 Jun 2009 21:11:39 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906142111.n5ELBdWv060525@svn.freebsd.org> From: Kip Macy Date: Sun, 14 Jun 2009 21:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194214 - stable/7 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 21:11:40 -0000 Author: kmacy Date: Sun Jun 14 21:11:39 2009 New Revision: 194214 URL: http://svn.freebsd.org/changeset/base/194214 Log: further clarify ZFS upgrade requirements Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Sun Jun 14 21:04:54 2009 (r194213) +++ stable/7/UPDATING Sun Jun 14 21:11:39 2009 (r194214) @@ -18,7 +18,8 @@ portupgrade. 20090520: Update ZFS to version 13. ZFS users will need to re-build - kernel and world. Existing pools will continue to work + and install both kernel and world simultaneously in order + for the ZFS tools to work. Existing pools will continue to work without upgrade. If a pool is upgraded it will no longer be usable by older kernel revs. ZFS send / recv between pool version 6 and pool version 13 is not supported. From owner-svn-src-stable-7@FreeBSD.ORG Sun Jun 14 23:11:09 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B468510656AE; Sun, 14 Jun 2009 23:11:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15638FC1B; Sun, 14 Jun 2009 23:11:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ENB9at064759; Sun, 14 Jun 2009 23:11:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ENB9WI064758; Sun, 14 Jun 2009 23:11:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906142311.n5ENB9WI064758@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 14 Jun 2009 23:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194219 - in stable/7/contrib/groff: . font/devutf8 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 23:11:11 -0000 Author: des Date: Sun Jun 14 23:11:09 2009 New Revision: 194219 URL: http://svn.freebsd.org/changeset/base/194219 Log: merge r192561: fix hyphens. Modified: stable/7/contrib/groff/ (props changed) stable/7/contrib/groff/font/devutf8/R.proto Modified: stable/7/contrib/groff/font/devutf8/R.proto ============================================================================== --- stable/7/contrib/groff/font/devutf8/R.proto Sun Jun 14 22:35:33 2009 (r194218) +++ stable/7/contrib/groff/font/devutf8/R.proto Sun Jun 14 23:11:09 2009 (r194219) @@ -726,7 +726,7 @@ st 24 0 0x220B product 24 0 0x220F coproduct 24 0 0x2210 sum 24 0 0x2211 -\- 24 0 0x2212 +\- 24 0 0x002D mi " -+ 24 0 0x2213 ** 24 0 0x2217 From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 07:17:55 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FE61106564A; Mon, 15 Jun 2009 07:17:55 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD858FC0A; Mon, 15 Jun 2009 07:17:55 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5F7Hteq082408; Mon, 15 Jun 2009 07:17:55 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5F7HtaW082406; Mon, 15 Jun 2009 07:17:55 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906150717.n5F7HtaW082406@svn.freebsd.org> From: Brian Somers Date: Mon, 15 Jun 2009 07:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194234 - stable/7/sbin/fdisk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 07:17:56 -0000 Author: brian Date: Mon Jun 15 07:17:55 2009 New Revision: 194234 URL: http://svn.freebsd.org/changeset/base/194234 Log: MFC: r192745: Enhance the 'p' command so that it understands size qualifiers (K/M/G) and so that it understands '*' as 'DTRT'. PR: 68312 Modified: stable/7/sbin/fdisk/ (props changed) stable/7/sbin/fdisk/fdisk.8 stable/7/sbin/fdisk/fdisk.c Modified: stable/7/sbin/fdisk/fdisk.8 ============================================================================== --- stable/7/sbin/fdisk/fdisk.8 Mon Jun 15 04:31:34 2009 (r194233) +++ stable/7/sbin/fdisk/fdisk.8 Mon Jun 15 07:17:55 2009 (r194234) @@ -372,6 +372,31 @@ starting at sector for .Ar length sectors. +If the +.Ar start +or +.Ar length +is suffixed with a +.Em K , +.Em M +or +.Em G , +it is taken as a +.Em Kilobyte , +.Em Megabyte +or +.Em Gigabyte +measurement respectively. +If the +.Ar start +is given as +.Qq * +it is set to the value of the previous partition end. +If the +.Ar length +is given as +.Qq * +the partition end is set to the end of the disk. .Pp Only those slices explicitly mentioned by these lines are modified; any slice not referenced by a @@ -421,6 +446,17 @@ for 2503871 sectors (note: these numbers downwards to correspond to head and cylinder boundaries): .Pp .Dl "p 1 165 1 2503871" +.Pp +Example: to set slices 1, 2 and 4 to +.Fx +slices, the first being 2 Gigabytes, the second being 10 Gigabytes and the +forth being the remainder of the disk (again, numbers will be rounded +appropriately): +.Pp +.Dl "p 1 165 63 2G" +.Dl "p 2 165 * 10G" +.Dl "p 3 0 0 0" +.Dl "p 4 165 * *" .It Ic a Ar slice Make .Ar slice Modified: stable/7/sbin/fdisk/fdisk.c ============================================================================== --- stable/7/sbin/fdisk/fdisk.c Mon Jun 15 04:31:34 2009 (r194233) +++ stable/7/sbin/fdisk/fdisk.c Mon Jun 15 07:17:55 2009 (r194234) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); int iotest; +#define NOSECTORS ((u_int32_t)-1) #define LBUF 100 static char lbuf[LBUF]; @@ -107,6 +108,7 @@ typedef struct cmd { struct arg { char argtype; int arg_val; + char *arg_str; } args[MAX_ARGS]; } CMD; @@ -1001,16 +1003,23 @@ parse_config_line(char *line, CMD *comma */ while (1) { while (isspace(*cp)) ++cp; + if (*cp == '\0') + break; /* eol */ if (*cp == '#') break; /* found comment */ if (isalpha(*cp)) command->args[command->n_args].argtype = *cp++; - if (!isdigit(*cp)) - break; /* assume end of line */ end = NULL; command->args[command->n_args].arg_val = strtol(cp, &end, 0); - if (cp == end) - break; /* couldn't parse number */ + if (cp == end || (!isspace(*end) && *end != '\0')) { + char ch; + end = cp; + while (!isspace(*end) && *end != '\0') ++end; + ch = *end; *end = '\0'; + command->args[command->n_args].arg_str = strdup(cp); + *end = ch; + } else + command->args[command->n_args].arg_str = NULL; cp = end; command->n_args++; } @@ -1109,6 +1118,33 @@ process_geometry(CMD *command) return (status); } +static u_int32_t +str2sectors(const char *str) +{ + char *end; + unsigned long val; + + val = strtoul(str, &end, 0); + if (str == end || *end == '\0') { + warnx("ERROR line %d: unexpected size: \'%s\'", + current_line_number, str); + return NOSECTORS; + } + + if (*end == 'K') + val *= 1024UL / secsize; + else if (*end == 'M') + val *= 1024UL * 1024UL / secsize; + else if (*end == 'G') + val *= 1024UL * 1024UL * 1024UL / secsize; + else { + warnx("ERROR line %d: unexpected modifier: %c " + "(not K/M/G)", current_line_number, *end); + return NOSECTORS; + } + + return val; +} static int process_partition(CMD *command) @@ -1134,8 +1170,48 @@ process_partition(CMD *command) partp = ((struct dos_partition *) &mboot.parts) + partition - 1; bzero((char *)partp, sizeof (struct dos_partition)); partp->dp_typ = command->args[1].arg_val; - partp->dp_start = command->args[2].arg_val; - partp->dp_size = command->args[3].arg_val; + if (command->args[2].arg_str != NULL) { + if (strcmp(command->args[2].arg_str, "*") == 0) { + int i; + partp->dp_start = dos_sectors; + for (i = 1; i < partition; i++) { + struct dos_partition *prev_partp; + prev_partp = ((struct dos_partition *) + &mboot.parts) + i - 1; + if (prev_partp->dp_typ != 0) + partp->dp_start = prev_partp->dp_start + + prev_partp->dp_size; + } + if (partp->dp_start % dos_sectors != 0) { + prev_head_boundary = partp->dp_start / + dos_sectors * dos_sectors; + partp->dp_start = prev_head_boundary + + dos_sectors; + } + } else { + partp->dp_start = str2sectors(command->args[2].arg_str); + if (partp->dp_start == NOSECTORS) + break; + } + } else + partp->dp_start = command->args[2].arg_val; + + if (command->args[3].arg_str != NULL) { + if (strcmp(command->args[3].arg_str, "*") == 0) + partp->dp_size = ((disksecs / dos_cylsecs) * + dos_cylsecs) - partp->dp_start; + else { + partp->dp_size = str2sectors(command->args[3].arg_str); + if (partp->dp_size == NOSECTORS) + break; + } + prev_cyl_boundary = ((partp->dp_start + partp->dp_size) / + dos_cylsecs) * dos_cylsecs; + if (prev_cyl_boundary > partp->dp_start) + partp->dp_size = prev_cyl_boundary - partp->dp_start; + } else + partp->dp_size = command->args[3].arg_val; + max_end = partp->dp_start + partp->dp_size; if (partp->dp_typ == 0) { From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 07:24:17 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80779106566B; Mon, 15 Jun 2009 07:24:17 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534E28FC08; Mon, 15 Jun 2009 07:24:17 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5F7OH4F082659; Mon, 15 Jun 2009 07:24:17 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5F7OHtp082658; Mon, 15 Jun 2009 07:24:17 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906150724.n5F7OHtp082658@svn.freebsd.org> From: Brian Somers Date: Mon, 15 Jun 2009 07:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194235 - stable/7/sbin/dhclient X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 07:24:18 -0000 Author: brian Date: Mon Jun 15 07:24:16 2009 New Revision: 194235 URL: http://svn.freebsd.org/changeset/base/194235 Log: MFC: r193765: Fix an off by one error when we limit append/prepend text sizes based on our internal buffer sizes. When we 'append', assume we're appending to text. Some MS dhcp servers will give us a string with the length including the trailing NUL. when we 'append domain-name', we get something like "search x.y\000 z" in resolv.conf :( Modified: stable/7/sbin/dhclient/ (props changed) stable/7/sbin/dhclient/dhclient.c Modified: stable/7/sbin/dhclient/dhclient.c ============================================================================== --- stable/7/sbin/dhclient/dhclient.c Mon Jun 15 07:17:55 2009 (r194234) +++ stable/7/sbin/dhclient/dhclient.c Mon Jun 15 07:24:16 2009 (r194235) @@ -1977,7 +1977,7 @@ supersede: len = ip->client-> config->defaults[i].len + lease->options[i].len; - if (len > sizeof(dbuf)) { + if (len >= sizeof(dbuf)) { warning("no space to %s %s", "prepend option", dhcp_options[i].name); @@ -1996,24 +1996,34 @@ supersede: dp[len] = '\0'; break; case ACTION_APPEND: + /* + * When we append, we assume that we're + * appending to text. Some MS servers + * include a NUL byte at the end of + * the search string provided. + */ len = ip->client-> config->defaults[i].len + lease->options[i].len; - if (len > sizeof(dbuf)) { + if (len >= sizeof(dbuf)) { warning("no space to %s %s", "append option", dhcp_options[i].name); goto supersede; } - dp = dbuf; - memcpy(dp, + memcpy(dbuf, lease->options[i].data, lease->options[i].len); - memcpy(dp + lease->options[i].len, + for (dp = dbuf + lease->options[i].len; + dp > dbuf; dp--, len--) + if (dp[-1] != '\0') + break; + memcpy(dp, ip->client-> config->defaults[i].data, ip->client-> config->defaults[i].len); + dp = dbuf; dp[len] = '\0'; } } else { From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 13:17:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E47106566B; Mon, 15 Jun 2009 13:17:05 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 559618FC24; Mon, 15 Jun 2009 13:17:05 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FDH575090679; Mon, 15 Jun 2009 13:17:05 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FDH5cE090678; Mon, 15 Jun 2009 13:17:05 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <200906151317.n5FDH5cE090678@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Mon, 15 Jun 2009 13:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194236 - in stable/7/sys: . contrib/pf dev/ath/ath_hal netipsec X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 13:17:06 -0000 Author: vanhu Date: Mon Jun 15 13:17:05 2009 New Revision: 194236 URL: http://svn.freebsd.org/changeset/base/194236 Log: MFC: Lock SPTREE before parsing it in key_spddump() Obtained from: NETASQ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/netipsec/key.c Modified: stable/7/sys/netipsec/key.c ============================================================================== --- stable/7/sys/netipsec/key.c Mon Jun 15 07:24:16 2009 (r194235) +++ stable/7/sys/netipsec/key.c Mon Jun 15 13:17:05 2009 (r194236) @@ -2363,14 +2363,17 @@ key_spddump(so, m, mhp) /* search SPD entry and get buffer size. */ cnt = 0; + SPTREE_LOCK(); for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { LIST_FOREACH(sp, &sptree[dir], chain) { cnt++; } } - if (cnt == 0) + if (cnt == 0) { + SPTREE_UNLOCK(); return key_senderror(so, m, ENOENT); + } for (dir = 0; dir < IPSEC_DIR_MAX; dir++) { LIST_FOREACH(sp, &sptree[dir], chain) { @@ -2383,6 +2386,7 @@ key_spddump(so, m, mhp) } } + SPTREE_UNLOCK(); m_freem(m); return 0; } From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 13:48:31 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982361065675; Mon, 15 Jun 2009 13:48:31 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84D7F8FC15; Mon, 15 Jun 2009 13:48:31 +0000 (UTC) (envelope-from vanhu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FDmVUC091396; Mon, 15 Jun 2009 13:48:31 GMT (envelope-from vanhu@svn.freebsd.org) Received: (from vanhu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FDmVda091395; Mon, 15 Jun 2009 13:48:31 GMT (envelope-from vanhu@svn.freebsd.org) Message-Id: <200906151348.n5FDmVda091395@svn.freebsd.org> From: VANHULLEBUS Yvan Date: Mon, 15 Jun 2009 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194238 - in stable/7/sys: . contrib/pf crypto/via dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 13:48:32 -0000 Author: vanhu Date: Mon Jun 15 13:48:31 2009 New Revision: 194238 URL: http://svn.freebsd.org/changeset/base/194238 Log: MFC: Changed to M_NOWAIT when reallocing psc_buf in padlock_sha_update(), as we already hold the non sleepable crypto_driver_mutex. Obtained from: NETASQ Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/crypto/via/padlock_hash.c stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/crypto/via/padlock_hash.c ============================================================================== --- stable/7/sys/crypto/via/padlock_hash.c Mon Jun 15 13:47:49 2009 (r194237) +++ stable/7/sys/crypto/via/padlock_hash.c Mon Jun 15 13:48:31 2009 (r194238) @@ -171,7 +171,9 @@ padlock_sha_update(struct padlock_sha_ct if (ctx->psc_size - ctx->psc_offset < bufsize) { ctx->psc_size = MAX(ctx->psc_size * 2, ctx->psc_size + bufsize); ctx->psc_buf = realloc(ctx->psc_buf, ctx->psc_size, M_PADLOCK, - M_WAITOK); + M_NOWAIT); + if(ctx->psc_buf == NULL) + return (ENOMEM); } bcopy(buf, ctx->psc_buf + ctx->psc_offset, bufsize); ctx->psc_offset += bufsize; From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 19:15:28 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDC0A106566C; Mon, 15 Jun 2009 19:15:28 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB24A8FC14; Mon, 15 Jun 2009 19:15:28 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FJFSdU098711; Mon, 15 Jun 2009 19:15:28 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FJFShx098710; Mon, 15 Jun 2009 19:15:28 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200906151915.n5FJFShx098710@svn.freebsd.org> From: Nick Hibma Date: Mon, 15 Jun 2009 19:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194253 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 19:15:29 -0000 Author: n_hibma Date: Mon Jun 15 19:15:28 2009 New Revision: 194253 URL: http://svn.freebsd.org/changeset/base/194253 Log: Hide 'Unsupported ATAPI command - trying anyway' under bootverbose. This caused more noise than was actually useful. Modified: stable/7/sys/dev/usb/umass.c Modified: stable/7/sys/dev/usb/umass.c ============================================================================== --- stable/7/sys/dev/usb/umass.c Mon Jun 15 19:01:53 2009 (r194252) +++ stable/7/sys/dev/usb/umass.c Mon Jun 15 19:15:28 2009 (r194253) @@ -3529,9 +3529,10 @@ umass_atapi_transform(struct umass_softc case READ_12: case WRITE_12: default: - printf("%s: Unsupported ATAPI command 0x%02x" - " - trying anyway\n", - device_get_nameunit(sc->sc_dev), cmd[0]); + if (bootverbose) + printf("%s: Unsupported ATAPI command 0x%02x" + " - trying anyway\n", + device_get_nameunit(sc->sc_dev), cmd[0]); memcpy(*rcmd, cmd, cmdlen); return 1; } From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 19:16:24 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6BA106566B; Mon, 15 Jun 2009 19:16:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1EA88FC32; Mon, 15 Jun 2009 19:16:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FJGOSx098777; Mon, 15 Jun 2009 19:16:24 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FJGOQj098776; Mon, 15 Jun 2009 19:16:24 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906151916.n5FJGOQj098776@svn.freebsd.org> From: John Baldwin Date: Mon, 15 Jun 2009 19:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194254 - in stable/7/sys: . boot/i386/libi386 contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 19:16:25 -0000 Author: jhb Date: Mon Jun 15 19:16:24 2009 New Revision: 194254 URL: http://svn.freebsd.org/changeset/base/194254 Log: MFC: Pack PnP structures instead of individual fields. Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/biospnp.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/boot/i386/libi386/biospnp.c ============================================================================== --- stable/7/sys/boot/i386/libi386/biospnp.c Mon Jun 15 19:15:28 2009 (r194253) +++ stable/7/sys/boot/i386/libi386/biospnp.c Mon Jun 15 19:16:24 2009 (r194254) @@ -49,38 +49,38 @@ struct pnphandler biospnphandler = struct pnp_ICstructure { - u_int8_t pnp_signature[4] __packed; - u_int8_t pnp_version __packed; - u_int8_t pnp_length __packed; - u_int16_t pnp_BIOScontrol __packed; - u_int8_t pnp_checksum __packed; - u_int32_t pnp_eventflag __packed; - u_int16_t pnp_rmip __packed; - u_int16_t pnp_rmcs __packed; - u_int16_t pnp_pmip __packed; - u_int32_t pnp_pmcs __packed; - u_int8_t pnp_OEMdev[4] __packed; - u_int16_t pnp_rmds __packed; - u_int32_t pnp_pmds __packed; -}; + u_int8_t pnp_signature[4]; + u_int8_t pnp_version; + u_int8_t pnp_length; + u_int16_t pnp_BIOScontrol; + u_int8_t pnp_checksum; + u_int32_t pnp_eventflag; + u_int16_t pnp_rmip; + u_int16_t pnp_rmcs; + u_int16_t pnp_pmip; + u_int32_t pnp_pmcs; + u_int8_t pnp_OEMdev[4]; + u_int16_t pnp_rmds; + u_int32_t pnp_pmds; +} __packed; struct pnp_devNode { - u_int16_t dn_size __packed; - u_int8_t dn_handle __packed; - u_int8_t dn_id[4] __packed; - u_int8_t dn_type[3] __packed; - u_int16_t dn_attrib __packed; - u_int8_t dn_data[1] __packed; -}; + u_int16_t dn_size; + u_int8_t dn_handle; + u_int8_t dn_id[4]; + u_int8_t dn_type[3]; + u_int16_t dn_attrib; + u_int8_t dn_data[1]; +} __packed; struct pnp_isaConfiguration { - u_int8_t ic_revision __packed; - u_int8_t ic_nCSN __packed; - u_int16_t ic_rdport __packed; - u_int16_t ic_reserved __packed; -}; + u_int8_t ic_revision; + u_int8_t ic_nCSN; + u_int16_t ic_rdport; + u_int16_t ic_reserved; +} __packed; static struct pnp_ICstructure *pnp_Icheck = NULL; static u_int16_t pnp_NumNodes; From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 19:26:34 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A02741065678; Mon, 15 Jun 2009 19:26:34 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8ADA28FC13; Mon, 15 Jun 2009 19:26:34 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FJQYuv099131; Mon, 15 Jun 2009 19:26:34 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FJQYAN099129; Mon, 15 Jun 2009 19:26:34 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200906151926.n5FJQYAN099129@svn.freebsd.org> From: Nick Hibma Date: Mon, 15 Jun 2009 19:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194258 - stable/7/sys/dev/usb X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 19:26:35 -0000 Author: n_hibma Date: Mon Jun 15 19:26:34 2009 New Revision: 194258 URL: http://svn.freebsd.org/changeset/base/194258 Log: Rearrange the init code in the stub driver, using a task to initialise the card. This allows better error handling and re-issuing of commands if one fails. Implement another initialisation sequence used buy the ZTE_STOR variants. Fix a bug where the driver would panic during initialisation reported by many (Mike Tancsa amongst others). Testing done and hardware supplied by belkin (a person, not the company). Modified: stable/7/sys/dev/usb/u3g.c stable/7/sys/dev/usb/usbdevs Modified: stable/7/sys/dev/usb/u3g.c ============================================================================== --- stable/7/sys/dev/usb/u3g.c Mon Jun 15 19:24:47 2009 (r194257) +++ stable/7/sys/dev/usb/u3g.c Mon Jun 15 19:26:34 2009 (r194258) @@ -53,8 +53,8 @@ //#define U3G_DEBUG #ifdef U3G_DEBUG -#define DPRINTF(x...) do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0) -int u3gdebug = 1; +#define DPRINTF(x...) device_printf(sc->sc_dev, ##x) +#define bootverbose (1) #else #define DPRINTF(x...) /* nop */ #endif @@ -67,7 +67,7 @@ struct u3g_softc { device_t sc_dev; usbd_device_handle sc_udev; u_int8_t sc_speed; - u_int8_t sc_flags; + u_int8_t sc_init; u_char sc_numports; }; @@ -117,81 +117,83 @@ static const struct u3g_speeds_s u3g_spe struct u3g_dev_type_s { struct usb_devno devno; u_int8_t speed; - u_int8_t flags; -#define U3GFL_NONE 0x00 -#define U3GFL_HUAWEI_INIT 0x01 // Requires init command (Huawei cards) -#define U3GFL_SCSI_EJECT 0x02 // Requires SCSI eject command (Novatel) -#define U3GFL_SIERRA_INIT 0x04 // Requires init command (Sierra cards) -#define U3GFL_CMOTECH_INIT 0x08 // Requires init command (CMOTECH cards) -#define U3GFL_STUB_WAIT 0x80 // Device reappears after a short delay + u_int8_t init; +#define U3GINIT_NONE 0 +#define U3GINIT_HUAWEI 1 // Requires init command (Huawei) +#define U3GINIT_SIERRA 2 // Requires init command (Sierra) +#define U3GINIT_EJECT 3 // Requires SCSI eject command (Novatel, Qualcomm) +#define U3GINIT_ZTESTOR 4 // Requires SCSI command (ZTE STOR) +#define U3GINIT_CMOTECH 5 // Requires init command (CMOTECH) +#define U3GINIT_WAIT 6 // Device reappears after a short delay (none) }; // Note: The entries marked with XXX should be checked for the correct speed // indication to set the buffer sizes. static const struct u3g_dev_type_s u3g_devs[] = { /* OEM: Option */ - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3G }, U3GSP_UMTS, U3GFL_NONE }, - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GQUAD }, U3GSP_UMTS, U3GFL_NONE }, - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS }, U3GSP_UMTS, U3GFL_NONE }, - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, U3GSP_HSDPA, U3GFL_NONE }, - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA }, U3GSP_HSDPA, U3GFL_NONE }, - {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, U3GSP_UMTS, U3GFL_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3G }, U3GSP_UMTS, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GQUAD }, U3GSP_UMTS, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GT3GPLUS }, U3GSP_UMTS, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36 }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA }, U3GSP_HSDPA, U3GINIT_NONE }, + {{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G }, U3GSP_UMTS, U3GINIT_NONE }, /* OEM: Qualcomm, Inc. */ - {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR }, U3GSP_CDMA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM }, U3GSP_CDMA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR }, U3GSP_CDMA, U3GINIT_ZTESTOR }, + {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM }, U3GSP_CDMA, U3GINIT_EJECT }, + {{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_MSM }, U3GSP_CDMA, U3GINIT_NONE }, /* OEM: Huawei */ - {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, U3GSP_HSDPA, U3GFL_HUAWEI_INIT }, - {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GFL_HUAWEI_INIT }, + {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, U3GSP_HSDPA, U3GINIT_HUAWEI }, + {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GINIT_HUAWEI }, /* OEM: Novatel */ - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V720 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_X950D }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_XU870 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ZEROCD }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, - {{ USB_VENDOR_DELL, USB_PRODUCT_DELL_U740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740 }, U3GSP_HSDPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2 }, U3GSP_HSDPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V720 }, U3GSP_UMTS, U3GINIT_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V740 }, U3GSP_HSDPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_X950D }, U3GSP_HSUPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_XU870 }, U3GSP_HSDPA, U3GINIT_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ZEROCD }, U3GSP_HSUPA, U3GINIT_EJECT }, + {{ USB_VENDOR_DELL, USB_PRODUCT_DELL_U740 }, U3GSP_HSDPA, U3GINIT_EJECT }, /* OEM: Merlin */ - {{ USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 }, U3GSP_UMTS, U3GFL_NONE }, // XXX + {{ USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX /* OEM: Sierra Wireless: */ - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD580 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD595 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC595U }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC597E }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_C597 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880E }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880U }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881E }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881U }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720_2 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5725 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MINI5725 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD875 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_2 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_3 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8765 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC875U }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8775_2 }, U3GSP_HSDPA, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8780 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781 }, U3GSP_UMTS, U3GFL_NONE }, // XXX - {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_TRUINSTALL }, U3GSP_UMTS, U3GFL_SIERRA_INIT }, - {{ USB_VENDOR_HP, USB_PRODUCT_HP_HS2300 }, U3GSP_HSDPA, U3GFL_NONE }, + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD580 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD595 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC595U }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC597E }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_C597 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880E }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880U }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881E }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC881U }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720_2 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5725 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MINI5725 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AIRCARD875 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_2 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8755_3 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8765 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC875U }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8775_2 }, U3GSP_HSDPA, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8780 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781 }, U3GSP_UMTS, U3GINIT_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_TRUINSTALL }, U3GSP_UMTS, U3GINIT_SIERRA }, + {{ USB_VENDOR_HP, USB_PRODUCT_HP_HS2300 }, U3GSP_HSDPA, U3GINIT_NONE }, /* OEM: CMOTECH */ - {{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CGU628 }, U3GSP_HSDPA, U3GFL_CMOTECH_INIT }, - {{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_DISK }, U3GSP_HSDPA, U3GFL_NONE }, + {{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CGU628 }, U3GSP_HSDPA, U3GINIT_CMOTECH }, + {{ USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_DISK }, U3GSP_HSDPA, U3GINIT_NONE }, }; #define u3g_lookup(v, p) ((const struct u3g_dev_type_s *)usb_lookup(u3g_devs, v, p)) @@ -208,16 +210,13 @@ u3g_match(device_t self) if (!u3g_dev_type) return UMATCH_NONE; - if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT) { - /* If the interface class of the first interface is no longer - * mass storage the card has changed to modem (see u3g_attach() - * below). - */ - usb_interface_descriptor_t *id; - id = usbd_get_interface_descriptor(uaa->iface); - if (!id || id->bInterfaceClass == UICLASS_MASS) - return UMATCH_NONE; - } + /* If the interface class of the first interface is no longer + * mass storage the card has changed to modem. + */ + usb_interface_descriptor_t *id; + id = usbd_get_interface_descriptor(uaa->iface); + if (!id || id->bInterfaceClass == UICLASS_MASS) + return UMATCH_NONE; return UMATCH_VENDOR_PRODUCT_CONF_IFACE; } @@ -253,7 +252,7 @@ u3g_attach(device_t self) sc->sc_udev = dev; u3g_dev_type = u3g_lookup(uaa->vendor, uaa->product); - sc->sc_flags = u3g_dev_type->flags; + sc->sc_init = u3g_dev_type->init; sc->sc_speed = u3g_dev_type->speed; sprintf(devnamefmt,"U%d.%%d", device_get_unit(self)); @@ -269,12 +268,10 @@ u3g_attach(device_t self) * Claim the first umass device (cdX) as it contains * only Windows drivers anyway (CD-ROM), hiding it. */ -#ifndef U3G_DEBUG if (!bootverbose) if (uaa->vendor == USB_VENDOR_HUAWEI) if (id->bInterfaceNumber == 2) uaa->ifaces[i] = NULL; -#endif continue; } @@ -402,9 +399,6 @@ u3g_close(void *addr, int portno) struct u3g_softc *sc = addr; struct ucom_softc *ucom = &sc->sc_ucom[portno]; struct tty *tp = ucom->sc_tty; -#ifdef U3G_DEBUG - device_t self = sc->sc_dev; -#endif tp->t_ispeedwat = (speed_t)-1; tp->t_ospeedwat = (speed_t)-1; @@ -441,227 +435,271 @@ MODULE_VERSION(u3g, 1); struct u3gstub_softc { device_t sc_dev; usbd_device_handle sc_udev; + usbd_interface_handle sc_iface; usbd_pipe_handle sc_pipe_out, sc_pipe_in; usbd_xfer_handle sc_xfer; -}; + int sc_vendor; + int sc_product; -static int -u3gstub_huawei_init(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) -{ - usb_device_request_t req; + struct usb_task sc_task; - req.bmRequestType = UT_WRITE_DEVICE; - req.bRequest = UR_SET_FEATURE; - USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); - USETW(req.wIndex, UHF_PORT_SUSPEND); - USETW(req.wLength, 0); + u_char sc_dying; +}; - (void) usbd_do_request(uaa->device, &req, 0); /* ignore any error */ +/* See definition of umass_bbb_cbw_t in sys/dev/usb/umass.c for the SCSI/ATAPI command structs below. + */ - return 1; -} +/* + * See struct scsi_test_unit_ready in sys/cam/scsi/scsi_all.h . + */ +static unsigned char scsi_test_unit_ready[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x00, /* 12: CBW Flag: input */ + 0x00, /* 13: CBW Lun */ + 0x0c, /* 14: CBW Length */ + + 0x00, /* 15+0: opcode: SCSI TEST UNIT READY*/ + 0x00, /* 15+1: byte2: Not immediate */ + 0x00, 0x00, /* 15+2..3: reserved */ + 0x00, /* 15+4: Load/Eject command */ + 0x00, /* 15+5: control */ + 0x00, 0x00, 0x00, 0x00, /* 15+6..15: unused */ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 +}; -static void -u3gstub_BBB_cb(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status err) +/* + * See struct scsi_start_stop_unit in sys/cam/scsi/scsi_all.h . + */ +static unsigned char scsi_start_stop_unit[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x00, /* 12: CBW Flag: input */ + 0x00, /* 13: CBW Lun */ + 0x0c, /* 14: CBW Length */ + + 0x1b, /* 15+0: opcode: SCSI START/STOP */ + 0x00, /* 15+1: byte2: Not immediate */ + 0x00, 0x00, /* 15+2..3: reserved */ + 0x02, /* 15+4: Load/Eject command */ + 0x00, /* 15+5: control */ + 0x00, 0x00, 0x00, 0x00, /* 15+6..15: unused */ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 +}; + +static unsigned char ztestor_cmd[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x00, /* 12: CBW Flag: input */ + 0x00, /* 13: CBW Lun */ + 0x0c, /* 14: CBW Length */ + + 0x85, /* 15+0: opcode */ + 0x01, /* 15+1: byte2 */ + 0x01, 0x01, /* 15+2..3 */ + 0x18, /* 15+4: */ + 0x01, /* 15+5: */ + 0x01, 0x01, 0x01, 0x01, /* 15+6..15: */ + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00 +}; + +static unsigned char cmotech_cmd[31] = { + 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ + 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ + 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ + 0x80, /* 12: CBW Flag: output, so 0 */ + 0x00, /* 13: CBW Lun */ + 0x08, /* 14: CBW Length */ /* XXX Is this correct? Not 6,10,12, or 20? */ + + 0xff, /* 15+0 */ + 0x52, /* 15+1 */ + 0x44, /* 15+2 */ + 0x45, /* 15+2 */ + 0x56, /* 15+4 */ + 0x43, /* 15+5 */ + 0x48, /* 15+5 */ + 0x47, /* 15+5 */ + 0x00, 0x00, 0x00, 0x00, /* 15+8..15: unused */ + 0x00, 0x00, 0x00, 0x00 +}; + + +/*! + * \brief Execute a command over BBB protocol (see umass driver). + * \param sc softc + * \param cmd 31 byte CBW buffer + * \returns 0 if transfer was cancelled, 1 otherwise. + * \note If 0 is returned detach was probably called and no data from the + * softc should be touched. + */ +static int +u3gstub_BBB_cmd(struct u3gstub_softc *sc, unsigned char *cmd) { - struct u3gstub_softc *sc = (struct u3gstub_softc *) priv; - unsigned char cmd[13]; + int err; - if (err) { + DPRINTF("Sending CBW\n"); + usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe_out, sc, + cmd, 31 /* CBW len */, + 0, USBD_DEFAULT_TIMEOUT, NULL); + err = usbd_sync_transfer(sc->sc_xfer); + + if (err == USBD_CANCELLED) { + return 0; + } else if (err == USBD_STALLED) { + DPRINTF("Sending CBW, STALLED\n"); + err = usbd_clear_endpoint_stall(sc->sc_pipe_out); + if (err != USBD_NORMAL_COMPLETION) { + device_printf(sc->sc_dev, + "Failed to send CBW to " + "change to modem mode, " + "clear endpoint stall failed: %s\n", + usbd_errstr(err)); + } + } else if (err) { device_printf(sc->sc_dev, - "Failed to send CD eject command to " - "change to modem mode\n"); + "Failed to send CBW to " + "change to modem mode: %s\n", + usbd_errstr(err)); } else { - usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe_in, NULL, cmd, sizeof(cmd), + DPRINTF("Reading CSW\n"); + usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe_in, sc, + cmd, sizeof(cmd), 0, USBD_DEFAULT_TIMEOUT, NULL); - int err = usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION; - if (err != USBD_NORMAL_COMPLETION && err != USBD_IN_PROGRESS) - DPRINTF("failed to start transfer (CSW)\n"); + err = usbd_sync_transfer(sc->sc_xfer); + if (err == USBD_CANCELLED) { + return 0; + } else if (err == USBD_STALLED) { + DPRINTF("Reading CSW, STALLED\n"); + err = usbd_clear_endpoint_stall(sc->sc_pipe_out); + if (err != USBD_NORMAL_COMPLETION) { + device_printf(sc->sc_dev, + "Failed to retrieve CSW to " + "change to modem mode, " + "clear endpoint stall failed: %s\n", + usbd_errstr(err)); + } + } else if (err != USBD_NORMAL_COMPLETION) { + if (bootverbose) + device_printf(sc->sc_dev, + "Failed to retrieve CSW to " + "change to modem mode: %s\n", + usbd_errstr(err)); + } } + + return 1; } static int -u3gstub_scsi_eject(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) +u3gstub_sierra_init(struct u3gstub_softc *sc) { - /* See definition of umass_bbb_cbw_t in sys/dev/usb/umass.c and struct - * scsi_start_stop_unit in sys/cam/scsi/scsi_all.h . - */ - unsigned char cmd[31] = { - 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ - 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ - 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ - 0x00, /* 12: CBW Flag: output */ - 0x00, /* 13: CBW Lun */ - 0x06, /* 14: CBW Length */ - - 0x1b, /* 15+0: opcode: SCSI START/STOP */ - 0x00, /* 15+1: byte2: Not immediate */ - 0x00, 0x00, /* 15+2..3: reserved */ - 0x02, /* 15+4: Load/Eject command */ - 0x00, /* 15+5: control */ - 0x00, 0x00, 0x00, 0x00, /* 15+6..15: unused */ - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00 - }; - - usb_interface_descriptor_t *id; - usb_endpoint_descriptor_t *ed = NULL; - int i; + usb_device_request_t req; + int err; + req.bmRequestType = UT_VENDOR; + req.bRequest = UR_SET_INTERFACE; + USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); + USETW(req.wIndex, UHF_PORT_CONNECTION); + USETW(req.wLength, 0); - /* Find the bulk-out endpoints */ - id = usbd_get_interface_descriptor(uaa->iface); - for (i = 0 ; i < id->bNumEndpoints; i++) { - ed = usbd_interface2endpoint_descriptor(uaa->iface, i); - if (ed != NULL - && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) { - if (usbd_open_pipe(uaa->iface, - ed->bEndpointAddress, - USBD_EXCLUSIVE_USE, - &sc->sc_pipe_out) - != USBD_NORMAL_COMPLETION) { - DPRINTF("failed to open bulk-out pipe on endpoint %d\n", - ed->bEndpointAddress); - return 0; - } - } else { - if (usbd_open_pipe(uaa->iface, - ed->bEndpointAddress, - USBD_EXCLUSIVE_USE, - &sc->sc_pipe_in) - != USBD_NORMAL_COMPLETION) { - DPRINTF("failed to open bulk-in pipe on endpoint %d\n", - ed->bEndpointAddress); - return 0; - } - } + err = usbd_do_request(sc->sc_udev, &req, 0); + if (bootverbose) { + if (err) { + device_printf(sc->sc_dev, + "Failed to send Sierra request: %s\n", + usbd_errstr(err)); } - if (sc->sc_pipe_out && sc->sc_pipe_in) - break; - } - - if (i == id->bNumEndpoints) { - DPRINTF("failed to find bulk-out pipe\n"); - return 0; - } - - sc->sc_xfer = usbd_alloc_xfer(uaa->device); - if (sc->sc_xfer == NULL) { - DPRINTF("failed to allocate xfer\n"); - return 0; - } - - usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe_out, NULL, cmd, sizeof(cmd), - 0, USBD_DEFAULT_TIMEOUT, u3gstub_BBB_cb); - int err = usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION; - if (err != USBD_NORMAL_COMPLETION && err != USBD_IN_PROGRESS) { - DPRINTF("failed to start transfer (CBW)\n"); - return 0; } return 1; } static int -u3gstub_cmotech_init(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) +u3gstub_huawei_init(struct u3gstub_softc *sc) { - /* See definition of umass_bbb_cbw_t in sys/dev/usb/umass.c - * in sys/cam/scsi/scsi_all.h . - */ - unsigned char cmd[31] = { - 0x55, 0x53, 0x42, 0x43, /* 0..3: Command Block Wrapper (CBW) signature */ - 0x01, 0x00, 0x00, 0x00, /* 4..7: CBW Tag, unique 32-bit number */ - 0x00, 0x00, 0x00, 0x00, /* 8..11: CBW Transfer Length, no data here */ - 0x80, /* 12: CBW Flag: output, so 0 */ - 0x00, /* 13: CBW Lun */ - 0x08, /* 14: CBW Length */ - - 0xff, /* 15+0 */ - 0x52, /* 15+1 */ - 0x44, /* 15+2 */ - 0x45, /* 15+2 */ - 0x56, /* 15+4 */ - 0x43, /* 15+5 */ - 0x48, /* 15+5 */ - 0x47, /* 15+5 */ - 0x00, 0x00, 0x00, 0x00, /* 15+8..15: unused */ - 0x00, 0x00, 0x00, 0x00 - }; - - usb_interface_descriptor_t *id; - usb_endpoint_descriptor_t *ed = NULL; - int i; + usb_device_request_t req; + int err; + req.bmRequestType = UT_WRITE_DEVICE; + req.bRequest = UR_SET_FEATURE; + USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); + USETW(req.wIndex, UHF_PORT_SUSPEND); + USETW(req.wLength, 0); - /* Find the bulk-out endpoints */ - id = usbd_get_interface_descriptor(uaa->iface); - for (i = 0 ; i < id->bNumEndpoints ; i++) { - ed = usbd_interface2endpoint_descriptor(uaa->iface, i); - if (ed != NULL - && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) { - if (usbd_open_pipe(uaa->iface, - ed->bEndpointAddress, - USBD_EXCLUSIVE_USE, - &sc->sc_pipe_out) - != USBD_NORMAL_COMPLETION) { - DPRINTF("failed to open bulk-out pipe on endpoint %d\n", - ed->bEndpointAddress); - return 0; - } - } else { - if (usbd_open_pipe(uaa->iface, - ed->bEndpointAddress, - USBD_EXCLUSIVE_USE, - &sc->sc_pipe_in) - != USBD_NORMAL_COMPLETION) { - DPRINTF("failed to open bulk-in pipe on endpoint %d\n", - ed->bEndpointAddress); - return 0; - } - } + err = usbd_do_request(sc->sc_udev, &req, 0); + if (bootverbose) { + if (err) { + device_printf(sc->sc_dev, + "Failed to send Huawei request: %s\n", + usbd_errstr(err)); } - if (sc->sc_pipe_out && sc->sc_pipe_in) - break; - } - - if (i == id->bNumEndpoints) { - DPRINTF("failed to find bulk-out pipe\n"); - return 0; - } - - sc->sc_xfer = usbd_alloc_xfer(uaa->device); - if (sc->sc_xfer == NULL) { - DPRINTF("failed to allocate xfer\n"); - return 0; - } - - usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe_out, NULL, cmd, sizeof(cmd), - 0, USBD_DEFAULT_TIMEOUT, u3gstub_BBB_cb); - int err = usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION; - if (err != USBD_NORMAL_COMPLETION && err != USBD_IN_PROGRESS) { - DPRINTF("failed to start transfer (CBW)\n"); - return 0; } return 1; } -static int -u3gstub_sierra_init(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) +/*! + * \brief Execute the requested init command for the device. + * \param priv u3gstub_softc + * + * This is implemented as a task so we can do synchronous transfers. + */ +static void +u3gstub_do_init(void *priv) { - usb_device_request_t req; - - req.bmRequestType = UT_VENDOR; - req.bRequest = UR_SET_INTERFACE; - USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); - USETW(req.wIndex, UHF_PORT_CONNECTION); - USETW(req.wLength, 0); - - (void) usbd_do_request(uaa->device, &req, 0); /* ignore any error */ + struct u3gstub_softc *sc = priv; + const struct u3g_dev_type_s *u3g_dev_type; - return 1; + u3g_dev_type = u3g_lookup(sc->sc_vendor, sc->sc_product); + switch (u3g_dev_type->init) { + case U3GINIT_HUAWEI: + if (bootverbose) + device_printf(sc->sc_dev, + "changing Huawei modem to modem mode\n"); + u3gstub_huawei_init(sc); + break; + case U3GINIT_SIERRA: + if (bootverbose) + device_printf(sc->sc_dev, + "changing Sierra modem to modem mode\n"); + u3gstub_sierra_init(sc); + break; + case U3GINIT_EJECT: + if (bootverbose) + device_printf(sc->sc_dev, + "sending CD eject command to change to modem mode\n"); + while (!sc->sc_dying + && u3gstub_BBB_cmd(sc, scsi_test_unit_ready) + && u3gstub_BBB_cmd(sc, scsi_start_stop_unit)) + ; /* nop */ + break; + case U3GINIT_ZTESTOR: + if (bootverbose) + device_printf(sc->sc_dev, + "changing ZTE STOR modem to modem mode\n"); + u3gstub_BBB_cmd(sc, ztestor_cmd); + u3gstub_BBB_cmd(sc, scsi_test_unit_ready); + u3gstub_BBB_cmd(sc, scsi_start_stop_unit); + break; + case U3GINIT_CMOTECH: + if (bootverbose) + device_printf(sc->sc_dev, + "changing CMOTECH modem to modem mode\n"); + u3gstub_BBB_cmd(sc, cmotech_cmd); + break; + case U3GINIT_WAIT: + default: + if (bootverbose) + device_printf(sc->sc_dev, + "waiting for modem to change to modem mode\n"); + /* nop */ + } } static int @@ -683,21 +721,15 @@ u3gstub_match(device_t self) if (!u3g_dev_type) return UMATCH_NONE; - if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT - || u3g_dev_type->flags&U3GFL_SCSI_EJECT - || u3g_dev_type->flags&U3GFL_SIERRA_INIT - || u3g_dev_type->flags&U3GFL_CMOTECH_INIT - || u3g_dev_type->flags&U3GFL_STUB_WAIT) { + if (u3g_dev_type->init != U3GINIT_NONE) { /* We assume that if the first interface is still a mass * storage device the device has not yet changed appearance. */ id = usbd_get_interface_descriptor(uaa->iface); if (id && id->bInterfaceNumber == 0 && id->bInterfaceClass == UICLASS_MASS) { -#ifndef U3G_DEBUG if (!bootverbose) device_quiet(self); -#endif return UMATCH_VENDOR_PRODUCT; } @@ -711,52 +743,74 @@ u3gstub_attach(device_t self) { struct u3gstub_softc *sc = device_get_softc(self); struct usb_attach_arg *uaa = device_get_ivars(self); - const struct u3g_dev_type_s *u3g_dev_type; - int i; + usb_interface_descriptor_t *id; + usb_endpoint_descriptor_t *ed; + int i, err; -#ifndef U3G_DEBUG if (!bootverbose) device_quiet(self); -#endif + + for (i = 0; i < uaa->nifaces; i++) + uaa->ifaces[i] = NULL; // claim all interfaces sc->sc_dev = self; sc->sc_udev = uaa->device; + sc->sc_iface = uaa->iface; + sc->sc_vendor = uaa->vendor; + sc->sc_product = uaa->product; - for (i = 0; i < uaa->nifaces; i++) - uaa->ifaces[i] = NULL; // claim all interfaces + sc->sc_xfer = usbd_alloc_xfer(sc->sc_udev); + if (sc->sc_xfer == NULL) { + DPRINTF("failed to allocate xfer\n"); + return ENOMEM; + } - u3g_dev_type = u3g_lookup(uaa->vendor, uaa->product); - if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT) { - if (bootverbose) - device_printf(sc->sc_dev, - "changing Huawei modem to modem mode\n"); - if (!u3gstub_huawei_init(sc, uaa)) - return ENXIO; - } else if (u3g_dev_type->flags&U3GFL_SCSI_EJECT) { - if (bootverbose) - device_printf(sc->sc_dev, "sending CD eject command to " - "change to modem mode\n"); - if (!u3gstub_scsi_eject(sc, uaa)) - return ENXIO; - } else if (u3g_dev_type->flags&U3GFL_SIERRA_INIT) { - if (bootverbose) - device_printf(sc->sc_dev, - "changing Sierra modem to modem mode\n"); - if (!u3gstub_sierra_init(sc, uaa)) - return ENXIO; - } else if (u3g_dev_type->flags&U3GFL_CMOTECH_INIT) { - if (bootverbose) - device_printf(sc->sc_dev, - "changing CMOTECH modem to modem mode\n"); - if (!u3gstub_cmotech_init(sc, uaa)) - return ENXIO; - } else if (u3g_dev_type->flags&U3GFL_STUB_WAIT) { - if (bootverbose) - device_printf(sc->sc_dev, "waiting for modem to change " - "to modem mode\n"); - /* nop */ + /* Find the bulk-out endpoints */ + id = usbd_get_interface_descriptor(sc->sc_iface); + for (i = 0 ; i < id->bNumEndpoints; i++) { + ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); + if (ed != NULL + && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) { + if (!sc->sc_pipe_out + && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT) { + err = usbd_open_pipe(sc->sc_iface, + ed->bEndpointAddress, + USBD_EXCLUSIVE_USE, + &sc->sc_pipe_out); + if (err != USBD_NORMAL_COMPLETION) { + DPRINTF("failed to open bulk-out pipe on endpoint %d\n", + ed->bEndpointAddress); + return 0; + } else { + DPRINTF("opening bulk-in pipe on endpoint %d\n", ed->bEndpointAddress); + } + } else if (!sc->sc_pipe_in + && UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN) { + err = usbd_open_pipe(sc->sc_iface, + ed->bEndpointAddress, + USBD_EXCLUSIVE_USE, + &sc->sc_pipe_in); + if (err != USBD_NORMAL_COMPLETION) { + DPRINTF("failed to open bulk-in pipe on endpoint %d\n", + ed->bEndpointAddress); + return 0; + } else { + DPRINTF("opening bulk-in pipe on endpoint %d\n", ed->bEndpointAddress); + } + } + } + if (sc->sc_pipe_out && sc->sc_pipe_in) + break; } + if (i == id->bNumEndpoints) { + device_printf(sc->sc_dev, "failed to find bulk-out and/or bulk-in pipe\n"); + return ENXIO; + } + + usb_init_task(&sc->sc_task, u3gstub_do_init, sc); + usb_add_task(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER); + return 0; } @@ -764,9 +818,9 @@ static int u3gstub_detach(device_t self) { struct u3gstub_softc *sc = device_get_softc(self); - - if (sc->sc_xfer) - usbd_free_xfer(sc->sc_xfer); + + sc->sc_dying = 1; + usb_rem_task(sc->sc_udev, &sc->sc_task); if (sc->sc_pipe_in) { usbd_abort_pipe(sc->sc_pipe_in); @@ -777,6 +831,9 @@ u3gstub_detach(device_t self) usbd_close_pipe(sc->sc_pipe_out); } + if (sc->sc_xfer) + usbd_free_xfer(sc->sc_xfer); + return 0; } Modified: stable/7/sys/dev/usb/usbdevs ============================================================================== --- stable/7/sys/dev/usb/usbdevs Mon Jun 15 19:24:47 2009 (r194257) +++ stable/7/sys/dev/usb/usbdevs Mon Jun 15 19:26:34 2009 (r194258) @@ -2039,6 +2039,7 @@ product QUALCOMM CDMA_MSM 0x6000 CDMA Te product QUALCOMM2 RWT_FCT 0x3100 RWT FCT-CDMA 2000 1xRTT modem product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem +product QUALCOMMINC ZTE_MSM 0x0031 CDMA Technologies MSM modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 20:12:27 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFD84106566B; Mon, 15 Jun 2009 20:12:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C27178FC17; Mon, 15 Jun 2009 20:12:27 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FKCRPN000359; Mon, 15 Jun 2009 20:12:27 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FKCRsj000356; Mon, 15 Jun 2009 20:12:27 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200906152012.n5FKCRsj000356@svn.freebsd.org> From: Nick Hibma Date: Mon, 15 Jun 2009 20:12:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194261 - in stable/7/sys/modules: acpi/acpi dtrace/dtrace linux X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 20:12:28 -0000 Author: n_hibma Date: Mon Jun 15 20:12:27 2009 New Revision: 194261 URL: http://svn.freebsd.org/changeset/base/194261 Log: Add opt_hwpmc_hooks.h to fix building individual modules from /sys/modules. Modified: stable/7/sys/modules/acpi/acpi/Makefile stable/7/sys/modules/dtrace/dtrace/Makefile stable/7/sys/modules/linux/Makefile Modified: stable/7/sys/modules/acpi/acpi/Makefile ============================================================================== --- stable/7/sys/modules/acpi/acpi/Makefile Mon Jun 15 20:00:19 2009 (r194260) +++ stable/7/sys/modules/acpi/acpi/Makefile Mon Jun 15 20:12:27 2009 (r194261) @@ -58,7 +58,7 @@ SRCS+= cpufreq_if.h device_if.h isa_if.h # XXX ACPI should not depend on the following headers but this is currently # needed for the build of assym.s. # This obviously needs a better and more structural fix. -SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h +SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h opt_hwpmc_hooks.h # Debugging support DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c dbinput.c dbstats.c Modified: stable/7/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- stable/7/sys/modules/dtrace/dtrace/Makefile Mon Jun 15 20:00:19 2009 (r194260) +++ stable/7/sys/modules/dtrace/dtrace/Makefile Mon Jun 15 20:12:27 2009 (r194261) @@ -23,7 +23,7 @@ SRCS+= bus_if.h device_if.h vnode_if.h SRCS+= assym.s # These are needed for assym.s -SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h +SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h .if ${MACHINE_ARCH} == "i386" SRCS+= opt_apic.h Modified: stable/7/sys/modules/linux/Makefile ============================================================================== --- stable/7/sys/modules/linux/Makefile Mon Jun 15 20:00:19 2009 (r194260) +++ stable/7/sys/modules/linux/Makefile Mon Jun 15 20:12:27 2009 (r194261) @@ -17,7 +17,7 @@ SRCS= linux${SFX}_dummy.c linux_emul.c l device_if.h bus_if.h assym.s # XXX: for assym.s -SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h +SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h opt_hwpmc_hooks.h OBJS= linux${SFX}_locore.o linux${SFX}_support.o From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 21:03:26 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62EDA106568D; Mon, 15 Jun 2009 21:03:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 354AD8FC1D; Mon, 15 Jun 2009 21:03:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FL3QeU001872; Mon, 15 Jun 2009 21:03:26 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FL3Q3Z001871; Mon, 15 Jun 2009 21:03:26 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200906152103.n5FL3Q3Z001871@svn.freebsd.org> From: Stanislav Sedov Date: Mon, 15 Jun 2009 21:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194265 - in stable/7/contrib/ipfilter: . lib X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 21:03:27 -0000 Author: stas Date: Mon Jun 15 21:03:25 2009 New Revision: 194265 URL: http://svn.freebsd.org/changeset/base/194265 Log: MFC r193043: - Prevent buffer overflow in IPFilter's load_http function used to load ipfilter tables via http by the user-level ippool utility. Previously the 1024-byte buffer used to store a http request coudld easily overflow if the length of the hostname part of the url passes exceeded 496 bytes. - Use snprintf to prevent possieble buffer overflows in future. - Do not try to close the descriptor twice on failure. Modified: stable/7/contrib/ipfilter/ (props changed) stable/7/contrib/ipfilter/lib/load_http.c Modified: stable/7/contrib/ipfilter/lib/load_http.c ============================================================================== --- stable/7/contrib/ipfilter/lib/load_http.c Mon Jun 15 20:45:51 2009 (r194264) +++ stable/7/contrib/ipfilter/lib/load_http.c Mon Jun 15 21:03:25 2009 (r194265) @@ -14,11 +14,13 @@ alist_t * load_http(char *url) { - int fd, len, left, port, endhdr, removed; - char *s, *t, *u, buffer[1024], *myurl; + char *s, *t, *u, buffer[1044], *myurl; alist_t *a, *rtop, *rbot; struct sockaddr_in sin; struct hostent *host; + size_t avail; + int fd, len, left, port, endhdr, removed; + int error; /* * More than this would just be absurd. @@ -32,7 +34,14 @@ load_http(char *url) rtop = NULL; rbot = NULL; - sprintf(buffer, "GET %s HTTP/1.0\r\n", url); + avail = sizeof(buffer); + error = snprintf(buffer, avail, "GET %s HTTP/1.0\r\n", url); + + /* + * error is always less then avail due to the constraint on + * the url length above. + */ + avail -= error; myurl = strdup(url); if (myurl == NULL) @@ -51,7 +60,11 @@ load_http(char *url) if (u != NULL) s = u + 1; /* AUTH */ - sprintf(buffer + strlen(buffer), "Host: %s\r\n\r\n", s); + error = snprintf(buffer + strlen(buffer), avail, "Host: %s\r\n\r\n", s); + if (error >= avail) { + fprintf(stderr, "URL is too large: %s\n", url); + goto done; + } u = strchr(s, ':'); if (u != NULL) { @@ -83,16 +96,12 @@ load_http(char *url) if (fd == -1) goto done; - if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) { - close(fd); + if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) goto done; - } len = strlen(buffer); - if (write(fd, buffer, len) != len) { - close(fd); + if (write(fd, buffer, len) != len) goto done; - } s = buffer; endhdr = 0; From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 15 22:07:22 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035A01065674; Mon, 15 Jun 2009 22:07:22 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4C398FC16; Mon, 15 Jun 2009 22:07:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5FM7L51003360; Mon, 15 Jun 2009 22:07:21 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5FM7LPj003359; Mon, 15 Jun 2009 22:07:21 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200906152207.n5FM7LPj003359@svn.freebsd.org> From: "George V. Neville-Neil" Date: Mon, 15 Jun 2009 22:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194270 - in stable/7/sys: . contrib/pf dev/ath/ath_hal netgraph X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jun 2009 22:07:22 -0000 Author: gnn Date: Mon Jun 15 22:07:21 2009 New Revision: 194270 URL: http://svn.freebsd.org/changeset/base/194270 Log: MFC of 179973 Make it simpler to build netgraph modules outside of the kernel source tree. This change follows similar ones in the device tree. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/netgraph/netgraph.h Modified: stable/7/sys/netgraph/netgraph.h ============================================================================== --- stable/7/sys/netgraph/netgraph.h Mon Jun 15 21:55:29 2009 (r194269) +++ stable/7/sys/netgraph/netgraph.h Mon Jun 15 22:07:21 2009 (r194270) @@ -54,7 +54,9 @@ #include #include +#ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_netgraph.h" +#endif /* debugging options */ #define NG_SEPARATE_MALLOC /* make modules use their own malloc types */ From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 02:35:21 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CB601065670; Tue, 16 Jun 2009 02:35:21 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8982A8FC0A; Tue, 16 Jun 2009 02:35:21 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G2ZL1f009445; Tue, 16 Jun 2009 02:35:21 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G2ZL5H009442; Tue, 16 Jun 2009 02:35:21 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906160235.n5G2ZL5H009442@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 16 Jun 2009 02:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194276 - in stable/7/share: monetdef numericdef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 02:35:22 -0000 Author: edwin Date: Tue Jun 16 02:35:21 2009 New Revision: 194276 URL: http://svn.freebsd.org/changeset/base/194276 Log: MFC of r193867: Fix LC_NUMERIC and LC_MONETARY for de_CH locale With the de_CH (swiss german) locale, numbers should look like this: numbers: 1'234.45 monetary values: Fr. 1'234.45 Previously, the thousands separator was missing for numbers, and "." for monetary values, and "," was incorrectly used as decimal point. PR: conf/75502 Submitted by: Benjamin Lutz Added: stable/7/share/numericdef/de_CH.ISO8859-1.src - copied unchanged from r193867, head/share/numericdef/de_CH.ISO8859-1.src Modified: stable/7/share/monetdef/ (props changed) stable/7/share/monetdef/de_CH.ISO8859-1.src stable/7/share/numericdef/ (props changed) stable/7/share/numericdef/Makefile Modified: stable/7/share/monetdef/de_CH.ISO8859-1.src ============================================================================== --- stable/7/share/monetdef/de_CH.ISO8859-1.src Tue Jun 16 01:43:33 2009 (r194275) +++ stable/7/share/monetdef/de_CH.ISO8859-1.src Tue Jun 16 02:35:21 2009 (r194276) @@ -8,9 +8,9 @@ CHF # currency_symbol Fr. # mon_decimal_point -, -# mon_thousands_sep . +# mon_thousands_sep +' # mon_grouping, separated by ; 3;3 # positive_sign Modified: stable/7/share/numericdef/Makefile ============================================================================== --- stable/7/share/numericdef/Makefile Tue Jun 16 01:43:33 2009 (r194275) +++ stable/7/share/numericdef/Makefile Tue Jun 16 02:35:21 2009 (r194276) @@ -7,6 +7,7 @@ LOCALES= af_ZA.ISO8859-1 \ ca_ES.ISO8859-1 \ cs_CZ.ISO8859-2 \ da_DK.ISO8859-1 \ + de_CH.ISO8859-1 \ de_DE.ISO8859-1 \ el_GR.ISO8859-7 \ en_US.ISO8859-1 \ @@ -67,7 +68,7 @@ ENCODINGS= ARMSCII-8 Big5 Big5HKSCS \ KOI8-R KOI8-U PT154 SJIS US-ASCII UTF-8 BE_LINKS= fr_BE:nl_BE -DE_LINKS= de_DE:de_AT de_DE:de_CH +DE_LINKS= de_DE:de_AT FR_LINKS= fr_FR:fr_CA fr_FR:fr_CH GB_LINKS= en_GB:en_AU en_GB:en_NZ IT_LINKS= it_IT:it_CH @@ -90,15 +91,15 @@ eucJP_SJIS= ja_JP eucJP_UTF-8= ja_JP eucKR_CP949= ko_KR eucKR_UTF-8= ko_KR -ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_DE en_US es_ES eu_ES fi_FI \ - fr_BE fr_FR is_IS it_CH it_IT nl_NL no_NO pt_PT sv_SE \ - ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ +ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_CH de_DE en_US es_ES eu_ES \ + fi_FI fr_BE fr_FR is_IS it_CH it_IT nl_NL no_NO pt_PT \ + sv_SE ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ ${IT_LINKS} ${NO_LINKS} ${US_LINKS} ISO8859-1_ISO8859-1= ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ ${IT_LINKS} ${NO_LINKS} ${US_LINKS} ISO8859-1_US-ASCII= en_US ${GB_LINKS} ${US_LINKS} -ISO8859-1_UTF-8= af_ZA ca_ES da_DK de_DE en_US es_ES eu_ES fi_FI fr_BE \ - fr_FR is_IS it_IT nl_NL no_NO pt_BR pt_PT sv_SE +ISO8859-1_UTF-8= af_ZA ca_ES da_DK de_CH de_DE en_US es_ES eu_ES fi_FI \ + fr_BE fr_FR is_IS it_IT nl_NL no_NO pt_BR pt_PT sv_SE ISO8859-2_UTF-8= cs_CZ hr_HR hu_HU pl_PL ro_RO sk_SK sl_SI ISO8859-5_UTF-8= sr_YU uk_UA ISO8859-5_CP1251= uk_UA Copied: stable/7/share/numericdef/de_CH.ISO8859-1.src (from r193867, head/share/numericdef/de_CH.ISO8859-1.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/numericdef/de_CH.ISO8859-1.src Tue Jun 16 02:35:21 2009 (r194276, copy of r193867, head/share/numericdef/de_CH.ISO8859-1.src) @@ -0,0 +1,12 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# decimal_point +. +# thousands_sep +' +# grouping, separated by ; +3;3 +# EOF From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 02:36:49 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF0081065672; Tue, 16 Jun 2009 02:36:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8958FC1D; Tue, 16 Jun 2009 02:36:49 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G2anAX009554; Tue, 16 Jun 2009 02:36:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G2an8e009552; Tue, 16 Jun 2009 02:36:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906160236.n5G2an8e009552@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 16 Jun 2009 02:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194278 - stable/7/share/timedef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 02:36:50 -0000 Author: edwin Date: Tue Jun 16 02:36:49 2009 New Revision: 194278 URL: http://svn.freebsd.org/changeset/base/194278 Log: MFC of 193869 ja_JP: AM/PM date format should be localized. ja_JP.eucJP and ja_JP.SJIS fixes. PR: conf/63527 Submitted by: Yukihiro Nakai Modified: stable/7/share/timedef/ (props changed) stable/7/share/timedef/ja_JP.SJIS.src stable/7/share/timedef/ja_JP.eucJP.src Modified: stable/7/share/timedef/ja_JP.SJIS.src ============================================================================== --- stable/7/share/timedef/ja_JP.SJIS.src Tue Jun 16 02:36:21 2009 (r194277) +++ stable/7/share/timedef/ja_JP.SJIS.src Tue Jun 16 02:36:49 2009 (r194278) @@ -67,13 +67,11 @@ # # am # -#Œß‘O -AM +Œß‘O # # pm # -#ŒßŒã -PM +ŒßŒã # # date_fmt # Modified: stable/7/share/timedef/ja_JP.eucJP.src ============================================================================== --- stable/7/share/timedef/ja_JP.eucJP.src Tue Jun 16 02:36:21 2009 (r194277) +++ stable/7/share/timedef/ja_JP.eucJP.src Tue Jun 16 02:36:49 2009 (r194278) @@ -68,13 +68,11 @@ # # am # -#¸áÁ° -AM +¸áÁ° # # pm # -#¸á¸å -PM +¸á¸å # # date_fmt # From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 05:05:47 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1659D1065672; Tue, 16 Jun 2009 05:05:47 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 030C38FC12; Tue, 16 Jun 2009 05:05:47 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G55kkm012723; Tue, 16 Jun 2009 05:05:46 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G55kae012721; Tue, 16 Jun 2009 05:05:46 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906160505.n5G55kae012721@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 16 Jun 2009 05:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194281 - in stable/7/sys: . compat/linux contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 05:05:47 -0000 Author: dchagin Date: Tue Jun 16 05:05:46 2009 New Revision: 194281 URL: http://svn.freebsd.org/changeset/base/194281 Log: MFC r192203: Emulate SO_PEERCRED socket option. Temporarily use 0 for pid member as the FreeBSD does not cache remote UNIX domain socket peer pid. PR: kern/102956 Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_socket.c stable/7/sys/compat/linux/linux_socket.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 03:51:38 2009 (r194280) +++ stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:05:46 2009 (r194281) @@ -1159,7 +1159,9 @@ linux_getsockopt(struct thread *td, stru } */ bsd_args; l_timeval linux_tv; struct timeval tv; - socklen_t tv_len; + socklen_t tv_len, xulen; + struct xucred xu; + struct l_ucred lxu; int error, name; bsd_args.s = args->s; @@ -1182,6 +1184,23 @@ linux_getsockopt(struct thread *td, stru sizeof(linux_tv))); /* NOTREACHED */ break; + case LOCAL_PEERCRED: + if (args->optlen != sizeof(lxu)) + return (EINVAL); + xulen = sizeof(xu); + error = kern_getsockopt(td, args->s, bsd_args.level, + name, &xu, UIO_SYSSPACE, &xulen); + if (error) + return (error); + /* + * XXX Use 0 for pid as the FreeBSD does not cache peer pid. + */ + lxu.pid = 0; + lxu.uid = xu.cr_uid; + lxu.gid = xu.cr_gid; + return (copyout(&lxu, PTRIN(args->optval), sizeof(lxu))); + /* NOTREACHED */ + break; default: break; } Modified: stable/7/sys/compat/linux/linux_socket.h ============================================================================== --- stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 03:51:38 2009 (r194280) +++ stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 05:05:46 2009 (r194281) @@ -59,4 +59,10 @@ #define LINUX_AF_APPLETALK 5 #define LINUX_AF_INET6 10 +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +}; + #endif /* _LINUX_SOCKET_H_ */ From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 05:07:34 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3C95106566B; Tue, 16 Jun 2009 05:07:34 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B072A8FC18; Tue, 16 Jun 2009 05:07:34 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G57Ynp012800; Tue, 16 Jun 2009 05:07:34 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G57YF8012799; Tue, 16 Jun 2009 05:07:34 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906160507.n5G57YF8012799@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 16 Jun 2009 05:07:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194282 - in stable/7/sys: . compat/linux contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 05:07:35 -0000 Author: dchagin Date: Tue Jun 16 05:07:34 2009 New Revision: 194282 URL: http://svn.freebsd.org/changeset/base/194282 Log: MFC r192204: Use the protocol family constants for the domain argument validation. Return immediately when the socket() failed. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_socket.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:05:46 2009 (r194281) +++ stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:07:34 2009 (r194282) @@ -559,10 +559,12 @@ linux_socket(struct thread *td, struct l return (EAFNOSUPPORT); retval_socket = socket(td, &bsd_args); + if (retval_socket) + return (retval_socket); + if (bsd_args.type == SOCK_RAW && (bsd_args.protocol == IPPROTO_RAW || bsd_args.protocol == 0) - && bsd_args.domain == AF_INET - && retval_socket >= 0) { + && bsd_args.domain == PF_INET) { /* It's a raw IP socket: set the IP_HDRINCL option. */ int hdrincl; @@ -577,7 +579,7 @@ linux_socket(struct thread *td, struct l * default and some apps depend on this. So, set V6ONLY to 0 * for Linux apps if the sysctl value is set to 1. */ - if (bsd_args.domain == PF_INET6 && retval_socket >= 0 + if (bsd_args.domain == PF_INET6 #ifndef KLD_MODULE /* * XXX: Avoid undefined symbol error with an IPv4 only From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 05:08:48 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9BDA106564A; Tue, 16 Jun 2009 05:08:48 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A717F8FC15; Tue, 16 Jun 2009 05:08:48 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G58mD2012872; Tue, 16 Jun 2009 05:08:48 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G58mOM012870; Tue, 16 Jun 2009 05:08:48 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906160508.n5G58mOM012870@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 16 Jun 2009 05:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194283 - in stable/7/sys: . compat/linux contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 05:08:49 -0000 Author: dchagin Date: Tue Jun 16 05:08:48 2009 New Revision: 194283 URL: http://svn.freebsd.org/changeset/base/194283 Log: MFC r192205: Return EINVAL in case when the incorrect or unsupported type argument is specified. Do not map type argument value as its Linux values are identical to FreeBSD values. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_socket.c stable/7/sys/compat/linux/linux_socket.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:07:34 2009 (r194282) +++ stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:08:48 2009 (r194283) @@ -554,6 +554,8 @@ linux_socket(struct thread *td, struct l bsd_args.protocol = args->protocol; bsd_args.type = args->type; + if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) + return (EINVAL); bsd_args.domain = linux_to_bsd_domain(args->domain); if (bsd_args.domain == -1) return (EAFNOSUPPORT); Modified: stable/7/sys/compat/linux/linux_socket.h ============================================================================== --- stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 05:07:34 2009 (r194282) +++ stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 05:08:48 2009 (r194283) @@ -59,6 +59,16 @@ #define LINUX_AF_APPLETALK 5 #define LINUX_AF_INET6 10 +/* Supported socket types */ + +#define LINUX_SOCK_STREAM 1 +#define LINUX_SOCK_DGRAM 2 +#define LINUX_SOCK_RAW 3 +#define LINUX_SOCK_RDM 4 +#define LINUX_SOCK_SEQPACKET 5 + +#define LINUX_SOCK_MAX LINUX_SOCK_SEQPACKET + struct l_ucred { uint32_t pid; uint32_t uid; From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 05:10:21 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D33CC106567B; Tue, 16 Jun 2009 05:10:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFA9A8FC24; Tue, 16 Jun 2009 05:10:21 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5G5ALmq012958; Tue, 16 Jun 2009 05:10:21 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5G5ALl0012954; Tue, 16 Jun 2009 05:10:21 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906160510.n5G5ALl0012954@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 16 Jun 2009 05:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194284 - in stable/7/sys: . amd64/linux32 compat/linux contrib/pf dev/ath/ath_hal i386/linux X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 05:10:22 -0000 Author: dchagin Date: Tue Jun 16 05:10:21 2009 New Revision: 194284 URL: http://svn.freebsd.org/changeset/base/194284 Log: MFC r192206: Somewhere between 2.6.23 and 2.6.27, Linux added SOCK_CLOEXEC and SOCK_NONBLOCK flags, that allow to save fcntl() calls. Implement a variation of the socket() syscall which takes a flags in addition to the type argument. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux.h stable/7/sys/compat/linux/linux_socket.c stable/7/sys/compat/linux/linux_socket.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/i386/linux/linux.h Modified: stable/7/sys/amd64/linux32/linux.h ============================================================================== --- stable/7/sys/amd64/linux32/linux.h Tue Jun 16 05:08:48 2009 (r194283) +++ stable/7/sys/amd64/linux32/linux.h Tue Jun 16 05:10:21 2009 (r194284) @@ -563,6 +563,7 @@ int linux_ioctl_unregister_handler(struc #define LINUX_O_DIRECTORY 00200000 /* Must be a directory */ #define LINUX_O_NOFOLLOW 00400000 /* Do not follow links */ #define LINUX_O_NOATIME 01000000 +#define LINUX_O_CLOEXEC 02000000 #define LINUX_F_DUPFD 0 #define LINUX_F_GETFD 1 Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:08:48 2009 (r194283) +++ stable/7/sys/compat/linux/linux_socket.c Tue Jun 16 05:10:21 2009 (r194284) @@ -550,10 +550,13 @@ linux_socket(struct thread *td, struct l int type; int protocol; } */ bsd_args; - int retval_socket; + int retval_socket, socket_flags; bsd_args.protocol = args->protocol; - bsd_args.type = args->type; + socket_flags = args->type & ~LINUX_SOCK_TYPE_MASK; + if (socket_flags & ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK)) + return (EINVAL); + bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK; if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) return (EINVAL); bsd_args.domain = linux_to_bsd_domain(args->domain); @@ -564,6 +567,23 @@ linux_socket(struct thread *td, struct l if (retval_socket) return (retval_socket); + if (socket_flags & LINUX_SOCK_NONBLOCK) { + retval_socket = kern_fcntl(td, td->td_retval[0], + F_SETFL, O_NONBLOCK); + if (retval_socket) { + (void)kern_close(td, td->td_retval[0]); + goto out; + } + } + if (socket_flags & LINUX_SOCK_CLOEXEC) { + retval_socket = kern_fcntl(td, td->td_retval[0], + F_SETFD, FD_CLOEXEC); + if (retval_socket) { + (void)kern_close(td, td->td_retval[0]); + goto out; + } + } + if (bsd_args.type == SOCK_RAW && (bsd_args.protocol == IPPROTO_RAW || bsd_args.protocol == 0) && bsd_args.domain == PF_INET) { @@ -599,6 +619,7 @@ linux_socket(struct thread *td, struct l } #endif +out: return (retval_socket); } Modified: stable/7/sys/compat/linux/linux_socket.h ============================================================================== --- stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 05:08:48 2009 (r194283) +++ stable/7/sys/compat/linux/linux_socket.h Tue Jun 16 05:10:21 2009 (r194284) @@ -69,6 +69,13 @@ #define LINUX_SOCK_MAX LINUX_SOCK_SEQPACKET +#define LINUX_SOCK_TYPE_MASK 0xf + +/* Flags for socket, socketpair, accept4 */ + +#define LINUX_SOCK_CLOEXEC LINUX_O_CLOEXEC +#define LINUX_SOCK_NONBLOCK LINUX_O_NONBLOCK + struct l_ucred { uint32_t pid; uint32_t uid; Modified: stable/7/sys/i386/linux/linux.h ============================================================================== --- stable/7/sys/i386/linux/linux.h Tue Jun 16 05:08:48 2009 (r194283) +++ stable/7/sys/i386/linux/linux.h Tue Jun 16 05:10:21 2009 (r194284) @@ -534,6 +534,7 @@ int linux_ioctl_unregister_handler(struc #define LINUX_O_DIRECTORY 00200000 /* Must be a directory */ #define LINUX_O_NOFOLLOW 00400000 /* Do not follow links */ #define LINUX_O_NOATIME 01000000 +#define LINUX_O_CLOEXEC 02000000 #define LINUX_F_DUPFD 0 #define LINUX_F_GETFD 1 From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 13:39:09 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDF51106566B; Tue, 16 Jun 2009 13:39:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C15518FC17; Tue, 16 Jun 2009 13:39:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5GDd9UO029234; Tue, 16 Jun 2009 13:39:09 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5GDd9gO029232; Tue, 16 Jun 2009 13:39:09 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906161339.n5GDd9gO029232@svn.freebsd.org> From: John Baldwin Date: Tue, 16 Jun 2009 13:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194291 - stable/7/lib/libutil X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 13:39:10 -0000 Author: jhb Date: Tue Jun 16 13:39:09 2009 New Revision: 194291 URL: http://svn.freebsd.org/changeset/base/194291 Log: MFC: Note that these routines return NULL on failure and that the structures they return arrays of are defined in . Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/kinfo_getfile.3 stable/7/lib/libutil/kinfo_getvmmap.3 Modified: stable/7/lib/libutil/kinfo_getfile.3 ============================================================================== --- stable/7/lib/libutil/kinfo_getfile.3 Tue Jun 16 13:31:01 2009 (r194290) +++ stable/7/lib/libutil/kinfo_getfile.3 Tue Jun 16 13:39:09 2009 (r194291) @@ -58,15 +58,20 @@ mib. While the kernel returns a packed structure, this function expands the data into a fixed record format. .Sh RETURN VALUES -The +On success the .Fn kinfo_getfile function returns a pointer to an array of .Vt struct kinfo_file -structures. +structures as defined by +.In sys/user.h . The array was obtained by an internal call to .Xr malloc 3 and must be freed by the caller with a call to .Xr free 3 . +On failure the +.Fn kinfo_getfile +function returns +.Dv NULL . .Sh SEE ALSO .Xr free 3 , .Xr kinfo_getvmmap 3 , Modified: stable/7/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- stable/7/lib/libutil/kinfo_getvmmap.3 Tue Jun 16 13:31:01 2009 (r194290) +++ stable/7/lib/libutil/kinfo_getvmmap.3 Tue Jun 16 13:39:09 2009 (r194291) @@ -58,15 +58,20 @@ mib. While the kernel returns a packed structure, this function expands the data into a fixed record format. .Sh RETURN VALUES -The +On success the .Fn kinfo_getvmmap function returns a pointer to an array of .Vt struct kinfo_vmentry -structures. +structures as defined by +.In sys/user.h . The array was obtained by an internal call to .Xr malloc 3 and must be freed by the caller with a call to .Xr free 3 . +On failure the +.Fn kinfo_getvmmap +function returns +.Dv NULL . .Sh SEE ALSO .Xr free 3 , .Xr kinfo_getfile 3 , From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 16 15:09:18 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05EBA1065670; Tue, 16 Jun 2009 15:09:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6C3D8FC12; Tue, 16 Jun 2009 15:09:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5GF9HEZ031692; Tue, 16 Jun 2009 15:09:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5GF9Hed031691; Tue, 16 Jun 2009 15:09:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906161509.n5GF9Hed031691@svn.freebsd.org> From: John Baldwin Date: Tue, 16 Jun 2009 15:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194294 - in stable/7/sys: . contrib/pf dev/acpica dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 15:09:18 -0000 Author: jhb Date: Tue Jun 16 15:09:17 2009 New Revision: 194294 URL: http://svn.freebsd.org/changeset/base/194294 Log: MFC: Rework the _BBN handling for Host-PCI bridges to always trust the first bus that claims to be bus 0. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/acpica/acpi_pcib_acpi.c stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/7/sys/dev/acpica/acpi_pcib_acpi.c Tue Jun 16 14:55:13 2009 (r194293) +++ stable/7/sys/dev/acpica/acpi_pcib_acpi.c Tue Jun 16 15:09:17 2009 (r194294) @@ -145,6 +145,7 @@ acpi_pcib_acpi_attach(device_t dev) { struct acpi_hpcib_softc *sc; ACPI_STATUS status; + static int bus0_seen = 0; u_int addr, slot, func, busok; uint8_t busno; @@ -155,6 +156,21 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_handle = acpi_get_handle(dev); /* + * Get our segment number by evaluating _SEG + * It's OK for this to not exist. + */ + status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); + if (ACPI_FAILURE(status)) { + if (status != AE_NOT_FOUND) { + device_printf(dev, "could not evaluate _SEG - %s\n", + AcpiFormatException(status)); + return_VALUE (ENXIO); + } + /* If it's not found, assume 0. */ + sc->ap_segment = 0; + } + + /* * Get our base bus number by evaluating _BBN. * If this doesn't work, we assume we're bus number 0. * @@ -168,8 +184,10 @@ acpi_pcib_acpi_attach(device_t dev) * XXX invoke _REG on this for the PCI config space address space? * XXX It seems many BIOS's with multiple Host-PCI bridges do not set * _BBN correctly. They set _BBN to zero for all bridges. Thus, - * if _BBN is zero and pcib0 already exists, we try to read our + * if _BBN is zero and PCI bus 0 already exists, we try to read our * bus number from the configuration registers at address _ADR. + * We only do this for domain/segment 0 in the hopes that this is + * only needed for old single-domain machines. */ status = acpi_GetInteger(sc->ap_handle, "_BBN", &sc->ap_bus); if (ACPI_FAILURE(status)) { @@ -184,11 +202,11 @@ acpi_pcib_acpi_attach(device_t dev) } /* - * If the bus is zero and pcib0 already exists, read the bus number - * via PCI config space. + * If this is segment 0, the bus is zero, and PCI bus 0 already + * exists, read the bus number via PCI config space. */ busok = 1; - if (sc->ap_bus == 0 && devclass_get_device(pcib_devclass, 0) != dev) { + if (sc->ap_segment == 0 && sc->ap_bus == 0 && bus0_seen) { busok = 0; status = acpi_GetInteger(sc->ap_handle, "_ADR", &addr); if (ACPI_FAILURE(status)) { @@ -225,20 +243,9 @@ acpi_pcib_acpi_attach(device_t dev) device_printf(dev, "trying bus number %d\n", sc->ap_bus); } - /* - * Get our segment number by evaluating _SEG - * It's OK for this to not exist. - */ - status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); - if (ACPI_FAILURE(status)) { - if (status != AE_NOT_FOUND) { - device_printf(dev, "could not evaluate _SEG - %s\n", - AcpiFormatException(status)); - return_VALUE (ENXIO); - } - /* If it's not found, assume 0. */ - sc->ap_segment = 0; - } + /* If this is bus 0 on segment 0, note that it has been seen already. */ + if (sc->ap_segment == 0 && sc->ap_bus == 0) + bus0_seen = 1; return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus)); } From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 02:20:27 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EC51065694; Wed, 17 Jun 2009 02:20:27 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 274BD8FC1C; Wed, 17 Jun 2009 02:20:27 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H2KRvu059242; Wed, 17 Jun 2009 02:20:27 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H2KRg4059240; Wed, 17 Jun 2009 02:20:27 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906170220.n5H2KRg4059240@svn.freebsd.org> From: Brian Somers Date: Wed, 17 Jun 2009 02:20:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194318 - stable/7/usr.sbin/ppp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 02:20:28 -0000 Author: brian Date: Wed Jun 17 02:20:26 2009 New Revision: 194318 URL: http://svn.freebsd.org/changeset/base/194318 Log: MFC: r192798: Fix a race that can stall the timer PR: 102747 Submitted by: Sergey Zaharchenko - doublef-ctm at yandex dot ru Modified: stable/7/usr.sbin/ppp/ (props changed) stable/7/usr.sbin/ppp/timer.c Modified: stable/7/usr.sbin/ppp/timer.c ============================================================================== --- stable/7/usr.sbin/ppp/timer.c Wed Jun 17 01:55:42 2009 (r194317) +++ stable/7/usr.sbin/ppp/timer.c Wed Jun 17 02:20:26 2009 (r194318) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1996 - 2001 Brian Somers + * Copyright (c) 1996 - 2001, 2009 Brian Somers * based on work by Toshiharu OHNO * Internet Initiative Japan, Inc (IIJ) * All rights reserved. @@ -94,9 +94,12 @@ timer_Start(struct pppTimer *tp) return; } - /* Adjust our first delta so that it reflects what's really happening */ + /* + * We just need to insert tp in the correct relative place. We don't + * need to adjust TimerList->rest (yet). + */ if (TimerList && getitimer(ITIMER_REAL, &itimer) == 0) - TimerList->rest = RESTVAL(itimer); + ticks = RESTVAL(itimer) - TimerList->rest; pt = NULL; for (t = TimerList; t; t = t->next) { @@ -132,6 +135,7 @@ timer_Start(struct pppTimer *tp) static void StopTimerNoBlock(struct pppTimer *tp) { + struct itimerval itimer; struct pppTimer *t, *pt; /* @@ -156,14 +160,11 @@ StopTimerNoBlock(struct pppTimer *tp) timer_TermService(); /* Terminate Timer Service */ } if (t->next) { - if (!pt) { /* t (tp) was the first in the list */ - struct itimerval itimer; - - if (getitimer(ITIMER_REAL, &itimer) == 0) - t->rest = RESTVAL(itimer); - } - t->next->rest += t->rest; - if (!pt) /* t->next is now the first in the list */ + if (!pt && getitimer(ITIMER_REAL, &itimer) == 0) + t->next->rest += RESTVAL(itimer); /* t (tp) was the first in the list */ + else + t->next->rest += t->rest; + if (!pt && t->next->rest > 0) /* t->next is now the first in the list */ timer_InitService(1); } } else { @@ -235,11 +236,19 @@ timer_Show(int LogLevel, struct prompt * { struct itimerval itimer; struct pppTimer *pt; - u_long rest = 0; + long rest; - /* Adjust our first delta so that it reflects what's really happening */ + /* + * Adjust the base time so that the deltas reflect what's really + * happening. Changing TimerList->rest might cause it to become zero + * (if getitimer() returns a value close to zero), and the + * timer_InitService() call will call setitimer() with zero it_value, + * stopping the itimer... so be careful! + */ if (TimerList && getitimer(ITIMER_REAL, &itimer) == 0) - TimerList->rest = RESTVAL(itimer); + rest = RESTVAL(itimer) - TimerList->rest; + else + rest = 0; #define SECS(val) ((val) / SECTICKS) #define HSECS(val) (((val) % SECTICKS) * 100 / SECTICKS) From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 03:04:31 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CAC71065673; Wed, 17 Jun 2009 03:04:31 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47F188FC0A; Wed, 17 Jun 2009 03:04:31 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H34VwL060514; Wed, 17 Jun 2009 03:04:31 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H34V5H060505; Wed, 17 Jun 2009 03:04:31 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906170304.n5H34V5H060505@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Jun 2009 03:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194323 - in stable/7: etc/mtree share/colldef share/mklocale share/monetdef share/msgdef share/numericdef share/timedef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 03:04:32 -0000 Author: edwin Date: Wed Jun 17 03:04:30 2009 New Revision: 194323 URL: http://svn.freebsd.org/changeset/base/194323 Log: MFC of 193908: add ca_AD, ca_FR and ca_IT locales Catalan language is not only spoken in Spain (ca_ES), but also in Andorra, France and Italy. In Andorra it is the official language. (see http://en.wikipedia.org/wiki/Catalan_language#Geographic_distribution) PR: conf/92541 Submitted by: Modified: stable/7/etc/mtree/ (props changed) stable/7/etc/mtree/BSD.local.dist stable/7/etc/mtree/BSD.usr.dist stable/7/share/colldef/ (props changed) stable/7/share/colldef/Makefile stable/7/share/mklocale/ (props changed) stable/7/share/mklocale/Makefile stable/7/share/monetdef/ (props changed) stable/7/share/monetdef/Makefile stable/7/share/msgdef/ (props changed) stable/7/share/msgdef/Makefile stable/7/share/numericdef/ (props changed) stable/7/share/numericdef/Makefile stable/7/share/timedef/ (props changed) stable/7/share/timedef/Makefile Modified: stable/7/etc/mtree/BSD.local.dist ============================================================================== --- stable/7/etc/mtree/BSD.local.dist Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/etc/mtree/BSD.local.dist Wed Jun 17 03:04:30 2009 (r194323) @@ -541,12 +541,30 @@ .. bg_BG.UTF-8 .. + ca_AD.ISO8859-1 + .. ca_ES.ISO8859-1 .. + ca_FR.ISO8859-1 + .. + ca_IT.ISO8859-1 + .. + ca_AD.ISO8859-15 + .. ca_ES.ISO8859-15 .. + ca_FR.ISO8859-15 + .. + ca_IT.ISO8859-15 + .. + ca_AD.UTF-8 + .. ca_ES.UTF-8 .. + ca_FR.UTF-8 + .. + ca_IT.UTF-8 + .. cs_CZ.ISO8859-2 .. cs_CZ.UTF-8 Modified: stable/7/etc/mtree/BSD.usr.dist ============================================================================== --- stable/7/etc/mtree/BSD.usr.dist Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/etc/mtree/BSD.usr.dist Wed Jun 17 03:04:30 2009 (r194323) @@ -369,12 +369,30 @@ .. bg_BG.UTF-8 .. + ca_AD.ISO8859-1 + .. ca_ES.ISO8859-1 .. + ca_FR.ISO8859-1 + .. + ca_IT.ISO8859-1 + .. + ca_AD.ISO8859-15 + .. ca_ES.ISO8859-15 .. + ca_FR.ISO8859-15 + .. + ca_IT.ISO8859-15 + .. + ca_AD.UTF-8 + .. ca_ES.UTF-8 .. + ca_FR.UTF-8 + .. + ca_IT.UTF-8 + .. cs_CZ.ISO8859-2 .. cs_CZ.UTF-8 Modified: stable/7/share/colldef/Makefile ============================================================================== --- stable/7/share/colldef/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/colldef/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -69,6 +69,7 @@ ISO8859-1_ISO8859-1= ${ISO8859-15_ISO885 LATIN1LINKS= af_ZA da_DK en_AU en_CA en_GB en_NZ en_US eu_ES fi_FI \ fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL pt_PT ISO8859-15_ISO8859-15= \ + ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT \ de_DE:de_AT de_DE:de_CH \ no_NO:nb_NO no_NO:nn_NO \ ${LATIN1LINKS:C/^/la_LN:/} @@ -89,11 +90,11 @@ US-ASCII_SJIS= la_LN:ja_JP ASCIILINKS= en_AU en_CA en_GB en_NZ en_US US-ASCII_US-ASCII= ${ASCIILINKS:C/^/la_LN:/} -UTF8LINKS= af_ZA am_ET be_BY bg_BG ca_ES cs_CZ da_DK de_AT de_CH \ - de_DE el_GR en_AU en_CA en_GB en_IE en_NZ en_US es_ES \ - et_EE eu_ES fi_FI fr_BE \ - fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \ - ja_JP kk_KZ ko_KR lt_LT mn_MN \ +UTF8LINKS= af_ZA am_ET be_BY bg_BG ca_AD ca_ES ca_FR ca_IT cs_CZ \ + da_DK de_AT de_CH de_DE \ + el_GR en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM \ + is_IS it_CH it_IT ja_JP kk_KZ ko_KR lt_LT mn_MN \ nb_NO nl_BE nl_NL nn_NO no_NO pl_PL pt_BR pt_PT \ ro_RO ru_RU sk_SK sl_SI sr_YU sv_SE tr_TR uk_UA zh_CN zh_HK \ zh_TW Modified: stable/7/share/mklocale/Makefile ============================================================================== --- stable/7/share/mklocale/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/mklocale/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -51,8 +51,9 @@ ENCODINGS= CP1251 ISO8859-1 ISO8859-2 IS ASCIILINKS= en_AU en_CA en_GB en_NZ en_US US-ASCII_US-ASCII= ${ASCIILINKS:C/^/la_LN:/} -LATIN1XLINKS= af_ZA ca_ES da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_NZ \ - en_US es_ES eu_ES fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH \ +LATIN1XLINKS= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ + en_AU en_CA en_GB en_NZ en_US es_ES eu_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH \ it_IT nb_NO nl_BE nl_NL nn_NO no_NO pt_PT sv_SE LATIN1LINKS= ${LATIN1XLINKS} pt_BR ISO8859-1_ISO8859-1= ${LATIN1LINKS:C/^/la_LN:/} @@ -72,7 +73,8 @@ ISO8859-5_ISO8859-5= ${LATIN5LINKS:C/^/r CP1251LINKS= ru_RU be_BY uk_UA CP1251_CP1251= ${CP1251LINKS:C/^/bg_BG:/} -UTF8LINKS= af_ZA be_BY bg_BG ca_ES cs_CZ da_DK de_AT de_CH de_DE el_GR \ +UTF8LINKS= af_ZA be_BY bg_BG ca_AD ca_ES ca_FR ca_IT cs_CZ \ + da_DK de_AT de_CH de_DE el_GR \ en_AU en_CA en_GB en_IE en_NZ en_US es_ES et_EE eu_ES fi_FI \ fr_BE \ fr_CA fr_CH fr_FR he_IL hr_HR hu_HU hy_AM is_IS it_CH it_IT \ Modified: stable/7/share/monetdef/Makefile ============================================================================== --- stable/7/share/monetdef/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/monetdef/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -100,13 +100,16 @@ Big5_UTF-8= zh_TW eucJP_SJIS= ja_JP eucKR_CP949= ko_KR GB2312_GBK= zh_CN -ISO8859-1_ISO8859-1= es_ES:eu_ES de_CH:fr_CH de_CH:it_CH no_NO:nb_NO no_NO:nn_NO -ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_AT de_CH de_DE en_AU en_CA \ - en_GB en_NZ en_US es_ES fi_FI fr_BE fr_CA fr_CH fr_FR \ +ISO8859-1_ISO8859-1= ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT es_ES:eu_ES \ + de_CH:fr_CH de_CH:it_CH no_NO:nb_NO no_NO:nn_NO +ISO8859-1_ISO8859-15= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ + en_AU en_CA en_GB en_NZ en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR \ is_IS it_IT it_CH nl_BE nl_NL nb_NO nn_NO no_NO pt_PT sv_SE ISO8859-1_US-ASCII= en_AU en_CA en_GB en_NZ en_US -ISO8859-1_UTF-8= af_ZA ca_ES da_DK de_AT de_CH de_DE en_AU en_CA en_NZ \ - en_US es_ES fi_FI fr_BE fr_CA fr_FR is_IS it_IT nl_BE \ +ISO8859-1_UTF-8= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ + en_AU en_CA en_NZ en_US es_ES \ + fi_FI fr_BE fr_CA fr_FR is_IS it_IT nl_BE \ nl_NL nb_NO nn_NO no_NO pt_BR pt_PT sv_SE ISO8859-2_UTF-8= hr_HR hu_HU ro_RO sk_SK sl_SI sr_YU ISO8859-7_UTF-8= el_GR @@ -116,7 +119,8 @@ ISO8859-13_UTF-8= lt_LT ISO8859-15_ISO8859-15= es_ES:eu_ES ISO8859-15_UTF-8= et_EE UTF-8_Big5HKSCS= zh_HK -UTF-8_UTF-8= es_ES:eu_ES de_CH:fr_CH de_CH:it_CH +UTF-8_UTF-8= ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT \ + es_ES:eu_ES de_CH:fr_CH de_CH:it_CH SYMLINKS= .for enc1 in ${ENCODINGS} Modified: stable/7/share/msgdef/Makefile ============================================================================== --- stable/7/share/msgdef/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/msgdef/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -83,6 +83,7 @@ FILESDIR_${locale}.out= ${LOCALEDIR}/${l CLEANFILES= ${FILES} +CA_LINKS= ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT CZ_LINKS= cs_CZ:sk_SK DE_LINKS= de_DE:de_AT de_DE:de_CH FR_LINKS= fr_FR:fr_CA @@ -100,12 +101,12 @@ Big5_Big5HKSCS= zh_TW:zh_HK eucKR_CP949= ko_KR eucKR_UTF-8= ko_KR GB2312_GBK= zh_CN -ISO8859-1_ISO8859-1= ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ - ${NL_LINKS} ${NO_LINKS} ${PT_LINKS} +ISO8859-1_ISO8859-1= ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ + ${IT_LINKS} ${NL_LINKS} ${NO_LINKS} ${PT_LINKS} ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_DE en_CA en_GB en_US es_ES \ eu_ES fi_FI fr_BE fr_CH fr_FR is_IS it_IT nl_NL no_NO \ pt_PT sv_SE \ - ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ + ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ ${NL_LINKS} ${NO_LINKS} ISO8859-1_US-ASCII= ${GB_LINKS} en_CA en_GB en_US ISO8859-1_UTF-8= af_ZA ca_ES da_DK de_DE en_CA en_GB en_US es_ES eu_ES \ @@ -117,7 +118,8 @@ ISO8859-9_UTF-8= tr_TR ISO8859-13_ISO8859-4= lt_LT ISO8859-13_UTF-8= lt_LT ISO8859-15_UTF-8= et_EE -UTF-8_UTF-8= ${CZ_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} en_GB:en_IE \ +UTF-8_UTF-8= ${CA_LINKS} ${CZ_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ + en_GB:en_IE \ ${IT_LINKS} ${NL_LINKS} ${NO_LINKS} ${PT_LINKS} zh_TW:zh_HK SYMLINKS= Modified: stable/7/share/numericdef/Makefile ============================================================================== --- stable/7/share/numericdef/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/numericdef/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -68,6 +68,7 @@ ENCODINGS= ARMSCII-8 Big5 Big5HKSCS \ KOI8-R KOI8-U PT154 SJIS US-ASCII UTF-8 BE_LINKS= fr_BE:nl_BE +CA_LINKS= ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT DE_LINKS= de_DE:de_AT FR_LINKS= fr_FR:fr_CA fr_FR:fr_CH GB_LINKS= en_GB:en_AU en_GB:en_NZ @@ -92,11 +93,11 @@ eucJP_UTF-8= ja_JP eucKR_CP949= ko_KR eucKR_UTF-8= ko_KR ISO8859-1_ISO8859-15= af_ZA ca_ES da_DK de_CH de_DE en_US es_ES eu_ES \ - fi_FI fr_BE fr_FR is_IS it_CH it_IT nl_NL no_NO pt_PT \ - sv_SE ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ - ${IT_LINKS} ${NO_LINKS} ${US_LINKS} -ISO8859-1_ISO8859-1= ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ + fi_FI fr_BE fr_FR is_IS it_CH it_IT nl_NL no_NO pt_PT sv_SE \ + ${BE_LINKS} ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ ${IT_LINKS} ${NO_LINKS} ${US_LINKS} +ISO8859-1_ISO8859-1= ${BE_LINKS} ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} \ + ${GB_LINKS} ${IT_LINKS} ${NO_LINKS} ${US_LINKS} ISO8859-1_US-ASCII= en_US ${GB_LINKS} ${US_LINKS} ISO8859-1_UTF-8= af_ZA ca_ES da_DK de_CH de_DE en_US es_ES eu_ES fi_FI \ fr_BE fr_FR is_IS it_IT nl_NL no_NO pt_BR pt_PT sv_SE @@ -114,8 +115,8 @@ KOI8-R_ISO8859-5= ru_RU KOI8-U_ISO8859-5= uk_UA PT154_UTF-8= kk_KZ US-ASCII_UTF-8= en_US:he_IL -UTF-8_UTF-8= ${BE_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} en_GB:en_IE \ - ${IT_LINKS} ${NO_LINKS} ${US_LINKS} +UTF-8_UTF-8= ${BE_LINKS} ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ + en_GB:en_IE ${IT_LINKS} ${NO_LINKS} ${US_LINKS} SYMLINKS= .for enc1 in ${ENCODINGS} Modified: stable/7/share/timedef/Makefile ============================================================================== --- stable/7/share/timedef/Makefile Wed Jun 17 02:55:53 2009 (r194322) +++ stable/7/share/timedef/Makefile Wed Jun 17 03:04:30 2009 (r194323) @@ -114,6 +114,7 @@ ENCODINGS= Big5HKSCS CP949 eucKR GB2312 ISO8859-1 ISO8859-2 ISO8859-4 ISO8859-15 \ US-ASCII UTF-8 +CA_LINKS= ca_ES:ca_AD ca_ES:ca_FR ca_ES:ca_IT DE_LINKS= de_DE:de_CH FR_LINKS= fr_FR:fr_BE fr_FR:fr_CA fr_FR:fr_CH IT_LINKS= it_IT:it_CH @@ -123,20 +124,21 @@ GB_LINKS= en_GB:en_AU en_GB:en_CA en_GB: eucKR_CP949= ko_KR GB2312_GBK= zh_CN -ISO8859-1_ISO8859-1= ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ - ${NL_LINKS} ${NO_LINKS} en_US:af_ZA +ISO8859-1_ISO8859-1= ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} \ + ${IT_LINKS} ${NL_LINKS} ${NO_LINKS} en_US:af_ZA ISO8859-1_ISO8859-15= ca_ES da_DK de_AT de_DE en_GB en_US es_ES eu_ES \ fi_FI fr_FR is_IS it_IT la_LN nb_NO nl_NL nn_NO no_NO pt_PT \ sv_SE \ - ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} ${NL_LINKS} + ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ + ${NL_LINKS} ISO8859-1_US-ASCII= ${GB_LINKS} en_GB en_US la_LN ISO8859-1_ISO8859-2= la_LN ISO8859-1_ISO8859-4= la_LN ISO8859-1_UTF-8= en_GB en_US eu_ES nl_NL ISO8859-15_ISO8859-15= en_US:af_ZA UTF-8_Big5HKSCS= zh_TW:zh_HK -UTF-8_UTF-8= ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} ${NL_LINKS} \ - ${NO_LINKS} \ +UTF-8_UTF-8= ${CA_LINKS} ${DE_LINKS} ${FR_LINKS} ${GB_LINKS} ${IT_LINKS} \ + ${NL_LINKS} ${NO_LINKS} \ en_GB:en_IE en_US:af_ZA zh_TW:zh_HK SYMLINKS= From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 03:08:55 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3A99106566B; Wed, 17 Jun 2009 03:08:55 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 913F28FC18; Wed, 17 Jun 2009 03:08:55 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H38tAd060640; Wed, 17 Jun 2009 03:08:55 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H38tBX060637; Wed, 17 Jun 2009 03:08:55 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906170308.n5H38tBX060637@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Jun 2009 03:08:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194324 - stable/7/share/timedef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 03:08:56 -0000 Author: edwin Date: Wed Jun 17 03:08:55 2009 New Revision: 194324 URL: http://svn.freebsd.org/changeset/base/194324 Log: Invalid (long) date format in pl_PL.ISO8859-2.src Date format is %a %e %b %X %Y %Z (e.g "sob 19 sty 15:46:50 2008 CET") but should be "%a %e %b %Y %X %Z" (e.g. "sob 19 sty 2008 15:46:50 CET"). PR: conf/119804 Submitted by: Bodek Modified: stable/7/share/timedef/ (props changed) stable/7/share/timedef/pl_PL.ISO8859-2.src stable/7/share/timedef/pl_PL.UTF-8.src Modified: stable/7/share/timedef/pl_PL.ISO8859-2.src ============================================================================== --- stable/7/share/timedef/pl_PL.ISO8859-2.src Wed Jun 17 03:04:30 2009 (r194323) +++ stable/7/share/timedef/pl_PL.ISO8859-2.src Wed Jun 17 03:08:55 2009 (r194324) @@ -72,7 +72,7 @@ sobota # # date_fmt # -%a %e %b %X %Y %Z +%a %e %b %Y %X %Z # # Long months names (alternative) # Modified: stable/7/share/timedef/pl_PL.UTF-8.src ============================================================================== --- stable/7/share/timedef/pl_PL.UTF-8.src Wed Jun 17 03:04:30 2009 (r194323) +++ stable/7/share/timedef/pl_PL.UTF-8.src Wed Jun 17 03:08:55 2009 (r194324) @@ -72,7 +72,7 @@ sobota # # date_fmt # -%a %e %b %X %Y %Z +%a %e %b %Y %X %Z # # Long months names (alternative) # From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 03:14:20 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56089106564A; Wed, 17 Jun 2009 03:14:20 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3ED48FC0C; Wed, 17 Jun 2009 03:14:18 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H3EIUR060993; Wed, 17 Jun 2009 03:14:18 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H3EIq0060990; Wed, 17 Jun 2009 03:14:18 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906170314.n5H3EIq0060990@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Jun 2009 03:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194326 - stable/7/share/colldef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 03:14:20 -0000 Author: edwin Date: Wed Jun 17 03:14:18 2009 New Revision: 194326 URL: http://svn.freebsd.org/changeset/base/194326 Log: Croatian locale support for hr_HR.ISO8859-2 Without this patch /usr/share/locale/hr_HR.ISO8859-2/LC_COLLATE is a link to the ../la_LN.ISO8859-2/LC_COLLATE. It means that there is no support for Croatian locale. PR: conf/120113 Submitted by: Simun Mikecin Added: stable/7/share/colldef/hr_HR.ISO8859-2.src - copied unchanged from r193961, head/share/colldef/hr_HR.ISO8859-2.src Modified: stable/7/share/colldef/ (props changed) stable/7/share/colldef/Makefile Modified: stable/7/share/colldef/Makefile ============================================================================== --- stable/7/share/colldef/Makefile Wed Jun 17 03:09:13 2009 (r194325) +++ stable/7/share/colldef/Makefile Wed Jun 17 03:14:18 2009 (r194326) @@ -14,6 +14,7 @@ LOCALES= bg_BG.CP1251 \ es_ES.ISO8859-15 \ et_EE.ISO8859-15 \ hi_IN.ISCII-DEV \ + hr_HR.ISO8859-2 \ hy_AM.ARMSCII-8 \ is_IS.ISO8859-1 \ is_IS.ISO8859-15 \ @@ -74,7 +75,7 @@ ISO8859-15_ISO8859-15= \ no_NO:nb_NO no_NO:nn_NO \ ${LATIN1LINKS:C/^/la_LN:/} -LATIN2LINKS= hr_HR hu_HU ro_RO sr_YU +LATIN2LINKS= hu_HU ro_RO sr_YU ISO8859-2_ISO8859-2= ${LATIN2LINKS:C/^/la_LN:/} cs_CZ:sk_SK US-ASCII_Big5HKSCS= la_LN:zh_HK Copied: stable/7/share/colldef/hr_HR.ISO8859-2.src (from r193961, head/share/colldef/hr_HR.ISO8859-2.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/colldef/hr_HR.ISO8859-2.src Wed Jun 17 03:14:18 2009 (r194326, copy of r193961, head/share/colldef/hr_HR.ISO8859-2.src) @@ -0,0 +1,39 @@ +# +# Croatian collation sequence +# 2007-01-29 numisemis at yahoo dot com +# +# $FreeBSD$ +# + +charmap map.ISO8859-2 +order \ +# controls + ;...;;;...;;\ +# + ;;!;\";;\ + ;;\ + %;&;<',>;<';>;';\(;\);*;+;<-:>;<*X>;\,;<-->;-;.;<'.>;/;\ +# digits + 0;...;9;\ +# + :;\;;\<;=;>;?;;;\ +# capital + (A,,>,,,);\ + B;(C,);;;(D,);;(E,,,,);\ + F;G;H;(I,,>);\ + J;K;(L,,,);M;(N,,);(O,,>,,);\ + P;Q;(R,,);(S,,);;(T,,);\ + (U,,,,);\ + V;W;X;(Y,);(Z,,);;\ +# + [;\\;];^;<':>;<'">;<'<>;<'(>;_;<''>;`;\ +# small + (a,,>,,,);\ + b;(c,);;;(d,);;(e,,,,);\ + f;g;h;(i,,>);\ + j;k;(l,,,);m;(n,,);(o,,>,,);\ + p;q;(r,,);(s,,,);;(t,,);\ + (u,,,,);\ + v;w;x;(y,);(z,,);;\ +# + \{;|;\};~;;
From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 03:15:23 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC3131065673; Wed, 17 Jun 2009 03:15:23 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 993CA8FC08; Wed, 17 Jun 2009 03:15:23 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H3FNZY061069; Wed, 17 Jun 2009 03:15:23 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H3FNBX061065; Wed, 17 Jun 2009 03:15:23 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906170315.n5H3FNBX061065@svn.freebsd.org> From: Edwin Groothuis Date: Wed, 17 Jun 2009 03:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194327 - stable/7/share/monetdef X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 03:15:24 -0000 Author: edwin Date: Wed Jun 17 03:15:23 2009 New Revision: 194327 URL: http://svn.freebsd.org/changeset/base/194327 Log: MFC of 193962 Add euro symbol to pt_PT locale using other encodings PR: conf/98815 Submitted by: Rui Lopes Added: stable/7/share/monetdef/pt_PT.ISO8859-15.src - copied unchanged from r193962, head/share/monetdef/pt_PT.ISO8859-15.src stable/7/share/monetdef/pt_PT.UTF-8.src - copied unchanged from r193962, head/share/monetdef/pt_PT.UTF-8.src Modified: stable/7/share/monetdef/ (props changed) stable/7/share/monetdef/Makefile Modified: stable/7/share/monetdef/Makefile ============================================================================== --- stable/7/share/monetdef/Makefile Wed Jun 17 03:14:18 2009 (r194326) +++ stable/7/share/monetdef/Makefile Wed Jun 17 03:15:23 2009 (r194327) @@ -52,6 +52,8 @@ LOCALES= af_ZA.ISO8859-1 \ pl_PL.UTF-8 \ pt_BR.ISO8859-1 \ pt_PT.ISO8859-1 \ + pt_PT.ISO8859-15 \ + pt_PT.UTF-8 \ ro_RO.ISO8859-2 \ ru_RU.CP1251 \ ru_RU.CP866 \ @@ -105,12 +107,12 @@ ISO8859-1_ISO8859-1= ca_ES:ca_AD ca_ES:c ISO8859-1_ISO8859-15= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ en_AU en_CA en_GB en_NZ en_US es_ES \ fi_FI fr_BE fr_CA fr_CH fr_FR \ - is_IS it_IT it_CH nl_BE nl_NL nb_NO nn_NO no_NO pt_PT sv_SE + is_IS it_IT it_CH nl_BE nl_NL nb_NO nn_NO no_NO sv_SE ISO8859-1_US-ASCII= en_AU en_CA en_GB en_NZ en_US ISO8859-1_UTF-8= af_ZA ca_AD ca_ES ca_FR ca_IT da_DK de_AT de_CH de_DE \ en_AU en_CA en_NZ en_US es_ES \ fi_FI fr_BE fr_CA fr_FR is_IS it_IT nl_BE \ - nl_NL nb_NO nn_NO no_NO pt_BR pt_PT sv_SE + nl_NL nb_NO nn_NO no_NO pt_BR sv_SE ISO8859-2_UTF-8= hr_HR hu_HU ro_RO sk_SK sl_SI sr_YU ISO8859-7_UTF-8= el_GR ISO8859-9_UTF-8= tr_TR Copied: stable/7/share/monetdef/pt_PT.ISO8859-15.src (from r193962, head/share/monetdef/pt_PT.ISO8859-15.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/monetdef/pt_PT.ISO8859-15.src Wed Jun 17 03:15:23 2009 (r194327, copy of r193962, head/share/monetdef/pt_PT.ISO8859-15.src) @@ -0,0 +1,36 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# int_curr_symbol (last character always SPACE) +EUR +# currency_symbol +¤ +# mon_decimal_point +, +# mon_thousands_sep +. +# mon_grouping, separated by ; +3;3 +# positive_sign + +# negative_sign +- +# int_frac_digits +2 +# frac_digits +2 +# p_cs_precedes +0 +# p_sep_by_space +1 +# n_cs_precedes +0 +# n_sep_by_space +1 +# p_sign_posn +1 +# n_sign_posn +1 +# EOF Copied: stable/7/share/monetdef/pt_PT.UTF-8.src (from r193962, head/share/monetdef/pt_PT.UTF-8.src) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/monetdef/pt_PT.UTF-8.src Wed Jun 17 03:15:23 2009 (r194327, copy of r193962, head/share/monetdef/pt_PT.UTF-8.src) @@ -0,0 +1,36 @@ +# $FreeBSD$ +# +# WARNING: spaces may be essential at the end of lines +# WARNING: empty lines are essential too +# +# int_curr_symbol (last character always SPACE) +EUR +# currency_symbol +€ +# mon_decimal_point +, +# mon_thousands_sep +. +# mon_grouping, separated by ; +3;3 +# positive_sign + +# negative_sign +- +# int_frac_digits +2 +# frac_digits +2 +# p_cs_precedes +0 +# p_sep_by_space +1 +# n_cs_precedes +0 +# n_sep_by_space +1 +# p_sign_posn +1 +# n_sign_posn +1 +# EOF From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 07:05:37 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E39D106566B; Wed, 17 Jun 2009 07:05:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 313868FC18; Wed, 17 Jun 2009 07:05:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H75bK9065638; Wed, 17 Jun 2009 07:05:37 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H75bKn065636; Wed, 17 Jun 2009 07:05:37 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906170705.n5H75bKn065636@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 17 Jun 2009 07:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194336 - stable/7/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 07:05:38 -0000 Author: des Date: Wed Jun 17 07:05:36 2009 New Revision: 194336 URL: http://svn.freebsd.org/changeset/base/194336 Log: merge r188766: fix a type-punning bug. Modified: stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Modified: stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_server.c ============================================================================== --- stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Jun 17 07:03:03 2009 (r194335) +++ stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_server.c Wed Jun 17 07:05:36 2009 (r194336) @@ -70,6 +70,22 @@ struct dom_binding; static struct passwd yp_password; static void +xlate_passwd(struct x_master_passwd *xpwd, struct passwd *pwd) +{ + pwd->pw_name = xpwd->pw_name; + pwd->pw_passwd = xpwd->pw_passwd; + pwd->pw_uid = xpwd->pw_uid; + pwd->pw_gid = xpwd->pw_gid; + pwd->pw_change = xpwd->pw_change; + pwd->pw_class = xpwd->pw_class; + pwd->pw_gecos = xpwd->pw_gecos; + pwd->pw_dir = xpwd->pw_dir; + pwd->pw_shell = xpwd->pw_shell; + pwd->pw_expire = xpwd->pw_expire; + pwd->pw_fields = xpwd->pw_fields; +} + +static void copy_yp_pass(char *p, int x, int m) { char *t, *s = p; @@ -709,6 +725,7 @@ yppasswdproc_update_master_1_svc(master_ char passfile_hold_buf[MAXPATHLEN + 2]; struct sockaddr_in *rqhost; SVCXPRT *transp; + struct passwd newpasswd; result = 1; transp = rqstp->rq_xprt; @@ -820,7 +837,8 @@ allow additions to be made to the passwo yp_error("pw_tmp() failed"); return &result; } - if (pw_copy(pfd, tfd, (struct passwd *)&argp->newpw, NULL) == -1) { + xlate_passwd(&argp->newpw, &newpasswd); + if (pw_copy(pfd, tfd, &newpasswd, NULL) == -1) { pw_fini(); yp_error("pw_copy() failed"); return &result; @@ -858,8 +876,8 @@ allow additions to be made to the passwo pw_fini(); if (inplace) { - if ((rval = update_inplace((struct passwd *)&argp->newpw, - argp->domain))) { + xlate_passwd(&argp->newpw, &newpasswd); + if ((rval = update_inplace(&newpasswd, argp->domain))) { yp_error("inplace update failed -- rebuilding maps"); } } From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 09:29:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CBD106566B; Wed, 17 Jun 2009 09:29:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 426068FC17; Wed, 17 Jun 2009 09:29:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H9TJoj068731; Wed, 17 Jun 2009 09:29:19 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H9TJQ0068728; Wed, 17 Jun 2009 09:29:19 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200906170929.n5H9TJQ0068728@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Jun 2009 09:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194338 - stable/7/sbin/fsck_msdosfs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 09:29:20 -0000 Author: avg Date: Wed Jun 17 09:29:18 2009 New Revision: 194338 URL: http://svn.freebsd.org/changeset/base/194338 Log: MFC r193943: fsck_msdosfs: accept no-op -C option Modified: stable/7/sbin/fsck_msdosfs/ (props changed) stable/7/sbin/fsck_msdosfs/fsck_msdosfs.8 stable/7/sbin/fsck_msdosfs/main.c Modified: stable/7/sbin/fsck_msdosfs/fsck_msdosfs.8 ============================================================================== --- stable/7/sbin/fsck_msdosfs/fsck_msdosfs.8 Wed Jun 17 07:11:38 2009 (r194337) +++ stable/7/sbin/fsck_msdosfs/fsck_msdosfs.8 Wed Jun 17 09:29:18 2009 (r194338) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 1995 +.Dd June 4, 2009 .Dt FSCK_MSDOSFS 8 .Os .Sh NAME @@ -41,10 +41,10 @@ .Sh SYNOPSIS .Nm .Fl p -.Op Fl f +.Op Fl Cf .Ar filesystem ... .Nm -.Op Fl ny +.Op Fl Cny .Ar filesystem ... .Sh DESCRIPTION The @@ -80,6 +80,10 @@ making any changes. .Pp The options are as follows: .Bl -tag -width indent +.It Fl C +Compatibility with the corresponding +.Xr fsck 8 +option (skip check if clean), defined to no-op. .It Fl F Compatibility with the wrapper .Xr fsck 8 Modified: stable/7/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/7/sbin/fsck_msdosfs/main.c Wed Jun 17 07:11:38 2009 (r194337) +++ stable/7/sbin/fsck_msdosfs/main.c Wed Jun 17 09:29:18 2009 (r194338) @@ -74,8 +74,10 @@ main(int argc, char **argv) int ch; skipclean = 1; - while ((ch = getopt(argc, argv, "fFnpy")) != -1) { + while ((ch = getopt(argc, argv, "CfFnpy")) != -1) { switch (ch) { + case 'C': /* for fsck_ffs compatibility */ + break; case 'f': skipclean = 0; break; From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 09:42:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CB74106566C; Wed, 17 Jun 2009 09:42:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49F7D8FC1A; Wed, 17 Jun 2009 09:42:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5H9gUQU069091; Wed, 17 Jun 2009 09:42:30 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5H9gUi7069088; Wed, 17 Jun 2009 09:42:30 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200906170942.n5H9gUi7069088@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Jun 2009 09:42:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194339 - in stable/7/etc: . defaults mtree rc.d X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 09:42:31 -0000 Author: avg Date: Wed Jun 17 09:42:30 2009 New Revision: 194339 URL: http://svn.freebsd.org/changeset/base/194339 Log: MFC r193944: rc.d/fsck: allow additional options via fsck_y_flags Modified: stable/7/etc/ (props changed) stable/7/etc/defaults/rc.conf stable/7/etc/mtree/ (props changed) stable/7/etc/rc.d/ (props changed) stable/7/etc/rc.d/fsck Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Wed Jun 17 09:29:18 2009 (r194338) +++ stable/7/etc/defaults/rc.conf Wed Jun 17 09:42:30 2009 (r194339) @@ -83,6 +83,7 @@ geli_swap_flags="-e aes -l 256 -s 4096 - root_rw_mount="YES" # Set to NO to inhibit remounting root read-write. fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails. +fsck_y_flags="" # Additional flags for fsck -y background_fsck="YES" # Attempt to run fsck in the background where possible. background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems. Modified: stable/7/etc/rc.d/fsck ============================================================================== --- stable/7/etc/rc.d/fsck Wed Jun 17 09:29:18 2009 (r194338) +++ stable/7/etc/rc.d/fsck Wed Jun 17 09:42:30 2009 (r194339) @@ -44,8 +44,8 @@ fsck_start() ;; 8) if checkyesno fsck_y_enable; then - echo "File system preen failed, trying fsck -y." - fsck -y + echo "File system preen failed, trying fsck -y ${fsck_y_flags}" + fsck -y ${fsck_y_flags} case $? in 0) ;; From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 10:15:07 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29836106568E; Wed, 17 Jun 2009 10:15:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDC0D8FC1E; Wed, 17 Jun 2009 10:15:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HAF6U8070071; Wed, 17 Jun 2009 10:15:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HAF6Vq070070; Wed, 17 Jun 2009 10:15:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200906171015.n5HAF6Vq070070@svn.freebsd.org> From: Andriy Gapon Date: Wed, 17 Jun 2009 10:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194341 - in stable/7/etc: . mtree rc.d X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 10:15:08 -0000 Author: avg Date: Wed Jun 17 10:15:06 2009 New Revision: 194341 URL: http://svn.freebsd.org/changeset/base/194341 Log: svn management: move mergeinfo from subdirectories to parent in etc No contents changed, only svn:mergeinfo property affected. Record mergeinfo for r190575 and r193908 in etc. This is, obviously, a direct commit to stable/7. Reviewed by: des Modified: stable/7/etc/ (props changed) stable/7/etc/mtree/ (props changed) stable/7/etc/rc.d/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 11:21:27 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D345106566C; Wed, 17 Jun 2009 11:21:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 104658FC0C; Wed, 17 Jun 2009 11:21:27 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HBLPdD073542; Wed, 17 Jun 2009 11:21:25 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HBLPwR073541; Wed, 17 Jun 2009 11:21:25 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906171121.n5HBLPwR073541@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 17 Jun 2009 11:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194347 - in stable/7/sys: . contrib/pf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 11:21:27 -0000 Author: des Date: Wed Jun 17 11:21:25 2009 New Revision: 194347 URL: http://svn.freebsd.org/changeset/base/194347 Log: Nuke incorrect mergeinfo: /head:r189748 /head/sys/net:r182880 The correct mergeinfo for these revisions was already present. Pointy hat to: emax, rpaulo Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 11:40:45 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC866106564A; Wed, 17 Jun 2009 11:40:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9D198FC08; Wed, 17 Jun 2009 11:40:45 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HBejkj074262; Wed, 17 Jun 2009 11:40:45 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HBejnY074260; Wed, 17 Jun 2009 11:40:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906171140.n5HBejnY074260@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 17 Jun 2009 11:40:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194350 - in stable/7/sys: . contrib/pf dev/aic dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 11:40:46 -0000 Author: des Date: Wed Jun 17 11:40:45 2009 New Revision: 194350 URL: http://svn.freebsd.org/changeset/base/194350 Log: merge r192066: redundant assignment. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/aic/aic.c stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/dev/aic/aic.c ============================================================================== --- stable/7/sys/dev/aic/aic.c Wed Jun 17 11:38:16 2009 (r194349) +++ stable/7/sys/dev/aic/aic.c Wed Jun 17 11:40:45 2009 (r194350) @@ -168,7 +168,7 @@ aic_action(struct cam_sim *sim, union cc } case XPT_SET_TRAN_SETTINGS: { - struct ccb_trans_settings *cts = cts = &ccb->cts; + struct ccb_trans_settings *cts = &ccb->cts; struct aic_tinfo *ti = &aic->tinfo[ccb->ccb_h.target_id]; struct ccb_trans_settings_scsi *scsi = &cts->proto_specific.scsi; From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 13:12:44 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116D9106568C; Wed, 17 Jun 2009 13:12:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F23C58FC20; Wed, 17 Jun 2009 13:12:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HDChlr076530; Wed, 17 Jun 2009 13:12:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HDCh0m076528; Wed, 17 Jun 2009 13:12:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906171312.n5HDCh0m076528@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Jun 2009 13:12:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194359 - in stable/7/sys: . compat/freebsd32 contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 13:12:45 -0000 Author: kib Date: Wed Jun 17 13:12:43 2009 New Revision: 194359 URL: http://svn.freebsd.org/changeset/base/194359 Log: MFC r193916: Add several syscall compat32 entries for extattr manipulation syscalls. Modified: stable/7/sys/ (props changed) stable/7/sys/compat/freebsd32/syscalls.master stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/7/sys/compat/freebsd32/syscalls.master Wed Jun 17 12:47:27 2009 (r194358) +++ stable/7/sys/compat/freebsd32/syscalls.master Wed Jun 17 13:12:43 2009 (r194359) @@ -712,9 +712,17 @@ 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link -412 AUE_EXTATTR_SET_LINK UNIMPL extattr_set_link -413 AUE_EXTATTR_GET_LINK UNIMPL extattr_get_link -414 AUE_EXTATTR_DELETE_LINK UNIMPL extattr_delete_link +412 AUE_EXTATTR_SET_LINK NOPROTO { int extattr_set_link( \ + const char *path, int attrnamespace, \ + const char *attrname, void *data, \ + size_t nbytes); } +413 AUE_EXTATTR_GET_LINK NOPROTO { ssize_t extattr_get_link( \ + const char *path, int attrnamespace, \ + const char *attrname, void *data, \ + size_t nbytes); } +414 AUE_EXTATTR_DELETE_LINK NOPROTO { int extattr_delete_link( \ + const char *path, int attrnamespace, \ + const char *attrname); } 415 AUE_NULL UNIMPL __mac_execve 416 AUE_SIGACTION STD { int freebsd32_sigaction(int sig, \ struct sigaction32 *act, \ @@ -745,9 +753,15 @@ 434 AUE_NULL STD { int freebsd32_umtx_lock(struct umtx *umtx); } 435 AUE_NULL STD { int freebsd32_umtx_unlock(struct umtx *umtx); } 436 AUE_NULL NOPROTO { int jail_attach(int jid); } -437 AUE_EXTATTR_LIST_FD UNIMPL extattr_list_fd -438 AUE_EXTATTR_LIST_FILE UNIMPL extattr_list_file -439 AUE_EXTATTR_LIST_LINK UNIMPL extattr_list_link +437 AUE_EXTATTR_LIST_FD NOPROTO { ssize_t extattr_list_fd(int fd, \ + int attrnamespace, void *data, \ + size_t nbytes); } +438 AUE_EXTATTR_LIST_FILE NOPROTO { ssize_t extattr_list_file( \ + const char *path, int attrnamespace, \ + void *data, size_t nbytes); } +439 AUE_EXTATTR_LIST_LINK NOPROTO { ssize_t extattr_list_link( \ + const char *path, int attrnamespace, \ + void *data, size_t nbytes); } 440 AUE_NULL UNIMPL kse_switchin 441 AUE_NULL UNIMPL ksem_timedwait 442 AUE_NULL STD { int freebsd32_thr_suspend( \ From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 13:13:24 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C6F1065675; Wed, 17 Jun 2009 13:13:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC958FC12; Wed, 17 Jun 2009 13:13:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HDDOdw076584; Wed, 17 Jun 2009 13:13:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HDDOHe076579; Wed, 17 Jun 2009 13:13:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906171313.n5HDDOHe076579@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 17 Jun 2009 13:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194360 - stable/7/sys/compat/freebsd32 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 13:13:25 -0000 Author: kib Date: Wed Jun 17 13:13:23 2009 New Revision: 194360 URL: http://svn.freebsd.org/changeset/base/194360 Log: Regenerate Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h stable/7/sys/compat/freebsd32/freebsd32_syscall.h stable/7/sys/compat/freebsd32/freebsd32_syscalls.c stable/7/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_proto.h Wed Jun 17 13:12:43 2009 (r194359) +++ stable/7/sys/compat/freebsd32/freebsd32_proto.h Wed Jun 17 13:13:23 2009 (r194360) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 188281 2009-02-07 13:19:08Z bz + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 194359 2009-06-17 13:12:43Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/7/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscall.h Wed Jun 17 13:12:43 2009 (r194359) +++ stable/7/sys/compat/freebsd32/freebsd32_syscall.h Wed Jun 17 13:13:23 2009 (r194360) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 188281 2009-02-07 13:19:08Z bz + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 194359 2009-06-17 13:12:43Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -308,6 +308,9 @@ #define FREEBSD32_SYS_statfs 396 #define FREEBSD32_SYS_fstatfs 397 #define FREEBSD32_SYS_fhstatfs 398 +#define FREEBSD32_SYS_extattr_set_link 412 +#define FREEBSD32_SYS_extattr_get_link 413 +#define FREEBSD32_SYS_extattr_delete_link 414 #define FREEBSD32_SYS_freebsd32_sigaction 416 #define FREEBSD32_SYS_freebsd32_sigreturn 417 #define FREEBSD32_SYS_freebsd32_getcontext 421 @@ -320,6 +323,9 @@ #define FREEBSD32_SYS_freebsd32_umtx_lock 434 #define FREEBSD32_SYS_freebsd32_umtx_unlock 435 #define FREEBSD32_SYS_jail_attach 436 +#define FREEBSD32_SYS_extattr_list_fd 437 +#define FREEBSD32_SYS_extattr_list_file 438 +#define FREEBSD32_SYS_extattr_list_link 439 #define FREEBSD32_SYS_freebsd32_thr_suspend 442 #define FREEBSD32_SYS_thr_wake 443 #define FREEBSD32_SYS_kldunloadf 444 Modified: stable/7/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jun 17 13:12:43 2009 (r194359) +++ stable/7/sys/compat/freebsd32/freebsd32_syscalls.c Wed Jun 17 13:13:23 2009 (r194360) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 188281 2009-02-07 13:19:08Z bz + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 194359 2009-06-17 13:12:43Z kib */ const char *freebsd32_syscallnames[] = { @@ -419,9 +419,9 @@ const char *freebsd32_syscallnames[] = { "#409", /* 409 = __mac_get_pid */ "#410", /* 410 = __mac_get_link */ "#411", /* 411 = __mac_set_link */ - "#412", /* 412 = extattr_set_link */ - "#413", /* 413 = extattr_get_link */ - "#414", /* 414 = extattr_delete_link */ + "extattr_set_link", /* 412 = extattr_set_link */ + "extattr_get_link", /* 413 = extattr_get_link */ + "extattr_delete_link", /* 414 = extattr_delete_link */ "#415", /* 415 = __mac_execve */ "freebsd32_sigaction", /* 416 = freebsd32_sigaction */ "freebsd32_sigreturn", /* 417 = freebsd32_sigreturn */ @@ -444,9 +444,9 @@ const char *freebsd32_syscallnames[] = { "freebsd32_umtx_lock", /* 434 = freebsd32_umtx_lock */ "freebsd32_umtx_unlock", /* 435 = freebsd32_umtx_unlock */ "jail_attach", /* 436 = jail_attach */ - "#437", /* 437 = extattr_list_fd */ - "#438", /* 438 = extattr_list_file */ - "#439", /* 439 = extattr_list_link */ + "extattr_list_fd", /* 437 = extattr_list_fd */ + "extattr_list_file", /* 438 = extattr_list_file */ + "extattr_list_link", /* 439 = extattr_list_link */ "#440", /* 440 = kse_switchin */ "#441", /* 441 = ksem_timedwait */ "freebsd32_thr_suspend", /* 442 = freebsd32_thr_suspend */ Modified: stable/7/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/7/sys/compat/freebsd32/freebsd32_sysent.c Wed Jun 17 13:12:43 2009 (r194359) +++ stable/7/sys/compat/freebsd32/freebsd32_sysent.c Wed Jun 17 13:13:23 2009 (r194360) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 188281 2009-02-07 13:19:08Z bz + * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 194359 2009-06-17 13:12:43Z kib */ #include "opt_compat.h" @@ -450,9 +450,9 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 409 = __mac_get_pid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 410 = __mac_get_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 411 = __mac_set_link */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 412 = extattr_set_link */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 413 = extattr_get_link */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 414 = extattr_delete_link */ + { AS(extattr_set_link_args), (sy_call_t *)extattr_set_link, AUE_EXTATTR_SET_LINK, NULL, 0, 0 }, /* 412 = extattr_set_link */ + { AS(extattr_get_link_args), (sy_call_t *)extattr_get_link, AUE_EXTATTR_GET_LINK, NULL, 0, 0 }, /* 413 = extattr_get_link */ + { AS(extattr_delete_link_args), (sy_call_t *)extattr_delete_link, AUE_EXTATTR_DELETE_LINK, NULL, 0, 0 }, /* 414 = extattr_delete_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 415 = __mac_execve */ { AS(freebsd32_sigaction_args), (sy_call_t *)freebsd32_sigaction, AUE_SIGACTION, NULL, 0, 0 }, /* 416 = freebsd32_sigaction */ { AS(freebsd32_sigreturn_args), (sy_call_t *)freebsd32_sigreturn, AUE_SIGRETURN, NULL, 0, 0 }, /* 417 = freebsd32_sigreturn */ @@ -475,9 +475,9 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_umtx_lock_args), (sy_call_t *)freebsd32_umtx_lock, AUE_NULL, NULL, 0, 0 }, /* 434 = freebsd32_umtx_lock */ { AS(freebsd32_umtx_unlock_args), (sy_call_t *)freebsd32_umtx_unlock, AUE_NULL, NULL, 0, 0 }, /* 435 = freebsd32_umtx_unlock */ { AS(jail_attach_args), (sy_call_t *)jail_attach, AUE_NULL, NULL, 0, 0 }, /* 436 = jail_attach */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 437 = extattr_list_fd */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 438 = extattr_list_file */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 439 = extattr_list_link */ + { AS(extattr_list_fd_args), (sy_call_t *)extattr_list_fd, AUE_EXTATTR_LIST_FD, NULL, 0, 0 }, /* 437 = extattr_list_fd */ + { AS(extattr_list_file_args), (sy_call_t *)extattr_list_file, AUE_EXTATTR_LIST_FILE, NULL, 0, 0 }, /* 438 = extattr_list_file */ + { AS(extattr_list_link_args), (sy_call_t *)extattr_list_link, AUE_EXTATTR_LIST_LINK, NULL, 0, 0 }, /* 439 = extattr_list_link */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 440 = kse_switchin */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 441 = ksem_timedwait */ { AS(freebsd32_thr_suspend_args), (sy_call_t *)freebsd32_thr_suspend, AUE_NULL, NULL, 0, 0 }, /* 442 = freebsd32_thr_suspend */ From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 14:00:57 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 687C21065670; Wed, 17 Jun 2009 14:00:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7868FC23; Wed, 17 Jun 2009 14:00:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HE0v7P077696; Wed, 17 Jun 2009 14:00:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HE0vDC077694; Wed, 17 Jun 2009 14:00:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906171400.n5HE0vDC077694@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Jun 2009 14:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194362 - in stable/7/sys: . contrib/pf dev/ata dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 14:00:58 -0000 Author: jhb Date: Wed Jun 17 14:00:56 2009 New Revision: 194362 URL: http://svn.freebsd.org/changeset/base/194362 Log: MFC: Preallocate the four BARs in ALI SATA controllers during the chipinit routine. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ata/ata-chipset.c stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/dev/ata/ata-chipset.c ============================================================================== --- stable/7/sys/dev/ata/ata-chipset.c Wed Jun 17 13:36:08 2009 (r194361) +++ stable/7/sys/dev/ata/ata-chipset.c Wed Jun 17 14:00:56 2009 (r194362) @@ -198,6 +198,9 @@ static int ata_atapi(device_t dev); static int ata_check_80pin(device_t dev, int mode); static int ata_mode2idx(int mode); +struct ali_sata_resources { + struct resource *bars[4]; +}; /* * generic ATA support functions @@ -1094,6 +1097,8 @@ static int ata_ali_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + struct ali_sata_resources *res; + int i, rid; if (ata_setup_interrupt(dev)) return ENXIO; @@ -1108,6 +1113,22 @@ ata_ali_chipinit(device_t dev) if ((ctlr->chip->chipid == ATA_ALI_5288) && (ata_ahci_chipinit(dev) != ENXIO)) return 0; + + /* Allocate resources for later use by channel attach routines. */ + res = malloc(sizeof(struct ali_sata_resources), M_TEMP, M_WAITOK); + for (i = 0; i < 4; i++) { + rid = PCIR_BAR(i); + res->bars[i] = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + RF_ACTIVE); + if (res->bars[i] == NULL) { + device_printf(dev, "Failed to allocate BAR %d\n", i); + for (i--; i >=0; i--) + bus_release_resource(dev, SYS_RES_IOPORT, + PCIR_BAR(i), res->bars[i]); + free(res, M_TEMP); + } + } + ctlr->chipset_data = res; break; case ALINEW: @@ -1162,20 +1183,18 @@ ata_ali_sata_allocate(device_t dev) device_t parent = device_get_parent(dev); struct ata_pci_controller *ctlr = device_get_softc(parent); struct ata_channel *ch = device_get_softc(dev); + struct ali_sata_resources *res; struct resource *io = NULL, *ctlio = NULL; int unit01 = (ch->unit & 1), unit10 = (ch->unit & 2); - int i, rid; - - rid = PCIR_BAR(0) + (unit01 ? 8 : 0); - io = bus_alloc_resource_any(parent, SYS_RES_IOPORT, &rid, RF_ACTIVE); - if (!io) - return ENXIO; + int i; - rid = PCIR_BAR(1) + (unit01 ? 8 : 0); - ctlio = bus_alloc_resource_any(parent, SYS_RES_IOPORT, &rid, RF_ACTIVE); - if (!ctlio) { - bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); - return ENXIO; + res = ctlr->chipset_data; + if (unit01) { + io = res->bars[2]; + ctlio = res->bars[3]; + } else { + io = res->bars[0]; + ctlio = res->bars[1]; } for (i = ATA_DATA; i <= ATA_COMMAND; i ++) { From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 14:45:58 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF5810656A5; Wed, 17 Jun 2009 14:45:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAFCC8FC19; Wed, 17 Jun 2009 14:45:58 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HEjwg3078775; Wed, 17 Jun 2009 14:45:58 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HEjwb9078773; Wed, 17 Jun 2009 14:45:58 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906171445.n5HEjwb9078773@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 17 Jun 2009 14:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194365 - in stable/7/sys: . contrib/pf dev/ath/ath_hal modules/linux X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 14:45:59 -0000 Author: des Date: Wed Jun 17 14:45:58 2009 New Revision: 194365 URL: http://svn.freebsd.org/changeset/base/194365 Log: merge r192852, r192855: opt_apic.h is only used on i386. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/modules/linux/Makefile Modified: stable/7/sys/modules/linux/Makefile ============================================================================== --- stable/7/sys/modules/linux/Makefile Wed Jun 17 14:32:08 2009 (r194364) +++ stable/7/sys/modules/linux/Makefile Wed Jun 17 14:45:58 2009 (r194365) @@ -17,7 +17,10 @@ SRCS= linux${SFX}_dummy.c linux_emul.c l device_if.h bus_if.h assym.s # XXX: for assym.s -SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h opt_hwpmc_hooks.h +SRCS+= opt_kstack_pages.h opt_nfs.h opt_compat.h opt_hwpmc_hooks.h +.if ${MACHINE_ARCH} == "i386" +SRCS+= opt_apic.h +.endif OBJS= linux${SFX}_locore.o linux${SFX}_support.o From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 14:50:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 337081065686; Wed, 17 Jun 2009 14:50:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 084108FC15; Wed, 17 Jun 2009 14:50:42 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HEof2m078971; Wed, 17 Jun 2009 14:50:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HEofB5078969; Wed, 17 Jun 2009 14:50:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200906171450.n5HEofB5078969@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Wed, 17 Jun 2009 14:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194367 - in stable/7/sys: . contrib/pf dev/ath/ath_hal fs/pseudofs X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 14:50:42 -0000 Author: des Date: Wed Jun 17 14:50:41 2009 New Revision: 194367 URL: http://svn.freebsd.org/changeset/base/194367 Log: merge r193556: drop Giant from pseudofs. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/fs/pseudofs/pseudofs_vncache.c Modified: stable/7/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- stable/7/sys/fs/pseudofs/pseudofs_vncache.c Wed Jun 17 14:47:06 2009 (r194366) +++ stable/7/sys/fs/pseudofs/pseudofs_vncache.c Wed Jun 17 14:50:41 2009 (r194367) @@ -270,13 +270,13 @@ pfs_vncache_free(struct vnode *vp) * The only way to improve this situation is to change the data structure * used to implement the cache. */ -void -pfs_purge(struct pfs_node *pn) +static void +pfs_purge_locked(struct pfs_node *pn) { struct pfs_vdata *pvd; struct vnode *vnp; - mtx_lock(&pfs_vncache_mutex); + mtx_assert(&pfs_vncache_mutex, MA_OWNED); pvd = pfs_vncache; while (pvd != NULL) { if (pvd->pvd_dead || (pn != NULL && pvd->pvd_pn == pn)) { @@ -286,22 +286,26 @@ pfs_purge(struct pfs_node *pn) VOP_LOCK(vnp, LK_EXCLUSIVE, curthread); vgone(vnp); VOP_UNLOCK(vnp, 0, curthread); - vdrop(vnp); mtx_lock(&pfs_vncache_mutex); + vdrop(vnp); pvd = pfs_vncache; } else { pvd = pvd->pvd_next; } } +} + +void +pfs_purge(struct pfs_node *pn) +{ + + mtx_lock(&pfs_vncache_mutex); + pfs_purge_locked(pn); mtx_unlock(&pfs_vncache_mutex); } /* * Free all vnodes associated with a defunct process - * - * XXXRW: It is unfortunate that pfs_exit() always acquires and releases two - * mutexes (one of which is Giant) for every process exit, even if procfs - * isn't mounted. */ static void pfs_exit(void *arg, struct proc *p) @@ -311,13 +315,11 @@ pfs_exit(void *arg, struct proc *p) if (pfs_vncache == NULL) return; - mtx_lock(&Giant); mtx_lock(&pfs_vncache_mutex); for (pvd = pfs_vncache, dead = 0; pvd != NULL; pvd = pvd->pvd_next) if (pvd->pvd_pid == p->p_pid) dead = pvd->pvd_dead = 1; - mtx_unlock(&pfs_vncache_mutex); if (dead) - pfs_purge(NULL); - mtx_unlock(&Giant); + pfs_purge_locked(NULL); + mtx_unlock(&pfs_vncache_mutex); } From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 16:56:22 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 212CB106570D; Wed, 17 Jun 2009 16:56:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CE3F8FC26; Wed, 17 Jun 2009 16:56:22 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HGuLrL081823; Wed, 17 Jun 2009 16:56:21 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HGuLUO081821; Wed, 17 Jun 2009 16:56:21 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906171656.n5HGuLUO081821@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 17 Jun 2009 16:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194375 - in stable/7/sys: . compat/linux contrib/pf dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 16:56:23 -0000 Author: dchagin Date: Wed Jun 17 16:56:21 2009 New Revision: 194375 URL: http://svn.freebsd.org/changeset/base/194375 Log: MFC r194203: Unlock process lock when return error from getrobustlist call. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_futex.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) Modified: stable/7/sys/compat/linux/linux_futex.c ============================================================================== --- stable/7/sys/compat/linux/linux_futex.c Wed Jun 17 16:34:40 2009 (r194374) +++ stable/7/sys/compat/linux/linux_futex.c Wed Jun 17 16:56:21 2009 (r194375) @@ -707,8 +707,10 @@ linux_get_robust_list(struct thread *td, /* XXX: ptrace? */ if (priv_check(td, PRIV_CRED_SETUID) || priv_check(td, PRIV_CRED_SETEUID) || - p_candebug(td, p)) + p_candebug(td, p)) { + PROC_UNLOCK(p); return (EPERM); + } head = em->robust_futexes; PROC_UNLOCK(p); From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 17:31:46 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95E26106567D; Wed, 17 Jun 2009 17:31:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 698288FC15; Wed, 17 Jun 2009 17:31:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HHVkkW082753; Wed, 17 Jun 2009 17:31:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HHVktG082752; Wed, 17 Jun 2009 17:31:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906171731.n5HHVktG082752@svn.freebsd.org> From: John Baldwin Date: Wed, 17 Jun 2009 17:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 17:31:47 -0000 Author: jhb Date: Wed Jun 17 17:31:45 2009 New Revision: 194377 URL: http://svn.freebsd.org/changeset/base/194377 Log: Remove useless mergeinfo. This was due to copying ath_hal from the projects branch directly into 7 rather than merging from 8 into 7. Modified: stable/7/sys/dev/ath/ath_hal/ (props changed) From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 20:04:55 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9542B1065673; Wed, 17 Jun 2009 20:04:53 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC088FC0A; Wed, 17 Jun 2009 20:04:52 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5HK4ofM020680; Thu, 18 Jun 2009 00:04:50 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Thu, 18 Jun 2009 00:04:50 +0400 (MSD) From: Dmitry Morozovsky To: John Baldwin In-Reply-To: <200906171731.n5HHVktG082752@svn.freebsd.org> Message-ID: References: <200906171731.n5HHVktG082752@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Thu, 18 Jun 2009 00:04:50 +0400 (MSD) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 20:04:57 -0000 On Wed, 17 Jun 2009, John Baldwin wrote: JB> Author: jhb JB> Date: Wed Jun 17 17:31:45 2009 JB> New Revision: 194377 JB> URL: http://svn.freebsd.org/changeset/base/194377 JB> JB> Log: JB> Remove useless mergeinfo. This was due to copying ath_hal from the JB> projects branch directly into 7 rather than merging from 8 into 7. JB> JB> Modified: JB> stable/7/sys/dev/ath/ath_hal/ (props changed) Great. There's only stable/7/sys/contrib/pf/ (props changed) on every MFC to stable/7 left yet ;-P [no pun intended, thank you very much!] -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 20:43:07 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FAFC1065678; Wed, 17 Jun 2009 20:43:07 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.freebsd.org (Postfix) with ESMTP id 317638FC0C; Wed, 17 Jun 2009 20:43:07 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 07E4B2C50D13; Wed, 17 Jun 2009 23:25:48 +0300 (EEST) Date: Wed, 17 Jun 2009 23:25:47 +0300 From: Ion-Mihai Tetcu To: John Baldwin Message-ID: <20090617232547.3ab92e5b@it.buh.tecnik93.com> In-Reply-To: <200906171731.n5HHVktG082752@svn.freebsd.org> References: <200906171731.n5HHVktG082752@svn.freebsd.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/KkOEHOyFTdawTKCsVJ1kA0u"; protocol="application/pgp-signature" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 20:43:08 -0000 --Sig_/KkOEHOyFTdawTKCsVJ1kA0u Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 17 Jun 2009 17:31:46 +0000 (UTC) John Baldwin wrote: > Author: jhb > Date: Wed Jun 17 17:31:45 2009 > New Revision: 194377 > URL: http://svn.freebsd.org/changeset/base/194377 >=20 > Log: > Remove useless mergeinfo. This was due to copying ath_hal from the > projects branch directly into 7 rather than merging from 8 into 7. >=20 > Modified: > stable/7/sys/dev/ath/ath_hal/ (props changed) Thank you! --=20 IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B --Sig_/KkOEHOyFTdawTKCsVJ1kA0u Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAko5UUwACgkQJ7GIuiH/oeXSIQCgiIJ4DYd/TWHmmoOsrybCAwuo RAUAnAn7AgyJdOr0/f0XEFfIdd6jkHoq =p0uU -----END PGP SIGNATURE----- --Sig_/KkOEHOyFTdawTKCsVJ1kA0u-- From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 21:12:32 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B60CE1065677; Wed, 17 Jun 2009 21:12:32 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A229B8FC22; Wed, 17 Jun 2009 21:12:32 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HLCWYw088436; Wed, 17 Jun 2009 21:12:32 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HLCW5f088432; Wed, 17 Jun 2009 21:12:32 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906172112.n5HLCW5f088432@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 17 Jun 2009 21:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194400 - in stable/7/sys: . amd64/linux32 contrib/pf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 21:12:33 -0000 Author: dchagin Date: Wed Jun 17 21:12:32 2009 New Revision: 194400 URL: http://svn.freebsd.org/changeset/base/194400 Log: MFC r185438: Fix iovec32 for linux32/amd64. Add a custom version of copyiniov() to deal with the 32-bit iovec pointers from userland (to be used later). Adjust prototypes for linux_readv() and linux_writev() to use new l_iovec32 definition and to match actual linux code. In particular, use ulong for fd (why ?). Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux.h stable/7/sys/amd64/linux32/linux32_machdep.c stable/7/sys/amd64/linux32/syscalls.master stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/linux32/linux.h ============================================================================== --- stable/7/sys/amd64/linux32/linux.h Wed Jun 17 21:03:27 2009 (r194399) +++ stable/7/sys/amd64/linux32/linux.h Wed Jun 17 21:12:32 2009 (r194400) @@ -879,6 +879,16 @@ typedef int l_mqd_t; (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \ LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD) +struct iovec; + +struct l_iovec32 { + uint32_t iov_base; + l_size_t iov_len; +}; + +int linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt, + struct iovec **iovp, int error); + /* robust futexes */ struct linux_robust_list { l_uintptr_t next; Modified: stable/7/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_machdep.c Wed Jun 17 21:03:27 2009 (r194399) +++ stable/7/sys/amd64/linux32/linux32_machdep.c Wed Jun 17 21:12:32 2009 (r194400) @@ -232,20 +232,15 @@ linux_execve(struct thread *td, struct l return (error); } -struct iovec32 { - u_int32_t iov_base; - int iov_len; -}; - -CTASSERT(sizeof(struct iovec32) == 8); +CTASSERT(sizeof(struct l_iovec32) == 8); static int -linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) +linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt, struct uio **uiop) { - struct iovec32 iov32; + struct l_iovec32 iov32; struct iovec *iov; struct uio *uio; - u_int iovlen; + uint32_t iovlen; int error, i; *uiop = NULL; @@ -255,7 +250,7 @@ linux32_copyinuio(struct iovec32 *iovp, uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK); iov = (struct iovec *)(uio + 1); for (i = 0; i < iovcnt; i++) { - error = copyin(&iovp[i], &iov32, sizeof(struct iovec32)); + error = copyin(&iovp[i], &iov32, sizeof(struct l_iovec32)); if (error) { free(uio, M_IOV); return (error); @@ -281,6 +276,34 @@ linux32_copyinuio(struct iovec32 *iovp, } int +linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt, struct iovec **iovp, + int error) +{ + struct l_iovec32 iov32; + struct iovec *iov; + uint32_t iovlen; + int i; + + *iovp = NULL; + if (iovcnt > UIO_MAXIOV) + return (error); + iovlen = iovcnt * sizeof(struct iovec); + iov = malloc(iovlen, M_IOV, M_WAITOK); + for (i = 0; i < iovcnt; i++) { + error = copyin(&iovp32[i], &iov32, sizeof(struct l_iovec32)); + if (error) { + free(iov, M_IOV); + return (error); + } + iov[i].iov_base = PTRIN(iov32.iov_base); + iov[i].iov_len = iov32.iov_len; + } + *iovp = iov; + return(0); + +} + +int linux_readv(struct thread *td, struct linux_readv_args *uap) { struct uio *auio; Modified: stable/7/sys/amd64/linux32/syscalls.master ============================================================================== --- stable/7/sys/amd64/linux32/syscalls.master Wed Jun 17 21:03:27 2009 (r194399) +++ stable/7/sys/amd64/linux32/syscalls.master Wed Jun 17 21:12:32 2009 (r194400) @@ -252,10 +252,10 @@ 143 AUE_FLOCK NOPROTO { int flock(int fd, int how); } 144 AUE_MSYNC STD { int linux_msync(l_ulong addr, \ l_size_t len, l_int fl); } -145 AUE_READV STD { int linux_readv(int fd, struct iovec32 *iovp, \ - u_int iovcnt); } -146 AUE_WRITEV STD { int linux_writev(int fd, struct iovec32 *iovp, \ - u_int iovcnt); } +145 AUE_READV STD { int linux_readv(l_ulong fd, struct l_iovec32 *iovp, \ + l_ulong iovcnt); } +146 AUE_WRITEV STD { int linux_writev(l_ulong fd, struct l_iovec32 *iovp, \ + l_ulong iovcnt); } 147 AUE_GETSID STD { int linux_getsid(l_pid_t pid); } 148 AUE_NULL STD { int linux_fdatasync(l_uint fd); } 149 AUE_SYSCTL STD { int linux_sysctl( \ From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 21:14:07 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A877106564A; Wed, 17 Jun 2009 21:14:07 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 679128FC17; Wed, 17 Jun 2009 21:14:07 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HLE7hw088502; Wed, 17 Jun 2009 21:14:07 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HLE74w088498; Wed, 17 Jun 2009 21:14:07 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906172114.n5HLE74w088498@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 17 Jun 2009 21:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194401 - stable/7/sys/amd64/linux32 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 21:14:08 -0000 Author: dchagin Date: Wed Jun 17 21:14:07 2009 New Revision: 194401 URL: http://svn.freebsd.org/changeset/base/194401 Log: Regenerate after r194400. Approved by: kib (mentor) Modified: stable/7/sys/amd64/linux32/linux32_proto.h stable/7/sys/amd64/linux32/linux32_syscall.h stable/7/sys/amd64/linux32/linux32_sysent.c Modified: stable/7/sys/amd64/linux32/linux32_proto.h ============================================================================== --- stable/7/sys/amd64/linux32/linux32_proto.h Wed Jun 17 21:12:32 2009 (r194400) +++ stable/7/sys/amd64/linux32/linux32_proto.h Wed Jun 17 21:14:07 2009 (r194401) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 194400 2009-06-17 21:12:32Z dchagin */ #ifndef _LINUX_SYSPROTO_H_ @@ -451,14 +451,14 @@ struct linux_msync_args { char fl_l_[PADL_(l_int)]; l_int fl; char fl_r_[PADR_(l_int)]; }; struct linux_readv_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; - char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char iovp_l_[PADL_(struct l_iovec32 *)]; struct l_iovec32 * iovp; char iovp_r_[PADR_(struct l_iovec32 *)]; + char iovcnt_l_[PADL_(l_ulong)]; l_ulong iovcnt; char iovcnt_r_[PADR_(l_ulong)]; }; struct linux_writev_args { - char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char iovp_l_[PADL_(struct iovec32 *)]; struct iovec32 * iovp; char iovp_r_[PADR_(struct iovec32 *)]; - char iovcnt_l_[PADL_(u_int)]; u_int iovcnt; char iovcnt_r_[PADR_(u_int)]; + char fd_l_[PADL_(l_ulong)]; l_ulong fd; char fd_r_[PADR_(l_ulong)]; + char iovp_l_[PADL_(struct l_iovec32 *)]; struct l_iovec32 * iovp; char iovp_r_[PADR_(struct l_iovec32 *)]; + char iovcnt_l_[PADL_(l_ulong)]; l_ulong iovcnt; char iovcnt_r_[PADR_(l_ulong)]; }; struct linux_getsid_args { char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)]; Modified: stable/7/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- stable/7/sys/amd64/linux32/linux32_syscall.h Wed Jun 17 21:12:32 2009 (r194400) +++ stable/7/sys/amd64/linux32/linux32_syscall.h Wed Jun 17 21:14:07 2009 (r194401) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 194400 2009-06-17 21:12:32Z dchagin */ #define LINUX_SYS_exit 1 Modified: stable/7/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysent.c Wed Jun 17 21:12:32 2009 (r194400) +++ stable/7/sys/amd64/linux32/linux32_sysent.c Wed Jun 17 21:14:07 2009 (r194401) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 191820 2009-05-05 14:53:58Z dchagin + * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 194400 2009-06-17 21:12:32Z dchagin */ #include "opt_compat.h" From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 21:49:42 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC690106566B; Wed, 17 Jun 2009 21:49:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7E128FC19; Wed, 17 Jun 2009 21:49:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HLnfDU089364; Wed, 17 Jun 2009 21:49:41 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HLnfev089359; Wed, 17 Jun 2009 21:49:41 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906172149.n5HLnfev089359@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 17 Jun 2009 21:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194404 - in stable/7/sys: . amd64/linux32 compat/linux contrib/pf i386/linux X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 21:49:42 -0000 Author: dchagin Date: Wed Jun 17 21:49:41 2009 New Revision: 194404 URL: http://svn.freebsd.org/changeset/base/194404 Log: MFC r185442: Make linux_sendmsg() and linux_recvmsg() work on linux32/amd64. Change types used in the linux' struct msghdr and struct cmsghdr definitions to the properly-sized architecture-specific types. Move ancillary data handler from linux_sendit() to linux_sendmsg(). Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux.h stable/7/sys/compat/linux/linux_socket.c stable/7/sys/compat/linux/linux_socket.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/linux/linux.h Modified: stable/7/sys/amd64/linux32/linux.h ============================================================================== --- stable/7/sys/amd64/linux32/linux.h Wed Jun 17 21:48:19 2009 (r194403) +++ stable/7/sys/amd64/linux32/linux.h Wed Jun 17 21:49:41 2009 (r194404) @@ -708,6 +708,22 @@ struct l_sockaddr { char sa_data[14]; } __packed; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +}; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +}; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Wed Jun 17 21:48:19 2009 (r194403) +++ stable/7/sys/compat/linux/linux_socket.c Wed Jun 17 21:49:41 2009 (r194404) @@ -420,10 +420,62 @@ linux_sa_put(struct osockaddr *osa) } static int +linux_to_bsd_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case LINUX_SCM_RIGHTS: + return (SCM_RIGHTS); + } + return (-1); +} + +static int +bsd_to_linux_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case SCM_RIGHTS: + return (LINUX_SCM_RIGHTS); + } + return (-1); +} + + + +static int +linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) +{ + if (lhdr->msg_controllen > INT_MAX) + return (ENOBUFS); + + bhdr->msg_name = PTRIN(lhdr->msg_name); + bhdr->msg_namelen = lhdr->msg_namelen; + bhdr->msg_iov = PTRIN(lhdr->msg_iov); + bhdr->msg_iovlen = lhdr->msg_iovlen; + bhdr->msg_control = PTRIN(lhdr->msg_control); + bhdr->msg_controllen = lhdr->msg_controllen; + bhdr->msg_flags = linux_to_bsd_msg_flags(lhdr->msg_flags); + return (0); +} + +static int +bsd_to_linux_msghdr(const struct msghdr *bhdr, struct l_msghdr *lhdr) +{ + lhdr->msg_name = PTROUT(bhdr->msg_name); + lhdr->msg_namelen = bhdr->msg_namelen; + lhdr->msg_iov = PTROUT(bhdr->msg_iov); + lhdr->msg_iovlen = bhdr->msg_iovlen; + lhdr->msg_control = PTROUT(bhdr->msg_control); + lhdr->msg_controllen = bhdr->msg_controllen; + /* msg_flags skipped */ + return (0); +} + +static int linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, - enum uio_seg segflg) + struct mbuf *control, enum uio_seg segflg) { - struct mbuf *control; struct sockaddr *to; int error; @@ -435,27 +487,9 @@ linux_sendit(struct thread *td, int s, s } else to = NULL; - if (mp->msg_control != NULL) { - struct cmsghdr *cmsg; - - if (mp->msg_controllen < sizeof(struct cmsghdr)) { - error = EINVAL; - goto bad; - } - error = sockargs(&control, mp->msg_control, - mp->msg_controllen, MT_CONTROL); - if (error) - goto bad; - - cmsg = mtod(control, struct cmsghdr *); - cmsg->cmsg_level = linux_to_bsd_sockopt_level(cmsg->cmsg_level); - } else - control = NULL; - error = kern_sendit(td, s, mp, linux_to_bsd_msg_flags(flags), control, segflg); -bad: if (to) FREE(to, M_SONAME); return (error); @@ -530,7 +564,7 @@ linux_sendto_hdrincl(struct thread *td, aiov[0].iov_base = (char *)packet; aiov[0].iov_len = linux_args->len; error = linux_sendit(td, linux_args->s, &msg, linux_args->flags, - UIO_SYSSPACE); + NULL, UIO_SYSSPACE); goout: free(packet, M_TEMP); return (error); @@ -931,7 +965,8 @@ linux_sendto(struct thread *td, struct l msg.msg_flags = 0; aiov.iov_base = PTRIN(args->msg); aiov.iov_len = args->len; - error = linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); + error = linux_sendit(td, args->s, &msg, args->flags, NULL, + UIO_USERSPACE); return (error); } @@ -993,13 +1028,21 @@ struct linux_sendmsg_args { static int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) { + struct cmsghdr *cmsg; + struct mbuf *control; struct msghdr msg; + struct l_cmsghdr linux_cmsg; + struct l_cmsghdr *ptr_cmsg; + struct l_msghdr linux_msg; struct iovec *iov; + socklen_t datalen; + void *data; int error; - /* XXXTJR sendmsg is broken on amd64 */ - - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); + error = linux_to_bsd_msghdr(&msg, &linux_msg); if (error) return (error); @@ -1012,13 +1055,68 @@ linux_sendmsg(struct thread *td, struct */ if (msg.msg_control != NULL && msg.msg_controllen == 0) msg.msg_control = NULL; + +#ifdef COMPAT_LINUX32 + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); + + if (msg.msg_control != NULL) { + error = ENOBUFS; + cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + control = m_get(M_WAIT, MT_CONTROL); + if (control == NULL) + goto bad; + ptr_cmsg = LINUX_CMSG_FIRSTHDR(&msg); + + do { + error = copyin(ptr_cmsg, &linux_cmsg, + sizeof(struct l_cmsghdr)); + if (error) + goto bad; + + error = EINVAL; + if (linux_cmsg.cmsg_len < sizeof(struct l_cmsghdr)) + goto bad; + + /* + * Now we support only SCM_RIGHTS, so return EINVAL + * in any other cmsg_type + */ + if ((cmsg->cmsg_type = + linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type)) == -1) + goto bad; + cmsg->cmsg_level = + linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); + + datalen = linux_cmsg.cmsg_len - L_CMSG_HDRSZ; + cmsg->cmsg_len = CMSG_LEN(datalen); + data = LINUX_CMSG_DATA(ptr_cmsg); + + error = ENOBUFS; + if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) + goto bad; + if (!m_append(control, datalen, (c_caddr_t) data)) + goto bad; + } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(&msg, ptr_cmsg))); + } else { + control = NULL; + cmsg = NULL; + } + msg.msg_iov = iov; msg.msg_flags = 0; - error = linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); + error = linux_sendit(td, args->s, &msg, args->flags, control, + UIO_USERSPACE); + +bad: free(iov, M_IOV); + if (cmsg) + free(cmsg, M_TEMP); return (error); } @@ -1031,44 +1129,132 @@ struct linux_recvmsg_args { static int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) { - struct recvmsg_args /* { - int s; - struct msghdr *msg; - int flags; - } */ bsd_args; + struct cmsghdr *cm; struct msghdr msg; - struct cmsghdr *cmsg; + struct l_cmsghdr *linux_cmsg = NULL; + socklen_t datalen, outlen, clen; + struct l_msghdr linux_msg; + struct iovec *iov, *uiov; + struct mbuf *control = NULL; + struct mbuf **controlp; + caddr_t outbuf; + void *data; int error; - /* XXXTJR recvmsg is broken on amd64 */ + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); - if ((error = copyin(PTRIN(args->msg), &msg, sizeof (msg)))) + error = linux_to_bsd_msghdr(&msg, &linux_msg); + if (error) return (error); - bsd_args.s = args->s; - bsd_args.msg = PTRIN(args->msg); - bsd_args.flags = linux_to_bsd_msg_flags(args->flags); - if (msg.msg_name) { - linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, - msg.msg_namelen); - error = recvmsg(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)msg.msg_name); - } else - error = recvmsg(td, &bsd_args); +#ifdef COMPAT_LINUX32 + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else + error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); - if (bsd_args.msg->msg_control != NULL && - bsd_args.msg->msg_controllen > 0) { - cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; - cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); + if (msg.msg_name) { + error = linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, + msg.msg_namelen); + if (error) + goto bad; } - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + uiov = msg.msg_iov; + msg.msg_iov = iov; + controlp = (msg.msg_control != NULL) ? &control : NULL; + error = kern_recvit(td, args->s, &msg, UIO_USERSPACE, controlp); + msg.msg_iov = uiov; + if (error) + goto bad; + + error = bsd_to_linux_msghdr(&msg, &linux_msg); if (error) - return (error); - if (msg.msg_name && msg.msg_namelen > 2) - error = linux_sa_put(msg.msg_name); + goto bad; + + if (linux_msg.msg_name) { + error = bsd_to_linux_sockaddr((struct sockaddr *) + PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + if (linux_msg.msg_name && linux_msg.msg_namelen > 2) { + error = linux_sa_put(PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + + if (control) { + + linux_cmsg = malloc(L_CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + outbuf = PTRIN(linux_msg.msg_control); + cm = mtod(control, struct cmsghdr *); + outlen = 0; + clen = control->m_len; + + while (cm != NULL) { + + if ((linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type)) == -1) + { + error = EINVAL; + goto bad; + } + data = CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; + + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + if (outlen == 0) { + error = EMSGSIZE; + goto bad; + } else { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + } + + linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(data, outbuf, datalen); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(datalen); + outlen += LINUX_CMSG_LEN(datalen); + linux_msg.msg_controllen = outlen; + + if (CMSG_SPACE(datalen) < clen) { + clen -= CMSG_SPACE(datalen); + cm = (struct cmsghdr *) + ((caddr_t)cm + CMSG_SPACE(datalen)); + } else + cm = NULL; + } + } + +out: + error = copyout(&linux_msg, PTRIN(args->msg), sizeof(linux_msg)); + +bad: + free(iov, M_IOV); + if (control != NULL) + m_freem(control); + if (linux_cmsg != NULL) + free(linux_cmsg, M_TEMP); + return (error); } Modified: stable/7/sys/compat/linux/linux_socket.h ============================================================================== --- stable/7/sys/compat/linux/linux_socket.h Wed Jun 17 21:48:19 2009 (r194403) +++ stable/7/sys/compat/linux/linux_socket.h Wed Jun 17 21:49:41 2009 (r194404) @@ -49,6 +49,37 @@ #define LINUX_MSG_ERRQUEUE 0x2000 #define LINUX_MSG_NOSIGNAL 0x4000 +/* Socket-level control message types */ + +#define LINUX_SCM_RIGHTS 0x01 + +/* Ancilliary data object information macros */ + +#define LINUX_CMSG_ALIGN(len) roundup2(len, sizeof(l_ulong)) +#define LINUX_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)))) +#define LINUX_CMSG_SPACE(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + LINUX_CMSG_ALIGN(len)) +#define LINUX_CMSG_LEN(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + (len)) +#define LINUX_CMSG_FIRSTHDR(msg) \ + ((msg)->msg_controllen >= \ + sizeof(struct l_cmsghdr) ? \ + (struct l_cmsghdr *)((msg)->msg_control) : \ + (struct l_cmsghdr *)(NULL)) +#define LINUX_CMSG_NXTHDR(msg, cmsg) \ + ((((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ + sizeof(*(cmsg))) > \ + (((char *)(msg)->msg_control) + \ + (msg)->msg_controllen)) ? \ + (struct l_cmsghdr *) NULL : \ + (struct l_cmsghdr *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len))) + +#define CMSG_HDRSZ CMSG_LEN(0) +#define L_CMSG_HDRSZ LINUX_CMSG_LEN(0) + /* Supported address families */ #define LINUX_AF_UNSPEC 0 Modified: stable/7/sys/i386/linux/linux.h ============================================================================== --- stable/7/sys/i386/linux/linux.h Wed Jun 17 21:48:19 2009 (r194403) +++ stable/7/sys/i386/linux/linux.h Wed Jun 17 21:49:41 2009 (r194404) @@ -679,6 +679,22 @@ struct l_sockaddr { char sa_data[14]; }; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +}; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +}; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; From owner-svn-src-stable-7@FreeBSD.ORG Wed Jun 17 21:52:41 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36F12106566C; Wed, 17 Jun 2009 21:52:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 099D88FC08; Wed, 17 Jun 2009 21:52:41 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HLqeXK089475; Wed, 17 Jun 2009 21:52:40 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5HLqddj089472; Wed, 17 Jun 2009 21:52:39 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200906172152.n5HLqddj089472@svn.freebsd.org> From: Dmitry Chagin Date: Wed, 17 Jun 2009 21:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194405 - in stable/7/sys: . compat/linux contrib/pf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 21:52:42 -0000 Author: dchagin Date: Wed Jun 17 21:52:39 2009 New Revision: 194405 URL: http://svn.freebsd.org/changeset/base/194405 Log: MFC r192284: Implement MSG_CMSG_CLOEXEC flag for linux_recvmsg(). Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linux/linux_socket.c stable/7/sys/compat/linux/linux_socket.h stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/compat/linux/linux_socket.c ============================================================================== --- stable/7/sys/compat/linux/linux_socket.c Wed Jun 17 21:49:41 2009 (r194404) +++ stable/7/sys/compat/linux/linux_socket.c Wed Jun 17 21:52:39 2009 (r194405) @@ -1139,7 +1139,7 @@ linux_recvmsg(struct thread *td, struct struct mbuf **controlp; caddr_t outbuf; void *data; - int error; + int error, i, fd, fds, *fdp; error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); if (error) @@ -1208,15 +1208,30 @@ linux_recvmsg(struct thread *td, struct data = CMSG_DATA(cm); datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; - if (outlen + LINUX_CMSG_LEN(datalen) > - linux_msg.msg_controllen) { - if (outlen == 0) { - error = EMSGSIZE; - goto bad; - } else { - linux_msg.msg_flags |= LINUX_MSG_CTRUNC; - goto out; + switch (linux_cmsg->cmsg_type) + { + case LINUX_SCM_RIGHTS: + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + if (outlen == 0) { + error = EMSGSIZE; + goto bad; + } else { + linux_msg.msg_flags |= + LINUX_MSG_CTRUNC; + goto out; + } + } + if (args->flags & LINUX_MSG_CMSG_CLOEXEC) { + fds = datalen / sizeof(int); + fdp = data; + for (i = 0; i < fds; i++) { + fd = *fdp++; + (void)kern_fcntl(td, fd, + F_SETFD, FD_CLOEXEC); + } } + break; } linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); Modified: stable/7/sys/compat/linux/linux_socket.h ============================================================================== --- stable/7/sys/compat/linux/linux_socket.h Wed Jun 17 21:49:41 2009 (r194404) +++ stable/7/sys/compat/linux/linux_socket.h Wed Jun 17 21:52:39 2009 (r194405) @@ -48,6 +48,7 @@ #define LINUX_MSG_RST 0x1000 #define LINUX_MSG_ERRQUEUE 0x2000 #define LINUX_MSG_NOSIGNAL 0x4000 +#define LINUX_MSG_CMSG_CLOEXEC 0x40000000 /* Socket-level control message types */ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 01:11:10 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0943106564A; Thu, 18 Jun 2009 01:11:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7346F8FC0C; Thu, 18 Jun 2009 01:11:10 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I1BAaR093458; Thu, 18 Jun 2009 01:11:10 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I1BA2F093456; Thu, 18 Jun 2009 01:11:10 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <200906180111.n5I1BA2F093456@svn.freebsd.org> From: Brian Somers Date: Thu, 18 Jun 2009 01:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194411 - in stable/7/etc: . periodic/daily X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 01:11:11 -0000 Author: brian Date: Thu Jun 18 01:11:10 2009 New Revision: 194411 URL: http://svn.freebsd.org/changeset/base/194411 Log: MFC: r192970: Handle different rulesets. PR: 35018 Modified: stable/7/etc/ (props changed) stable/7/etc/periodic/daily/460.status-mail-rejects Modified: stable/7/etc/periodic/daily/460.status-mail-rejects ============================================================================== --- stable/7/etc/periodic/daily/460.status-mail-rejects Wed Jun 17 23:34:58 2009 (r194410) +++ stable/7/etc/periodic/daily/460.status-mail-rejects Thu Jun 18 01:11:10 2009 (r194411) @@ -12,10 +12,8 @@ then fi case "$daily_status_mail_rejects_shorten" in -[Yy][Ee][Ss]) - sed_output='\4 \3...';; -*) - sed_output='\2 (\3... \4)';; +[Yy][Ee][Ss]) shorten='cut -d" " -f2,3';; +*) shorten=cat;; esac case "$daily_status_mail_rejects_enable" in @@ -39,7 +37,8 @@ case "$daily_status_mail_rejects_enable" echo echo Checking for rejected mail hosts: - start=`date -v-1d '+%b %e'` + yesterday=$(date -v-1d '+%b %e') + today=$(date '+%b %e') n=$(($daily_status_mail_rejects_logs - 2)) rc=$({ while [ $n -ge 0 ] @@ -57,9 +56,14 @@ case "$daily_status_mail_rejects_enable" n=$(($n - 1)) done cat /var/log/maillog - } | - sed -n -E "s/^$start"'.*ruleset=check_[^ ]+, +arg1=,]+).*reject=([^ ]+) .* ([^ ]+)$/'"$sed_output"'/p' | - sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l) + } | sed -Ene "/^$today/q" -e "/^$yesterday/{"' + s/.*ruleset=check_relay,.* relay=([^,]+), reject=([^ ]*).*/\2 check_relay \1/p + t end + s/.*ruleset=check_rcpt,.* arg1=,]+).* reject=([^ ]+) .* ([^ ]+)/\2 check_rcpt \1 \3/p + t end + s/.*ruleset=check_([^,]+),.* arg1=,]+).* reject=([^ ]+) .* ([^ ]+)/\4 check_\1 \3 \5/p + :end + }' | eval $shorten | sort -f | uniq -ic | sort -fnr | tee /dev/stderr | wc -l) [ $rc -gt 0 ] && rc=1 fi;; From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 04:47:41 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35E20106564A; Thu, 18 Jun 2009 04:47:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 224518FC0A; Thu, 18 Jun 2009 04:47:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I4leVO097968; Thu, 18 Jun 2009 04:47:40 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I4le2C097966; Thu, 18 Jun 2009 04:47:40 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180447.n5I4le2C097966@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 04:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194414 - in stable/7/sys: . contrib/pf dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 04:47:41 -0000 Author: yongari Date: Thu Jun 18 04:47:40 2009 New Revision: 194414 URL: http://svn.freebsd.org/changeset/base/194414 Log: MFC r192708-192711: r192708: Use mii_phy_add_media() and remove usage of local macro ADD. Also checks extended status register to see whether the PHY is fast ethernet or not. This removes a lot of checks for specific PHY models and it makes easy to add more PHYs to e1000phy(4). While I'm here remove setting mii_anegticks as it is set with mii_phy_add_media(). r192709: Report current link state while auto-negotiation is in progress. r192710: Don't read unnecessary PHY registers. Speed/duplex resolution bit is valid only for auto-negotiation case so check the bit if we know auto-negotiation is active. While I'm here explicitly checks current speed with speed mask and set IFM_NONE if resolved speed is unknown. r192711: Do not ignore NEXT Page capability of auto-negotiation advertisement register. Some PHYs such as 88E3016 requires NEXT Page capability to establish valid link. Also set protocol selector field which is read only but it makes the intention clearer. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mii/e1000phy.c Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:42:47 2009 (r194413) +++ stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:47:40 2009 (r194414) @@ -128,7 +128,6 @@ e1000phy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; - int fast_ether; esc = device_get_softc(dev); sc = &esc->mii_sc; @@ -141,10 +140,8 @@ e1000phy_attach(device_t dev) sc->mii_phy = ma->mii_phyno; sc->mii_service = e1000phy_service; sc->mii_pdata = mii; - sc->mii_anegticks = MII_ANEGTICKS_GIGE; mii->mii_instance++; - fast_ether = 0; esc->mii_model = MII_MODEL(ma->mii_id2); switch (esc->mii_model) { case MII_MODEL_MARVELL_E1011: @@ -166,54 +163,16 @@ e1000phy_attach(device_t dev) */ PHY_WRITE(sc, E1000_EADR, 0); break; - case MII_MODEL_MARVELL_E3082: - /* 88E3082 10/100 Fast Ethernet PHY. */ - sc->mii_anegticks = MII_ANEGTICKS; - fast_ether = 1; - break; } e1000phy_reset(sc); + sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; + if (sc->mii_capabilities & BMSR_EXTSTAT) + sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); device_printf(dev, " "); - -#define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), - E1000_CR_ISOLATE); - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), - E1000_CR_SPEED_10); - printf("10baseT, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), - E1000_CR_SPEED_10 | E1000_CR_FULL_DUPLEX); - printf("10baseT-FDX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), - E1000_CR_SPEED_100); - printf("100baseTX, "); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), - E1000_CR_SPEED_100 | E1000_CR_FULL_DUPLEX); - printf("100baseTX-FDX, "); - if (fast_ether == 0) { - /* - * 1000BT-simplex not supported; driver must ignore - * this entry, but it must be present in order to - * manually set full-duplex. - */ - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, - sc->mii_inst), E1000_CR_SPEED_1000); - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, - sc->mii_inst), - E1000_CR_SPEED_1000 | E1000_CR_FULL_DUPLEX); - printf("1000baseTX-FDX, "); - } - } else { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, IFM_FDX, sc->mii_inst), - E1000_CR_SPEED_1000 | E1000_CR_FULL_DUPLEX); - printf("1000baseSX-FDX, "); - } - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); - printf("auto\n"); -#undef ADD + mii_phy_add_media(sc); + printf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return (0); @@ -338,12 +297,14 @@ e1000phy_service(struct mii_softc *sc, s speed = 0; switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_1000_T: - if (esc->mii_model == MII_MODEL_MARVELL_E3082) + if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) == 0) return (EINVAL); speed = E1000_CR_SPEED_1000; break; case IFM_1000_SX: - if (esc->mii_model == MII_MODEL_MARVELL_E3082) + if ((sc->mii_extcapabilities & + (EXTSR_1000XFDX | EXTSR_1000XHDX)) == 0) return (EINVAL); speed = E1000_CR_SPEED_1000; break; @@ -389,7 +350,8 @@ e1000phy_service(struct mii_softc *sc, s PHY_WRITE(sc, E1000_1GCR, gig | E1000_1GCR_MS_ENABLE); } else { - if (esc->mii_model != MII_MODEL_MARVELL_E3082) + if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, E1000_1GCR, 0); } PHY_WRITE(sc, E1000_AR, E1000_AR_SELECTOR_FIELD); @@ -431,7 +393,7 @@ done: if (sc->mii_ticks++ == 0) break; if (sc->mii_ticks <= sc->mii_anegticks) - return (0); + break; sc->mii_ticks = 0; e1000phy_reset(sc); @@ -451,18 +413,14 @@ static void e1000phy_status(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; - int bmsr, bmcr, esr, gsr, ssr, isr, ar, lpar; + int bmcr, bmsr, gsr, ssr, ar, lpar; mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; bmsr = PHY_READ(sc, E1000_SR) | PHY_READ(sc, E1000_SR); - esr = PHY_READ(sc, E1000_ESR); bmcr = PHY_READ(sc, E1000_CR); ssr = PHY_READ(sc, E1000_SSR); - isr = PHY_READ(sc, E1000_ISR); - ar = PHY_READ(sc, E1000_AR); - lpar = PHY_READ(sc, E1000_LPAR); if (bmsr & E1000_SR_LINK_STATUS) mii->mii_media_status |= IFM_ACTIVE; @@ -470,22 +428,28 @@ e1000phy_status(struct mii_softc *sc) if (bmcr & E1000_CR_LOOPBACK) mii->mii_media_active |= IFM_LOOP; - if ((((bmcr & E1000_CR_AUTO_NEG_ENABLE) != 0) && - ((bmsr & E1000_SR_AUTO_NEG_COMPLETE) == 0)) || - ((ssr & E1000_SSR_LINK) == 0) || - ((ssr & E1000_SSR_SPD_DPLX_RESOLVED) == 0)) { + if ((bmcr & E1000_CR_AUTO_NEG_ENABLE) != 0 && + (ssr & E1000_SSR_SPD_DPLX_RESOLVED) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; return; } if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { - if (ssr & E1000_SSR_1000MBS) + switch (ssr & E1000_SSR_SPEED) { + case E1000_SSR_1000MBS: mii->mii_media_active |= IFM_1000_T; - else if (ssr & E1000_SSR_100MBS) + break; + case E1000_SSR_100MBS: mii->mii_media_active |= IFM_100_TX; - else + break; + case E1000_SSR_10MBS: mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + return; + } } else { if (ssr & E1000_SSR_1000MBS) mii->mii_media_active |= IFM_1000_SX; @@ -497,6 +461,8 @@ e1000phy_status(struct mii_softc *sc) mii->mii_media_active |= IFM_HDX; if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { + ar = PHY_READ(sc, E1000_AR); + lpar = PHY_READ(sc, E1000_LPAR); /* FLAG0==rx-flow-control FLAG1==tx-flow-control */ if ((ar & E1000_AR_PAUSE) && (lpar & E1000_LPAR_PAUSE)) { mii->mii_media_active |= IFM_FLAG0 | IFM_FLAG1; @@ -523,16 +489,19 @@ static int e1000phy_mii_phy_auto(struct e1000phy_softc *esc) { struct mii_softc *sc; + uint16_t reg; sc = &esc->mii_sc; - if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) - PHY_WRITE(sc, E1000_AR, E1000_AR_10T | E1000_AR_10T_FD | + if ((sc->mii_flags & MIIF_HAVEFIBER) == 0) { + reg = PHY_READ(sc, E1000_AR); + reg |= E1000_AR_10T | E1000_AR_10T_FD | E1000_AR_100TX | E1000_AR_100TX_FD | - E1000_AR_PAUSE | E1000_AR_ASM_DIR); - else + E1000_AR_PAUSE | E1000_AR_ASM_DIR; + PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD); + } else PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X | E1000_FA_SYM_PAUSE | E1000_FA_ASYM_PAUSE); - if (esc->mii_model != MII_MODEL_MARVELL_E3082) + if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) PHY_WRITE(sc, E1000_1GCR, E1000_1GCR_1000T_FD | E1000_1GCR_1000T); PHY_WRITE(sc, E1000_CR, From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 04:51:08 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA06106567A; Thu, 18 Jun 2009 04:51:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39A888FC35; Thu, 18 Jun 2009 04:51:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I4p8Wn098079; Thu, 18 Jun 2009 04:51:08 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I4p8da098075; Thu, 18 Jun 2009 04:51:08 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180451.n5I4p8da098075@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 04:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194415 - in stable/7/sys: . contrib/pf dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 04:51:09 -0000 Author: yongari Date: Thu Jun 18 04:51:07 2009 New Revision: 194415 URL: http://svn.freebsd.org/changeset/base/194415 Log: MFC r192713: Add driver support for 88E3016 PHY which is found on Marvell Yukon FE+ controller. Due to the severe silicon bugs for Yukon FE+, 88E3016 seems to require more workarounds. However I'm not sure whether the workaround is PHY specific or only applicable to Yukon FE+. The datasheet for the PHY is publicly available but it lacks several details for the workaround used in this change. The workaround information was obtained from Linux. Many thanks to Yukon FE+ users who helped me add 88E3016 support. Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/e1000phyreg.h stable/7/sys/dev/mii/miidevs Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:47:40 2009 (r194414) +++ stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:51:07 2009 (r194415) @@ -106,6 +106,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1111), MII_PHY_DESC(MARVELL, E1116), MII_PHY_DESC(MARVELL, E1118), + MII_PHY_DESC(MARVELL, E3016), MII_PHY_DESC(xxMARVELL, E1000), MII_PHY_DESC(xxMARVELL, E1011), MII_PHY_DESC(xxMARVELL, E1000_3), @@ -211,18 +212,29 @@ e1000phy_reset(struct mii_softc *sc) reg |= E1000_SCR_AUTO_X_MODE; if (esc->mii_model == MII_MODEL_MARVELL_E1116) reg &= ~E1000_SCR_POWER_DOWN; + reg |= E1000_SCR_ASSERT_CRS_ON_TX; break; case MII_MODEL_MARVELL_E3082: reg |= (E1000_SCR_AUTO_X_MODE >> 1); + reg |= E1000_SCR_ASSERT_CRS_ON_TX; + break; + case MII_MODEL_MARVELL_E3016: + reg |= E1000_SCR_AUTO_MDIX; + reg &= ~(E1000_SCR_EN_DETECT | + E1000_SCR_SCRAMBLER_DISABLE); + reg |= E1000_SCR_LPNP; + /* XXX Enable class A driver for Yukon FE+ A0. */ + PHY_WRITE(sc, 0x1C, PHY_READ(sc, 0x1C) | 0x0001); break; default: reg &= ~E1000_SCR_AUTO_X_MODE; + reg |= E1000_SCR_ASSERT_CRS_ON_TX; break; } - /* Enable CRS on TX. */ - reg |= E1000_SCR_ASSERT_CRS_ON_TX; - /* Auto correction for reversed cable polarity. */ - reg &= ~E1000_SCR_POLARITY_REVERSAL; + if (esc->mii_model != MII_MODEL_MARVELL_E3016) { + /* Auto correction for reversed cable polarity. */ + reg &= ~E1000_SCR_POLARITY_REVERSAL; + } PHY_WRITE(sc, E1000_SCR, reg); if (esc->mii_model == MII_MODEL_MARVELL_E1116) { @@ -241,6 +253,13 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1118: case MII_MODEL_MARVELL_E1149: break; + case MII_MODEL_MARVELL_E3016: + /* LED2 -> ACT, LED1 -> LINK, LED0 -> SPEED. */ + PHY_WRITE(sc, 0x16, 0x0B << 8 | 0x05 << 4 | 0x04); + /* Integrated register calibration workaround. */ + PHY_WRITE(sc, 0x1D, 17); + PHY_WRITE(sc, 0x1E, 0x3F60); + break; default: /* Force TX_CLK to 25MHz clock. */ reg = PHY_READ(sc, E1000_ESCR); Modified: stable/7/sys/dev/mii/e1000phyreg.h ============================================================================== --- stable/7/sys/dev/mii/e1000phyreg.h Thu Jun 18 04:47:40 2009 (r194414) +++ stable/7/sys/dev/mii/e1000phyreg.h Thu Jun 18 04:51:07 2009 (r194415) @@ -236,6 +236,16 @@ #define E1000_SCR_TX_FIFO_DEPTH_10 0x8000 #define E1000_SCR_TX_FIFO_DEPTH_12 0xC000 +/* 88E3016 only */ +#define E1000_SCR_AUTO_MDIX 0x0030 +#define E1000_SCR_SIGDET_POLARITY 0x0040 +#define E1000_SCR_EXT_DISTANCE 0x0080 +#define E1000_SCR_FEFI_DISABLE 0x0100 +#define E1000_SCR_NLP_GEN_DISABLE 0x0800 +#define E1000_SCR_LPNP 0x1000 +#define E1000_SCR_NLP_CHK_DISABLE 0x2000 +#define E1000_SCR_EN_DETECT 0x4000 + #define E1000_SCR_EN_DETECT_MASK 0x0300 /* 88E1112 page 2 */ Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu Jun 18 04:47:40 2009 (r194414) +++ stable/7/sys/dev/mii/miidevs Thu Jun 18 04:51:07 2009 (r194415) @@ -236,6 +236,7 @@ model MARVELL E1149 0x000b Marvell 88E1 model MARVELL E1111 0x000c Marvell 88E1111 Gigabit PHY model MARVELL E1116 0x0021 Marvell 88E1116 Gigabit PHY model MARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY +model MARVELL E3016 0x0026 Marvell 88E3016 10/100 Fast Ethernet PHY model xxMARVELL E1000 0x0005 Marvell 88E1000 Gigabit PHY model xxMARVELL E1011 0x0002 Marvell 88E1011 Gigabit PHY model xxMARVELL E1000_3 0x0003 Marvell 88E1000 Gigabit PHY From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 04:55:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC3E1065677; Thu, 18 Jun 2009 04:55:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A9888FC1F; Thu, 18 Jun 2009 04:55:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I4t5SP098203; Thu, 18 Jun 2009 04:55:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I4t5Q4098201; Thu, 18 Jun 2009 04:55:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180455.n5I4t5Q4098201@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 04:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194416 - in stable/7/sys: . contrib/pf dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 04:55:06 -0000 Author: yongari Date: Thu Jun 18 04:55:04 2009 New Revision: 194416 URL: http://svn.freebsd.org/changeset/base/194416 Log: MFC r193289: Don't assume page register value is 0 and restore previous page register after issuing 'powerup'. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mii/e1000phy.c Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:51:07 2009 (r194415) +++ stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:55:04 2009 (r194416) @@ -238,11 +238,13 @@ e1000phy_reset(struct mii_softc *sc) PHY_WRITE(sc, E1000_SCR, reg); if (esc->mii_model == MII_MODEL_MARVELL_E1116) { + page = PHY_READ(sc, E1000_EADR); + /* Select page 2, MAC specific control register. */ PHY_WRITE(sc, E1000_EADR, 2); reg = PHY_READ(sc, E1000_SCR); reg |= E1000_SCR_RGMII_POWER_UP; PHY_WRITE(sc, E1000_SCR, reg); - PHY_WRITE(sc, E1000_EADR, 0); + PHY_WRITE(sc, E1000_EADR, page); } } From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 04:58:05 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED07106564A; Thu, 18 Jun 2009 04:58:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BE618FC17; Thu, 18 Jun 2009 04:58:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I4w5Os098309; Thu, 18 Jun 2009 04:58:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I4w5Lx098306; Thu, 18 Jun 2009 04:58:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180458.n5I4w5Lx098306@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 04:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194417 - in stable/7/sys: . contrib/pf dev/mii X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 04:58:06 -0000 Author: yongari Date: Thu Jun 18 04:58:04 2009 New Revision: 194417 URL: http://svn.freebsd.org/changeset/base/194417 Log: MFC r193291: Program LED registers for 88E1116/88E1149 PHYs. These PHYs are found on Marvell Yukon Ultra, Marvell Yukon Extreme controllers. While I'm here explicitly issue 'powerup' command for 88E1149 PHY. Tested by: jhb, Warren Block ( wblock <> wonkity dot com ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/e1000phyreg.h Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:55:04 2009 (r194416) +++ stable/7/sys/dev/mii/e1000phy.c Thu Jun 18 04:58:04 2009 (r194417) @@ -237,7 +237,8 @@ e1000phy_reset(struct mii_softc *sc) } PHY_WRITE(sc, E1000_SCR, reg); - if (esc->mii_model == MII_MODEL_MARVELL_E1116) { + if (esc->mii_model == MII_MODEL_MARVELL_E1116 || + esc->mii_model == MII_MODEL_MARVELL_E1149) { page = PHY_READ(sc, E1000_EADR); /* Select page 2, MAC specific control register. */ PHY_WRITE(sc, E1000_EADR, 2); @@ -251,9 +252,22 @@ e1000phy_reset(struct mii_softc *sc) switch (MII_MODEL(esc->mii_model)) { case MII_MODEL_MARVELL_E3082: case MII_MODEL_MARVELL_E1112: - case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1118: + break; + case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1149: + page = PHY_READ(sc, E1000_EADR); + /* Select page 3, LED control register. */ + PHY_WRITE(sc, E1000_EADR, 3); + PHY_WRITE(sc, E1000_SCR, + E1000_SCR_LED_LOS(1) | /* Link/Act */ + E1000_SCR_LED_INIT(8) | /* 10Mbps */ + E1000_SCR_LED_STAT1(7) | /* 100Mbps */ + E1000_SCR_LED_STAT0(7)); /* 1000Mbps */ + /* Set blink rate. */ + PHY_WRITE(sc, E1000_IER, E1000_PULSE_DUR(E1000_PULSE_170MS) | + E1000_BLINK_RATE(E1000_BLINK_84MS)); + PHY_WRITE(sc, E1000_EADR, page); break; case MII_MODEL_MARVELL_E3016: /* LED2 -> ACT, LED1 -> LINK, LED0 -> SPEED. */ Modified: stable/7/sys/dev/mii/e1000phyreg.h ============================================================================== --- stable/7/sys/dev/mii/e1000phyreg.h Thu Jun 18 04:55:04 2009 (r194416) +++ stable/7/sys/dev/mii/e1000phyreg.h Thu Jun 18 04:58:04 2009 (r194417) @@ -256,9 +256,19 @@ /* 88E1116 page 0 */ #define E1000_SCR_POWER_DOWN 0x0004 -/* 88E1116 page 2 */ +/* 88E1116, 88E1149 page 2 */ #define E1000_SCR_RGMII_POWER_UP 0x0008 +/* 88E1116, 88E1149 page 3 */ +#define E1000_SCR_LED_STAT0_MASK 0x000F +#define E1000_SCR_LED_STAT1_MASK 0x00F0 +#define E1000_SCR_LED_INIT_MASK 0x0F00 +#define E1000_SCR_LED_LOS_MASK 0xF000 +#define E1000_SCR_LED_STAT0(x) ((x) & E1000_SCR_LED_STAT0_MASK) +#define E1000_SCR_LED_STAT1(x) ((x) & E1000_SCR_LED_STAT1_MASK) +#define E1000_SCR_LED_INIT(x) ((x) & E1000_SCR_LED_INIT_MASK) +#define E1000_SCR_LED_LOS(x) ((x) & E1000_SCR_LED_LOS_MASK) + #define E1000_SSR 0x11 /* special status register */ #define E1000_SSR_JABBER 0x0001 #define E1000_SSR_REV_POLARITY 0x0002 @@ -286,6 +296,26 @@ #define E1000_IER_SPEED_CHANGED 0x4000 #define E1000_IER_AUTO_NEG_ERR 0x8000 +/* 88E1116, 88E1149 page 3, LED timer control. */ +#define E1000_PULSE_MASK 0x7000 +#define E1000_PULSE_NO_STR 0 /* no pulse stretching */ +#define E1000_PULSE_21MS 1 /* 21 ms to 42 ms */ +#define E1000_PULSE_42MS 2 /* 42 ms to 84 ms */ +#define E1000_PULSE_84MS 3 /* 84 ms to 170 ms */ +#define E1000_PULSE_170MS 4 /* 170 ms to 340 ms */ +#define E1000_PULSE_340MS 5 /* 340 ms to 670 ms */ +#define E1000_PULSE_670MS 6 /* 670 ms to 1300 ms */ +#define E1000_PULSE_1300MS 7 /* 1300 ms to 2700 ms */ +#define E1000_PULSE_DUR(x) ((x) & E1000_PULSE_MASK) + +#define E1000_BLINK_MASK 0x0700 +#define E1000_BLINK_42MS 0 /* 42 ms */ +#define E1000_BLINK_84MS 1 /* 84 ms */ +#define E1000_BLINK_170MS 2 /* 170 ms */ +#define E1000_BLINK_340MS 3 /* 340 ms */ +#define E1000_BLINK_670MS 4 /* 670 ms */ +#define E1000_BLINK_RATE(x) ((x) & E1000_BLINK_MASK) + #define E1000_ISR 0x13 /* interrupt status reg */ #define E1000_ISR_JABBER 0x0001 #define E1000_ISR_POLARITY_CHANGE 0x0002 From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:06:25 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABD1E1065677; Thu, 18 Jun 2009 05:06:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 981AD8FC0C; Thu, 18 Jun 2009 05:06:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I56Pg6098593; Thu, 18 Jun 2009 05:06:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I56Pm4098590; Thu, 18 Jun 2009 05:06:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180506.n5I56Pm4098590@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194418 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:06:26 -0000 Author: yongari Date: Thu Jun 18 05:06:25 2009 New Revision: 194418 URL: http://svn.freebsd.org/changeset/base/194418 Log: MFC r192716,192718-192720 r192716: Remove link handling taskqueue and use mii callback directly. While I'm here also checks driver running state. r192718: Use bit definition to represent link state, device suspend instead of using separate variables in softc. r192719: Use bit definition to represent MSI and detach state instead of using separate variables in softc. r192720: Correctly return the result of mii_mediachg(). Previously it always used to return success. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 04:58:04 2009 (r194417) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:06:25 2009 (r194418) @@ -285,7 +285,6 @@ static int msk_phy_writereg(struct msk_i static int msk_miibus_readreg(device_t, int, int); static int msk_miibus_writereg(device_t, int, int, int); static void msk_miibus_statchg(device_t); -static void msk_link_task(void *, int); static void msk_rxfilter(struct msk_if_softc *); static void msk_setvlan(struct msk_if_softc *, struct ifnet *); @@ -459,40 +458,30 @@ msk_phy_writereg(struct msk_if_softc *sc static void msk_miibus_statchg(device_t dev) { - struct msk_if_softc *sc_if; - - sc_if = device_get_softc(dev); - taskqueue_enqueue(taskqueue_swi, &sc_if->msk_link_task); -} - -static void -msk_link_task(void *arg, int pending) -{ struct msk_softc *sc; struct msk_if_softc *sc_if; struct mii_data *mii; struct ifnet *ifp; uint32_t gmac; - sc_if = (struct msk_if_softc *)arg; + sc_if = device_get_softc(dev); sc = sc_if->msk_softc; MSK_IF_LOCK(sc_if); mii = device_get_softc(sc_if->msk_miibus); ifp = sc_if->msk_ifp; - if (mii == NULL || ifp == NULL) { - MSK_IF_UNLOCK(sc_if); + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - } if (mii->mii_media_status & IFM_ACTIVE) { if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) - sc_if->msk_link = 1; + sc_if->msk_flags |= MSK_FLAG_LINK; } else - sc_if->msk_link = 0; + sc_if->msk_flags &= ~MSK_FLAG_LINK; - if (sc_if->msk_link != 0) { + if ((sc_if->msk_flags & MSK_FLAG_LINK) != 0) { /* Enable Tx FIFO Underrun. */ CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, GMAC_IRQ_MSK), GM_IS_TX_FF_UR | GM_IS_RX_FF_OR); @@ -554,8 +543,6 @@ msk_link_task(void *arg, int pending) /* Read again to ensure writing. */ GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL); } - - MSK_IF_UNLOCK(sc_if); } static void @@ -869,15 +856,16 @@ msk_mediachange(struct ifnet *ifp) { struct msk_if_softc *sc_if; struct mii_data *mii; + int error; sc_if = ifp->if_softc; MSK_IF_LOCK(sc_if); mii = device_get_softc(sc_if->msk_miibus); - mii_mediachg(mii); + error = mii_mediachg(mii); MSK_IF_UNLOCK(sc_if); - return (0); + return (error); } /* @@ -936,7 +924,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm & (IFF_PROMISC | IFF_ALLMULTI)) != 0) msk_rxfilter(sc_if); } else { - if (sc_if->msk_detach == 0) + if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0) msk_init_locked(sc_if); } } else { @@ -1416,7 +1404,6 @@ msk_attach(device_t dev) } callout_init_mtx(&sc_if->msk_tick_ch, &sc_if->msk_softc->msk_mtx, 0); - TASK_INIT(&sc_if->msk_link_task, 0, msk_link_task, sc_if); msk_sysctl_node(sc_if); /* Disable jumbo frame for Yukon FE. */ @@ -1659,7 +1646,7 @@ mskc_attach(device_t dev) if (sc->msk_num_port == 1 && pci_alloc_msi(dev, &msir) == 0) { if (msic == msir) { - sc->msk_msi = 1; + sc->msk_pflags |= MSK_FLAG_MSI; sc->msk_irq_spec = msic == 2 ? msk_irq_spec_msi2 : msk_irq_spec_msi; @@ -1785,13 +1772,12 @@ msk_detach(device_t dev) ifp = sc_if->msk_ifp; if (device_is_attached(dev)) { /* XXX */ - sc_if->msk_detach = 1; + sc_if->msk_flags |= MSK_FLAG_DETACH; msk_stop(sc_if); /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); callout_drain(&sc_if->msk_tick_ch); taskqueue_drain(taskqueue_fast, &sc_if->msk_tx_task); - taskqueue_drain(taskqueue_swi, &sc_if->msk_link_task); ether_ifdetach(ifp); MSK_IF_LOCK(sc_if); } @@ -1870,7 +1856,7 @@ mskc_detach(device_t dev) sc->msk_intrhand[1] = NULL; } bus_release_resources(dev, sc->msk_irq_spec, sc->msk_irq); - if (sc->msk_msi) + if ((sc->msk_pflags & MSK_FLAG_MSI) != 0) pci_release_msi(dev); bus_release_resources(dev, sc->msk_res_spec, sc->msk_res); mtx_destroy(&sc->msk_mtx); @@ -2641,7 +2627,7 @@ msk_start(struct ifnet *ifp) MSK_IF_LOCK(sc_if); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING || sc_if->msk_link == 0) { + IFF_DRV_RUNNING || (sc_if->msk_flags & MSK_FLAG_LINK) == 0) { MSK_IF_UNLOCK(sc_if); return; } @@ -2698,7 +2684,7 @@ msk_watchdog(struct msk_if_softc *sc_if) if (sc_if->msk_watchdog_timer == 0 || --sc_if->msk_watchdog_timer) return; ifp = sc_if->msk_ifp; - if (sc_if->msk_link == 0) { + if ((sc_if->msk_flags & MSK_FLAG_LINK) == 0) { if (bootverbose) if_printf(sc_if->msk_ifp, "watchdog timeout " "(missed link)\n"); @@ -2785,7 +2771,7 @@ mskc_suspend(device_t dev) /* Put hardware reset. */ CSR_WRITE_2(sc, B0_CTST, CS_RST_SET); - sc->msk_suspended = 1; + sc->msk_pflags |= MSK_FLAG_SUSPEND; MSK_UNLOCK(sc); @@ -2808,7 +2794,7 @@ mskc_resume(device_t dev) ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) msk_init_locked(sc->msk_if[i]); } - sc->msk_suspended = 0; + sc->msk_pflags &= MSK_FLAG_SUSPEND; MSK_UNLOCK(sc); @@ -3321,7 +3307,8 @@ msk_legacy_intr(void *xsc) /* Reading B0_Y2_SP_ISRC2 masks further interrupts. */ status = CSR_READ_4(sc, B0_Y2_SP_ISRC2); - if (status == 0 || status == 0xffffffff || sc->msk_suspended != 0 || + if (status == 0 || status == 0xffffffff || + (sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 || (status & sc->msk_intrmask) == 0) { CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2); return; @@ -3408,7 +3395,8 @@ msk_int_task(void *arg, int pending) /* Get interrupt source. */ status = CSR_READ_4(sc, B0_ISRC); - if (status == 0 || status == 0xffffffff || sc->msk_suspended != 0 || + if (status == 0 || status == 0xffffffff || + (sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 || (status & sc->msk_intrmask) == 0) goto done; @@ -3690,7 +3678,7 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, B0_IMSK, sc->msk_intrmask); CSR_READ_4(sc, B0_IMSK); - sc_if->msk_link = 0; + sc_if->msk_flags &= ~MSK_FLAG_LINK; mii_mediachg(mii); ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -3925,7 +3913,7 @@ msk_stop(struct msk_if_softc *sc_if) * Mark the interface down. */ ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - sc_if->msk_link = 0; + sc_if->msk_flags &= ~MSK_FLAG_LINK; } /* Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 04:58:04 2009 (r194417) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:06:25 2009 (r194418) @@ -2342,9 +2342,7 @@ struct msk_softc { uint32_t msk_intrmask; uint32_t msk_intrhwemask; uint32_t msk_pflags; - int msk_suspended; int msk_clock; - int msk_msi; struct msk_if_softc *msk_if[2]; device_t msk_devs[2]; int msk_txqsize; @@ -2382,10 +2380,13 @@ struct msk_if_softc { int msk_framesize; int msk_phytype; int msk_phyaddr; - int msk_link; uint32_t msk_flags; +#define MSK_FLAG_MSI 0x0001 #define MSK_FLAG_RAMBUF 0x0010 #define MSK_FLAG_NOJUMBO 0x0020 +#define MSK_FLAG_SUSPEND 0x2000 +#define MSK_FLAG_DETACH 0x4000 +#define MSK_FLAG_LINK 0x8000 struct callout msk_tick_ch; int msk_watchdog_timer; uint32_t msk_txq; /* Tx. Async Queue offset */ @@ -2395,10 +2396,8 @@ struct msk_if_softc { struct msk_ring_data msk_rdata; struct msk_softc *msk_softc; /* parent controller */ struct msk_hw_stats msk_stats; - struct task msk_link_task; struct task msk_tx_task; int msk_if_flags; - int msk_detach; uint16_t msk_vtag; /* VLAN tag id. */ }; From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:16:19 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA69106566C; Thu, 18 Jun 2009 05:16:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AD148FC3C; Thu, 18 Jun 2009 05:16:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5GJrA098905; Thu, 18 Jun 2009 05:16:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5GJGg098902; Thu, 18 Jun 2009 05:16:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180516.n5I5GJGg098902@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194419 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:16:20 -0000 Author: yongari Date: Thu Jun 18 05:16:19 2009 New Revision: 194419 URL: http://svn.freebsd.org/changeset/base/194419 Log: MFC r192723-192728,192731 r192723: Rather than checking every chip revision, introduce more flags to mark controller's capability. Controllers that have jumbo frame support sets MSK_FLAG_JUMBO, and controllers that does not support checksum offloading for jumbo frames will set MSK_FLAG_JUMBO_NOCSUM. For Fast Ethernet controllers it will set MSK_FLAG_FASTETHER and it would be used in link state handling. While here, disable Tx checksum offloading if jumbo frame is used on controllers that does not have Tx checksum offloading capability for jumbo frame(e.g. Yukon EC Ultra). r192724: Caller already hold a driver lock in mii callback, assert it. r192725: Add missing ~ operator. r192726: Add support for newer descriptor format. This format is used on Yukon FE+, Yukon Extreme and Yukon Supreme. r192727: Explicitly check resolved speed/duplex. Just checking IFM_ACTIVE does not guarantee established link. Also 1000baseT link report for fast ethernet controller is not valid one so make sure gigabit link is allowed for this controller. Whenever we lost link, check whether Rx/Tx MACs were enabled. If both MAC are not active, do not try to disable it again. r192728: Disable HW WOL for Yukon EC Ultra. While I'm here use switch statement over if-else statement. This change will make it easy to add newer Yukon controllers. r192731: Explicitly reset GMAC Controls and initialize GM_GP_CTRL register. The GM_GP_CTRL register may have stale content from previous link information so clearing it will make hardware update the register correctly when it established a valid link. While I'm here remove stale comment. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:06:25 2009 (r194418) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:16:19 2009 (r194419) @@ -467,7 +467,7 @@ msk_miibus_statchg(device_t dev) sc_if = device_get_softc(dev); sc = sc_if->msk_softc; - MSK_IF_LOCK(sc_if); + MSK_IF_LOCK_ASSERT(sc_if); mii = device_get_softc(sc_if->msk_miibus); ifp = sc_if->msk_ifp; @@ -475,11 +475,25 @@ msk_miibus_statchg(device_t dev) (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; - if (mii->mii_media_status & IFM_ACTIVE) { - if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) + sc_if->msk_flags &= ~MSK_FLAG_LINK; + if ((mii->mii_media_status & (IFM_AVALID | IFM_ACTIVE)) == + (IFM_AVALID | IFM_ACTIVE)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: sc_if->msk_flags |= MSK_FLAG_LINK; - } else - sc_if->msk_flags &= ~MSK_FLAG_LINK; + break; + case IFM_1000_T: + case IFM_1000_SX: + case IFM_1000_LX: + case IFM_1000_CX: + if ((sc_if->msk_flags & MSK_FLAG_FASTETHER) == 0) + sc_if->msk_flags |= MSK_FLAG_LINK; + break; + default: + break; + } + } if ((sc_if->msk_flags & MSK_FLAG_LINK) != 0) { /* Enable Tx FIFO Underrun. */ @@ -538,10 +552,12 @@ msk_miibus_statchg(device_t dev) msk_phy_writereg(sc_if, PHY_ADDR_MARV, PHY_MARV_INT_MASK, 0); /* Disable Rx/Tx MAC. */ gmac = GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL); - gmac &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA); - GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, gmac); - /* Read again to ensure writing. */ - GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL); + if ((GM_GPCR_RX_ENA | GM_GPCR_TX_ENA) != 0) { + gmac &= ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, gmac); + /* Read again to ensure writing. */ + GMAC_READ_2(sc, sc_if->msk_port, GM_GP_CTRL); + } } } @@ -901,20 +917,29 @@ msk_ioctl(struct ifnet *ifp, u_long comm switch(command) { case SIOCSIFMTU: + MSK_IF_LOCK(sc_if); if (ifr->ifr_mtu > MSK_JUMBO_MTU || ifr->ifr_mtu < ETHERMIN) error = EINVAL; else if (ifp->if_mtu != ifr->ifr_mtu) { - if ((sc_if->msk_flags & MSK_FLAG_NOJUMBO) != 0 && - ifr->ifr_mtu > ETHERMTU) - error = EINVAL; - else { - MSK_IF_LOCK(sc_if); - ifp->if_mtu = ifr->ifr_mtu; - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) - msk_init_locked(sc_if); - MSK_IF_UNLOCK(sc_if); + if (ifr->ifr_mtu > ETHERMTU) { + if ((sc_if->msk_flags & MSK_FLAG_JUMBO) == 0) { + error = EINVAL; + MSK_IF_UNLOCK(sc_if); + break; + } + if ((sc_if->msk_flags & + MSK_FLAG_JUMBO_NOCSUM) != 0) { + ifp->if_hwassist &= + ~(MSK_CSUM_FEATURES | CSUM_TSO); + ifp->if_capenable &= + ~(IFCAP_TSO4 | IFCAP_TXCSUM); + VLAN_CAPABILITIES(ifp); + } } + ifp->if_mtu = ifr->ifr_mtu; + msk_init_locked(sc_if); } + MSK_IF_UNLOCK(sc_if); break; case SIOCSIFFLAGS: MSK_IF_LOCK(sc_if); @@ -971,11 +996,7 @@ msk_ioctl(struct ifnet *ifp, u_long comm ifp->if_hwassist &= ~CSUM_TSO; } if (ifp->if_mtu > ETHERMTU && - sc_if->msk_softc->msk_hw_id == CHIP_ID_YUKON_EC_U) { - /* - * In Yukon EC Ultra, TSO & checksum offload is not - * supported for jumbo frame. - */ + (sc_if->msk_flags & MSK_FLAG_JUMBO_NOCSUM) != 0) { ifp->if_hwassist &= ~(MSK_CSUM_FEATURES | CSUM_TSO); ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TXCSUM); } @@ -1059,7 +1080,7 @@ mskc_setup_rambuffer(struct msk_softc *s static void msk_phy_power(struct msk_softc *sc, int mode) { - uint32_t val; + uint32_t our, val; int i; switch (mode) { @@ -1085,16 +1106,17 @@ msk_phy_power(struct msk_softc *sc, int val = pci_read_config(sc->msk_dev, PCI_OUR_REG_1, 4); val &= ~(PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); - if (sc->msk_hw_id == CHIP_ID_YUKON_XL && - sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { - /* Deassert Low Power for 1st PHY. */ - val |= PCI_Y2_PHY1_COMA; - if (sc->msk_num_port > 1) - val |= PCI_Y2_PHY2_COMA; - } else if (sc->msk_hw_id == CHIP_ID_YUKON_EC_U) { - uint32_t our; - - CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_ON); + switch (sc->msk_hw_id) { + case CHIP_ID_YUKON_XL: + if (sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { + /* Deassert Low Power for 1st PHY. */ + val |= PCI_Y2_PHY1_COMA; + if (sc->msk_num_port > 1) + val |= PCI_Y2_PHY2_COMA; + } + break; + case CHIP_ID_YUKON_EC_U: + CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ pci_write_config(sc->msk_dev, PCI_OUR_REG_3, 0, 4); @@ -1105,6 +1127,9 @@ msk_phy_power(struct msk_softc *sc, int pci_write_config(sc->msk_dev, PCI_OUR_REG_4, our, 4); /* Set to default value. */ pci_write_config(sc->msk_dev, PCI_OUR_REG_5, 0, 4); + break; + default: + break; } /* Release PHY from PowerDown/COMA mode. */ pci_write_config(sc->msk_dev, PCI_OUR_REG_1, val, 4); @@ -1406,10 +1431,6 @@ msk_attach(device_t dev) callout_init_mtx(&sc_if->msk_tick_ch, &sc_if->msk_softc->msk_mtx, 0); msk_sysctl_node(sc_if); - /* Disable jumbo frame for Yukon FE. */ - if (sc_if->msk_softc->msk_hw_id == CHIP_ID_YUKON_FE) - sc_if->msk_flags |= MSK_FLAG_NOJUMBO; - if ((error = msk_txrx_dma_alloc(sc_if) != 0)) goto fail; msk_rx_dma_jalloc(sc_if); @@ -1609,14 +1630,20 @@ mskc_attach(device_t dev) switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC: + sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO; + break; case CHIP_ID_YUKON_EC_U: sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; case CHIP_ID_YUKON_FE: sc->msk_clock = 100; /* 100 Mhz */ + sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_XL: sc->msk_clock = 156; /* 156 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO; break; default: sc->msk_clock = 156; /* 156 Mhz */ @@ -2158,11 +2185,10 @@ msk_rx_dma_jalloc(struct msk_if_softc *s bus_size_t rxalign; int error, i; - if (jumbo_disable != 0 || (sc_if->msk_flags & MSK_FLAG_NOJUMBO) != 0) { - sc_if->msk_flags |= MSK_FLAG_NOJUMBO; + if (jumbo_disable != 0 || (sc_if->msk_flags & MSK_FLAG_JUMBO) == 0) { + sc_if->msk_flags &= ~MSK_FLAG_JUMBO; device_printf(sc_if->msk_if_dev, "disabling jumbo frame support\n"); - sc_if->msk_flags |= MSK_FLAG_NOJUMBO; return (0); } /* Create tag for jumbo Rx ring. */ @@ -2257,7 +2283,7 @@ jumbo_fail: msk_rx_dma_jfree(sc_if); device_printf(sc_if->msk_if_dev, "disabling jumbo frame support " "due to resource shortage\n"); - sc_if->msk_flags |= MSK_FLAG_NOJUMBO; + sc_if->msk_flags &= ~MSK_FLAG_JUMBO; return (error); } @@ -2393,7 +2419,8 @@ msk_encap(struct msk_if_softc *sc_if, st tcp_offset = offset = 0; m = *m_head; - if ((m->m_pkthdr.csum_flags & (MSK_CSUM_FEATURES | CSUM_TSO)) != 0) { + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && + (m->m_pkthdr.csum_flags & (MSK_CSUM_FEATURES | CSUM_TSO)) != 0) { /* * Since mbuf has no protocol specific structure information * in it we have to inspect protocol information here to @@ -2520,11 +2547,18 @@ msk_encap(struct msk_if_softc *sc_if, st /* Check TSO support. */ if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { - tso_mtu = offset + m->m_pkthdr.tso_segsz; + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0) + tso_mtu = m->m_pkthdr.tso_segsz; + else + tso_mtu = offset + m->m_pkthdr.tso_segsz; if (tso_mtu != sc_if->msk_cdata.msk_tso_mtu) { tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; tx_le->msk_addr = htole32(tso_mtu); - tx_le->msk_control = htole32(OP_LRGLEN | HW_OWNER); + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0) + tx_le->msk_control = htole32(OP_MSS | HW_OWNER); + else + tx_le->msk_control = + htole32(OP_LRGLEN | HW_OWNER); sc_if->msk_cdata.msk_tx_cnt++; MSK_INC(prod, MSK_TX_RING_CNT); sc_if->msk_cdata.msk_tso_mtu = tso_mtu; @@ -2548,15 +2582,21 @@ msk_encap(struct msk_if_softc *sc_if, st } /* Check if we have to handle checksum offload. */ if (tso == 0 && (m->m_pkthdr.csum_flags & MSK_CSUM_FEATURES) != 0) { - tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; - tx_le->msk_addr = htole32(((tcp_offset + m->m_pkthdr.csum_data) - & 0xffff) | ((uint32_t)tcp_offset << 16)); - tx_le->msk_control = htole32(1 << 16 | (OP_TCPLISW | HW_OWNER)); - control = CALSUM | WR_SUM | INIT_SUM | LOCK_SUM; - if ((m->m_pkthdr.csum_flags & CSUM_UDP) != 0) - control |= UDPTCP; - sc_if->msk_cdata.msk_tx_cnt++; - MSK_INC(prod, MSK_TX_RING_CNT); + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0) + control |= CALSUM; + else { + tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; + tx_le->msk_addr = htole32(((tcp_offset + + m->m_pkthdr.csum_data) & 0xffff) | + ((uint32_t)tcp_offset << 16)); + tx_le->msk_control = htole32(1 << 16 | + (OP_TCPLISW | HW_OWNER)); + control = CALSUM | WR_SUM | INIT_SUM | LOCK_SUM; + if ((m->m_pkthdr.csum_flags & CSUM_UDP) != 0) + control |= UDPTCP; + sc_if->msk_cdata.msk_tx_cnt++; + MSK_INC(prod, MSK_TX_RING_CNT); + } } si = prod; @@ -2794,7 +2834,7 @@ mskc_resume(device_t dev) ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) msk_init_locked(sc->msk_if[i]); } - sc->msk_pflags &= MSK_FLAG_SUSPEND; + sc->msk_pflags &= ~MSK_FLAG_SUSPEND; MSK_UNLOCK(sc); @@ -3490,27 +3530,21 @@ msk_init_locked(struct msk_if_softc *sc_ sc_if->msk_framesize = ifp->if_mtu; sc_if->msk_framesize += ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN; if (ifp->if_mtu > ETHERMTU && - sc_if->msk_softc->msk_hw_id == CHIP_ID_YUKON_EC_U) { - /* - * In Yukon EC Ultra, TSO & checksum offload is not - * supported for jumbo frame. - */ + (sc_if->msk_flags & MSK_FLAG_JUMBO_NOCSUM) != 0) { ifp->if_hwassist &= ~(MSK_CSUM_FEATURES | CSUM_TSO); ifp->if_capenable &= ~(IFCAP_TSO4 | IFCAP_TXCSUM); } + /* GMAC Control reset. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_SET); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_CLR); + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_F_LOOPB_OFF); + /* - * Initialize GMAC first. - * Without this initialization, Rx MAC did not work as expected - * and Rx MAC garbled status LEs and it resulted in out-of-order - * or duplicated frame delivery which in turn showed very poor - * Rx performance.(I had to write a packet analysis code that - * could be embeded in driver to diagnose this issue.) - * I've spent almost 2 months to fix this issue. If I have had - * datasheet for Yukon II I wouldn't have encountered this. :-( + * Initialize GMAC first such that speed/duplex/flow-control + * parameters are renegotiated when interface is brought up. */ - gmac = GM_GPCR_SPEED_100 | GM_GPCR_SPEED_1000 | GM_GPCR_DUP_FULL; - GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, gmac); + GMAC_WRITE_2(sc, sc_if->msk_port, GM_GP_CTRL, 0); /* Dummy read the Interrupt Source Register. */ CSR_READ_1(sc, MR_ADDR(sc_if->msk_port, GMAC_IRQ_SRC)); Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:06:25 2009 (r194418) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:16:19 2009 (r194419) @@ -2122,6 +2122,8 @@ struct msk_stat_desc { #define OP_ADDR64VLAN (OP_ADDR64 | OP_VLAN) #define OP_LRGLEN 0x24000000 #define OP_LRGLENVLAN (OP_LRGLEN | OP_VLAN) +#define OP_MSS 0x28000000 +#define OP_MSSVLAN (OP_MSS | OP_VLAN) #define OP_BUFFER 0x40000000 #define OP_PACKET 0x41000000 #define OP_LARGESEND 0x43000000 @@ -2382,8 +2384,11 @@ struct msk_if_softc { int msk_phyaddr; uint32_t msk_flags; #define MSK_FLAG_MSI 0x0001 -#define MSK_FLAG_RAMBUF 0x0010 -#define MSK_FLAG_NOJUMBO 0x0020 +#define MSK_FLAG_FASTETHER 0x0004 +#define MSK_FLAG_JUMBO 0x0008 +#define MSK_FLAG_JUMBO_NOCSUM 0x0010 +#define MSK_FLAG_RAMBUF 0x0020 +#define MSK_FLAG_DESCV2 0x0040 #define MSK_FLAG_SUSPEND 0x2000 #define MSK_FLAG_DETACH 0x4000 #define MSK_FLAG_LINK 0x8000 From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:20:02 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE9BD106564A; Thu, 18 Jun 2009 05:20:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 920078FC19; Thu, 18 Jun 2009 05:20:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5K2wL099018; Thu, 18 Jun 2009 05:20:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5K2ad099015; Thu, 18 Jun 2009 05:20:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180520.n5I5K2ad099015@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:20:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194420 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:20:03 -0000 Author: yongari Date: Thu Jun 18 05:20:02 2009 New Revision: 194420 URL: http://svn.freebsd.org/changeset/base/194420 Log: MFC r192734: Add preliminary Yukon FE+ support and register definitions. Yukon FE+ is fast ethernet controller and uses new descriptor format. Since I don't have this controller, the support code was written from guess and various feedback from enthusiastic users. Thanks to all users who patiently tested my initial patches. Special thanks to Tanguy Bouzeloc who fixed critical bug of initial patch. Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:16:19 2009 (r194419) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:20:02 2009 (r194420) @@ -220,7 +220,8 @@ static const char *model_name[] = { "Yukon EC Ultra", "Yukon Unknown", "Yukon EC", - "Yukon FE" + "Yukon FE", + "Yukon FE+" }; static int mskc_probe(device_t); @@ -1116,6 +1117,7 @@ msk_phy_power(struct msk_softc *sc, int } break; case CHIP_ID_YUKON_EC_U: + case CHIP_ID_YUKON_FE_P: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1579,7 +1581,7 @@ mskc_attach(device_t dev) sc->msk_hw_rev = (CSR_READ_1(sc, B2_MAC_CFG) >> 4) & 0x0f; /* Bail out if chip is not recognized. */ if (sc->msk_hw_id < CHIP_ID_YUKON_XL || - sc->msk_hw_id > CHIP_ID_YUKON_FE) { + sc->msk_hw_id > CHIP_ID_YUKON_FE_P) { device_printf(dev, "unknown device: id=0x%02x, rev=0x%02x\n", sc->msk_hw_id, sc->msk_hw_rev); mtx_destroy(&sc->msk_mtx); @@ -1641,6 +1643,10 @@ mskc_attach(device_t dev) sc->msk_clock = 100; /* 100 Mhz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; + case CHIP_ID_YUKON_FE_P: + sc->msk_clock = 50; /* 50 Mhz */ + sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2; + break; case CHIP_ID_YUKON_XL: sc->msk_clock = 156; /* 156 Mhz */ sc->msk_pflags |= MSK_FLAG_JUMBO; @@ -3512,6 +3518,7 @@ msk_init_locked(struct msk_if_softc *sc_ struct mii_data *mii; uint16_t eaddr[ETHER_ADDR_LEN / 2]; uint16_t gmac; + uint32_t reg; int error, i; MSK_IF_LOCK_ASSERT(sc_if); @@ -3590,8 +3597,10 @@ msk_init_locked(struct msk_if_softc *sc_ /* Configure Rx MAC FIFO. */ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_RST_SET); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_RST_CLR); - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), - GMF_OPER_ON | GMF_RX_F_FL_ON); + reg = GMF_OPER_ON | GMF_RX_F_FL_ON; + if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P) + reg |= GMF_RX_OVER_ON; + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), reg); /* Set receive filter. */ msk_rxfilter(sc_if); Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:16:19 2009 (r194419) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:20:02 2009 (r194420) @@ -828,6 +828,7 @@ #define CHIP_ID_YUKON_EC_U 0xb4 /* Chip ID for YUKON-2 EC Ultra */ #define CHIP_ID_YUKON_EC 0xb6 /* Chip ID for YUKON-2 EC */ #define CHIP_ID_YUKON_FE 0xb7 /* Chip ID for YUKON-2 FE */ +#define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ #define CHIP_REV_YU_XL_A0 0 /* Chip Rev. for Yukon-2 A0 */ #define CHIP_REV_YU_XL_A1 1 /* Chip Rev. for Yukon-2 A1 */ @@ -841,6 +842,8 @@ #define CHIP_REV_YU_EC_U_A0 1 #define CHIP_REV_YU_EC_U_A1 2 +#define CHIP_REV_YU_FE_P_A0 0 /* Chip Rev. for Yukon-2 FE+ A0 */ + /* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */ #define Y2_STATUS_LNK2_INAC BIT_7 /* Status Link 2 inactiv (0 = activ) */ #define Y2_CLK_GAT_LNK2_DIS BIT_6 /* Disable clock gating Link 2 */ @@ -1855,6 +1858,10 @@ #define RX_TRUNC_OFF BIT_26 /* disable packet truncation */ #define RX_VLAN_STRIP_ON BIT_25 /* enable VLAN stripping */ #define RX_VLAN_STRIP_OFF BIT_24 /* disable VLAN stripping */ +#define GMF_RX_OVER_ON BIT_19 /* enable flushing on receive overrun */ +#define GMF_RX_OVER_OFF BIT_18 /* disable flushing on receive overrun */ +#define GMF_ASF_RX_OVER_ON BIT_17 /* enable flushing of ASF when overrun */ +#define GMF_ASF_RX_OVER_OFF BIT_16 /* disable flushing of ASF when overrun */ #define GMF_WP_TST_ON BIT_14 /* Write Pointer Test On */ #define GMF_WP_TST_OFF BIT_13 /* Write Pointer Test Off */ #define GMF_WP_STEP BIT_12 /* Write Pointer Step/Increment */ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:29:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3688106566C; Thu, 18 Jun 2009 05:29:30 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FAD18FC0C; Thu, 18 Jun 2009 05:29:30 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5TUBt099330; Thu, 18 Jun 2009 05:29:30 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5TUea099327; Thu, 18 Jun 2009 05:29:30 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180529.n5I5TUea099327@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194421 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:29:31 -0000 Author: yongari Date: Thu Jun 18 05:29:30 2009 New Revision: 194421 URL: http://svn.freebsd.org/changeset/base/194421 Log: MFC r192735-192740,192742: Add workaround for Yukon FE+ A0. This controller is known to have severe silicon bugs that can't handle VLAN hardware tagging as well as status LE writeback bug. The status LE writeback bug is so critical we can't trust status word of received frame. To accept frames on Yukon FE+ A0 msk(4) just do minimal check for received frames and pass them to upper stack. This means msk(4) can pass corrupted frames to upper layer. You have been warned! Also I supposed RX_GMF_FL_THR to be 32bits register but Linux driver treated it as 16bit register so follow their leads. At least this does not seem to break msk(4) on Yukon FE+. Tested by: bz, Tanguy Bouzeloc ( the.zauron <> gmail dot com ) Bruce Cran ( bruce <> cran dot org dot uk ) Michael Reifenberger ( mike <> reifenberger dot com ) Stephen Montgomery-Smith ( stephen <> missouri dot edu ) r192736: Add device ids for Yukon FE+(88E8040, 88E8040T, 88E8048 and 88E8070). r192737: If interface is not UP, don't return media status. r192738: Don't reinitialize controller when interface is already running. r192739: Be consistent with other capability checking. r192740: Simplify SIOCSIFFLAGS handler. r192742: Correct controller description for 88E8035, 88E8036, 88E8038 and 88E8039. These are fast ethernet controllers. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:20:02 2009 (r194420) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:29:30 2009 (r194421) @@ -190,13 +190,21 @@ static struct msk_product { { VENDORID_MARVELL, DEVICEID_MRVL_8062X, "Marvell Yukon 88E8062 SX/LX Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8035, - "Marvell Yukon 88E8035 Gigabit Ethernet" }, + "Marvell Yukon 88E8035 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8036, - "Marvell Yukon 88E8036 Gigabit Ethernet" }, + "Marvell Yukon 88E8036 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8038, - "Marvell Yukon 88E8038 Gigabit Ethernet" }, + "Marvell Yukon 88E8038 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8039, - "Marvell Yukon 88E8039 Gigabit Ethernet" }, + "Marvell Yukon 88E8039 Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8040, + "Marvell Yukon 88E8040 Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8040T, + "Marvell Yukon 88E8040T Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8048, + "Marvell Yukon 88E8048 Fast Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_8070, + "Marvell Yukon 88E8070 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4361, "Marvell Yukon 88E8050 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4360, @@ -896,6 +904,10 @@ msk_mediastatus(struct ifnet *ifp, struc sc_if = ifp->if_softc; MSK_IF_LOCK(sc_if); + if ((ifp->if_flags & IFF_UP) == 0) { + MSK_IF_UNLOCK(sc_if); + return; + } mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); @@ -945,18 +957,14 @@ msk_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFFLAGS: MSK_IF_LOCK(sc_if); if ((ifp->if_flags & IFF_UP) != 0) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - if (((ifp->if_flags ^ sc_if->msk_if_flags) - & (IFF_PROMISC | IFF_ALLMULTI)) != 0) - msk_rxfilter(sc_if); - } else { - if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0) - msk_init_locked(sc_if); - } - } else { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) - msk_stop(sc_if); - } + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0 && + ((ifp->if_flags ^ sc_if->msk_if_flags) & + (IFF_PROMISC | IFF_ALLMULTI)) != 0) + msk_rxfilter(sc_if); + else if ((sc_if->msk_flags & MSK_FLAG_DETACH) == 0) + msk_init_locked(sc_if); + } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + msk_stop(sc_if); sc_if->msk_if_flags = ifp->if_flags; MSK_IF_UNLOCK(sc_if); break; @@ -975,23 +983,24 @@ msk_ioctl(struct ifnet *ifp, u_long comm case SIOCSIFCAP: MSK_IF_LOCK(sc_if); mask = ifr->ifr_reqcap ^ ifp->if_capenable; - if ((mask & IFCAP_TXCSUM) != 0) { + if ((mask & IFCAP_TXCSUM) != 0 && + (IFCAP_TXCSUM & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_TXCSUM; - if ((IFCAP_TXCSUM & ifp->if_capenable) != 0 && - (IFCAP_TXCSUM & ifp->if_capabilities) != 0) + if ((IFCAP_TXCSUM & ifp->if_capenable) != 0) ifp->if_hwassist |= MSK_CSUM_FEATURES; else ifp->if_hwassist &= ~MSK_CSUM_FEATURES; } - if ((mask & IFCAP_VLAN_HWTAGGING) != 0) { + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; msk_setvlan(sc_if, ifp); } - if ((mask & IFCAP_TSO4) != 0) { + if ((mask & IFCAP_TSO4) != 0 && + (IFCAP_TSO4 & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_TSO4; - if ((IFCAP_TSO4 & ifp->if_capenable) != 0 && - (IFCAP_TSO4 & ifp->if_capabilities) != 0) + if ((IFCAP_TSO4 & ifp->if_capenable) != 0) ifp->if_hwassist |= CSUM_TSO; else ifp->if_hwassist &= ~CSUM_TSO; @@ -1493,14 +1502,17 @@ msk_attach(device_t dev) ether_ifattach(ifp, eaddr); MSK_IF_LOCK(sc_if); - /* - * VLAN capability setup - * Due to Tx checksum offload hardware bugs, msk(4) manually - * computes checksum for short frames. For VLAN tagged frames - * this workaround does not work so disable checksum offload - * for VLAN interface. - */ - ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; + /* VLAN capability setup */ + ifp->if_capabilities |= IFCAP_VLAN_MTU; + if ((sc_if->msk_flags & MSK_FLAG_NOHWVLAN) == 0) { + /* + * Due to Tx checksum offload hardware bugs, msk(4) manually + * computes checksum for short frames. For VLAN tagged frames + * this workaround does not work so disable checksum offload + * for VLAN interface. + */ + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; + } ifp->if_capenable = ifp->if_capabilities; /* @@ -1646,6 +1658,19 @@ mskc_attach(device_t dev) case CHIP_ID_YUKON_FE_P: sc->msk_clock = 50; /* 50 Mhz */ sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2; + if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { + /* + * XXX + * FE+ A0 has status LE writeback bug so msk(4) + * does not rely on status word of received frame + * in msk_rxeof() which in turn disables all + * hardware assistance bits reported by the status + * word as well as validity of the recevied frame. + * Just pass received frames to upper stack with + * minimal test and let upper stack handle them. + */ + sc->msk_pflags |= MSK_FLAG_NOHWVLAN | MSK_FLAG_NORXCHK; + } break; case CHIP_ID_YUKON_XL: sc->msk_clock = 156; /* 156 Mhz */ @@ -2735,6 +2760,7 @@ msk_watchdog(struct msk_if_softc *sc_if) if_printf(sc_if->msk_ifp, "watchdog timeout " "(missed link)\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); return; } @@ -2759,6 +2785,7 @@ msk_watchdog(struct msk_if_softc *sc_if) if_printf(ifp, "watchdog timeout\n"); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; msk_init_locked(sc_if); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue(taskqueue_fast, &sc_if->msk_tx_task); @@ -2837,8 +2864,11 @@ mskc_resume(device_t dev) mskc_reset(sc); for (i = 0; i < sc->msk_num_port; i++) { if (sc->msk_if[i] != NULL && sc->msk_if[i]->msk_ifp != NULL && - ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) + ((sc->msk_if[i]->msk_ifp->if_flags & IFF_UP) != 0)) { + sc->msk_if[i]->msk_ifp->if_drv_flags &= + ~IFF_DRV_RUNNING; msk_init_locked(sc->msk_if[i]); + } } sc->msk_pflags &= ~MSK_FLAG_SUSPEND; @@ -2882,7 +2912,18 @@ msk_rxeof(struct msk_if_softc *sc_if, ui if ((status & GMR_FS_VLAN) != 0 && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) rxlen -= ETHER_VLAN_ENCAP_LEN; - if (len > sc_if->msk_framesize || + if ((sc_if->msk_flags & MSK_FLAG_NORXCHK) != 0) { + /* + * For controllers that returns bogus status code + * just do minimal check and let upper stack + * handle this frame. + */ + if (len > MSK_MAX_FRAMELEN || len < ETHER_HDR_LEN) { + ifp->if_ierrors++; + msk_discard_rxbuf(sc_if, cons); + break; + } + } else if (len > sc_if->msk_framesize || ((status & GMR_FS_ANY_ERR) != 0) || ((status & GMR_FS_RX_OK) == 0) || (rxlen != len)) { /* Don't count flow-control packet as errors. */ @@ -3527,6 +3568,9 @@ msk_init_locked(struct msk_if_softc *sc_ sc = sc_if->msk_softc; mii = device_get_softc(sc_if->msk_miibus); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + error = 0; /* Cancel pending I/O and free all Rx/Tx buffers. */ msk_stop(sc_if); @@ -3613,8 +3657,12 @@ msk_init_locked(struct msk_if_softc *sc_ * Set Rx FIFO flush threshold to 64 bytes + 1 FIFO word * due to hardware hang on receipt of pause frames. */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_THR), - RX_GMF_FL_THR_DEF + 1); + reg = RX_GMF_FL_THR_DEF + 1; + /* Another magic for Yukon FE+ - From Linux. */ + if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P && + sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) + reg = 0x178; + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_FL_THR), reg); /* Configure Tx MAC FIFO. */ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), GMF_RST_SET); @@ -3646,6 +3694,14 @@ msk_init_locked(struct msk_if_softc *sc_ } } + if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P && + sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { + /* Disable dynamic watermark - from Linux. */ + reg = CSR_READ_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA)); + reg &= ~0x03; + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_EA), reg); + } + /* * Disable Force Sync bit and Alloc bit in Tx RAM interface * arbiter as we don't use Sync Tx queue. Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:20:02 2009 (r194420) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:29:30 2009 (r194421) @@ -130,12 +130,16 @@ #define DEVICEID_MRVL_8035 0x4350 #define DEVICEID_MRVL_8036 0x4351 #define DEVICEID_MRVL_8038 0x4352 -#define DEVICEID_MRVL_8039 0X4353 +#define DEVICEID_MRVL_8039 0x4353 +#define DEVICEID_MRVL_8040 0x4354 +#define DEVICEID_MRVL_8040T 0x4355 +#define DEVICEID_MRVL_8048 0x435A #define DEVICEID_MRVL_4360 0x4360 #define DEVICEID_MRVL_4361 0x4361 #define DEVICEID_MRVL_4362 0x4362 #define DEVICEID_MRVL_4363 0x4363 #define DEVICEID_MRVL_4364 0x4364 +#define DEVICEID_MRVL_8070 0x4365 #define DEVICEID_MRVL_436A 0x436A /* @@ -2396,6 +2400,8 @@ struct msk_if_softc { #define MSK_FLAG_JUMBO_NOCSUM 0x0010 #define MSK_FLAG_RAMBUF 0x0020 #define MSK_FLAG_DESCV2 0x0040 +#define MSK_FLAG_NOHWVLAN 0x0080 +#define MSK_FLAG_NORXCHK 0x0100 #define MSK_FLAG_SUSPEND 0x2000 #define MSK_FLAG_DETACH 0x4000 #define MSK_FLAG_LINK 0x8000 From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:46:33 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A530106566B; Thu, 18 Jun 2009 05:46:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 765F68FC0C; Thu, 18 Jun 2009 05:46:33 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5kXPJ099743; Thu, 18 Jun 2009 05:46:33 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5kXaS099740; Thu, 18 Jun 2009 05:46:33 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180546.n5I5kXaS099740@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194422 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:46:34 -0000 Author: yongari Date: Thu Jun 18 05:46:33 2009 New Revision: 194422 URL: http://svn.freebsd.org/changeset/base/194422 Log: MFC r193293-193294: r193293: Add preliminary Yukon Extreme support and register definitions. Yukon Extreme uses new descriptor format for TSO and has Tx frame parser which greatly reduces CPU cycles spent in computing TCP/UDP payload offset calculation in Tx checksum offloading path. The new descriptor format also removed TCP/UDP payload computation for TSO which in turn results in better TSO performance. It seems Yukon Extreme has a lot of new (unknown) features but only basic offloading is supported at this time. So far there are two known issues. o Sometimes Rx overrun errors happen when pulling data over gigabit link. Running over 100Mbps seem to ok. o Ethernet hardware address shows all-zeroed value on 88E8070. Assigning ethernet address with ifconfig is necessary to make it work. Support for Yukon Extreme is not perfect but it would be better than having a non-working device. Special thanks to jbh who fixed several bugs of initial patch. Tested by: jhb, Warren Block ( wblock <> wonkity dot com ) r193294: Add frame parser capability of Yukon FE+ and Yukon Extreme. With this feature hardware automatically computes TCP/UDP payload offset. Introduce MSK_FLAG_AUTOTX_CSUM to mark the capability. Yukon Extreme B0 revision is known to have a silicon for the feature so disable it. Yukon Extreme B0 still can do Tx checksum offloading but CPU have to compute TCP/UDP payload offset. To enable traditional checksum offloading, disable automatic Tx checksum calculation capability. Yukon Extreme A0 revision could not use store-and-forward mode for jumbo frames(silicon bug) so disable Tx checksum offloading for jumbo frames. I believe controllers that have MSK_FLAG_AUTOTX_CSUM capability or new descriptor format do not have Tx checksum offload bug so disable checksum offloading workaround for for short frames. Tested by: jhb, Warren Block ( wblock <> wonkity dot com ) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:29:30 2009 (r194421) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:46:33 2009 (r194422) @@ -226,7 +226,7 @@ static struct msk_product { static const char *model_name[] = { "Yukon XL", "Yukon EC Ultra", - "Yukon Unknown", + "Yukon EX", "Yukon EC", "Yukon FE", "Yukon FE+" @@ -1116,16 +1116,19 @@ msk_phy_power(struct msk_softc *sc, int val = pci_read_config(sc->msk_dev, PCI_OUR_REG_1, 4); val &= ~(PCI_Y2_PHY1_POWD | PCI_Y2_PHY2_POWD); - switch (sc->msk_hw_id) { - case CHIP_ID_YUKON_XL: + if (sc->msk_hw_id == CHIP_ID_YUKON_XL) { if (sc->msk_hw_rev > CHIP_REV_YU_XL_A1) { /* Deassert Low Power for 1st PHY. */ val |= PCI_Y2_PHY1_COMA; if (sc->msk_num_port > 1) val |= PCI_Y2_PHY2_COMA; } - break; + } + /* Release PHY from PowerDown/COMA mode. */ + pci_write_config(sc->msk_dev, PCI_OUR_REG_1, val, 4); + switch (sc->msk_hw_id) { case CHIP_ID_YUKON_EC_U: + case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); @@ -1136,14 +1139,22 @@ msk_phy_power(struct msk_softc *sc, int PCI_ASPM_INT_FIFO_EMPTY|PCI_ASPM_CLKRUN_REQUEST); /* Set all bits to 0 except bits 15..12. */ pci_write_config(sc->msk_dev, PCI_OUR_REG_4, our, 4); - /* Set to default value. */ - pci_write_config(sc->msk_dev, PCI_OUR_REG_5, 0, 4); + our = pci_read_config(sc->msk_dev, PCI_OUR_REG_5, 4); + our &= PCI_CTL_TIM_VMAIN_AV_MSK; + pci_write_config(sc->msk_dev, PCI_OUR_REG_5, our, 4); + pci_write_config(sc->msk_dev, PCI_CFG_REG_1, 0, 4); + /* + * Disable status race, workaround for + * Yukon EC Ultra & Yukon EX. + */ + val = CSR_READ_4(sc, B2_GP_IO); + val |= GLB_GPIO_STAT_RACE_DIS; + CSR_WRITE_4(sc, B2_GP_IO, val); + CSR_READ_4(sc, B2_GP_IO); break; default: break; } - /* Release PHY from PowerDown/COMA mode. */ - pci_write_config(sc->msk_dev, PCI_OUR_REG_1, val, 4); for (i = 0; i < sc->msk_num_port; i++) { CSR_WRITE_2(sc, MR_ADDR(i, GMAC_LINK_CTRL), GMLC_RST_SET); @@ -1194,10 +1205,18 @@ mskc_reset(struct msk_softc *sc) CSR_WRITE_2(sc, B0_CTST, CS_RST_CLR); /* Disable ASF. */ - if (sc->msk_hw_id < CHIP_ID_YUKON_XL) { - CSR_WRITE_4(sc, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET); - CSR_WRITE_2(sc, B0_CTST, Y2_ASF_DISABLE); - } + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + status = CSR_READ_2(sc, B28_Y2_ASF_HCU_CCSR); + /* Clear AHB bridge & microcontroller reset. */ + status &= ~(Y2_ASF_HCU_CCSR_AHB_RST | + Y2_ASF_HCU_CCSR_CPU_RST_MODE); + /* Clear ASF microcontroller state. */ + status &= ~ Y2_ASF_HCU_CCSR_UC_STATE_MSK; + CSR_WRITE_2(sc, B28_Y2_ASF_HCU_CCSR, status); + } else + CSR_WRITE_1(sc, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET); + CSR_WRITE_2(sc, B0_CTST, Y2_ASF_DISABLE); + /* * Since we disabled ASF, S/W reset is required for Power Management. */ @@ -1249,6 +1268,10 @@ mskc_reset(struct msk_softc *sc) CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_SET); CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_RST_CLR); CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), GMC_F_LOOPB_OFF); + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) + CSR_WRITE_4(sc, MR_ADDR(i, GMAC_CTRL), + GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | + GMC_BYP_RETR_ON); } CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); @@ -1651,13 +1674,32 @@ mskc_attach(device_t dev) sc->msk_clock = 125; /* 125 Mhz */ sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_JUMBO_NOCSUM; break; + case CHIP_ID_YUKON_EX: + sc->msk_clock = 125; /* 125 Mhz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2 | + MSK_FLAG_AUTOTX_CSUM; + /* + * Yukon Extreme seems to have silicon bug for + * automatic Tx checksum calculation capability. + */ + if (sc->msk_hw_rev == CHIP_REV_YU_EX_B0) + sc->msk_pflags &= ~MSK_FLAG_AUTOTX_CSUM; + /* + * Yukon Extreme A0 could not use store-and-forward + * for jumbo frames, so disable Tx checksum + * offloading for jumbo frames. + */ + if (sc->msk_hw_rev == CHIP_REV_YU_EX_A0) + sc->msk_pflags |= MSK_FLAG_JUMBO_NOCSUM; + break; case CHIP_ID_YUKON_FE: sc->msk_clock = 100; /* 100 Mhz */ sc->msk_pflags |= MSK_FLAG_FASTETHER; break; case CHIP_ID_YUKON_FE_P: sc->msk_clock = 50; /* 50 Mhz */ - sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2; + sc->msk_pflags |= MSK_FLAG_FASTETHER | MSK_FLAG_DESCV2 | + MSK_FLAG_AUTOTX_CSUM; if (sc->msk_hw_rev == CHIP_REV_YU_FE_P_A0) { /* * XXX @@ -2450,8 +2492,10 @@ msk_encap(struct msk_if_softc *sc_if, st tcp_offset = offset = 0; m = *m_head; - if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && - (m->m_pkthdr.csum_flags & (MSK_CSUM_FEATURES | CSUM_TSO)) != 0) { + if (((sc_if->msk_flags & MSK_FLAG_AUTOTX_CSUM) == 0 && + (m->m_pkthdr.csum_flags & MSK_CSUM_FEATURES) != 0) || + ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && + (m->m_pkthdr.csum_flags & CSUM_TSO) != 0)) { /* * Since mbuf has no protocol specific structure information * in it we have to inspect protocol information here to @@ -2510,9 +2554,12 @@ msk_encap(struct msk_if_softc *sc_if, st * resort to S/W checksum routine when we encounter short * TCP frames. * Short UDP packets appear to be handled correctly by - * Yukon II. + * Yukon II. Also I assume this bug does not happen on + * controllers that use newer descriptor format or + * automatic Tx checksum calaulcation. */ - if (m->m_pkthdr.len < MSK_MIN_FRAMELEN && + if ((sc_if->msk_flags & MSK_FLAG_AUTOTX_CSUM) == 0 && + (m->m_pkthdr.len < MSK_MIN_FRAMELEN) && (m->m_pkthdr.csum_flags & CSUM_TCP) != 0) { m = m_pullup(m, offset + sizeof(struct tcphdr)); if (m == NULL) { @@ -2613,7 +2660,7 @@ msk_encap(struct msk_if_softc *sc_if, st } /* Check if we have to handle checksum offload. */ if (tso == 0 && (m->m_pkthdr.csum_flags & MSK_CSUM_FEATURES) != 0) { - if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0) + if ((sc_if->msk_flags & MSK_FLAG_AUTOTX_CSUM) != 0) control |= CALSUM; else { tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; @@ -3542,6 +3589,48 @@ done: } static void +msk_set_tx_stfwd(struct msk_if_softc *sc_if) +{ + struct msk_softc *sc; + struct ifnet *ifp; + + ifp = sc_if->msk_ifp; + sc = sc_if->msk_softc; + switch (sc->msk_hw_id) { + case CHIP_ID_YUKON_EX: + if (sc->msk_hw_rev == CHIP_REV_YU_EX_A0) + goto yukon_ex_workaround; + if (ifp->if_mtu > ETHERMTU) + CSR_WRITE_4(sc, + MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_JUMBO_ENA | TX_STFW_ENA); + else + CSR_WRITE_4(sc, + MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_JUMBO_DIS | TX_STFW_ENA); + break; + default: +yukon_ex_workaround: + if (ifp->if_mtu > ETHERMTU) { + /* Set Tx GMAC FIFO Almost Empty Threshold. */ + CSR_WRITE_4(sc, + MR_ADDR(sc_if->msk_port, TX_GMF_AE_THR), + MSK_ECU_JUMBO_WM << 16 | MSK_ECU_AE_THR); + /* Disable Store & Forward mode for Tx. */ + CSR_WRITE_4(sc, + MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_JUMBO_ENA | TX_STFW_DIS); + } else { + /* Enable Store & Forward mode for Tx. */ + CSR_WRITE_4(sc, + MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), + TX_JUMBO_DIS | TX_STFW_ENA); + } + break; + } +} + +static void msk_init(void *xsc) { struct msk_if_softc *sc_if = xsc; @@ -3590,6 +3679,10 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_SET); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_RST_CLR); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), GMC_F_LOOPB_OFF); + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, GMAC_CTRL), + GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | + GMC_BYP_RETR_ON); /* * Initialize GMAC first such that speed/duplex/flow-control @@ -3642,7 +3735,8 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_RST_SET); CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), GMF_RST_CLR); reg = GMF_OPER_ON | GMF_RX_F_FL_ON; - if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P) + if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P || + sc->msk_hw_id == CHIP_ID_YUKON_EX) reg |= GMF_RX_OVER_ON; CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), reg); @@ -3678,20 +3772,8 @@ msk_init_locked(struct msk_if_softc *sc_ MSK_ECU_LLPP); CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), MSK_ECU_ULPP); - if (ifp->if_mtu > ETHERMTU) { - /* - * Set Tx GMAC FIFO Almost Empty Threshold. - */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_AE_THR), - MSK_ECU_JUMBO_WM << 16 | MSK_ECU_AE_THR); - /* Disable Store & Forward mode for Tx. */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_ENA | TX_STFW_DIS); - } else { - /* Enable Store & Forward mode for Tx. */ - CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, TX_GMF_CTRL_T), - TX_JUMBO_DIS | TX_STFW_ENA); - } + /* Configure store-and-forward for Tx. */ + msk_set_tx_stfwd(sc_if); } if (sc->msk_hw_id == CHIP_ID_YUKON_FE_P && @@ -3722,10 +3804,23 @@ msk_init_locked(struct msk_if_softc *sc_ CSR_WRITE_4(sc, Q_ADDR(sc_if->msk_txq, Q_CSR), BMU_OPER_INIT); CSR_WRITE_4(sc, Q_ADDR(sc_if->msk_txq, Q_CSR), BMU_FIFO_OP_ON); CSR_WRITE_2(sc, Q_ADDR(sc_if->msk_txq, Q_WM), MSK_BMU_TX_WM); - if (sc->msk_hw_id == CHIP_ID_YUKON_EC_U && - sc->msk_hw_rev == CHIP_REV_YU_EC_U_A0) { - /* Fix for Yukon-EC Ultra: set BMU FIFO level */ - CSR_WRITE_2(sc, Q_ADDR(sc_if->msk_txq, Q_AL), MSK_ECU_TXFF_LEV); + switch (sc->msk_hw_id) { + case CHIP_ID_YUKON_EC_U: + if (sc->msk_hw_rev == CHIP_REV_YU_EC_U_A0) { + /* Fix for Yukon-EC Ultra: set BMU FIFO level */ + CSR_WRITE_2(sc, Q_ADDR(sc_if->msk_txq, Q_AL), + MSK_ECU_TXFF_LEV); + } + break; + case CHIP_ID_YUKON_EX: + /* + * Yukon Extreme seems to have silicon bug for + * automatic Tx checksum calculation capability. + */ + if (sc->msk_hw_rev == CHIP_REV_YU_EX_B0) + CSR_WRITE_4(sc, Q_ADDR(sc_if->msk_txq, Q_F), + F_TX_CHK_AUTO_OFF); + break; } /* Setup Rx Queue Bus Memory Interface. */ Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:29:30 2009 (r194421) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:46:33 2009 (r194422) @@ -225,6 +225,8 @@ #define PCI_OUR_REG_3 0x80 /* 32 bit Our Register 3 */ #define PCI_OUR_REG_4 0x84 /* 32 bit Our Register 4 */ #define PCI_OUR_REG_5 0x88 /* 32 bit Our Register 5 */ +#define PCI_CFG_REG_0 0x90 /* 32 bit Config Register 0 */ +#define PCI_CFG_REG_1 0x94 /* 32 bit Config Register 1 */ /* PCI Express Capability */ #define PEX_CAP_ID 0xe0 /* 8 bit PEX Capability ID */ @@ -325,6 +327,56 @@ #define PCI_CLK_GATE_PEX_UNIT_ENA BIT_1 /* Enable Gate PEX Unit Clock */ #define PCI_CLK_GATE_ROOT_COR_ENA BIT_0 /* Enable Gate Root Core Clock */ +/* PCI_OUR_REG_5 32 bit Our Register 5 (Yukon-ECU only) */ + /* Bit 31..27: for A3 & later */ +#define PCI_CTL_DIV_CORE_CLK_ENA BIT_31 /* Divide Core Clock Enable */ +#define PCI_CTL_SRESET_VMAIN_AV BIT_30 /* Soft Reset for Vmain_av De-Glitch */ +#define PCI_CTL_BYPASS_VMAIN_AV BIT_29 /* Bypass En. for Vmain_av De-Glitch */ +#define PCI_CTL_TIM_VMAIN_AV1 BIT_28 /* Bit 28..27: Timer Vmain_av Mask */ +#define PCI_CTL_TIM_VMAIN_AV0 BIT_27 /* Bit 28..27: Timer Vmain_av Mask */ +#define PCI_CTL_TIM_VMAIN_AV_MSK (BIT_28 | BIT_27) + /* Bit 26..16: Release Clock on Event */ +#define PCI_REL_PCIE_RST_DE_ASS BIT_26 /* PCIe Reset De-Asserted */ +#define PCI_REL_GPHY_REC_PACKET BIT_25 /* GPHY Received Packet */ +#define PCI_REL_INT_FIFO_N_EMPTY BIT_24 /* Internal FIFO Not Empty */ +#define PCI_REL_MAIN_PWR_AVAIL BIT_23 /* Main Power Available */ +#define PCI_REL_CLKRUN_REQ_REL BIT_22 /* CLKRUN Request Release */ +#define PCI_REL_PCIE_RESET_ASS BIT_21 /* PCIe Reset Asserted */ +#define PCI_REL_PME_ASSERTED BIT_20 /* PME Asserted */ +#define PCI_REL_PCIE_EXIT_L1_ST BIT_19 /* PCIe Exit L1 State */ +#define PCI_REL_LOADER_NOT_FIN BIT_18 /* EPROM Loader Not Finished */ +#define PCI_REL_PCIE_RX_EX_IDLE BIT_17 /* PCIe Rx Exit Electrical Idle State */ +#define PCI_REL_GPHY_LINK_UP BIT_16 /* GPHY Link Up */ + /* Bit 10.. 0: Mask for Gate Clock */ +#define PCI_GAT_PCIE_RST_ASSERTED BIT_10 /* PCIe Reset Asserted */ +#define PCI_GAT_GPHY_N_REC_PACKET BIT_9 /* GPHY Not Received Packet */ +#define PCI_GAT_INT_FIFO_EMPTY BIT_8 /* Internal FIFO Empty */ +#define PCI_GAT_MAIN_PWR_N_AVAIL BIT_7 /* Main Power Not Available */ +#define PCI_GAT_CLKRUN_REQ_REL BIT_6 /* CLKRUN Not Requested */ +#define PCI_GAT_PCIE_RESET_ASS BIT_5 /* PCIe Reset Asserted */ +#define PCI_GAT_PME_DE_ASSERTED BIT_4 /* PME De-Asserted */ +#define PCI_GAT_PCIE_ENTER_L1_ST BIT_3 /* PCIe Enter L1 State */ +#define PCI_GAT_LOADER_FINISHED BIT_2 /* EPROM Loader Finished */ +#define PCI_GAT_PCIE_RX_EL_IDLE BIT_1 /* PCIe Rx Electrical Idle State */ +#define PCI_GAT_GPHY_LINK_DOWN BIT_0 /* GPHY Link Down */ + +/* PCI_CFG_REG_1 32 bit Config Register 1 */ +#define PCI_CF1_DIS_REL_EVT_RST BIT_24 /* Dis. Rel. Event during PCIE reset */ + /* Bit 23..21: Release Clock on Event */ +#define PCI_CF1_REL_LDR_NOT_FIN BIT_23 /* EEPROM Loader Not Finished */ +#define PCI_CF1_REL_VMAIN_AVLBL BIT_22 /* Vmain available */ +#define PCI_CF1_REL_PCIE_RESET BIT_21 /* PCI-E reset */ + /* Bit 20..18: Gate Clock on Event */ +#define PCI_CF1_GAT_LDR_NOT_FIN BIT_20 /* EEPROM Loader Finished */ +#define PCI_CF1_GAT_PCIE_RX_IDLE BIT_19 /* PCI-E Rx Electrical idle */ +#define PCI_CF1_GAT_PCIE_RESET BIT_18 /* PCI-E Reset */ +#define PCI_CF1_PRST_PHY_CLKREQ BIT_17 /* Enable PCI-E rst & PM2PHY gen. CLKREQ */ +#define PCI_CF1_PCIE_RST_CLKREQ BIT_16 /* Enable PCI-E rst generate CLKREQ */ + +#define PCI_CF1_ENA_CFG_LDR_DONE BIT_8 /* Enable core level Config loader done */ +#define PCI_CF1_ENA_TXBMU_RD_IDLE BIT_1 /* Enable TX BMU Read IDLE for ASPM */ +#define PCI_CF1_ENA_TXBMU_WR_IDLE BIT_0 /* Enable TX BMU Write IDLE for ASPM */ + /* PEX_DEV_CTRL 16 bit PEX Device Control (Yukon-2) */ #define PEX_DC_MAX_RRS_MSK (7<<12) /* Bit 14..12: Max. Read Request Size */ #define PEX_DC_EN_NO_SNOOP BIT_11 /* Enable No Snoop */ @@ -621,6 +673,7 @@ #define B28_Y2_SMB_CSD_REG 0x0e44 /* 32 bit ASF SMB Control/Status/Data */ #define B28_Y2_ASF_IRQ_V_BASE 0x0e60 /* 32 bit ASF IRQ Vector Base */ #define B28_Y2_ASF_STAT_CMD 0x0e68 /* 32 bit ASF Status and Command Reg */ +#define B28_Y2_ASF_HCU_CCSR 0x0e68 /* 32 bit ASF HCU CCSR (Yukon EX) */ #define B28_Y2_ASF_HOST_COM 0x0e6c /* 32 bit ASF Host Communication Reg */ #define B28_Y2_DATA_REG_1 0x0e70 /* 32 bit ASF/Host Data Register 1 */ #define B28_Y2_DATA_REG_2 0x0e74 /* 32 bit ASF/Host Data Register 2 */ @@ -830,6 +883,7 @@ #define CHIP_ID_YUKON_LP 0xb2 /* Chip ID for YUKON-LP */ #define CHIP_ID_YUKON_XL 0xb3 /* Chip ID for YUKON-2 XL */ #define CHIP_ID_YUKON_EC_U 0xb4 /* Chip ID for YUKON-2 EC Ultra */ +#define CHIP_ID_YUKON_EX 0xb5 /* Chip ID for YUKON-2 Extreme */ #define CHIP_ID_YUKON_EC 0xb6 /* Chip ID for YUKON-2 EC */ #define CHIP_ID_YUKON_FE 0xb7 /* Chip ID for YUKON-2 FE */ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ @@ -848,6 +902,9 @@ #define CHIP_REV_YU_FE_P_A0 0 /* Chip Rev. for Yukon-2 FE+ A0 */ +#define CHIP_REV_YU_EX_A0 1 /* Chip Rev. for Yukon-2 EX A0 */ +#define CHIP_REV_YU_EX_B0 2 /* Chip Rev. for Yukon-2 EX B0 */ + /* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */ #define Y2_STATUS_LNK2_INAC BIT_7 /* Status Link 2 inactiv (0 = activ) */ #define Y2_CLK_GAT_LNK2_DIS BIT_6 /* Disable clock gating Link 2 */ @@ -912,6 +969,18 @@ #define TST_CFG_WRITE_ON BIT_1 /* Enable Config Reg WR */ #define TST_CFG_WRITE_OFF BIT_0 /* Disable Config Reg WR */ +/* B2_GP_IO */ +#define GLB_GPIO_CLK_DEB_ENA BIT_31 /* Clock Debug Enable */ +#define GLB_GPIO_CLK_DBG_MSK 0x3c000000 /* Clock Debug */ + +#define GLB_GPIO_INT_RST_D3_DIS BIT_15 /* Disable Internal Reset After D3 to D0 */ +#define GLB_GPIO_LED_PAD_SPEED_UP BIT_14 /* LED PAD Speed Up */ +#define GLB_GPIO_STAT_RACE_DIS BIT_13 /* Status Race Disable */ +#define GLB_GPIO_TEST_SEL_MSK 0x00001800 /* Testmode Select */ +#define GLB_GPIO_TEST_SEL_BASE BIT_11 +#define GLB_GPIO_RAND_ENA BIT_10 /* Random Enable */ +#define GLB_GPIO_RAND_BIT_1 BIT_9 /* Random Bit 1 */ + /* B2_I2C_CTRL 32 bit I2C HW Control Register */ #define I2C_FLAG BIT_31 /* Start read/write if WR */ #define I2C_ADDR (0x7fff<<16) /* Bit 30..16: Addr to be RD/WR */ @@ -1033,13 +1102,16 @@ /* Bit 10..0: same as for Rx */ /* Q_F 32 bit Flag Register */ -#define F_ALM_FULL BIT_27 /* Rx FIFO: almost full */ -#define F_EMPTY BIT_27 /* Tx FIFO: empty flag */ -#define F_FIFO_EOF BIT_26 /* Tag (EOF Flag) bit in FIFO */ -#define F_WM_REACHED BIT_25 /* Watermark reached */ -#define F_M_RX_RAM_DIS BIT_24 /* MAC Rx RAM Read Port disable */ -#define F_FIFO_LEVEL (0x1f<<16) /* Bit 23..16: # of Qwords in FIFO */ -#define F_WATER_MARK 0x0007ff /* Bit 10.. 0: Watermark */ +#define F_TX_CHK_AUTO_OFF BIT_31 /* Tx checksum auto-calc Off(Yukon EX)*/ +#define F_TX_CHK_AUTO_ON BIT_30 /* Tx checksum auto-calc On(Yukon EX)*/ +#define F_ALM_FULL BIT_28 /* Rx FIFO: almost full */ +#define F_EMPTY BIT_27 /* Tx FIFO: empty flag */ +#define F_FIFO_EOF BIT_26 /* Tag (EOF Flag) bit in FIFO */ +#define F_WM_REACHED BIT_25 /* Watermark reached */ +#define F_M_RX_RAM_DIS BIT_24 /* MAC Rx RAM Read Port disable */ +#define F_FIFO_LEVEL (0x1f<<16) + /* Bit 23..16: # of Qwords in FIFO */ +#define F_WATER_MARK 0x0007ff/* Bit 10.. 0: Watermark */ /* Queue Prefetch Unit Offsets, use Y2_PREF_Q_ADDR() to address (Yukon-2 only)*/ /* PREF_UNIT_CTRL_REG 32 bit Prefetch Control register */ @@ -1927,6 +1999,28 @@ #define Y2_ASF_UC_STATE (3<<2) /* ASF uC State */ #define Y2_ASF_CLK_HALT 0 /* ASF system clock stopped */ +/* B28_Y2_ASF_HCU_CCSR 32bit CPU Control and Status Register (Yukon EX) */ +#define Y2_ASF_HCU_CCSR_SMBALERT_MONITOR BIT_27 /* SMBALERT pin monitor */ +#define Y2_ASF_HCU_CCSR_CPU_SLEEP BIT_26 /* CPU sleep status */ +#define Y2_ASF_HCU_CCSR_CS_TO BIT_25 /* Clock Stretching Timeout */ +#define Y2_ASF_HCU_CCSR_WDOG BIT_24 /* Watchdog Reset */ +#define Y2_ASF_HCU_CCSR_CLR_IRQ_HOST BIT_17 /* Clear IRQ_HOST */ +#define Y2_ASF_HCU_CCSR_SET_IRQ_HCU BIT_16 /* Set IRQ_HCU */ +#define Y2_ASF_HCU_CCSR_AHB_RST BIT_9 /* Reset AHB bridge */ +#define Y2_ASF_HCU_CCSR_CPU_RST_MODE BIT_8 /* CPU Reset Mode */ +#define Y2_ASF_HCU_CCSR_SET_SYNC_CPU BIT_5 +#define Y2_ASF_HCU_CCSR_CPU_CLK_DIVIDE1 BIT_4 +#define Y2_ASF_HCU_CCSR_CPU_CLK_DIVIDE0 BIT_3 +#define Y2_ASF_HCU_CCSR_CPU_CLK_DIVIDE_MSK (BIT_4 | BIT_3) /* CPU Clock Divide */ +#define Y2_ASF_HCU_CCSR_CPU_CLK_DIVIDE_BASE BIT_3 +#define Y2_ASF_HCU_CCSR_OS_PRSNT BIT_2 /* ASF OS Present */ + /* Microcontroller State */ +#define Y2_ASF_HCU_CCSR_UC_STATE_MSK 3 +#define Y2_ASF_HCU_CCSR_UC_STATE_BASE BIT_0 +#define Y2_ASF_HCU_CCSR_ASF_RESET 0 +#define Y2_ASF_HCU_CCSR_ASF_HALTED BIT_1 +#define Y2_ASF_HCU_CCSR_ASF_RUNNING BIT_0 + /* B28_Y2_ASF_HOST_COM 32 bit ASF Host Communication Reg */ /* This register is used by the ASF firmware */ #define Y2_ASF_CLR_ASFI BIT_1 /* Clear host IRQ */ @@ -1940,6 +2034,14 @@ #define SC_STAT_RST_SET BIT_0 /* Set Status Unit Reset */ /* GMAC_CTRL 32 bit GMAC Control Reg (YUKON only) */ +#define GMC_SEC_RST BIT_15 /* MAC SEC RST */ +#define GMC_SEC_RST_OFF BIT_14 /* MAC SEC RST Off */ +#define GMC_BYP_MACSECRX_ON BIT_13 /* Bypass MAC SEC RX */ +#define GMC_BYP_MACSECRX_OFF BIT_12 /* Bypass MAC SEC RX Off */ +#define GMC_BYP_MACSECTX_ON BIT_11 /* Bypass MAC SEC TX */ +#define GMC_BYP_MACSECTX_OFF BIT_10 /* Bypass MAC SEC TX Off */ +#define GMC_BYP_RETR_ON BIT_9 /* Bypass MAC retransmit FIFO On */ +#define GMC_BYP_RETR_OFF BIT_8 /* Bypass MAC retransmit FIFO Off */ #define GMC_H_BURST_ON BIT_7 /* Half Duplex Burst Mode On */ #define GMC_H_BURST_OFF BIT_6 /* Half Duplex Burst Mode Off */ #define GMC_F_LOOPB_ON BIT_5 /* FIFO Loopback On */ @@ -2400,8 +2502,9 @@ struct msk_if_softc { #define MSK_FLAG_JUMBO_NOCSUM 0x0010 #define MSK_FLAG_RAMBUF 0x0020 #define MSK_FLAG_DESCV2 0x0040 -#define MSK_FLAG_NOHWVLAN 0x0080 -#define MSK_FLAG_NORXCHK 0x0100 +#define MSK_FLAG_AUTOTX_CSUM 0x0080 +#define MSK_FLAG_NOHWVLAN 0x0100 +#define MSK_FLAG_NORXCHK 0x0200 #define MSK_FLAG_SUSPEND 0x2000 #define MSK_FLAG_DETACH 0x4000 #define MSK_FLAG_LINK 0x8000 From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:50:46 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53132106566C; Thu, 18 Jun 2009 05:50:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCB58FC21; Thu, 18 Jun 2009 05:50:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5ok0b099887; Thu, 18 Jun 2009 05:50:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5okIO099884; Thu, 18 Jun 2009 05:50:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180550.n5I5okIO099884@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194423 - in stable/7/sys: . contrib/pf dev/msk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:50:46 -0000 Author: yongari Date: Thu Jun 18 05:50:45 2009 New Revision: 194423 URL: http://svn.freebsd.org/changeset/base/194423 Log: MFC r193298-193299: r193298: Add Rx checksum offloading support for Yukon FE+ and Yukon Extreme. These controllers use newer descriptor format and the new descriptor format uses status LE to indicate the status of checksum. Rx checksummed value used in previous controllers were very cryptic and I failed to understand how to use them. In addition most controllers in previous generations had Rx checksum offloading bug. While I'm here introduce a MSK_FLAG_NORX_CSUM flag to bypass checking Rx checksum offloading as Yukon FE+ A0 has status LE bug. r193299: Add Yukon Extreme device ids, 88E8071 and 88E8072. While I'm here correct description of 88E8070. 88E8070 is Yukon Extreme and have gigabit PHY. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:46:33 2009 (r194422) +++ stable/7/sys/dev/msk/if_msk.c Thu Jun 18 05:50:45 2009 (r194423) @@ -203,8 +203,6 @@ static struct msk_product { "Marvell Yukon 88E8040T Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_8048, "Marvell Yukon 88E8048 Fast Ethernet" }, - { VENDORID_MARVELL, DEVICEID_MRVL_8070, - "Marvell Yukon 88E8070 Fast Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4361, "Marvell Yukon 88E8050 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4360, @@ -215,8 +213,14 @@ static struct msk_product { "Marvell Yukon 88E8055 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4364, "Marvell Yukon 88E8056 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4365, + "Marvell Yukon 88E8070 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_436A, "Marvell Yukon 88E8058 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_436B, + "Marvell Yukon 88E8071 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_436C, + "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560T, @@ -258,8 +262,8 @@ static void msk_intr_hwerr(struct msk_so #ifndef __NO_STRICT_ALIGNMENT static __inline void msk_fixup_rx(struct mbuf *); #endif -static void msk_rxeof(struct msk_if_softc *, uint32_t, int); -static void msk_jumbo_rxeof(struct msk_if_softc *, uint32_t, int); +static void msk_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int); +static void msk_jumbo_rxeof(struct msk_if_softc *, uint32_t, uint32_t, int); static void msk_txeof(struct msk_if_softc *, int); static int msk_encap(struct msk_if_softc *, struct mbuf **); static void msk_tx_task(void *, int); @@ -267,6 +271,7 @@ static void msk_start(struct ifnet *); static int msk_ioctl(struct ifnet *, u_long, caddr_t); static void msk_set_prefetch(struct msk_softc *, int, bus_addr_t, uint32_t); static void msk_set_rambuffer(struct msk_if_softc *); +static void msk_set_tx_stfwd(struct msk_if_softc *); static void msk_init(void *); static void msk_init_locked(struct msk_if_softc *); static void msk_stop(struct msk_if_softc *); @@ -991,12 +996,17 @@ msk_ioctl(struct ifnet *ifp, u_long comm else ifp->if_hwassist &= ~MSK_CSUM_FEATURES; } + if ((mask & IFCAP_RXCSUM) != 0 && + (IFCAP_RXCSUM & ifp->if_capabilities) != 0) + ifp->if_capenable ^= IFCAP_RXCSUM; if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; msk_setvlan(sc_if, ifp); } - + if ((mask & IFCAP_VLAN_HWCSUM) != 0 && + (IFCAP_VLAN_HWCSUM & ifp->if_capabilities) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; if ((mask & IFCAP_TSO4) != 0 && (IFCAP_TSO4 & ifp->if_capabilities) != 0) { ifp->if_capenable ^= IFCAP_TSO4; @@ -1492,6 +1502,13 @@ msk_attach(device_t dev) * make Rx checksum offload work on Yukon II hardware. */ ifp->if_capabilities = IFCAP_TXCSUM | IFCAP_TSO4; + /* + * Enable Rx checksum offloading if controller support new + * descriptor format. + */ + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0 && + (sc_if->msk_flags & MSK_FLAG_NORX_CSUM) == 0) + ifp->if_capabilities |= IFCAP_RXCSUM; ifp->if_hwassist = MSK_CSUM_FEATURES | CSUM_TSO; ifp->if_capenable = ifp->if_capabilities; ifp->if_ioctl = msk_ioctl; @@ -1535,6 +1552,13 @@ msk_attach(device_t dev) * for VLAN interface. */ ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; + /* + * Enable Rx checksum offloading for VLAN taggedd frames + * if controller support new descriptor format. + */ + if ((sc_if->msk_flags & MSK_FLAG_DESCV2) != 0 && + (sc_if->msk_flags & MSK_FLAG_NORX_CSUM) == 0) + ifp->if_capabilities |= IFCAP_VLAN_HWCSUM; } ifp->if_capenable = ifp->if_capabilities; @@ -1711,7 +1735,8 @@ mskc_attach(device_t dev) * Just pass received frames to upper stack with * minimal test and let upper stack handle them. */ - sc->msk_pflags |= MSK_FLAG_NOHWVLAN | MSK_FLAG_NORXCHK; + sc->msk_pflags |= MSK_FLAG_NOHWVLAN | + MSK_FLAG_NORXCHK | MSK_FLAG_NORX_CSUM; } break; case CHIP_ID_YUKON_XL: @@ -2942,7 +2967,8 @@ msk_fixup_rx(struct mbuf *m) #endif static void -msk_rxeof(struct msk_if_softc *sc_if, uint32_t status, int len) +msk_rxeof(struct msk_if_softc *sc_if, uint32_t status, uint32_t control, + int len) { struct mbuf *m; struct ifnet *ifp; @@ -2994,6 +3020,18 @@ msk_rxeof(struct msk_if_softc *sc_if, ui msk_fixup_rx(m); #endif ifp->if_ipackets++; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0 && + (control & (CSS_IPV4 | CSS_IPFRAG)) == CSS_IPV4) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; + if ((control & CSS_IPV4_CSUM_OK) != 0) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; + if ((control & (CSS_TCP | CSS_UDP)) != 0 && + (control & (CSS_TCPUDP_CSUM_OK)) != 0) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } /* Check for VLAN tagged packets. */ if ((status & GMR_FS_VLAN) != 0 && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) { @@ -3010,7 +3048,8 @@ msk_rxeof(struct msk_if_softc *sc_if, ui } static void -msk_jumbo_rxeof(struct msk_if_softc *sc_if, uint32_t status, int len) +msk_jumbo_rxeof(struct msk_if_softc *sc_if, uint32_t status, uint32_t control, + int len) { struct mbuf *m; struct ifnet *ifp; @@ -3051,6 +3090,18 @@ msk_jumbo_rxeof(struct msk_if_softc *sc_ msk_fixup_rx(m); #endif ifp->if_ipackets++; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0 && + (control & (CSS_IPV4 | CSS_IPFRAG)) == CSS_IPV4) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED; + if ((control & CSS_IPV4_CSUM_OK) != 0) + m->m_pkthdr.csum_flags |= CSUM_IP_VALID; + if ((control & (CSS_TCP | CSS_UDP)) != 0 && + (control & (CSS_TCPUDP_CSUM_OK)) != 0) { + m->m_pkthdr.csum_flags |= CSUM_DATA_VALID | + CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } /* Check for VLAN tagged packets. */ if ((status & GMR_FS_VLAN) != 0 && (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) { @@ -3379,9 +3430,9 @@ msk_handle_events(struct msk_softc *sc) case OP_RXSTAT: if (sc_if->msk_framesize > (MCLBYTES - MSK_RX_BUF_ALIGN)) - msk_jumbo_rxeof(sc_if, status, len); + msk_jumbo_rxeof(sc_if, status, control, len); else - msk_rxeof(sc_if, status, len); + msk_rxeof(sc_if, status, control, len); rxprog++; /* * Because there is no way to sync single Rx LE Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:46:33 2009 (r194422) +++ stable/7/sys/dev/msk/if_mskreg.h Thu Jun 18 05:50:45 2009 (r194423) @@ -139,8 +139,10 @@ #define DEVICEID_MRVL_4362 0x4362 #define DEVICEID_MRVL_4363 0x4363 #define DEVICEID_MRVL_4364 0x4364 -#define DEVICEID_MRVL_8070 0x4365 +#define DEVICEID_MRVL_4365 0x4365 #define DEVICEID_MRVL_436A 0x436A +#define DEVICEID_MRVL_436B 0x436B +#define DEVICEID_MRVL_436C 0x436C /* * D-Link gigabit ethernet device ID @@ -2255,8 +2257,19 @@ struct msk_stat_desc { #define OP_PUTIDX 0x70000000 #define STLE_OP_MASK 0xff000000 +#define STLE_CSS_MASK 0x00ff0000 #define STLE_LEN_MASK 0x0000ffff +/* CSS defined in status LE(valid for descriptor V2 format). */ +#define CSS_TCPUDP_CSUM_OK 0x00800000 +#define CSS_UDP 0x00400000 +#define CSS_TCP 0x00200000 +#define CSS_IPFRAG 0x00100000 +#define CSS_IPV6 0x00080000 +#define CSS_IPV4_CSUM_OK 0x00040000 +#define CSS_IPV4 0x00020000 +#define CSS_PORT 0x00010000 + /* Descriptor Bit Definition */ /* TxCtrl Transmit Buffer Control Field */ /* RxCtrl Receive Buffer Control Field */ @@ -2505,6 +2518,7 @@ struct msk_if_softc { #define MSK_FLAG_AUTOTX_CSUM 0x0080 #define MSK_FLAG_NOHWVLAN 0x0100 #define MSK_FLAG_NORXCHK 0x0200 +#define MSK_FLAG_NORX_CSUM 0x0400 #define MSK_FLAG_SUSPEND 0x2000 #define MSK_FLAG_DETACH 0x4000 #define MSK_FLAG_LINK 0x8000 From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 05:56:12 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02F4106566B; Thu, 18 Jun 2009 05:56:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DF918FC17; Thu, 18 Jun 2009 05:56:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I5uCFQ000170; Thu, 18 Jun 2009 05:56:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I5uC1b000168; Thu, 18 Jun 2009 05:56:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180556.n5I5uC1b000168@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 05:56:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194424 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 05:56:13 -0000 Author: yongari Date: Thu Jun 18 05:56:12 2009 New Revision: 194424 URL: http://svn.freebsd.org/changeset/base/194424 Log: MFC r192741,192743,193300 r192741: msk(4) now supports Yukon FE+. Specifically 88E8040, 88E8040T, 88E8048 and 88E8070 are supported. r192743: Correct controller description for 88E8035, 88E8036, 88E8038 and 88E8039. These are fast ethernet controllers. r193300: Add 88E8071, 88E8072 to the supported hardware list. While I'm here correct description of 88E8070. It's Yukon Extreme and have gigabit PHY. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/msk.4 Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Thu Jun 18 05:50:45 2009 (r194423) +++ stable/7/share/man/man4/msk.4 Thu Jun 18 05:56:12 2009 (r194424) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 5, 2007 +.Dd June 2, 2009 .Dt MSK 4 .Os .Sh NAME @@ -176,13 +176,19 @@ Marvell Yukon 88E8062CU Gigabit Ethernet .It Marvell Yukon 88E8062 SX/LX Gigabit Ethernet .It -Marvell Yukon 88E8035 Gigabit Ethernet +Marvell Yukon 88E8035 Fast Ethernet .It -Marvell Yukon 88E8036 Gigabit Ethernet +Marvell Yukon 88E8036 Fast Ethernet .It -Marvell Yukon 88E8038 Gigabit Ethernet +Marvell Yukon 88E8038 Fast Ethernet .It -Marvell Yukon 88E8039 Gigabit Ethernet +Marvell Yukon 88E8039 Fast Ethernet +.It +Marvell Yukon 88E8040 Fast Ethernet +.It +Marvell Yukon 88E8040T Fast Ethernet +.It +Marvell Yukon 88E8048 Fast Ethernet .It Marvell Yukon 88E8050 Gigabit Ethernet .It @@ -196,6 +202,12 @@ Marvell Yukon 88E8056 Gigabit Ethernet .It Marvell Yukon 88E8058 Gigabit Ethernet .It +Marvell Yukon 88E8070 Gigabit Ethernet +.It +Marvell Yukon 88E8071 Gigabit Ethernet +.It +Marvell Yukon 88E8072 Gigabit Ethernet +.It SysKonnect SK-9Sxx Gigabit Ethernet .It SysKonnect SK-9Exx Gigabit Ethernet From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 06:03:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C34C1065670; Thu, 18 Jun 2009 06:03:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 120088FC13; Thu, 18 Jun 2009 06:03:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I63w5x000428; Thu, 18 Jun 2009 06:03:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I63wfg000421; Thu, 18 Jun 2009 06:03:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180603.n5I63wfg000421@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 06:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194426 - in stable/7/sys: . amd64/conf boot/forth conf contrib/pf dev/alc i386/conf modules modules/alc X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 06:04:00 -0000 Author: yongari Date: Thu Jun 18 06:03:58 2009 New Revision: 194426 URL: http://svn.freebsd.org/changeset/base/194426 Log: MFC 193880,193887: r193880: Add alc(4), a driver for Atheros AR8131/AR8132 PCIe ethernet controller. These controllers are also known as L1C(AR8131) and L2C(AR8132) respectively. These controllers resembles the first generation controller L1 but usage of different descriptor format and new register mappings over L1 register space requires a new driver. There are a couple of registers I still don't understand but the driver seems to have no critical issues for performance and stability. Currently alc(4) supports the following hardware features. o MSI o TCP Segmentation offload o Hardware VLAN tag insertion/stripping o Tx/Rx interrupt moderation o Hardware statistics counters(dev.alc.%d.stats) o Jumbo frame o WOL AR8131/AR8132 also supports Tx checksum offloading but I disabled it due to stability issues. I'm not sure this comes from broken sample boards or hardware bugs. If you know your controller works without problems you can still enable it. The controller has a silicon bug for Rx checksum offloading, so the feature was not implemented. I'd like to say big thanks to Atheros. Atheros kindly sent sample boards to me and answered several questions I had. HW donated by: Atheros Communications, Inc. r193887: fix directory name. Added: stable/7/sys/dev/alc/ - copied from r193880, head/sys/dev/alc/ stable/7/sys/modules/alc/ - copied from r193880, head/sys/modules/alc/ Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/conf/GENERIC stable/7/sys/boot/forth/loader.conf stable/7/sys/conf/NOTES stable/7/sys/conf/files stable/7/sys/contrib/pf/ (props changed) stable/7/sys/i386/conf/GENERIC stable/7/sys/modules/Makefile Modified: stable/7/sys/amd64/conf/GENERIC ============================================================================== --- stable/7/sys/amd64/conf/GENERIC Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/amd64/conf/GENERIC Thu Jun 18 06:03:58 2009 (r194426) @@ -193,6 +193,7 @@ device vx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet Modified: stable/7/sys/boot/forth/loader.conf ============================================================================== --- stable/7/sys/boot/forth/loader.conf Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/boot/forth/loader.conf Thu Jun 18 06:03:58 2009 (r194426) @@ -208,6 +208,7 @@ pf_load="NO" # packet filter miibus_load="NO" # miibus support, needed for some drivers if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet +if_alc_load="NO" # Atheros AR8131/AR8132 Ethernet if_ale_load="NO" # Atheros AR8121/AR8113/AR8114 Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/conf/NOTES Thu Jun 18 06:03:58 2009 (r194426) @@ -1724,6 +1724,7 @@ device miibus # Harris (Intersil) Chipset with PCnetMobile firmware by AMD. # age: Support for gigabit ethernet adapters based on the Attansic/Atheros # L1 PCI express gigabit ethernet controllers. +# alc: Support for Atheros AR8131/AR8132 PCIe ethernet controllers. # ale: Support for Atheros AR8121/AR8113/AR8114 PCIe ethernet controllers. # bce: Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet # adapters. @@ -1869,6 +1870,7 @@ device xe # PCI Ethernet NICs that use the common MII bus controller code. device ae # Attansic/Atheros L2 FastEthernet device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/conf/files Thu Jun 18 06:03:58 2009 (r194426) @@ -446,6 +446,7 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci +dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/amd/amd.c optional amd dev/amr/amr.c optional amr Modified: stable/7/sys/i386/conf/GENERIC ============================================================================== --- stable/7/sys/i386/conf/GENERIC Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/i386/conf/GENERIC Thu Jun 18 06:03:58 2009 (r194426) @@ -204,6 +204,7 @@ device vx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device age # Attansic/Atheros L1 Gigabit Ethernet +device alc # Atheros AR8131/AR8132 Ethernet device ale # Atheros AR8121/AR8113/AR8114 Ethernet device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Thu Jun 18 05:56:24 2009 (r194425) +++ stable/7/sys/modules/Makefile Thu Jun 18 06:03:58 2009 (r194426) @@ -18,6 +18,7 @@ SUBDIR= ${_3dfx} \ aio \ ${_amd} \ ${_amdtemp} \ + alc \ ale \ amr \ ${_an} \ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 06:07:58 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B90106566B; Thu, 18 Jun 2009 06:07:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5C198FC20; Thu, 18 Jun 2009 06:07:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I67wrU000554; Thu, 18 Jun 2009 06:07:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I67w2Z000552; Thu, 18 Jun 2009 06:07:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180607.n5I67w2Z000552@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 06:07:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194427 - stable/7/usr.sbin/sysinstall X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 06:07:59 -0000 Author: yongari Date: Thu Jun 18 06:07:58 2009 New Revision: 194427 URL: http://svn.freebsd.org/changeset/base/194427 Log: MFC 193881,193883: r193881: Add alc(4) to the list of supported network interface. r193883: Fix typo. Modified: stable/7/usr.sbin/sysinstall/ (props changed) stable/7/usr.sbin/sysinstall/devices.c Modified: stable/7/usr.sbin/sysinstall/devices.c ============================================================================== --- stable/7/usr.sbin/sysinstall/devices.c Thu Jun 18 06:03:58 2009 (r194426) +++ stable/7/usr.sbin/sysinstall/devices.c Thu Jun 18 06:07:58 2009 (r194427) @@ -95,6 +95,7 @@ static struct _devname { SERIAL("cuad%d", "%s on device %s (COM%d)", 16), NETWORK("ae", "Attansic/Atheros L2 Fast Ethernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), + NETWORK("alc", "Atheros AR8131/AR8132 PCIe Ethernet"), NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), NETWORK("ath", "Atheros IEEE 802.11 wireless adapter"), From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 06:09:47 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 990D41065670; Thu, 18 Jun 2009 06:09:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85B1C8FC12; Thu, 18 Jun 2009 06:09:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5I69lCQ000640; Thu, 18 Jun 2009 06:09:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5I69lDs000634; Thu, 18 Jun 2009 06:09:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200906180609.n5I69lDs000634@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 18 Jun 2009 06:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194428 - stable/7/share/man/man4 X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 06:09:48 -0000 Author: yongari Date: Thu Jun 18 06:09:47 2009 New Revision: 194428 URL: http://svn.freebsd.org/changeset/base/194428 Log: MFC r193882 Add alc(4) man page and hook up alc(4) to the build. Added: stable/7/share/man/man4/alc.4 - copied unchanged from r193882, head/share/man/man4/alc.4 Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/Makefile stable/7/share/man/man4/altq.4 stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/miibus.4 stable/7/share/man/man4/vlan.4 Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Thu Jun 18 06:07:58 2009 (r194427) +++ stable/7/share/man/man4/Makefile Thu Jun 18 06:09:47 2009 (r194428) @@ -16,6 +16,7 @@ MAN= aac.4 \ ahc.4 \ ahd.4 \ aio.4 \ + alc.4 \ ale.4 \ altq.4 \ amd.4 \ Copied: stable/7/share/man/man4/alc.4 (from r193882, head/share/man/man4/alc.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/alc.4 Thu Jun 18 06:09:47 2009 (r194428, copy of r193882, head/share/man/man4/alc.4) @@ -0,0 +1,160 @@ +.\" Copyright (c) 2009 Pyun YongHyeon +.\" 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 AND CONTRIBUTORS ``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 OR CONTRIBUTORS 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. +.\" +.\" $FreeBSD$ +.\" +.Dd June 10, 2009 +.Dt ALC 4 +.Os +.Sh NAME +.Nm alc +.Nd Atheros AR8131/AR8132 Gigabit/Fast Ethernet driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device miibus" +.Cd "device alc" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_alc_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +device driver provides support for Atheros AR8131 PCI Express +Gigabit Ethernet controllers and Atheros AR8132 PCI Express +Fast Ethernet controllers. +.Pp +All LOMs supported by the +.Nm +driver have TCP/UDP/IP checksum offload for transmit, TCP +segmentation offload (TSO), hardware VLAN tag stripping/insertion +features, Wake On Lan (WOL) and an interrupt moderation mechanism +as well as a 64-bit multicast hash filter. +.Pp +The AR8131/AR8132 supports Jumbo Frames (up to 9216 bytes), which can +be configured via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable autoselection of the media type and options. +The user can manually override +the autoselected mode by adding media options to +.Xr rc.conf 5 . +.It Cm 10baseT/UTP +Set 10Mbps operation. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +.It Cm 1000baseTX +Set 1000baseTX operation over twisted pair. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width ".Cm full-duplex" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +device driver provides support for the following Ethernet controllers: +.Pp +.Bl -bullet -compact +.It +Atheros AR8131 PCI Express Gigabit Ethernet controller +.It +Atheros AR8132 PCI Express Fast Ethernet controller +.El +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width "xxxxxx" +.It Va hw.alc.msi_disable +This tunable disables MSI support on the Ethernet hardware. +The default value is 0. +.It Va hw.alc.msix_disable +This tunable disables MSI-X support on the Ethernet hardware. +The default value is 0. +.El +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width "xxxxxx" +.It Va dev.alc.%d.int_rx_mod +Maximum amount of time to delay receive interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 100(100us). +Value 0 completely disables the interrupt moderation. +.It Va dev.alc.%d.int_tx_mod +Maximum amount of time to delay transmit interrupt processing in +units of 1us. +The accepted range is 0 to 130000, the default is 50000(50ms). +Value 0 completely disables the interrupt moderation. +.It Va dev.alc.%d.process_limit +Maximum amount of Rx frames to be processed in the event loop before +rescheduling a taskqueue. +The accepted range is 32 to 255, the default value is 64 events. +The interface does not need to be brought down and up again before +a change takes effect. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +driver was written by +.An Pyun YongHyeon +.Aq yongari@FreeBSD.org . +It first appeared in +.Fx 8.0 . Modified: stable/7/share/man/man4/altq.4 ============================================================================== --- stable/7/share/man/man4/altq.4 Thu Jun 18 06:07:58 2009 (r194427) +++ stable/7/share/man/man4/altq.4 Thu Jun 18 06:09:47 2009 (r194428) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 21, 2009 +.Dd June 10, 2009 .Dt ALTQ 4 .Os .Sh NAME @@ -116,6 +116,7 @@ are required to use a certain network ca .Nm . They have been applied to the following hardware drivers: .Xr age 4 , +.Xr alc 4 , .Xr ale 4 , .Xr an 4 , .Xr ath 4 , Modified: stable/7/share/man/man4/miibus.4 ============================================================================== --- stable/7/share/man/man4/miibus.4 Thu Jun 18 06:07:58 2009 (r194427) +++ stable/7/share/man/man4/miibus.4 Thu Jun 18 06:09:47 2009 (r194428) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2008 +.Dd June 10, 2009 .Dt MIIBUS 4 .Os .Sh NAME @@ -47,6 +47,8 @@ interface: .Bl -tag -compact -width ".Xr fxp 4" .It Xr age 4 Attansic/Atheros L1 Gigabit Ethernet +.It Xr alc 4 +Atheros AR8131/AR8132 PCIe Ethernet .It Xr ale 4 Atheros AR8121/AR8113/AR8114 PCIe Ethernet .It Xr aue 4 @@ -127,6 +129,7 @@ and but as a result are not well behaved newbus device drivers. .Sh SEE ALSO .Xr age 4 , +.Xr alc 4 , .Xr ale 4 , .Xr arp 4 , .Xr aue 4 , Modified: stable/7/share/man/man4/vlan.4 ============================================================================== --- stable/7/share/man/man4/vlan.4 Thu Jun 18 06:07:58 2009 (r194427) +++ stable/7/share/man/man4/vlan.4 Thu Jun 18 06:09:47 2009 (r194428) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 12, 2008 +.Dd June 10, 2009 .Dt VLAN 4 .Os .Sh NAME @@ -123,6 +123,7 @@ By now, the list of physical interfaces in the hardware is limited to the following devices: .Xr ae 4 , .Xr age 4 , +.Xr alc 4 , .Xr ale 4 , .Xr bce 4 , .Xr bge 4 , From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 07:28:47 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A5E7106566C; Thu, 18 Jun 2009 07:28:47 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id EAE6D8FC13; Thu, 18 Jun 2009 07:28:46 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 32F596D41D; Thu, 18 Jun 2009 09:28:46 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 0E0D4846B2; Thu, 18 Jun 2009 09:28:46 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dmitry Morozovsky References: <200906171731.n5HHVktG082752@svn.freebsd.org> Date: Thu, 18 Jun 2009 09:28:45 +0200 In-Reply-To: (Dmitry Morozovsky's message of "Thu, 18 Jun 2009 00:04:50 +0400 (MSD)") Message-ID: <86my86dmqa.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, John Baldwin Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 07:28:47 -0000 Dmitry Morozovsky writes: > Great. There's only=20 > > stable/7/sys/contrib/pf/ (props changed) > > on every MFC to stable/7 left yet ;-P That one's not quite so simple, because the mergeinfo there is from merging pf from the vendor tree into head, whence it gets copied to stable/7. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 10:16:15 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C172106566B; Thu, 18 Jun 2009 10:16:15 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8098B8FC29; Thu, 18 Jun 2009 10:16:14 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5IAGB61061471; Thu, 18 Jun 2009 14:16:11 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Thu, 18 Jun 2009 14:16:11 +0400 (MSD) From: Dmitry Morozovsky To: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <86my86dmqa.fsf@ds4.des.no> Message-ID: References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86my86dmqa.fsf@ds4.des.no> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Thu, 18 Jun 2009 14:16:11 +0400 (MSD) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, John Baldwin Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 10:16:15 -0000 On Thu, 18 Jun 2009, Dag-Erling Sm?rgrav wrote: DS> Dmitry Morozovsky writes: DS> > Great. There's only DS> > DS> > stable/7/sys/contrib/pf/ (props changed) DS> > DS> > on every MFC to stable/7 left yet ;-P DS> DS> That one's not quite so simple, because the mergeinfo there is from DS> merging pf from the vendor tree into head, whence it gets copied to DS> stable/7. Ah I see. Well, maybe then we can skip (at least from the subject) directories with props-only changes? For now, looking for commit destination is not simple... -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 18:00:44 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 964FB1065679; Thu, 18 Jun 2009 18:00:44 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 51B268FC0A; Thu, 18 Jun 2009 18:00:44 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 9415A6D41C; Thu, 18 Jun 2009 20:00:43 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 7A31D84573; Thu, 18 Jun 2009 20:00:43 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Dmitry Morozovsky References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86my86dmqa.fsf@ds4.des.no> Date: Thu, 18 Jun 2009 20:00:43 +0200 In-Reply-To: (Dmitry Morozovsky's message of "Thu, 18 Jun 2009 14:16:11 +0400 (MSD)") Message-ID: <86iqit5sms.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, John Baldwin Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 18:00:45 -0000 Dmitry Morozovsky writes: > Ah I see. Well, maybe then we can skip (at least from the subject) > directories with props-only changes? On the contrary. If prop changes were included in commit email, we would be able to catch mistakes much sooner. > For now, looking for commit destination is not simple... http://wiki.freebsd.org/SubversionPrimer/Merging DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 18:55:37 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74B461065670; Thu, 18 Jun 2009 18:55:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 454178FC19; Thu, 18 Jun 2009 18:55:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EE85746B32; Thu, 18 Jun 2009 14:55:36 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id DDBD18A076; Thu, 18 Jun 2009 14:55:35 -0400 (EDT) From: John Baldwin To: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= Date: Thu, 18 Jun 2009 14:55:26 -0400 User-Agent: KMail/1.9.7 References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86iqit5sms.fsf@ds4.des.no> In-Reply-To: <86iqit5sms.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200906181455.26797.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 18 Jun 2009 14:55:35 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Dmitry Morozovsky Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 18:55:38 -0000 On Thursday 18 June 2009 2:00:43 pm Dag-Erling Sm=C3=B8rgrav wrote: > Dmitry Morozovsky writes: > > For now, looking for commit destination is not simple... >=20 > http://wiki.freebsd.org/SubversionPrimer/Merging I think Dmitry means more that all the prop changes stuff clutters the actu= al=20 commit messages. I would like to see them removed from the subject line at= =20 least so that the subject line clearly shows where real changes are being=20 made. =2D-=20 John Baldwin From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 19:54:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08D4C106564A; Thu, 18 Jun 2009 19:54:30 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 7BD888FC12; Thu, 18 Jun 2009 19:54:29 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5IJsR1X089789; Thu, 18 Jun 2009 23:54:27 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Thu, 18 Jun 2009 23:54:27 +0400 (MSD) From: Dmitry Morozovsky To: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <86iqit5sms.fsf@ds4.des.no> Message-ID: References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86my86dmqa.fsf@ds4.des.no> <86iqit5sms.fsf@ds4.des.no> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Thu, 18 Jun 2009 23:54:27 +0400 (MSD) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, John Baldwin Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 19:54:31 -0000 On Thu, 18 Jun 2009, Dag-Erling Sm?rgrav wrote: DS> > Ah I see. Well, maybe then we can skip (at least from the subject) DS> > directories with props-only changes? DS> DS> On the contrary. If prop changes were included in commit email, we DS> would be able to catch mistakes much sooner. Actually, I did not argued for eliminating lines with props changes from the mail body -- only from subject. I tried to look through mailer.py, but got a bit frightened (my python skills are very limited) DS> > For now, looking for commit destination is not simple... DS> DS> http://wiki.freebsd.org/SubversionPrimer/Merging Yes, I'm aware of this recipe; I meant it's not simple for average svn-mailing-list-reader (especially when you look at the list of subjects) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 19:55:59 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 708D61065672; Thu, 18 Jun 2009 19:55:59 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id E45E58FC0A; Thu, 18 Jun 2009 19:55:58 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5IJtvPa089850; Thu, 18 Jun 2009 23:55:57 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Thu, 18 Jun 2009 23:55:57 +0400 (MSD) From: Dmitry Morozovsky To: John Baldwin In-Reply-To: <200906181455.26797.jhb@freebsd.org> Message-ID: References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86iqit5sms.fsf@ds4.des.no> <200906181455.26797.jhb@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Thu, 18 Jun 2009 23:55:57 +0400 (MSD) Cc: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 19:56:00 -0000 On Thu, 18 Jun 2009, John Baldwin wrote: JB> > > For now, looking for commit destination is not simple... JB> > JB> > http://wiki.freebsd.org/SubversionPrimer/Merging JB> JB> I think Dmitry means more that all the prop changes stuff clutters the actual JB> commit messages. I would like to see them removed from the subject line at JB> least so that the subject line clearly shows where real changes are being JB> made. Exactly. Thank you John :) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 21:02:44 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F24C6106564A; Thu, 18 Jun 2009 21:02:43 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id ACFBA8FC12; Thu, 18 Jun 2009 21:02:43 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id EB7B86D418; Thu, 18 Jun 2009 23:02:42 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id C9C4784573; Thu, 18 Jun 2009 23:02:42 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86iqit5sms.fsf@ds4.des.no> <200906181455.26797.jhb@freebsd.org> Date: Thu, 18 Jun 2009 23:02:42 +0200 In-Reply-To: <200906181455.26797.jhb@freebsd.org> (John Baldwin's message of "Thu, 18 Jun 2009 14:55:26 -0400") Message-ID: <86eith5k7h.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, Dmitry Morozovsky Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 21:02:44 -0000 John Baldwin writes: > I think Dmitry means more that all the prop changes stuff clutters the ac= tual=20 > commit messages. I would like to see them removed from the subject line = at=20 > least so that the subject line clearly shows where real changes are being= =20 > made. That's reasonable - but I would still very much like to see prop changes in the commit email. It's not just svn:mergeinfo, there have also been cases of incorrect svn:keywords, and even someone who set svn:mime-type to application/octet-stream on a couple of files because they couldn't figure out the correct svn:keywords syntax. BTW, if you do as Dmitry suggests, how will you handle props-only commits like r192599, r192646 or r192653? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 21:08:31 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C90A8106564A; Thu, 18 Jun 2009 21:08:31 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 48AE58FC1F; Thu, 18 Jun 2009 21:08:30 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n5IL8Twp091304; Fri, 19 Jun 2009 01:08:29 +0400 (MSD) (envelope-from marck@rinet.ru) Date: Fri, 19 Jun 2009 01:08:29 +0400 (MSD) From: Dmitry Morozovsky To: =?ISO-8859-15?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <86eith5k7h.fsf@ds4.des.no> Message-ID: References: <200906171731.n5HHVktG082752@svn.freebsd.org> <86iqit5sms.fsf@ds4.des.no> <200906181455.26797.jhb@freebsd.org> <86eith5k7h.fsf@ds4.des.no> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (woozle.rinet.ru [0.0.0.0]); Fri, 19 Jun 2009 01:08:29 +0400 (MSD) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org, John Baldwin Subject: Re: svn commit: r194377 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 21:08:32 -0000 On Thu, 18 Jun 2009, Dag-Erling Sm?rgrav wrote: DS> > I think Dmitry means more that all the prop changes stuff clutters the actual DS> > commit messages. I would like to see them removed from the subject line at DS> > least so that the subject line clearly shows where real changes are being DS> > made. DS> DS> That's reasonable - but I would still very much like to see prop changes DS> in the commit email. It's not just svn:mergeinfo, there have also been DS> cases of incorrect svn:keywords, and even someone who set svn:mime-type DS> to application/octet-stream on a couple of files because they couldn't DS> figure out the correct svn:keywords syntax. DS> DS> BTW, if you do as Dmitry suggests, how will you handle props-only DS> commits like r192599, r192646 or r192653? As for last question: there are _only_ props changes lines in the changes list. This can be treated as a stop-case for changing subject at all (also, these cases are rather rare comparing to normal development/merging) -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable-7@FreeBSD.ORG Thu Jun 18 21:17:04 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E762E1065670; Thu, 18 Jun 2009 21:17:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8E88FC08; Thu, 18 Jun 2009 21:17:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5ILH4ct022990; Thu, 18 Jun 2009 21:17:04 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5ILH4oD022986; Thu, 18 Jun 2009 21:17:04 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906182117.n5ILH4oD022986@svn.freebsd.org> From: John Baldwin Date: Thu, 18 Jun 2009 21:17:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194462 - stable/7/sys/netinet X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 21:17:05 -0000 Author: jhb Date: Thu Jun 18 21:17:04 2009 New Revision: 194462 URL: http://svn.freebsd.org/changeset/base/194462 Log: MFC: Fix overflow edge cases with comparing ticks to t_rcvtime including fixing the TCP keepalive timer to work properly when ticks overflows from INT_MAX to INT_MIN. Note that to preserve the ABI this change just downcasts t_rcvtime to an int when it is subtracted from ticks rather than changing the type of t_rcvtime. Modified: stable/7/sys/netinet/tcp_output.c stable/7/sys/netinet/tcp_timer.c Modified: stable/7/sys/netinet/tcp_output.c ============================================================================== --- stable/7/sys/netinet/tcp_output.c Thu Jun 18 21:15:41 2009 (r194461) +++ stable/7/sys/netinet/tcp_output.c Thu Jun 18 21:17:04 2009 (r194462) @@ -161,7 +161,7 @@ tcp_output(struct tcpcb *tp) * to send, then transmit; otherwise, investigate further. */ idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una); - if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) { + if (idle && (ticks - (int)tp->t_rcvtime) >= tp->t_rxtcur) { /* * We have been idle for "a while" and no acks are * expected to clock out any data we send -- Modified: stable/7/sys/netinet/tcp_timer.c ============================================================================== --- stable/7/sys/netinet/tcp_timer.c Thu Jun 18 21:15:41 2009 (r194461) +++ stable/7/sys/netinet/tcp_timer.c Thu Jun 18 21:17:04 2009 (r194462) @@ -234,7 +234,7 @@ tcp_timer_2msl(void *xtp) tp = tcp_close(tp); } else { if (tp->t_state != TCPS_TIME_WAIT && - (ticks - tp->t_rcvtime) <= tcp_maxidle) + (ticks - (int)tp->t_rcvtime) <= tcp_maxidle) callout_reset(&tp->t_timers->tt_2msl, tcp_keepintvl, tcp_timer_2msl, tp); else @@ -293,7 +293,7 @@ tcp_timer_keep(void *xtp) goto dropit; if ((always_keepalive || inp->inp_socket->so_options & SO_KEEPALIVE) && tp->t_state <= TCPS_CLOSING) { - if ((ticks - tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle) + if ((ticks - (int)tp->t_rcvtime) >= tcp_keepidle + tcp_maxidle) goto dropit; /* * Send a packet designed to force a response @@ -387,8 +387,8 @@ tcp_timer_persist(void *xtp) * backoff that we would use if retransmitting. */ if (tp->t_rxtshift == TCP_MAXRXTSHIFT && - ((ticks - tp->t_rcvtime) >= tcp_maxpersistidle || - (ticks - tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) { + ((ticks - (int)tp->t_rcvtime) >= tcp_maxpersistidle || + (ticks - (int)tp->t_rcvtime) >= TCP_REXMTVAL(tp) * tcp_totbackoff)) { tcpstat.tcps_persistdrop++; tp = tcp_drop(tp, ETIMEDOUT); goto out; From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 19 07:34:30 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0F6B106574B; Fri, 19 Jun 2009 07:34:30 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCA538FC1E; Fri, 19 Jun 2009 07:34:30 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5J7YUIr034640; Fri, 19 Jun 2009 07:34:30 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5J7YUaW034638; Fri, 19 Jun 2009 07:34:30 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906190734.n5J7YUaW034638@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 07:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194475 - stable/7/share/syscons/keymaps X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 07:34:31 -0000 Author: edwin Date: Fri Jun 19 07:34:30 2009 New Revision: 194475 URL: http://svn.freebsd.org/changeset/base/194475 Log: MFC of 194055 French translations for keyboards keymaps descriptions French translations for keyboards keymaps descriptions with some corrections on existing translations in the /usr/share/syscons/keymaps/INDEX.keymaps PR: conf/71767 Submitted by: Henri Michelon Modified: stable/7/share/syscons/keymaps/ (props changed) stable/7/share/syscons/keymaps/INDEX.keymaps Modified: stable/7/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/7/share/syscons/keymaps/INDEX.keymaps Fri Jun 19 07:18:45 2009 (r194474) +++ stable/7/share/syscons/keymaps/INDEX.keymaps Fri Jun 19 07:34:30 2009 (r194475) @@ -43,10 +43,12 @@ FONT:hy:haik8-8x16.fnt # be.iso.kbd:en:Belgian ISO-8859-1 be.iso.kbd:de:Belgisch ISO-8859-1 +be.iso.kbd:fr:Belge ISO-8859-1 be.iso.kbd:pt,es:Belga ISO-8859-1 be.iso.acc.kbd:en:Belgian ISO-8859-1 (accent keys) be.iso.acc.kbd:de:Belgisch ISO-8859-1 (mit Akzenten) +be.iso.acc.kbd:fr:Belge ISO-8859-1 (avec accents) be.iso.acc.kbd:pt:Belga ISO-8859-1 (com acentos) be.iso.acc.kbd:es:Belga ISO-8859-1 (con acentos) @@ -55,34 +57,43 @@ bg.phonetic.ctrlcaps.kbd:bg:Bulgarian Ph br275.iso.kbd:en:Brazilian 275 ISO-8859-1 br275.iso.kbd:de:Brasilianisch 275 ISO-8859-1 +br275.iso.kbd:fr:Brésilien 275 ISO-8859-1 br275.iso.kbd:pt:Brasileiro 275 ISO-8859-1 br275.iso.kbd:es:Brasileño 275 ISO-8859-1 br275.iso.acc.kbd:en:Brazilian 275 ISO-8859-1 (accent keys) br275.iso.acc.kbd:de:Brasilianisch 275 ISO-8859-1 (mit Akzenten) +br275.iso.acc.kbd:fr:Brésilien 275 ISO-8859-1 (avec accents) br275.iso.acc.kbd:pt:Brasileiro 275 ISO-8859-1 (com acentos) br275.iso.acc.kbd:es:Brasileño 275 ISO-8859-1 (con acentos) br275.cp850.kbd:en:Brazilian 275 Codepage 850 br275.cp850.kbd:de:Brasilianisch 275 Codeseite 850 +br275.cp850.kbd:fr:Brésilien 275 Code page 850 br275.cp850.kbd:pt:Brasileiro 275 Codepage 850 br275.cp850.kbd:es:Brasileño 275 Codepage 850 by.cp1131.kbd:en:Belarusian Codepage 1131 +by.cp1131.kbd:fr:Biélorusse Code page 1131 by.cp1251.kbd:en:Belarusian Codepage 1251 +by.cp1251.kbd:fr:Biélorusse Code page 1251 by.iso5.kbd:en:Belarusian ISO-8859-5 +by.iso5.kbd:fr:Biélorusse ISO-8859-5 ce.iso2.kbd:en:Central European ISO-8859-2 ce.iso2.kbd:de:Zentral Europäisch ISO-8859-2 +ce.iso2.kbd:fr:Centre européen ISO-8859-2 ce.iso2.kbd:es:Centroeuropeo ISO-8859-2 colemak.iso15.acc.kbd:en:Colemak ergonomic alternative cs.latin2.qwertz.kbd:en:Czech ISO-8859-2 (QWERTZ, accent keys) +cs.latin2.qwertz.kbd:fr:Tchèque ISO-8859-2 (QWERTZ, avec accents) cs.latin2.qwertz.kbd:es:Checo ISO-8859-2 (QWERTZ, con acentos) cz.iso2.kbd:en:Czech ISO-8859-2 cz.iso2.kbd:de:Tschechisch ISO-8859-2 +cz.iso2.kbd:fr:Tchèque ISO-8859-2 cz.iso2.kbd:es:Checo ISO-8859-2 danish.iso.kbd:en:Danish ISO-8859-1 @@ -100,26 +111,32 @@ danish.cp865.kbd:pt:Dinamarquês Codepage danish.cp865.kbd:es:Danés Codepage 865 el.iso07.kbd:en:Greek ISO-8859-7 (104 keys) +el.iso07.kbd:fr:Grec ISO-8859-7 (104 touches) el.iso07.kbd:el:Åëëçíéêü ISO-8859-7 (104 ðëÞêôñùí) estonian.iso.kbd:en:Estonian ISO-8859-1 estonian.iso.kbd:de:Estnisch ISO-8859-1 +estonian.iso.kbd:fr:Estonien ISO-8859-1 estonian.iso.kbd:es:Estonio ISO-8859-1 estonian.iso15.kbd:en:Estonian ISO-8859-15 estonian.iso15.kbd:de:Estnisch ISO-8859-15 +estonian.iso15.kbd:fr:Estonien ISO-8859-15 estonian.iso15.kbd:es:Estonio ISO-8859-15 estonian.cp850.kbd:en:Estonian Codepage 850 estonian.cp850.kbd:de:Estnisch Codeseite 850 +estonian.cp850.kbd:fr:Estonien Code page 850 estonian.cp850.kbd:es:Estonio Codepage 850 finnish.iso.kbd:en:Finnish ISO-8859-1 finnish.iso.kbd:de:Finnisch ISO-8859-1 +finnish.iso.kbd:fr:Finlandais ISO-8859-1 finnish.iso.kbd:es:Finlandés ISO-8859-1 finnish.cp850.kbd:en:Finnish Codepage 850 finnish.cp850.kbd:de:Finnisch Codeseite 850 +finnish.cp850.kbd:fr:Finlandais Code page 850 finnish.cp850.kbd:es:Finlandés Codepage 850 fr.iso.kbd:en:French ISO-8859-1 @@ -131,7 +148,7 @@ fr.iso.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 fr.iso.acc.kbd:en:French ISO-8859-1 (accent keys) fr.iso.acc.kbd:de:Französisch ISO-8859-1 (mit Akzenten) -fr.iso.acc.kbd:fr:Français ISO-8859-1 (accent keys) +fr.iso.acc.kbd:fr:Français ISO-8859-1 (avec accents) fr.iso.acc.kbd:pt:Francês ISO-8859-1 (com acentos) fr.iso.acc.kbd:es:Francés ISO-8859-1 (con acentos) fr.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÁ ISO-8859-1 (accent keys) @@ -158,6 +175,7 @@ fr.dvorak.acc.kbd:uk:French Dvorak-like fr_CA.iso.acc.kbd:en:French Canadian ISO-8859-1 (accent keys) fr_CA.iso.acc.kbd:de:Französisch Kanada ISO-8859-1 (mit Akzenten) +fr_CA.iso.acc.kbd:fr:Français Canadien ISO-8859-1 (avec accents) fr_CA.iso.acc.kbd:es:Francocanadiense ISO-8859-1 (con acentos) fr_CA.iso.acc.kbd:uk:æÒÁÎÃÕÚØËÏ-ËÁÎÁÄÓØËÁ ISO-8859-1 (accent keys) @@ -183,100 +201,124 @@ german.cp850.kbd:es:Alemán Codepage 850 german.cp850.kbd:uk:î¦ÍÅÃØËÁ CP-850 gr.elot.acc.kbd:en:Greek ISO-8859-7 ELOT +gr.elot.acc.kbd:fr:Grec ISO-8859-7 ELOT gr.elot.acc.kbd:el:Åëëçíéêü ISO-8859-7 ÅËÏÔ gr.us101.acc.kbd:en:Greek ISO-8859-7 (101 keys) +gr.us101.acc.kbd:fr:Grec ISO-8859-7 (101 touches) gr.us101.acc.kbd:el:Åëëçíéêü ISO-8859-7 (101 ðëÞêôñùí) iw.iso8.kbd:en:Hebrew ISO-8859-8 +iw.iso8.kbd:fr:Hébreu ISO-8859-8 iw.iso8.kbd:he:ISO-8859-8 úéøáò hr.iso.kbd:en:Croatian ISO-8859-2 hr.iso.kbd:de:Kroatisch ISO-8859-2 +hr.iso.kbd:fr:Croate ISO-8859-2 hr.iso.kbd:es:Croata ISO-8859-2 hu.iso2.101keys.kbd:en:Hungarian 101 ISO-8859-2 hu.iso2.101keys.kbd:de:Ungarisch 101 ISO-8859-2 +hu.iso2.101keys.kbd:fr:Hongrois 101 ISO-8859-2 hu.iso2.101keys.kbd:es:Húngaro 101 ISO-8859-2 hu.iso2.102keys.kbd:en:Hungarian 102 ISO-8859-2 hu.iso2.102keys.kbd:de:Ungarisch 102 ISO-8859-2 +hu.iso2.102keys.kbd:fr:Hongrois 102 ISO-8859-2 hu.iso2.102keys.kbd:es:Húngaro 102 ISO-8859-2 hy.armscii-8.kbd:hy:гۻñ»Ý ÑÝãÛáõݳÛÇÝ ¥Phonetic¤ ¹³ë³íáñáõÃÛáõÝ hy.armscii-8.kbd:ru:áÒÍÑÎÓËÁÑ ÆÏÎÅÔÉÞÅÓËÁÑ ÒÁÓËÌÁÄËÁ hy.armscii-8.kbd:en:Armenian phonetic layout +hy.armscii-8.kbd:fr:Arménien phonétique hy.armscii-8.kbd:de:Armenische phonetische Tastenbelegung icelandic.iso.kbd:en:Icelandic ISO-8859-1 icelandic.iso.kbd:de:Isländisch ISO-8859-1 +icelandic.iso.kbd:fr:Islandais ISO-8859-1 icelandic.iso.kbd:pt:Islandês ISO-8859-1 icelandic.iso.kbd:es:Islandés ISO-8859-1 icelandic.iso.acc.kbd:en:Icelandic ISO-8859-1 (accent keys) icelandic.iso.acc.kbd:de:Isländisch ISO-8859-1 (mit Akzenten) +icelandic.iso.acc.kbd:fr:Islandais ISO-8859-1 (avec accents) icelandic.iso.acc.kbd:pt:Islandês ISO-8859-1 (com acentos) icelandic.iso.acc.kbd:es:Islandés ISO-8859-1 (con acentos) it.iso.kbd:en:Italian ISO-8859-1 it.iso.kbd:de:Italienisch ISO-8859-1 +it.iso.kbd:fr:Italien ISO-8859-1 it.iso.kbd:pt,es:Italiano ISO-8859-1 it.iso.kbd:uk:¶ÔÁ̦ÊÓØËÁ ISO-8859-1 jp.106.kbd:en:Japanese 106 jp.106.kbd:de:Japanisch 106 +jp.106.kbd:fr:Japonais 106 jp.106.kbd:pt:Japonês 106 jp.106.kbd:es:Japonés 106 jp.106.kbd:uk:ñÐÏÎÓØËÁ 106 jp.106x.kbd:en:Japanese 106x jp.106x.kbd:de:Japanisch 106x +jp.106x.kbd:fr:Japonais 106x jp.106x.kbd:pt:Japonês 106x jp.106x.kbd:es:Japonés 106x jp.106x.kbd:uk:ñÐÏÎÓØËÁ 106x jp.pc98.kbd:en:Japanese PC-98x1 +jp.pc98.kbd:fr:Japonais PC-98x1 jp.pc98.iso.kbd:en:Japanese PC-98x1 (ISO) +jp.pc98.iso.kbd:fr:Japonais PC-98x1 (ISO) kk.pt154.kst.kbd:en:Kazakh PT154 codepage +kk.pt154.kst.kbd:fr:Kazakh PT154 code page kk.pt154.io.kbd:en:Kazakh PT154 codepage +kk.pt154.io.kbd:fr:Kazakh PT154 code page latinamerican.kbd:en:Latin American latinamerican.kbd:de:Latein Amerikanisch +latinamerican.kbd:fr:Amérique latine latinamerican.kbd:pt,es:América Latina latinamerican.iso.acc.kbd:en:Latin American (accent keys) latinamerican.iso.acc.kbd:de:Latein Amerikanisch (mit Akzenten) +latinamerican.iso.acc.kbd:fr:Amérique latine (avec accents) latinamerican.iso.acc.kbd:pt,es:América Latina (com acentos) lt.iso4.kbd:en:Lithuanian ISO-8859-4 +lt.iso4.kbd:fr:Lithuanien ISO-8859-4 lt.iso4.kbd:es:Lituano ISO-8859-4 norwegian.iso.kbd:en:Norwegian ISO-8859-1 norwegian.iso.kbd:no:Norsk ISO-8859-1 norwegian.iso.kbd:de:Norwegisch ISO-8859-1 +norwegian.iso.kbd:fr:Norvégien ISO-8859-1 norwegian.iso.kbd:pt:Norueguês ISO-8859-1 norwegian.iso.kbd:es:Noruego ISO-8859-1 norwegian.dvorak.kbd:en:Norwegian dvorak norwegian.dvorak.kbd:no:Norsk dvorak norwegian.dvorak.kbd:de:Norwegisch dvorak +norwegian.dvorak.kbd:fr:Norvégien dvorak norwegian.dvorak.kbd:pt:Norueguês dvorak norwegian.dvorak.kbd:es:Noruego Idvorak pl_PL.ISO8859-2.kbd:en:Polish ISO-8859-2 (programmer's) pl_PL.ISO8859-2.kbd:de:Polnisch ISO-8859-2 (für Programmierer) +pl_PL.ISO8859-2.kbd:fr:Polonais ISO-8859-2 (pour programmeurs) pl_PL.ISO8859-2.kbd:pl:Polska ISO-8859-2 (programisty) pl_PL.ISO8859-2.kbd:pt:Polonês ISO-8859-2 (para programadores) pl_PL.ISO8859-2.kbd:es:Polaco ISO-8859-2 (para programadores) pt.iso.kbd:en:Portuguese ISO-8859-1 pt.iso.kbd:de:Portugisisch ISO-8859-1 +pt.iso.kbd:fr:Portugais ISO-8859-1 pt.iso.kbd:pt:Português ISO-8859-1 pt.iso.kbd:es:Portugués ISO-8859-1 pt.iso.acc.kbd:en:Portuguese ISO-8859-1 (accent keys) pt.iso.acc.kbd:de:Portugisisch ISO-8859-1 (mit Akzenten) +pt.iso.acc.kbd:fr:Portugais ISO-8859-1 (avec accents) pt.iso.acc.kbd:pt:Português ISO-8859-1 (com acentos) pt.iso.acc.kbd:es:Portugués ISO-8859-1 (con acentos) @@ -289,6 +331,7 @@ ru.cp866.kbd:es:Ruso Codepage 866 (alter ru.cp866.kbd:uk:òÏÓ¦ÊÓØËÁ CP-866 (ÁÌØÔÅÒÎÁÔÉ×ÎÁ) ru.iso5.kbd:en:Russian ISO-8859-5 +ru.iso5.kbd:fr:Russe ISO-8859-5 ru.iso5.kbd:ru:òÕÓÓËÉÊ ISO-8859-5 ru.iso5.kbd:uk:òÏÓ¦ÊÓØËÉÊ ISO-8859-5 @@ -310,26 +353,31 @@ ru.koi8-r.shift.kbd:uk:òÏÓ¦ÊÓØËÁ koi8-r spanish.iso.kbd:en:Spanish ISO-8859-1 spanish.iso.kbd:de:Spanisch ISO-8859-1 +spanish.iso.kbd:fr:Espagnol ISO-8859-1 spanish.iso.kbd:pt:Espanhol ISO-8859-1 spanish.iso.kbd:es:Español ISO-8859-1 spanish.iso.acc.kbd:en:Spanish ISO-8859-1 (accent keys) spanish.iso.acc.kbd:de:Spanisch ISO-8859-1 (accent keys) +spanish.iso.acc.kbd:fr:Espagnol ISO-8859-1 (avec accents) spanish.iso.acc.kbd:pt:Espanhol ISO-8859-1 (com acentos) spanish.iso.acc.kbd:es:Español ISO-8859-1 (con acentos) spanish.iso15.acc.kbd:en:Spanish ISO-8859-15 (accent keys) spanish.iso15.acc.kbd:de:Spanisch ISO-8859-15 (accent keys) +spanish.iso15.acc.kbd:fr:Espagnol ISO-8859-15 (avec accents) spanish.iso15.acc.kbd:pt:Espanhol ISO-8859-15 (com acentos) spanish.iso15.acc.kbd:es:Español ISO-8859-15 (con acentos) si.iso.kbd:en:Slovenian ISO-8859-2 si.iso.kbd:de:Slovenisch ISO-8859-2 +si.iso.kbd:fr:Slovène ISO-8859-2 si.iso.kbd:pt:Eslovênio ISO-8859-2 si.iso.kbd:es:Esloveno ISO-8859-2 sk.iso2.kbd:en:Slovak ISO-8859-2 sk.iso2.kbd:de:Slovakisch ISO-8859-2 +sk.iso2.kbd:fr:Slovène ISO-8859-2 sk.iso2.kbd:es:Eslovaco ISO-8859-2 swedish.iso.kbd:en:Swedish ISO-8859-1 @@ -376,6 +424,7 @@ swissgerman.cp850.kbd:pt:Suiço-Alemão Co swissgerman.cp850.kbd:es:Germanosuizo Codepage 850 tr.iso9.q.kbd:en:Turkish ISO-8859-9 +tr.iso9.q.kbd:fr:Turc ISO-8859-9 tr.iso9.q.kbd:uk:ôÕÒÅÃØËÁ ISO-8859-9 uk.iso.kbd:en:United Kingdom ISO-8859-1 @@ -392,58 +441,61 @@ uk.cp850.kbd:es:Británico Codepage 850 us.iso.kbd:en:United States of America ISO-8859-1 us.iso.kbd:de:US-amerikanisch ISO-8859-1 -us.iso.kbd:fr:États Unis d'Amérique ISO-8859-1 +us.iso.kbd:fr:États Unis d'Amérique ISO-8859-1 us.iso.kbd:pt:Estados Unidos da América ISO-8859-1 us.iso.kbd:es:Estadounidense ISO-8859-1 us.iso.acc.kbd:en:United States of America ISO-8859-1 (accent keys) us.iso.acc.kbd:de:US-amerikanisch ISO-8859-1 (mit Akzenten) -us.iso.acc.kbd:fr:États Unis d'Amérique ISO-8859-1 (avec accents) +us.iso.acc.kbd:fr:États Unis d'Amérique ISO-8859-1 (avec accents) us.iso.acc.kbd:pt:Estados Unidos da América ISO-8859-1 (com acentos) us.iso.acc.kbd:es:Estadounidense ISO-8859-1 (con acentos) us.dvorak.kbd:en:United States of America dvorak us.dvorak.kbd:de:US-amerikanisch dvorak -us.dvorak.kbd:fr:États Unis d'Amérique dvorak +us.dvorak.kbd:fr:États Unis d'Amérique dvorak us.dvorak.kbd:pt:Estados Unidos da América dvorak us.dvorak.kbd:es:Estadounidense dvorak us.dvorakr.kbd:en:United States of America righthand dvorak us.dvorakr.kbd:de:US-amerikanisch dvorak rechte Hand -us.dvorakr.kbd:fr:États Unis d'Amérique dvorakr +us.dvorakr.kbd:fr:États Unis d'Amérique dvorakr us.dvorakr.kbd:pt:Estados Unidos da América dvorakr us.dvorakr.kbd:es:Estadounidense dvorak diestro us.dvorakl.kbd:en:United States of America lefthand dvorak us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand -us.dvorakl.kbd:fr:États Unis d'Amérique dvorakl +us.dvorakl.kbd:fr:États Unis d'Amérique dvorakl us.dvorakl.kbd:pt:Estados Unidos da América dvorakl us.dvorakl.kbd:es:Estadounidense dvorak zurdo us.dvorakx.kbd:en:United States of America dvorakx us.dvorakx.kbd:de:US-amerikanisch dvorakx -us.dvorakx.kbd:fr:États Unis d'Amérique dvorakx +us.dvorakx.kbd:fr:États Unis d'Amérique dvorakx us.dvorakx.kbd:pt:Estados Unidos da América dvorakx us.dvorakx.kbd:es:Estadounidense dvorakx us.emacs.kbd:en:United States of America Emacs optimized layout us.emacs.kbd:de:US-amerikanisch für Emacs optimiert -us.emacs.kbd:fr:États Unis d'Amérique emacs +us.emacs.kbd:fr:États Unis d'Amérique emacs us.emacs.kbd:pt:Estados Unidos da América emacs us.emacs.kbd:es:Estadounidense optimizado para Emacs us.unix.kbd:en:United States of America Traditional Unix Workstation us.unix.kbd:de:US-amerikanisch traditionelles Unix Layout -us.unix.kbd:fr:États Unis d'Amérique unix +us.unix.kbd:fr:États Unis d'Amérique unix us.unix.kbd:pt:Estados Unidos da América unix us.unix.kbd:es:Estadounidense Unix tradicional ua.iso5.kbd:en:Ukrainian ISO-8859-5 +ua.iso5.kbd:fr:Ukrainien ISO-8859-5 ua.iso5.kbd:ru:õËÒÁÉÎÓËÉÊ ISO-8859-5 ua.iso5.kbd:uk:õËÒÁ§ÎÓØËÁ ISO-8859-5 ua.koi8-u.kbd:en:Ukrainian koi8-u +ua.koi8-u.kbd:fr:Ukrainien koi8-u ua.koi8-u.kbd:uk:õËÒÁ§ÎÓØËÁ koi8-u ua.koi8-u.shift.alt.kbd:en:Ukrainian koi8-u with koi8-r (shift) +ua.koi8-u.shift.alt.kbd:fr:Ukrainien koi8-u avec koi8-r (shift) ua.koi8-u.shift.alt.kbd:uk:õËÒÁ§ÎÓØËÁ koi8-u Ú koi8-r (shift) From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 19 07:37:37 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CDC3106564A; Fri, 19 Jun 2009 07:37:37 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 795758FC1F; Fri, 19 Jun 2009 07:37:37 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5J7bb9c034744; Fri, 19 Jun 2009 07:37:37 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5J7bbxr034738; Fri, 19 Jun 2009 07:37:37 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906190737.n5J7bbxr034738@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 07:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194476 - stable/7/share/syscons/keymaps X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 07:37:38 -0000 Author: edwin Date: Fri Jun 19 07:37:37 2009 New Revision: 194476 URL: http://svn.freebsd.org/changeset/base/194476 Log: MFC of 194084 Add various new keymaps: addition: danish syscons keymap with accents There are two danish keymap files shipping with FreeBSD: danish.iso.kbd and danish.cp865.kbd. None of these support accents by use of dead keys, which isn't crucial to Danes but often used. This is a new keymap, danish.iso.acc.kbd, that's based on danish.iso.kbd with the accent part taken from german.iso.acc.kbd. pl_PL.dvorak keymap for syscons. Polish dvorak keymap by Robert Sebastian Gerus (17:05 01-07-2006 CEST) . Based on pl_PL.ISO-8859-2 and us.dvorak keymaps. British English Dvorak keymap for syscons. Attached is a Dvorak keymap for British English, with a pound-sterling symbol on on Shift-3 and some other characters in different places to the US Dvorak keymap. I've based the layout on the X.org GB keymap, Dvorak variant. PR: conf/72978, kern/99692, conf/117257 Submitted by: Kim Norgaard , Robert Sebastian Gerus , "Benjamin A'Lee" Added: stable/7/share/syscons/keymaps/danish.iso.acc.kbd - copied unchanged from r194084, head/share/syscons/keymaps/danish.iso.acc.kbd stable/7/share/syscons/keymaps/pl_PL.dvorak.kbd - copied unchanged from r194084, head/share/syscons/keymaps/pl_PL.dvorak.kbd stable/7/share/syscons/keymaps/uk.dvorak.kbd - copied unchanged from r194084, head/share/syscons/keymaps/uk.dvorak.kbd Modified: stable/7/share/syscons/keymaps/ (props changed) stable/7/share/syscons/keymaps/INDEX.keymaps stable/7/share/syscons/keymaps/Makefile Modified: stable/7/share/syscons/keymaps/INDEX.keymaps ============================================================================== --- stable/7/share/syscons/keymaps/INDEX.keymaps Fri Jun 19 07:34:30 2009 (r194475) +++ stable/7/share/syscons/keymaps/INDEX.keymaps Fri Jun 19 07:37:37 2009 (r194476) @@ -103,6 +103,13 @@ danish.iso.kbd:fr:Danois ISO-8859-1 danish.iso.kbd:pt:Dinamarquês ISO-8859-1 danish.iso.kbd:es:Danés ISO-8859-1 +danish.iso.acc.kbd:en:Danish ISO-8859-1 (accent keys) +danish.iso.acc.kbd:da:Dansk ISO-8859-1 (accent taster) +danish.iso.acc.kbd:de:Dänisch ISO-8859-1 (mit Akzenten) +danish.iso.acc.kbd:fr:Danois ISO-8859-1 (avec accents) +danish.iso.acc.kbd:pt:Dinamarquês ISO-8859-1 (com acentos) +danish.iso.acc.kbd:es:Danés ISO-8859-1 (con acentos) + danish.cp865.kbd:en:Danish Codepage 865 danish.cp865.kbd:da:Dansk Code page 865 danish.cp865.kbd:de:Dänisch Codeseite 865 @@ -310,6 +317,13 @@ pl_PL.ISO8859-2.kbd:pl:Polska ISO-8859-2 pl_PL.ISO8859-2.kbd:pt:Polonês ISO-8859-2 (para programadores) pl_PL.ISO8859-2.kbd:es:Polaco ISO-8859-2 (para programadores) +pl_PL.dvorak.kbd:en:Polish Dvorak +pl_PL.dvorak.kbd:de:Polnisch Dvorak +pl_PL.dvorak.kbd:fr:Polonais Dvorak +pl_PL.dvorak.kbd:pl:Polska Dvorak +pl_PL.dvorak.kbd:pt:Polonês Dvorak +pl_PL.dvorak.kbd:es:Polaco Dvorak + pt.iso.kbd:en:Portuguese ISO-8859-1 pt.iso.kbd:de:Portugisisch ISO-8859-1 pt.iso.kbd:fr:Portugais ISO-8859-1 @@ -439,6 +453,12 @@ uk.cp850.kbd:fr:Royaume Uni Code page 85 uk.cp850.kbd:pt:Reino Unido Codepage 850 uk.cp850.kbd:es:Británico Codepage 850 +uk.dvorak.kbd:en:United Kingdom Dvorak +uk.dvorak.kbd:de:Vereinigtes K\xf6nigreich Dvorak +uk.dvorak.kbd:fr:Royaume Uni Dvorak +uk.dvorak.kbd:pt:Reino Unido Dvorak +uk.dvorak.kbd:es:Británico Dvorak + us.iso.kbd:en:United States of America ISO-8859-1 us.iso.kbd:de:US-amerikanisch ISO-8859-1 us.iso.kbd:fr:États Unis d'Amérique ISO-8859-1 Modified: stable/7/share/syscons/keymaps/Makefile ============================================================================== --- stable/7/share/syscons/keymaps/Makefile Fri Jun 19 07:34:30 2009 (r194475) +++ stable/7/share/syscons/keymaps/Makefile Fri Jun 19 07:37:37 2009 (r194476) @@ -9,7 +9,8 @@ FILES= INDEX.keymaps \ colemak.iso15.acc.kbd \ cs.latin2.qwertz.kbd \ cz.iso2.kbd \ - danish.iso.kbd danish.cp865.kbd dutch.iso.acc.kbd \ + danish.iso.kbd danish.iso.acc.kbd danish.cp865.kbd \ + dutch.iso.acc.kbd \ el.iso07.kbd \ estonian.iso.kbd estonian.iso15.kbd estonian.cp850.kbd \ finnish.iso.kbd finnish.cp850.kbd \ @@ -29,7 +30,7 @@ FILES= INDEX.keymaps \ latinamerican.kbd latinamerican.iso.acc.kbd \ lt.iso4.kbd \ norwegian.iso.kbd norwegian.dvorak.kbd \ - pl_PL.ISO8859-2.kbd \ + pl_PL.ISO8859-2.kbd pl_PL.dvorak.kbd \ pt.iso.kbd pt.iso.acc.kbd \ ru.koi8-r.kbd ru.koi8-r.shift.kbd ru.koi8-r.win.kbd \ ru.cp866.kbd ru.iso5.kbd \ @@ -42,6 +43,7 @@ FILES= INDEX.keymaps \ tr.iso9.q.kbd \ ua.koi8-u.kbd ua.koi8-u.shift.alt.kbd ua.iso5.kbd \ uk.iso.kbd uk.iso-ctrl.kbd uk.cp850.kbd uk.cp850-ctrl.kbd \ + uk.dvorak.kbd \ us.iso.kbd us.dvorak.kbd us.dvorakx.kbd us.emacs.kbd us.pc-ctrl.kbd \ us.unix.kbd us.iso.acc.kbd Copied: stable/7/share/syscons/keymaps/danish.iso.acc.kbd (from r194084, head/share/syscons/keymaps/danish.iso.acc.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/syscons/keymaps/danish.iso.acc.kbd Fri Jun 19 07:37:37 2009 (r194476, copy of r194084, head/share/syscons/keymaps/danish.iso.acc.kbd) @@ -0,0 +1,164 @@ +# Copyright (c) 2004 +# Kim Norgaard , Denmark. +# 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 as +# the first lines of this file unmodified. +# 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 KIM NOORGAARD ``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 KIM NOORGAARD 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. +# +# $FreeBSD$ + +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop 161 185 nop nop O + 003 '2' '"' nul nul '@' 178 nul nul O + 004 '3' '#' nop nop 158 179 nop nop O + 005 '4' 164 nop nop '$' 164 nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '&' nop nop '6' '&' nop nop O + 008 '7' '/' nop nop '{' '/' nop nop O + 009 '8' '(' esc esc '[' '8' esc esc O + 010 '9' ')' gs gs ']' ')' gs gs O + 011 '0' '=' nop nop '}' '=' nop nop O + 012 '+' '?' nop nop '+' 191 nop nop O + 013 dacu dgra nop nop '|' '`' nop nop O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 017 'w' 'W' etb etb 'w' 'W' etb etb C + 018 'e' 'E' enq enq 164 'E' enq enq C + 019 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 020 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 021 'y' 'Y' em em 'y' 'Y' em em C + 022 'u' 'U' nak nak 'u' 'U' nak nak C + 023 'i' 'I' ht ht 'i' 'I' ht ht C + 024 'o' 'O' si si 'o' 'O' si si C + 025 'p' 'P' dle dle 'p' 'P' dle dle C + 026 229 197 nop nop 134 143 nop nop C + 027 duml dcir rs rs dtil '^' rs rs O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 's' 'S' dc3 dc3 223 'S' dc3 dc3 C + 032 'd' 'D' eot eot 'd' 'D' eot eot C + 033 'f' 'F' ack ack 'f' 'F' ack ack C + 034 'g' 'G' bel bel 'g' 'G' bel bel C + 035 'h' 'H' bs bs 'h' 'H' bs bs C + 036 'j' 'J' nl nl 'j' 'J' nl nl C + 037 'k' 'K' vt vt 'k' 'K' vt vt C + 038 'l' 'L' ff ff 'l' 'L' ff ff C + 039 230 198 nop nop 145 146 nop nop C + 040 248 216 nop nop 155 157 nop nop C + 041 189 167 nop nop 189 167 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 ''' '*' nop nop ''' '*' nop nop O + 044 'z' 'Z' sub sub 'z' 'Z' sub sub C + 045 'x' 'X' can can 'x' 'X' can can C + 046 'c' 'C' etx etx 'c' 'C' etx etx C + 047 'v' 'V' syn syn 'v' 'V' syn syn C + 048 'b' 'B' stx stx 'b' 'B' stx stx C + 049 'n' 'N' so so 'n' 'N' so so C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 ',' ';' nop nop ',' ';' nop nop O + 052 '.' ':' nop nop '.' ':' nop nop O + 053 '-' '_' us us '-' '_' us us O + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '<' '>' fs fs '\' '>' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + duml '"' ( 'a' 228 ) ( 'A' 196 ) ( 'e' 235 ) ( 'E' 203 ) + ( 'i' 239 ) ( 'I' 207 ) ( 'o' 246 ) ( 'O' 214 ) + ( 'u' 252 ) ( 'U' 220 ) ( 'y' 255 ) + dcir '^' ( 'a' 226 ) ( 'A' 194 ) ( 'e' 234 ) ( 'E' 202 ) + ( 'i' 238 ) ( 'I' 206 ) ( 'o' 244 ) ( 'O' 212 ) + ( 'u' 251 ) ( 'U' 219 ) + dtil '~' ( 'a' 227 ) ( 'A' 195 ) ( 'n' 241 ) ( 'N' 209 ) + ( 'o' 245 ) ( 'O' 213 ) + dgra '`' ( 'a' 224 ) ( 'A' 192 ) ( 'e' 232 ) ( 'E' 200 ) + ( 'i' 236 ) ( 'I' 204 ) ( 'o' 242 ) ( 'O' 210 ) + ( 'u' 249 ) ( 'U' 217 ) + dacu ''' ( 'a' 225 ) ( 'A' 193 ) ( 'e' 233 ) ( 'E' 201 ) + ( 'i' 237 ) ( 'I' 205 ) ( 'o' 243 ) ( 'O' 211 ) + ( 'u' 250 ) ( 'U' 218 ) ( 'y' 253 ) ( 'Y' 221 ) + drin 176 ( 'a' 229 ) ( 'A' 197 ) + dced 184 ( 'c' 231 ) ( 'C' 199 ) + dmac 000 + dbre 000 + ddot 000 + dsla 000 + dapo 000 + ddac 000 + dogo 000 + dcar 000 Copied: stable/7/share/syscons/keymaps/pl_PL.dvorak.kbd (from r194084, head/share/syscons/keymaps/pl_PL.dvorak.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/syscons/keymaps/pl_PL.dvorak.kbd Fri Jun 19 07:37:37 2009 (r194476, copy of r194084, head/share/syscons/keymaps/pl_PL.dvorak.kbd) @@ -0,0 +1,118 @@ +# $FreeBSD$ +# +# Polish dvorak keymap by Robert Sebastian Gerus (17:05 01-07-2006 CEST) +# (arachnist@gmail.com) +# Based on pl_PL.ISO-8859-2 and us.dvorak keymaps. +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '1' '!' nop nop O + 003 '2' '@' nul nul '2' '@' nul nul O + 004 '3' '#' nop nop '3' '#' nop nop O + 005 '4' '$' nop nop '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '6' '^' rs rs O + 008 '7' '&' nop nop '7' '&' nop nop O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop '9' '(' nop nop O + 011 '0' ')' nop nop '0' ')' nop nop O + 012 '[' '{' esc esc '[' '{' esc esc O + 013 ']' '}' gs gs ']' '}' gs gs O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 ''' '"' nop nop ''' '"' nop nop O + 017 ',' '<' nop nop ',' '<' nop nop O + 018 '.' '>' nop nop '.' '>' nop nop O + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'y' 'Y' em em 'y' 'Y' em em C + 021 'f' 'F' ack ack 'f' 'F' ack ack C + 022 'g' 'G' bel bel 'g' 'G' bel bel C + 023 'c' 'C' etx etx 230 198 etx etx C + 024 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 025 'l' 'L' ff ff 179 163 ff ff C + 026 '/' '?' nop nop '/' '?' nop nop O + 027 '=' '+' nop nop '=' '+' nop nop O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 177 161 soh soh C + 031 'o' 'O' si si 243 211 si si C + 032 'e' 'E' enq enq 234 202 enq enq C + 033 'u' 'U' nak nak 'u' 'U' nak nak C + 034 'i' 'I' ht ht 'i' 'I' ht ht C + 035 'd' 'D' eot eot 'd' 'D' eot eot C + 036 'h' 'H' bs bs 'h' 'H' bs bs C + 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 038 'n' 'N' so so 241 209 so so C + 039 's' 'S' dc3 dc3 182 166 dc3 dc3 C + 040 '-' '_' us us '-' '_' us us O + 041 '`' '~' nop nop '`' '~' nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '\' '|' fs fs '\' '|' fs fs O + 044 ';' ':' nop nop ';' ':' nop nop O + 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 046 'j' 'J' nl nl 'j' 'J' nl nl C + 047 'k' 'K' vt vt 'k' 'K' vt vt C + 048 'x' 'X' can can 'x' 'X' can can C + 049 'b' 'B' stx stx 'b' 'B' stx stx C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 'w' 'W' etb etb 'w' 'W' etb etb C + 052 'v' 'V' syn syn 188 172 syn syn C + 053 'z' 'Z' sub sub 191 175 sub sub C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 nop nop nop nop nop nop nop nop O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr cr cr cr cr cr cr O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' O + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + Copied: stable/7/share/syscons/keymaps/uk.dvorak.kbd (from r194084, head/share/syscons/keymaps/uk.dvorak.kbd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/syscons/keymaps/uk.dvorak.kbd Fri Jun 19 07:37:37 2009 (r194476, copy of r194084, head/share/syscons/keymaps/uk.dvorak.kbd) @@ -0,0 +1,121 @@ +# $FreeBSD$ +# +# A Dvorak keyboard for UK English +# +# Based on us.dvorak.kbd and uk.iso.kbd, and on the X.org GB layout, Dvorak +# variant. +# +# scan cntrl alt alt cntrl lock +# code base shift cntrl shift alt shift cntrl shift state +# ------------------------------------------------------------------ + 000 nop nop nop nop nop nop nop nop O + 001 esc esc esc esc esc esc debug esc O + 002 '1' '!' nop nop '1' '!' nop nop O + 003 '2' '"' nul nul '2' '"' nul nul O + 004 '3' 163 nop nop '3' 163 nop nop O + 005 '4' '$' nop nop '4' '$' nop nop O + 006 '5' '%' nop nop '5' '%' nop nop O + 007 '6' '^' rs rs '6' '^' rs rs O + 008 '7' '&' nop nop '7' '&' nop nop O + 009 '8' '*' nop nop '8' '*' nop nop O + 010 '9' '(' nop nop '9' '(' nop nop O + 011 '0' ')' nop nop '0' ')' nop nop O + 012 '[' '{' esc esc '[' '{' esc esc O + 013 ']' '}' gs gs ']' '}' gs gs O + 014 bs bs del del bs bs del del O + 015 ht btab nop nop ht btab nop nop O + 016 ''' '@' nop nop ''' '@' nop nop O + 017 ',' '<' nop nop ',' '<' nop nop O + 018 '.' '>' nop nop '.' '>' nop nop O + 019 'p' 'P' dle dle 'p' 'P' dle dle C + 020 'y' 'Y' em em 'y' 'Y' em em C + 021 'f' 'F' ack ack 'f' 'F' ack ack C + 022 'g' 'G' bel bel 'g' 'G' bel bel C + 023 'c' 'C' etx etx 'c' 'C' etx etx C + 024 'r' 'R' dc2 dc2 'r' 'R' dc2 dc2 C + 025 'l' 'L' ff ff 'l' 'L' ff ff C + 026 '/' '?' nop nop '/' '?' nop nop O + 027 '=' '+' nop nop '=' '+' nop nop O + 028 cr cr nl nl cr cr nl nl O + 029 lctrl lctrl lctrl lctrl lctrl lctrl lctrl lctrl O + 030 'a' 'A' soh soh 'a' 'A' soh soh C + 031 'o' 'O' si si 'o' 'O' si si C + 032 'e' 'E' enq enq 'e' 'E' enq enq C + 033 'u' 'U' nak nak 'u' 'U' nak nak C + 034 'i' 'I' ht ht 'i' 'I' ht ht C + 035 'd' 'D' eot eot 'd' 'D' eot eot C + 036 'h' 'H' bs bs 'h' 'H' bs bs C + 037 't' 'T' dc4 dc4 't' 'T' dc4 dc4 C + 038 'n' 'N' so so 'n' 'N' so so C + 039 's' 'S' dc3 dc3 's' 'S' dc3 dc3 C + 040 '-' '_' us us '-' '_' us us O + 041 '`' '~' nop nop '`' 172 nop nop O + 042 lshift lshift lshift lshift lshift lshift lshift lshift O + 043 '#' '~' fs fs '#' '~' fs fs O + 044 ';' ':' nop nop ';' ':' nop nop O + 045 'q' 'Q' dc1 dc1 'q' 'Q' dc1 dc1 C + 046 'j' 'J' nl nl 'j' 'J' nl nl C + 047 'k' 'K' vt vt 'k' 'K' vt vt C + 048 'x' 'X' can can 'x' 'X' can can C + 049 'b' 'B' stx stx 'b' 'B' stx stx C + 050 'm' 'M' cr cr 'm' 'M' cr cr C + 051 'w' 'W' etb etb 'w' 'W' etb etb C + 052 'v' 'V' syn syn 'v' 'V' syn syn C + 053 'z' 'Z' sub sub 'z' 'Z' sub sub C + 054 rshift rshift rshift rshift rshift rshift rshift rshift O + 055 '*' '*' '*' '*' '*' '*' '*' '*' O + 056 lalt lalt lalt lalt lalt lalt lalt lalt O + 057 ' ' ' ' nul ' ' ' ' ' ' susp ' ' O + 058 clock clock clock clock clock clock clock clock O + 059 fkey01 fkey13 fkey25 fkey37 scr01 scr11 scr01 scr11 O + 060 fkey02 fkey14 fkey26 fkey38 scr02 scr12 scr02 scr12 O + 061 fkey03 fkey15 fkey27 fkey39 scr03 scr13 scr03 scr13 O + 062 fkey04 fkey16 fkey28 fkey40 scr04 scr14 scr04 scr14 O + 063 fkey05 fkey17 fkey29 fkey41 scr05 scr15 scr05 scr15 O + 064 fkey06 fkey18 fkey30 fkey42 scr06 scr16 scr06 scr16 O + 065 fkey07 fkey19 fkey31 fkey43 scr07 scr07 scr07 scr07 O + 066 fkey08 fkey20 fkey32 fkey44 scr08 scr08 scr08 scr08 O + 067 fkey09 fkey21 fkey33 fkey45 scr09 scr09 scr09 scr09 O + 068 fkey10 fkey22 fkey34 fkey46 scr10 scr10 scr10 scr10 O + 069 nlock nlock nlock nlock nlock nlock nlock nlock O + 070 slock slock slock slock slock slock slock slock O + 071 fkey49 '7' '7' '7' '7' '7' '7' '7' N + 072 fkey50 '8' '8' '8' '8' '8' '8' '8' N + 073 fkey51 '9' '9' '9' '9' '9' '9' '9' N + 074 fkey52 '-' '-' '-' '-' '-' '-' '-' N + 075 fkey53 '4' '4' '4' '4' '4' '4' '4' N + 076 fkey54 '5' '5' '5' '5' '5' '5' '5' N + 077 fkey55 '6' '6' '6' '6' '6' '6' '6' N + 078 fkey56 '+' '+' '+' '+' '+' '+' '+' N + 079 fkey57 '1' '1' '1' '1' '1' '1' '1' N + 080 fkey58 '2' '2' '2' '2' '2' '2' '2' N + 081 fkey59 '3' '3' '3' '3' '3' '3' '3' N + 082 fkey60 '0' '0' '0' '0' '0' '0' '0' N + 083 del '.' '.' '.' '.' '.' boot boot N + 084 nop nop nop nop nop nop nop nop O + 085 nop nop nop nop nop nop nop nop O + 086 '\' '|' fs fs '\' '|' fs fs O + 087 fkey11 fkey23 fkey35 fkey47 scr11 scr11 scr11 scr11 O + 088 fkey12 fkey24 fkey36 fkey48 scr12 scr12 scr12 scr12 O + 089 cr cr nl nl cr cr nl nl O + 090 rctrl rctrl rctrl rctrl rctrl rctrl rctrl rctrl O + 091 '/' '/' '/' '/' '/' '/' '/' '/' N + 092 nscr pscr debug debug nop nop nop nop O + 093 ralt ralt ralt ralt ralt ralt ralt ralt O + 094 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 fkey49 O + 095 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 fkey50 O + 096 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 fkey51 O + 097 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 fkey53 O + 098 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 fkey55 O + 099 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 fkey57 O + 100 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 fkey58 O + 101 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 fkey59 O + 102 fkey60 paste fkey60 fkey60 fkey60 fkey60 fkey60 fkey60 O + 103 fkey61 fkey61 fkey61 fkey61 fkey61 fkey61 boot fkey61 O + 104 slock saver slock saver susp nop susp nop O + 105 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 fkey62 O + 106 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 fkey63 O + 107 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 fkey64 O + 108 nop nop nop nop nop nop nop nop O + + From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 19 07:42:50 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E6CF106564A; Fri, 19 Jun 2009 07:42:50 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9078FC1C; Fri, 19 Jun 2009 07:42:50 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5J7gn6r034879; Fri, 19 Jun 2009 07:42:49 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5J7gn1b034876; Fri, 19 Jun 2009 07:42:49 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906190742.n5J7gn1b034876@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 07:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194477 - stable/7/share/mklocale X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 07:42:50 -0000 Author: edwin Date: Fri Jun 19 07:42:49 2009 New Revision: 194477 URL: http://svn.freebsd.org/changeset/base/194477 Log: MFC of 194085 Fix printing of some wide-characters by iswprint() on ja_JP.eucJP and ja_JP.SJIS locale The iswprint() function does not return non-zero if used for some wide-character that it code was 0x824f-0x8258 on ja_JP.SJIS and 0xa3b0-0xa3b9 on ja_JP.eucJP locale. But those are right Japanese wide-character code. PR: conf/124511 Submitted by: Michihiro NAKAJIMA Modified: stable/7/share/mklocale/ (props changed) stable/7/share/mklocale/ja_JP.SJIS.src stable/7/share/mklocale/ja_JP.eucJP.src Modified: stable/7/share/mklocale/ja_JP.SJIS.src ============================================================================== --- stable/7/share/mklocale/ja_JP.SJIS.src Fri Jun 19 07:37:37 2009 (r194476) +++ stable/7/share/mklocale/ja_JP.SJIS.src Fri Jun 19 07:42:49 2009 (r194477) @@ -80,7 +80,7 @@ PUNCT 0x819f-0x81ac 0x81b8-0x81bf 0x81c PUNCT 0x81f0-0x81f7 0x81fc /* 300 */ -/* ?DIGIT 0x824f-0x8258 */ +PRINT 0x824f-0x8258 */ /* ?XDIGIT 0x8260-0x8265 0x8281-0x8286 */ ALPHA 0x8260-0x8279 0x8281-0x829a UPPER 0x8260-0x8279 Modified: stable/7/share/mklocale/ja_JP.eucJP.src ============================================================================== --- stable/7/share/mklocale/ja_JP.eucJP.src Fri Jun 19 07:37:37 2009 (r194476) +++ stable/7/share/mklocale/ja_JP.eucJP.src Fri Jun 19 07:42:49 2009 (r194477) @@ -54,7 +54,7 @@ SPECIAL 0xa2f2 - 0xa2f9 0xa2fe SWIDTH2 0xa2a1 - 0xa2ae 0xa2ba - 0xa2c1 0xa2ca - 0xa2d0 0xa2dc - 0xa2ea SWIDTH2 0xa2f2 - 0xa2f9 0xa2fe -/* ?DIGIT 0xa3b0 - 0xa3b9 */ +PRINT 0xa3b0 - 0xa3b9 UPPER 0xa3c1 - 0xa3da /* Romaji */ LOWER 0xa3e1 - 0xa3fa /* Romaji */ SWIDTH2 0xa3b0 - 0xa3b9 /* Zenkaku Digit */ From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 19 07:46:21 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 065251065670; Fri, 19 Jun 2009 07:46:21 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE04C8FC1B; Fri, 19 Jun 2009 07:46:20 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5J7kKjd035025; Fri, 19 Jun 2009 07:46:20 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5J7kKdw035022; Fri, 19 Jun 2009 07:46:20 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906190746.n5J7kKdw035022@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 07:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194478 - in stable/7: etc share/termcap X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 07:46:21 -0000 Author: edwin Date: Fri Jun 19 07:46:20 2009 New Revision: 194478 URL: http://svn.freebsd.org/changeset/base/194478 Log: MFC of 194088 Fix typo in cons25l7 definition in etc/termcap.small and share/termcap There is a minor typo in the cons25l7 (':' instead of '|') entry in src/etc/termcap.small that causes syscons to complain about bogus characters in /etc/termcap.db. PR: conf/132777 Submitted by: Nikos Ntarmos Modified: stable/7/etc/termcap.small (contents, props changed) stable/7/share/termcap/ (props changed) stable/7/share/termcap/termcap.src Modified: stable/7/etc/termcap.small ============================================================================== --- stable/7/etc/termcap.small Fri Jun 19 07:42:49 2009 (r194477) +++ stable/7/etc/termcap.small Fri Jun 19 07:46:20 2009 (r194478) @@ -138,7 +138,7 @@ cons60l1|cons60-iso8859-1:\ cons60l1-m|cons60-iso8859-1-mono:\ :li#60:tc=cons25l1-m: # ISO 8859-7 FreeBSD console with ACS support -cons25l7:cons25-iso8859-7:\ +cons25l7|cons25-iso8859-7:\ :ac=f\260g\261{\360}\243+\253,\273i\247:\ :tc=cons25w: cons25l7-m|cons25-iso8859-7-mono:\ Modified: stable/7/share/termcap/termcap.src ============================================================================== --- stable/7/share/termcap/termcap.src Fri Jun 19 07:42:49 2009 (r194477) +++ stable/7/share/termcap/termcap.src Fri Jun 19 07:46:20 2009 (r194478) @@ -2390,7 +2390,7 @@ cons60l1|cons60-iso8859-1:\ cons60l1-m|cons60-iso8859-1-mono:\ :li#60:tc=cons25l1-m: # 132x25 ISO 8859-1 FreeBSD console -cons25l1-w|:cons25w-iso8859-1:\ +cons25l1-w|cons25w-iso8859-1:\ :co#132:tc=cons25l1: cons30l1-w|cons30w-iso8859-1:\ :co#132:tc=cons30l1: @@ -2401,7 +2401,7 @@ cons50l1-w|cons50w-iso8859-1:\ cons60l1-w|cons60w-iso8859-1:\ :co#132:tc=cons60l1: # ISO 8859-7 FreeBSD console with ACS support -cons25l7:cons25-iso8859-7:\ +cons25l7|cons25-iso8859-7:\ :ac=f\260g\261{\360}\243+\253,\273i\247:\ :tc=cons25w: cons25l7-m|cons25-iso8859-7-mono:\ From owner-svn-src-stable-7@FreeBSD.ORG Fri Jun 19 11:28:57 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E77611065672; Fri, 19 Jun 2009 11:28:57 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE9148FC1C; Fri, 19 Jun 2009 11:28:57 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JBSv0I041995; Fri, 19 Jun 2009 11:28:57 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JBSvA4041993; Fri, 19 Jun 2009 11:28:57 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200906191128.n5JBSvA4041993@svn.freebsd.org> From: Edwin Groothuis Date: Fri, 19 Jun 2009 11:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194482 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2009 11:28:58 -0000 Author: edwin Date: Fri Jun 19 11:28:57 2009 New Revision: 194482 URL: http://svn.freebsd.org/changeset/base/194482 Log: MFV of tzdata2009i: - Fix beginning of DST of Bangladesh Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/asia Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Fri Jun 19 11:23:47 2009 (r194481) +++ stable/7/share/zoneinfo/asia Fri Jun 19 11:28:57 2009 (r194482) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.34
+# @(#)asia	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -165,9 +165,12 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # http://www.timeanddate.com/news/time/bangladesh-daylight-saving-2009.html
 # 
 
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Bang	2009	only	-	Jan	1	0:00	0	-
-Rule	Bang	2009	only	-	Jun	20	0:00	1:00	S
+# From A. N. M. Kamrus Saadat (2009-06-15):
+# Finally we've got the official mail regarding DST start time where DST start 
+# time is mentioned as Jun 19 2009, 23:00 from BTRC (Bangladesh 
+# Telecommunication Regulatory Commission). 
+#
+# No DST end date has been announced yet.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
@@ -176,8 +179,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	2009 # Bangladesh Time
-			6:00	Bang	BD%sT
+			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
+			6:00	1:00	BDST
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Jun 19 15:31:40 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E41A91065676;
	Fri, 19 Jun 2009 15:31:40 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D13348FC1C;
	Fri, 19 Jun 2009 15:31:40 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JFVeZP047230;
	Fri, 19 Jun 2009 15:31:40 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JFVe2K047228;
	Fri, 19 Jun 2009 15:31:40 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200906191531.n5JFVe2K047228@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Fri, 19 Jun 2009 15:31:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194492 - in stable/7/sys: . conf contrib/pf
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 15:31:41 -0000

Author: bz
Date: Fri Jun 19 15:31:40 2009
New Revision: 194492
URL: http://svn.freebsd.org/changeset/base/194492

Log:
  MFC: r187413,187486,190514
  
    Reduce the impact of svnversion.  Just scan the src/sys tree,
    not all of src.
  
    Initially done by peter in 183528, backed out in 183566 due to
    problems with newvers.sh also called from other places during
    world build.  Those two commits were not MFCed.
  
    A working solution was put back in in the MFCed r190514.
  
    Also strip the machine arch from SRCDIR in case it is a cross
    build so svnversion works, done by thompsa r187413,187486.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/conf/newvers.sh
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/conf/newvers.sh
==============================================================================
--- stable/7/sys/conf/newvers.sh	Fri Jun 19 13:08:49 2009	(r194491)
+++ stable/7/sys/conf/newvers.sh	Fri Jun 19 15:31:40 2009	(r194492)
@@ -91,13 +91,22 @@ for dir in /bin /usr/bin /usr/local/bin;
 	if [ -x "${dir}/svnversion" ]; then
 		svnversion=${dir}/svnversion
 		SRCDIR=${d##*obj}
+		if [ -n "$MACHINE" ]; then
+			SRCDIR=${SRCDIR##/$MACHINE}
+		fi
 		SRCDIR=${SRCDIR%%/sys/*}
 		break
 	fi
 done
 
 if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then
-	svn=" r`cd $SRCDIR && $svnversion`"
+	# If we are called from the kernel build, limit
+	# the scope of svnversion to sys/ .
+	if [ -e "${SRCDIR}/sys/conf/newvers.sh" ] ; then
+		svn=" r`cd $SRCDIR/sys && $svnversion`"
+	else
+		svn=" r`cd $SRCDIR && $svnversion`"
+	fi
 else
 	svn=""
 fi

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Jun 19 16:27:41 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A616B1065688;
	Fri, 19 Jun 2009 16:27:41 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 919E38FC1A;
	Fri, 19 Jun 2009 16:27:41 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JGRfBq048509;
	Fri, 19 Jun 2009 16:27:41 GMT (envelope-from stas@svn.freebsd.org)
Received: (from stas@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JGRfsk048501;
	Fri, 19 Jun 2009 16:27:41 GMT (envelope-from stas@svn.freebsd.org)
Message-Id: <200906191627.n5JGRfsk048501@svn.freebsd.org>
From: Stanislav Sedov 
Date: Fri, 19 Jun 2009 16:27:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194495 - in stable/7/sys: . contrib/pf gnu/fs/ext2fs
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 16:27:42 -0000

Author: stas
Date: Fri Jun 19 16:27:41 2009
New Revision: 194495
URL: http://svn.freebsd.org/changeset/base/194495

Log:
  - MFC r187395-187397,193377,193382,193390,193628.
    Add support for inode sizes other than 128 bytes.
    Cleanup.

Deleted:
  stable/7/sys/gnu/fs/ext2fs/sparc64-bitops.h
Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/gnu/fs/ext2fs/ext2_fs.h
  stable/7/sys/gnu/fs/ext2fs/ext2_fs_sb.h
  stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
  stable/7/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
  stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c
  stable/7/sys/gnu/fs/ext2fs/ext2_vfsops.c
  stable/7/sys/gnu/fs/ext2fs/ext2_vnops.c

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_fs.h
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_fs.h	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_fs.h	Fri Jun 19 16:27:41 2009	(r194495)
@@ -52,6 +52,8 @@
 #define umode_t mode_t
 #define loff_t  off_t
 
+#define	cpu_to_le32(x)	htole32(x)
+
 /*
  * The second extended filesystem constants/structures
  */
@@ -87,12 +89,10 @@
 #endif
 
 /*
- * Special inodes numbers
+ * Special inode numbers
  */
 #define	EXT2_BAD_INO		 1	/* Bad blocks inode */
 #define EXT2_ROOT_INO		 2	/* Root inode */
-#define EXT2_ACL_IDX_INO	 3	/* ACL inode */
-#define EXT2_ACL_DATA_INO	 4	/* ACL inode */
 #define EXT2_BOOT_LOADER_INO	 5	/* Boot loader inode */
 #define EXT2_UNDEL_DIR_INO	 6	/* Undelete directory inode */
 
@@ -104,17 +104,29 @@
  */
 #define EXT2_SUPER_MAGIC	0xEF53
 
+#ifdef __KERNEL__
+#include 
+static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
+{
+	return sb->s_fs_info;
+}
+#elif defined(_KERNEL)
 /*
- * Maximal count of links to a file
+ * FreeBSD passes the pointer to the in-core struct with relevant
+ * fields to EXT2_SB macro when accessing superblock fields.
  */
-#define EXT2_LINK_MAX		32000
+#define EXT2_SB(sb)	(sb)
+#else
+/* Assume that user mode programs are passing in an ext2fs superblock, not
+ * a kernel struct super_block.  This will allow us to call the feature-test
+ * macros from user land. */
+#define EXT2_SB(sb)	(sb)
+#endif
 
 /*
- * Note: under FreeBSD, the "user" versions of the following macros are
- * used (and must be used) in most cases, because ((s)->u.ext2_sb.s_es is
- * not accessible.  This depends on __KERNEL__ not being defined for
- * kernel builds under FreeBSD.
+ * Maximal count of links to a file
  */
+#define EXT2_LINK_MAX		32000
 
 /*
  * Macro-instructions used to manage several block sizes
@@ -122,23 +134,22 @@
 #define EXT2_MIN_BLOCK_SIZE		1024
 #define	EXT2_MAX_BLOCK_SIZE		4096
 #define EXT2_MIN_BLOCK_LOG_SIZE		  10
-#if defined(__KERNEL__) || (defined(__FreeBSD__) && defined(_KERNEL))
+#if defined(__KERNEL__) || defined(_KERNEL)
 # define EXT2_BLOCK_SIZE(s)		((s)->s_blocksize)
 #else
 # define EXT2_BLOCK_SIZE(s)		(EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
 #endif
-#define EXT2_ACLE_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
 #define	EXT2_ADDR_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (__u32))
-#ifdef __KERNEL__
+#if defined(__KERNEL__) || defined(_KERNEL)
 # define EXT2_BLOCK_SIZE_BITS(s)	((s)->s_blocksize_bits)
 #else
 # define EXT2_BLOCK_SIZE_BITS(s)	((s)->s_log_block_size + 10)
 #endif
-#ifdef notyet
-#ifdef __KERNEL__
-#define	EXT2_ADDR_PER_BLOCK_BITS(s)	((s)->u.ext2_sb.s_addr_per_block_bits)
-#define EXT2_INODE_SIZE(s)		((s)->u.ext2_sb.s_inode_size)
-#define EXT2_FIRST_INO(s)		((s)->u.ext2_sb.s_first_ino)
+#if defined(__KERNEL__) || defined(_KERNEL)
+#define	EXT2_ADDR_PER_BLOCK_BITS(s)	(EXT2_SB(s)->s_addr_per_block_bits)
+#define EXT2_INODE_SIZE(s)		(EXT2_SB(s)->s_inode_size)
+#define EXT2_FIRST_INO(s)		(EXT2_SB(s)->s_first_ino)
+#define	EXT2_INODES_PER_BLOCK(s)	((s)->s_inodes_per_block)
 #else
 #define EXT2_INODE_SIZE(s)	(((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
 				 EXT2_GOOD_OLD_INODE_SIZE : \
@@ -147,12 +158,6 @@
 				 EXT2_GOOD_OLD_FIRST_INO : \
 				 (s)->s_first_ino)
 #endif
-#else /* !notyet */
-#define	EXT2_INODES_PER_BLOCK(s)	((s)->s_inodes_per_block)
-/* Should be sizeof(struct ext2_inode): */
-#define EXT2_INODE_SIZE			128
-#define EXT2_FIRST_INO			11
-#endif /* notyet */
 
 /*
  * Macro-instructions used to manage fragments
@@ -160,15 +165,11 @@
 #define EXT2_MIN_FRAG_SIZE		1024
 #define	EXT2_MAX_FRAG_SIZE		4096
 #define EXT2_MIN_FRAG_LOG_SIZE		  10
-#ifdef __KERNEL__
-# define EXT2_FRAG_SIZE(s)		((s)->u.ext2_sb.s_frag_size)
-# define EXT2_FRAGS_PER_BLOCK(s)	((s)->u.ext2_sb.s_frags_per_block)
+#if defined(__KERNEL__) || defined(_KERNEL)
+# define EXT2_FRAG_SIZE(s)		(EXT2_SB(s)->s_frag_size)
+# define EXT2_FRAGS_PER_BLOCK(s)	(EXT2_SB(s)->s_frags_per_block)
 #else
-# if defined(_KERNEL) && defined(__FreeBSD__)
-# define EXT2_FRAG_SIZE(s)		((s)->s_frag_size)
-# else
 # define EXT2_FRAG_SIZE(s)		(EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
-# endif
 # define EXT2_FRAGS_PER_BLOCK(s)	(EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
 #endif
 
@@ -212,11 +213,11 @@ struct ext2_group_desc
 /*
  * Macro-instructions used to manage group descriptors
  */
-#ifdef __KERNEL__
-# define EXT2_BLOCKS_PER_GROUP(s)	((s)->u.ext2_sb.s_blocks_per_group)
-# define EXT2_DESC_PER_BLOCK(s)		((s)->u.ext2_sb.s_desc_per_block)
-# define EXT2_INODES_PER_GROUP(s)	((s)->u.ext2_sb.s_inodes_per_group)
-# define EXT2_DESC_PER_BLOCK_BITS(s)	((s)->u.ext2_sb.s_desc_per_block_bits)
+#if defined(__KERNEL__) || defined(_KERNEL)
+# define EXT2_BLOCKS_PER_GROUP(s)	(EXT2_SB(s)->s_blocks_per_group)
+# define EXT2_DESC_PER_BLOCK(s)		(EXT2_SB(s)->s_desc_per_block)
+# define EXT2_INODES_PER_GROUP(s)	(EXT2_SB(s)->s_inodes_per_group)
+# define EXT2_DESC_PER_BLOCK_BITS(s)	(EXT2_SB(s)->s_desc_per_block_bits)
 #else
 # define EXT2_BLOCKS_PER_GROUP(s)	((s)->s_blocks_per_group)
 # define EXT2_DESC_PER_BLOCK(s)		(EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
@@ -366,7 +367,7 @@ struct ext2_inode {
 
 #define clear_opt(o, opt)		o &= ~EXT2_MOUNT_##opt
 #define set_opt(o, opt)			o |= EXT2_MOUNT_##opt
-#define test_opt(sb, opt)		((sb)->u.ext2_sb.s_mount_opt & \
+#define test_opt(sb, opt)		(EXT2_SB(sb)->s_mount_opt & \
 					 EXT2_MOUNT_##opt)
 /*
  * Maximal mount counts between two filesystem checks
@@ -444,15 +445,6 @@ struct ext2_super_block {
 	__u32	s_reserved[204];	/* Padding to the end of the block */
 };
 
-#ifdef __KERNEL__
-#define EXT2_SB(sb)	(&((sb)->u.ext2_sb))
-#else
-/* Assume that user mode programs are passing in an ext2fs superblock, not
- * a kernel struct super_block.  This will allow us to call the feature-test
- * macros from user land. */
-#define EXT2_SB(sb)	(sb)
-#endif
-
 /*
  * Codes for operating systems
  */
@@ -478,11 +470,11 @@ struct ext2_super_block {
  */
 
 #define EXT2_HAS_COMPAT_FEATURE(sb,mask)			\
-	( EXT2_SB(sb)->s_feature_compat & (mask) )
+	( EXT2_SB(sb)->s_es->s_feature_compat & cpu_to_le32(mask) )
 #define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask)			\
-	( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
+	( EXT2_SB(sb)->s_es->s_feature_ro_compat & cpu_to_le32(mask) )
 #define EXT2_HAS_INCOMPAT_FEATURE(sb,mask)			\
-	( EXT2_SB(sb)->s_feature_incompat & (mask) )
+	( EXT2_SB(sb)->s_es->s_feature_incompat & cpu_to_le32(mask) )
 
 #define EXT2_FEATURE_COMPAT_DIR_PREALLOC	0x0001
 

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_fs_sb.h
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_fs_sb.h	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_fs_sb.h	Fri Jun 19 16:27:41 2009	(r194495)
@@ -60,7 +60,7 @@ struct ext2_sb_info {
 	unsigned long s_blocks_per_group;/* Number of blocks in a group */
 	unsigned long s_inodes_per_group;/* Number of inodes in a group */
 	unsigned long s_itb_per_group;	/* Number of inode table blocks per group */
-	unsigned long s_db_per_group;	/* Number of descriptor blocks per group */
+	unsigned long s_gdb_count;	/* Number of group descriptor blocks */
 	unsigned long s_desc_per_block;	/* Number of group descriptors per block */
 	unsigned long s_groups_count;	/* Number of groups in the fs */
 	struct buffer_head * s_sbh;	/* Buffer containing the super block */
@@ -72,10 +72,13 @@ struct ext2_sb_info {
 	struct buffer_head * s_inode_bitmap[EXT2_MAX_GROUP_LOADED];
 	unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED];
 	struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED];
-	int s_rename_lock;
 	unsigned long  s_mount_opt;
-	unsigned short s_resuid;
-	unsigned short s_resgid;
+#ifdef notyet
+	uid_t s_resuid;
+	gid_t s_resgid;
+#endif
+	unsigned short s_inode_size;
+	unsigned int s_first_ino;
 	unsigned short s_mount_state;
 	/* 
 	   stuff that FFS keeps in its super block or that linux

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_inode.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_inode.c	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_inode.c	Fri Jun 19 16:27:41 2009	(r194495)
@@ -91,7 +91,7 @@ ext2_update(vp, waitfor)
 		return (error);
 	}
 	ext2_i2ei(ip, (struct ext2_inode *)((char *)bp->b_data +
-	    EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)));
+	    EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)));
 	if (waitfor && (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) == 0)
 		return (bwrite(bp));
 	else {

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c	Fri Jun 19 16:27:41 2009	(r194495)
@@ -225,7 +225,7 @@ void ext2_free_inode (struct inode * ino
 
 	sb = inode->i_e2fs;
 	lock_super (DEVVP(inode));
-	if (inode->i_number < EXT2_FIRST_INO ||
+	if (inode->i_number < EXT2_FIRST_INO(sb) ||
 	    inode->i_number > sb->s_es->s_inodes_count) {
 		printf ("free_inode reserved inode or nonexistent inode");
 		unlock_super (DEVVP(inode));
@@ -435,7 +435,7 @@ repeat:
 		goto repeat;
 	}
 	j += i * EXT2_INODES_PER_GROUP(sb) + 1;
-	if (j < EXT2_FIRST_INO || j > es->s_inodes_count) {
+	if (j < EXT2_FIRST_INO(sb) || j > es->s_inodes_count) {
 		printf ( "ext2_new_inode:"
 			    "reserved inode or inode > inodes count - "
 			    "block_group = %d,inode=%d", i, j);

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_lookup.c	Fri Jun 19 16:27:41 2009	(r194495)
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -772,7 +773,7 @@ ext2_direnter(ip, dvp, cnp)
 	dp = VTOI(dvp);
 	newdir.inode = ip->i_number;
 	newdir.name_len = cnp->cn_namelen;
-	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
+	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs,
 	    EXT2_FEATURE_INCOMPAT_FILETYPE))
 		newdir.file_type = DTTOFT(IFTODT(ip->i_mode));
 	else
@@ -950,7 +951,7 @@ ext2_dirrewrite(dp, ip, cnp)
 	    &bp)) != 0)
 		return (error);
 	ep->inode = ip->i_number;
-	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs->s_es,
+	if (EXT2_HAS_INCOMPAT_FEATURE(ip->i_e2fs,
 	    EXT2_FEATURE_INCOMPAT_FILETYPE))
 		ep->file_type = DTTOFT(IFTODT(ip->i_mode));
 	else

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_vfsops.c	Fri Jun 19 15:58:24 2009	(r194494)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_vfsops.c	Fri Jun 19 16:27:41 2009	(r194495)
@@ -5,7 +5,7 @@
  *  University of Utah, Department of Computer Science
  */
 /*-
- * Copyright (c) 1989, 1991, 1993, 1994	
+ * Copyright (c) 1989, 1991, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -78,13 +78,13 @@
 
 #include 
 #include 
-#include 
 #include 
+#include 
 
-static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td);
-static int ext2_mountfs(struct vnode *, struct mount *, struct thread *);
-static int ext2_reload(struct mount *mp, struct thread *td);
-static int ext2_sbupdate(struct ext2mount *, int);
+static int	ext2_flushfiles(struct mount *mp, int flags, struct thread *td);
+static int	ext2_mountfs(struct vnode *, struct mount *, struct thread *);
+static int	ext2_reload(struct mount *mp, struct thread *td);
+static int	ext2_sbupdate(struct ext2mount *, int);
 
 static vfs_unmount_t		ext2_unmount;
 static vfs_root_t		ext2_root;
@@ -109,9 +109,6 @@ static struct vfsops ext2fs_vfsops = {
 
 VFS_SET(ext2fs_vfsops, ext2fs, 0);
 
-#define bsd_malloc malloc
-#define bsd_free free
-
 static int	ext2_check_sb_compat(struct ext2_super_block *es, struct cdev *dev,
 		    int ronly);
 static int	compute_sb_data(struct vnode * devvp,
@@ -120,25 +117,23 @@ static int	compute_sb_data(struct vnode 
 static const char *ext2_opts[] = { "from", "export", "acls", "noexec",
     "noatime", "union", "suiddir", "multilabel", "nosymfollow",
     "noclusterr", "noclusterw", "force", NULL };
- 
+
 /*
  * VFS Operations.
  *
  * mount system call
  */
 static int
-ext2_mount(mp, td)
-	struct mount *mp;
-	struct thread *td;
+ext2_mount(struct mount *mp, struct thread *td)
 {
 	struct vfsoptlist *opts;
 	struct vnode *devvp;
 	struct ext2mount *ump = 0;
 	struct ext2_sb_info *fs;
+	struct nameidata nd, *ndp = &nd;
+	mode_t accessmode;
 	char *path, *fspec;
 	int error, flags, len;
-	mode_t accessmode;
-	struct nameidata nd, *ndp = &nd;
 
 	opts = mp->mnt_optnew;
 
@@ -195,6 +190,7 @@ ext2_mount(mp, td)
 		if (fs->s_rd_only && !vfs_flagopt(opts, "ro", NULL, 0)) {
 			if (ext2_check_sb_compat(fs->s_es, devvp->v_rdev, 0))
 				return (EPERM);
+
 			/*
 			 * If upgrade to read-write by non-root, then verify
 			 * that user has necessary permissions on the device.
@@ -221,8 +217,7 @@ ext2_mount(mp, td)
 			    (fs->s_es->s_state & EXT2_ERROR_FS)) {
 				if (mp->mnt_flag & MNT_FORCE) {
 					printf(
-"WARNING: %s was not properly dismounted\n",
-					    fs->fs_fsmnt);
+"WARNING: %s was not properly dismounted\n", fs->fs_fsmnt);
 				} else {
 					printf(
 "WARNING: R/W mount of %s denied.  Filesystem is not clean - run fsck\n",
@@ -242,6 +237,7 @@ ext2_mount(mp, td)
 			return (error);
 		}
 	}
+
 	/*
 	 * Not an update, or updating the name: look up the name
 	 * and verify that it refers to a sensible disk device.
@@ -291,6 +287,7 @@ ext2_mount(mp, td)
 	}
 	ump = VFSTOEXT2(mp);
 	fs = ump->um_e2fs;
+
 	/*
 	 * Note that this strncpy() is ok because of a check at the start
 	 * of ext2_mount().
@@ -302,63 +299,55 @@ ext2_mount(mp, td)
 }
 
 /*
- * checks that the data in the descriptor blocks make sense
- * this is taken from ext2/super.c
+ * Checks that the data in the descriptor blocks make sense
+ * this is taken from ext2/super.c.
  */
-static int ext2_check_descriptors (struct ext2_sb_info * sb)
+static int
+ext2_check_descriptors(struct ext2_sb_info *sb)
 {
-        int i;
-        int desc_block = 0;
-        unsigned long block = sb->s_es->s_first_data_block;
-        struct ext2_group_desc * gdp = NULL;
-
-        /* ext2_debug ("Checking group descriptors"); */
+	struct ext2_group_desc *gdp = NULL;
+	unsigned long block = sb->s_es->s_first_data_block;
+	int desc_block = 0;
+	int i;
 
-        for (i = 0; i < sb->s_groups_count; i++)
-        {
+	for (i = 0; i < sb->s_groups_count; i++) {
 		/* examine next descriptor block */
-                if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0)
-                        gdp = (struct ext2_group_desc *) 
-				sb->s_group_desc[desc_block++]->b_data;
-                if (gdp->bg_block_bitmap < block ||
-                    gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
-                {
-                        printf ("ext2_check_descriptors: "
-                                    "Block bitmap for group %d"
-                                    " not in group (block %lu)!\n",
-                                    i, (unsigned long) gdp->bg_block_bitmap);
-                        return 0;
-                }
-                if (gdp->bg_inode_bitmap < block ||
-                    gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb))
-                {
-                        printf ("ext2_check_descriptors: "
-                                    "Inode bitmap for group %d"
-                                    " not in group (block %lu)!\n",
-                                    i, (unsigned long) gdp->bg_inode_bitmap);
-                        return 0;
-                }
-                if (gdp->bg_inode_table < block ||
-                    gdp->bg_inode_table + sb->s_itb_per_group >=
-                    block + EXT2_BLOCKS_PER_GROUP(sb))
-                {
-                        printf ("ext2_check_descriptors: "
-                                    "Inode table for group %d"
-                                    " not in group (block %lu)!\n",
-                                    i, (unsigned long) gdp->bg_inode_table);
-                        return 0;
-                }
-                block += EXT2_BLOCKS_PER_GROUP(sb);
-                gdp++;
-        }
-        return 1;
+		if ((i % EXT2_DESC_PER_BLOCK(sb)) == 0)
+			gdp = (struct ext2_group_desc *)
+			    sb->s_group_desc[desc_block++]->b_data;
+		if (gdp->bg_block_bitmap < block ||
+		    gdp->bg_block_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) {
+			printf ("ext2_check_descriptors: "
+			    "Block bitmap for group %d"
+			    " not in group (block %lu)!\n",
+			    i, (unsigned long) gdp->bg_block_bitmap);
+			return (0);
+		}
+		if (gdp->bg_inode_bitmap < block ||
+		    gdp->bg_inode_bitmap >= block + EXT2_BLOCKS_PER_GROUP(sb)) {
+			printf ("ext2_check_descriptors: "
+			    "Inode bitmap for group %d"
+			    " not in group (block %lu)!\n",
+			    i, (unsigned long) gdp->bg_inode_bitmap);
+			return (0);
+		}
+		if (gdp->bg_inode_table < block ||
+		    gdp->bg_inode_table + sb->s_itb_per_group >=
+		    block + EXT2_BLOCKS_PER_GROUP(sb)) {
+			printf ("ext2_check_descriptors: "
+			    "Inode table for group %d"
+			    " not in group (block %lu)!\n",
+			    i, (unsigned long) gdp->bg_inode_table);
+			return (0);
+		}
+		block += EXT2_BLOCKS_PER_GROUP(sb);
+		gdp++;
+	}
+	return (1);
 }
 
 static int
-ext2_check_sb_compat(es, dev, ronly)
-	struct ext2_super_block *es;
-	struct cdev *dev;
-	int ronly;
+ext2_check_sb_compat(struct ext2_super_block *es, struct cdev *dev, int ronly)
 {
 
 	if (es->s_magic != EXT2_SUPER_MAGIC) {
@@ -375,9 +364,8 @@ ext2_check_sb_compat(es, dev, ronly)
 		}
 		if (!ronly &&
 		    (es->s_feature_ro_compat & ~EXT2_FEATURE_RO_COMPAT_SUPP)) {
-			printf(
-"WARNING: R/W mount of %s denied due to unsupported optional features\n",
-			    devtoname(dev));
+			printf("WARNING: R/W mount of %s denied due to "
+			    "unsupported optional features\n", devtoname(dev));
 			return (1);
 		}
 	}
@@ -385,107 +373,101 @@ ext2_check_sb_compat(es, dev, ronly)
 }
 
 /*
- * this computes the fields of the  ext2_sb_info structure from the
- * data in the ext2_super_block structure read in
+ * This computes the fields of the  ext2_sb_info structure from the
+ * data in the ext2_super_block structure read in.
  */
-static int compute_sb_data(devvp, es, fs)
-	struct vnode * devvp;
-	struct ext2_super_block * es;
-	struct ext2_sb_info * fs;
+static int
+compute_sb_data(struct vnode *devvp, struct ext2_super_block *es,
+    struct ext2_sb_info *fs)
 {
-    int db_count, error;
-    int i, j;
-    int logic_sb_block = 1;	/* XXX for now */
-
-#if 1
-#define V(v)  
-#else
-#define V(v)  printf(#v"= %d\n", fs->v);
-#endif
+	int db_count, error;
+	int i, j;
+	int logic_sb_block = 1;	/* XXX for now */
+
+	fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size;
+	fs->s_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->s_log_block_size;
+	fs->s_fsbtodb = es->s_log_block_size + 1;
+	fs->s_qbmask = fs->s_blocksize - 1;
+	fs->s_blocksize_bits = es->s_log_block_size + 10;
+	fs->s_frag_size = EXT2_MIN_FRAG_SIZE << es->s_log_frag_size;
+	if (fs->s_frag_size)
+		fs->s_frags_per_block = fs->s_blocksize / fs->s_frag_size;
+	fs->s_blocks_per_group = es->s_blocks_per_group;
+	fs->s_frags_per_group = es->s_frags_per_group;
+	fs->s_inodes_per_group = es->s_inodes_per_group;
+	if (es->s_rev_level == EXT2_GOOD_OLD_REV) {
+		fs->s_first_ino = EXT2_GOOD_OLD_FIRST_INO;
+		fs->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE;
+	} else {
+		fs->s_first_ino = es->s_first_ino;
+		fs->s_inode_size = es->s_inode_size;
 
-    fs->s_blocksize = EXT2_MIN_BLOCK_SIZE << es->s_log_block_size; 
-    V(s_blocksize)
-    fs->s_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->s_log_block_size;
-    V(s_bshift)
-    fs->s_fsbtodb = es->s_log_block_size + 1;
-    V(s_fsbtodb)
-    fs->s_qbmask = fs->s_blocksize - 1;
-    V(s_bmask)
-    fs->s_blocksize_bits = EXT2_BLOCK_SIZE_BITS(es);
-    V(s_blocksize_bits)
-    fs->s_frag_size = EXT2_MIN_FRAG_SIZE << es->s_log_frag_size;
-    V(s_frag_size)
-    if (fs->s_frag_size)
-	fs->s_frags_per_block = fs->s_blocksize / fs->s_frag_size;
-    V(s_frags_per_block)
-    fs->s_blocks_per_group = es->s_blocks_per_group;
-    V(s_blocks_per_group)
-    fs->s_frags_per_group = es->s_frags_per_group;
-    V(s_frags_per_group)
-    fs->s_inodes_per_group = es->s_inodes_per_group;
-    V(s_inodes_per_group)
-    fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE;
-    V(s_inodes_per_block)
-    fs->s_itb_per_group = fs->s_inodes_per_group /fs->s_inodes_per_block;
-    V(s_itb_per_group)
-    fs->s_desc_per_block = fs->s_blocksize / sizeof (struct ext2_group_desc);
-    V(s_desc_per_block)
-    /* s_resuid / s_resgid ? */
-    fs->s_groups_count = (es->s_blocks_count -
-			  es->s_first_data_block +
-			  EXT2_BLOCKS_PER_GROUP(fs) - 1) /
-			 EXT2_BLOCKS_PER_GROUP(fs);
-    V(s_groups_count)
-    db_count = (fs->s_groups_count + EXT2_DESC_PER_BLOCK(fs) - 1) /
-	EXT2_DESC_PER_BLOCK(fs);
-    fs->s_db_per_group = db_count;
-    V(s_db_per_group)
+		/*
+		 * Simple sanity check for superblock inode size value.
+		 */
+		if (fs->s_inode_size < EXT2_GOOD_OLD_INODE_SIZE ||
+		    fs->s_inode_size > fs->s_blocksize ||
+		    (fs->s_inode_size & (fs->s_inode_size - 1)) != 0) {
+			printf("EXT2-fs: invalid inode size %d\n",
+			    fs->s_inode_size);
+			return (EIO);
+		}
+	}
+	fs->s_inodes_per_block = fs->s_blocksize / EXT2_INODE_SIZE(fs);
+	fs->s_itb_per_group = fs->s_inodes_per_group /fs->s_inodes_per_block;
+	fs->s_desc_per_block = fs->s_blocksize / sizeof (struct ext2_group_desc);
+	/* s_resuid / s_resgid ? */
+	fs->s_groups_count = (es->s_blocks_count - es->s_first_data_block +
+	    EXT2_BLOCKS_PER_GROUP(fs) - 1) / EXT2_BLOCKS_PER_GROUP(fs);
+	db_count = (fs->s_groups_count + EXT2_DESC_PER_BLOCK(fs) - 1) /
+	    EXT2_DESC_PER_BLOCK(fs);
+	fs->s_gdb_count = db_count;
+	fs->s_group_desc = malloc(db_count * sizeof (struct buf *),
+	    M_EXT2MNT, M_WAITOK);
 
-    fs->s_group_desc = bsd_malloc(db_count * sizeof (struct buf *),
-		M_EXT2MNT, M_WAITOK);
+	/*
+	 * Adjust logic_sb_block.
+	 * Godmar thinks: if the blocksize is greater than 1024, then
+	 * the superblock is logically part of block zero.
+	 */
+	if(fs->s_blocksize > SBSIZE)
+		logic_sb_block = 0;
 
-    /* adjust logic_sb_block */
-    if(fs->s_blocksize > SBSIZE) 
-	/* Godmar thinks: if the blocksize is greater than 1024, then
-	   the superblock is logically part of block zero. 
-	 */
-        logic_sb_block = 0;
-    
-    for (i = 0; i < db_count; i++) {
-	error = bread(devvp , fsbtodb(fs, logic_sb_block + i + 1), 
-		fs->s_blocksize, NOCRED, &fs->s_group_desc[i]);
-	if(error) {
-	    for (j = 0; j < i; j++)
-		brelse(fs->s_group_desc[j]);
-	    bsd_free(fs->s_group_desc, M_EXT2MNT);
-	    printf("EXT2-fs: unable to read group descriptors (%d)\n", error);
-	    return EIO;
-	}
-	LCK_BUF(fs->s_group_desc[i])
-    }
-    if(!ext2_check_descriptors(fs)) {
-	    for (j = 0; j < db_count; j++)
-		    ULCK_BUF(fs->s_group_desc[j])
-	    bsd_free(fs->s_group_desc, M_EXT2MNT);
-	    printf("EXT2-fs: (ext2_check_descriptors failure) "
-		   "unable to read group descriptors\n");
-	    return EIO;
-    }
-
-    for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++) {
-	    fs->s_inode_bitmap_number[i] = 0;
-	    fs->s_inode_bitmap[i] = NULL;
-	    fs->s_block_bitmap_number[i] = 0;
-	    fs->s_block_bitmap[i] = NULL;
-    }
-    fs->s_loaded_inode_bitmaps = 0;
-    fs->s_loaded_block_bitmaps = 0;
-    if (es->s_rev_level == EXT2_GOOD_OLD_REV || (es->s_feature_ro_compat &
-        EXT2_FEATURE_RO_COMPAT_LARGE_FILE) == 0)
-	fs->fs_maxfilesize = 0x7fffffff;
-    else
-	fs->fs_maxfilesize = 0x7fffffffffffffff;
-    return 0;
+	for (i = 0; i < db_count; i++) {
+		error = bread(devvp , fsbtodb(fs, logic_sb_block + i + 1),
+		    fs->s_blocksize, NOCRED, &fs->s_group_desc[i]);
+		if(error) {
+			for (j = 0; j < i; j++)
+				brelse(fs->s_group_desc[j]);
+			free(fs->s_group_desc, M_EXT2MNT);
+			printf("EXT2-fs: unable to read group descriptors"
+			    " (%d)\n", error);
+			return (EIO);
+		}
+		LCK_BUF(fs->s_group_desc[i])
+	}
+	if(!ext2_check_descriptors(fs)) {
+		for (j = 0; j < db_count; j++)
+			ULCK_BUF(fs->s_group_desc[j])
+		free(fs->s_group_desc, M_EXT2MNT);
+		printf("EXT2-fs: (ext2_check_descriptors failure) "
+		    "unable to read group descriptors\n");
+		return (EIO);
+	}
+	for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++) {
+		fs->s_inode_bitmap_number[i] = 0;
+		fs->s_inode_bitmap[i] = NULL;
+		fs->s_block_bitmap_number[i] = 0;
+		fs->s_block_bitmap[i] = NULL;
+	}
+	fs->s_loaded_inode_bitmaps = 0;
+	fs->s_loaded_block_bitmaps = 0;
+	if (es->s_rev_level == EXT2_GOOD_OLD_REV ||
+	    (es->s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_LARGE_FILE) == 0)
+		fs->fs_maxfilesize = 0x7fffffff;
+	else
+		fs->fs_maxfilesize = 0x7fffffffffffffff;
+	return (0);
 }
 
 /*
@@ -507,7 +489,7 @@ ext2_reload(struct mount *mp, struct thr
 	struct vnode *vp, *mvp, *devvp;
 	struct inode *ip;
 	struct buf *bp;
-	struct ext2_super_block * es;
+	struct ext2_super_block *es;
 	struct ext2_sb_info *fs;
 	int error;
 
@@ -538,7 +520,7 @@ ext2_reload(struct mount *mp, struct thr
 
 	if((error = compute_sb_data(devvp, es, fs)) != 0) {
 		brelse(bp);
-		return error;
+		return (error);
 	}
 #ifdef UNKLAR
 	if (fs->fs_sbsize < SBSIZE)
@@ -564,12 +546,12 @@ loop:
 		}
 		if (vinvalbuf(vp, 0, td, 0, 0))
 			panic("ext2_reload: dirty2");
+
 		/*
 		 * Step 5: re-read inode data for all active vnodes.
 		 */
 		ip = VTOI(vp);
-		error =
-		    bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
+		error = bread(devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
 		    (int)fs->s_blocksize, NOCRED, &bp);
 		if (error) {
 			VOP_UNLOCK(vp, 0, td);
@@ -578,7 +560,7 @@ loop:
 			return (error);
 		}
 		ext2_ei2i((struct ext2_inode *) ((char *)bp->b_data +
-		    EXT2_INODE_SIZE * ino_to_fsbo(fs, ip->i_number)), ip);
+		    EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)), ip);
 		brelse(bp);
 		VOP_UNLOCK(vp, 0, td);
 		vrele(vp);
@@ -589,18 +571,15 @@ loop:
 }
 
 /*
- * Common code for mount and mountroot
+ * Common code for mount and mountroot.
  */
 static int
-ext2_mountfs(devvp, mp, td)
-	struct vnode *devvp;
-	struct mount *mp;
-	struct thread *td;
+ext2_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td)
 {
 	struct ext2mount *ump;
 	struct buf *bp;
 	struct ext2_sb_info *fs;
-	struct ext2_super_block * es;
+	struct ext2_super_block *es;
 	struct cdev *dev = devvp->v_rdev;
 	struct g_consumer *cp;
 	struct bufobj *bo;
@@ -658,19 +637,22 @@ ext2_mountfs(devvp, mp, td)
 			goto out;
 		}
 	}
-	ump = bsd_malloc(sizeof *ump, M_EXT2MNT, M_WAITOK);
+	ump = malloc(sizeof *ump, M_EXT2MNT, M_WAITOK);
 	bzero((caddr_t)ump, sizeof *ump);
-	/* I don't know whether this is the right strategy. Note that
-	   we dynamically allocate both an ext2_sb_info and an ext2_super_block
-	   while Linux keeps the super block in a locked buffer
+
+	/*
+	 * I don't know whether this is the right strategy. Note that
+	 * we dynamically allocate both an ext2_sb_info and an ext2_super_block
+	 * while Linux keeps the super block in a locked buffer.
 	 */
-	ump->um_e2fs = bsd_malloc(sizeof(struct ext2_sb_info), 
+	ump->um_e2fs = malloc(sizeof(struct ext2_sb_info),
 		M_EXT2MNT, M_WAITOK);
-	ump->um_e2fs->s_es = bsd_malloc(sizeof(struct ext2_super_block), 
+	ump->um_e2fs->s_es = malloc(sizeof(struct ext2_super_block),
 		M_EXT2MNT, M_WAITOK);
 	bcopy(es, ump->um_e2fs->s_es, (u_int)sizeof(struct ext2_super_block));
 	if ((error = compute_sb_data(devvp, ump->um_e2fs->s_es, ump->um_e2fs)))
 		goto out;
+
 	/*
 	 * We don't free the group descriptors allocated by compute_sb_data()
 	 * until ext2_unmount().  This is OK since the mount will succeed.
@@ -679,8 +661,10 @@ ext2_mountfs(devvp, mp, td)
 	bp = NULL;
 	fs = ump->um_e2fs;
 	fs->s_rd_only = ronly;	/* ronly is set according to mnt_flags */
-	/* if the fs is not mounted read-only, make sure the super block is 
-	   always written back on a sync()
+
+	/*
+	 * If the fs is not mounted read-only, make sure the super block is
+	 * always written back on a sync().
 	 */
 	fs->s_wasvalid = fs->s_es->s_state & EXT2_VALID_FS ? 1 : 0;
 	if (ronly == 0) {
@@ -699,13 +683,15 @@ ext2_mountfs(devvp, mp, td)
 	ump->um_devvp = devvp;
 	ump->um_bo = &devvp->v_bufobj;
 	ump->um_cp = cp;
-	/* setting those two parameters allowed us to use
-	   ufs_bmap w/o changse !
-	*/
+
+	/*
+	 * Setting those two parameters allowed us to use
+	 * ufs_bmap w/o changse!
+	 */
 	ump->um_nindir = EXT2_ADDR_PER_BLOCK(fs);
 	ump->um_bptrtodb = fs->s_es->s_log_block_size + 1;
 	ump->um_seqinc = EXT2_FRAGS_PER_BLOCK(fs);
-	if (ronly == 0) 
+	if (ronly == 0)
 		ext2_sbupdate(ump, MNT_WAIT);
 	return (0);
 out:
@@ -719,22 +705,19 @@ out:
 		PICKUP_GIANT();
 	}
 	if (ump) {
-		bsd_free(ump->um_e2fs->s_es, M_EXT2MNT);
-		bsd_free(ump->um_e2fs, M_EXT2MNT);
-		bsd_free(ump, M_EXT2MNT);
+		free(ump->um_e2fs->s_es, M_EXT2MNT);
+		free(ump->um_e2fs, M_EXT2MNT);
+		free(ump, M_EXT2MNT);
 		mp->mnt_data = (qaddr_t)0;
 	}
 	return (error);
 }
 
 /*
- * unmount system call
+ * Unmount system call.
  */
 static int
-ext2_unmount(mp, mntflags, td)
-	struct mount *mp;
-	int mntflags;
-	struct thread *td;
+ext2_unmount(struct mount *mp, int mntflags, struct thread *td)
 {
 	struct ext2mount *ump;
 	struct ext2_sb_info *fs;
@@ -758,18 +741,17 @@ ext2_unmount(mp, mntflags, td)
 	}
 
 	/* release buffers containing group descriptors */
-	for(i = 0; i < fs->s_db_per_group; i++) 
+	for(i = 0; i < fs->s_gdb_count; i++)
 		ULCK_BUF(fs->s_group_desc[i])
-	bsd_free(fs->s_group_desc, M_EXT2MNT);
+	free(fs->s_group_desc, M_EXT2MNT);
 
 	/* release cached inode/block bitmaps */
-        for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
-                if (fs->s_inode_bitmap[i])
-			ULCK_BUF(fs->s_inode_bitmap[i])
-
-        for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
-                if (fs->s_block_bitmap[i])
-			ULCK_BUF(fs->s_block_bitmap[i])
+	for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
+		if (fs->s_inode_bitmap[i])
+		    ULCK_BUF(fs->s_inode_bitmap[i])
+	for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
+		if (fs->s_block_bitmap[i])
+		    ULCK_BUF(fs->s_block_bitmap[i])
 
 	DROP_GIANT();
 	g_topology_lock();
@@ -777,9 +759,9 @@ ext2_unmount(mp, mntflags, td)
 	g_topology_unlock();
 	PICKUP_GIANT();
 	vrele(ump->um_devvp);
-	bsd_free(fs->s_es, M_EXT2MNT);
-	bsd_free(fs, M_EXT2MNT);
-	bsd_free(ump, M_EXT2MNT);
+	free(fs->s_es, M_EXT2MNT);
+	free(fs, M_EXT2MNT);
+	free(ump, M_EXT2MNT);
 	mp->mnt_data = (qaddr_t)0;
 	MNT_ILOCK(mp);
 	mp->mnt_flag &= ~MNT_LOCAL;
@@ -791,10 +773,7 @@ ext2_unmount(mp, mntflags, td)
  * Flush out all the files in a filesystem.
  */
 static int
-ext2_flushfiles(mp, flags, td)
-	struct mount *mp;
-	int flags;
-	struct thread *td;
+ext2_flushfiles(struct mount *mp, int flags, struct thread *td)
 {
 	int error;
 
@@ -804,18 +783,15 @@ ext2_flushfiles(mp, flags, td)
 
 /*
  * Get file system statistics.
- * taken from ext2/super.c ext2_statfs
+ * taken from ext2/super.c ext2_statfs.
  */
 static int
-ext2_statfs(mp, sbp, td)
-	struct mount *mp;
-	struct statfs *sbp;
-	struct thread *td;
+ext2_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
 {
-        unsigned long overhead;
 	struct ext2mount *ump;
 	struct ext2_sb_info *fs;
 	struct ext2_super_block *es;
+	unsigned long overhead;
 	int i, nsb;
 
 	ump = VFSTOEXT2(mp);
@@ -835,19 +811,19 @@ ext2_statfs(mp, sbp, td)
 				nsb++;
 	} else
 		nsb = fs->s_groups_count;
-	overhead = es->s_first_data_block + 
-	    /* Superblocks and block group descriptors: */
-	    nsb * (1 + fs->s_db_per_group) +
-	    /* Inode bitmap, block bitmap, and inode table: */
-	    fs->s_groups_count * (1 + 1 + fs->s_itb_per_group);
+	overhead = es->s_first_data_block +
+	/* Superblocks and block group descriptors: */
+	nsb * (1 + fs->s_gdb_count) +
+	/* Inode bitmap, block bitmap, and inode table: */
+	fs->s_groups_count * (1 + 1 + fs->s_itb_per_group);
 
-	sbp->f_bsize = EXT2_FRAG_SIZE(fs);	
+	sbp->f_bsize = EXT2_FRAG_SIZE(fs);
 	sbp->f_iosize = EXT2_BLOCK_SIZE(fs);
 	sbp->f_blocks = es->s_blocks_count - overhead;
-	sbp->f_bfree = es->s_free_blocks_count; 
-	sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count; 
-	sbp->f_files = es->s_inodes_count; 
-	sbp->f_ffree = es->s_free_inodes_count; 
+	sbp->f_bfree = es->s_free_blocks_count;
+	sbp->f_bavail = sbp->f_bfree - es->s_r_blocks_count;
+	sbp->f_files = es->s_inodes_count;
+	sbp->f_ffree = es->s_free_inodes_count;
 	return (0);
 }
 
@@ -859,10 +835,7 @@ ext2_statfs(mp, sbp, td)
  * Note: we are always called with the filesystem marked `MPBUSY'.
  */
 static int
-ext2_sync(mp, waitfor, td)
-	struct mount *mp;
-	int waitfor;
-	struct thread *td;
+ext2_sync(struct mount *mp, int waitfor, struct thread *td)
 {
 	struct vnode *mvp, *vp;
 	struct inode *ip;
@@ -875,6 +848,7 @@ ext2_sync(mp, waitfor, td)
 		printf("fs = %s\n", fs->fs_fsmnt);
 		panic("ext2_sync: rofs mod");
 	}
+
 	/*
 	 * Write back each (modified) inode.
 	 */
@@ -912,6 +886,7 @@ loop:
 		MNT_ILOCK(mp);
 	}
 	MNT_IUNLOCK(mp);
+
 	/*
 	 * Force stale file system control information to be flushed.
 	 */
@@ -921,6 +896,7 @@ loop:
 			allerror = error;
 		VOP_UNLOCK(ump->um_devvp, 0, td);
 	}
+
 	/*
 	 * Write back modified superblock.
 	 */
@@ -940,11 +916,7 @@ loop:
  * done by the calling routine.
  */
 static int
-ext2_vget(mp, ino, flags, vpp)
-	struct mount *mp;
-	ino_t ino;
-	int flags;
-	struct vnode **vpp;
+ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
 {
 	struct ext2_sb_info *fs;
 	struct inode *ip;
@@ -952,9 +924,9 @@ ext2_vget(mp, ino, flags, vpp)
 	struct buf *bp;
 	struct vnode *vp;
 	struct cdev *dev;
+	struct thread *td;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Jun 19 17:07:16 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D613106564A;
	Fri, 19 Jun 2009 17:07:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2AF508FC1A;
	Fri, 19 Jun 2009 17:07:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JH7Gf2049348;
	Fri, 19 Jun 2009 17:07:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JH7GUQ049346;
	Fri, 19 Jun 2009 17:07:16 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906191707.n5JH7GUQ049346@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 19 Jun 2009 17:07:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194496 - stable/7/share/man/man4
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 17:07:16 -0000

Author: jhb
Date: Fri Jun 19 17:07:15 2009
New Revision: 194496
URL: http://svn.freebsd.org/changeset/base/194496

Log:
  MFC: mfi(4) supports the LSI MegaRAID SAS 1078 and Dell PERC6.
  
  PR:		docs/135712

Modified:
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/igb.4   (props changed)
  stable/7/share/man/man4/mfi.4

Modified: stable/7/share/man/man4/mfi.4
==============================================================================
--- stable/7/share/man/man4/mfi.4	Fri Jun 19 16:27:41 2009	(r194495)
+++ stable/7/share/man/man4/mfi.4	Fri Jun 19 17:07:15 2009	(r194496)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 3, 2006
+.Dd January 17, 2008
 .Dt MFI 4
 .Os
 .Sh NAME
@@ -83,7 +83,11 @@ LSI MegaRAID SAS 8408E
 .It
 LSI MegaRAID SAS 8480E
 .It
-Dell PERC5/i
+LSI MegaRAID SAS 1078
+.It
+Dell PERC5
+.It
+Dell PERC6
 .El
 .Sh FILES
 .Bl -tag -width ".Pa /dev/mfid?" -compact

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Jun 19 17:54:55 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F2AB1065670;
	Fri, 19 Jun 2009 17:54:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 62D738FC15;
	Fri, 19 Jun 2009 17:54:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JHst5T051042;
	Fri, 19 Jun 2009 17:54:55 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JHstEe051041;
	Fri, 19 Jun 2009 17:54:55 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906191754.n5JHstEe051041@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 19 Jun 2009 17:54:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194500 - stable/7/share/man/man4
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 17:54:56 -0000

Author: jhb
Date: Fri Jun 19 17:54:55 2009
New Revision: 194500
URL: http://svn.freebsd.org/changeset/base/194500

Log:
  Remove mergeinfo from this file, it is a subset of the parent mergeinfo.

Modified:
  stable/7/share/man/man4/igb.4   (props changed)

From owner-svn-src-stable-7@FreeBSD.ORG  Fri Jun 19 18:18:10 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2696E1065673;
	Fri, 19 Jun 2009 18:18:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 147718FC0A;
	Fri, 19 Jun 2009 18:18:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5JII9sC051703;
	Fri, 19 Jun 2009 18:18:09 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5JII9IT051701;
	Fri, 19 Jun 2009 18:18:09 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200906191818.n5JII9IT051701@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 19 Jun 2009 18:18:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194502 - in stable/7/sys: . contrib/pf fs/cd9660
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Fri, 19 Jun 2009 18:18:10 -0000

Author: jhb
Date: Fri Jun 19 18:18:09 2009
New Revision: 194502
URL: http://svn.freebsd.org/changeset/base/194502

Log:
  MFC: Update the inline version of vn_vget_ino() for ".." lookups to match
  the recentish changes to vn_vget_ino().

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/fs/cd9660/cd9660_lookup.c

Modified: stable/7/sys/fs/cd9660/cd9660_lookup.c
==============================================================================
--- stable/7/sys/fs/cd9660/cd9660_lookup.c	Fri Jun 19 17:59:29 2009	(r194501)
+++ stable/7/sys/fs/cd9660/cd9660_lookup.c	Fri Jun 19 18:18:09 2009	(r194502)
@@ -375,15 +375,17 @@ found:
 		 */
 		mp = pdp->v_mount;
 		ltype = VOP_ISLOCKED(pdp, td);
-		for (;;) {
-			error = vfs_busy(mp, LK_NOWAIT, NULL, curthread);
-			if (error == 0)
-				break;
+		error = vfs_busy(mp, LK_NOWAIT, NULL, td);
+		if (error != 0) {
 			VOP_UNLOCK(pdp, 0, td);
-			pause("vn_vget", 1);
+			error = vfs_busy(mp, 0, NULL, td);
 			vn_lock(pdp, ltype | LK_RETRY, td);
-			if (pdp->v_iflag & VI_DOOMED)
+			if (error)
+				return (ENOENT);
+			if (pdp->v_iflag & VI_DOOMED) {
+				vfs_unbusy(mp, td);
 				return (ENOENT);
+			}
 		}
 		VOP_UNLOCK(pdp, 0, td);
 		error = cd9660_vget_internal(vdp->v_mount, i_ino,

From owner-svn-src-stable-7@FreeBSD.ORG  Sat Jun 20 08:54:04 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 364201065675;
	Sat, 20 Jun 2009 08:54:04 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 23F3F8FC0A;
	Sat, 20 Jun 2009 08:54:04 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5K8s4FY069428;
	Sat, 20 Jun 2009 08:54:04 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5K8s47A069426;
	Sat, 20 Jun 2009 08:54:04 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200906200854.n5K8s47A069426@svn.freebsd.org>
From: Edwin Groothuis 
Date: Sat, 20 Jun 2009 08:54:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r194527 - stable/7/etc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Sat, 20 Jun 2009 08:54:04 -0000

Author: edwin
Date: Sat Jun 20 08:54:03 2009
New Revision: 194527
URL: http://svn.freebsd.org/changeset/base/194527

Log:
  MFC of 194107
  
  Sync termcap.small with main termcap; add xterm entry for libteken
  
  PR:           conf/135530
  Submitted by: Alex Kozlov 

Modified:
  stable/7/etc/termcap.small   (contents, props changed)

Modified: stable/7/etc/termcap.small
==============================================================================
--- stable/7/etc/termcap.small	Sat Jun 20 08:46:40 2009	(r194526)
+++ stable/7/etc/termcap.small	Sat Jun 20 08:54:03 2009	(r194527)
@@ -71,6 +71,17 @@ cons60|ansi80x60:\
 	:li#60:tc=cons25:
 cons60-m|ansi80x60-mono:\
 	:li#60:tc=cons25-m:
+# Syscons console with 132 characters (VESA modes)
+cons25-w|ansi132x25:\
+	:co#132:tc=cons25:
+cons30-w|ansi132x30:\
+	:co#132:tc=cons30:
+cons43-w|ansi132x43:\
+	:co#132:tc=cons43:
+cons50-w|ansil-w|ansi132x50:\
+	:co#132:tc=cons50:
+cons60-w|ansi132x60:\
+	:co#132:tc=cons60:
 # KOI8-R/KOI8-U FreeBSD console with ACS support
 cons25r|cons25u|pc3r|ibmpc3r|cons25-koi8:\
 	:ac=q\200x\201m\204v\211j\205t\206n\212u\207l\202w\210k\203y\230z\231f\234~\225a\220h\2210\215:\
@@ -93,6 +104,28 @@ cons60r|cons60u|cons60-koi8:\
 	:li#60:tc=cons25r:
 cons60r-m|cons60u-m|cons60-koi8-mono:\
 	:li#60:tc=cons25r-m:
+# Syscons console with 90 characters (VGA modes)
+# KOI8-R/KOI8-U FreeBSD console with ACS support.
+cons25r-v|cons25u-v|pc3r-v|ibmpc3r-vga|cons25-koi8-vga:\
+	:co#90:tc=cons25r:
+cons25r-mv|cons25u-mv|pc3r-mv|ibmpc3r-monovga|cons25-koi8-monovga:\
+	:co#90:tc=cons25r-m:
+cons30r-v|cons30u-v|cons30-koi8-vga:\
+	:co#90:tc=cons30r:
+cons30r-mv|cons30u-mv|cons30-koi8-monovga:\
+	:co#90:tc=cons30r-m:
+cons43r-v|cons43u-v|cons43-koi8-vga:\
+	:co#90:tc=cons43r:
+cons43r-mv|cons43u-mv|cons43-koi8-monovga:\
+	:co#90:tc=cons43r-m:
+cons50r-v|cons50u-v|cons50-koi8-vga:\
+	:co#90:tc=cons50r:
+cons50r-mv|cons50u-mv|cons50-koi8-monovga:\
+	:co#90:tc=cons50r-m:
+cons60r-v|cons60u-v|cons60-koi8-vga:\
+	:co#90:tc=cons60r:
+cons60r-mv|cons60u-mv|cons60-koi8-monovga:\
+	:co#90:tc=cons60r-m:
 # ISO 8859-2 FreeBSD console with ACS support
 cons25l2|cons25-iso8859-2:\
 	:ac=f\260i\247:\
@@ -137,6 +170,17 @@ cons60l1|cons60-iso8859-1:\
 	:li#60:tc=cons25l1:
 cons60l1-m|cons60-iso8859-1-mono:\
 	:li#60:tc=cons25l1-m:
+# 132x25 ISO 8859-1 FreeBSD console
+cons25l1-w|:cons25w-iso8859-1:\
+	:co#132:tc=cons25l1:
+cons30l1-w|cons30w-iso8859-1:\
+	:co#132:tc=cons30l1:
+cons43l1-w|cons43w-iso8859-1:\
+	:co#132:tc=cons43l1:
+cons50l1-w|cons50w-iso8859-1:\
+	:co#132:tc=cons50l1:
+cons60l1-w|cons60w-iso8859-1:\
+	:co#132:tc=cons60l1:
 # ISO 8859-7 FreeBSD console with ACS support
 cons25l7|cons25-iso8859-7:\
 	:ac=f\260g\261{\360}\243+\253,\273i\247:\
@@ -180,8 +224,6 @@ pc|ibmpc|ibm pc PC/IX:\
 	:li#24:co#80:am:bs:bw:eo:\
 	:cd=\E[J:ce=\E[K:cl=\Ec:cm=\E[%i%2;%2H:do=\E[B:ho=\E[;H:\
 	:nd=\E[C:up=\E[A:so=\E[7m:se=\E[0m:us=\E[4m:ue=\E[0m:
-pc3mono|IBM PC 386BSD Console with monochrome monitor:\
-	:so=\E[0;1r\E[m:tc=pc3:
 pc3|ibmpc3|IBM PC 386BSD Console:\
 	:Co#8:\
 	:DO=\E[%dB:\
@@ -194,10 +236,10 @@ pc3|ibmpc3|IBM PC 386BSD Console:\
 	:K5=\E[G:\
 	:LE=\E[%dD:\
 	:RI=\E[%dC:\
-	:Sb=\E[1;%dx:\
-	:Sf=\E[2;%dx:\
+	:AB=\E[1;%dx:\
+	:AF=\E[2;%dx:\
 	:UP=\E[%dA:\
-	:ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261I^U0\333y\363z\362:\
+	:ac=l\332m\300k\277j\331u\264t\303v\301w\302q\304x\263n\305`^Da\260f\370g\361~\371.^Y-^Xh\261i^U0\333y\363z\362:\
 	:am:\
 	:bl=^G:\
 	:bs:\
@@ -248,3 +290,33 @@ pc3|ibmpc3|IBM PC 386BSD Console:\
 	:ti=\E[m:\
 	:up=\E[A:\
 	:ut:
+
+# $XFree86: xc/programs/xterm/termcap,v 3.28 2001/01/17 23:46:39 dawes Exp $
+#
+xterm-xfree86|XFree86 xterm:\
+	:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\
+	:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:\
+	:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
+	:@7=\EOF:@8=\EOM:kI=\E[2~:\
+	:kh=\EOH:kP=\E[5~:kN=\E[6~:\
+	:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:Km=\E[M:tc=xterm-basic:
+#
+# This chunk is used for building the VT220/Sun/PC keyboard variants.
+xterm-basic|xterm common (XFree86):\
+	:li#24:co#80:am:kn#12:km:mi:ms:xn:AX:bl=^G:\
+	:is=\E[!p\E[?3;4l\E[4l\E>:rs=\E[!p\E[?3;4l\E[4l\E>:le=^H:\
+	:AL=\E[%dL:DL=\E[%dM:DC=\E[%dP:al=\E[L:dc=\E[P:dl=\E[M:\
+	:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:\
+	:ho=\E[H:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cs=\E[%i%d;%dr:\
+	:im=\E[4h:ei=\E[4l:ks=\E[?1h\E=:ke=\E[?1l\E>:kD=\E[3~:kb=^H:\
+	:sf=\n:sr=\EM:st=\EH:ct=\E[3g:sc=\E7:rc=\E8:\
+	:eA=\E(B\E)0:as=\E(0:ae=\E(B:ml=\El:mu=\Em:up=\E[A:nd=\E[C:\
+	:md=\E[1m:me=\E[m:mr=\E[7m:so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\
+	:ti=\E[?1049h:te=\E[?1049l:vi=\E[?25l:ve=\E[?25h:\
+	:ut:Co#8:pa#64:op=\E[39;49m:AB=\E[4%dm:AF=\E[3%dm:\
+#
+# This is the only entry which you should have to customize, since "xterm"
+# is widely used for a variety of incompatible terminal emulations including
+# color_xterm and rxvt.
+xterm|xterm-color|X11 terminal emulator:\
+	:ti@:te@:tc=xterm-xfree86: