From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:14:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E487106566B; Sun, 2 May 2010 06:14:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5D0138FC13; Sun, 2 May 2010 06:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426EaXd067657; Sun, 2 May 2010 06:14:36 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426EaXY067653; Sun, 2 May 2010 06:14:36 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020614.o426EaXY067653@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207491 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:14:36 -0000 Author: imp Date: Sun May 2 06:14:36 2010 New Revision: 207491 URL: http://svn.freebsd.org/changeset/base/207491 Log: MFC r207260: Move checking the version up from Makefile generation to just after we've parsed the config file. Makefile generation is too late if we've introduce changes to the syntax of the metafiles to warn about version skew, since we have to try to parse them and we get an parse error that's rather baffling to the user rather than a 'your config is too old, upgrade' which we should get. We have to defer doing it until after we've read the user's config file because we define machinename there. The version required to compile the kernel is encoded in Makefile.machinename. There's no real reason for this to be the case, but changing it now would introduce some logistical issues that I'd rather avoid for the moment. I intend to revisit this if we're still using config in FreeBSD 10. This also means that we cannot introduce any config metafile changes that result in a syntax error or other error for the user until 9.0 is released. Otherwise, we break the upgrade path, or at least reduce the usefulness of the error messages we generate. # This implies that the config file option mapping will need to be redone. Modified: stable/8/usr.sbin/config/config.h stable/8/usr.sbin/config/main.c stable/8/usr.sbin/config/mkmakefile.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/config.h ============================================================================== --- stable/8/usr.sbin/config/config.h Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/config.h Sun May 2 06:14:36 2010 (r207491) @@ -179,6 +179,7 @@ void makehints(void); void headers(void); void cfgfile_add(const char *); void cfgfile_removeall(void); +FILE *open_makefile_template(void); extern STAILQ_HEAD(device_head, device) dtab; Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/main.c Sun May 2 06:14:36 2010 (r207491) @@ -90,6 +90,7 @@ static void get_srcdir(void); static void usage(void); static void cleanheaders(char *); static void kernconfdump(const char *); +static void checkversion(void); struct hdr_list { char *h_name; @@ -204,6 +205,7 @@ main(int argc, char **argv) printf("cpu type must be specified\n"); exit(1); } + checkversion(); /* * make symbolic links in compilation directory @@ -721,3 +723,41 @@ kernconfdump(const char *file) } fclose(fp); } + +static void +badversion(int versreq) +{ + fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); + fprintf(stderr, "config version = %d, ", CONFIGVERS); + fprintf(stderr, "version required = %d\n\n", versreq); + fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); + fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); + fprintf(stderr, "before trying this again.\n\n"); + fprintf(stderr, "If running the new config fails check your config\n"); + fprintf(stderr, "file against the GENERIC or LINT config files for\n"); + fprintf(stderr, "changes in config syntax, or option/device naming\n"); + fprintf(stderr, "conventions\n\n"); + exit(1); +} + +static void +checkversion(void) +{ + FILE *ifp; + char line[BUFSIZ]; + int versreq; + + ifp = open_makefile_template(); + while (fgets(line, BUFSIZ, ifp) != 0) { + if (*line != '%') + continue; + if (strncmp(line, "%VERSREQ=", 9) != 0) + continue; + versreq = atoi(line + 9); + if (MAJOR_VERS(versreq) == MAJOR_VERS(CONFIGVERS) && + versreq <= CONFIGVERS) + continue; + badversion(versreq); + } + fclose(ifp); +} Modified: stable/8/usr.sbin/config/mkmakefile.c ============================================================================== --- stable/8/usr.sbin/config/mkmakefile.c Sun May 2 04:16:39 2010 (r207490) +++ stable/8/usr.sbin/config/mkmakefile.c Sun May 2 06:14:36 2010 (r207491) @@ -105,17 +105,14 @@ new_fent(void) } /* - * Build the makefile from the skeleton + * Open the correct Makefile and return it, or error out. */ -void -makefile(void) +FILE * +open_makefile_template(void) { - FILE *ifp, *ofp; + FILE *ifp; char line[BUFSIZ]; - struct opt *op, *t; - int versreq; - read_files(); snprintf(line, sizeof(line), "../../conf/Makefile.%s", machinename); ifp = fopen(line, "r"); if (ifp == 0) { @@ -124,7 +121,21 @@ makefile(void) } if (ifp == 0) err(1, "%s", line); + return (ifp); +} +/* + * Build the makefile from the skeleton + */ +void +makefile(void) +{ + FILE *ifp, *ofp; + char line[BUFSIZ]; + struct opt *op, *t; + + read_files(); + ifp = open_makefile_template(); ofp = fopen(path("Makefile.new"), "w"); if (ofp == 0) err(1, "%s", path("Makefile.new")); @@ -156,23 +167,9 @@ makefile(void) do_rules(ofp); else if (eq(line, "%CLEAN\n")) do_clean(ofp); - else if (strncmp(line, "%VERSREQ=", sizeof("%VERSREQ=") - 1) == 0) { - versreq = atoi(line + sizeof("%VERSREQ=") - 1); - if (MAJOR_VERS(versreq) != MAJOR_VERS(CONFIGVERS) || - versreq > CONFIGVERS) { - fprintf(stderr, "ERROR: version of config(8) does not match kernel!\n"); - fprintf(stderr, "config version = %d, ", CONFIGVERS); - fprintf(stderr, "version required = %d\n\n", versreq); - fprintf(stderr, "Make sure that /usr/src/usr.sbin/config is in sync\n"); - fprintf(stderr, "with your /usr/src/sys and install a new config binary\n"); - fprintf(stderr, "before trying this again.\n\n"); - fprintf(stderr, "If running the new config fails check your config\n"); - fprintf(stderr, "file against the GENERIC or LINT config files for\n"); - fprintf(stderr, "changes in config syntax, or option/device naming\n"); - fprintf(stderr, "conventions\n\n"); - exit(1); - } - } else + else if (strncmp(line, "%VERSREQ=", 9) == 0) + line[0] = '\0'; /* handled elsewhere */ + else fprintf(stderr, "Unknown %% construct in generic makefile: %s", line); From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:18:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81CE4106566C; Sun, 2 May 2010 06:18:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 706DE8FC15; Sun, 2 May 2010 06:18:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426I8KR068503; Sun, 2 May 2010 06:18:08 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426I8BH068500; Sun, 2 May 2010 06:18:08 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020618.o426I8BH068500@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207492 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:18:08 -0000 Author: imp Date: Sun May 2 06:18:08 2010 New Revision: 207492 URL: http://svn.freebsd.org/changeset/base/207492 Log: MFC r207263: Redo how we add compat options so as to be compatible with old versions of config. Remove support for the syntax OLD = NEW form the options file, and instead have a new file $S/conf/options-compat. This file will be parsed as OLD NEW on each line. Bump version of config. Since nothing in -current ever used this, there's no hazards for current users, so I'm not bumping the version in the Makefiles.$MACHINE. No need, really, for this version bump in -current, but this was introduced into -stable before I realized the version check was ineffective there, so the verison bump doesn't hurt here and keeps the two branches in sync, versionwise, after the MFC. Modified: stable/8/usr.sbin/config/configvers.h stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/configvers.h ============================================================================== --- stable/8/usr.sbin/config/configvers.h Sun May 2 06:14:36 2010 (r207491) +++ stable/8/usr.sbin/config/configvers.h Sun May 2 06:18:08 2010 (r207492) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600008 +#define CONFIGVERS 600009 #define MAJOR_VERS(x) ((x) / 100000) Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:14:36 2010 (r207491) +++ stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:08 2010 (r207492) @@ -166,7 +166,7 @@ do_option(char *name) fprintf(outf, "#define %s %s\n", name, value); } /* else empty file */ - (void) fclose(outf); + (void)fclose(outf); return; } basefile = ""; @@ -225,7 +225,7 @@ do_option(char *name) if (cp == (char *)EOF) break; } - (void) fclose(inf); + (void)fclose(inf); if (!tidy && ((value == NULL && oldvalue == NULL) || (value && oldvalue && eq(value, oldvalue)))) { while (!SLIST_EMPTY(&op_head)) { @@ -263,7 +263,7 @@ do_option(char *name) free(op->op_value); free(op); } - (void) fclose(outf); + (void)fclose(outf); } /* @@ -277,7 +277,7 @@ tooption(char *name) struct opt_list *po; /* "cannot happen"? the otab list should be complete.. */ - (void) strlcpy(nbuf, "options.h", sizeof(nbuf)); + (void)strlcpy(nbuf, "options.h", sizeof(nbuf)); SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, name)) { @@ -286,78 +286,30 @@ tooption(char *name) } } - (void) strlcpy(hbuf, path(nbuf), sizeof(hbuf)); + (void)strlcpy(hbuf, path(nbuf), sizeof(hbuf)); return (hbuf); } -/* - * read the options and options. files - */ + static void -read_options(void) +insert_option(char *this, char *val, int flags) { - FILE *fp; - char fname[MAXPATHLEN]; - char *wd, *this, *val; struct opt_list *po; - int first = 1; - char genopt[MAXPATHLEN]; - int flags = 0; - SLIST_INIT(&otab); - (void) snprintf(fname, sizeof(fname), "../../conf/options"); -openit: - fp = fopen(fname, "r"); - if (fp == 0) { - return; - } -next: - flags = 0; - wd = get_word(fp); - if (wd == (char *)EOF) { - (void) fclose(fp); - if (first == 1) { - first++; - (void) snprintf(fname, sizeof fname, "../../conf/options.%s", machinename); - fp = fopen(fname, "r"); - if (fp != 0) - goto next; - (void) snprintf(fname, sizeof fname, "options.%s", machinename); - goto openit; - } - return; - } - if (wd == 0) - goto next; - if (wd[0] == '#') - { - while (((wd = get_word(fp)) != (char *)EOF) && wd) - ; - goto next; - } - this = ns(wd); - val = get_word(fp); - if (val == (char *)EOF) - return; - if (val == 0) { - char *s = ns(this); - (void) snprintf(genopt, sizeof(genopt), "opt_%s.h", lower(s)); - val = genopt; - free(s); - } else if (eq(val, "=")) { - val = get_word(fp); - if (val == (char *)EOF) { - printf("%s: unexpected end of file\n", fname); - exit(1); - } - if (val == 0) { - printf("%s: Expected a right hand side at %s\n", fname, - this); - exit(1); - } - flags |= OL_ALIAS; - } - val = ns(val); + po = (struct opt_list *) calloc(1, sizeof *po); + if (po == NULL) + err(EXIT_FAILURE, "calloc"); + po->o_name = this; + po->o_file = val; + po->o_flags = flags; + SLIST_INSERT_HEAD(&otab, po, o_next); +} + + +static void +check_duplicate(const char *fname, const char *this) +{ + struct opt_list *po; SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { @@ -366,16 +318,67 @@ next: exit(1); } } - - po = (struct opt_list *) calloc(1, sizeof *po); - if (po == NULL) - err(EXIT_FAILURE, "calloc"); - po->o_name = this; - po->o_file = val; - po->o_flags = flags; - SLIST_INSERT_HEAD(&otab, po, o_next); +} + +static int +read_option_file(const char *fname, int flags) +{ + FILE *fp; + char *wd, *this, *val; + char genopt[MAXPATHLEN]; - goto next; + fp = fopen(fname, "r"); + if (fp == 0) + return (0); + while ((wd = get_word(fp)) != (char *)EOF) { + if (wd == 0) + continue; + if (wd[0] == '#') { + while (((wd = get_word(fp)) != (char *)EOF) && wd) + continue; + continue; + } + this = ns(wd); + val = get_word(fp); + if (val == (char *)EOF) + return (1); + if (val == 0) { + if (flags) { + printf("%s: compat file requires two words " + "per line at %s\n", fname, this); + exit(1); + } + char *s = ns(this); + (void)snprintf(genopt, sizeof(genopt), "opt_%s.h", + lower(s)); + val = genopt; + free(s); + } + val = ns(val); + check_duplicate(fname, this); + insert_option(this, val, flags); + } + (void)fclose(fp); + return (1); +} + +/* + * read the options and options. files + */ +static void +read_options(void) +{ + char fname[MAXPATHLEN]; + + SLIST_INIT(&otab); + read_option_file("../../conf/options", 0); + (void)snprintf(fname, sizeof fname, "../../conf/options.%s", + machinename); + if (!read_option_file(fname, 0)) { + (void)snprintf(fname, sizeof fname, "options.%s", machinename); + read_option_file(fname, 0); + } + read_option_file("../../conf/options-compat", OL_ALIAS); } static char * From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:18:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 194B3106566B; Sun, 2 May 2010 06:18:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E39A88FC0C; Sun, 2 May 2010 06:18:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426Ivb9068713; Sun, 2 May 2010 06:18:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426Ivm7068711; Sun, 2 May 2010 06:18:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020618.o426Ivm7068711@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207493 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:18:58 -0000 Author: imp Date: Sun May 2 06:18:57 2010 New Revision: 207493 URL: http://svn.freebsd.org/changeset/base/207493 Log: MFC r207265: Require the option that's mapped be listed in the options file. This will allow people with old config options to either have it just work (if config is new enough), or get a version error (if their config is about 7.0 or newer) rather than getting a cryptic error about duplicated options in the options file, or getting an error about an unknown option, at which point they'd update their config file only to learn they need a new config, only to learn they didn't really need to update their config file... All this because our version checking was in the wrong place for the past decade... # hopefully this is the last change, and we'll be able to config with an # 8.0 GENERIC file on stable/8 after I merge this change and add the # compat options. Modified: stable/8/usr.sbin/config/mkoptions.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/mkoptions.c ============================================================================== --- stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:08 2010 (r207492) +++ stable/8/usr.sbin/config/mkoptions.c Sun May 2 06:18:57 2010 (r207493) @@ -292,32 +292,49 @@ tooption(char *name) static void -insert_option(char *this, char *val, int flags) +check_duplicate(const char *fname, const char *this) { struct opt_list *po; + SLIST_FOREACH(po, &otab, o_next) { + if (eq(po->o_name, this)) { + printf("%s: Duplicate option %s.\n", + fname, this); + exit(1); + } + } +} + +static void +insert_option(const char *fname, char *this, char *val) +{ + struct opt_list *po; + + check_duplicate(fname, this); po = (struct opt_list *) calloc(1, sizeof *po); if (po == NULL) err(EXIT_FAILURE, "calloc"); po->o_name = this; po->o_file = val; - po->o_flags = flags; + po->o_flags = 0; SLIST_INSERT_HEAD(&otab, po, o_next); } - static void -check_duplicate(const char *fname, const char *this) +update_option(const char *this, char *val, int flags) { struct opt_list *po; SLIST_FOREACH(po, &otab, o_next) { if (eq(po->o_name, this)) { - printf("%s: Duplicate option %s.\n", - fname, this); - exit(1); + free(po->o_file); + po->o_file = val; + po->o_flags = flags; + return; } } + printf("Compat option %s not listed in options file.\n", this); + exit(1); } static int @@ -355,8 +372,10 @@ read_option_file(const char *fname, int free(s); } val = ns(val); - check_duplicate(fname, this); - insert_option(this, val, flags); + if (flags == 0) + insert_option(fname, this, val); + else + update_option(this, val, flags); } (void)fclose(fp); return (1); From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:20:42 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72359106566C; Sun, 2 May 2010 06:20:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 617418FC0C; Sun, 2 May 2010 06:20:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426KgT3069149; Sun, 2 May 2010 06:20:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426Kg0a069143; Sun, 2 May 2010 06:20:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020620.o426Kg0a069143@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207494 - in stable/8/sys: amd64/conf conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:20:42 -0000 Author: imp Date: Sun May 2 06:20:42 2010 New Revision: 207494 URL: http://svn.freebsd.org/changeset/base/207494 Log: Move to the new way of specifying compat options. The backs out the FOO = BAR form, in favor of listing the mapping in a separate file for more compatibility with older versions of config. Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/conf/Makefile.amd64 stable/8/sys/conf/Makefile.ia64 stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.ia64 Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/amd64/conf/GENERIC Sun May 2 06:20:42 2010 (r207494) @@ -54,7 +54,8 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_FREEBSD32 # Compatible with i386 binaries +#options COMPAT_FREEBSD32 # Compatible with i386 binaries +options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 Modified: stable/8/sys/conf/Makefile.amd64 ============================================================================== --- stable/8/sys/conf/Makefile.amd64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/Makefile.amd64 Sun May 2 06:20:42 2010 (r207494) @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600009 STD8X16FONT?= iso Modified: stable/8/sys/conf/Makefile.ia64 ============================================================================== --- stable/8/sys/conf/Makefile.ia64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/Makefile.ia64 Sun May 2 06:20:42 2010 (r207494) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600004 +%VERSREQ= 600008 STD8X16FONT?= iso Modified: stable/8/sys/conf/options.amd64 ============================================================================== --- stable/8/sys/conf/options.amd64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/options.amd64 Sun May 2 06:20:42 2010 (r207494) @@ -11,7 +11,7 @@ MP_WATCHDOG # Options for emulators. These should only be used at config time, so # they are handled like options for static filesystems # (see src/sys/conf/options), except for broken debugging options. -COMPAT_IA32 = COMPAT_FREEBSD32 +COMPAT_IA32 opt_dontuse.h COMPAT_FREEBSD32 opt_compat.h #IBCS2 opt_dontuse.h #COMPAT_LINUX opt_dontuse.h Modified: stable/8/sys/conf/options.ia64 ============================================================================== --- stable/8/sys/conf/options.ia64 Sun May 2 06:18:57 2010 (r207493) +++ stable/8/sys/conf/options.ia64 Sun May 2 06:20:42 2010 (r207494) @@ -9,7 +9,7 @@ LOG2_PAGE_SIZE opt_global.h UWX_TRACE_ENABLE opt_global.h -COMPAT_IA32 = COMPAT_FREEBSD32 +COMPAT_IA32 opt_dontuse.h COMPAT_FREEBSD32 opt_compat.h EXCEPTION_TRACING opt_xtrace.h From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:23:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 075301065673; Sun, 2 May 2010 06:23:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D235B8FC0C; Sun, 2 May 2010 06:23:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426NFCm069763; Sun, 2 May 2010 06:23:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426NFAs069761; Sun, 2 May 2010 06:23:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020623.o426NFAs069761@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207495 - stable/8/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:23:16 -0000 Author: imp Date: Sun May 2 06:23:15 2010 New Revision: 207495 URL: http://svn.freebsd.org/changeset/base/207495 Log: Ooops. Bump the version to 600009, not 600008. Modified: stable/8/sys/conf/Makefile.ia64 Modified: stable/8/sys/conf/Makefile.ia64 ============================================================================== --- stable/8/sys/conf/Makefile.ia64 Sun May 2 06:20:42 2010 (r207494) +++ stable/8/sys/conf/Makefile.ia64 Sun May 2 06:23:15 2010 (r207495) @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 600008 +%VERSREQ= 600009 STD8X16FONT?= iso From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:24:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 069E51065688; Sun, 2 May 2010 06:24:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EAC418FC0A; Sun, 2 May 2010 06:24:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426OHXh070038; Sun, 2 May 2010 06:24:17 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426OHwx070036; Sun, 2 May 2010 06:24:17 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020624.o426OHwx070036@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207496 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:24:18 -0000 Author: imp Date: Sun May 2 06:24:17 2010 New Revision: 207496 URL: http://svn.freebsd.org/changeset/base/207496 Log: Revert 207494: it was only for testing purposes. Modified: stable/8/sys/amd64/conf/GENERIC Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Sun May 2 06:23:15 2010 (r207495) +++ stable/8/sys/amd64/conf/GENERIC Sun May 2 06:24:17 2010 (r207496) @@ -54,8 +54,7 @@ options PSEUDOFS # Pseudo-filesystem f options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -#options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_IA32 # Compatible with i386 binaries +options COMPAT_FREEBSD32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 06:34:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55225106564A; Sun, 2 May 2010 06:34:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44A058FC0A; Sun, 2 May 2010 06:34:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o426YDrg072239; Sun, 2 May 2010 06:34:13 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o426YDLB072237; Sun, 2 May 2010 06:34:13 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005020634.o426YDLB072237@svn.freebsd.org> From: Warner Losh Date: Sun, 2 May 2010 06:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207497 - stable/8 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 06:34:13 -0000 Author: imp Date: Sun May 2 06:34:13 2010 New Revision: 207497 URL: http://svn.freebsd.org/changeset/base/207497 Log: Comment on new config version that's now required for amd64 and ia64. Comment on the confusing error message from Apr 17th-May 2nd generated by config(8) as well. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Sun May 2 06:24:17 2010 (r207496) +++ stable/8/UPDATING Sun May 2 06:34:13 2010 (r207497) @@ -15,6 +15,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20100502: + The config(8) command has been updated to maintain compatibility + with config files from 8.0-RELEASE. You will need a new version + of config to build kernels (this version can be used from 8.0-RELEASE + forward). The buildworld target will generate it, so following + the instructions in this file for updating will work glitch-free. + Merely doing a make buildkernel without first doing a make buildworld + (or kernel-toolchain), or attempting to build a kernel using + traidtional methods will generate a config version warning, indicating + you should update. + 20100408: The rc.firewall and rc.firewall6 were unified, and rc.firewall6 and rc.d/ip6fw were removed. @@ -28,6 +39,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. The meanings correspond to the relevant IPv4 variables. +20100417: + COMPAT_IA32 has been added as an alias for COMPAT_FREEBDS32. A new + version of config(8) is required. The error message when you hit this + condition is confusing (COMPAT_FREEBSD32 duplicate option), when it + should really say "your config is too old to compile this new kernel." + 20100406: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:38:59 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7EC7106564A; Sun, 2 May 2010 12:38:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B74F48FC12; Sun, 2 May 2010 12:38:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CcxXe059981; Sun, 2 May 2010 12:38:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CcxLL059979; Sun, 2 May 2010 12:38:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021238.o42CcxLL059979@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 12:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207501 - stable/8/lib/libkvm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:38:59 -0000 Author: jilles Date: Sun May 2 12:38:59 2010 New Revision: 207501 URL: http://svn.freebsd.org/changeset/base/207501 Log: MFC r207187: kvm(3): Mention that some of the functions use sysctl(3) instead of kmem. Additionally, because of sysctl(3) use (which is generally good), behaviour for crash dumps differs slightly from behaviour for live kernels and this will probably never be fixed entirely, so weaken that claim. Modified: stable/8/lib/libkvm/kvm.3 Directory Properties: stable/8/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/kvm.3 ============================================================================== --- stable/8/lib/libkvm/kvm.3 Sun May 2 12:08:15 2010 (r207500) +++ stable/8/lib/libkvm/kvm.3 Sun May 2 12:38:59 2010 (r207501) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 29, 2004 +.Dd April 25, 2010 .Dt KVM 3 .Os .Sh NAME @@ -46,12 +46,15 @@ The library provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. Access to live systems is via +.Xr sysctl 3 +for some functions, and .Xr mem 4 and .Xr kmem 4 +for other functions, while crash dumps can be examined via the core file generated by .Xr savecore 8 . -The interface behaves identically in both cases. +The interface behaves similarly in both cases. Memory can be read and written, kernel symbol addresses can be looked up efficiently, and information about user processes can be gathered. @@ -112,5 +115,6 @@ given descriptor. .Xr kvm_openfiles 3 , .Xr kvm_read 3 , .Xr kvm_write 3 , +.Xr sysctl 3 , .Xr kmem 4 , .Xr mem 4 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:39:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7200D1065740; Sun, 2 May 2010 12:39:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 61B098FC16; Sun, 2 May 2010 12:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CdTL1060117; Sun, 2 May 2010 12:39:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CdTXn060115; Sun, 2 May 2010 12:39:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021239.o42CdTXn060115@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207502 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:39:29 -0000 Author: mav Date: Sun May 2 12:39:29 2010 New Revision: 207502 URL: http://svn.freebsd.org/changeset/base/207502 Log: MFC r206604: For early ALI chips do not announce I/O sizes that require unsupported 48bit DMA commands. Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun May 2 12:38:59 2010 (r207501) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun May 2 12:39:29 2010 (r207502) @@ -184,8 +184,11 @@ ata_ali_ch_attach(device_t dev) if (ctlr->chip->cfg2 & ALI_NEW && ctlr->chip->chiprev < 0xc7) ch->flags |= ATA_CHECKS_CABLE; /* older chips can't do 48bit DMA transfers */ - if (ctlr->chip->chiprev <= 0xc4) + if (ctlr->chip->chiprev <= 0xc4) { ch->flags |= ATA_NO_48BIT_DMA; + if (ch->dma.max_iosize > 256 * 512) + ch->dma.max_iosize = 256 * 512; + } return 0; } From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:40:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C4924106566C; Sun, 2 May 2010 12:40:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B43E08FC0A; Sun, 2 May 2010 12:40:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CesFd060474; Sun, 2 May 2010 12:40:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CesMe060472; Sun, 2 May 2010 12:40:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021240.o42CesMe060472@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207503 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:40:54 -0000 Author: mav Date: Sun May 2 12:40:54 2010 New Revision: 207503 URL: http://svn.freebsd.org/changeset/base/207503 Log: MFC r207221: Mark ATA channel as idle on timeout in non-ATA_CAM mode. This should fix possible duplicate request completion. Modified: stable/8/sys/dev/ata/ata-queue.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/ata-queue.c ============================================================================== --- stable/8/sys/dev/ata/ata-queue.c Sun May 2 12:39:29 2010 (r207502) +++ stable/8/sys/dev/ata/ata-queue.c Sun May 2 12:40:54 2010 (r207503) @@ -513,9 +513,9 @@ ata_timeout(struct ata_request *request) request->flags |= ATA_R_TIMEOUT; if (ch->dma.unload) ch->dma.unload(request); -#ifdef ATA_CAM ch->running = NULL; ch->state = ATA_IDLE; +#ifdef ATA_CAM ata_cam_end_transaction(ch->dev, request); #endif mtx_unlock(&ch->state_mtx); From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:43:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 592301065672; Sun, 2 May 2010 12:43:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 485498FC14; Sun, 2 May 2010 12:43:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42ChIEu061071; Sun, 2 May 2010 12:43:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42ChIJc061069; Sun, 2 May 2010 12:43:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021243.o42ChIJc061069@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 12:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207504 - stable/8/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:43:18 -0000 Author: jilles Date: Sun May 2 12:43:18 2010 New Revision: 207504 URL: http://svn.freebsd.org/changeset/base/207504 Log: MFC r207188: symlink(7): The ownership of symlinks is used by the system, in at least three ways, so do not say it is ignored: * who may delete/rename a symlink in a sticky directory * who may do lchflags(2)/lchown(2)/lchmod(2) * whose inode quota is charged Modified: stable/8/bin/ln/symlink.7 Directory Properties: stable/8/bin/ln/ (props changed) Modified: stable/8/bin/ln/symlink.7 ============================================================================== --- stable/8/bin/ln/symlink.7 Sun May 2 12:40:54 2010 (r207503) +++ stable/8/bin/ln/symlink.7 Sun May 2 12:43:18 2010 (r207504) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd March 31, 1994 +.Dd April 25, 2010 .Dt SYMLINK 7 .Os .Sh NAME @@ -138,8 +138,8 @@ an existing symbolic link can be changed and .Xr lutimes 2 system calls, respectively. -Of these, only the flags are used by the system; -the access permissions and ownership are ignored. +Of these, only the flags and ownership are used by the system; +the access permissions are ignored. .Pp The .Bx 4.4 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:44:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0CBB1065740; Sun, 2 May 2010 12:44:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 908718FC17; Sun, 2 May 2010 12:44:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CiBit061342; Sun, 2 May 2010 12:44:11 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CiBtm061340; Sun, 2 May 2010 12:44:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021244.o42CiBtm061340@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207505 - stable/8/sys/dev/siis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:44:11 -0000 Author: mav Date: Sun May 2 12:44:11 2010 New Revision: 207505 URL: http://svn.freebsd.org/changeset/base/207505 Log: MFC r205358: Enable MSI by default for SiI3124. Modified: stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun May 2 12:43:18 2010 (r207504) +++ stable/8/sys/dev/siis/siis.c Sun May 2 12:44:11 2010 (r207505) @@ -94,14 +94,15 @@ static struct { int ports; int quirks; #define SIIS_Q_SNTF 1 +#define SIIS_Q_NOMSI 2 } siis_ids[] = { {0x31241095, "SiI3124", 4, 0}, {0x31248086, "SiI3124", 4, 0}, - {0x31321095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02421095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x02441095, "SiI3132", 2, SIIS_Q_SNTF}, - {0x31311095, "SiI3131", 1, SIIS_Q_SNTF}, - {0x35311095, "SiI3531", 1, SIIS_Q_SNTF}, + {0x31321095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02421095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x02441095, "SiI3132", 2, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x31311095, "SiI3131", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, + {0x35311095, "SiI3531", 1, SIIS_Q_SNTF|SIIS_Q_NOMSI}, {0, NULL, 0, 0} }; @@ -249,7 +250,7 @@ static int siis_setup_interrupt(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - int msi = 0; + int msi = ctlr->quirks & SIIS_Q_NOMSI ? 0 : 1; /* Process hints. */ resource_int_value(device_get_name(dev), From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:45:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C1851065674; Sun, 2 May 2010 12:45:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDCD8FC0C; Sun, 2 May 2010 12:45:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CjN7j061662; Sun, 2 May 2010 12:45:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CjNp7061660; Sun, 2 May 2010 12:45:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021245.o42CjNp7061660@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207506 - stable/8/sys/dev/siis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:45:23 -0000 Author: mav Date: Sun May 2 12:45:22 2010 New Revision: 207506 URL: http://svn.freebsd.org/changeset/base/207506 Log: MFC r206652: Explicitly enable PCI busmastering on attach. Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100). Modified: stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sun May 2 12:44:11 2010 (r207505) +++ stable/8/sys/dev/siis/siis.c Sun May 2 12:45:22 2010 (r207506) @@ -164,6 +164,7 @@ siis_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } + pci_enable_busmaster(dev); /* Reset controller */ siis_resume(dev); /* Number of HW channels */ From owner-svn-src-stable@FreeBSD.ORG Sun May 2 12:50:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D37B3106564A; Sun, 2 May 2010 12:50:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C2D598FC13; Sun, 2 May 2010 12:50:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42CoTgY062919; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42CoTjn062916; Sun, 2 May 2010 12:50:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005021250.o42CoTjn062916@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 May 2010 12:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207507 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 12:50:30 -0000 Author: mav Date: Sun May 2 12:50:29 2010 New Revision: 207507 URL: http://svn.freebsd.org/changeset/base/207507 Log: MFC r207222: Move PI_TAG_ABLE check from ada driver to ATA XPT. Modified: stable/8/sys/cam/ata/ata_da.c stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_da.c ============================================================================== --- stable/8/sys/cam/ata/ata_da.c Sun May 2 12:45:22 2010 (r207506) +++ stable/8/sys/cam/ata/ata_da.c Sun May 2 12:50:29 2010 (r207507) @@ -686,14 +686,10 @@ adaregister(struct cam_periph *periph, v else softc->quirks = ADA_Q_NONE; - /* Check if the SIM does not want queued commands */ bzero(&cpi, sizeof(cpi)); xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); - if (cpi.ccb_h.status != CAM_REQ_CMP || - (cpi.hba_inquiry & PI_TAG_ABLE) == 0) - softc->flags &= ~ADA_FLAG_CAN_NCQ; TASK_INIT(&softc->sysctl_task, 0, adasysctlinit, periph); Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun May 2 12:45:22 2010 (r207506) +++ stable/8/sys/cam/ata/ata_xpt.c Sun May 2 12:50:29 2010 (r207507) @@ -766,6 +766,7 @@ noerror: } case PROBE_IDENTIFY: { + struct ccb_pathinq cpi; int16_t *ptr; ident_buf = &softc->ident_data; @@ -840,16 +841,24 @@ noerror: ata_find_quirk(path->device); if (path->device->mintags != 0 && path->bus->sim->max_tagged_dev_openings != 0) { - /* Report SIM which tags are allowed. */ - bzero(&cts, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); - cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; - cts.type = CTS_TYPE_CURRENT_SETTINGS; - cts.xport_specific.sata.tags = path->device->maxtags; - cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS; - xpt_action((union ccb *)&cts); - /* Reconfigure queues for tagged queueing. */ - xpt_start_tags(path); + /* Check if the SIM does not want queued commands. */ + bzero(&cpi, sizeof(cpi)); + xpt_setup_ccb(&cpi.ccb_h, path, CAM_PRIORITY_NONE); + cpi.ccb_h.func_code = XPT_PATH_INQ; + xpt_action((union ccb *)&cpi); + if (cpi.ccb_h.status == CAM_REQ_CMP && + (cpi.hba_inquiry & PI_TAG_ABLE)) { + /* Report SIM which tags are allowed. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.tags = path->device->maxtags; + cts.xport_specific.sata.valid = CTS_SATA_VALID_TAGS; + xpt_action((union ccb *)&cts); + /* Reconfigure queues for tagged queueing. */ + xpt_start_tags(path); + } } ata_device_transport(path); PROBE_SET_ACTION(softc, PROBE_SETMODE); From owner-svn-src-stable@FreeBSD.ORG Sun May 2 13:36:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CFFC9106564A; Sun, 2 May 2010 13:36:23 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id BF9DF8FC13; Sun, 2 May 2010 13:36:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42DaNrS072937; Sun, 2 May 2010 13:36:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42DaNpM072935; Sun, 2 May 2010 13:36:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021336.o42DaNpM072935@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207508 - stable/8/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 13:36:24 -0000 Author: jilles Date: Sun May 2 13:36:23 2010 New Revision: 207508 URL: http://svn.freebsd.org/changeset/base/207508 Log: MFC r207189: symlink(7): Add lpathconf(2) and *at system calls. Modified: stable/8/bin/ln/symlink.7 Directory Properties: stable/8/bin/ln/ (props changed) Modified: stable/8/bin/ln/symlink.7 ============================================================================== --- stable/8/bin/ln/symlink.7 Sun May 2 12:50:29 2010 (r207507) +++ stable/8/bin/ln/symlink.7 Sun May 2 13:36:23 2010 (r207508) @@ -103,19 +103,23 @@ the system call would return a file descriptor to the file .Dq afile . .Pp -There are nine system calls that do not follow links, and which operate +There are thirteen system calls that do not follow links, and which operate on the symbolic link itself. They are: .Xr lchflags 2 , .Xr lchmod 2 , .Xr lchown 2 , +.Xr lpathconf 2 , .Xr lstat 2 , .Xr lutimes 2 , .Xr readlink 2 , +.Xr readlinkat 2 , .Xr rename 2 , +.Xr renameat 2 , .Xr rmdir 2 , +.Xr unlink 2 , and -.Xr unlink 2 . +.Xr unlinkat 2 . Because .Xr remove 3 is an alias for @@ -123,9 +127,30 @@ is an alias for it also does not follow symbolic links. When .Xr rmdir 2 +or +.Xr unlinkat 2 +with the +.Dv AT_REMOVEDIR +flag is applied to a symbolic link, it fails with the error .Er ENOTDIR . .Pp +The +.Xr linkat 2 +system call does not follow symbolic links +unless given the +.Dv AT_SYMLINK_FOLLOW +flag. +.Pp +The following system calls follow symbolic links +unless given the +.Dv AT_SYMLINK_NOFOLLOW +flag: +.Xr fchmodat 2 , +.Xr fchownat 2 +and +.Xr fstatat 2 . +.Pp The owner and group of an existing symbolic link can be changed by means of the .Xr lchown 2 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 13:38:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F26E71065670; Sun, 2 May 2010 13:38:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E20438FC0C; Sun, 2 May 2010 13:38:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Dc8hh073375; Sun, 2 May 2010 13:38:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Dc8rt073373; Sun, 2 May 2010 13:38:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021338.o42Dc8rt073373@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:38: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: r207509 - stable/7/bin/ln X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 13:38:09 -0000 Author: jilles Date: Sun May 2 13:38:08 2010 New Revision: 207509 URL: http://svn.freebsd.org/changeset/base/207509 Log: MFC r207188: symlink(7): The ownership of symlinks is used by the system, in at least three ways, so do not say it is ignored: * who may delete/rename a symlink in a sticky directory * who may do lchflags(2)/lchown(2)/lchmod(2) * whose inode quota is charged Modified: stable/7/bin/ln/symlink.7 Directory Properties: stable/7/bin/ln/ (props changed) Modified: stable/7/bin/ln/symlink.7 ============================================================================== --- stable/7/bin/ln/symlink.7 Sun May 2 13:36:23 2010 (r207508) +++ stable/7/bin/ln/symlink.7 Sun May 2 13:38:08 2010 (r207509) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd March 31, 1994 +.Dd April 25, 2010 .Dt SYMLINK 7 .Os .Sh NAME @@ -138,8 +138,8 @@ an existing symbolic link can be changed and .Xr lutimes 2 system calls, respectively. -Of these, only the flags are used by the system; -the access permissions and ownership are ignored. +Of these, only the flags and ownership are used by the system; +the access permissions are ignored. .Pp The .Bx 4.4 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 13:53:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03657106566B; Sun, 2 May 2010 13:53:09 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E72138FC17; Sun, 2 May 2010 13:53:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Dr8cK076635; Sun, 2 May 2010 13:53:08 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Dr8Vr076633; Sun, 2 May 2010 13:53:08 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005021353.o42Dr8Vr076633@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 13:53: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: r207510 - stable/7/lib/libkvm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 13:53:09 -0000 Author: jilles Date: Sun May 2 13:53:08 2010 New Revision: 207510 URL: http://svn.freebsd.org/changeset/base/207510 Log: MFC r207187: kvm(3): Mention that some of the functions use sysctl(3) instead of kmem. Additionally, because of sysctl(3) use (which is generally good), behaviour for crash dumps differs slightly from behaviour for live kernels and this will probably never be fixed entirely, so weaken that claim. Modified: stable/7/lib/libkvm/kvm.3 Directory Properties: stable/7/lib/libkvm/ (props changed) Modified: stable/7/lib/libkvm/kvm.3 ============================================================================== --- stable/7/lib/libkvm/kvm.3 Sun May 2 13:38:08 2010 (r207509) +++ stable/7/lib/libkvm/kvm.3 Sun May 2 13:53:08 2010 (r207510) @@ -32,7 +32,7 @@ .\" @(#)kvm.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 29, 2004 +.Dd April 25, 2010 .Dt KVM 3 .Os .Sh NAME @@ -46,12 +46,15 @@ The library provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. Access to live systems is via +.Xr sysctl 3 +for some functions, and .Xr mem 4 and .Xr kmem 4 +for other functions, while crash dumps can be examined via the core file generated by .Xr savecore 8 . -The interface behaves identically in both cases. +The interface behaves similarly in both cases. Memory can be read and written, kernel symbol addresses can be looked up efficiently, and information about user processes can be gathered. @@ -112,5 +115,6 @@ given descriptor. .Xr kvm_openfiles 3 , .Xr kvm_read 3 , .Xr kvm_write 3 , +.Xr sysctl 3 , .Xr kmem 4 , .Xr mem 4 From owner-svn-src-stable@FreeBSD.ORG Sun May 2 15:55:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC81B106566C; Sun, 2 May 2010 15:55:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id AC8C28FC16; Sun, 2 May 2010 15:55:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42FtTCj004384; Sun, 2 May 2010 15:55:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42FtT0d004382; Sun, 2 May 2010 15:55:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021555.o42FtT0d004382@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 15:55:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207512 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 15:55:29 -0000 Author: bz Date: Sun May 2 15:55:29 2010 New Revision: 207512 URL: http://svn.freebsd.org/changeset/base/207512 Log: MFC r206989: Avoid memory access after free. Use the (shortend) copy for the ipsec mtu lookup as well. PR: kern/145736 Submitted by: Peter Molnar (peter molnar.cc) Modified: stable/8/sys/netinet/ip_input.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/ip_input.c ============================================================================== --- stable/8/sys/netinet/ip_input.c Sun May 2 14:46:05 2010 (r207511) +++ stable/8/sys/netinet/ip_input.c Sun May 2 15:55:29 2010 (r207512) @@ -1590,7 +1590,7 @@ ip_forward(struct mbuf *m, int srcrt) * If IPsec is configured for this path, * override any possibly mtu value set by ip_output. */ - mtu = ip_ipsec_mtu(m, mtu); + mtu = ip_ipsec_mtu(mcopy, mtu); #endif /* IPSEC */ /* * If the MTU was set before make sure we are below the From owner-svn-src-stable@FreeBSD.ORG Sun May 2 15:58:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0AFE106566B; Sun, 2 May 2010 15:58:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 909CF8FC1C; Sun, 2 May 2010 15:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42FwPvT005083; Sun, 2 May 2010 15:58:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42FwP5c005081; Sun, 2 May 2010 15:58:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021558.o42FwP5c005081@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 15:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207513 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 15:58:25 -0000 Author: bz Date: Sun May 2 15:58:25 2010 New Revision: 207513 URL: http://svn.freebsd.org/changeset/base/207513 Log: MFC r207116: Remove one zero from the double-0. This code doesn't have a license to kill. Modified: stable/8/sys/kern/kern_descrip.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_descrip.c ============================================================================== --- stable/8/sys/kern/kern_descrip.c Sun May 2 15:55:29 2010 (r207512) +++ stable/8/sys/kern/kern_descrip.c Sun May 2 15:58:25 2010 (r207513) @@ -2896,7 +2896,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLE free(sa, M_SONAME); } if (so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa) - == 00 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { + == 0 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { bcopy(sa, &kif->kf_sa_peer, sa->sa_len); free(sa, M_SONAME); } @@ -3149,7 +3149,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER free(sa, M_SONAME); } if (so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa) - == 00 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { + == 0 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { bcopy(sa, &kif->kf_sa_peer, sa->sa_len); free(sa, M_SONAME); } From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:32:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 991F2106566B; Sun, 2 May 2010 16:32:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 88C218FC1F; Sun, 2 May 2010 16:32:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GWfdq012591; Sun, 2 May 2010 16:32:41 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GWffl012588; Sun, 2 May 2010 16:32:41 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021632.o42GWffl012588@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207514 - stable/8/sys/netinet6 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:32:41 -0000 Author: bz Date: Sun May 2 16:32:41 2010 New Revision: 207514 URL: http://svn.freebsd.org/changeset/base/207514 Log: MFC r207276: Make sure IPv6 source address selection does not change interface addresses while walking the IPv6 address list if in the jail case something is connecting to ::1. Reported by: Pieter de Boer (pieter thedarkside.nl) Tested by: Pieter de Boer (pieter thedarkside.nl) Modified: stable/8/sys/netinet6/in6_src.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet6/in6_src.c ============================================================================== --- stable/8/sys/netinet6/in6_src.c Sun May 2 15:58:25 2010 (r207513) +++ stable/8/sys/netinet6/in6_src.c Sun May 2 16:32:41 2010 (r207514) @@ -182,7 +182,7 @@ in6_selectsrc(struct sockaddr_in6 *dstso struct inpcb *inp, struct route_in6 *ro, struct ucred *cred, struct ifnet **ifpp, struct in6_addr *srcp) { - struct in6_addr dst; + struct in6_addr dst, tmp; struct ifnet *ifp = NULL; struct in6_ifaddr *ia = NULL, *ia_best = NULL; struct in6_pktinfo *pi = NULL; @@ -326,10 +326,9 @@ in6_selectsrc(struct sockaddr_in6 *dstso if (!V_ip6_use_deprecated && IFA6_IS_DEPRECATED(ia)) continue; + /* If jailed only take addresses of the jail into account. */ if (cred != NULL && - prison_local_ip6(cred, &ia->ia_addr.sin6_addr, - (inp != NULL && - (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0) + prison_check_ip6(cred, &ia->ia_addr.sin6_addr) != 0) continue; /* Rule 1: Prefer same address */ @@ -476,10 +475,26 @@ in6_selectsrc(struct sockaddr_in6 *dstso return (EADDRNOTAVAIL); } + /* + * At this point at least one of the addresses belonged to the jail + * but it could still be, that we want to further restrict it, e.g. + * theoratically IN6_IS_ADDR_LOOPBACK. + * It must not be IN6_IS_ADDR_UNSPECIFIED anymore. + * prison_local_ip6() will fix an IN6_IS_ADDR_LOOPBACK but should + * let all others previously selected pass. + * Use tmp to not change ::1 on lo0 to the primary jail address. + */ + tmp = ia->ia_addr.sin6_addr; + if (cred != NULL && prison_local_ip6(cred, &tmp, (inp != NULL && + (inp->inp_flags & IN6P_IPV6_V6ONLY) != 0)) != 0) { + IN6_IFADDR_RUNLOCK(); + return (EADDRNOTAVAIL); + } + if (ifpp) *ifpp = ifp; - bcopy(&ia->ia_addr.sin6_addr, srcp, sizeof(*srcp)); + bcopy(&tmp, srcp, sizeof(*srcp)); IN6_IFADDR_RUNLOCK(); return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:36:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFE1B1065674; Sun, 2 May 2010 16:36:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CF7118FC1E; Sun, 2 May 2010 16:36:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GaF9N013465; Sun, 2 May 2010 16:36:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GaFwE013462; Sun, 2 May 2010 16:36:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021636.o42GaFwE013462@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:36:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207515 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:36:16 -0000 Author: bz Date: Sun May 2 16:36:15 2010 New Revision: 207515 URL: http://svn.freebsd.org/changeset/base/207515 Log: MFC r207277: Enhance the historic behaviour of raw sockets and jails in a way that we allow all possible jail IPs as source address rather than forcing the "primary". While IPv6 naturally has source address selection, for legacy IP we do not go through the pain in case IP_HDRINCL was not set. People should bind(2) for that. This will, for example, allow ping(|6) -S to work correctly for non-primary addresses. Reported by: (ten 211.ru) Tested by: (ten 211.ru) Modified: stable/8/sys/netinet/raw_ip.c stable/8/sys/netinet6/raw_ip6.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/raw_ip.c ============================================================================== --- stable/8/sys/netinet/raw_ip.c Sun May 2 16:32:41 2010 (r207514) +++ stable/8/sys/netinet/raw_ip.c Sun May 2 16:36:15 2010 (r207515) @@ -441,11 +441,24 @@ rip_output(struct mbuf *m, struct socket ip->ip_p = inp->inp_ip_p; ip->ip_len = m->m_pkthdr.len; ip->ip_src = inp->inp_laddr; - error = prison_get_ip4(inp->inp_cred, &ip->ip_src); - if (error != 0) { - INP_RUNLOCK(inp); - m_freem(m); - return (error); + if (jailed(inp->inp_cred)) { + /* + * prison_local_ip4() would be good enough but would + * let a source of INADDR_ANY pass, which we do not + * want to see from jails. We do not go through the + * pain of in_pcbladdr() for raw sockets. + */ + if (ip->ip_src.s_addr == INADDR_ANY) + error = prison_get_ip4(inp->inp_cred, + &ip->ip_src); + else + error = prison_local_ip4(inp->inp_cred, + &ip->ip_src); + if (error != 0) { + INP_RUNLOCK(inp); + m_freem(m); + return (error); + } } ip->ip_dst.s_addr = dst; ip->ip_ttl = inp->inp_ip_ttl; Modified: stable/8/sys/netinet6/raw_ip6.c ============================================================================== --- stable/8/sys/netinet6/raw_ip6.c Sun May 2 16:32:41 2010 (r207514) +++ stable/8/sys/netinet6/raw_ip6.c Sun May 2 16:36:15 2010 (r207515) @@ -465,7 +465,7 @@ rip6_output(m, va_alist) &oifp, &in6a); if (error) goto bad; - error = prison_get_ip6(in6p->inp_cred, &in6a); + error = prison_check_ip6(in6p->inp_cred, &in6a); if (error != 0) goto bad; ip6->ip6_src = in6a; From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:38:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85D5F1065672; Sun, 2 May 2010 16:38:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 755A18FC1C; Sun, 2 May 2010 16:38:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Gcvcn014111; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GcvaQ014109; Sun, 2 May 2010 16:38:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021638.o42GcvaQ014109@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:38: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: r207516 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:38:57 -0000 Author: marius Date: Sun May 2 16:38:57 2010 New Revision: 207516 URL: http://svn.freebsd.org/changeset/base/207516 Log: MFC: r206448 Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:36:15 2010 (r207515) +++ stable/7/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:38:57 2010 (r207516) @@ -187,13 +187,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -233,9 +230,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; } From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:39:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 612B81065678; Sun, 2 May 2010 16:39:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5125B8FC08; Sun, 2 May 2010 16:39:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GdF3p014219; Sun, 2 May 2010 16:39:15 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GdFFk014217; Sun, 2 May 2010 16:39:15 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005021639.o42GdFFk014217@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 2 May 2010 16:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207517 - stable/8/sys/net X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:39:15 -0000 Author: bz Date: Sun May 2 16:39:15 2010 New Revision: 207517 URL: http://svn.freebsd.org/changeset/base/207517 Log: MFC r207278: MFP4: @177254 Add missing CURVNET_RESTORE() calls for multiple code paths, to stop leaking the currently cached vnet into callers and to the process. Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Modified: stable/8/sys/net/bpf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/net/bpf.c ============================================================================== --- stable/8/sys/net/bpf.c Sun May 2 16:38:57 2010 (r207516) +++ stable/8/sys/net/bpf.c Sun May 2 16:39:15 2010 (r207517) @@ -1328,6 +1328,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c /* FALLSTHROUGH */ default: + CURVNET_RESTORE(); return (EINVAL); } @@ -1335,6 +1336,7 @@ bpfioctl(struct cdev *dev, u_long cmd, c if (d->bd_sbuf != NULL || d->bd_hbuf != NULL || d->bd_fbuf != NULL || d->bd_bif != NULL) { BPFD_UNLOCK(d); + CURVNET_RESTORE(); return (EBUSY); } d->bd_bufmode = *(u_int *)addr; @@ -1342,13 +1344,16 @@ bpfioctl(struct cdev *dev, u_long cmd, c break; case BIOCGETZMAX: - return (bpf_ioctl_getzmax(td, d, (size_t *)addr)); + error = bpf_ioctl_getzmax(td, d, (size_t *)addr); + break; case BIOCSETZBUF: - return (bpf_ioctl_setzbuf(td, d, (struct bpf_zbuf *)addr)); + error = bpf_ioctl_setzbuf(td, d, (struct bpf_zbuf *)addr); + break; case BIOCROTZBUF: - return (bpf_ioctl_rotzbuf(td, d, (struct bpf_zbuf *)addr)); + error = bpf_ioctl_rotzbuf(td, d, (struct bpf_zbuf *)addr); + break; } CURVNET_RESTORE(); return (error); From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:40:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E67EE1065670; Sun, 2 May 2010 16:40:18 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9FDC58FC15; Sun, 2 May 2010 16:40:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GeImW014506; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GeIMR014504; Sun, 2 May 2010 16:40:18 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021640.o42GeIMR014504@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:40:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207518 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:40:19 -0000 Author: marius Date: Sun May 2 16:40:18 2010 New Revision: 207518 URL: http://svn.freebsd.org/changeset/base/207518 Log: MFC: r206448 Do as the comment suggests and determine the bus space based on the last bus we actually mapped at rather than always based on the last bus we encountered while moving upward in the tree. Otherwise we might use the wrong bus space in case the bridge directly underneath the nexus doesn't require mapping, i.e. was skipped as it's the case for ssm(4) nodes. Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/ofw_machdep.c ============================================================================== --- stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:39:15 2010 (r207517) +++ stable/8/sys/sparc64/sparc64/ofw_machdep.c Sun May 2 16:40:18 2010 (r207518) @@ -186,13 +186,10 @@ OF_decode_addr(phandle_t node, int bank, name[sizeof(name) - 1] = '\0'; goto skip; } - if (lbus != bus) { - if (OF_getprop(bus, "#size-cells", &szc, - sizeof(szc)) == -1) - szc = 1; - if (szc < 1 || szc > 2) - return (ENXIO); - } + if (OF_getprop(bus, "#size-cells", &szc, sizeof(szc)) == -1) + szc = 1; + if (szc < 1 || szc > 2) + return (ENXIO); nbank /= sizeof(banks[0]) * (addrc + paddrc + szc); bank = 0; for (i = 0; i < nbank; i++) { @@ -232,9 +229,9 @@ OF_decode_addr(phandle_t node, int bank, } if (i == nbank) return (ENXIO); + lbus = bus; skip: addrc = paddrc; - lbus = bus; bus = pbus; } From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:45:08 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EB561065670; Sun, 2 May 2010 16:45:08 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 7E52E8FC08; Sun, 2 May 2010 16:45:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Gj8bU015684; Sun, 2 May 2010 16:45:08 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Gj8R8015682; Sun, 2 May 2010 16:45:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021645.o42Gj8R8015682@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207520 - stable/8/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:45:08 -0000 Author: marius Date: Sun May 2 16:45:08 2010 New Revision: 207520 URL: http://svn.freebsd.org/changeset/base/207520 Log: MFC: r206449 Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table actually only takes one argument. Modified: stable/8/sys/sparc64/sparc64/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/8/sys/sparc64/sparc64/trap.c Sun May 2 16:44:06 2010 (r207519) +++ stable/8/sys/sparc64/sparc64/trap.c Sun May 2 16:45:08 2010 (r207520) @@ -260,7 +260,8 @@ sun4u_set_traptable(void *tba_addr) cell_t tba_addr; } args = { (cell_t)"SUNW,set-trap-table", - 2, + 1, + 0, }; args.tba_addr = (cell_t)tba_addr; From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:45:10 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 108891065672; Sun, 2 May 2010 16:45:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F42058FC0C; Sun, 2 May 2010 16:45:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42Gj9sq015718; Sun, 2 May 2010 16:45:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Gj9Lj015716; Sun, 2 May 2010 16:45:09 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021645.o42Gj9Lj015716@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:45: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: r207521 - stable/7/sys/sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:45:10 -0000 Author: marius Date: Sun May 2 16:45:09 2010 New Revision: 207521 URL: http://svn.freebsd.org/changeset/base/207521 Log: MFC: r206449 Unlike the sun4v variant, the sun4u version of SUNW,set-trap-table actually only takes one argument. Modified: stable/7/sys/sparc64/sparc64/trap.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/sparc64/trap.c ============================================================================== --- stable/7/sys/sparc64/sparc64/trap.c Sun May 2 16:45:08 2010 (r207520) +++ stable/7/sys/sparc64/sparc64/trap.c Sun May 2 16:45:09 2010 (r207521) @@ -249,7 +249,8 @@ sun4u_set_traptable(void *tba_addr) cell_t tba_addr; } args = { (cell_t)"SUNW,set-trap-table", - 2, + 1, + 0, }; args.tba_addr = (cell_t)tba_addr; From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:46:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72A1F106566C; Sun, 2 May 2010 16:46:20 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 624BC8FC08; Sun, 2 May 2010 16:46:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GkK6K016051; Sun, 2 May 2010 16:46:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GkKfX016050; Sun, 2 May 2010 16:46:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021646.o42GkKfX016050@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207522 - stable/8/sys/sparc64/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:46:20 -0000 Author: marius Date: Sun May 2 16:46:20 2010 New Revision: 207522 URL: http://svn.freebsd.org/changeset/base/207522 Log: MFC: r206450 Correct the DCR_IPE macro to refer to the right bit. Also improve the associated comment as besides US-IV+ these bits are only available with US-III++, i.e. the 1.2GHz version of the US-III+. Modified: stable/8/sys/sparc64/include/dcr.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/include/dcr.h ============================================================================== --- stable/8/sys/sparc64/include/dcr.h Sun May 2 16:45:09 2010 (r207521) +++ stable/8/sys/sparc64/include/dcr.h Sun May 2 16:46:20 2010 (r207522) @@ -43,8 +43,8 @@ #define DCR_OBSDATA_CT_MASK \ (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT) -/* The following bits are valid for the UltraSPARC-III+/IV+ only. */ -#define DCR_IPE (1UL << 5) +/* The following bits are valid for the UltraSPARC-III++/IV+ only. */ +#define DCR_IPE (1UL << 2) #define DCR_OBSDATA_CTP_BITS 6 #define DCR_OBSDATA_CTP_MASK \ From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:46:22 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69DBE106567D; Sun, 2 May 2010 16:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 599CD8FC1C; Sun, 2 May 2010 16:46:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GkMqP016084; Sun, 2 May 2010 16:46:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GkMxK016082; Sun, 2 May 2010 16:46:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021646.o42GkMxK016082@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:46: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: r207523 - stable/7/sys/sparc64/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:46:22 -0000 Author: marius Date: Sun May 2 16:46:22 2010 New Revision: 207523 URL: http://svn.freebsd.org/changeset/base/207523 Log: MFC: r206450 Correct the DCR_IPE macro to refer to the right bit. Also improve the associated comment as besides US-IV+ these bits are only available with US-III++, i.e. the 1.2GHz version of the US-III+. Modified: stable/7/sys/sparc64/include/dcr.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/dcr.h ============================================================================== --- stable/7/sys/sparc64/include/dcr.h Sun May 2 16:46:20 2010 (r207522) +++ stable/7/sys/sparc64/include/dcr.h Sun May 2 16:46:22 2010 (r207523) @@ -43,8 +43,8 @@ #define DCR_OBSDATA_CT_MASK \ (((1UL << DCR_OBSDATA_CT_BITS) - 1) << DCR_OBSDATA_SHIFT) -/* The following bits are valid for the UltraSPARC-III+/IV+ only. */ -#define DCR_IPE (1UL << 5) +/* The following bits are valid for the UltraSPARC-III++/IV+ only. */ +#define DCR_IPE (1UL << 2) #define DCR_OBSDATA_CTP_BITS 6 #define DCR_OBSDATA_CTP_MASK \ From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:47:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4B62C106566B; Sun, 2 May 2010 16:47:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0618FC18; Sun, 2 May 2010 16:47:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GlprW016474; Sun, 2 May 2010 16:47:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42Glp0P016473; Sun, 2 May 2010 16:47:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021647.o42Glp0P016473@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207524 - stable/8/sys/sparc64/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:47:51 -0000 Author: marius Date: Sun May 2 16:47:50 2010 New Revision: 207524 URL: http://svn.freebsd.org/changeset/base/207524 Log: MFC: r206480 Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. Modified: stable/8/sys/sparc64/include/lsu.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/include/lsu.h ============================================================================== --- stable/8/sys/sparc64/include/lsu.h Sun May 2 16:46:22 2010 (r207523) +++ stable/8/sys/sparc64/include/lsu.h Sun May 2 16:47:50 2010 (r207524) @@ -29,7 +29,7 @@ /* * Definitions for the Load-Store-Unit Control Register. This is called - * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III. + * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater. */ #define LSU_IC (1UL << 0) #define LSU_DC (1UL << 1) @@ -41,7 +41,7 @@ #define LSU_FM_BITS 16 #define LSU_FM_MASK (((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT) -#define LSU_VM_SHIFT 25 +#define LSU_VM_SHIFT 25 #define LSU_VM_BITS 8 #define LSU_VM_MASK (((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT) @@ -65,4 +65,22 @@ #define LSU_CV (1UL << 48) #define LSU_CP (1UL << 49) +/* The following bit is valid for the UltraSPARC-IV only. */ +#define LSU_WIH (1UL << 4) + +/* The following bits are valid for the UltraSPARC-IV+ only. */ +#define LSU_PPS_SHIFT 50 +#define LSU_PPS_BITS 2 +#define LSU_PPS_MASK (((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT) + +#define LSU_IPS_SHIFT 52 +#define LSU_IPS_BITS 2 +#define LSU_IPS_MASK (((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT) + +#define LSU_PCM (1UL << 54) +#define LSU_WCE (1UL << 55) + +/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */ +#define LSU_WEAK_SPCA (1UL << 41) + #endif /* _MACHINE_LSU_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:47:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB39A106564A; Sun, 2 May 2010 16:47:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id DAF448FC13; Sun, 2 May 2010 16:47:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GlsPu016540; Sun, 2 May 2010 16:47:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GlsE9016538; Sun, 2 May 2010 16:47:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021647.o42GlsE9016538@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:47: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: r207525 - stable/7/sys/sparc64/include X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:47:55 -0000 Author: marius Date: Sun May 2 16:47:54 2010 New Revision: 207525 URL: http://svn.freebsd.org/changeset/base/207525 Log: MFC: r206480 Update for UltraSPARC-IV{,+} and SPARC64 V, VI, VII and VIIIfx CPUs. Modified: stable/7/sys/sparc64/include/lsu.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/include/lsu.h ============================================================================== --- stable/7/sys/sparc64/include/lsu.h Sun May 2 16:47:50 2010 (r207524) +++ stable/7/sys/sparc64/include/lsu.h Sun May 2 16:47:54 2010 (r207525) @@ -29,7 +29,7 @@ /* * Definitions for the Load-Store-Unit Control Register. This is called - * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III. + * Data Cache Unit Control Register (DCUCR) for UltraSPARC-III and greater. */ #define LSU_IC (1UL << 0) #define LSU_DC (1UL << 1) @@ -41,7 +41,7 @@ #define LSU_FM_BITS 16 #define LSU_FM_MASK (((1UL << LSU_FM_BITS) - 1) << LSU_FM_SHIFT) -#define LSU_VM_SHIFT 25 +#define LSU_VM_SHIFT 25 #define LSU_VM_BITS 8 #define LSU_VM_MASK (((1UL << LSU_VM_BITS) - 1) << LSU_VM_SHIFT) @@ -65,4 +65,22 @@ #define LSU_CV (1UL << 48) #define LSU_CP (1UL << 49) +/* The following bit is valid for the UltraSPARC-IV only. */ +#define LSU_WIH (1UL << 4) + +/* The following bits are valid for the UltraSPARC-IV+ only. */ +#define LSU_PPS_SHIFT 50 +#define LSU_PPS_BITS 2 +#define LSU_PPS_MASK (((1UL << LSU_PPS_BITS) - 1) << LSU_PPS_SHIFT) + +#define LSU_IPS_SHIFT 52 +#define LSU_IPS_BITS 2 +#define LSU_IPS_MASK (((1UL << LSU_IPS_BITS) - 1) << LSU_IPS_SHIFT) + +#define LSU_PCM (1UL << 54) +#define LSU_WCE (1UL << 55) + +/* The following bit is valid for the SPARC64 V, VI, VII and VIIIfx only. */ +#define LSU_WEAK_SPCA (1UL << 41) + #endif /* _MACHINE_LSU_H_ */ From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:52:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36B9F1065700; Sun, 2 May 2010 16:52:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 25BC48FC14; Sun, 2 May 2010 16:52:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GqNVx017574; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GqN2t017573; Sun, 2 May 2010 16:52:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021652.o42GqN2t017573@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:52:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207526 - stable/8/lib/libc/softfloat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:52:24 -0000 Author: marius Date: Sun May 2 16:52:23 2010 New Revision: 207526 URL: http://svn.freebsd.org/changeset/base/207526 Log: MFC: r206490, r206492 While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy Modified: stable/8/lib/libc/softfloat/softfloat-specialize Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/softfloat/softfloat-specialize ============================================================================== --- stable/8/lib/libc/softfloat/softfloat-specialize Sun May 2 16:47:54 2010 (r207525) +++ stable/8/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:23 2010 (r207526) @@ -44,7 +44,11 @@ Underflow tininess-detection mode, stati #ifdef SOFTFLOAT_FOR_GCC static #endif +#ifdef __sparc64__ +int8 float_detect_tininess = float_tininess_before_rounding; +#else int8 float_detect_tininess = float_tininess_after_rounding; +#endif /* ------------------------------------------------------------------------------- From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:52:24 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EF261065702; Sun, 2 May 2010 16:52:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAD68FC20; Sun, 2 May 2010 16:52:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GqOse017627; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GqOeE017625; Sun, 2 May 2010 16:52:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021652.o42GqOeE017625@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:52: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: r207527 - stable/7/lib/libc/softfloat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:52:24 -0000 Author: marius Date: Sun May 2 16:52:24 2010 New Revision: 207527 URL: http://svn.freebsd.org/changeset/base/207527 Log: MFC: r206490, r206492 While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy Modified: stable/7/lib/libc/softfloat/softfloat-specialize Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/softfloat/softfloat-specialize ============================================================================== --- stable/7/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:23 2010 (r207526) +++ stable/7/lib/libc/softfloat/softfloat-specialize Sun May 2 16:52:24 2010 (r207527) @@ -44,7 +44,11 @@ Underflow tininess-detection mode, stati #ifdef SOFTFLOAT_FOR_GCC static #endif +#ifdef __sparc64__ +int8 float_detect_tininess = float_tininess_before_rounding; +#else int8 float_detect_tininess = float_tininess_after_rounding; +#endif /* ------------------------------------------------------------------------------- From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:55:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B004106566B; Sun, 2 May 2010 16:55:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1AB148FC1C; Sun, 2 May 2010 16:55:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GtBnl018367; Sun, 2 May 2010 16:55:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GtAl6018365; Sun, 2 May 2010 16:55:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021655.o42GtAl6018365@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:55:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207528 - in stable/8/tools/test: . testfloat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:55:11 -0000 Author: marius Date: Sun May 2 16:55:10 2010 New Revision: 207528 URL: http://svn.freebsd.org/changeset/base/207528 Log: MFC: r207151 Add a TestFloat based test suite for floating-point implementations currently supporting sparc64. After a `make depend all` there are three programs; testsoftfloat for testing against the SoftFloat in src/lib/libc/softfloat for reference purposes, testemufloat for testing the emulator source in src/lib/libc/sparc64/fpu and testfloat for testing with the installed libc. Support for other architectures can be added as needed. PR: 144900 Submitted by: Peter Jeremy Added: stable/8/tools/test/testfloat/ - copied from r207151, head/tools/test/testfloat/ Modified: stable/8/tools/test/README Directory Properties: stable/8/tools/test/ (props changed) Modified: stable/8/tools/test/README ============================================================================== --- stable/8/tools/test/README Sun May 2 16:52:24 2010 (r207527) +++ stable/8/tools/test/README Sun May 2 16:55:10 2010 (r207528) @@ -11,3 +11,4 @@ devrandom Programs to test /dev/*random. dtrace DTrace test suite malloc A program to test and benchmark malloc(). posixshm A program to test POSIX shared memory. +testfloat Programs to test floating-point implementations From owner-svn-src-stable@FreeBSD.ORG Sun May 2 16:55:13 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E78C106566C; Sun, 2 May 2010 16:55:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5E33F8FC13; Sun, 2 May 2010 16:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42GtDgo018403; Sun, 2 May 2010 16:55:13 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42GtDsd018401; Sun, 2 May 2010 16:55:13 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201005021655.o42GtDsd018401@svn.freebsd.org> From: Marius Strobl Date: Sun, 2 May 2010 16:55: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: r207529 - in stable/7/tools/test: . testfloat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 16:55:13 -0000 Author: marius Date: Sun May 2 16:55:13 2010 New Revision: 207529 URL: http://svn.freebsd.org/changeset/base/207529 Log: MFC: r207151 Add a TestFloat based test suite for floating-point implementations currently supporting sparc64. After a `make depend all` there are three programs; testsoftfloat for testing against the SoftFloat in src/lib/libc/softfloat for reference purposes, testemufloat for testing the emulator source in src/lib/libc/sparc64/fpu and testfloat for testing with the installed libc. Support for other architectures can be added as needed. PR: 144900 Submitted by: Peter Jeremy Added: stable/7/tools/test/testfloat/ - copied from r207151, head/tools/test/testfloat/ Modified: stable/7/tools/test/README Directory Properties: stable/7/tools/test/ (props changed) Modified: stable/7/tools/test/README ============================================================================== --- stable/7/tools/test/README Sun May 2 16:55:10 2010 (r207528) +++ stable/7/tools/test/README Sun May 2 16:55:13 2010 (r207529) @@ -10,3 +10,4 @@ Please make a subdir per program, and ad devrandom Programs to test /dev/*random. malloc A program to test and benchmark malloc(). posixshm A program to test POSIX shared memory. +testfloat Programs to test floating-point implementations From owner-svn-src-stable@FreeBSD.ORG Sun May 2 20:12:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F38FE1065673; Sun, 2 May 2010 20:12:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E28468FC13; Sun, 2 May 2010 20:12:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o42KCKxr061706; Sun, 2 May 2010 20:12:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o42KCKq0061704; Sun, 2 May 2010 20:12:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005022012.o42KCKq0061704@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 2 May 2010 20:12: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: r207538 - stable/7/lib/csu/i386-elf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 20:12:21 -0000 Author: jilles Date: Sun May 2 20:12:20 2010 New Revision: 207538 URL: http://svn.freebsd.org/changeset/base/207538 Log: MFC r205398: Do not create *.gmon files for PIE executables on i386. Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o. This problem is i386-specific, the other architectures are OK. If you have problems with PIE executables such as samba and cups leaving behind gmon files, rebuild them after installing this change. PR: ports/143924 Modified: stable/7/lib/csu/i386-elf/Makefile Directory Properties: stable/7/lib/csu/ (props changed) Modified: stable/7/lib/csu/i386-elf/Makefile ============================================================================== --- stable/7/lib/csu/i386-elf/Makefile Sun May 2 19:38:17 2010 (r207537) +++ stable/7/lib/csu/i386-elf/Makefile Sun May 2 20:12:20 2010 (r207538) @@ -24,7 +24,7 @@ crt1.o: crt1_c.o crt1_s.o objcopy --localize-symbol _start1 crt1.o Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o From owner-svn-src-stable@FreeBSD.ORG Mon May 3 01:04:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94057106564A; Mon, 3 May 2010 01:04:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 431418FC0C; Mon, 3 May 2010 01:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4314jAa026032; Mon, 3 May 2010 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4314jFj026030; Mon, 3 May 2010 01:04:45 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005030104.o4314jFj026030@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 3 May 2010 01:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207546 - stable/8/sys/dev/ale X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 01:04:45 -0000 Author: yongari Date: Mon May 3 01:04:44 2010 New Revision: 207546 URL: http://svn.freebsd.org/changeset/base/207546 Log: MFC r207251: It seems ale(4) controllers do not like to see TCP payload in the first descriptor in TSO case. Otherwise controller can generate bad frames during TSO. To address it, make sure to pull up ethernet + IP + TCP header with options in first buffer. Also ensure the buffer length of the first descriptor for TSO covers entire ethernet + IP + TCP with options and setup additional Tx descriptor if the first buffer includes TCP payload. Tested by: Amar Takhar darkbeer dot org > Modified: stable/8/sys/dev/ale/if_ale.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ale/if_ale.c ============================================================================== --- stable/8/sys/dev/ale/if_ale.c Mon May 3 00:56:26 2010 (r207545) +++ stable/8/sys/dev/ale/if_ale.c Mon May 3 01:04:44 2010 (r207546) @@ -1585,7 +1585,7 @@ ale_encap(struct ale_softc *sc, struct m struct tcphdr *tcp; bus_dma_segment_t txsegs[ALE_MAXTXSEGS]; bus_dmamap_t map; - uint32_t cflags, ip_off, poff, vtag; + uint32_t cflags, hdrlen, ip_off, poff, vtag; int error, i, nsegs, prod, si; ALE_LOCK_ASSERT(sc); @@ -1678,6 +1678,11 @@ ale_encap(struct ale_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } /* * AR81xx requires IP/TCP header size and offset as * well as TCP pseudo checksum which complicates @@ -1730,7 +1735,7 @@ ale_encap(struct ale_softc *sc, struct m } /* Check descriptor overrun. */ - if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 2) { + if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 3) { bus_dmamap_unload(sc->ale_cdata.ale_tx_tag, map); return (ENOBUFS); } @@ -1782,8 +1787,32 @@ ale_encap(struct ale_softc *sc, struct m cflags |= ALE_TD_INSERT_VLAN_TAG; } - desc = NULL; - for (i = 0; i < nsegs; i++) { + i = 0; + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * Make sure the first fragment contains + * only ethernet and IP/TCP header with options. + */ + hdrlen = poff + (tcp->th_off << 2); + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr); + desc->len = htole32(ALE_TX_BYTES(hdrlen) | vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + if (m->m_len - hdrlen > 0) { + /* Handle remaining payload of the first fragment. */ + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr + hdrlen); + desc->len = htole32(ALE_TX_BYTES(m->m_len - hdrlen) | + vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + } + i = 1; + } + for (; i < nsegs; i++) { desc = &sc->ale_cdata.ale_tx_ring[prod]; desc->addr = htole64(txsegs[i].ds_addr); desc->len = htole32(ALE_TX_BYTES(txsegs[i].ds_len) | vtag); From owner-svn-src-stable@FreeBSD.ORG Mon May 3 01:13:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6C7E106566B; Mon, 3 May 2010 01:13:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D58E98FC18; Mon, 3 May 2010 01:13:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o431DbkG028011; Mon, 3 May 2010 01:13:37 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o431DbYf028009; Mon, 3 May 2010 01:13:37 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005030113.o431DbYf028009@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 3 May 2010 01:13: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: r207547 - stable/7/sys/dev/ale X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 01:13:38 -0000 Author: yongari Date: Mon May 3 01:13:37 2010 New Revision: 207547 URL: http://svn.freebsd.org/changeset/base/207547 Log: MFC r207251: It seems ale(4) controllers do not like to see TCP payload in the first descriptor in TSO case. Otherwise controller can generate bad frames during TSO. To address it, make sure to pull up ethernet + IP + TCP header with options in first buffer. Also ensure the buffer length of the first descriptor for TSO covers entire ethernet + IP + TCP with options and setup additional Tx descriptor if the first buffer includes TCP payload. Tested by: Amar Takhar darkbeer dot org > Modified: stable/7/sys/dev/ale/if_ale.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Mon May 3 01:04:44 2010 (r207546) +++ stable/7/sys/dev/ale/if_ale.c Mon May 3 01:13:37 2010 (r207547) @@ -1585,7 +1585,7 @@ ale_encap(struct ale_softc *sc, struct m struct tcphdr *tcp; bus_dma_segment_t txsegs[ALE_MAXTXSEGS]; bus_dmamap_t map; - uint32_t cflags, ip_off, poff, vtag; + uint32_t cflags, hdrlen, ip_off, poff, vtag; int error, i, nsegs, prod, si; ALE_LOCK_ASSERT(sc); @@ -1678,6 +1678,11 @@ ale_encap(struct ale_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); + m = m_pullup(m, poff + (tcp->th_off << 2)); + if (m == NULL) { + *m_head = NULL; + return (ENOBUFS); + } /* * AR81xx requires IP/TCP header size and offset as * well as TCP pseudo checksum which complicates @@ -1730,7 +1735,7 @@ ale_encap(struct ale_softc *sc, struct m } /* Check descriptor overrun. */ - if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 2) { + if (sc->ale_cdata.ale_tx_cnt + nsegs >= ALE_TX_RING_CNT - 3) { bus_dmamap_unload(sc->ale_cdata.ale_tx_tag, map); return (ENOBUFS); } @@ -1782,8 +1787,32 @@ ale_encap(struct ale_softc *sc, struct m cflags |= ALE_TD_INSERT_VLAN_TAG; } - desc = NULL; - for (i = 0; i < nsegs; i++) { + i = 0; + if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) { + /* + * Make sure the first fragment contains + * only ethernet and IP/TCP header with options. + */ + hdrlen = poff + (tcp->th_off << 2); + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr); + desc->len = htole32(ALE_TX_BYTES(hdrlen) | vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + if (m->m_len - hdrlen > 0) { + /* Handle remaining payload of the first fragment. */ + desc = &sc->ale_cdata.ale_tx_ring[prod]; + desc->addr = htole64(txsegs[i].ds_addr + hdrlen); + desc->len = htole32(ALE_TX_BYTES(m->m_len - hdrlen) | + vtag); + desc->flags = htole32(cflags); + sc->ale_cdata.ale_tx_cnt++; + ALE_DESC_INC(prod, ALE_TX_RING_CNT); + } + i = 1; + } + for (; i < nsegs; i++) { desc = &sc->ale_cdata.ale_tx_ring[prod]; desc->addr = htole64(txsegs[i].ds_addr); desc->len = htole32(ALE_TX_BYTES(txsegs[i].ds_len) | vtag); From owner-svn-src-stable@FreeBSD.ORG Mon May 3 09:31:51 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDD5B1065677; Mon, 3 May 2010 09:31:51 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD4578FC2A; Mon, 3 May 2010 09:31:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o439VpKT037311; Mon, 3 May 2010 09:31:51 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439Vpic037309; Mon, 3 May 2010 09:31:51 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <201005030931.o439Vpic037309@svn.freebsd.org> From: Bruce M Simpson Date: Mon, 3 May 2010 09:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207558 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 09:31:52 -0000 Author: bms Date: Mon May 3 09:31:51 2010 New Revision: 207558 URL: http://svn.freebsd.org/changeset/base/207558 Log: MFC r207275: Fix a regression where DVMRP diagnostic traffic, such as that used by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control traffic must always have a TTL of 1. Submitted by: Matthew Luckie Modified: stable/8/sys/netinet/igmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/igmp.c ============================================================================== --- stable/8/sys/netinet/igmp.c Mon May 3 09:28:10 2010 (r207557) +++ stable/8/sys/netinet/igmp.c Mon May 3 09:31:51 2010 (r207558) @@ -1468,12 +1468,6 @@ igmp_input(struct mbuf *m, int off) } ip = mtod(m, struct ip *); - if (ip->ip_ttl != 1) { - IGMPSTAT_INC(igps_rcv_badttl); - m_freem(m); - return; - } - /* * Validate checksum. */ @@ -1488,6 +1482,17 @@ igmp_input(struct mbuf *m, int off) m->m_data -= iphlen; m->m_len += iphlen; + /* + * IGMP control traffic is link-scope, and must have a TTL of 1. + * DVMRP traffic (e.g. mrinfo, mtrace) is an exception; + * probe packets may come from beyond the LAN. + */ + if (igmp->igmp_type != IGMP_DVMRP && ip->ip_ttl != 1) { + IGMPSTAT_INC(igps_rcv_badttl); + m_freem(m); + return; + } + switch (igmp->igmp_type) { case IGMP_HOST_MEMBERSHIP_QUERY: if (igmplen == IGMP_MINLEN) { From owner-svn-src-stable@FreeBSD.ORG Mon May 3 09:35:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 15E9B106564A; Mon, 3 May 2010 09:35:41 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 04E258FC17; Mon, 3 May 2010 09:35:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o439Zeen038198; Mon, 3 May 2010 09:35:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439Zeql038196; Mon, 3 May 2010 09:35:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005030935.o439Zeql038196@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 09:35:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207559 - stable/8/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 09:35:41 -0000 Author: delphij Date: Mon May 3 09:35:40 2010 New Revision: 207559 URL: http://svn.freebsd.org/changeset/base/207559 Log: MFC r207383: Add FreeBSD 8.1 to known list as it's being referenced by a couple of manpages already. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 09:31:51 2010 (r207558) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 09:35:40 2010 (r207559) @@ -73,6 +73,7 @@ .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms From owner-svn-src-stable@FreeBSD.ORG Mon May 3 09:46:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5DD11065679; Mon, 3 May 2010 09:46:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B4B238FC2D; Mon, 3 May 2010 09:46:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o439klIp040689; Mon, 3 May 2010 09:46:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o439klsv040687; Mon, 3 May 2010 09:46:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005030946.o439klsv040687@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 09:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207560 - stable/8/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 09:46:47 -0000 Author: delphij Date: Mon May 3 09:46:47 2010 New Revision: 207560 URL: http://svn.freebsd.org/changeset/base/207560 Log: MFC r206838: Partially MFp4 #176265 by pjd@: - Properly initialize and destroy system_taskq. - Add a dummy implementation of taskq_create_proc(). Note: We do not currently use system_taskq in ZFS so this is mostly a no-op at this time. Proper system_taskq initialization is required by newer ZFS code. Ok'ed by: pjd Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Mon May 3 09:35:40 2010 (r207559) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Mon May 3 09:46:47 2010 (r207560) @@ -52,9 +52,9 @@ static void system_taskq_init(void *arg) { - system_taskq = (taskq_t *)taskqueue_thread; taskq_zone = uma_zcreate("taskq_zone", sizeof(struct ostask), NULL, NULL, NULL, NULL, 0, 0); + system_taskq = taskq_create("system_taskq", mp_ncpus, 0, 0, 0, 0); } SYSINIT(system_taskq_init, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_init, NULL); @@ -62,6 +62,7 @@ static void system_taskq_fini(void *arg) { + taskq_destroy(system_taskq); uma_zdestroy(taskq_zone); } SYSUNINIT(system_taskq_fini, SI_SUB_CONFIGURE, SI_ORDER_ANY, system_taskq_fini, NULL); @@ -72,10 +73,8 @@ taskq_create(const char *name, int nthre { taskq_t *tq; - if ((flags & TASKQ_THREADS_CPU_PCT) != 0) { - /* TODO: Calculate number od threads. */ - printf("%s: TASKQ_THREADS_CPU_PCT\n", __func__); - } + if ((flags & TASKQ_THREADS_CPU_PCT) != 0) + nthreads = MAX((mp_ncpus * nthreads) / 100, 1); tq = kmem_alloc(sizeof(*tq), KM_SLEEP); tq->tq_queue = taskqueue_create(name, M_WAITOK, taskqueue_thread_enqueue, @@ -85,6 +84,14 @@ taskq_create(const char *name, int nthre return ((taskq_t *)tq); } +taskq_t * +taskq_create_proc(const char *name, int nthreads, pri_t pri, int minalloc, + int maxalloc, proc_t *proc __unused, uint_t flags) +{ + + return (taskq_create(name, nthreads, pri, minalloc, maxalloc, flags)); +} + void taskq_destroy(taskq_t *tq) { From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:06:41 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55602106566B; Mon, 3 May 2010 12:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44F548FC13; Mon, 3 May 2010 12:06:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43C6feB073540; Mon, 3 May 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43C6fox073538; Mon, 3 May 2010 12:06:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031206.o43C6fox073538@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:06: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: r207563 - stable/7/sys/fs/msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:06:41 -0000 Author: kib Date: Mon May 3 12:06:40 2010 New Revision: 207563 URL: http://svn.freebsd.org/changeset/base/207563 Log: MFC r203822: Remove unused macros. Modified: stable/7/sys/fs/msdosfs/denode.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/fs/msdosfs/denode.h ============================================================================== --- stable/7/sys/fs/msdosfs/denode.h Mon May 3 10:07:06 2010 (r207562) +++ stable/7/sys/fs/msdosfs/denode.h Mon May 3 12:06:40 2010 (r207563) @@ -215,9 +215,6 @@ struct denode { ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#define de_forw de_chain[0] -#define de_back de_chain[1] - #ifdef _KERNEL #define VTODE(vp) ((struct denode *)(vp)->v_data) From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:36:06 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5F9910656F0; Mon, 3 May 2010 12:36:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 91E3C8FC1D; Mon, 3 May 2010 12:36:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43Ca61U080027; Mon, 3 May 2010 12:36:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43Ca6s3080024; Mon, 3 May 2010 12:36:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031236.o43Ca6s3080024@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207564 - stable/8/sbin/newfs_msdos X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:36:06 -0000 Author: kib Date: Mon May 3 12:36:06 2010 New Revision: 207564 URL: http://svn.freebsd.org/changeset/base/207564 Log: MFC r203868: Some cleanups from NetBSD. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 stable/8/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/8/sbin/newfs_msdos/ (props changed) Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:06:40 2010 (r207563) +++ stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:36:06 2010 (r207564) @@ -116,7 +116,7 @@ The default is .It Fl S Ar sector-size Number of bytes per sector. Acceptable values are powers of 2 -in the range 128 through 32768. +in the range 512 through 32768. .It Fl a Ar FAT-size Number of sectors per FAT. .It Fl b Ar block-size Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:06:40 2010 (r207563) +++ stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:36:06 2010 (r207564) @@ -62,12 +62,12 @@ static const char rcsid[] = #define DEFBLK16 2048 /* default block size FAT16 */ #define DEFRDE 512 /* default root directory entries */ #define RESFTE 2 /* reserved FAT entries */ -#define MINCLS12 1 /* minimum FAT12 clusters */ -#define MINCLS16 0x1000 /* minimum FAT16 clusters */ -#define MINCLS32 2 /* minimum FAT32 clusters */ -#define MAXCLS12 0xfed /* maximum FAT12 clusters */ -#define MAXCLS16 0xfff5 /* maximum FAT16 clusters */ -#define MAXCLS32 0xffffff5 /* maximum FAT32 clusters */ +#define MINCLS12 1U /* minimum FAT12 clusters */ +#define MINCLS16 0x1000U /* minimum FAT16 clusters */ +#define MINCLS32 2U /* minimum FAT32 clusters */ +#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ +#define MAXCLS16 0xfff5U /* maximum FAT16 clusters */ +#define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */ #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ @@ -165,20 +165,23 @@ struct bpb { #define BPBGAP 0, 0, 0, 0, 0, 0 +#define INIT(a, b, c, d, e, f, g, h, i, j) \ + { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ + .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } static struct { const char *name; struct bpb bpb; } const stdfmt[] = { - {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}}, - {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, - {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, - {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, - {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, - {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, - {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, - {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, - {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, - {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} + {"160", INIT(512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1)}, + {"180", INIT(512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1)}, + {"320", INIT(512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2)}, + {"360", INIT(512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2)}, + {"640", INIT(512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2)}, + {"720", INIT(512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2)}, + {"1200", INIT(512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2)}, + {"1232", INIT(1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2)}, + {"1440", INIT(512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2)}, + {"2880", INIT(512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2)} }; static const u_int8_t bootcode[] = { @@ -533,7 +536,7 @@ main(int argc, char *argv[]) if (!bpb.res) bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; else if (bpb.res < x) - errx(1, "too few reserved sectors"); + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); if (fat != 32 && !bpb.rde) bpb.rde = DEFRDE; rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); @@ -657,7 +660,7 @@ main(int argc, char *argv[]) ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO NAME"); + mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); setstr(bsx->type, buf, sizeof(bsx->type)); if (!opt_B) { @@ -666,7 +669,7 @@ main(int argc, char *argv[]) mk1(bs->jmp[0], 0xeb); mk1(bs->jmp[1], x1 - 2); mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD 4.4", + setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", sizeof(bs->oem)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:37:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27AB81065673; Mon, 3 May 2010 12:37:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 15F4D8FC24; Mon, 3 May 2010 12:37:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43CbYVF080400; Mon, 3 May 2010 12:37:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CbY2X080397; Mon, 3 May 2010 12:37:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031237.o43CbY2X080397@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207565 - stable/8/sbin/newfs_msdos X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:37:34 -0000 Author: kib Date: Mon May 3 12:37:33 2010 New Revision: 207565 URL: http://svn.freebsd.org/changeset/base/207565 Log: MFC r203869: Rename variables to match msdosfs headers. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 stable/8/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/8/sbin/newfs_msdos/ (props changed) Modified: stable/8/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:36:06 2010 (r207564) +++ stable/8/sbin/newfs_msdos/newfs_msdos.8 Mon May 3 12:37:33 2010 (r207565) @@ -38,14 +38,14 @@ .Op Fl B Ar boot .Op Fl C Ar create-size .Op Fl F Ar FAT-type -.Op Fl I Ar volid +.Op Fl I Ar VolumeId .Op Fl L Ar label .Op Fl O Ar OEM .Op Fl S Ar sector-size .Op Fl a Ar FAT-size .Op Fl b Ar block-size .Op Fl c Ar cluster-size -.Op Fl e Ar dirents +.Op Fl e Ar DirEnts .Op Fl f Ar format .Op Fl h Ar heads .Op Fl i Ar info @@ -103,7 +103,7 @@ If the file system supports sparse files smaller than the size specified as parameter. .It Fl F Ar FAT-type FAT type (one of 12, 16, or 32). -.It Fl I Ar volid +.It Fl I Ar VolumeID Volume ID, a 32 bit number in decimal or hexadecimal (0x...) format. .It Fl L Ar label Volume label (up to 11 characters). @@ -130,7 +130,7 @@ Acceptable values are powers of 2 in the If the block or cluster size are not specified, the code uses a cluster between 512 bytes and 32K depending on the filesystem size. -.It Fl e Ar dirents +.It Fl e Ar DirEnts Number of root directory entries (FAT12 and FAT16 only). .It Fl f Ar format Specify a standard (floppy disk) format. Modified: stable/8/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:36:06 2010 (r207564) +++ stable/8/sbin/newfs_msdos/newfs_msdos.c Mon May 3 12:37:33 2010 (r207565) @@ -96,78 +96,78 @@ static const char rcsid[] = #define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) struct bs { - u_int8_t jmp[3]; /* bootstrap entry point */ - u_int8_t oem[8]; /* OEM name and version */ + u_int8_t bsJump[3]; /* bootstrap entry point */ + u_int8_t bsOemName[8]; /* OEM name and version */ }; struct bsbpb { - u_int8_t bps[2]; /* bytes per sector */ - u_int8_t spc; /* sectors per cluster */ - u_int8_t res[2]; /* reserved sectors */ - u_int8_t nft; /* number of FATs */ - u_int8_t rde[2]; /* root directory entries */ - u_int8_t sec[2]; /* total sectors */ - u_int8_t mid; /* media descriptor */ - u_int8_t spf[2]; /* sectors per FAT */ - u_int8_t spt[2]; /* sectors per track */ - u_int8_t hds[2]; /* drive heads */ - u_int8_t hid[4]; /* hidden sectors */ - u_int8_t bsec[4]; /* big total sectors */ + u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ + u_int8_t bpbSecPerClust; /* sectors per cluster */ + u_int8_t bpbResSectors[2]; /* reserved sectors */ + u_int8_t bpbFATs; /* number of FATs */ + u_int8_t bpbRootDirEnts[2]; /* root directory entries */ + u_int8_t bpbSectors[2]; /* total sectors */ + u_int8_t bpbMedia; /* media descriptor */ + u_int8_t bpbFATsecs[2]; /* sectors per FAT */ + u_int8_t bpbSecPerTrack[2]; /* sectors per track */ + u_int8_t bpbHeads[2]; /* drive heads */ + u_int8_t bpbHiddenSecs[4]; /* hidden sectors */ + u_int8_t bpbHugeSectors[4]; /* big total sectors */ }; struct bsxbpb { - u_int8_t bspf[4]; /* big sectors per FAT */ - u_int8_t xflg[2]; /* FAT control flags */ - u_int8_t vers[2]; /* file system version */ - u_int8_t rdcl[4]; /* root directory start cluster */ - u_int8_t infs[2]; /* file system info sector */ - u_int8_t bkbs[2]; /* backup boot sector */ - u_int8_t rsvd[12]; /* reserved */ + u_int8_t bpbBigFATsecs[4]; /* big sectors per FAT */ + u_int8_t bpbExtFlags[2]; /* FAT control flags */ + u_int8_t bpbFSVers[2]; /* file system version */ + u_int8_t bpbRootClust[4]; /* root directory start cluster */ + u_int8_t bpbFSInfo[2]; /* file system info sector */ + u_int8_t bpbBackup[2]; /* backup boot sector */ + u_int8_t bpbReserved[12]; /* reserved */ }; struct bsx { - u_int8_t drv; /* drive number */ - u_int8_t rsvd; /* reserved */ - u_int8_t sig; /* extended boot signature */ - u_int8_t volid[4]; /* volume ID number */ - u_int8_t label[11]; /* volume label */ - u_int8_t type[8]; /* file system type */ + u_int8_t exDriveNumber; /* drive number */ + u_int8_t exReserved1; /* reserved */ + u_int8_t exBootSignature; /* extended boot signature */ + u_int8_t exVolumeID[4]; /* volume ID number */ + u_int8_t exVolumeLabel[11]; /* volume label */ + u_int8_t exFileSysType[8]; /* file system type */ }; struct de { - u_int8_t namext[11]; /* name and extension */ - u_int8_t attr; /* attributes */ + u_int8_t deName[11]; /* name and extension */ + u_int8_t deAttributes; /* attributes */ u_int8_t rsvd[10]; /* reserved */ - u_int8_t time[2]; /* creation time */ - u_int8_t date[2]; /* creation date */ - u_int8_t clus[2]; /* starting cluster */ - u_int8_t size[4]; /* size */ + u_int8_t deMTime[2]; /* creation time */ + u_int8_t deMDate[2]; /* creation date */ + u_int8_t deStartCluster[2]; /* starting cluster */ + u_int8_t deFileSize[4]; /* size */ }; struct bpb { - u_int bps; /* bytes per sector */ - u_int spc; /* sectors per cluster */ - u_int res; /* reserved sectors */ - u_int nft; /* number of FATs */ - u_int rde; /* root directory entries */ - u_int sec; /* total sectors */ - u_int mid; /* media descriptor */ - u_int spf; /* sectors per FAT */ - u_int spt; /* sectors per track */ - u_int hds; /* drive heads */ - u_int hid; /* hidden sectors */ - u_int bsec; /* big total sectors */ - u_int bspf; /* big sectors per FAT */ - u_int rdcl; /* root directory start cluster */ - u_int infs; /* file system info sector */ - u_int bkbs; /* backup boot sector */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* reserved sectors */ + u_int bpbFATs; /* number of FATs */ + u_int bpbRootDirEnts; /* root directory entries */ + u_int bpbSectors; /* total sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsecs; /* sectors per FAT */ + u_int bpbSecPerTrack; /* sectors per track */ + u_int bpbHeads; /* drive heads */ + u_int bpbHiddenSecs; /* hidden sectors */ + u_int bpbHugeSectors; /* big total sectors */ + u_int bpbBigFATsecs; /* big sectors per FAT */ + u_int bpbRootClust; /* root directory start cluster */ + u_int bpbFSInfo; /* file system info sector */ + u_int bpbBackup; /* backup boot sector */ }; #define BPBGAP 0, 0, 0, 0, 0, 0 #define INIT(a, b, c, d, e, f, g, h, i, j) \ - { .bps = a, .spc = b, .res = c, .nft = d, .rde = e, \ - .sec = f, .mid = g, .spf = h, .spt = i, .hds = j, } + { .bpbBytesPerSec = a, .bpbSecPerClust = b, .bpbResSectors = c, .bpbFATs = d, .bpbRootDirEnts = e, \ + .bpbSectors = f, .bpbMedia = g, .bpbFATsecs = h, .bpbSecPerTrack = i, .bpbHeads = j, } static struct { const char *name; struct bpb bpb; @@ -384,49 +384,49 @@ main(int argc, char *argv[]) memset(&bpb, 0, sizeof(bpb)); if (opt_f) { getstdfmt(opt_f, &bpb); - bpb.bsec = bpb.sec; - bpb.sec = 0; - bpb.bspf = bpb.spf; - bpb.spf = 0; + bpb.bpbHugeSectors = bpb.bpbSectors; + bpb.bpbSectors = 0; + bpb.bpbBigFATsecs = bpb.bpbFATsecs; + bpb.bpbFATsecs = 0; } if (opt_h) - bpb.hds = opt_h; + bpb.bpbHeads = opt_h; if (opt_u) - bpb.spt = opt_u; + bpb.bpbSecPerTrack = opt_u; if (opt_S) - bpb.bps = opt_S; + bpb.bpbBytesPerSec = opt_S; if (opt_s) - bpb.bsec = opt_s; + bpb.bpbHugeSectors = opt_s; if (oflag) - bpb.hid = opt_o; + bpb.bpbHiddenSecs = opt_o; if (!(opt_f || (opt_h && opt_u && opt_S && opt_s && oflag))) { off_t delta; getdiskinfo(fd, fname, dtype, oflag, &bpb); - bpb.bsec -= (opt_ofs / bpb.bps); - delta = bpb.bsec % bpb.spt; + bpb.bpbHugeSectors -= (opt_ofs / bpb.bpbBytesPerSec); + delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; if (delta != 0) { warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.spt); - bpb.bsec -= delta; + (int)delta, bpb.bpbSecPerTrack); + bpb.bpbHugeSectors -= delta; } - if (bpb.spc == 0) { /* set defaults */ - if (bpb.bsec <= 6000) /* about 3MB -> 512 bytes */ - bpb.spc = 1; - else if (bpb.bsec <= (1<<17)) /* 64M -> 4k */ - bpb.spc = 8; - else if (bpb.bsec <= (1<<19)) /* 256M -> 8k */ - bpb.spc = 16; - else if (bpb.bsec <= (1<<21)) /* 1G -> 16k */ - bpb.spc = 32; + if (bpb.bpbSecPerClust == 0) { /* set defaults */ + if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */ + bpb.bpbSecPerClust = 1; + else if (bpb.bpbHugeSectors <= (1<<17)) /* 64M -> 4k */ + bpb.bpbSecPerClust = 8; + else if (bpb.bpbHugeSectors <= (1<<19)) /* 256M -> 8k */ + bpb.bpbSecPerClust = 16; + else if (bpb.bpbHugeSectors <= (1<<21)) /* 1G -> 16k */ + bpb.bpbSecPerClust = 32; else - bpb.spc = 64; /* otherwise 32k */ + bpb.bpbSecPerClust = 64; /* otherwise 32k */ } } - if (!powerof2(bpb.bps)) - errx(1, "bytes/sector (%u) is not a power of 2", bpb.bps); - if (bpb.bps < MINBPS) + if (!powerof2(bpb.bpbBytesPerSec)) + errx(1, "bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + if (bpb.bpbBytesPerSec < MINBPS) errx(1, "bytes/sector (%u) is too small; minimum is %u", - bpb.bps, MINBPS); + bpb.bpbBytesPerSec, MINBPS); if (!(fat = opt_F)) { if (opt_f) fat = 12; @@ -438,44 +438,44 @@ main(int argc, char *argv[]) fat == 32 ? 'e' : opt_i ? 'i' : 'k', fat == 32 ? "32" : "12/16"); if (opt_f && fat == 32) - bpb.rde = 0; + bpb.bpbRootDirEnts = 0; if (opt_b) { if (!powerof2(opt_b)) errx(1, "block size (%u) is not a power of 2", opt_b); - if (opt_b < bpb.bps) + if (opt_b < bpb.bpbBytesPerSec) errx(1, "block size (%u) is too small; minimum is %u", - opt_b, bpb.bps); - if (opt_b > bpb.bps * MAXSPC) + opt_b, bpb.bpbBytesPerSec); + if (opt_b > bpb.bpbBytesPerSec * MAXSPC) errx(1, "block size (%u) is too large; maximum is %u", - opt_b, bpb.bps * MAXSPC); - bpb.spc = opt_b / bpb.bps; + opt_b, bpb.bpbBytesPerSec * MAXSPC); + bpb.bpbSecPerClust = opt_b / bpb.bpbBytesPerSec; } if (opt_c) { if (!powerof2(opt_c)) errx(1, "sectors/cluster (%u) is not a power of 2", opt_c); - bpb.spc = opt_c; + bpb.bpbSecPerClust = opt_c; } if (opt_r) - bpb.res = opt_r; + bpb.bpbResSectors = opt_r; if (opt_n) { if (opt_n > MAXNFT) errx(1, "number of FATs (%u) is too large; maximum is %u", opt_n, MAXNFT); - bpb.nft = opt_n; + bpb.bpbFATs = opt_n; } if (opt_e) - bpb.rde = opt_e; + bpb.bpbRootDirEnts = opt_e; if (mflag) { if (opt_m < 0xf0) errx(1, "illegal media descriptor (%#x)", opt_m); - bpb.mid = opt_m; + bpb.bpbMedia = opt_m; } if (opt_a) - bpb.bspf = opt_a; + bpb.bpbBigFATsecs = opt_a; if (opt_i) - bpb.infs = opt_i; + bpb.bpbFSInfo = opt_i; if (opt_k) - bpb.bkbs = opt_k; + bpb.bpbBackup = opt_k; bss = 1; bname = NULL; fd1 = -1; @@ -488,87 +488,87 @@ main(int argc, char *argv[]) } if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) err(1, "%s", bname); - if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bps || - sb.st_size < bpb.bps || sb.st_size > bpb.bps * MAXU16) + if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || + sb.st_size < bpb.bpbBytesPerSec || sb.st_size > bpb.bpbBytesPerSec * MAXU16) errx(1, "%s: inappropriate file type or format", bname); - bss = sb.st_size / bpb.bps; + bss = sb.st_size / bpb.bpbBytesPerSec; } - if (!bpb.nft) - bpb.nft = 2; + if (!bpb.bpbFATs) + bpb.bpbFATs = 2; if (!fat) { - if (bpb.bsec < (bpb.res ? bpb.res : bss) + - howmany((RESFTE + (bpb.spc ? MINCLS16 : MAXCLS12 + 1)) * - ((bpb.spc ? 16 : 12) / BPN), bpb.bps * NPB) * - bpb.nft + - howmany(bpb.rde ? bpb.rde : DEFRDE, - bpb.bps / sizeof(struct de)) + - (bpb.spc ? MINCLS16 : MAXCLS12 + 1) * - (bpb.spc ? bpb.spc : howmany(DEFBLK, bpb.bps))) + if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) * + ((bpb.bpbSecPerClust ? 16 : 12) / BPN), bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + + howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE, + bpb.bpbBytesPerSec / sizeof(struct de)) + + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) * + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(DEFBLK, bpb.bpbBytesPerSec))) fat = 12; - else if (bpb.rde || bpb.bsec < - (bpb.res ? bpb.res : bss) + - howmany((RESFTE + MAXCLS16) * 2, bpb.bps) * bpb.nft + - howmany(DEFRDE, bpb.bps / sizeof(struct de)) + + else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors < + (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + + howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * bpb.bpbFATs + + howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + (MAXCLS16 + 1) * - (bpb.spc ? bpb.spc : howmany(8192, bpb.bps))) + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(8192, bpb.bpbBytesPerSec))) fat = 16; else fat = 32; } x = bss; if (fat == 32) { - if (!bpb.infs) { - if (x == MAXU16 || x == bpb.bkbs) + if (!bpb.bpbFSInfo) { + if (x == MAXU16 || x == bpb.bpbBackup) errx(1, "no room for info sector"); - bpb.infs = x; + bpb.bpbFSInfo = x; } - if (bpb.infs != MAXU16 && x <= bpb.infs) - x = bpb.infs + 1; - if (!bpb.bkbs) { + if (bpb.bpbFSInfo != MAXU16 && x <= bpb.bpbFSInfo) + x = bpb.bpbFSInfo + 1; + if (!bpb.bpbBackup) { if (x == MAXU16) errx(1, "no room for backup sector"); - bpb.bkbs = x; - } else if (bpb.bkbs != MAXU16 && bpb.bkbs == bpb.infs) + bpb.bpbBackup = x; + } else if (bpb.bpbBackup != MAXU16 && bpb.bpbBackup == bpb.bpbFSInfo) errx(1, "backup sector would overwrite info sector"); - if (bpb.bkbs != MAXU16 && x <= bpb.bkbs) - x = bpb.bkbs + 1; + if (bpb.bpbBackup != MAXU16 && x <= bpb.bpbBackup) + x = bpb.bpbBackup + 1; } - if (!bpb.res) - bpb.res = fat == 32 ? MAX(x, MAX(16384 / bpb.bps, 4)) : x; - else if (bpb.res < x) - errx(1, "too few reserved sectors (need %d have %d)", x, bpb.res); - if (fat != 32 && !bpb.rde) - bpb.rde = DEFRDE; - rds = howmany(bpb.rde, bpb.bps / sizeof(struct de)); - if (!bpb.spc) - for (bpb.spc = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bps); - bpb.spc < MAXSPC && - bpb.res + + if (!bpb.bpbResSectors) + bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; + else if (bpb.bpbResSectors < x) + errx(1, "too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors); + if (fat != 32 && !bpb.bpbRootDirEnts) + bpb.bpbRootDirEnts = DEFRDE; + rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); + if (!bpb.bpbSecPerClust) + for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bpbBytesPerSec); + bpb.bpbSecPerClust < MAXSPC && + bpb.bpbResSectors + howmany((RESFTE + maxcls(fat)) * (fat / BPN), - bpb.bps * NPB) * bpb.nft + + bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs + rds + - (u_int64_t)(maxcls(fat) + 1) * bpb.spc <= bpb.bsec; - bpb.spc <<= 1); - if (fat != 32 && bpb.bspf > MAXU16) + (u_int64_t)(maxcls(fat) + 1) * bpb.bpbSecPerClust <= bpb.bpbHugeSectors; + bpb.bpbSecPerClust <<= 1); + if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) errx(1, "too many sectors/FAT for FAT12/16"); - x1 = bpb.res + rds; - x = bpb.bspf ? bpb.bspf : 1; - if (x1 + (u_int64_t)x * bpb.nft > bpb.bsec) + x1 = bpb.bpbResSectors + rds; + x = bpb.bpbBigFATsecs ? bpb.bpbBigFATsecs : 1; + if (x1 + (u_int64_t)x * bpb.bpbFATs > bpb.bpbHugeSectors) errx(1, "meta data exceeds file system size"); - x1 += x * bpb.nft; - x = (u_int64_t)(bpb.bsec - x1) * bpb.bps * NPB / - (bpb.spc * bpb.bps * NPB + fat / BPN * bpb.nft); + x1 += x * bpb.bpbFATs; + x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / + (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / BPN * bpb.bpbFATs); x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), - bpb.bps * NPB); - if (!bpb.bspf) { - bpb.bspf = x2; - x1 += (bpb.bspf - 1) * bpb.nft; + bpb.bpbBytesPerSec * NPB); + if (!bpb.bpbBigFATsecs) { + bpb.bpbBigFATsecs = x2; + x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; } - cls = (bpb.bsec - x1) / bpb.spc; - x = (u_int64_t)bpb.bspf * bpb.bps * NPB / (fat / BPN) - RESFTE; + cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust; + x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - RESFTE; if (cls > x) cls = x; - if (bpb.bspf < x2) + if (bpb.bpbBigFATsecs < x2) warnx("warning: sectors/FAT limits file system to %u clusters", cls); if (cls < mincls(fat)) @@ -576,79 +576,79 @@ main(int argc, char *argv[]) mincls(fat)); if (cls > maxcls(fat)) { cls = maxcls(fat); - bpb.bsec = x1 + (cls + 1) * bpb.spc - 1; + bpb.bpbHugeSectors = x1 + (cls + 1) * bpb.bpbSecPerClust - 1; warnx("warning: FAT type limits file system to %u sectors", - bpb.bsec); + bpb.bpbHugeSectors); } printf("%s: %u sector%s in %u FAT%u cluster%s " - "(%u bytes/cluster)\n", fname, cls * bpb.spc, - cls * bpb.spc == 1 ? "" : "s", cls, fat, - cls == 1 ? "" : "s", bpb.bps * bpb.spc); - if (!bpb.mid) - bpb.mid = !bpb.hid ? 0xf0 : 0xf8; + "(%u bytes/cluster)\n", fname, cls * bpb.bpbSecPerClust, + cls * bpb.bpbSecPerClust == 1 ? "" : "s", cls, fat, + cls == 1 ? "" : "s", bpb.bpbBytesPerSec * bpb.bpbSecPerClust); + if (!bpb.bpbMedia) + bpb.bpbMedia = !bpb.bpbHiddenSecs ? 0xf0 : 0xf8; if (fat == 32) - bpb.rdcl = RESFTE; - if (bpb.hid + bpb.bsec <= MAXU16) { - bpb.sec = bpb.bsec; - bpb.bsec = 0; + bpb.bpbRootClust = RESFTE; + if (bpb.bpbHiddenSecs + bpb.bpbHugeSectors <= MAXU16) { + bpb.bpbSectors = bpb.bpbHugeSectors; + bpb.bpbHugeSectors = 0; } if (fat != 32) { - bpb.spf = bpb.bspf; - bpb.bspf = 0; + bpb.bpbFATsecs = bpb.bpbBigFATsecs; + bpb.bpbBigFATsecs = 0; } print_bpb(&bpb); if (!opt_N) { gettimeofday(&tv, NULL); now = tv.tv_sec; tm = localtime(&now); - if (!(img = malloc(bpb.bps))) + if (!(img = malloc(bpb.bpbBytesPerSec))) err(1, NULL); - dir = bpb.res + (bpb.spf ? bpb.spf : bpb.bspf) * bpb.nft; - for (lsn = 0; lsn < dir + (fat == 32 ? bpb.spc : rds); lsn++) { + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; + for (lsn = 0; lsn < dir + (fat == 32 ? bpb.bpbSecPerClust : rds); lsn++) { x = lsn; if (opt_B && - fat == 32 && bpb.bkbs != MAXU16 && - bss <= bpb.bkbs && x >= bpb.bkbs) { - x -= bpb.bkbs; + fat == 32 && bpb.bpbBackup != MAXU16 && + bss <= bpb.bpbBackup && x >= bpb.bpbBackup) { + x -= bpb.bpbBackup; if (!x && lseek(fd1, opt_ofs, SEEK_SET)) err(1, "%s", bname); } if (opt_B && x < bss) { - if ((n = read(fd1, img, bpb.bps)) == -1) + if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", bname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't read sector %u", bname, x); } else - memset(img, 0, bpb.bps); + memset(img, 0, bpb.bpbBytesPerSec); if (!lsn || - (fat == 32 && bpb.bkbs != MAXU16 && lsn == bpb.bkbs)) { + (fat == 32 && bpb.bpbBackup != MAXU16 && lsn == bpb.bpbBackup)) { x1 = sizeof(struct bs); bsbpb = (struct bsbpb *)(img + x1); - mk2(bsbpb->bps, bpb.bps); - mk1(bsbpb->spc, bpb.spc); - mk2(bsbpb->res, bpb.res); - mk1(bsbpb->nft, bpb.nft); - mk2(bsbpb->rde, bpb.rde); - mk2(bsbpb->sec, bpb.sec); - mk1(bsbpb->mid, bpb.mid); - mk2(bsbpb->spf, bpb.spf); - mk2(bsbpb->spt, bpb.spt); - mk2(bsbpb->hds, bpb.hds); - mk4(bsbpb->hid, bpb.hid); - mk4(bsbpb->bsec, bpb.bsec); + mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec); + mk1(bsbpb->bpbSecPerClust, bpb.bpbSecPerClust); + mk2(bsbpb->bpbResSectors, bpb.bpbResSectors); + mk1(bsbpb->bpbFATs, bpb.bpbFATs); + mk2(bsbpb->bpbRootDirEnts, bpb.bpbRootDirEnts); + mk2(bsbpb->bpbSectors, bpb.bpbSectors); + mk1(bsbpb->bpbMedia, bpb.bpbMedia); + mk2(bsbpb->bpbFATsecs, bpb.bpbFATsecs); + mk2(bsbpb->bpbSecPerTrack, bpb.bpbSecPerTrack); + mk2(bsbpb->bpbHeads, bpb.bpbHeads); + mk4(bsbpb->bpbHiddenSecs, bpb.bpbHiddenSecs); + mk4(bsbpb->bpbHugeSectors, bpb.bpbHugeSectors); x1 += sizeof(struct bsbpb); if (fat == 32) { bsxbpb = (struct bsxbpb *)(img + x1); - mk4(bsxbpb->bspf, bpb.bspf); - mk2(bsxbpb->xflg, 0); - mk2(bsxbpb->vers, 0); - mk4(bsxbpb->rdcl, bpb.rdcl); - mk2(bsxbpb->infs, bpb.infs); - mk2(bsxbpb->bkbs, bpb.bkbs); + mk4(bsxbpb->bpbBigFATsecs, bpb.bpbBigFATsecs); + mk2(bsxbpb->bpbExtFlags, 0); + mk2(bsxbpb->bpbFSVers, 0); + mk4(bsxbpb->bpbRootClust, bpb.bpbRootClust); + mk2(bsxbpb->bpbFSInfo, bpb.bpbFSInfo); + mk2(bsxbpb->bpbBackup, bpb.bpbBackup); x1 += sizeof(struct bsxbpb); } bsx = (struct bsx *)(img + x1); - mk1(bsx->sig, 0x29); + mk1(bsx->exBootSignature, 0x29); if (Iflag) x = opt_I; else @@ -659,52 +659,52 @@ main(int argc, char *argv[]) ((u_int)(1900 + tm->tm_year) + ((u_int)tm->tm_hour << 8 | (u_int)tm->tm_min)); - mk4(bsx->volid, x); - mklabel(bsx->label, opt_L ? opt_L : "NO_NAME"); + mk4(bsx->exVolumeID, x); + mklabel(bsx->exVolumeLabel, opt_L ? opt_L : "NO_NAME"); sprintf(buf, "FAT%u", fat); - setstr(bsx->type, buf, sizeof(bsx->type)); + setstr(bsx->exFileSysType, buf, sizeof(bsx->exFileSysType)); if (!opt_B) { x1 += sizeof(struct bsx); bs = (struct bs *)img; - mk1(bs->jmp[0], 0xeb); - mk1(bs->jmp[1], x1 - 2); - mk1(bs->jmp[2], 0x90); - setstr(bs->oem, opt_O ? opt_O : "BSD4.4 ", - sizeof(bs->oem)); + mk1(bs->bsJump[0], 0xeb); + mk1(bs->bsJump[1], x1 - 2); + mk1(bs->bsJump[2], 0x90); + setstr(bs->bsOemName, opt_O ? opt_O : "BSD4.4 ", + sizeof(bs->bsOemName)); memcpy(img + x1, bootcode, sizeof(bootcode)); mk2(img + MINBPS - 2, DOSMAGIC); } - } else if (fat == 32 && bpb.infs != MAXU16 && - (lsn == bpb.infs || - (bpb.bkbs != MAXU16 && - lsn == bpb.bkbs + bpb.infs))) { + } else if (fat == 32 && bpb.bpbFSInfo != MAXU16 && + (lsn == bpb.bpbFSInfo || + (bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup + bpb.bpbFSInfo))) { mk4(img, 0x41615252); mk4(img + MINBPS - 28, 0x61417272); mk4(img + MINBPS - 24, 0xffffffff); - mk4(img + MINBPS - 20, bpb.rdcl); + mk4(img + MINBPS - 20, bpb.bpbRootClust); mk2(img + MINBPS - 2, DOSMAGIC); - } else if (lsn >= bpb.res && lsn < dir && - !((lsn - bpb.res) % - (bpb.spf ? bpb.spf : bpb.bspf))) { - mk1(img[0], bpb.mid); + } else if (lsn >= bpb.bpbResSectors && lsn < dir && + !((lsn - bpb.bpbResSectors) % + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs))) { + mk1(img[0], bpb.bpbMedia); for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); } else if (lsn == dir && opt_L) { de = (struct de *)img; - mklabel(de->namext, opt_L); - mk1(de->attr, 050); + mklabel(de->deName, opt_L); + mk1(de->deAttributes, 050); x = (u_int)tm->tm_hour << 11 | (u_int)tm->tm_min << 5 | (u_int)tm->tm_sec >> 1; - mk2(de->time, x); + mk2(de->deMTime, x); x = (u_int)(tm->tm_year - 80) << 9 | (u_int)(tm->tm_mon + 1) << 5 | (u_int)tm->tm_mday; - mk2(de->date, x); + mk2(de->deMDate, x); } - if ((n = write(fd, img, bpb.bps)) == -1) + if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) err(1, "%s", fname); - if ((unsigned)n != bpb.bps) + if ((unsigned)n != bpb.bpbBytesPerSec) errx(1, "%s: can't write sector %u", fname, lsn); } } @@ -797,18 +797,19 @@ getdiskinfo(int fd, const char *fname, c /* Maybe it's a fixed drive */ if (lp == NULL) { + if (bpb->bpbBytesPerSec) + dlp.d_secsize = bpb->bpbBytesPerSec; if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { - if (bpb->bps == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) errx(1, "Cannot get sector size, %s", strerror(errno)); - /* XXX Should we use bpb->bps if it's set? */ dlp.d_secperunit = ms / dlp.d_secsize; - if (bpb->spt == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { warnx("Cannot get number of sectors per track, %s", strerror(errno)); dlp.d_nsectors = 63; } - if (bpb->hds == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { warnx("Cannot get number of heads, %s", strerror(errno)); if (dlp.d_secperunit <= 63*1*1024) dlp.d_ntracks = 1; @@ -823,16 +824,16 @@ getdiskinfo(int fd, const char *fname, c lp = &dlp; } - if (bpb->bps == 0) - bpb->bps = ckgeom(fname, lp->d_secsize, "bytes/sector"); - if (bpb->spt == 0) - bpb->spt = ckgeom(fname, lp->d_nsectors, "sectors/track"); - if (bpb->hds == 0) - bpb->hds = ckgeom(fname, lp->d_ntracks, "drive heads"); - if (bpb->bsec == 0) - bpb->bsec = lp->d_secperunit; - if (bpb->hid == 0) - bpb->hid = hs; + if (bpb->bpbBytesPerSec == 0) + bpb->bpbBytesPerSec = ckgeom(fname, lp->d_secsize, "bytes/sector"); + if (bpb->bpbSecPerTrack == 0) + bpb->bpbSecPerTrack = ckgeom(fname, lp->d_nsectors, "sectors/track"); + if (bpb->bpbHeads == 0) + bpb->bpbHeads = ckgeom(fname, lp->d_ntracks, "drive heads"); + if (bpb->bpbHugeSectors == 0) + bpb->bpbHugeSectors = lp->d_secperunit; + if (bpb->bpbHiddenSecs == 0) + bpb->bpbHiddenSecs = hs; } /* @@ -841,24 +842,24 @@ getdiskinfo(int fd, const char *fname, c static void print_bpb(struct bpb *bpb) { - printf("bps=%u spc=%u res=%u nft=%u", bpb->bps, bpb->spc, bpb->res, - bpb->nft); - if (bpb->rde) - printf(" rde=%u", bpb->rde); - if (bpb->sec) - printf(" sec=%u", bpb->sec); - printf(" mid=%#x", bpb->mid); - if (bpb->spf) - printf(" spf=%u", bpb->spf); - printf(" spt=%u hds=%u hid=%u", bpb->spt, bpb->hds, bpb->hid); - if (bpb->bsec) - printf(" bsec=%u", bpb->bsec); - if (!bpb->spf) { - printf(" bspf=%u rdcl=%u", bpb->bspf, bpb->rdcl); - printf(" infs="); - printf(bpb->infs == MAXU16 ? "%#x" : "%u", bpb->infs); - printf(" bkbs="); - printf(bpb->bkbs == MAXU16 ? "%#x" : "%u", bpb->bkbs); + printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, + bpb->bpbFATs); + if (bpb->bpbRootDirEnts) + printf(" RootDirEnts=%u", bpb->bpbRootDirEnts); + if (bpb->bpbSectors) + printf(" Sectors=%u", bpb->bpbSectors); + printf(" Media=%#x", bpb->bpbMedia); + if (bpb->bpbFATsecs) + printf(" FATsecs=%u", bpb->bpbFATsecs); + printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, bpb->bpbHeads, bpb->bpbHiddenSecs); + if (bpb->bpbHugeSectors) + printf(" HugeSectors=%u", bpb->bpbHugeSectors); + if (!bpb->bpbFATsecs) { + printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, bpb->bpbRootClust); + printf(" FSInfo="); + printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo); + printf(" Backup="); + printf(bpb->bpbBackup == MAXU16 ? "%#x" : "%u", bpb->bpbBackup); } printf("\n"); } From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:39:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AC641065673; Mon, 3 May 2010 12:39:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 18EDA8FC25; Mon, 3 May 2010 12:39:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43CdSe4080858; Mon, 3 May 2010 12:39:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CdS4t080849; Mon, 3 May 2010 12:39:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031239.o43CdS4t080849@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207566 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:39:29 -0000 Author: kib Date: Mon May 3 12:39:27 2010 New Revision: 207566 URL: http://svn.freebsd.org/changeset/base/207566 Log: MFC r203871: License changes from NetBSD. Move to 2 clause license, approved by Wolfgang Solfrank. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/ext.h stable/8/sbin/fsck_msdosfs/fat.c stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 stable/8/sbin/fsck_msdosfs/main.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:39:27 2010 (r207566) @@ -12,13 +12,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:39:27 2010 (r207566) @@ -12,13 +12,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/ext.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 ============================================================================== --- stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/fsck_msdosfs.8 Mon May 3 12:39:27 2010 (r207566) @@ -11,13 +11,6 @@ .\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by Martin Husemann -.\" and Wolfgang Solfrank. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES Modified: stable/8/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:37:33 2010 (r207565) +++ stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:39:27 2010 (r207566) @@ -10,13 +10,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Martin Husemann - * and Wolfgang Solfrank. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:41:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46C5C106564A; Mon, 3 May 2010 12:41:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 34E828FC19; Mon, 3 May 2010 12:41:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43CfSDc081375; Mon, 3 May 2010 12:41:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43CfSCG081367; Mon, 3 May 2010 12:41:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031241.o43CfSCG081367@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207567 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:41:28 -0000 Author: kib Date: Mon May 3 12:41:27 2010 New Revision: 207567 URL: http://svn.freebsd.org/changeset/base/207567 Log: MFC r203872: Bug fixes from NetBSD. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/ext.h stable/8/sbin/fsck_msdosfs/fat.c stable/8/sbin/fsck_msdosfs/main.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include @@ -41,16 +40,15 @@ static const char rcsid[] = #include "fsutil.h" int -readboot(dosfs, boot) - int dosfs; - struct bootblock *boot; +readboot(int dosfs, struct bootblock *boot) { u_char block[DOSBOOTBLOCKSIZE]; u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; u_char backup[DOSBOOTBLOCKSIZE]; int ret = FSOK; + int i; - if (read(dosfs, block, sizeof block) < sizeof block) { + if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { perror("could not read boot block"); return FSFATAL; } @@ -154,12 +152,22 @@ readboot(dosfs, boot) } backup[65] = block[65]; /* XXX */ if (memcmp(block + 11, backup + 11, 79)) { - /* Correct? XXX */ - pfatal("backup doesn't compare to primary bootblock"); - if (alwaysno) - pfatal("\n"); - else - return FSFATAL; + /* + * XXX We require a reference that explains + * that these bytes need to match, or should + * drop the check. gdt@NetBSD has observed + * filesystems that work fine under Windows XP + * and NetBSD that do not match, so the + * requirement is suspect. For now, just + * print out useful information and continue. + */ + pfatal("backup (block %d) mismatch with primary bootblock:\n", + boot->Backup); + for (i = 11; i < 11 + 90; i++) { + if (block[i] != backup[i]) + pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", + i, block[i], backup[i]); + } } /* Check backup FSInfo? XXX */ } @@ -223,9 +231,7 @@ readboot(dosfs, boot) } int -writefsinfo(dosfs, boot) - int dosfs; - struct bootblock *boot; +writefsinfo(int dosfs, struct bootblock *boot) { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include @@ -47,7 +46,8 @@ checkfilesys(const char *fname) int dosfs; struct bootblock boot; struct fatEntry *fat = NULL; - int i, finish_dosdirsection=0; + int finish_dosdirsection=0; + u_int i; int mod = 0; int ret = 8; Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:41:27 2010 (r207567) @@ -37,7 +37,6 @@ static const char rcsid[] = #include #include #include -#include #include #include @@ -223,12 +222,24 @@ resetDosDirSection(struct bootblock *boo b1 = boot->RootDirEnts * 32; b2 = boot->SecPerClust * boot->BytesPerSec; - if (!(buffer = malloc(b1 > b2 ? b1 : b2)) - || !(delbuf = malloc(b2)) - || !(rootDir = newDosDirEntry())) { - perror("No space for directory"); + if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { + perror("No space for directory buffer"); return FSFATAL; } + + if ((delbuf = malloc(b2)) == NULL) { + free(buffer); + perror("No space for directory delbuf"); + return FSFATAL; + } + + if ((rootDir = newDosDirEntry()) == NULL) { + free(buffer); + free(delbuf); + perror("No space for directory entry"); + return FSFATAL; + } + memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { @@ -360,7 +371,8 @@ removede(int f, struct bootblock *boot, return FSFATAL; start = buffer; } - if (endcl == curcl) + /* startcl is < CLUST_FIRST for !fat32 root */ + if ((endcl == curcl) || (startcl < CLUST_FIRST)) for (; start < end; start += 32) *start = SLOT_DELETED; return FSDIRMOD; @@ -378,7 +390,7 @@ checksize(struct bootblock *boot, struct /* * Check size on ordinary files */ - int32_t physicalSize; + u_int32_t physicalSize; if (dir->head == CLUST_FREE) physicalSize = 0; @@ -637,7 +649,8 @@ readDosDirSection(int f, struct bootbloc dirent.head |= (p[20] << 16) | (p[21] << 24); dirent.size = p[28] | (p[29] << 8) | (p[30] << 16) | (p[31] << 24); if (vallfn) { - strcpy(dirent.lname, longName); + strlcpy(dirent.lname, longName, + sizeof(dirent.lname)); longName[0] = '\0'; shortSum = -1; } @@ -825,6 +838,10 @@ readDosDirSection(int f, struct bootbloc } boot->NumFiles++; } + + if (!(boot->flags & FAT32) && !dir->parent) + break; + if (mod & THISMOD) { last *= 32; if (lseek(f, off, SEEK_SET) != off @@ -840,6 +857,19 @@ readDosDirSection(int f, struct bootbloc invlfn ? invlfn : vallfn, p, invlfn ? invcl : valcl, -1, 0, fullpath(dir), 1); + + /* The root directory of non fat32 filesystems is in a special + * area and may have been modified above without being written out. + */ + if ((mod & FSDIRMOD) && !(boot->flags & FAT32) && !dir->parent) { + last *= 32; + if (lseek(f, off, SEEK_SET) != off + || write(f, buffer, last) != last) { + perror("Unable to write directory"); + return FSFATAL; + } + mod &= ~THISMOD; + } return mod & ~THISMOD; } @@ -929,7 +959,7 @@ reconnect(int dosfs, struct bootblock *b lfoff = lfcl * boot->ClusterSize + boot->ClusterOffset * boot->BytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); return FSFATAL; } @@ -959,7 +989,7 @@ reconnect(int dosfs, struct bootblock *b p[31] = (u_char)(d.size >> 24); fat[head].flags |= FAT_USED; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff - || write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { + || (size_t)write(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not write LOST.DIR"); return FSFATAL; } Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:41:27 2010 (r207567) @@ -48,8 +48,13 @@ struct bootblock { u_int FATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ u_int Heads; /* number of heads */ - u_int32_t Sectors; /* total number of sectors */ u_int32_t HiddenSecs; /* # of hidden sectors */ + u_int32_t Sectors; /* total number of sectors */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ u_int FSInfo; /* FSInfo sector */ u_int Backup; /* Backup of Bootblocks */ @@ -59,11 +64,6 @@ struct bootblock { /* and some more calculated values */ u_int flags; /* some flags: */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: stable/8/sbin/fsck_msdosfs/ext.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/ext.h Mon May 3 12:41:27 2010 (r207567) @@ -70,12 +70,12 @@ int checkfilesys(const char *); #define FSDIRMOD 2 /* Some directory was modified */ #define FSFATMOD 4 /* The FAT was modified */ #define FSERROR 8 /* Some unrecovered error remains */ -#define FSFATAL 16 /* Some unrecoverable error occured */ +#define FSFATAL 16 /* Some unrecoverable error occurred */ #define FSDIRTY 32 /* File system is dirty */ #define FSFIXFAT 64 /* Fix file system FAT */ /* - * read a boot block in a machine independend fashion and translate + * read a boot block in a machine independent fashion and translate * it into our struct bootblock. */ int readboot(int, struct bootblock *); @@ -89,13 +89,13 @@ int writefsinfo(int, struct bootblock *) * Read one of the FAT copies and return a pointer to the new * allocated array holding our description of it. */ -int readfat(int, struct bootblock *, int, struct fatEntry **); +int readfat(int, struct bootblock *, u_int, struct fatEntry **); /* * Check two FAT copies for consistency and merge changes into the - * first if neccessary. + * first if necessary. */ -int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, int); +int comparefat(struct bootblock *, struct fatEntry *, struct fatEntry *, u_int); /* * Check a FAT Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:41:27 2010 (r207567) @@ -40,10 +40,10 @@ static const char rcsid[] = #include "ext.h" #include "fsutil.h" -static int checkclnum(struct bootblock *, int, cl_t, cl_t *); -static int clustdiffer(cl_t, cl_t *, cl_t *, int); +static int checkclnum(struct bootblock *, u_int, cl_t, cl_t *); +static int clustdiffer(cl_t, cl_t *, cl_t *, u_int); static int tryclear(struct bootblock *, struct fatEntry *, cl_t, cl_t *); -static int _readfat(int, struct bootblock *, int, u_char **); +static int _readfat(int, struct bootblock *, u_int, u_char **); /*- * The first 2 FAT entries contain pseudo-cluster numbers with the following @@ -128,7 +128,7 @@ err: * Check a cluster number for valid value */ static int -checkclnum(struct bootblock *boot, int fat, cl_t cl, cl_t *next) +checkclnum(struct bootblock *boot, u_int fat, cl_t cl, cl_t *next) { if (*next >= (CLUST_RSRVD&boot->ClustMask)) *next |= ~boot->ClustMask; @@ -159,7 +159,7 @@ checkclnum(struct bootblock *boot, int f * Read a FAT from disk. Returns 1 if successful, 0 otherwise. */ static int -_readfat(int fs, struct bootblock *boot, int no, u_char **buffer) +_readfat(int fs, struct bootblock *boot, u_int no, u_char **buffer) { off_t off; @@ -177,7 +177,7 @@ _readfat(int fs, struct bootblock *boot, goto err; } - if (read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) != boot->FATsecs * boot->BytesPerSec) { perror("Unable to read FAT"); goto err; @@ -194,24 +194,26 @@ _readfat(int fs, struct bootblock *boot, * Read a FAT and decode it into internal format */ int -readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp) +readfat(int fs, struct bootblock *boot, u_int no, struct fatEntry **fp) { struct fatEntry *fat; u_char *buffer, *p; cl_t cl; int ret = FSOK; + size_t len; boot->NumFree = boot->NumBad = 0; if (!_readfat(fs, boot, no, &buffer)) return FSFATAL; - fat = calloc(boot->NumClusters, sizeof(struct fatEntry)); + fat = malloc(len = boot->NumClusters * sizeof(struct fatEntry)); if (fat == NULL) { perror("No space for FAT"); free(buffer); return FSFATAL; } + (void)memset(fat, 0, len); if (buffer[0] != boot->Media || buffer[1] != 0xff || buffer[2] != 0xff @@ -304,7 +306,11 @@ readfat(int fs, struct bootblock *boot, } free(buffer); - *fp = fat; + if (ret & FSFATAL) { + free(fat); + *fp = NULL; + } else + *fp = fat; return ret; } @@ -324,7 +330,7 @@ rsrvdcltype(cl_t cl) } static int -clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, int fatnum) +clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, u_int fatnum) { if (*cp1 == CLUST_FREE || *cp1 >= CLUST_RSRVD) { if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { @@ -339,13 +345,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSFATAL; } - pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %d\n", + pwarn("Cluster %u is marked %s in FAT 0, %s in FAT %u\n", cl, rsrvdcltype(*cp1), rsrvdcltype(*cp2), fatnum); if (ask(0, "Use FAT 0's entry")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use FAT %d's entry", fatnum)) { + if (ask(0, "Use FAT %u's entry", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -353,7 +359,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } pwarn("Cluster %u is marked %s in FAT 0, but continues with cluster %u in FAT %d\n", cl, rsrvdcltype(*cp1), *cp2, fatnum); - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -364,7 +370,7 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp return FSFATAL; } if (*cp2 == CLUST_FREE || *cp2 >= CLUST_RSRVD) { - pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but is marked %s in FAT %u\n", cl, *cp1, rsrvdcltype(*cp2), fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; @@ -376,13 +382,13 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp } return FSERROR; } - pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %d\n", + pwarn("Cluster %u continues with cluster %u in FAT 0, but with cluster %u in FAT %u\n", cl, *cp1, *cp2, fatnum); if (ask(0, "Use continuation from FAT 0")) { *cp2 = *cp1; return FSFATMOD; } - if (ask(0, "Use continuation from FAT %d", fatnum)) { + if (ask(0, "Use continuation from FAT %u", fatnum)) { *cp1 = *cp2; return FSFATMOD; } @@ -394,8 +400,8 @@ clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp * into the first one. */ int -comparefat(struct bootblock *boot, struct fatEntry *first, - struct fatEntry *second, int fatnum) +comparefat(struct bootblock *boot, struct fatEntry *first, + struct fatEntry *second, u_int fatnum) { cl_t cl; int ret = FSOK; @@ -535,8 +541,8 @@ writefat(int fs, struct bootblock *boot, { u_char *buffer, *p; cl_t cl; - int i; - u_int32_t fatsz; + u_int i; + size_t fatsz; off_t off; int ret = FSOK; @@ -626,7 +632,7 @@ writefat(int fs, struct bootblock *boot, off = boot->ResSectors + i * boot->FATsecs; off *= boot->BytesPerSec; if (lseek(fs, off, SEEK_SET) != off - || write(fs, buffer, fatsz) != fatsz) { + || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); ret = FSFATAL; /* Return immediately? XXX */ } @@ -676,17 +682,6 @@ checklost(int dosfs, struct bootblock *b ret = 1; } } - if (boot->NumFree && fat[boot->FSNext].next != CLUST_FREE) { - pwarn("Next free cluster in FSInfo block (%u) not free\n", - boot->FSNext); - if (ask(1, "Fix")) - for (head = CLUST_FIRST; head < boot->NumClusters; head++) - if (fat[head].next == CLUST_FREE) { - boot->FSNext = head; - ret = 1; - break; - } - } if (ret) mod |= writefsinfo(dosfs, boot); } Modified: stable/8/sbin/fsck_msdosfs/main.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:39:27 2010 (r207566) +++ stable/8/sbin/fsck_msdosfs/main.c Mon May 3 12:41:27 2010 (r207567) @@ -33,7 +33,6 @@ static const char rcsid[] = #include #include -#include #include #include #include From owner-svn-src-stable@FreeBSD.ORG Mon May 3 12:43:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 405B91065674; Mon, 3 May 2010 12:43:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2028FC23; Mon, 3 May 2010 12:43:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43ChIXp081821; Mon, 3 May 2010 12:43:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43ChI1S081815; Mon, 3 May 2010 12:43:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005031243.o43ChI1S081815@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 3 May 2010 12:43:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207568 - stable/8/sbin/fsck_msdosfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 12:43:18 -0000 Author: kib Date: Mon May 3 12:43:17 2010 New Revision: 207568 URL: http://svn.freebsd.org/changeset/base/207568 Log: MFC r203874: Rename fields to match better the msdosfs headers. Modified: stable/8/sbin/fsck_msdosfs/boot.c stable/8/sbin/fsck_msdosfs/check.c stable/8/sbin/fsck_msdosfs/dir.c stable/8/sbin/fsck_msdosfs/dosfs.h stable/8/sbin/fsck_msdosfs/fat.c Directory Properties: stable/8/sbin/fsck_msdosfs/ (props changed) Modified: stable/8/sbin/fsck_msdosfs/boot.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/boot.c Mon May 3 12:43:17 2010 (r207568) @@ -62,22 +62,22 @@ readboot(int dosfs, struct bootblock *bo boot->ValidFat = -1; /* decode bios parameter block */ - boot->BytesPerSec = block[11] + (block[12] << 8); - boot->SecPerClust = block[13]; - boot->ResSectors = block[14] + (block[15] << 8); - boot->FATs = block[16]; - boot->RootDirEnts = block[17] + (block[18] << 8); - boot->Sectors = block[19] + (block[20] << 8); - boot->Media = block[21]; - boot->FATsmall = block[22] + (block[23] << 8); + boot->bpbBytesPerSec = block[11] + (block[12] << 8); + boot->bpbSecPerClust = block[13]; + boot->bpbResSectors = block[14] + (block[15] << 8); + boot->bpbFATs = block[16]; + boot->bpbRootDirEnts = block[17] + (block[18] << 8); + boot->bpbSectors = block[19] + (block[20] << 8); + boot->bpbMedia = block[21]; + boot->bpbFATsmall = block[22] + (block[23] << 8); boot->SecPerTrack = block[24] + (block[25] << 8); - boot->Heads = block[26] + (block[27] << 8); - boot->HiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); - boot->HugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); + boot->bpbHeads = block[26] + (block[27] << 8); + boot->bpbHiddenSecs = block[28] + (block[29] << 8) + (block[30] << 16) + (block[31] << 24); + boot->bpbHugeSectors = block[32] + (block[33] << 8) + (block[34] << 16) + (block[35] << 24); - boot->FATsecs = boot->FATsmall; + boot->FATsecs = boot->bpbFATsmall; - if (!boot->RootDirEnts) + if (!boot->bpbRootDirEnts) boot->flags |= FAT32; if (boot->flags & FAT32) { boot->FATsecs = block[36] + (block[37] << 8) @@ -92,13 +92,13 @@ readboot(int dosfs, struct bootblock *bo block[43], block[42]); return FSFATAL; } - boot->RootCl = block[44] + (block[45] << 8) + boot->bpbRootClust = block[44] + (block[45] << 8) + (block[46] << 16) + (block[47] << 24); - boot->FSInfo = block[48] + (block[49] << 8); - boot->Backup = block[50] + (block[51] << 8); + boot->bpbFSInfo = block[48] + (block[49] << 8); + boot->bpbBackup = block[50] + (block[51] << 8); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); @@ -124,18 +124,18 @@ readboot(int dosfs, struct bootblock *bo fsinfo[0x3fc] = fsinfo[0x3fd] = 0; fsinfo[0x3fe] = 0x55; fsinfo[0x3ff] = 0xaa; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } ret = FSBOOTMOD; } else - boot->FSInfo = 0; + boot->bpbFSInfo = 0; } - if (boot->FSInfo) { + if (boot->bpbFSInfo) { boot->FSFree = fsinfo[0x1e8] + (fsinfo[0x1e9] << 8) + (fsinfo[0x1ea] << 16) + (fsinfo[0x1eb] << 24); @@ -144,8 +144,8 @@ readboot(int dosfs, struct bootblock *bo + (fsinfo[0x1ef] << 24); } - if (lseek(dosfs, boot->Backup * boot->BytesPerSec, SEEK_SET) - != boot->Backup * boot->BytesPerSec + if (lseek(dosfs, boot->bpbBackup * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbBackup * boot->bpbBytesPerSec || read(dosfs, backup, sizeof backup) != sizeof backup) { perror("could not read backup bootblock"); return FSFATAL; @@ -162,36 +162,36 @@ readboot(int dosfs, struct bootblock *bo * print out useful information and continue. */ pfatal("backup (block %d) mismatch with primary bootblock:\n", - boot->Backup); + boot->bpbBackup); for (i = 11; i < 11 + 90; i++) { if (block[i] != backup[i]) pfatal("\ti=%d\tprimary 0x%02x\tbackup 0x%02x\n", i, block[i], backup[i]); } } - /* Check backup FSInfo? XXX */ + /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->RootDirEnts * 32 + boot->BytesPerSec - 1) - / boot->BytesPerSec - + boot->ResSectors - + boot->FATs * boot->FATsecs - - CLUST_FIRST * boot->SecPerClust; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + boot->bpbBytesPerSec - 1) + / boot->bpbBytesPerSec + + boot->bpbResSectors + + boot->bpbFATs * boot->FATsecs + - CLUST_FIRST * boot->bpbSecPerClust; - if (boot->BytesPerSec % DOSBOOTBLOCKSIZE != 0) { - pfatal("Invalid sector size: %u", boot->BytesPerSec); + if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE != 0) { + pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); return FSFATAL; } - if (boot->SecPerClust == 0) { - pfatal("Invalid cluster size: %u", boot->SecPerClust); + if (boot->bpbSecPerClust == 0) { + pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); return FSFATAL; } - if (boot->Sectors) { - boot->HugeSectors = 0; - boot->NumSectors = boot->Sectors; + if (boot->bpbSectors) { + boot->bpbHugeSectors = 0; + boot->NumSectors = boot->bpbSectors; } else - boot->NumSectors = boot->HugeSectors; - boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->SecPerClust; + boot->NumSectors = boot->bpbHugeSectors; + boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; if (boot->flags&FAT32) boot->ClustMask = CLUST32_MASK; @@ -207,13 +207,13 @@ readboot(int dosfs, struct bootblock *bo switch (boot->ClustMask) { case CLUST32_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 4; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 4; break; case CLUST16_MASK: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec) / 2; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec) / 2; break; default: - boot->NumFatEntries = (boot->FATsecs * boot->BytesPerSec * 2) / 3; + boot->NumFatEntries = (boot->FATsecs * boot->bpbBytesPerSec * 2) / 3; break; } @@ -222,7 +222,7 @@ readboot(int dosfs, struct bootblock *bo boot->NumClusters, boot->FATsecs); return FSFATAL; } - boot->ClusterSize = boot->BytesPerSec * boot->SecPerClust; + boot->ClusterSize = boot->bpbBytesPerSec * boot->bpbSecPerClust; boot->NumFiles = 1; boot->NumFree = 0; @@ -235,8 +235,8 @@ writefsinfo(int dosfs, struct bootblock { u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { perror("could not read fsinfo block"); return FSFATAL; @@ -249,11 +249,11 @@ writefsinfo(int dosfs, struct bootblock fsinfo[0x1ed] = (u_char)(boot->FSNext >> 8); fsinfo[0x1ee] = (u_char)(boot->FSNext >> 16); fsinfo[0x1ef] = (u_char)(boot->FSNext >> 24); - if (lseek(dosfs, boot->FSInfo * boot->BytesPerSec, SEEK_SET) - != boot->FSInfo * boot->BytesPerSec + if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) + != boot->bpbFSInfo * boot->bpbBytesPerSec || write(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { - perror("Unable to write FSInfo"); + perror("Unable to write bpbFSInfo"); return FSFATAL; } /* Modified: stable/8/sbin/fsck_msdosfs/check.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/check.c Mon May 3 12:43:17 2010 (r207568) @@ -98,7 +98,7 @@ checkfilesys(const char *fname) } if (boot.ValidFat < 0) - for (i = 1; i < (int)boot.FATs; i++) { + for (i = 1; i < (int)boot.bpbFATs; i++) { struct fatEntry *currentFat; mod |= readfat(dosfs, &boot, i, ¤tFat); Modified: stable/8/sbin/fsck_msdosfs/dir.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/dir.c Mon May 3 12:43:17 2010 (r207568) @@ -219,8 +219,8 @@ resetDosDirSection(struct bootblock *boo cl_t cl; int ret = FSOK; - b1 = boot->RootDirEnts * 32; - b2 = boot->SecPerClust * boot->BytesPerSec; + b1 = boot->bpbRootDirEnts * 32; + b2 = boot->bpbSecPerClust * boot->bpbBytesPerSec; if ((buffer = malloc( b1 > b2 ? b1 : b2)) == NULL) { perror("No space for directory buffer"); @@ -242,15 +242,15 @@ resetDosDirSection(struct bootblock *boo memset(rootDir, 0, sizeof *rootDir); if (boot->flags & FAT32) { - if (boot->RootCl < CLUST_FIRST || boot->RootCl >= boot->NumClusters) { + if (boot->bpbRootClust < CLUST_FIRST || boot->bpbRootClust >= boot->NumClusters) { pfatal("Root directory starts with cluster out of range(%u)", - boot->RootCl); + boot->bpbRootClust); return FSFATAL; } - cl = fat[boot->RootCl].next; + cl = fat[boot->bpbRootClust].next; if (cl < CLUST_FIRST || (cl >= CLUST_RSRVD && cl< CLUST_EOFS) - || fat[boot->RootCl].head != boot->RootCl) { + || fat[boot->bpbRootClust].head != boot->bpbRootClust) { if (cl == CLUST_FREE) pwarn("Root directory starts with free cluster\n"); else if (cl >= CLUST_RSRVD) @@ -261,14 +261,14 @@ resetDosDirSection(struct bootblock *boo return FSFATAL; } if (ask(1, "Fix")) { - fat[boot->RootCl].next = CLUST_FREE; + fat[boot->bpbRootClust].next = CLUST_FREE; ret = FSFATMOD; } else ret = FSFATAL; } - fat[boot->RootCl].flags |= FAT_USED; - rootDir->head = boot->RootCl; + fat[boot->bpbRootClust].flags |= FAT_USED; + rootDir->head = boot->bpbRootClust; } return ret; @@ -313,7 +313,7 @@ delete(int f, struct bootblock *boot, st { u_char *s, *e; off_t off; - int clsz = boot->SecPerClust * boot->BytesPerSec; + int clsz = boot->bpbSecPerClust * boot->bpbBytesPerSec; s = delbuf + startoff; e = delbuf + clsz; @@ -323,8 +323,8 @@ delete(int f, struct bootblock *boot, st break; e = delbuf + endoff; } - off = startcl * boot->SecPerClust + boot->ClusterOffset; - off *= boot->BytesPerSec; + off = startcl * boot->bpbSecPerClust + boot->ClusterOffset; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, delbuf, clsz) != clsz) { perror("Unable to read directory"); @@ -461,14 +461,14 @@ readDosDirSection(int f, struct bootbloc vallfn = invlfn = empty = NULL; do { if (!(boot->flags & FAT32) && !dir->parent) { - last = boot->RootDirEnts * 32; - off = boot->ResSectors + boot->FATs * boot->FATsecs; + last = boot->bpbRootDirEnts * 32; + off = boot->bpbResSectors + boot->bpbFATs * boot->FATsecs; } else { - last = boot->SecPerClust * boot->BytesPerSec; - off = cl * boot->SecPerClust + boot->ClusterOffset; + last = boot->bpbSecPerClust * boot->bpbBytesPerSec; + off = cl * boot->bpbSecPerClust + boot->ClusterOffset; } - off *= boot->BytesPerSec; + off *= boot->bpbBytesPerSec; if (lseek(f, off, SEEK_SET) != off || read(f, buffer, last) != last) { perror("Unable to read directory"); @@ -957,7 +957,7 @@ reconnect(int dosfs, struct bootblock *b return FSERROR; } lfoff = lfcl * boot->ClusterSize - + boot->ClusterOffset * boot->BytesPerSec; + + boot->ClusterOffset * boot->bpbBytesPerSec; if (lseek(dosfs, lfoff, SEEK_SET) != lfoff || (size_t)read(dosfs, lfbuf, boot->ClusterSize) != boot->ClusterSize) { perror("could not read LOST.DIR"); Modified: stable/8/sbin/fsck_msdosfs/dosfs.h ============================================================================== --- stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/dosfs.h Mon May 3 12:43:17 2010 (r207568) @@ -39,31 +39,31 @@ typedef u_int32_t cl_t; /* type holding * FAT boot block. */ struct bootblock { - u_int BytesPerSec; /* bytes per sector */ - u_int SecPerClust; /* sectors per cluster */ - u_int ResSectors; /* number of reserved sectors */ - u_int FATs; /* number of FATs */ - u_int RootDirEnts; /* number of root directory entries */ - u_int Media; /* media descriptor */ - u_int FATsmall; /* number of sectors per FAT */ + u_int bpbBytesPerSec; /* bytes per sector */ + u_int bpbSecPerClust; /* sectors per cluster */ + u_int bpbResSectors; /* number of reserved sectors */ + u_int bpbFATs; /* number of bpbFATs */ + u_int bpbRootDirEnts; /* number of root directory entries */ + u_int32_t bpbSectors; /* total number of sectors */ + u_int bpbMedia; /* media descriptor */ + u_int bpbFATsmall; /* number of sectors per FAT */ u_int SecPerTrack; /* sectors per track */ - u_int Heads; /* number of heads */ - u_int32_t HiddenSecs; /* # of hidden sectors */ - u_int32_t Sectors; /* total number of sectors */ -#define FAT32 1 /* this is a FAT32 file system */ - /* - * Maybe, we should separate out - * various parts of FAT32? XXX - */ - u_int32_t HugeSectors; /* # of sectors if bpbSectors == 0 */ - u_int FSInfo; /* FSInfo sector */ - u_int Backup; /* Backup of Bootblocks */ - cl_t RootCl; /* Start of Root Directory */ + u_int bpbHeads; /* number of heads */ + u_int32_t bpbHiddenSecs; /* # of hidden sectors */ + u_int32_t bpbHugeSectors; /* # of sectors if bpbbpbSectors == 0 */ + cl_t bpbRootClust; /* Start of Root Directory */ + u_int bpbFSInfo; /* FSInfo sector */ + u_int bpbBackup; /* Backup of Bootblocks */ cl_t FSFree; /* Number of free clusters acc. FSInfo */ cl_t FSNext; /* Next free cluster acc. FSInfo */ /* and some more calculated values */ u_int flags; /* some flags: */ +#define FAT32 1 /* this is a FAT32 file system */ + /* + * Maybe, we should separate out + * various parts of FAT32? XXX + */ int ValidFat; /* valid fat if FAT32 non-mirrored */ cl_t ClustMask; /* mask for entries in FAT */ cl_t NumClusters; /* # of entries in a FAT */ Modified: stable/8/sbin/fsck_msdosfs/fat.c ============================================================================== --- stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:41:27 2010 (r207567) +++ stable/8/sbin/fsck_msdosfs/fat.c Mon May 3 12:43:17 2010 (r207568) @@ -73,10 +73,10 @@ checkdirty(int fs, struct bootblock *boo if (boot->ClustMask != CLUST16_MASK && boot->ClustMask != CLUST32_MASK) return 0; - off = boot->ResSectors; - off *= boot->BytesPerSec; + off = boot->bpbResSectors; + off *= boot->bpbBytesPerSec; - buffer = malloc(boot->BytesPerSec); + buffer = malloc(boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return 1; @@ -87,7 +87,7 @@ checkdirty(int fs, struct bootblock *boo goto err; } - if (read(fs, buffer, boot->BytesPerSec) != boot->BytesPerSec) { + if (read(fs, buffer, boot->bpbBytesPerSec) != boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -96,7 +96,7 @@ checkdirty(int fs, struct bootblock *boo * If we don't understand the FAT, then the file system must be * assumed to be unclean. */ - if (buffer[0] != boot->Media || buffer[1] != 0xff) + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff) goto err; if (boot->ClustMask == CLUST16_MASK) { if ((buffer[2] & 0xf8) != 0xf8 || (buffer[3] & 0x3f) != 0x3f) @@ -163,22 +163,22 @@ _readfat(int fs, struct bootblock *boot, { off_t off; - *buffer = malloc(boot->FATsecs * boot->BytesPerSec); + *buffer = malloc(boot->FATsecs * boot->bpbBytesPerSec); if (*buffer == NULL) { perror("No space for FAT"); return 0; } - off = boot->ResSectors + no * boot->FATsecs; - off *= boot->BytesPerSec; + off = boot->bpbResSectors + no * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off) { perror("Unable to read FAT"); goto err; } - if ((size_t)read(fs, *buffer, boot->FATsecs * boot->BytesPerSec) - != boot->FATsecs * boot->BytesPerSec) { + if ((size_t)read(fs, *buffer, boot->FATsecs * boot->bpbBytesPerSec) + != boot->FATsecs * boot->bpbBytesPerSec) { perror("Unable to read FAT"); goto err; } @@ -215,7 +215,7 @@ readfat(int fs, struct bootblock *boot, } (void)memset(fat, 0, len); - if (buffer[0] != boot->Media + if (buffer[0] != boot->bpbMedia || buffer[1] != 0xff || buffer[2] != 0xff || (boot->ClustMask == CLUST16_MASK && buffer[3] != 0xff) || (boot->ClustMask == CLUST32_MASK @@ -229,7 +229,7 @@ readfat(int fs, struct bootblock *boot, * file system is dirty if it doesn't reboot cleanly. * Check this special condition before errorring out. */ - if (buffer[0] == boot->Media && buffer[1] == 0xff + if (buffer[0] == boot->bpbMedia && buffer[1] == 0xff && buffer[2] == 0xff && ((boot->ClustMask == CLUST16_MASK && buffer[3] == 0x7f) || (boot->ClustMask == CLUST32_MASK @@ -546,7 +546,7 @@ writefat(int fs, struct bootblock *boot, off_t off; int ret = FSOK; - buffer = malloc(fatsz = boot->FATsecs * boot->BytesPerSec); + buffer = malloc(fatsz = boot->FATsecs * boot->bpbBytesPerSec); if (buffer == NULL) { perror("No space for FAT"); return FSFATAL; @@ -555,7 +555,7 @@ writefat(int fs, struct bootblock *boot, boot->NumFree = 0; p = buffer; if (correct_fat) { - *p++ = (u_char)boot->Media; + *p++ = (u_char)boot->bpbMedia; *p++ = 0xff; *p++ = 0xff; switch (boot->ClustMask) { @@ -628,9 +628,9 @@ writefat(int fs, struct bootblock *boot, break; } } - for (i = 0; i < boot->FATs; i++) { - off = boot->ResSectors + i * boot->FATsecs; - off *= boot->BytesPerSec; + for (i = 0; i < boot->bpbFATs; i++) { + off = boot->bpbResSectors + i * boot->FATsecs; + off *= boot->bpbBytesPerSec; if (lseek(fs, off, SEEK_SET) != off || (size_t)write(fs, buffer, fatsz) != fatsz) { perror("Unable to write FAT"); @@ -672,7 +672,7 @@ checklost(int dosfs, struct bootblock *b } finishlf(); - if (boot->FSInfo) { + if (boot->bpbFSInfo) { ret = 0; if (boot->FSFree != boot->NumFree) { pwarn("Free space in FSInfo block (%d) not correct (%d)\n", From owner-svn-src-stable@FreeBSD.ORG Mon May 3 17:34:12 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B52E106566B; Mon, 3 May 2010 17:34:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9E08FC19; Mon, 3 May 2010 17:34:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43HYCC0046218; Mon, 3 May 2010 17:34:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43HYC0t046216; Mon, 3 May 2010 17:34:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005031734.o43HYC0t046216@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 17:34: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: r207575 - stable/7/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 17:34:12 -0000 Author: delphij Date: Mon May 3 17:34:12 2010 New Revision: 207575 URL: http://svn.freebsd.org/changeset/base/207575 Log: MFC r196432 (partial, kensmith@) and 207383: Add definition for FreeBSD 8.1 and 9.0. Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local (contents, props changed) Directory Properties: stable/7/gnu/usr.bin/groff/ (props changed) Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/7/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 16:55:50 2010 (r207574) +++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local Mon May 3 17:34:12 2010 (r207575) @@ -73,6 +73,8 @@ .ds doc-operating-system-FreeBSD-7.2 7.2 .ds doc-operating-system-FreeBSD-7.3 7.3 .ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-8.1 8.1 +.ds doc-operating-system-FreeBSD-9.0 9.0 . .ec . From owner-svn-src-stable@FreeBSD.ORG Mon May 3 19:39:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04925106568F; Mon, 3 May 2010 19:39:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6F198FC1B; Mon, 3 May 2010 19:38:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43Jcx6q073853; Mon, 3 May 2010 19:38:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JcxeA073851; Mon, 3 May 2010 19:38:59 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201005031938.o43JcxeA073851@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 3 May 2010 19:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207581 - in stable/8/release: picobsd/floppy.tree/sbin powerpc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 19:39:00 -0000 Author: nwhitehorn Date: Mon May 3 19:38:59 2010 New Revision: 207581 URL: http://svn.freebsd.org/changeset/base/207581 Log: MFC r206881: Add gpart and glabel to the release CD mfsroot. Even if sysinstall cannot partition disks on powerpc, this will allow the user to. PR: powerpc/93203 Obtained from: ia64 Modified: stable/8/release/powerpc/boot_crunch.conf Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/powerpc/boot_crunch.conf ============================================================================== --- stable/8/release/powerpc/boot_crunch.conf Mon May 3 19:19:58 2010 (r207580) +++ stable/8/release/powerpc/boot_crunch.conf Mon May 3 19:38:59 2010 (r207581) @@ -15,6 +15,7 @@ srcdirs /usr/src/sbin progs camcontrol progs dhclient progs fsck_ffs +progs geom progs ifconfig progs mount_msdosfs progs mount_nfs @@ -25,6 +26,8 @@ progs rtsol progs tunefs ln fsck_ffs fsck_4.2bsd ln fsck_ffs fsck_ufs +ln geom glabel +ln geom gpart srcdirs /usr/src/usr.bin progs cpio @@ -43,4 +46,4 @@ progs usbconfig libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph libs -ldialog -lncurses -ldisk -lcam -lkiconv -lsbuf -lufs -libs -lbsdxml -larchive -lbz2 -lusb -ljail +libs -lgeom -lbsdxml -larchive -lbz2 -lusb -ljail From owner-svn-src-stable@FreeBSD.ORG Mon May 3 19:48:21 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC98A106566B; Mon, 3 May 2010 19:48:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D0F448FC08; Mon, 3 May 2010 19:48:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43JmLv2075989; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43JmL5D075986; Mon, 3 May 2010 19:48:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005031948.o43JmL5D075986@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 19:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207582 - stable/6/usr.sbin/daemon X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 19:48:22 -0000 Author: delphij Date: Mon May 3 19:48:21 2010 New Revision: 207582 URL: http://svn.freebsd.org/changeset/base/207582 Log: MFC r147906-201389, this sync'ed daemon(8) with -HEAD except the WARNS change. The most important change is the newly added privilege dropping feature by trhodes and others. Requested by: glarkin PR: bin/146266 Modified: stable/6/usr.sbin/daemon/daemon.8 stable/6/usr.sbin/daemon/daemon.c Directory Properties: stable/6/usr.sbin/daemon/ (props changed) Modified: stable/6/usr.sbin/daemon/daemon.8 ============================================================================== --- stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.8 Mon May 3 19:48:21 2010 (r207582) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 30, 2001 +.Dd March 19, 2007 .Dt DAEMON 8 .Os .Sh NAME @@ -36,12 +36,14 @@ .Nm .Op Fl cf .Op Fl p Ar pidfile +.Op Fl u Ar user .Ar command arguments ... .Sh DESCRIPTION The .Nm utility detaches itself from the controlling terminal and executes the program specified by its arguments. +Privileges may be lowered to the specified user. .Pp The options are as follows: .Bl -tag -width indent @@ -54,12 +56,14 @@ Redirect standard input, standard output .It Fl p Ar file Write the ID of the created process into the .Ar file -using +using the .Xr pidfile 3 functionality. Note, that the file will be created shortly before the process is actually executed, and will remain after the process exits (although it will be removed if the execution fails). +.It Fl u Ar user +Run the program with the rights of user specified, requires privilege. .El .Sh EXIT STATUS The @@ -77,6 +81,8 @@ standard error unless the .Fl f flag is specified. .Sh SEE ALSO +.Xr setregid 2 , +.Xr setreuid 2 , .Xr daemon 3 , .Xr exec 3 , .Xr pidfile 3 , Modified: stable/6/usr.sbin/daemon/daemon.c ============================================================================== --- stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:38:59 2010 (r207581) +++ stable/6/usr.sbin/daemon/daemon.c Mon May 3 19:48:21 2010 (r207582) @@ -35,24 +35,27 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include #include #include +static void restrict_process(const char *); static void usage(void); int main(int argc, char *argv[]) { - struct pidfh *pfh; + struct pidfh *pfh = NULL; int ch, nochdir, noclose, errcode; - const char *pidfile; + const char *pidfile, *user; pid_t otherpid; nochdir = noclose = 1; - pidfile = NULL; - while ((ch = getopt(argc, argv, "-cfp:")) != -1) { + pidfile = user = NULL; + while ((ch = getopt(argc, argv, "-cfp:u:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -63,6 +66,9 @@ main(int argc, char *argv[]) case 'p': pidfile = optarg; break; + case 'u': + user = optarg; + break; default: usage(); } @@ -72,6 +78,10 @@ main(int argc, char *argv[]) if (argc == 0) usage(); + + if (user != NULL) + restrict_process(user); + /* * Try to open the pidfile before calling daemon(3), * to be able to report the error intelligently @@ -109,9 +119,23 @@ main(int argc, char *argv[]) } static void +restrict_process(const char *user) +{ + struct passwd *pw = NULL; + + pw = getpwnam(user); + if (pw == NULL) + errx(1, "unknown user: %s", user); + + if (setusercontext(NULL, pw, pw->pw_uid, LOGIN_SETALL) != 0) + errx(1, "failed to set user environment"); +} + +static void usage(void) { (void)fprintf(stderr, - "usage: daemon [-cf] [-p pidfile] command arguments ...\n"); + "usage: daemon [-cf] [-p pidfile] [-u user] command " + "arguments ...\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Mon May 3 19:56:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 336401065670; Mon, 3 May 2010 19:56:53 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 214158FC16; Mon, 3 May 2010 19:56:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43JurlS077886; Mon, 3 May 2010 19:56:53 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43Jurfi077884; Mon, 3 May 2010 19:56:53 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201005031956.o43Jurfi077884@svn.freebsd.org> From: Brooks Davis Date: Mon, 3 May 2010 19:56:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207583 - stable/8/share/misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 19:56:53 -0000 Author: brooks Date: Mon May 3 19:56:52 2010 New Revision: 207583 URL: http://svn.freebsd.org/changeset/base/207583 Log: MFC r205073 Regen: * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y). * Boemler: vendors.txt (2010-03126) PR: kern/133733 Modified: stable/8/share/misc/pci_vendors Directory Properties: stable/8/share/misc/ (props changed) Modified: stable/8/share/misc/pci_vendors ============================================================================== --- stable/8/share/misc/pci_vendors Mon May 3 19:48:21 2010 (r207582) +++ stable/8/share/misc/pci_vendors Mon May 3 19:56:52 2010 (r207583) @@ -18,7 +18,7 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE - 6800 Hauppage Nova -TD-500 DVB-T Tuner Device + 6800 Hauppage Nova -TD-500 DVB-T Tuner Device ( PCIVEN_1131&DEV_7130&SUBSYS_40510000&REV_014&3B) 0071 Nebula Electronics Ltd 0100 Ncipher Corp Ltd 0123 General Dynamics @@ -44,6 +44,10 @@ 8519 OV519 series 05E3 CyberDoor 0701 CBD516 +064E SUYIN Corporation + A101 Acer Crystal Eye Webcam (suYin) + A103 WebCam (SuYin) + D101 Web Cam (SuYin) 066F Sigmatel Inc 3410 SMTP3410 3500 SMTP3500 @@ -54,6 +58,8 @@ 1704 ISDN Adapter (PCI Bus, D, C) 067B Prolific Technology Inc 2303 PL-2303 USB-to-Serial Converter + 2305 USB-to-Printer Bridge Controller (PL-2305) + 2393 prolific (prolific) 3507 PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller 069D Hughes Network Systems (HNS) 0700 Stream Machine @@ -70,7 +76,7 @@ 09C1 Arris 0704 CM 200E Cable Modem 0A5C Broadcom Corporation - 0201 Broadcom USB iLine10(tm) Network Adapter + 0201 Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme BCM5782 Gigabie Ethernet Contro) 2000 Broadcom Bluetooth Firmware Upgrade Device 2009 Broadcom Bluetooth Controller 200A Broadcom Bluetooth Controller @@ -84,17 +90,17 @@ 2038 Broadcom Blutonium Device Firmware Downloader (BCM2038) 2039 BROADCOM Bluetooth Device 2045 Broadcom Bluetooth Controller - 2046 Broadcom USB Bluetooth Device + 2046 Broadcom USB Bluetooth Device ( 5738z) 2047 Broadcom USB Bluetooth Device 205E Broadcom Bluetooth Firmware Upgrade Device - 2100 Broadcom Bluetooth 2.0+eDR USB dongle - 2101 Broadcom Bluetooth 2.0+EDR USB dongle - 2102 ANYCOM Blue USB-200/250 + 2100 Broadcom Bluetooth 2.0+eDR USB dongle (BT 50) + 2101 Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2) + 2102 ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6) 2110 Broadcom Bluetooth Controller 2111 ANYCOM Blue USB-UHE 200/250 2120 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045) 2121 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter - 2122 Broadcom Bluetooth 2.0+EDR USB dongle + 2122 Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3) 2124 2045B3ROM Bluetooth Dongle 2130 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter 2131 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter @@ -104,7 +110,7 @@ 2143 2046 Flash non UHE Class 1 2144 2046 Flash non UHE module Class 2 2145 Broadcom BCM9204MD LENO Module - 2146 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2146 Broadcom 2045 Bluetooth 2.1 USB UHE Dongle 2147 Broadcom 2046 Bluetooth 2.1 USB Dongle 2148 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle 2149 Broadcom 2046 Bluetooth 2.1 USB Dongle @@ -122,8 +128,9 @@ 2155 Broadcom Bluetooth USB Dongle 2157 BCM2046 B1 USB 500 2158 Broadcom 2046 Bluetooth 2.1 Device - 4502 USB Human Interface Device - 4503 USB Human Interface Device + 4500 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4502 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4503 Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1) 5800 Unified Security Hub 6300 Pirelli ISB Remote NDIS Device 0A89 BREA Technologies Inc @@ -144,17 +151,22 @@ 0A06 RCB672FXX 672-channel modular analog telphony card 0B49 ASCII Corporation 064F Trance Vibrator +0C45 Microdia Ltd. + 602D USB Webcam (7&2BE7B8E3&0&4) + 6130 USB CAMERA (5&3512B308&0&1) 0E11 Compaq Computer Corp (Now owned by Hewlett-Packard) 0001 PCI to EISA Bridge - 0002 PCI to ISA Bridge + 0002 PCI to ISA Bridge (ISA Bridge) 000F StorageWorks Library Adapter (HVD) (CPQB1A9) 0012 686P7 (686P7) - 0046 Smart Array 64xx/6i Controller + 0046 Smart Array 6400 Controller (N/A) 0049 Gigabit Upgrade Module (NC7132) 004A Gigabit Server Adapter (NC6136) + 005A HP Remote Insight Lights-Out II Board (PowerPC 405GP processor at 200MHz [3305103C]) 007C NC7770 1000BaseTX 007D NC6770 1000BaseTX 0085 NC7780 1000BaseTX + 00B1 HP Remote Insight Lights-Out II PCI Device (3305103C) 00BB NC7760 00C0 AIC-7899G 64-bit, 66MHz Dual Channel Wide Ultra3 SCSI Controller 00CA NC7771 @@ -201,8 +213,8 @@ AE29 PCI to ISA Bridge (MIS-L) AE2A CPU to PCI Bridge (MPC) AE2B PCI to ISA PnP Bridge (MIS-E) - AE31 System Management Controller (1002&DEV-4385&SUBSY) - AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 + AE31 System Management Controller (1002&DEV-5653&SUBSYS) + AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 (950) AE33 Dual EIDE Controller (Triflex) AE34 Netelligent 10 T PCI UTP TLAN 2.3 AE35 Integrated NetFlex-3/P TLAN 2.3 @@ -321,70 +333,70 @@ 0017 PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E) 0020 Universal digital I/O PCI-Interface (ispLSI1032E) 1002 ATI Technologies Inc. / Advanced Micro Devices, Inc. - 0B12 ati 1900 (ati 1900) + 0B12 ATI Radeon X1900 (R580) 1002 0F2A1787 (0F2A1787) - 3150 Radeon Mobility X600 (M24 1P) - 3151 FIREMV 2400 - 3152 Mobility Radeon X300 - 3154 Mobility FireGL V3200 - 3171 FireMV 2400 Secondary - 3E50 Radeon X600/X650 Series - 3E54 FireGL V3200 (RV380) - 3E70 Radeon X600 Series Secondary - 3E74 FIREGL V3200 Secondary + 3150 ATI MOBILITY /ATI RADEON X600 (M24) + 3151 ATI FireMV 2400 (RV380) + 3152 ATI MOBILITY /ATI RADEON X300 (M24) + 3154 ATI MOBILITY FireGL V3200 (M24GL) + 3171 ATI FireMV 2400 Secondary (RV380) + 3E50 ATI RADEON X600/X550 Series (RV380) + 3E54 ATI FireGL V3200 (RV380GL) + 3E70 ATI RADEON X600/X550 Series Secondary (RV380) + 3E74 ATI FireGL V3200 Secondary (RV380GL) 4136 Radeon IGP 320 (A3) 4137 Radeon IGP 340 (RS200) 4144 Radeon 9500 Series (R300) 4145 Radeon 9200 (M+X) (R300) - 4146 Radeon 9700 (R300) + 4146 ATI RADEON 9600TX (R300) 4147 Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P) - 4148 Radeon 9800 SE (R350) - 4149 Radeon 9500 Family + 4148 ATI RADEON 9800 SE (R350) + 4149 ATI RADEON 9500 (R350) 414A Radeon 9800 Family 414B Fire GL X2 - 4150 Radeon 9600 Series (V350) - 4151 Radeon 9600 (RV350) - 4152 Radeon 9600 XT (RV360) - 4153 Radeon 9550 (RV350) - 4154 Fire GL T2 - 4155 Fire GL T2 + 4150 ATI RADEON 9600 Series (RV350) + 4151 ATI RADEON 9600 Series (RV350) + 4152 ATI RADEON 9600 Series (RV360) + 4153 ATI RADEON 9550/X1050 Series (RV350) + 4154 ATI FireGL T2 (RV350GL) + 4155 ATI RADEON 9600 Series (RV350) 4156 Fire GL T2 4157 Fire GL T2 - 4158 vga video (4c59h) - 4164 R300 (128bit mem bus) (Radeon 9500 Series, secondary) + 4158 Mach32 (68800AX) + 4164 Radeon 9500 Series (R300) - Secondary 4165 Radeon 9700 Pro (R300 AE) - Secondary - 4166 Radeon 9600TX - Secondary + 4166 ATI RADEON 9600TX Secondary (R300) 4167 Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P) - 4168 Radeon 9800 SE - Secondary (R350) - 4169 Radeon 9500 Family - Secondary - 4170 Radeon 9600 - Secondary (RV350) - 4171 Radeon 9600 (RV350) - Secondary - 4172 Radeon 9600 XT - Secondary (RV360) - 4173 Radeon 9550 - Secondary (RV350) - 4174 FireGL T2 - Seocndary - 4175 Radeon 9600 Series Secondary + 4168 ATI RADEON 9800 SE Secondary (R350) + 4169 ATI RADEON 9500 Secondary (R350) + 4170 ATI RADEON 9600 Series Secondary (RV350) + 4171 ATI RADEON 9600 Series Secondary (RV350) + 4172 ATI RADEON 9600 Series Secondary (RV360) + 4173 ATI RADEON 9550/X1050 Series Secondary (RV350) + 4174 ATI FireGL T2 Secondary (RV350GL) + 4175 ATI RADEON 9600 Series Secondary (RV350) 4237 Radeon 7000 IGP 4242 All-In-Wonder 8500DV (R200AIW) 4243 Radeon 8500 DV OHCI FireWire Controller 4336 Radeon IGP 320M (rs200) 4337 Mobility M6 (U2) (RS200M) - 4341 AC'97 Audio Controller (AD1981) - 4342 HUB Bridge (IXP 150) - 4345 EHCI USB Controller (IXP 150) - 4347 OHCI USB Controller *1 (IXP 150) - 4348 OHCI USB Controller *2 (IXP 150) - 4349 PATA 100 Controller (IXP 1xx/2xx) - 434C LPC Controller (IXP 150) - 434D Agere Systems AC'97 Modem device (a75-s226) + 4341 AC'97 Audio Controller (SB200) + 4342 PCI-PCI Bridge (SB200) + 4345 EHCI USB Controller (SB200) + 4347 OHCI USB Controller *1 + 4348 OHCI USB Controller *2 + 4349 PATA-100 IDE Controller (SB200) + 434C PCI-ISA Bridge (SB200) + 434D AC'97 Modem Controller (SB200) 4353 IXP SB200 SMBUS Controller - 4354 mach64 ct pci (215r2qzua21) - 4358 Mach64 CX (216l0sas25) + 4354 Mach64 CT (215CT222) + 4358 Mach64 CX (210888CX) 4361 AC'97 Audio Controller 4363 IXP SB300 SMBUS Controller 4369 PATA 133 Controller (IXP 3xx) 436D IXP SB300 AC'97 Modem Controller 436E IXP SB300 Serial ATA Controller - 4370 IXP AC'97 Audio Controller (IXP_AUDIO_400) + 4370 IXP SB400 AC'97 Audio Controller 4371 IXP SB400 PCI-PCI Bridge 4372 ATI SMBus (x200) 4373 IXP SB400 EHCI USB 2.0 Controller @@ -395,7 +407,7 @@ 4378 IXP SB400 AC'97 Modem Controller 4379 IXP SB400 Serial ATA Controller 437A IXP SB400 Serial ATA Controller - 437B IXP SB450 High Definition Audio Controller (Intel Corporation) + 437B IXP SB450 High Definition Audio Controller 4380 IXP SB600 Serial ATA Controller 4381 IXP SB600 Serial ATA RAID Controller 4382 IXP SB600 AC'97 Audio Controller @@ -409,9 +421,9 @@ 438A IXP SB600 USB Controller (OHCI3) 438B IXP SB600 USB Controller (OHCI4) 438C ATI RD600/RS600 IDE Controller (RD600/RS600) - 438D ATK0110 ACPI Utility (1043.4.0.0) + 438D IXP SB600 PCI to LPC Bridge 438E IXP SB600 AC'97 Modem Controller - 4390 SB700 SATA Controller [IDE mode] + 4390 Integrated SATA II Controller (SB700) 4391 SB700 SATA Controller [AHCI mode] 4392 SB700 SATA Controller [Non-RAID5 mode] 4393 SB700 SATA Controller [RAID5 mode] @@ -419,16 +431,16 @@ 4395 SB SATA Controller [AHCI mode with HyperFlash-PCIE] 4396 SB700 USB EHCI Controller 4397 SB700 USB OHCI0 Controller - 4398 SB700 USB OHCI1 Controller + 4398 Standard OpenHCD USB-Hostcontroller (SB700) 4399 SB700 USB OHCI2 Controller 439C PATA 133 Controller (SB7xx) 439D SB700 LPC host controller 4437 Radeon Mobility 7000 IGP 4554 Mach64 ET 4654 113--34004-104 (Mach64 VT) - 4742 ATI 3D Rage Pro AGP 2X 8mb (gt-c2u2) ((GT-C2U2)) + 4742 3D Rage Pro AGP 1X/2X ((GT-C2U2)) 4744 Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x) - 4747 GT-C2U2 (Rage 3D Pro) + 4747 Rage 3D Pro (GT-C2U2) 4749 ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X) 474C k7 som+ (Rage XC PCI-66) 474D SLAT (Rage XL AGP 2x) @@ -442,7 +454,7 @@ 4755 3d rage 2 + dvd (Rage 3D II+pci) 4756 Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package) 4757 Rage 3D IIC AGP (BGA Package) - 4758 Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX]) + 4758 Mach64 GX (210888GX) 4759 m3d agp card on agp slot (215r2qzua21) 475A Rage 3D IIC AGP (PQFP Package) 4964 Radeon 9000 Series (RV250 Id) @@ -451,33 +463,33 @@ 4967 Radeon 9000 (RV250) 496E Radeon 9000/9000 Pro - Secondary (RV250) 496F Radeon 9000 (RV250) - Secondary - 4A48 Radeon X800 Series (R420 JH) - 4A49 Radeon X800 gt (R423) - 4A4A Radeon X800 Series - 4A4B RADEON X800 XT (R420) - 4A4C Radeon X800 Series (R420 JL) - 4A4D FireGL X3 (R420 JM) - 4A4E Radeon Mobility 9800 (M18 JN) - 4A4F Radeon X800 SE - 4A50 Radeon X800 XT Platinum - 4A54 Radeon X800 VE (R420) - 4A68 Radeon X800 Series Secondary - 4A69 Radeon X800 Series - Secondary - 4A6A Radeon X800 Series - Secondary - 4A6B RADEON X800 XT Secondary (R420) - 4A6C Radeon X800 Series Secondary - 4A6D FIREGL X3-256 Secondary - 4A6F Radeon X800 SE Secondary - 4A70 Radeon X800 XT Platinum - Secondary - 4A74 Radeon X800 VE (R420) (Secondary) - 4B49 Radeon X850XT + 4A48 ATI RADEON X800 Series (R420) + 4A49 ATI RADEON X800 PRO (R420) + 4A4A ATI RADEON X800 Series (R420) + 4A4B ATI RADEON X800 XT (R420) + 4A4C ATI RADEON X800 Series (R420) + 4A4D ATI FireGL X3-256 (R420GL) + 4A4E ATI MOBILITY /ATI RADEON 9800 (M18) + 4A4F ATI RADEON X800 SE (R420) + 4A50 ATI RADEON X800 XT Platinum Edition (R420) + 4A54 ATI RADEON X800 VE (R420) + 4A68 ATI RADEON X800 Series Secondary (R420) + 4A69 ATI RADEON X800 PRO Secondary (R420) + 4A6A ATI RADEON X800 Series Secondary (R420) + 4A6B ATI RADEON X800 XT Secondary (R420) + 4A6C ATI RADEON X800 Series Secondary (R420) + 4A6D ATI FireGL X3-256 Secondary (R420GL) + 4A6F ATI RADEON X800 SE Secondary (R420) + 4A70 ATI RADEON X800 XT Platinum Edition Secondary (R420) + 4A74 ATI RADEON X800 VE Secondary (R420) + 4B49 ATI RADEON X850 XT (R481) 4B4A Radeon X850 SE - 4B4B Radeon X850 PRO - 4B4C Radeon X850XT-PE - 4B69 Radeon X850XT secondary - 4B6A Radeon X850 SE Secondary - 4B6B Radeon X850 PRO secondary - 4B6C Radeon X850XT-PE Secondary + 4B4B ATI RADEON X850 PRO (R481) + 4B4C ATI RADEON X850 XT Platinum Edition (R481) + 4B69 ATI RADEON X850 XT Secondary (R481) + 4B6A ATI RADEON X850 SE Secondary (R481) + 4B6B ATI RADEON X850 PRO Secondary (R481) + 4B6C ATI RADEON X850 XT Platinum Edition Secondary (R481) 4C42 Rage 3D LT Pro AGP 133MHz (BGA-312 Package) 4C44 Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP) 4C45 Rage Mobility M3 AGP @@ -486,18 +498,18 @@ 4C49 Rage 3D LT Pro PCI (BGA-312 Package) 4C4D Rage P/M Mobility AGP 2x (01541014) 4C4E Rage Mobility l (216lo sasa25) - 4C50 Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC) + 4C50 Rage 3D LT Pro PCI (BGA-256 Package) 4C51 Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D) 4C52 Rage P/M Mobility PCI 4C53 Rage L Mobility PCI (216L0SASA25) 4C54 Mach64 LT (264LT) - 4C57 Mobility Radeon 7500 (fdds) + 4C57 Mobility Radeon 7500 (M7 [LW]) 4C58 FireGL Mobility 4C59 Radeon Mobility M6 Series (Mobility 6) 4C5A Radeon Mobility M6 LZ 4C64 Radeon Mobility M9-GL 4C65 Radeon Mobility 9000 (R250 Le) - 4C66 Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -) + 4C66 MOBILITY RADEON 9000 (M9) (R250) 4C67 Radeon Mobility 9000 (R250 Lg) 4C6E Radeon Mobility 9000 - Secondary (R250 Ln) 4D46 Rage Mobility 128 AGP 4x (ATI mobility128) @@ -507,27 +519,27 @@ 4D52 ATI Theater 550 Pro (ATI Theater 550 Pro) 4D53 Unified AVStream Driver 4E44 Radeon 9700/Pro, 9500 Series (R300) - 4E45 Radeon 9700/9500 Series (R300) - 4E46 Radeon 9600TX (R300) + 4E45 ATI RADEON 9500 PRO / 9700 (R300) + 4E46 ATI RADEON 9600 TX (R300) 4E47 Fire GL X1/Z1 AGP/Pro Video Accelerator (R300-WS) - 4E48 Radeon 9800 Pro (R350) + 4E48 ATI RADEON 9800 PRO (R350) 4E49 Radeon 9800 (R350) (??) - 4E4A Radeon 9800 XT (R350) - 4E4B ATI FIREGL X2-256T (FGL9800XT) - 4E50 Mobility Radeon 9700 (M10 NP) (RV350) - 4E51 Mobility Radeon 9600 (M10 NQ) + 4E4A ATI RADEON 9800 XT (R360) + 4E4B ATI FireGL X2-256/X2-256t (R350GL) + 4E50 ATI MOBILITY /ATI RADEON 9600/9700 Series (M10) + 4E51 ATI RADEON 9600 Series (RV350) 4E52 Mobility Radeon 9500/9600 (M10) (RV350) 4E53 Radeon Mobility 9600 (M10 NS) - 4E54 Radeon Mobility M10 NT (RV350-WS) - 4E56 FireGL Mobility T2e (M11 NV) + 4E54 ATI MOBILITY FIRE GL T2/T2e (M10GL) + 4E56 ATI MOBILITY /ATI RADEON 9550 (M12) 4E64 Radeon 9700/Pro, 9500 (R300) Series - Secondary - 4E65 Radeon 9700/9500 Series (R300) - Secondary - 4E66 Radeon 9600TX (R300) - Secondary + 4E65 ATI RADEON 9500 PRO / 9700 Secondary (R300) + 4E66 ATI RADEON 9600 TX Secondary (R300) 4E67 Fire GL X1/Z1 AGP/Pro Secondary Video Accelerator - 4E68 Radeon 9800 Pro (R350) - Secondary - 4E69 Radeon 9800 (R350) - Secondary - 4E6A Radeon 9800 XT (R350) - Secondary - 4E6B ATI FIREGL X2-256T Secondary (FGL9800XT) + 4E68 ATI RADEON 9800 PRO Secondary (R350) + 4E69 ATI RADEON 9800 Secondary (R350) + 4E6A ATI RADEON 9800 XT Secondary (R360) + 4E6B ATI FireGL X2-256/X2-256t Secondary (R350GL) 4E71 Radeon Mobility 9600 (M10 NQ) (secondary) 4F72 Radeon 9000 Series (RV250) 4F73 Radeon 9000 Series (RV250) (Secondary) @@ -538,8 +550,8 @@ 5045 Rage 128 PE/Pro AGP 2x (TMDS) 5046 Rage 128 PF/Pro AGP 4x (TMDS) 5047 3d Rage pro agp 2x (215R3BUA22) - 5048 Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP) - 5049 Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t) + 5048 Rage 128 Pro PH AGP 2x (8212104D) + 5049 Rage 128 Pro PI AGP 4x (R128) 504A Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI) 504B Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP) 504C 4x (TMDS) (Rage 128 Pro PL AGP) @@ -583,7 +595,7 @@ 516D Radeon 9100 Series (R200) - Secondary 5245 Rage 128 GL PCI (215R46ASA22) 5246 Rage 32MB (Rage 128 PRO) - 5247 Rage 128 RG + 5247 Rage 128 RG (Rage 32MB) 524B Rage 128 VR RK PCI (g01080-108) 524C Rage 128 RL/VR AGP 2x 5345 Rage 128 SE/4x PCI @@ -595,68 +607,68 @@ 534D Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x) 534E Rage 128 4x 5354 Mach 64 ST - 5446 Video Controller (VGA Compatible) (ewmewm) + 5446 Rage 128 Pro Ultra TF (unknown) 544C Rage 128 Pro TL 5452 Rage 128 Pro TR 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rade 128 Pro Ultra TU - 5460 Radeon X300 Mobility (M22) (RV370) - 5461 Mobility Radeon X300 - 5462 Mobility Radeon X600 SE - 5464 FireGL GL (M22) - 5548 Radeon X800 (R423 UH) - 5549 Radeon X800 Pro - 554A Radeon X800 XT Platinum - 554B Primary (X800GT) + 5460 ATI MOBILITY /ATI RADEON X300 (M22) + 5461 ATI MOBILITY /ATI RADEON X300 (M22) + 5462 ATI MOBILITY /ATI RADEON X600 SE (M24C) + 5464 ATI MOBILITY FireGL V3100 (M22GL) + 5548 ATI RADEON X800 Series (R423) + 5549 ATI RADEON X800 GTO (R423) + 554A ATI RADEON X800 XT Platinum Edition (R423) + 554B ATI RADEON X800 GT (R423) 554C R430 XTP - 554D Radeon X800 XL (R430) - 554E Radeon X800 Series - 554F Radeon X800 Series - 5550 FireGL V7100 (R423) - 5551 ATI FIREGL V5100 PCI-EX Primary (R423GL-SE) + 554D ATI RADEON X800 CrossFire Edition (R430) + 554E ATI RADEON X800 GT (R430) + 554F ATI RADEON X800 GTO (R430) + 5550 ATI FireGL V7100 (R423GL) + 5551 ATI FireGL V5100 (R423GL) 5552 FireGL V5100 (R423 UR) 5554 FireGL V7100 (R423 UT) - 5568 Radeon X800 Series Secondary - 5569 Radeon X800 Pro - Secondary - 556A Radeon X800 XT Platinum - Secondary - 556B Radeon X800 SE - Secondary + 5568 ATI RADEON X800 Series Secondary (R423) + 5569 ATI RADEON X800 GTO Secondary (R423) + 556A ATI RADEON X800 XT Platinum Edition Secondary (R423) + 556B ATI RADEON X800 GT Secondary (R423) 556C R430 XTP Secondary - 556D Radeon X800 XL - Secondary (R430) - 556E Radeon X800 Series - Secondary - 556F Radeon X800 Series - Secondary - 5570 FIREGL V7100 Secondary - 5571 ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE) - 564A Mobility FIREGL V5000 (M26) - 564B Mobility FIREGL V5000 - 564F Mobility Radeon X700 XL PCIe (M26) - 5652 Mobility Radeon X700 - 5653 Mobility Radeon X700 - 5654 Mach 64 VT VIDEO XPRESSION (215VT2CA42) + 556D ATI RADEON X800 CrossFire Edition Secondary (R430) + 556E ATI RADEON X800 GT Secondary (R430) + 556F ATI RADEON X800 GTO Secondary (R430) + 5570 ATI FireGL V7100 Secondary (R423GL) + 5571 FireGL V5100 PCIe (R423GL-SE) - Secondary + 564A ATI MOBILITY FireGL V5000 (M26GL) + 564B ATI MOBILITY FireGL V5000 (M26GL) + 564F ATI MOBILITY /ATI RADEON X700 XL (M26) + 5652 ATI MOBILITY /ATI RADEON X700 (M26) + 5653 ATI MOBILITY/ATI RADEON X700 (RV410) + 5654 Mach64 VT (215VT22200) 5655 Mach 64 VT3 5656 Mach 64 VT4 PCI (Mach 64 VT4 PCI) - 5657 Radeon X550/X700 Series + 5657 ATI RADEON X550/X700 Series (RV410) 566F RADEON X700 SERIES SECONDARY - 5673 Mobility Radeon X700 Secondary - 5677 Radeon X550/X700 Series Secondary + 5673 ATI MOBILITY /ATI RADEON X700 Secondary (M26) + 5677 ATI RADEON X550/X700 Series Secondary (RV410) 5830 RS300/100 Host Bridge 5831 RS300/133 Host Bridge 5832 RS300/166 Host Bridge - 5833 Radeon IGP9100 RS300/200 Host Bridge + 5833 ATI Radeon 9000/9100 IGP Chipset - Host-PCI Bridge (RS300M) 5834 Radeon 9100 IGP (RS300) - 5835 Mobility Radeon 9100 IGP (RS300M AGP) - 5838 AGP Bridge (Radeon 9100 IGP) + 5835 Mobilitiy Radeon 9100 IGP AGP (RS300M) + 5838 ATI Radeon 9000/9100 IGP Chipset - AGP Controller (RS300M) 5854 Radeon XPRESS 200 Series Secondary 5874 Radeon XPRESS 200 Series Secondary - 5940 www.ati.comRadeon 9200 Pro - Secondary (RV280) + 5940 Radeon 9200 Pro Secondary (RV280) 5941 ATI Radeon 9200 - Secondary (RV280) 5942 Radeon 9000U Family - Secondary 5944 Radeon 9200SE PCI (RV280) 5950 RS480 Host Bridge 5951 Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge 5952 CrossFire Xpress 3200 (RD580) Chipset Host Bridge - 5954 ATI Radeon Xpress 200 Series - RS480 (na) - 5955 Mobility Radeon XPRESS 200 + 5954 ATI RADEON Xpress Series (RS480) + 5955 ATI RADEON Xpress Series (RS480M) 5956 RD790 GFX Dual Slot 5957 RX790 GFX Single Slot 5958 RD780 GFX Dual Slot @@ -664,10 +676,10 @@ 5961 ATI RADEON 9200 se agp (RV280) 5962 Radeon 9000U Family 5964 Radeon 9200 SE Series (Radeon 9200) - 5965 FireMV 2200 (Nvidia) + 5965 FireMV 2200 (unknown) 5969 ES1000 - 5974 Radeon XPRESS 200 Series - 5975 ATI Radeon X1100 (Radeon Xpress 1100) + 5974 ATI RADEON Xpress Series (RS482) + 5975 ATI RADEON Xpress Series (RS482M) 5978 RD790 PCI to PCI bridge (external gfx0 port A) 5979 RD790 PCI to PCI bridge (external gfx0 port B) 597A RD790 PCI to PCI bridge (PCIe gpp port A) @@ -696,7 +708,7 @@ 5A1E RD890 PCI to PCI bridge (external gfx1 port B) 5A1F RD890 PCI to PCI bridge (NB-SB link) 5A30 RS400/100 Host Bridge - 5A31 RS400/133 Host Bridge + 5A31 Host Bridge (RS400/133) 5A32 RS400/166 Host Bridge 5A33 Northbridge: Radeon Xpress 200 (RC410) 5A34 RS480 PCI-X Root Port @@ -705,211 +717,220 @@ 5A38 RS480 PCI Bridge 5A39 RS480 PCI Bridge 5A3F RS480 PCI Bridge - 5A41 Radeon XPRESS 200 - 5A42 SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M) + 5A41 ATI RADEON Xpress Series (RS400) + 5A42 ATI RADEON Xpress Series (RS400M) 5A43 Radeon XPRESS 200 Series Secondary - 5A61 Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410)) - 5A62 ATI RADEON XPRESS 1100 (RC410M) + 5A61 ATI RADEON Xpress Series (RC410) + 5A62 ATI RADEON Xpress Series (RC410M) 5A63 Radeon XPRESS 200 Series Secondary - 5B60 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300) + 5B60 ATI RADEON X300/X550/X1050 Series (RV370) 5B61 RV371 - 5B62 RADEON X600 Series 265MB (RV380) - 5B63 ATI Radoen X1050 (Unknown) - 5B64 FireGL V3100 (RV370 5B64) + 5B62 ATI RADEON X600 Series (RV380x) + 5B63 ATI RADEON X300/X550/X1050 Series (RV370) + 5B64 ATI FireGL V3100 (RV370GL) 5B65 FireGL D1100 (RV370 5B65) 5B66 RV370X - 5B70 Radeon X300/X550/X1050 Series - Secondary + 5B70 ATI RADEON X300/X550/X1050 Series Secondary (RV370) 5B71 RV371 Secondary - 5B72 Radeon X600 Series - Secondary - 5B73 Radeon X550 Series - Secondary - 5B74 ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100) - 5B75 FIREMV 2200 Secondary + 5B72 ATI RADEON X600 Series Secondary (RV380x) + 5B73 ATI RADEON X300/X550/X1050 Series Secondary (RV370) + 5B74 ATI FireGL V3100 Secondary (RV370GL) + 5B75 ATI FireMV 2200 Secondary (RV370) 5B76 RV370X Secondary 5C61 Mobility Radeon 9200 (bk-ati ver008.016m.085.006) 5C63 Mobility Radeon 9200 (RV280 (M9+)) 5D44 Radeon 9200 SE Series - Secondary (RV280) 5D45 ATI FireMV 2200 PCI Secondary (RV280) - 5D48 Mobility Radeon X800 XT - 5D49 Mobility FireGL V5100 - 5D4A PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800) + 5D48 ATI MOBILITY/ATI RADEON X800 XT (M28) + 5D49 ATI MOBILITY FireGL V5100 (M28GL) + 5D4A ATI MOBILITY /ATI RADEON X800 (M28) 5D4C R480 CONSUMER 4P - 5D4D Radeon XT850 (Radeon XT850) + 5D4D ATI RADEON X850 XT Platinum Edition (R480) 5D4E Radeon X800 GT - 5D4F x800gto 256 pci-e (r480) - 5D50 FIREGL V7200 - 5D52 Radeon X850XT (PCIE) Primary (R480) - 5D57 Radeon X800 XT + 5D4F ATI RADEON X800 GTO (R480) + 5D50 ATI FireGL V7200 (R480GL) + 5D52 ATI RADEON X850 XT (R480) + 5D57 ATI RADEON X800 XT (R423) 5D6C R480 CONSUMER 4P Secondary - 5D6D Radeon X850 Series - Secondary + 5D6D ATI RADEON X850 XT Platinum Edition Secondary (R480) 5D6E Radeon X800 GT Secondary - 5D6F Radeon X850 Pro 256M (01131002) - 5D70 FIREGL V7200 Secondary - 5D72 Radeon X850 Series - Secondary - 5D77 Radeon X800 XT - Secondary - 5E48 FireGL V5000 (RV410) + 5D6F ATI RADEON X800 GTO Secondary (R480) + 5D70 ATI FireGL V7200 Secondary (R480GL) + 5D72 ATI RADEON X850 XT Secondary (R480) + 5D77 ATI RADEON X800 XT Secondary (R423) + 5E48 ATI FireGL V5000 (RV410GL) 5E49 FireGL V3300 (RV410) - 5E4A Radeon X700 Series - 5E4B Radeon X700 Series - 5E4C Radeon X700 Series - 5E4D Radeon X700 Series - 5E4F Radeon X700 SE - 5E68 FIREGL V5000 Secondary - 5E6A Radeon X700 Series - Secondary - 5E6B Radeon X700 Series - Secondary - 5E6C Radeon X700 Series - Secondary - 5E6D Radeon X700 Series - Secondary - 5E6F Radeon X700 SE - Secondary + 5E4A ATI RADEON X700 XT (RV410) + 5E4B ATI RADEON X700 PRO (RV410) + 5E4C ATI RADEON X700 SE (RV410) + 5E4D ATI RADEON X700 (RV410) + 5E4F ATI RADEON X700/X550 Series (RV410) + 5E68 ATI FireGL V5000 Secondary (RV410GL) + 5E6A ATI RADEON X700 XT Secondary (RV410) + 5E6B ATI RADEON X700 PRO Secondary (RV410) + 5E6C ATI RADEON X700 SE Secondary (RV410) + 5E6D ATI RADEON X700 Secondary (RV410) + 5E6F ATI RADEON X700/X550 Series Secondary (RV410) 5F57 Radeon X800XT PCIe (R423) + 6898 ATI Radeon HD 5800 Series (EG CYPRESS XT) + 6899 ATI Radeon HD 5800 Series (EG CYPRESS PRO) + 68A0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68A1 ATI Mobility Radeon HD 5800 Series (EG BROADWAY PRO/LP) + 68B0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68B8 ATI Radeon HD 5700 Series (EG JUNIPER XT) + 68BE ATI Radeon HD 5700 Series (EG JUNIPER LE) 700F PCI to AGP Bridge (A3/U1) 7010 PCI to AGP Bridge (RS200) - 7100 Radeon X1800 Series - 7101 Mobility Radeon X1800 XT - 7102 Radeon Mobility X1800 - 7103 Mobility FireGL V7200 - 7104 ATI FireGL 7200 or 3200 - 7105 R520 [FireGL] - 7106 Mobility FireGL V7100 - 7108 Radeon Mobility X1800 + 7100 ATI RADEON X1800 Series (R520) + 7101 ATI MOBILITY /ATI RADEON X1800 XT (M58) + 7102 ATI MOBILITY /ATI RADEON X1800 (M58) + 7103 ATI MOBILITY FireGL V7200 (M58GL) + 7104 ATI FireGL V7200 (R520GL) + 7105 ATI FireGL V5300 (R520GL) + 7106 ATI MOBILITY FireGL V7100 (M58GL) + 7108 ATI RADEON X1800 Series (R520) 7109 Radeon X1800 Series - Secondary - 710A Radeon X1800 GTO - 710B Radeon X1800 - 710C Radeon X1800 - 710E FIREGL V7300 - 710F ATI FireGL (V7350) - 7120 Radeon X1800 Series Secondary - 7124 FireGL V7200 (R520 GL) - Secondary - 7125 Radeon X1800 Series Secondary - 7128 Radeon X1800 Series Secondary - 7129 Radeon X1800 Series - Secondary - 712A Radeon X1800 GTO - Secondary - 712B Radeon X1800 Series Secondary - 712C Radeon X1800 Series Secondary - 712E FIREGL V7300 Secondary - 712F ATI FireGL (V 7350 Secondary) - 7140 Radeon X1300 Series + 710A ATI RADEON X1800 Series (R520) + 710B ATI RADEON X1800 Series (R520) + 710C ATI RADEON X1800 Series (R520) + 710E ATI FireGL V7300 (R520GL) + 710F ATI FireGL V7350 (R520GL) + 7120 ATI RADEON X1800 Series Secondary (R520) + 7124 ATI FireGL V7200 Secondary (R520GL) + 7125 ATI FireGL V5300 Secondary (R520GL) + 7128 ATI RADEON X1800 Series Secondary (R520) + 7129 ATI RADEON X1800 Series Secondary (R520) + 712A ATI RADEON X1800 Series Secondary (R520) + 712B ATI RADEON X1800 Series Secondary (R520) + 712C ATI RADEON X1800 Series Secondary (R520) + 712E ATI FireGL V7300 Secondary (R520GL) + 712F ATI FireGL V7350 Secondary (R520GL) + 7140 ATI RADEON X1600 Series (RV515) 7141 RV505 - 7142 Radeon X1300 Pro or X1550 (rv515) - 7143 Radeon X1550 Series (RV505) - 7145 PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400) - 7146 Radeon X1300 XGE (N/A) - 7147 Radeon X1550 64-bit (RV505) - 7149 ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG) - 714A Mobility Radeon X1300 - 714B Mobility Radeon X1300 - 714C Mobility Radeon X1300 - 714D Radeon X1300 (RV515) - 714E Radeon X1300 (RV515) + 7142 ATI RADEON X1300/X1550 Series (RV515) + 7143 ATI RADEON X1550 Series (RV515) + 7145 ATI MOBILITY /ATI RADEON X1400 (M54) + 7146 ATI RADEON X1300 / X1550 Series (RV515) + 7147 ATI RADEON X1550 64-bit (RV515) + 7149 ATI MOBILITY /ATI RADEON X1300 (M52) + 714A ATI MOBILITY /ATI RADEON X1300 (M52) + 714B ATI MOBILITY /ATI RADEON X1300 (M52) + 714C ATI MOBILITY /ATI RADEON X1300 (M52) + 714D ATI RADEON X1300 Series (RV515) + 714E ATI RADEON X1300 Series (RV515PCI) 714F RV505 7151 RV505 - 7152 HP Fire GL v3300 (Fire GL v3300) - 7153 FireGL V3350 (RV515GL) - 715E Radeon X1300 Series - 715F Radeon X1300 Series - 7160 Radeon X1300 Series - Secondary + 7152 ATI FireGL V3300 (RV515GL) + 7153 ATI FireGL V3350 (RV515GL) + 715E ATI RADEON X1300 Series (RV515) + 715F ATI RADEON X1550 64-bit (RV515) + 7160 ATI RADEON X1600 Series Secondary (RV515) 7161 RV505 Secondary - 7162 Radeon X1300 Series - Secondary - 7163 Radeon X1300 PRO Secondary - 7166 Radeon X1300 Series - Secondary - 7167 Radeon X1300 Series Secondary + 7162 ATI RADEON X1300/X1550 Series Secondary (RV515) + 7163 ATI RADEON X1550 Series Secondary (RV515) + 7166 ATI RADEON X1300 / X1550 Series Secondary (RV515) + 7167 ATI RADEON X1550 64-bit Secondary (RV515) 7169 M52 Secondary - 716D Radeon X1300 Series Secondary - 716E Radeon X1300 Series Secondary + 716D ATI RADEON X1300 Series Secondary (RV515) + 716E ATI RADEON X1300 Series Secondary (RV515PCI) 716F RV505 Secondary 7171 RV505 Secondary - 7172 FireGL V3300 (RV515GL) Secondary - 7173 FireGL V3350 (RV515GL) Secondary - 717E Radeon X1300 Series Secondary - 717F Radeon X1300 Series Secondary - 7180 Radeon X1300 Series - 7181 Radeon X1600 Series (RV516XT) - 7183 Radeon X1300/X1550 Series (RV505) - 7186 PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450) - 7187 Radeon 1300 (Radeon 1300) - 7188 ATI Mobility Radeon X2300 (Mobility X2300) - 718A Mobility Radeon X2300 Series - 718B Mobility Radeon X1350 - 718C Mobility Radeon X1350 - 718D Mobility Radeon X1450 - 718F Radeon X1300 Series - 7193 Radeon X1550 Series - 7196 Mobility Radeon X1350 - 719B FireMV 2250 - 719F Radeon X1550 Series - 71A0 Radeon X1300 Series Secondary - 71A1 Radeon X1600 Series (RV516XT) Secondary - 71A3 Radeon X1300 Series Secondary - 71A7 Radeon 1300 Secondary (Radeon 1300) - 71B3 Radeon X1550 Series Secondary - 71BB FireMV 2250 Secondary - 71C0 Radeon X1600 Series - 71C1 Radeon X1650 Pro (RV535) - 71C2 ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E) - 71C3 Radeon X1600 Series - 71C4 Mobility FIREGL V5200 - 71C5 Radeon X1600 Mobility (RV530?) - 71C6 Radeon X1650 Series (RV530 LE) - 71C7 RADEON X1650 SERIES - 71CD Radeon X1600 Series - 71CE Radeon X1600 PRO / X1300XT (RV530 VE) - 71D2 FireGL V3400 (RV530GL) - 71D4 Mobility FireGL V5250 (M56GL) - 71D5 Mobility Radeon X1700 (M66-P) - 71D6 Mobility Radeon X1700 (M66-XT) - 71DA FIREGL V5200 - 71DE Ati Radeon X2500 (Uknown) - 71E0 Radeon X1600 Series Secondary - 71E1 Radeon X1650 Series Secondary - 71E2 Radeon X1600 Series Secondary - 71E3 Radeon X1600 Series Secondary + 7172 ATI FireGL V3300 Secondary (RV515GL) + 7173 ATI FireGL V3350 Secondary (RV515GL) + 717E ATI RADEON X1300 Series Secondary (RV515) + 717F ATI RADEON X1550 64-bit Secondary (RV515) + 7180 ATI RADEON X1300/X1550 Series (RV515) + 7181 ATI RADEON X1600 Series (RV515) + 7183 ATI RADEON X1300/X1550 Series (RV515) + 7186 ATI MOBILITY /ATI RADEON X1450 (M54) + 7187 ATI RADEON X1300/X1550 Series (RV515) + 7188 ATI MOBILITY /ATI RADEON X2300 (M54) + 718A ATI MOBILITY /ATI RADEON X2300 (M54) + 718B ATI MOBILITY /ATI RADEON X1350 (M52) + 718C ATI MOBILITY /ATI RADEON X1350 (M52) + 718D ATI MOBILITY /ATI RADEON X1450 (M54) + 718F ATI RADEON X1300 Series (RV515PCI) + 7193 ATI RADEON X1550 Series (RV515) + 7196 ATI MOBILITY /ATI RADEON X1350 (M52) + 719B ATI FireMV 2250 (RV515) + 719F ATI RADEON X1550 64-bit (RV515) + 71A0 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A1 ATI RADEON X1600 Series Secondary (RV515) + 71A3 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A7 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71AF ATI RADEON X1300 Series Secondary (RV515PCI) + 71B3 ATI RADEON X1550 Series Secondary (RV515) + 71BB ATI FireMV 2250 Secondary (RV515) + 71C0 ATI RADEON X1600 Series (RV530) + 71C1 ATI RADEON X1650 Series (RV535) + 71C2 ATI RADEON X1600 Series (RV530) + 71C3 ATI RADEON X1300 Series (RV535) + 71C4 ATI MOBILITY FireGL V5200 (M56GL) + 71C5 ATI MOBILITY /ATI RADEON X1600 (M56) + 71C6 ATI RADEON X1650 Series (RV530) + 71C7 ATI RADEON X1650 Series (RV535) + 71CD ATI RADEON X1600 Series (RV530) + 71CE ATI RADEON X1600 Pro / ATI RADEON X1300 XT (RV530) + 71D2 ATI FireGL V3400 (RV530GL) + 71D4 ATI MOBILITY FireGL V5250 (M56GL) + 71D5 ATI MOBILITY /ATI RADEON X1700 (M56) + 71D6 ATI MOBILITY /ATI RADEON X1700 XT (M56) + 71DA ATI FireGL V5200 (RV530GL) + 71DE ATI MOBILITY /ATI RADEON X1700 (M56) + 71E0 ATI RADEON X1600 Series Secondary (RV530) + 71E1 ATI RADEON X1650 Series Secondary (RV535) + 71E2 ATI RADEON X1600 Series Secondary (RV530) + 71E3 ATI RADEON X1300 Series Secondary (RV535) 71E5 M56 Secondary - 71E6 Radeon X1650 Series Secondary (RV530 LE) - 71E7 RADEON X1650 SERIES SECONDARY - 71ED Radeon X1600 Series Secondary - 71EE Radeon X1600 PRO / X1300XT Secondary (RV530 VE) + 71E6 ATI RADEON X1600 Series Secondary (RV530) + 71E7 ATI RADEON X1650 Series Secondary (RV535) + 71ED ATI RADEON X1600 Series Secondary (RV530) + 71EE ATI RADEON X1600 Pro / ATI RADEON X1300 XT Secondary (RV530) 71F2 ATI FireGL V3400 Secondary (RV530GL) - 71FA FIREGL V5200 Secondary + 71FA ATI FireGL V5200 Secondary (RV530GL) 71FE RV530 SE Secondary 7205 S3G Unichrome IGP KM400/KN400 (1106) - 7210 Mobility Radeon X2100 - 7211 Mobility Radeon X2100 Secondary - 7240 Radeon X1900 (R580) + 7210 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7211 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7240 ATI RADEON X1950 Series (R580) 7241 Radeon X1900 (R580) 7242 Radeon X1900 (R580) - 7243 Radeon X1900 (R580) - 7244 Radeon X1950XT Series - 7245 Radeon X1900 (R580) - 7246 Radeon X1900 (R580) - 7247 Radeon X1900 (R580) - 7248 Radeon X1900 (R580) - 7249 Radeon X1900 Series - 724A Radeon X1900 (R580) - 724B R580LE (180636911721) - 724C Radeon X1900 (R580) - 724D Radeon X1900 (R580) + 7243 ATI RADEON X1900 Series (R580) + 7244 ATI RADEON X1950 Series (R580) + 7245 ATI RADEON X1900 Series (R580) + 7246 ATI RADEON X1900 Series (R580) + 7247 ATI RADEON X1900 Series (R580) + 7248 ATI RADEON X1900 Series (R580) + 7249 ATI RADEON X1900 Series (R580) + 724A ATI RADEON X1900 Series (R580) + 724B ATI RADEON X1900 Series (R580) + 724C ATI RADEON X1900 Series (R580) + 724D ATI RADEON X1900 Series (R580) 724E FireGL V7300/V7350 PCIe (R580) - 724F Radeon X1900 Series - 7260 Radeon X1950 Series Secondary - 7263 Radeon X1900 Series Secondary - 7264 Radeon X1950XT Series Secondary - 7265 Radeon X1900 Series Secondary - 7266 Radeon X1900 Series Secondary - 7267 Radeon X1900 Series Secondary - 7268 Radeon X1950 Series Secondary - 7269 Radeon X1900 Series Secondary - 726A Radeon X1900 Series Secondary - 726B Radeon X1900 Secondary - 726C Radeon X1900 Series Secondary - 726D Radeon X1900 Series Secondary + 724F ATI RADEON X1900 Series (R580) + 7260 ATI RADEON X1950 Series Secondary (R580) + 7263 ATI RADEON X1900 Series Secondary (R580) + 7264 ATI RADEON X1950 Series Secondary (R580) + 7265 ATI RADEON X1900 Series Secondary (R580) + 7266 ATI RADEON X1900 Series Secondary (R580) + 7267 ATI RADEON X1900 Series Secondary (R580) + 7268 ATI RADEON X1900 Series Secondary (R580) + 7269 ATI RADEON X1900 Series Secondary (R580) + 726A ATI RADEON X1900 Series Secondary (R580) + 726B ATI RADEON X1900 Series Secondary (R580) + 726C ATI RADEON X1900 Series Secondary (R580) + 726D ATI RADEON X1900 Series Secondary (R580) 726E FireGL V7300/V7350 PCIe (R580) - Secondary - 726F Radeon X1900 Series Secondary - 7280 Radeon X1950 Pro Series AGP (0x7280) (Radeon X1950 Pro) - 7288 Radeon X1950 GT - 7291 Radeon X1650 XT (PCIe) - 7293 Radeon X1650 Series - 72A0 Radeon X1950 Pro Series AGP (0x72A0) (Radeon X1950 Pro Secondary) - 72A8 Radeon X1950 GT (Secondary) - 72B1 Radeon X1650 XT (Secondary) (PCIe) - 72B3 Radeon X1650 Series (Secondary) + 726F ATI RADEON X1900 Series Secondary (R580) + 7280 ATI RADEON X1950 Series (R580) + 7284 ATI MOBILITY /ATI RADEON X1900 (M58) + 7288 ATI RADEON X1950 GT (R580) + 7291 ATI RADEON X1650 Series (R580) + 7293 ATI RADEON X1650 Series (R580) + 72A0 ATI RADEON X1950 Series Secondary (R580) + 72A8 ATI RADEON X1950 GT Secondary (R580) + 72B1 ATI RADEON X1650 Series Secondary (R580) + 72B3 ATI RADEON X1650 Series Secondary (R580) 7800 ? 7830 RS350/100 Host Bridge 7831 RS350/133 Host Bridge @@ -923,60 +944,136 @@ 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) 7917 RS690 PCI to PCI Bridge (PCI Express Port 3) 7919 Radeon X1200 Series Audio Controller - 791E ATI xpress 1250 (303017AA) - 791F ATI Mobility Radeon x1250 (RS690) + 791A HDMI Audio (791A) + 791E ATI RADEON X1200 Series (RS690) + 791F ATI Mobility Radeon x1100 (RS690M) 7930 RS600(M) Chipset - Host Bridge 7933 RS600(M) Chipset - PCI Express Graphics Port 0 7935 RS600(M) Chipset - PCI Express Port 1 7937 ATI Technoligies Inc (Samsung R25P) - 793F Radeon X1200 Series (Secondary) - 7941 Radeon XPRESS 1300 - 7942 ATI XPress 1250M (1002) - 796E ATI RADEON 2100 (RS740) + 793F ATI RADEON Xpress 1200 Series (RS600) + 7941 ATI RADEON Xpress 1200 Series (RS600) + 7942 ATI RADEON Xpress 1200 Series (RS600M) + 796E ATI RADEON 2100 (RS690) 7C37 Radeon 9600 SE (RV350 AQ) 9400 ATI Radeon HD 2900 XT (R600) - 9401 Radeon HD 2900 XT - 9402 Radeon HD 2900 XT - 9403 Radeon HD 2900 PRO - 9405 Radeon HD 2900 GT - 940A FireGL V8650 - 940B FireGL V8600 - 940F FireGL V7600 - 9440 Graphics adapter (Radeon 4870) - 94C1 ATI Radeon HD 2400 PRO (REV_00) - 94C3 ATI Radeon HD 2400 PRO (RV610) - 94C4 ATI Radeon HD 3470 PRO AGP (RV610) - 94C5 RADEON HD 2400 LE - 94C7 RADEON HD 2350 - 94C8 Mobility Radeon HD 2400 XT - 94C9 Mobility Radeon HD 2400 - 94CB Radeon E2400 - 94CC ATI Radeon HD 2400 Series (ATI Radeon HD 4670 Series) - 9501 ATI Radeon HD 3870 (RV670) - 9505 Radeon HD 3850 - 9515 ATI Radeon HD3850 AGP - 9581 ATI Mobility Radeon HD2600 (600458) - 9583 Mobility Radeon HD 2600 XT - 9586 Radeon HD 2600 XT AGP - 9587 Radeon hd 2600 pro (agp) ( Radeon hd 2600 pro (agp)) - 9588 ATI Radeon HD 2600 XT (RV530) - 9589 ATI Radeon HD 2600 PRO (RV630) + 9401 ATI RADEON HD 2900 XT (R600) + 9402 ATI RADEON HD 2900 XT (R600) + 9403 ATI RADEON HD 2900 PRO (R600) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 3 22:09:06 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 64572106566C; Mon, 3 May 2010 22:09:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 493ED8FC1C; Mon, 3 May 2010 22:09:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o43M96rB014903; Mon, 3 May 2010 22:09:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o43M96UF014900; Mon, 3 May 2010 22:09:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005032209.o43M96UF014900@svn.freebsd.org> From: Xin LI Date: Mon, 3 May 2010 22:09: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: r207587 - stable/7/usr.sbin/newsyslog X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2010 22:09:06 -0000 Author: delphij Date: Mon May 3 22:09:06 2010 New Revision: 207587 URL: http://svn.freebsd.org/changeset/base/207587 Log: MFC r202668 and r200806 [1]: Add a new option, -P, which reverts newsyslog(8) to the old behavior, which stops to proceed further, as it is possible that processes which fails to create PID file get screwed by rotation. ---- Don't consider non-existence of a PID file an error, we should be able to proceed anyway as this most likely mean that the process has been terminated. PR: bin/140397 Submitted by: Dan Lukes Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 stable/7/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/7/usr.sbin/newsyslog/ (props changed) stable/7/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) Modified: stable/7/usr.sbin/newsyslog/newsyslog.8 ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.8 Mon May 3 20:59:27 2010 (r207586) +++ stable/7/usr.sbin/newsyslog/newsyslog.8 Mon May 3 22:09:06 2010 (r207587) @@ -17,7 +17,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd February 24, 2005 +.Dd January 19, 2010 .Dt NEWSYSLOG 8 .Os .Sh NAME @@ -25,7 +25,7 @@ .Nd maintain system log files to manageable sizes .Sh SYNOPSIS .Nm -.Op Fl CFNnrsv +.Op Fl CFNPnrsv .Op Fl R Ar tagname .Op Fl a Ar directory .Op Fl d Ar directory @@ -169,6 +169,10 @@ This option is intended to be used with or .Fl CC options when creating log files is the only objective. +.It Fl P +Prevent further action if we should send signal but the +.Dq pidfile +is empty or does not exist. .It Fl R Ar tagname Specify that .Nm Modified: stable/7/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/7/usr.sbin/newsyslog/newsyslog.c Mon May 3 20:59:27 2010 (r207586) +++ stable/7/usr.sbin/newsyslog/newsyslog.c Mon May 3 22:09:06 2010 (r207587) @@ -167,6 +167,7 @@ int needroot = 1; /* Root privs are nec int noaction = 0; /* Don't do anything, just show it */ int norotate = 0; /* Don't rotate */ int nosignal; /* Do not send any signals */ +int enforcepid = 0; /* If PID file does not exist or empty, do nothing */ int force = 0; /* Force the trim no matter what */ int rotatereq = 0; /* -R = Always rotate the file(s) as given */ /* on the command (this also requires */ @@ -580,7 +581,7 @@ parse_args(int argc, char **argv) *p = '\0'; /* Parse command line options. */ - while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNR:")) != -1) + while ((ch = getopt(argc, argv, "a:d:f:nrsvCD:FNPR:")) != -1) switch (ch) { case 'a': archtodir++; @@ -624,6 +625,9 @@ parse_args(int argc, char **argv) case 'N': norotate++; break; + case 'P': + enforcepid++; + break; case 'R': rotatereq++; requestor = strdup(optarg); @@ -1779,7 +1783,18 @@ set_swpid(struct sigwork_entry *swork, c f = fopen(ent->pid_file, "r"); if (f == NULL) { - warn("can't open pid file: %s", ent->pid_file); + if (errno == ENOENT && enforcepid == 0) { + /* + * Warn if the PID file doesn't exist, but do + * not consider it an error. Most likely it + * means the process has been terminated, + * so it should be safe to rotate any log + * files that the process would have been using. + */ + swork->sw_pidok = 1; + warnx("pid file doesn't exist: %s", ent->pid_file); + } else + warn("can't open pid file: %s", ent->pid_file); return; } @@ -1790,7 +1805,7 @@ set_swpid(struct sigwork_entry *swork, c * has terminated, so it should be safe to rotate any * log files that the process would have been using. */ - if (feof(f)) { + if (feof(f) && enforcepid == 0) { swork->sw_pidok = 1; warnx("pid file is empty: %s", ent->pid_file); } else From owner-svn-src-stable@FreeBSD.ORG Tue May 4 00:42:03 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCE83106564A; Tue, 4 May 2010 00:42:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CC2F18FC12; Tue, 4 May 2010 00:42:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o440g33t050429; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o440g3ZX050427; Tue, 4 May 2010 00:42:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040042.o440g3ZX050427@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 00:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207591 - stable/6/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 00:42:04 -0000 Author: delphij Date: Tue May 4 00:42:03 2010 New Revision: 207591 URL: http://svn.freebsd.org/changeset/base/207591 Log: MFC r195724 (mav): Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size. It fixes kernel panic when requested size is too large (0xffffffff), PR: kern/136726 Modified: stable/6/sys/dev/ata/ata-all.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Mon May 3 22:32:26 2010 (r207590) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 00:42:03 2010 (r207591) @@ -438,6 +438,7 @@ int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data) { struct ata_device *atadev = device_get_softc(dev); + struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_ioc_request *ioc_request = (struct ata_ioc_request *)data; struct ata_params *params = (struct ata_params *)data; int *mode = (int *)data; @@ -447,6 +448,10 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: + if (ioc_request->count > + (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + return (EFBIG); + } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { return ENOMEM; } From owner-svn-src-stable@FreeBSD.ORG Tue May 4 03:56:25 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9A173106566B; Tue, 4 May 2010 03:56:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 858588FC16; Tue, 4 May 2010 03:56:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o443uPwJ093033; Tue, 4 May 2010 03:56:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o443uPvV093032; Tue, 4 May 2010 03:56:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040356.o443uPvV093032@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 03:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207593 - stable/8/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 03:56:25 -0000 Author: imp Date: Tue May 4 03:56:25 2010 New Revision: 207593 URL: http://svn.freebsd.org/changeset/base/207593 Log: MFC: r207461 sparc64, and possibly other architectures, pads the length of the section holding the config file to sh_addralign bytes using NULs. This bogusly triggers an assert. Break out of the loop when we hit an NUL within that many bytes of the end. Modified: stable/8/usr.sbin/config/main.c Directory Properties: stable/8/usr.sbin/config/ (props changed) Modified: stable/8/usr.sbin/config/main.c ============================================================================== --- stable/8/usr.sbin/config/main.c Tue May 4 01:46:58 2010 (r207592) +++ stable/8/usr.sbin/config/main.c Tue May 4 03:56:25 2010 (r207593) @@ -670,7 +670,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int i, off, size; + unsigned int i, off, size, t1, t2, align; char *cmd, *o; r = open(file, O_RDONLY); @@ -689,8 +689,8 @@ kernconfdump(const char *file) if (o == NULL) err(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ - asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" - "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); + asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 8 kern_conf" + "| tail -5 | cut -d ' ' -f 2 | paste - - - - -", file); if (cmd == NULL) errx(EXIT_FAILURE, "asprintf() failed"); pp = popen(cmd, "r"); @@ -699,24 +699,28 @@ kernconfdump(const char *file) free(cmd); len = fread(o, osz, 1, pp); pclose(pp); - r = sscanf(o, "%d\t%d", &off, &size); + r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); - if (r != 2) + if (r != 5) errx(EXIT_FAILURE, "File %s doesn't contain configuration " "file. Either unsupported, or not compiled with " "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) err(EXIT_FAILURE, "fseek() failed"); - for (i = 0; i < size - 1; i++) { + for (i = 0; i < size; i++) { r = fgetc(fp); if (r == EOF) break; /* * If '\0' is present in the middle of the configuration * string, this means something very weird is happening. - * Make such case very visible. + * Make such case very visible. However, some architectures + * pad the length of the section with NULs to a multiple of + * sh_addralign, allow a NUL in that part of the section. */ + if (r == '\0' && (size - i) < align) + break; assert(r != '\0' && ("Char present in the configuration " "string mustn't be equal to 0")); fputc(r, stdout); From owner-svn-src-stable@FreeBSD.ORG Tue May 4 04:02:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A5A4106566C; Tue, 4 May 2010 04:02:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 488D58FC14; Tue, 4 May 2010 04:02:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4442hx9094477; Tue, 4 May 2010 04:02:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4442hZQ094475; Tue, 4 May 2010 04:02:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040402.o4442hZQ094475@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 04:02: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: r207594 - stable/7/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 04:02:43 -0000 Author: imp Date: Tue May 4 04:02:43 2010 New Revision: 207594 URL: http://svn.freebsd.org/changeset/base/207594 Log: MFC r188214 (by wkoszek): Make config -x only return non-zero characters, so that: config -x | grep just works. Reported by: Danny Braniss Modified: stable/7/usr.sbin/config/main.c Directory Properties: stable/7/usr.sbin/config/ (props changed) Modified: stable/7/usr.sbin/config/main.c ============================================================================== --- stable/7/usr.sbin/config/main.c Tue May 4 03:56:25 2010 (r207593) +++ stable/7/usr.sbin/config/main.c Tue May 4 04:02:43 2010 (r207594) @@ -667,7 +667,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int off, size; + unsigned int i, off, size; char *cmd, *o; r = open(file, O_RDONLY); @@ -705,7 +705,18 @@ kernconfdump(const char *file) r = fseek(fp, off, SEEK_CUR); if (r != 0) errx(EXIT_FAILURE, "fseek() failed"); - while ((r = fgetc(fp)) != EOF && size-- > 0) + for (i = 0; i < size - 1; i++) { + r = fgetc(fp); + if (r == EOF) + break; + /* + * If '\0' is present in the middle of the configuration + * string, this means something very weird is happening. + * Make such case very visible. + */ + assert(r != '\0' && ("Char present in the configuration " + "string mustn't be equal to 0")); fputc(r, stdout); + } fclose(fp); } From owner-svn-src-stable@FreeBSD.ORG Tue May 4 04:04:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C49E4106564A; Tue, 4 May 2010 04:04:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B28498FC14; Tue, 4 May 2010 04:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4444bA2094949; Tue, 4 May 2010 04:04:37 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4444bRM094947; Tue, 4 May 2010 04:04:37 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005040404.o4444bRM094947@svn.freebsd.org> From: Warner Losh Date: Tue, 4 May 2010 04:04: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: r207595 - stable/7/usr.sbin/config X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 04:04:37 -0000 Author: imp Date: Tue May 4 04:04:37 2010 New Revision: 207595 URL: http://svn.freebsd.org/changeset/base/207595 Log: MFC r207461: sparc64, and possibly other architectures, pads the length of the section holding the config file to sh_addralign bytes using NULs. This bogusly triggers an assert. Break out of the loop when we hit a NUL within that many bytes of the end. Modified: stable/7/usr.sbin/config/main.c Directory Properties: stable/7/usr.sbin/config/ (props changed) Modified: stable/7/usr.sbin/config/main.c ============================================================================== --- stable/7/usr.sbin/config/main.c Tue May 4 04:02:43 2010 (r207594) +++ stable/7/usr.sbin/config/main.c Tue May 4 04:04:37 2010 (r207595) @@ -667,7 +667,7 @@ kernconfdump(const char *file) struct stat st; FILE *fp, *pp; int error, len, osz, r; - unsigned int i, off, size; + unsigned int i, off, size, t1, t2, align; char *cmd, *o; r = open(file, O_RDONLY); @@ -686,8 +686,8 @@ kernconfdump(const char *file) if (o == NULL) errx(EXIT_FAILURE, "Couldn't allocate memory"); /* ELF note section header. */ - asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 5 kern_conf" - "| tail -2 | cut -d ' ' -f 2 | paste - - -", file); + asprintf(&cmd, "/usr/bin/elfdump -c %s | grep -A 8 kern_conf" + "| tail -5 | cut -d ' ' -f 2 | paste - - - - -", file); if (cmd == NULL) errx(EXIT_FAILURE, "asprintf() failed"); pp = popen(cmd, "r"); @@ -696,24 +696,28 @@ kernconfdump(const char *file) free(cmd); len = fread(o, osz, 1, pp); pclose(pp); - r = sscanf(o, "%d\t%d", &off, &size); + r = sscanf(o, "%d%d%d%d%d", &off, &size, &t1, &t2, &align); free(o); - if (r != 2) + if (r != 5) errx(EXIT_FAILURE, "File %s doesn't contain configuration " "file. Either unsupported, or not compiled with " "INCLUDE_CONFIG_FILE", file); r = fseek(fp, off, SEEK_CUR); if (r != 0) errx(EXIT_FAILURE, "fseek() failed"); - for (i = 0; i < size - 1; i++) { + for (i = 0; i < size; i++) { r = fgetc(fp); if (r == EOF) break; /* * If '\0' is present in the middle of the configuration * string, this means something very weird is happening. - * Make such case very visible. + * Make such case very visible. However, some architectures + * pad the length of the section with NULs to a multiple of + * sh_addralign, allow a NUL in that part of the section. */ + if (r == '\0' && (size - i) < align) + break; assert(r != '\0' && ("Char present in the configuration " "string mustn't be equal to 0")); fputc(r, stdout); From owner-svn-src-stable@FreeBSD.ORG Tue May 4 05:14:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 084811065672; Tue, 4 May 2010 05:14:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E961D8FC17; Tue, 4 May 2010 05:14:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o445EiBv010461; Tue, 4 May 2010 05:14:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445EhKd010456; Tue, 4 May 2010 05:14:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040514.o445EhKd010456@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207596 - in stable/8/sys: kern sys vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 05:14:45 -0000 Author: kib Date: Tue May 4 05:14:43 2010 New Revision: 207596 URL: http://svn.freebsd.org/changeset/base/207596 Log: MFC r206264: When OOM searches for a process to kill, ignore the processes already killed by OOM. When killed process waits for a page allocation, try to satisfy the request as fast as possible. Modified: stable/8/sys/kern/kern_sig.c stable/8/sys/sys/proc.h stable/8/sys/vm/vm_fault.c stable/8/sys/vm/vm_pageout.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_sig.c ============================================================================== --- stable/8/sys/kern/kern_sig.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/kern/kern_sig.c Tue May 4 05:14:43 2010 (r207596) @@ -2801,6 +2801,7 @@ killproc(p, why) p, p->p_pid, p->p_comm); log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); + p->p_flag |= P_WKILLED; psignal(p, SIGKILL); } Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/sys/proc.h Tue May 4 05:14:43 2010 (r207596) @@ -575,7 +575,7 @@ struct proc { #define P_WAITED 0x01000 /* Someone is waiting for us. */ #define P_WEXIT 0x02000 /* Working on exiting. */ #define P_EXEC 0x04000 /* Process called exec. */ -#define P_UNUSED8000 0x08000 /* available. */ +#define P_WKILLED 0x08000 /* Killed, go to kernel/user boundary ASAP. */ #define P_CONTINUED 0x10000 /* Proc has continued from a stopped state. */ #define P_STOPPED_SIG 0x20000 /* Stopped due to SIGSTOP/SIGTSTP. */ #define P_STOPPED_TRACE 0x40000 /* Stopped because of tracing. */ @@ -594,6 +594,7 @@ struct proc { #define P_STOPPED (P_STOPPED_SIG|P_STOPPED_SINGLE|P_STOPPED_TRACE) #define P_SHOULDSTOP(p) ((p)->p_flag & P_STOPPED) +#define P_KILLED(p) ((p)->p_flag & P_WKILLED) /* * These were process status values (p_stat), now they are only used in Modified: stable/8/sys/vm/vm_fault.c ============================================================================== --- stable/8/sys/vm/vm_fault.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/vm/vm_fault.c Tue May 4 05:14:43 2010 (r207596) @@ -217,7 +217,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr vm_object_t next_object; vm_page_t marray[VM_FAULT_READ]; int hardfault; - int faultcount, ahead, behind; + int faultcount, ahead, behind, alloc_req; struct faultstate fs; struct vnode *vp; int locked, error; @@ -414,9 +414,14 @@ RetryFault:; /* * Allocate a new page for this object/offset pair. + * + * Unlocked read of the p_flag is harmless. At + * worst, the P_KILLED might be not observed + * there, and allocation can fail, causing + * restart and new reading of the p_flag. */ fs.m = NULL; - if (!vm_page_count_severe()) { + if (!vm_page_count_severe() || P_KILLED(curproc)) { #if VM_NRESERVLEVEL > 0 if ((fs.object->flags & OBJ_COLORED) == 0) { fs.object->flags |= OBJ_COLORED; @@ -424,10 +429,13 @@ RetryFault:; fs.pindex; } #endif + alloc_req = P_KILLED(curproc) ? + VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL; + if (fs.object->type != OBJT_VNODE && + fs.object->backing_object == NULL) + alloc_req |= VM_ALLOC_ZERO; fs.m = vm_page_alloc(fs.object, fs.pindex, - (fs.object->type == OBJT_VNODE || - fs.object->backing_object != NULL) ? - VM_ALLOC_NORMAL : VM_ALLOC_ZERO); + alloc_req); } if (fs.m == NULL) { unlock_and_deallocate(&fs); @@ -452,7 +460,8 @@ readrest: int reqpage = 0; u_char behavior = vm_map_entry_behavior(fs.entry); - if (behavior == MAP_ENTRY_BEHAV_RANDOM) { + if (behavior == MAP_ENTRY_BEHAV_RANDOM || + P_KILLED(curproc)) { ahead = 0; behind = 0; } else { Modified: stable/8/sys/vm/vm_pageout.c ============================================================================== --- stable/8/sys/vm/vm_pageout.c Tue May 4 04:04:37 2010 (r207595) +++ stable/8/sys/vm/vm_pageout.c Tue May 4 05:14:43 2010 (r207596) @@ -1206,10 +1206,10 @@ vm_pageout_oom(int shortage) if (PROC_TRYLOCK(p) == 0) continue; /* - * If this is a system or protected process, skip it. + * If this is a system, protected or killed process, skip it. */ if ((p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || - (p->p_pid == 1) || + (p->p_pid == 1) || P_KILLED(p) || ((p->p_pid < 48) && (swap_pager_avail != 0))) { PROC_UNLOCK(p); continue; From owner-svn-src-stable@FreeBSD.ORG Tue May 4 05:17:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81CC9106566B; Tue, 4 May 2010 05:17:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6F8858FC16; Tue, 4 May 2010 05:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o445HBX0011039; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445HB6e011037; Tue, 4 May 2010 05:17:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005040517.o445HB6e011037@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 05:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207597 - stable/6/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 05:17:11 -0000 Author: delphij Date: Tue May 4 05:17:11 2010 New Revision: 207597 URL: http://svn.freebsd.org/changeset/base/207597 Log: Fixup MFC. I should have done test build before committing this. Pointy hat to: delphij Modified: stable/6/sys/dev/ata/ata-all.c Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Tue May 4 05:14:43 2010 (r207596) +++ stable/6/sys/dev/ata/ata-all.c Tue May 4 05:17:11 2010 (r207597) @@ -449,7 +449,7 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: if (ioc_request->count > - (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + (ch->dma->max_iosize ? ch->dma->max_iosize : DFLTPHYS)) { return (EFBIG); } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { From owner-svn-src-stable@FreeBSD.ORG Tue May 4 05:25:48 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66E551065672; Tue, 4 May 2010 05:25:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 542C88FC1F; Tue, 4 May 2010 05:25:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o445PmEC012933; Tue, 4 May 2010 05:25:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445PmuP012929; Tue, 4 May 2010 05:25:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040525.o445PmuP012929@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:25:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207598 - in stable/8/sys: fs/pseudofs kern ufs/ufs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 05:25:48 -0000 Author: kib Date: Tue May 4 05:25:48 2010 New Revision: 207598 URL: http://svn.freebsd.org/changeset/base/207598 Log: MFC r206894: The cache_enter(9) function shall not be called for doomed dvp. Assert this. Verify that dvp is not reclaimed before calling cache_enter(). Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c stable/8/sys/kern/vfs_cache.c stable/8/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/8/sys/fs/pseudofs/pseudofs_vnops.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/fs/pseudofs/pseudofs_vnops.c Tue May 4 05:25:48 2010 (r207598) @@ -542,7 +542,7 @@ pfs_lookup(struct vop_cachedlookup_args if (cnp->cn_flags & ISDOTDOT) vn_lock(vn, LK_EXCLUSIVE|LK_RETRY); - if (cnp->cn_flags & MAKEENTRY) + if (cnp->cn_flags & MAKEENTRY && !(vn->v_iflag & VI_DOOMED)) cache_enter(vn, *vpp, cnp); PFS_RETURN (0); failed: Modified: stable/8/sys/kern/vfs_cache.c ============================================================================== --- stable/8/sys/kern/vfs_cache.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/kern/vfs_cache.c Tue May 4 05:25:48 2010 (r207598) @@ -611,6 +611,8 @@ cache_enter(dvp, vp, cnp) CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr); VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp, ("cache_enter: Adding a doomed vnode")); + VNASSERT(dvp == NULL || (dvp->v_iflag & VI_DOOMED) == 0, dvp, + ("cache_enter: Doomed vnode used as src")); if (!doingcache) return; Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Tue May 4 05:17:11 2010 (r207597) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Tue May 4 05:25:48 2010 (r207598) @@ -704,6 +704,14 @@ found: vn_lock(vdp, LK_UPGRADE | LK_RETRY); else /* if (ltype == LK_SHARED) */ vn_lock(vdp, LK_DOWNGRADE | LK_RETRY); + /* + * Relock for the "." case may left us with + * reclaimed vnode. + */ + if (vdp->v_iflag & VI_DOOMED) { + vrele(vdp); + return (ENOENT); + } } *vpp = vdp; } else { From owner-svn-src-stable@FreeBSD.ORG Tue May 4 05:34:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69DB1106564A; Tue, 4 May 2010 05:34:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5645D8FC12; Tue, 4 May 2010 05:34:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o445YIjs014861; Tue, 4 May 2010 05:34:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o445YIkG014857; Tue, 4 May 2010 05:34:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005040534.o445YIkG014857@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 4 May 2010 05:34:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207599 - in stable/8: include lib/libc/stdlib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 05:34:18 -0000 Author: kib Date: Tue May 4 05:34:18 2010 New Revision: 207599 URL: http://svn.freebsd.org/changeset/base/207599 Log: MFC r206893: Slightly modernize realpath(3). SUSv4 requires that implementation returns EINVAL if supplied path is NULL, and ENOENT if path is empty string [1]. Bring prototype in conformance with SUSv4, adding restrict keywords. Allow the resolved path buffer pointer be NULL, in which case realpath(3) allocates storage with malloc(). MFC r206898: Free() is not allowed to modify errno, remove safety brackets around it. Add small optimization, do not copy a string to the buffer that is to be freed immediately after. MFC r206997: Move realpath(3) prototype to a POSIX section. MFC r206998: Add standards section, improve wording, taking into account the handling of NULL and changed type in declaration. Modified: stable/8/include/stdlib.h stable/8/lib/libc/stdlib/realpath.3 stable/8/lib/libc/stdlib/realpath.c Directory Properties: stable/8/include/ (props changed) stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/include/stdlib.h ============================================================================== --- stable/8/include/stdlib.h Tue May 4 05:25:48 2010 (r207598) +++ stable/8/include/stdlib.h Tue May 4 05:34:18 2010 (r207599) @@ -159,6 +159,7 @@ void _Exit(int) __dead2; #if __POSIX_VISIBLE /* >= ??? */ int posix_memalign(void **, size_t, size_t); /* (ADV) */ int rand_r(unsigned *); /* (TSF) */ +char *realpath(const char * __restrict, char * __restrict); int setenv(const char *, const char *, int); int unsetenv(const char *); #endif @@ -205,7 +206,6 @@ int posix_openpt(int); char *ptsname(int); int putenv(char *); long random(void); -char *realpath(const char *, char resolved_path[]); unsigned short *seed48(unsigned short[3]); #ifndef _SETKEY_DECLARED Modified: stable/8/lib/libc/stdlib/realpath.3 ============================================================================== --- stable/8/lib/libc/stdlib/realpath.3 Tue May 4 05:25:48 2010 (r207598) +++ stable/8/lib/libc/stdlib/realpath.3 Tue May 4 05:34:18 2010 (r207599) @@ -31,7 +31,7 @@ .\" @(#)realpath.3 8.2 (Berkeley) 2/16/94 .\" $FreeBSD$ .\" -.Dd February 16, 1994 +.Dd April 19, 2010 .Dt REALPATH 3 .Os .Sh NAME @@ -43,7 +43,7 @@ .In sys/param.h .In stdlib.h .Ft "char *" -.Fn realpath "const char *pathname" "char resolved_path[PATH_MAX]" +.Fn realpath "const char *pathname" "char *resolved_path" .Sh DESCRIPTION The .Fn realpath @@ -64,7 +64,8 @@ argument .Em must refer to a buffer capable of storing at least .Dv PATH_MAX -characters. +characters, or be +.Dv NULL . .Pp The .Fn realpath @@ -82,13 +83,22 @@ The function returns .Fa resolved_path on success. +If the function was supplied +.Dv NULL +as +.Fa resolved_path , +and operation did not cause errors, the returned value is +a null-terminated string in a buffer allocated by a call to +.Fn malloc 3 . If an error occurs, .Fn realpath returns .Dv NULL , -and +and if .Fa resolved_path -contains the pathname which caused the problem. +is not +.Dv NULL , +the array that it points to contains the pathname which caused the problem. .Sh ERRORS The function .Fn realpath @@ -113,6 +123,11 @@ when given a relative .Fa pathname . .Sh "SEE ALSO" .Xr getcwd 3 +.Sh STANDARDS +The +.Fn realpath +function conforms to +.St -p1003.1-2001 . .Sh HISTORY The .Fn realpath Modified: stable/8/lib/libc/stdlib/realpath.c ============================================================================== --- stable/8/lib/libc/stdlib/realpath.c Tue May 4 05:25:48 2010 (r207598) +++ stable/8/lib/libc/stdlib/realpath.c Tue May 4 05:34:18 2010 (r207599) @@ -43,23 +43,37 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" /* - * char *realpath(const char *path, char resolved[PATH_MAX]); - * * Find the real name of path, by removing all ".", ".." and symlink * components. Returns (resolved) on success, or (NULL) on failure, * in which case the path which caused trouble is left in (resolved). */ char * -realpath(const char *path, char resolved[PATH_MAX]) +realpath(const char * __restrict path, char * __restrict resolved) { struct stat sb; char *p, *q, *s; size_t left_len, resolved_len; unsigned symlinks; - int serrno, slen; + int serrno, slen, m; char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX]; + if (path == NULL) { + errno = EINVAL; + return (NULL); + } + if (path[0] == '\0') { + errno = ENOENT; + return (NULL); + } serrno = errno; + if (resolved == NULL) { + resolved = malloc(PATH_MAX); + if (resolved == NULL) + return (NULL); + m = 1; + } else + m = 0; + symlinks = 0; if (path[0] == '/') { resolved[0] = '/'; @@ -70,13 +84,18 @@ realpath(const char *path, char resolved left_len = strlcpy(left, path + 1, sizeof(left)); } else { if (getcwd(resolved, PATH_MAX) == NULL) { - strlcpy(resolved, ".", PATH_MAX); + if (m) + free(resolved); + else + strlcpy(resolved, ".", PATH_MAX); return (NULL); } resolved_len = strlen(resolved); left_len = strlcpy(left, path, sizeof(left)); } if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -92,6 +111,8 @@ realpath(const char *path, char resolved p = strchr(left, '/'); s = p ? p : left + left_len; if (s - left >= sizeof(next_token)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -102,6 +123,8 @@ realpath(const char *path, char resolved memmove(left, s + 1, left_len + 1); if (resolved[resolved_len - 1] != '/') { if (resolved_len + 1 >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -133,6 +156,8 @@ realpath(const char *path, char resolved */ resolved_len = strlcat(resolved, next_token, PATH_MAX); if (resolved_len >= PATH_MAX) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -141,16 +166,23 @@ realpath(const char *path, char resolved errno = serrno; return (resolved); } + if (m) + free(resolved); return (NULL); } if (S_ISLNK(sb.st_mode)) { if (symlinks++ > MAXSYMLINKS) { + if (m) + free(resolved); errno = ELOOP; return (NULL); } slen = readlink(resolved, symlink, sizeof(symlink) - 1); - if (slen < 0) + if (slen < 0) { + if (m) + free(resolved); return (NULL); + } symlink[slen] = '\0'; if (symlink[0] == '/') { resolved[1] = 0; @@ -171,6 +203,8 @@ realpath(const char *path, char resolved if (p != NULL) { if (symlink[slen - 1] != '/') { if (slen + 1 >= sizeof(symlink)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } @@ -179,6 +213,8 @@ realpath(const char *path, char resolved } left_len = strlcat(symlink, left, sizeof(left)); if (left_len >= sizeof(left)) { + if (m) + free(resolved); errno = ENAMETOOLONG; return (NULL); } From owner-svn-src-stable@FreeBSD.ORG Tue May 4 08:06:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40DF11065672; Tue, 4 May 2010 08:06:54 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF738FC17; Tue, 4 May 2010 08:06:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4486sfx048826; Tue, 4 May 2010 08:06:54 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4486sYU048823; Tue, 4 May 2010 08:06:54 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201005040806.o4486sYU048823@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 4 May 2010 08:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207609 - stable/8/games/pom X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 08:06:54 -0000 Author: edwin Date: Tue May 4 08:06:53 2010 New Revision: 207609 URL: http://svn.freebsd.org/changeset/base/207609 Log: MFC of r201613, r201627 Be able to specify a certain date and/or time for which to calculate the phase of the moon. While not worlds best improvements, it will help calendar(1) later on. Also closed bin/79008 PR: bin/79008 Modified: stable/8/games/pom/pom.6 stable/8/games/pom/pom.c Directory Properties: stable/8/games/pom/ (props changed) Modified: stable/8/games/pom/pom.6 ============================================================================== --- stable/8/games/pom/pom.6 Tue May 4 06:19:19 2010 (r207608) +++ stable/8/games/pom/pom.6 Tue May 4 08:06:53 2010 (r207609) @@ -32,15 +32,34 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.TH POM 6 "May 31, 1993" +.Dd May 31, 1993 +.Dt POM 6 .UC 7 -.SH NAME -pom \- display the phase of the moon -.SH SYNOPSIS -.B pom -.SH DESCRIPTION +.Sh NAME +.Nm pom +.Nd display the phase of the moon +.Sh SYNOPSIS +.Nm +.Op Fl d Ar yyyy.mm.dd +.Op Fl t Ar hh:mm:ss +.Sh DESCRIPTION The -.I pom +.Nm utility displays the current phase of the moon. Useful for selecting software completion target dates and predicting managerial behavior. +.Pp +Use the arguments +.Fl d +and +.Fl o +to specify a specific date and time for which the phase of the moon +has to be calculated. +If +.Fl d +but not +.Fl t +has been specified, it will calculate the phase of the moon on that +day at midnight. +.Sh SEE ALSO +`Practical Astronomy with Your Calculator' by Duffett-Smith. Modified: stable/8/games/pom/pom.c ============================================================================== --- stable/8/games/pom/pom.c Tue May 4 06:19:19 2010 (r207608) +++ stable/8/games/pom/pom.c Tue May 4 08:06:53 2010 (r207609) @@ -57,9 +57,13 @@ __FBSDID("$FreeBSD$"); * */ -#include #include +#include #include +#include +#include +#include +#include #ifndef PI #define PI 3.14159265358979323846 @@ -76,20 +80,62 @@ __FBSDID("$FreeBSD$"); static void adj360(double *); static double dtor(double); static double potm(double); +static void usage(char *progname); int -main(void) +main(int argc, char **argv) { time_t tt; - struct tm *GMT; + struct tm GMT, tmd; double days, today, tomorrow; - int cnt; + int ch, cnt; + char *odate = NULL, *otime = NULL; + + while ((ch = getopt(argc, argv, "d:t:")) != -1) + switch (ch) { + case 'd': + odate = optarg; + break; + case 't': + otime = optarg; + break; + default: + usage(argv[0]); + } + + argc -= optind; + argv += optind; + + if (argc) + usage(argv[0]); - (void) time(&tt); - GMT = gmtime(&tt); - days = (GMT->tm_yday + 1) + ((GMT->tm_hour + - (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0); - for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt) + /* Adjust based on users preferences */ + time(&tt); + if (otime != NULL || odate != NULL) { + /* Save today in case -d isn't specified */ + localtime_r(&tt, &tmd); + + if (odate != NULL) { + tmd.tm_year = strtol(odate, NULL, 10) - 1900; + tmd.tm_mon = strtol(odate + 5, NULL, 10) - 1; + tmd.tm_mday = strtol(odate + 8, NULL, 10); + /* Use midnight as the middle of the night */ + tmd.tm_hour = 0; + tmd.tm_min = 0; + tmd.tm_sec = 0; + } + if (otime != NULL) { + tmd.tm_hour = strtol(otime, NULL, 10); + tmd.tm_min = strtol(otime + 3, NULL, 10); + tmd.tm_sec = strtol(otime + 6, NULL, 10); + } + tt = mktime(&tmd); + } + + gmtime_r(&tt, &GMT); + days = (GMT.tm_yday + 1) + ((GMT.tm_hour + + (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0); + for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; (void)printf("The Moon is "); @@ -160,6 +206,7 @@ potm(double days) static double dtor(double deg) { + return(deg * PI / 180); } @@ -170,6 +217,7 @@ dtor(double deg) static void adj360(double *deg) { + for (;;) if (*deg < 0) *deg += 360; @@ -178,3 +226,11 @@ adj360(double *deg) else break; } + +static void +usage(char *progname) +{ + + fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + exit(EX_USAGE); +} From owner-svn-src-stable@FreeBSD.ORG Tue May 4 08:37:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C6EF1065672; Tue, 4 May 2010 08:37:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0BDFA8FC12; Tue, 4 May 2010 08:37:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o448bSTj055607; Tue, 4 May 2010 08:37:28 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o448bS5f055605; Tue, 4 May 2010 08:37:28 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201005040837.o448bS5f055605@svn.freebsd.org> From: Martin Matuska Date: Tue, 4 May 2010 08:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207610 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 08:37:29 -0000 Author: mm Date: Tue May 4 08:37:28 2010 New Revision: 207610 URL: http://svn.freebsd.org/changeset/base/207610 Log: MFC r207480: Change description of tunable group vfs.zfs.txg to be more understandable. Approved by: pjd, delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue May 4 08:06:53 2010 (r207609) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue May 4 08:37:28 2010 (r207610) @@ -40,7 +40,8 @@ int zfs_txg_timeout = 30; /* max seconds extern int zfs_txg_synctime; SYSCTL_DECL(_vfs_zfs); -SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, "ZFS TXG"); +SYSCTL_NODE(_vfs_zfs, OID_AUTO, txg, CTLFLAG_RW, 0, + "ZFS transaction groups (TXG)"); TUNABLE_INT("vfs.zfs.txg.timeout", &zfs_txg_timeout); SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, timeout, CTLFLAG_RDTUN, &zfs_txg_timeout, 0, "Maximum seconds worth of delta per txg"); From owner-svn-src-stable@FreeBSD.ORG Tue May 4 15:52:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A1BA1065674; Tue, 4 May 2010 15:52:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 67F768FC0C; Tue, 4 May 2010 15:52:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o44FqHmA063429; Tue, 4 May 2010 15:52:17 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44FqHlj063427; Tue, 4 May 2010 15:52:17 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201005041552.o44FqHlj063427@svn.freebsd.org> From: Brooks Davis Date: Tue, 4 May 2010 15:52: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: r207616 - stable/7/share/misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 15:52:17 -0000 Author: brooks Date: Tue May 4 15:52:17 2010 New Revision: 207616 URL: http://svn.freebsd.org/changeset/base/207616 Log: MFC r205073 Regen: * Hart: rev 671 of pcidevs.txt; 22-01-2008 (D-M-Y). * Boemler: vendors.txt (2010-03126) PR: kern/133733 Modified: stable/7/share/misc/pci_vendors (contents, props changed) Directory Properties: stable/7/share/misc/ (props changed) stable/7/share/misc/iso639 (props changed) Modified: stable/7/share/misc/pci_vendors ============================================================================== --- stable/7/share/misc/pci_vendors Tue May 4 15:29:07 2010 (r207615) +++ stable/7/share/misc/pci_vendors Tue May 4 15:52:17 2010 (r207616) @@ -18,7 +18,7 @@ 4001 WinTV PVR-250 (v1) 4009 WinTV PVR-250 4801 WinTV PVR-250 MCE - 6800 Hauppage Nova -TD-500 DVB-T Tuner Device + 6800 Hauppage Nova -TD-500 DVB-T Tuner Device ( PCIVEN_1131&DEV_7130&SUBSYS_40510000&REV_014&3B) 0071 Nebula Electronics Ltd 0100 Ncipher Corp Ltd 0123 General Dynamics @@ -44,6 +44,10 @@ 8519 OV519 series 05E3 CyberDoor 0701 CBD516 +064E SUYIN Corporation + A101 Acer Crystal Eye Webcam (suYin) + A103 WebCam (SuYin) + D101 Web Cam (SuYin) 066F Sigmatel Inc 3410 SMTP3410 3500 SMTP3500 @@ -54,6 +58,8 @@ 1704 ISDN Adapter (PCI Bus, D, C) 067B Prolific Technology Inc 2303 PL-2303 USB-to-Serial Converter + 2305 USB-to-Printer Bridge Controller (PL-2305) + 2393 prolific (prolific) 3507 PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller 069D Hughes Network Systems (HNS) 0700 Stream Machine @@ -70,7 +76,7 @@ 09C1 Arris 0704 CM 200E Cable Modem 0A5C Broadcom Corporation - 0201 Broadcom USB iLine10(tm) Network Adapter + 0201 Broadcom USB iLine10(tm) Network Adapter (Broadcom NetXtreme BCM5782 Gigabie Ethernet Contro) 2000 Broadcom Bluetooth Firmware Upgrade Device 2009 Broadcom Bluetooth Controller 200A Broadcom Bluetooth Controller @@ -84,17 +90,17 @@ 2038 Broadcom Blutonium Device Firmware Downloader (BCM2038) 2039 BROADCOM Bluetooth Device 2045 Broadcom Bluetooth Controller - 2046 Broadcom USB Bluetooth Device + 2046 Broadcom USB Bluetooth Device ( 5738z) 2047 Broadcom USB Bluetooth Device 205E Broadcom Bluetooth Firmware Upgrade Device - 2100 Broadcom Bluetooth 2.0+eDR USB dongle - 2101 Broadcom Bluetooth 2.0+EDR USB dongle - 2102 ANYCOM Blue USB-200/250 + 2100 Broadcom Bluetooth 2.0+eDR USB dongle (BT 50) + 2101 Broadcom Bluetooth 2.0+EDR USB dongle ( 5&11BBCF3F&0&2) + 2102 ANYCOM Blue USB-200/250 ( USBVID_04B4&PID_21025&38CD4C16&0&6) 2110 Broadcom Bluetooth Controller 2111 ANYCOM Blue USB-UHE 200/250 2120 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter ( 2045) 2121 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter - 2122 Broadcom Bluetooth 2.0+EDR USB dongle + 2122 Broadcom Bluetooth 2.0+EDR USB dongle ( BCM92045B3) 2124 2045B3ROM Bluetooth Dongle 2130 Broadcom 2045 Bluetooth 2.0 USB-UHE Device with trace filter 2131 Broadcom 2045 Bluetooth 2.0 USB Device with trace filter @@ -104,7 +110,7 @@ 2143 2046 Flash non UHE Class 1 2144 2046 Flash non UHE module Class 2 2145 Broadcom BCM9204MD LENO Module - 2146 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle + 2146 Broadcom 2045 Bluetooth 2.1 USB UHE Dongle 2147 Broadcom 2046 Bluetooth 2.1 USB Dongle 2148 Broadcom 2046 Bluetooth 2.1 USB UHE Dongle 2149 Broadcom 2046 Bluetooth 2.1 USB Dongle @@ -122,8 +128,9 @@ 2155 Broadcom Bluetooth USB Dongle 2157 BCM2046 B1 USB 500 2158 Broadcom 2046 Bluetooth 2.1 Device - 4502 USB Human Interface Device - 4503 USB Human Interface Device + 4500 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4502 Broadcom 2046 Bluetooth 2.1 USB Dongle (BCM2046B1) + 4503 Broadcom 2046 Bluetooth 2.1 USB Dongle ( BCM2046B1) 5800 Unified Security Hub 6300 Pirelli ISB Remote NDIS Device 0A89 BREA Technologies Inc @@ -144,17 +151,22 @@ 0A06 RCB672FXX 672-channel modular analog telphony card 0B49 ASCII Corporation 064F Trance Vibrator +0C45 Microdia Ltd. + 602D USB Webcam (7&2BE7B8E3&0&4) + 6130 USB CAMERA (5&3512B308&0&1) 0E11 Compaq Computer Corp (Now owned by Hewlett-Packard) 0001 PCI to EISA Bridge - 0002 PCI to ISA Bridge + 0002 PCI to ISA Bridge (ISA Bridge) 000F StorageWorks Library Adapter (HVD) (CPQB1A9) 0012 686P7 (686P7) - 0046 Smart Array 64xx/6i Controller + 0046 Smart Array 6400 Controller (N/A) 0049 Gigabit Upgrade Module (NC7132) 004A Gigabit Server Adapter (NC6136) + 005A HP Remote Insight Lights-Out II Board (PowerPC 405GP processor at 200MHz [3305103C]) 007C NC7770 1000BaseTX 007D NC6770 1000BaseTX 0085 NC7780 1000BaseTX + 00B1 HP Remote Insight Lights-Out II PCI Device (3305103C) 00BB NC7760 00C0 AIC-7899G 64-bit, 66MHz Dual Channel Wide Ultra3 SCSI Controller 00CA NC7771 @@ -201,8 +213,8 @@ AE29 PCI to ISA Bridge (MIS-L) AE2A CPU to PCI Bridge (MPC) AE2B PCI to ISA PnP Bridge (MIS-E) - AE31 System Management Controller (1002&DEV-4385&SUBSY) - AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 + AE31 System Management Controller (1002&DEV-5653&SUBSYS) + AE32 Netelligent 10/100 TX PCI UTP TLAN 2.3 (950) AE33 Dual EIDE Controller (Triflex) AE34 Netelligent 10 T PCI UTP TLAN 2.3 AE35 Integrated NetFlex-3/P TLAN 2.3 @@ -321,70 +333,70 @@ 0017 PROTO-3 PCI, digital I/O with chipselect (ispLSI1032E) 0020 Universal digital I/O PCI-Interface (ispLSI1032E) 1002 ATI Technologies Inc. / Advanced Micro Devices, Inc. - 0B12 ati 1900 (ati 1900) + 0B12 ATI Radeon X1900 (R580) 1002 0F2A1787 (0F2A1787) - 3150 Radeon Mobility X600 (M24 1P) - 3151 FIREMV 2400 - 3152 Mobility Radeon X300 - 3154 Mobility FireGL V3200 - 3171 FireMV 2400 Secondary - 3E50 Radeon X600/X650 Series - 3E54 FireGL V3200 (RV380) - 3E70 Radeon X600 Series Secondary - 3E74 FIREGL V3200 Secondary + 3150 ATI MOBILITY /ATI RADEON X600 (M24) + 3151 ATI FireMV 2400 (RV380) + 3152 ATI MOBILITY /ATI RADEON X300 (M24) + 3154 ATI MOBILITY FireGL V3200 (M24GL) + 3171 ATI FireMV 2400 Secondary (RV380) + 3E50 ATI RADEON X600/X550 Series (RV380) + 3E54 ATI FireGL V3200 (RV380GL) + 3E70 ATI RADEON X600/X550 Series Secondary (RV380) + 3E74 ATI FireGL V3200 Secondary (RV380GL) 4136 Radeon IGP 320 (A3) 4137 Radeon IGP 340 (RS200) 4144 Radeon 9500 Series (R300) 4145 Radeon 9200 (M+X) (R300) - 4146 Radeon 9700 (R300) + 4146 ATI RADEON 9600TX (R300) 4147 Fire GL Z1 AGP/Pro Video Accelerator (128 MB, 4P) - 4148 Radeon 9800 SE (R350) - 4149 Radeon 9500 Family + 4148 ATI RADEON 9800 SE (R350) + 4149 ATI RADEON 9500 (R350) 414A Radeon 9800 Family 414B Fire GL X2 - 4150 Radeon 9600 Series (V350) - 4151 Radeon 9600 (RV350) - 4152 Radeon 9600 XT (RV360) - 4153 Radeon 9550 (RV350) - 4154 Fire GL T2 - 4155 Fire GL T2 + 4150 ATI RADEON 9600 Series (RV350) + 4151 ATI RADEON 9600 Series (RV350) + 4152 ATI RADEON 9600 Series (RV360) + 4153 ATI RADEON 9550/X1050 Series (RV350) + 4154 ATI FireGL T2 (RV350GL) + 4155 ATI RADEON 9600 Series (RV350) 4156 Fire GL T2 4157 Fire GL T2 - 4158 vga video (4c59h) - 4164 R300 (128bit mem bus) (Radeon 9500 Series, secondary) + 4158 Mach32 (68800AX) + 4164 Radeon 9500 Series (R300) - Secondary 4165 Radeon 9700 Pro (R300 AE) - Secondary - 4166 Radeon 9600TX - Secondary + 4166 ATI RADEON 9600TX Secondary (R300) 4167 Fire GL Z1 AGP/Pro Secondary Video Accelerator (128 MB, 4P) - 4168 Radeon 9800 SE - Secondary (R350) - 4169 Radeon 9500 Family - Secondary - 4170 Radeon 9600 - Secondary (RV350) - 4171 Radeon 9600 (RV350) - Secondary - 4172 Radeon 9600 XT - Secondary (RV360) - 4173 Radeon 9550 - Secondary (RV350) - 4174 FireGL T2 - Seocndary - 4175 Radeon 9600 Series Secondary + 4168 ATI RADEON 9800 SE Secondary (R350) + 4169 ATI RADEON 9500 Secondary (R350) + 4170 ATI RADEON 9600 Series Secondary (RV350) + 4171 ATI RADEON 9600 Series Secondary (RV350) + 4172 ATI RADEON 9600 Series Secondary (RV360) + 4173 ATI RADEON 9550/X1050 Series Secondary (RV350) + 4174 ATI FireGL T2 Secondary (RV350GL) + 4175 ATI RADEON 9600 Series Secondary (RV350) 4237 Radeon 7000 IGP 4242 All-In-Wonder 8500DV (R200AIW) 4243 Radeon 8500 DV OHCI FireWire Controller 4336 Radeon IGP 320M (rs200) 4337 Mobility M6 (U2) (RS200M) - 4341 AC'97 Audio Controller (AD1981) - 4342 HUB Bridge (IXP 150) - 4345 EHCI USB Controller (IXP 150) - 4347 OHCI USB Controller *1 (IXP 150) - 4348 OHCI USB Controller *2 (IXP 150) - 4349 PATA 100 Controller (IXP 1xx/2xx) - 434C LPC Controller (IXP 150) - 434D Agere Systems AC'97 Modem device (a75-s226) + 4341 AC'97 Audio Controller (SB200) + 4342 PCI-PCI Bridge (SB200) + 4345 EHCI USB Controller (SB200) + 4347 OHCI USB Controller *1 + 4348 OHCI USB Controller *2 + 4349 PATA-100 IDE Controller (SB200) + 434C PCI-ISA Bridge (SB200) + 434D AC'97 Modem Controller (SB200) 4353 IXP SB200 SMBUS Controller - 4354 mach64 ct pci (215r2qzua21) - 4358 Mach64 CX (216l0sas25) + 4354 Mach64 CT (215CT222) + 4358 Mach64 CX (210888CX) 4361 AC'97 Audio Controller 4363 IXP SB300 SMBUS Controller 4369 PATA 133 Controller (IXP 3xx) 436D IXP SB300 AC'97 Modem Controller 436E IXP SB300 Serial ATA Controller - 4370 IXP AC'97 Audio Controller (IXP_AUDIO_400) + 4370 IXP SB400 AC'97 Audio Controller 4371 IXP SB400 PCI-PCI Bridge 4372 ATI SMBus (x200) 4373 IXP SB400 EHCI USB 2.0 Controller @@ -395,7 +407,7 @@ 4378 IXP SB400 AC'97 Modem Controller 4379 IXP SB400 Serial ATA Controller 437A IXP SB400 Serial ATA Controller - 437B IXP SB450 High Definition Audio Controller (Intel Corporation) + 437B IXP SB450 High Definition Audio Controller 4380 IXP SB600 Serial ATA Controller 4381 IXP SB600 Serial ATA RAID Controller 4382 IXP SB600 AC'97 Audio Controller @@ -409,9 +421,9 @@ 438A IXP SB600 USB Controller (OHCI3) 438B IXP SB600 USB Controller (OHCI4) 438C ATI RD600/RS600 IDE Controller (RD600/RS600) - 438D ATK0110 ACPI Utility (1043.4.0.0) + 438D IXP SB600 PCI to LPC Bridge 438E IXP SB600 AC'97 Modem Controller - 4390 SB700 SATA Controller [IDE mode] + 4390 Integrated SATA II Controller (SB700) 4391 SB700 SATA Controller [AHCI mode] 4392 SB700 SATA Controller [Non-RAID5 mode] 4393 SB700 SATA Controller [RAID5 mode] @@ -419,16 +431,16 @@ 4395 SB SATA Controller [AHCI mode with HyperFlash-PCIE] 4396 SB700 USB EHCI Controller 4397 SB700 USB OHCI0 Controller - 4398 SB700 USB OHCI1 Controller + 4398 Standard OpenHCD USB-Hostcontroller (SB700) 4399 SB700 USB OHCI2 Controller 439C PATA 133 Controller (SB7xx) 439D SB700 LPC host controller 4437 Radeon Mobility 7000 IGP 4554 Mach64 ET 4654 113--34004-104 (Mach64 VT) - 4742 ATI 3D Rage Pro AGP 2X 8mb (gt-c2u2) ((GT-C2U2)) + 4742 3D Rage Pro AGP 1X/2X ((GT-C2U2)) 4744 Rage 3D Pro AGP 2x (Rage 3D Pro AGP 2x) - 4747 GT-C2U2 (Rage 3D Pro) + 4747 Rage 3D Pro (GT-C2U2) 4749 ATI ALL IN WONDER PRO (8MB) (RAGE PRO TURBO AGP 2X) 474C k7 som+ (Rage XC PCI-66) 474D SLAT (Rage XL AGP 2x) @@ -442,7 +454,7 @@ 4755 3d rage 2 + dvd (Rage 3D II+pci) 4756 Rage 3D IIC PCI [Mach64 GT IIC] (PQFP Package) 4757 Rage 3D IIC AGP (BGA Package) - 4758 Mach 64 GT (210888GXControladores ATI 210888GX [Mach64 GX]) + 4758 Mach64 GX (210888GX) 4759 m3d agp card on agp slot (215r2qzua21) 475A Rage 3D IIC AGP (PQFP Package) 4964 Radeon 9000 Series (RV250 Id) @@ -451,33 +463,33 @@ 4967 Radeon 9000 (RV250) 496E Radeon 9000/9000 Pro - Secondary (RV250) 496F Radeon 9000 (RV250) - Secondary - 4A48 Radeon X800 Series (R420 JH) - 4A49 Radeon X800 gt (R423) - 4A4A Radeon X800 Series - 4A4B RADEON X800 XT (R420) - 4A4C Radeon X800 Series (R420 JL) - 4A4D FireGL X3 (R420 JM) - 4A4E Radeon Mobility 9800 (M18 JN) - 4A4F Radeon X800 SE - 4A50 Radeon X800 XT Platinum - 4A54 Radeon X800 VE (R420) - 4A68 Radeon X800 Series Secondary - 4A69 Radeon X800 Series - Secondary - 4A6A Radeon X800 Series - Secondary - 4A6B RADEON X800 XT Secondary (R420) - 4A6C Radeon X800 Series Secondary - 4A6D FIREGL X3-256 Secondary - 4A6F Radeon X800 SE Secondary - 4A70 Radeon X800 XT Platinum - Secondary - 4A74 Radeon X800 VE (R420) (Secondary) - 4B49 Radeon X850XT + 4A48 ATI RADEON X800 Series (R420) + 4A49 ATI RADEON X800 PRO (R420) + 4A4A ATI RADEON X800 Series (R420) + 4A4B ATI RADEON X800 XT (R420) + 4A4C ATI RADEON X800 Series (R420) + 4A4D ATI FireGL X3-256 (R420GL) + 4A4E ATI MOBILITY /ATI RADEON 9800 (M18) + 4A4F ATI RADEON X800 SE (R420) + 4A50 ATI RADEON X800 XT Platinum Edition (R420) + 4A54 ATI RADEON X800 VE (R420) + 4A68 ATI RADEON X800 Series Secondary (R420) + 4A69 ATI RADEON X800 PRO Secondary (R420) + 4A6A ATI RADEON X800 Series Secondary (R420) + 4A6B ATI RADEON X800 XT Secondary (R420) + 4A6C ATI RADEON X800 Series Secondary (R420) + 4A6D ATI FireGL X3-256 Secondary (R420GL) + 4A6F ATI RADEON X800 SE Secondary (R420) + 4A70 ATI RADEON X800 XT Platinum Edition Secondary (R420) + 4A74 ATI RADEON X800 VE Secondary (R420) + 4B49 ATI RADEON X850 XT (R481) 4B4A Radeon X850 SE - 4B4B Radeon X850 PRO - 4B4C Radeon X850XT-PE - 4B69 Radeon X850XT secondary - 4B6A Radeon X850 SE Secondary - 4B6B Radeon X850 PRO secondary - 4B6C Radeon X850XT-PE Secondary + 4B4B ATI RADEON X850 PRO (R481) + 4B4C ATI RADEON X850 XT Platinum Edition (R481) + 4B69 ATI RADEON X850 XT Secondary (R481) + 4B6A ATI RADEON X850 SE Secondary (R481) + 4B6B ATI RADEON X850 PRO Secondary (R481) + 4B6C ATI RADEON X850 XT Platinum Edition Secondary (R481) 4C42 Rage 3D LT Pro AGP 133MHz (BGA-312 Package) 4C44 Rage 3D LT Pro AGP 133 MHz (Rage 3D LT Pro AGP) 4C45 Rage Mobility M3 AGP @@ -486,18 +498,18 @@ 4C49 Rage 3D LT Pro PCI (BGA-312 Package) 4C4D Rage P/M Mobility AGP 2x (01541014) 4C4E Rage Mobility l (216lo sasa25) - 4C50 Rage 3D LT Pro PCI (VEN_1002&DEV_4C50&SUBSYS_4C501002&REV_DC) + 4C50 Rage 3D LT Pro PCI (BGA-256 Package) 4C51 Rage 3D LT Pro PCI (BGA-256 Package, Limited 3D) 4C52 Rage P/M Mobility PCI 4C53 Rage L Mobility PCI (216L0SASA25) 4C54 Mach64 LT (264LT) - 4C57 Mobility Radeon 7500 (fdds) + 4C57 Mobility Radeon 7500 (M7 [LW]) 4C58 FireGL Mobility 4C59 Radeon Mobility M6 Series (Mobility 6) 4C5A Radeon Mobility M6 LZ 4C64 Radeon Mobility M9-GL 4C65 Radeon Mobility 9000 (R250 Le) - 4C66 Radeon Mobility 9000 series (ATI MOBILITY RADEON 9000 (Microsoft Corporation -) + 4C66 MOBILITY RADEON 9000 (M9) (R250) 4C67 Radeon Mobility 9000 (R250 Lg) 4C6E Radeon Mobility 9000 - Secondary (R250 Ln) 4D46 Rage Mobility 128 AGP 4x (ATI mobility128) @@ -507,27 +519,27 @@ 4D52 ATI Theater 550 Pro (ATI Theater 550 Pro) 4D53 Unified AVStream Driver 4E44 Radeon 9700/Pro, 9500 Series (R300) - 4E45 Radeon 9700/9500 Series (R300) - 4E46 Radeon 9600TX (R300) + 4E45 ATI RADEON 9500 PRO / 9700 (R300) + 4E46 ATI RADEON 9600 TX (R300) 4E47 Fire GL X1/Z1 AGP/Pro Video Accelerator (R300-WS) - 4E48 Radeon 9800 Pro (R350) + 4E48 ATI RADEON 9800 PRO (R350) 4E49 Radeon 9800 (R350) (??) - 4E4A Radeon 9800 XT (R350) - 4E4B ATI FIREGL X2-256T (FGL9800XT) - 4E50 Mobility Radeon 9700 (M10 NP) (RV350) - 4E51 Mobility Radeon 9600 (M10 NQ) + 4E4A ATI RADEON 9800 XT (R360) + 4E4B ATI FireGL X2-256/X2-256t (R350GL) + 4E50 ATI MOBILITY /ATI RADEON 9600/9700 Series (M10) + 4E51 ATI RADEON 9600 Series (RV350) 4E52 Mobility Radeon 9500/9600 (M10) (RV350) 4E53 Radeon Mobility 9600 (M10 NS) - 4E54 Radeon Mobility M10 NT (RV350-WS) - 4E56 FireGL Mobility T2e (M11 NV) + 4E54 ATI MOBILITY FIRE GL T2/T2e (M10GL) + 4E56 ATI MOBILITY /ATI RADEON 9550 (M12) 4E64 Radeon 9700/Pro, 9500 (R300) Series - Secondary - 4E65 Radeon 9700/9500 Series (R300) - Secondary - 4E66 Radeon 9600TX (R300) - Secondary + 4E65 ATI RADEON 9500 PRO / 9700 Secondary (R300) + 4E66 ATI RADEON 9600 TX Secondary (R300) 4E67 Fire GL X1/Z1 AGP/Pro Secondary Video Accelerator - 4E68 Radeon 9800 Pro (R350) - Secondary - 4E69 Radeon 9800 (R350) - Secondary - 4E6A Radeon 9800 XT (R350) - Secondary - 4E6B ATI FIREGL X2-256T Secondary (FGL9800XT) + 4E68 ATI RADEON 9800 PRO Secondary (R350) + 4E69 ATI RADEON 9800 Secondary (R350) + 4E6A ATI RADEON 9800 XT Secondary (R360) + 4E6B ATI FireGL X2-256/X2-256t Secondary (R350GL) 4E71 Radeon Mobility 9600 (M10 NQ) (secondary) 4F72 Radeon 9000 Series (RV250) 4F73 Radeon 9000 Series (RV250) (Secondary) @@ -538,8 +550,8 @@ 5045 Rage 128 PE/Pro AGP 2x (TMDS) 5046 Rage 128 PF/Pro AGP 4x (TMDS) 5047 3d Rage pro agp 2x (215R3BUA22) - 5048 Rage 128 Pro PH AGP 2x (Rage 128 Pro PH AGP) - 5049 Rage 128 Pro PI AGP 4x (bk2.0.2.vr001.001.002.002.004.025.prt3.ty.t) + 5048 Rage 128 Pro PH AGP 2x (8212104D) + 5049 Rage 128 Pro PI AGP 4x (R128) 504A Rage 128 Pro PJ PCI (TMDS) (Rage 128 Pro PJ PCI) 504B Rage 128 Pro PK AGP 2x (TMDS) (Rage 128 Pro PK AGP) 504C 4x (TMDS) (Rage 128 Pro PL AGP) @@ -583,7 +595,7 @@ 516D Radeon 9100 Series (R200) - Secondary 5245 Rage 128 GL PCI (215R46ASA22) 5246 Rage 32MB (Rage 128 PRO) - 5247 Rage 128 RG + 5247 Rage 128 RG (Rage 32MB) 524B Rage 128 VR RK PCI (g01080-108) 524C Rage 128 RL/VR AGP 2x 5345 Rage 128 SE/4x PCI @@ -595,68 +607,68 @@ 534D Rage 128 4x SM AGP 4x (Rage 128 SM AGP 4x) 534E Rage 128 4x 5354 Mach 64 ST - 5446 Video Controller (VGA Compatible) (ewmewm) + 5446 Rage 128 Pro Ultra TF (unknown) 544C Rage 128 Pro TL 5452 Rage 128 Pro TR 5453 Rage 128 Pro Ultra TS 5454 Rage 128 Pro Ultra TT 5455 Rade 128 Pro Ultra TU - 5460 Radeon X300 Mobility (M22) (RV370) - 5461 Mobility Radeon X300 - 5462 Mobility Radeon X600 SE - 5464 FireGL GL (M22) - 5548 Radeon X800 (R423 UH) - 5549 Radeon X800 Pro - 554A Radeon X800 XT Platinum - 554B Primary (X800GT) + 5460 ATI MOBILITY /ATI RADEON X300 (M22) + 5461 ATI MOBILITY /ATI RADEON X300 (M22) + 5462 ATI MOBILITY /ATI RADEON X600 SE (M24C) + 5464 ATI MOBILITY FireGL V3100 (M22GL) + 5548 ATI RADEON X800 Series (R423) + 5549 ATI RADEON X800 GTO (R423) + 554A ATI RADEON X800 XT Platinum Edition (R423) + 554B ATI RADEON X800 GT (R423) 554C R430 XTP - 554D Radeon X800 XL (R430) - 554E Radeon X800 Series - 554F Radeon X800 Series - 5550 FireGL V7100 (R423) - 5551 ATI FIREGL V5100 PCI-EX Primary (R423GL-SE) + 554D ATI RADEON X800 CrossFire Edition (R430) + 554E ATI RADEON X800 GT (R430) + 554F ATI RADEON X800 GTO (R430) + 5550 ATI FireGL V7100 (R423GL) + 5551 ATI FireGL V5100 (R423GL) 5552 FireGL V5100 (R423 UR) 5554 FireGL V7100 (R423 UT) - 5568 Radeon X800 Series Secondary - 5569 Radeon X800 Pro - Secondary - 556A Radeon X800 XT Platinum - Secondary - 556B Radeon X800 SE - Secondary + 5568 ATI RADEON X800 Series Secondary (R423) + 5569 ATI RADEON X800 GTO Secondary (R423) + 556A ATI RADEON X800 XT Platinum Edition Secondary (R423) + 556B ATI RADEON X800 GT Secondary (R423) 556C R430 XTP Secondary - 556D Radeon X800 XL - Secondary (R430) - 556E Radeon X800 Series - Secondary - 556F Radeon X800 Series - Secondary - 5570 FIREGL V7100 Secondary - 5571 ATI FIREGL V5100 PCI-EX Secondary (R423GL-SE) - 564A Mobility FIREGL V5000 (M26) - 564B Mobility FIREGL V5000 - 564F Mobility Radeon X700 XL PCIe (M26) - 5652 Mobility Radeon X700 - 5653 Mobility Radeon X700 - 5654 Mach 64 VT VIDEO XPRESSION (215VT2CA42) + 556D ATI RADEON X800 CrossFire Edition Secondary (R430) + 556E ATI RADEON X800 GT Secondary (R430) + 556F ATI RADEON X800 GTO Secondary (R430) + 5570 ATI FireGL V7100 Secondary (R423GL) + 5571 FireGL V5100 PCIe (R423GL-SE) - Secondary + 564A ATI MOBILITY FireGL V5000 (M26GL) + 564B ATI MOBILITY FireGL V5000 (M26GL) + 564F ATI MOBILITY /ATI RADEON X700 XL (M26) + 5652 ATI MOBILITY /ATI RADEON X700 (M26) + 5653 ATI MOBILITY/ATI RADEON X700 (RV410) + 5654 Mach64 VT (215VT22200) 5655 Mach 64 VT3 5656 Mach 64 VT4 PCI (Mach 64 VT4 PCI) - 5657 Radeon X550/X700 Series + 5657 ATI RADEON X550/X700 Series (RV410) 566F RADEON X700 SERIES SECONDARY - 5673 Mobility Radeon X700 Secondary - 5677 Radeon X550/X700 Series Secondary + 5673 ATI MOBILITY /ATI RADEON X700 Secondary (M26) + 5677 ATI RADEON X550/X700 Series Secondary (RV410) 5830 RS300/100 Host Bridge 5831 RS300/133 Host Bridge 5832 RS300/166 Host Bridge - 5833 Radeon IGP9100 RS300/200 Host Bridge + 5833 ATI Radeon 9000/9100 IGP Chipset - Host-PCI Bridge (RS300M) 5834 Radeon 9100 IGP (RS300) - 5835 Mobility Radeon 9100 IGP (RS300M AGP) - 5838 AGP Bridge (Radeon 9100 IGP) + 5835 Mobilitiy Radeon 9100 IGP AGP (RS300M) + 5838 ATI Radeon 9000/9100 IGP Chipset - AGP Controller (RS300M) 5854 Radeon XPRESS 200 Series Secondary 5874 Radeon XPRESS 200 Series Secondary - 5940 www.ati.comRadeon 9200 Pro - Secondary (RV280) + 5940 Radeon 9200 Pro Secondary (RV280) 5941 ATI Radeon 9200 - Secondary (RV280) 5942 Radeon 9000U Family - Secondary 5944 Radeon 9200SE PCI (RV280) 5950 RS480 Host Bridge 5951 Radeon Xpress 200 (RS480/RS482/RX480/RX482) Host bridge 5952 CrossFire Xpress 3200 (RD580) Chipset Host Bridge - 5954 ATI Radeon Xpress 200 Series - RS480 (na) - 5955 Mobility Radeon XPRESS 200 + 5954 ATI RADEON Xpress Series (RS480) + 5955 ATI RADEON Xpress Series (RS480M) 5956 RD790 GFX Dual Slot 5957 RX790 GFX Single Slot 5958 RD780 GFX Dual Slot @@ -664,10 +676,10 @@ 5961 ATI RADEON 9200 se agp (RV280) 5962 Radeon 9000U Family 5964 Radeon 9200 SE Series (Radeon 9200) - 5965 FireMV 2200 (Nvidia) + 5965 FireMV 2200 (unknown) 5969 ES1000 - 5974 Radeon XPRESS 200 Series - 5975 ATI Radeon X1100 (Radeon Xpress 1100) + 5974 ATI RADEON Xpress Series (RS482) + 5975 ATI RADEON Xpress Series (RS482M) 5978 RD790 PCI to PCI bridge (external gfx0 port A) 5979 RD790 PCI to PCI bridge (external gfx0 port B) 597A RD790 PCI to PCI bridge (PCIe gpp port A) @@ -696,7 +708,7 @@ 5A1E RD890 PCI to PCI bridge (external gfx1 port B) 5A1F RD890 PCI to PCI bridge (NB-SB link) 5A30 RS400/100 Host Bridge - 5A31 RS400/133 Host Bridge + 5A31 Host Bridge (RS400/133) 5A32 RS400/166 Host Bridge 5A33 Northbridge: Radeon Xpress 200 (RC410) 5A34 RS480 PCI-X Root Port @@ -705,211 +717,220 @@ 5A38 RS480 PCI Bridge 5A39 RS480 PCI Bridge 5A3F RS480 PCI Bridge - 5A41 Radeon XPRESS 200 - 5A42 SUBSYS_11821043&REV_004&1CF2FBB4&0&2808 (X200M) + 5A41 ATI RADEON Xpress Series (RS400) + 5A42 ATI RADEON Xpress Series (RS400M) 5A43 Radeon XPRESS 200 Series Secondary - 5A61 Radeon Xpress 200 (RC410) VGA card (Radeon XPress 200 (RC410)) - 5A62 ATI RADEON XPRESS 1100 (RC410M) + 5A61 ATI RADEON Xpress Series (RC410) + 5A62 ATI RADEON Xpress Series (RC410M) 5A63 Radeon XPRESS 200 Series Secondary - 5B60 ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)] (Radeon X300) + 5B60 ATI RADEON X300/X550/X1050 Series (RV370) 5B61 RV371 - 5B62 RADEON X600 Series 265MB (RV380) - 5B63 ATI Radoen X1050 (Unknown) - 5B64 FireGL V3100 (RV370 5B64) + 5B62 ATI RADEON X600 Series (RV380x) + 5B63 ATI RADEON X300/X550/X1050 Series (RV370) + 5B64 ATI FireGL V3100 (RV370GL) 5B65 FireGL D1100 (RV370 5B65) 5B66 RV370X - 5B70 Radeon X300/X550/X1050 Series - Secondary + 5B70 ATI RADEON X300/X550/X1050 Series Secondary (RV370) 5B71 RV371 Secondary - 5B72 Radeon X600 Series - Secondary - 5B73 Radeon X550 Series - Secondary - 5B74 ATI 128MB PCI Express x16 ATI FireGL V3100 (FireGL V3100) - 5B75 FIREMV 2200 Secondary + 5B72 ATI RADEON X600 Series Secondary (RV380x) + 5B73 ATI RADEON X300/X550/X1050 Series Secondary (RV370) + 5B74 ATI FireGL V3100 Secondary (RV370GL) + 5B75 ATI FireMV 2200 Secondary (RV370) 5B76 RV370X Secondary 5C61 Mobility Radeon 9200 (bk-ati ver008.016m.085.006) 5C63 Mobility Radeon 9200 (RV280 (M9+)) 5D44 Radeon 9200 SE Series - Secondary (RV280) 5D45 ATI FireMV 2200 PCI Secondary (RV280) - 5D48 Mobility Radeon X800 XT - 5D49 Mobility FireGL V5100 - 5D4A PCI-E Graphics adapter from Clevo D900T notebook (Mobility Radeon X800) + 5D48 ATI MOBILITY/ATI RADEON X800 XT (M28) + 5D49 ATI MOBILITY FireGL V5100 (M28GL) + 5D4A ATI MOBILITY /ATI RADEON X800 (M28) 5D4C R480 CONSUMER 4P - 5D4D Radeon XT850 (Radeon XT850) + 5D4D ATI RADEON X850 XT Platinum Edition (R480) 5D4E Radeon X800 GT - 5D4F x800gto 256 pci-e (r480) - 5D50 FIREGL V7200 - 5D52 Radeon X850XT (PCIE) Primary (R480) - 5D57 Radeon X800 XT + 5D4F ATI RADEON X800 GTO (R480) + 5D50 ATI FireGL V7200 (R480GL) + 5D52 ATI RADEON X850 XT (R480) + 5D57 ATI RADEON X800 XT (R423) 5D6C R480 CONSUMER 4P Secondary - 5D6D Radeon X850 Series - Secondary + 5D6D ATI RADEON X850 XT Platinum Edition Secondary (R480) 5D6E Radeon X800 GT Secondary - 5D6F Radeon X850 Pro 256M (01131002) - 5D70 FIREGL V7200 Secondary - 5D72 Radeon X850 Series - Secondary - 5D77 Radeon X800 XT - Secondary - 5E48 FireGL V5000 (RV410) + 5D6F ATI RADEON X800 GTO Secondary (R480) + 5D70 ATI FireGL V7200 Secondary (R480GL) + 5D72 ATI RADEON X850 XT Secondary (R480) + 5D77 ATI RADEON X800 XT Secondary (R423) + 5E48 ATI FireGL V5000 (RV410GL) 5E49 FireGL V3300 (RV410) - 5E4A Radeon X700 Series - 5E4B Radeon X700 Series - 5E4C Radeon X700 Series - 5E4D Radeon X700 Series - 5E4F Radeon X700 SE - 5E68 FIREGL V5000 Secondary - 5E6A Radeon X700 Series - Secondary - 5E6B Radeon X700 Series - Secondary - 5E6C Radeon X700 Series - Secondary - 5E6D Radeon X700 Series - Secondary - 5E6F Radeon X700 SE - Secondary + 5E4A ATI RADEON X700 XT (RV410) + 5E4B ATI RADEON X700 PRO (RV410) + 5E4C ATI RADEON X700 SE (RV410) + 5E4D ATI RADEON X700 (RV410) + 5E4F ATI RADEON X700/X550 Series (RV410) + 5E68 ATI FireGL V5000 Secondary (RV410GL) + 5E6A ATI RADEON X700 XT Secondary (RV410) + 5E6B ATI RADEON X700 PRO Secondary (RV410) + 5E6C ATI RADEON X700 SE Secondary (RV410) + 5E6D ATI RADEON X700 Secondary (RV410) + 5E6F ATI RADEON X700/X550 Series Secondary (RV410) 5F57 Radeon X800XT PCIe (R423) + 6898 ATI Radeon HD 5800 Series (EG CYPRESS XT) + 6899 ATI Radeon HD 5800 Series (EG CYPRESS PRO) + 68A0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68A1 ATI Mobility Radeon HD 5800 Series (EG BROADWAY PRO/LP) + 68B0 ATI Mobility Radeon HD 5800 Series (EG BROADWAY XT) + 68B8 ATI Radeon HD 5700 Series (EG JUNIPER XT) + 68BE ATI Radeon HD 5700 Series (EG JUNIPER LE) 700F PCI to AGP Bridge (A3/U1) 7010 PCI to AGP Bridge (RS200) - 7100 Radeon X1800 Series - 7101 Mobility Radeon X1800 XT - 7102 Radeon Mobility X1800 - 7103 Mobility FireGL V7200 - 7104 ATI FireGL 7200 or 3200 - 7105 R520 [FireGL] - 7106 Mobility FireGL V7100 - 7108 Radeon Mobility X1800 + 7100 ATI RADEON X1800 Series (R520) + 7101 ATI MOBILITY /ATI RADEON X1800 XT (M58) + 7102 ATI MOBILITY /ATI RADEON X1800 (M58) + 7103 ATI MOBILITY FireGL V7200 (M58GL) + 7104 ATI FireGL V7200 (R520GL) + 7105 ATI FireGL V5300 (R520GL) + 7106 ATI MOBILITY FireGL V7100 (M58GL) + 7108 ATI RADEON X1800 Series (R520) 7109 Radeon X1800 Series - Secondary - 710A Radeon X1800 GTO - 710B Radeon X1800 - 710C Radeon X1800 - 710E FIREGL V7300 - 710F ATI FireGL (V7350) - 7120 Radeon X1800 Series Secondary - 7124 FireGL V7200 (R520 GL) - Secondary - 7125 Radeon X1800 Series Secondary - 7128 Radeon X1800 Series Secondary - 7129 Radeon X1800 Series - Secondary - 712A Radeon X1800 GTO - Secondary - 712B Radeon X1800 Series Secondary - 712C Radeon X1800 Series Secondary - 712E FIREGL V7300 Secondary - 712F ATI FireGL (V 7350 Secondary) - 7140 Radeon X1300 Series + 710A ATI RADEON X1800 Series (R520) + 710B ATI RADEON X1800 Series (R520) + 710C ATI RADEON X1800 Series (R520) + 710E ATI FireGL V7300 (R520GL) + 710F ATI FireGL V7350 (R520GL) + 7120 ATI RADEON X1800 Series Secondary (R520) + 7124 ATI FireGL V7200 Secondary (R520GL) + 7125 ATI FireGL V5300 Secondary (R520GL) + 7128 ATI RADEON X1800 Series Secondary (R520) + 7129 ATI RADEON X1800 Series Secondary (R520) + 712A ATI RADEON X1800 Series Secondary (R520) + 712B ATI RADEON X1800 Series Secondary (R520) + 712C ATI RADEON X1800 Series Secondary (R520) + 712E ATI FireGL V7300 Secondary (R520GL) + 712F ATI FireGL V7350 Secondary (R520GL) + 7140 ATI RADEON X1600 Series (RV515) 7141 RV505 - 7142 Radeon X1300 Pro or X1550 (rv515) - 7143 Radeon X1550 Series (RV505) - 7145 PCIVEN_104C&DEV_803B&SUBSYS_FF101179&REV_00 (x1400) - 7146 Radeon X1300 XGE (N/A) - 7147 Radeon X1550 64-bit (RV505) - 7149 ATI Mobility Radeon X1300, M52-64 (216CZJAKA12FAG) - 714A Mobility Radeon X1300 - 714B Mobility Radeon X1300 - 714C Mobility Radeon X1300 - 714D Radeon X1300 (RV515) - 714E Radeon X1300 (RV515) + 7142 ATI RADEON X1300/X1550 Series (RV515) + 7143 ATI RADEON X1550 Series (RV515) + 7145 ATI MOBILITY /ATI RADEON X1400 (M54) + 7146 ATI RADEON X1300 / X1550 Series (RV515) + 7147 ATI RADEON X1550 64-bit (RV515) + 7149 ATI MOBILITY /ATI RADEON X1300 (M52) + 714A ATI MOBILITY /ATI RADEON X1300 (M52) + 714B ATI MOBILITY /ATI RADEON X1300 (M52) + 714C ATI MOBILITY /ATI RADEON X1300 (M52) + 714D ATI RADEON X1300 Series (RV515) + 714E ATI RADEON X1300 Series (RV515PCI) 714F RV505 7151 RV505 - 7152 HP Fire GL v3300 (Fire GL v3300) - 7153 FireGL V3350 (RV515GL) - 715E Radeon X1300 Series - 715F Radeon X1300 Series - 7160 Radeon X1300 Series - Secondary + 7152 ATI FireGL V3300 (RV515GL) + 7153 ATI FireGL V3350 (RV515GL) + 715E ATI RADEON X1300 Series (RV515) + 715F ATI RADEON X1550 64-bit (RV515) + 7160 ATI RADEON X1600 Series Secondary (RV515) 7161 RV505 Secondary - 7162 Radeon X1300 Series - Secondary - 7163 Radeon X1300 PRO Secondary - 7166 Radeon X1300 Series - Secondary - 7167 Radeon X1300 Series Secondary + 7162 ATI RADEON X1300/X1550 Series Secondary (RV515) + 7163 ATI RADEON X1550 Series Secondary (RV515) + 7166 ATI RADEON X1300 / X1550 Series Secondary (RV515) + 7167 ATI RADEON X1550 64-bit Secondary (RV515) 7169 M52 Secondary - 716D Radeon X1300 Series Secondary - 716E Radeon X1300 Series Secondary + 716D ATI RADEON X1300 Series Secondary (RV515) + 716E ATI RADEON X1300 Series Secondary (RV515PCI) 716F RV505 Secondary 7171 RV505 Secondary - 7172 FireGL V3300 (RV515GL) Secondary - 7173 FireGL V3350 (RV515GL) Secondary - 717E Radeon X1300 Series Secondary - 717F Radeon X1300 Series Secondary - 7180 Radeon X1300 Series - 7181 Radeon X1600 Series (RV516XT) - 7183 Radeon X1300/X1550 Series (RV505) - 7186 PCIVEN_1002&DEV_7186&SUBSYS_12311043&REV_004&2D404BB6&0&0008 (Mobility Radeon X1450) - 7187 Radeon 1300 (Radeon 1300) - 7188 ATI Mobility Radeon X2300 (Mobility X2300) - 718A Mobility Radeon X2300 Series - 718B Mobility Radeon X1350 - 718C Mobility Radeon X1350 - 718D Mobility Radeon X1450 - 718F Radeon X1300 Series - 7193 Radeon X1550 Series - 7196 Mobility Radeon X1350 - 719B FireMV 2250 - 719F Radeon X1550 Series - 71A0 Radeon X1300 Series Secondary - 71A1 Radeon X1600 Series (RV516XT) Secondary - 71A3 Radeon X1300 Series Secondary - 71A7 Radeon 1300 Secondary (Radeon 1300) - 71B3 Radeon X1550 Series Secondary - 71BB FireMV 2250 Secondary - 71C0 Radeon X1600 Series - 71C1 Radeon X1650 Pro (RV535) - 71C2 ATI X1600 Pro PCI-E (ATI X1600 Pro PCI-E) - 71C3 Radeon X1600 Series - 71C4 Mobility FIREGL V5200 - 71C5 Radeon X1600 Mobility (RV530?) - 71C6 Radeon X1650 Series (RV530 LE) - 71C7 RADEON X1650 SERIES - 71CD Radeon X1600 Series - 71CE Radeon X1600 PRO / X1300XT (RV530 VE) - 71D2 FireGL V3400 (RV530GL) - 71D4 Mobility FireGL V5250 (M56GL) - 71D5 Mobility Radeon X1700 (M66-P) - 71D6 Mobility Radeon X1700 (M66-XT) - 71DA FIREGL V5200 - 71DE Ati Radeon X2500 (Uknown) - 71E0 Radeon X1600 Series Secondary - 71E1 Radeon X1650 Series Secondary - 71E2 Radeon X1600 Series Secondary - 71E3 Radeon X1600 Series Secondary + 7172 ATI FireGL V3300 Secondary (RV515GL) + 7173 ATI FireGL V3350 Secondary (RV515GL) + 717E ATI RADEON X1300 Series Secondary (RV515) + 717F ATI RADEON X1550 64-bit Secondary (RV515) + 7180 ATI RADEON X1300/X1550 Series (RV515) + 7181 ATI RADEON X1600 Series (RV515) + 7183 ATI RADEON X1300/X1550 Series (RV515) + 7186 ATI MOBILITY /ATI RADEON X1450 (M54) + 7187 ATI RADEON X1300/X1550 Series (RV515) + 7188 ATI MOBILITY /ATI RADEON X2300 (M54) + 718A ATI MOBILITY /ATI RADEON X2300 (M54) + 718B ATI MOBILITY /ATI RADEON X1350 (M52) + 718C ATI MOBILITY /ATI RADEON X1350 (M52) + 718D ATI MOBILITY /ATI RADEON X1450 (M54) + 718F ATI RADEON X1300 Series (RV515PCI) + 7193 ATI RADEON X1550 Series (RV515) + 7196 ATI MOBILITY /ATI RADEON X1350 (M52) + 719B ATI FireMV 2250 (RV515) + 719F ATI RADEON X1550 64-bit (RV515) + 71A0 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A1 ATI RADEON X1600 Series Secondary (RV515) + 71A3 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71A7 ATI RADEON X1300/X1550 Series Secondary (RV515) + 71AF ATI RADEON X1300 Series Secondary (RV515PCI) + 71B3 ATI RADEON X1550 Series Secondary (RV515) + 71BB ATI FireMV 2250 Secondary (RV515) + 71C0 ATI RADEON X1600 Series (RV530) + 71C1 ATI RADEON X1650 Series (RV535) + 71C2 ATI RADEON X1600 Series (RV530) + 71C3 ATI RADEON X1300 Series (RV535) + 71C4 ATI MOBILITY FireGL V5200 (M56GL) + 71C5 ATI MOBILITY /ATI RADEON X1600 (M56) + 71C6 ATI RADEON X1650 Series (RV530) + 71C7 ATI RADEON X1650 Series (RV535) + 71CD ATI RADEON X1600 Series (RV530) + 71CE ATI RADEON X1600 Pro / ATI RADEON X1300 XT (RV530) + 71D2 ATI FireGL V3400 (RV530GL) + 71D4 ATI MOBILITY FireGL V5250 (M56GL) + 71D5 ATI MOBILITY /ATI RADEON X1700 (M56) + 71D6 ATI MOBILITY /ATI RADEON X1700 XT (M56) + 71DA ATI FireGL V5200 (RV530GL) + 71DE ATI MOBILITY /ATI RADEON X1700 (M56) + 71E0 ATI RADEON X1600 Series Secondary (RV530) + 71E1 ATI RADEON X1650 Series Secondary (RV535) + 71E2 ATI RADEON X1600 Series Secondary (RV530) + 71E3 ATI RADEON X1300 Series Secondary (RV535) 71E5 M56 Secondary - 71E6 Radeon X1650 Series Secondary (RV530 LE) - 71E7 RADEON X1650 SERIES SECONDARY - 71ED Radeon X1600 Series Secondary - 71EE Radeon X1600 PRO / X1300XT Secondary (RV530 VE) + 71E6 ATI RADEON X1600 Series Secondary (RV530) + 71E7 ATI RADEON X1650 Series Secondary (RV535) + 71ED ATI RADEON X1600 Series Secondary (RV530) + 71EE ATI RADEON X1600 Pro / ATI RADEON X1300 XT Secondary (RV530) 71F2 ATI FireGL V3400 Secondary (RV530GL) - 71FA FIREGL V5200 Secondary + 71FA ATI FireGL V5200 Secondary (RV530GL) 71FE RV530 SE Secondary 7205 S3G Unichrome IGP KM400/KN400 (1106) - 7210 Mobility Radeon X2100 - 7211 Mobility Radeon X2100 Secondary - 7240 Radeon X1900 (R580) + 7210 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7211 ATI MOBILITY /ATI RADEON HD 2300 (M71) + 7240 ATI RADEON X1950 Series (R580) 7241 Radeon X1900 (R580) 7242 Radeon X1900 (R580) - 7243 Radeon X1900 (R580) - 7244 Radeon X1950XT Series - 7245 Radeon X1900 (R580) - 7246 Radeon X1900 (R580) - 7247 Radeon X1900 (R580) - 7248 Radeon X1900 (R580) - 7249 Radeon X1900 Series - 724A Radeon X1900 (R580) - 724B R580LE (180636911721) - 724C Radeon X1900 (R580) - 724D Radeon X1900 (R580) + 7243 ATI RADEON X1900 Series (R580) + 7244 ATI RADEON X1950 Series (R580) + 7245 ATI RADEON X1900 Series (R580) + 7246 ATI RADEON X1900 Series (R580) + 7247 ATI RADEON X1900 Series (R580) + 7248 ATI RADEON X1900 Series (R580) + 7249 ATI RADEON X1900 Series (R580) + 724A ATI RADEON X1900 Series (R580) + 724B ATI RADEON X1900 Series (R580) + 724C ATI RADEON X1900 Series (R580) + 724D ATI RADEON X1900 Series (R580) 724E FireGL V7300/V7350 PCIe (R580) - 724F Radeon X1900 Series - 7260 Radeon X1950 Series Secondary - 7263 Radeon X1900 Series Secondary - 7264 Radeon X1950XT Series Secondary - 7265 Radeon X1900 Series Secondary - 7266 Radeon X1900 Series Secondary - 7267 Radeon X1900 Series Secondary - 7268 Radeon X1950 Series Secondary - 7269 Radeon X1900 Series Secondary - 726A Radeon X1900 Series Secondary - 726B Radeon X1900 Secondary - 726C Radeon X1900 Series Secondary - 726D Radeon X1900 Series Secondary + 724F ATI RADEON X1900 Series (R580) + 7260 ATI RADEON X1950 Series Secondary (R580) + 7263 ATI RADEON X1900 Series Secondary (R580) + 7264 ATI RADEON X1950 Series Secondary (R580) + 7265 ATI RADEON X1900 Series Secondary (R580) + 7266 ATI RADEON X1900 Series Secondary (R580) + 7267 ATI RADEON X1900 Series Secondary (R580) + 7268 ATI RADEON X1900 Series Secondary (R580) + 7269 ATI RADEON X1900 Series Secondary (R580) + 726A ATI RADEON X1900 Series Secondary (R580) + 726B ATI RADEON X1900 Series Secondary (R580) + 726C ATI RADEON X1900 Series Secondary (R580) + 726D ATI RADEON X1900 Series Secondary (R580) 726E FireGL V7300/V7350 PCIe (R580) - Secondary - 726F Radeon X1900 Series Secondary - 7280 Radeon X1950 Pro Series AGP (0x7280) (Radeon X1950 Pro) - 7288 Radeon X1950 GT - 7291 Radeon X1650 XT (PCIe) - 7293 Radeon X1650 Series - 72A0 Radeon X1950 Pro Series AGP (0x72A0) (Radeon X1950 Pro Secondary) - 72A8 Radeon X1950 GT (Secondary) - 72B1 Radeon X1650 XT (Secondary) (PCIe) - 72B3 Radeon X1650 Series (Secondary) + 726F ATI RADEON X1900 Series Secondary (R580) + 7280 ATI RADEON X1950 Series (R580) + 7284 ATI MOBILITY /ATI RADEON X1900 (M58) + 7288 ATI RADEON X1950 GT (R580) + 7291 ATI RADEON X1650 Series (R580) + 7293 ATI RADEON X1650 Series (R580) + 72A0 ATI RADEON X1950 Series Secondary (R580) + 72A8 ATI RADEON X1950 GT Secondary (R580) + 72B1 ATI RADEON X1650 Series Secondary (R580) + 72B3 ATI RADEON X1650 Series Secondary (R580) 7800 ? 7830 RS350/100 Host Bridge 7831 RS350/133 Host Bridge @@ -923,60 +944,136 @@ 7916 RS690 PCI to PCI Bridge (PCI Express Port 2) 7917 RS690 PCI to PCI Bridge (PCI Express Port 3) 7919 Radeon X1200 Series Audio Controller - 791E ATI xpress 1250 (303017AA) - 791F ATI Mobility Radeon x1250 (RS690) + 791A HDMI Audio (791A) + 791E ATI RADEON X1200 Series (RS690) + 791F ATI Mobility Radeon x1100 (RS690M) 7930 RS600(M) Chipset - Host Bridge 7933 RS600(M) Chipset - PCI Express Graphics Port 0 7935 RS600(M) Chipset - PCI Express Port 1 7937 ATI Technoligies Inc (Samsung R25P) - 793F Radeon X1200 Series (Secondary) - 7941 Radeon XPRESS 1300 - 7942 ATI XPress 1250M (1002) - 796E ATI RADEON 2100 (RS740) + 793F ATI RADEON Xpress 1200 Series (RS600) + 7941 ATI RADEON Xpress 1200 Series (RS600) + 7942 ATI RADEON Xpress 1200 Series (RS600M) + 796E ATI RADEON 2100 (RS690) 7C37 Radeon 9600 SE (RV350 AQ) 9400 ATI Radeon HD 2900 XT (R600) - 9401 Radeon HD 2900 XT - 9402 Radeon HD 2900 XT - 9403 Radeon HD 2900 PRO - 9405 Radeon HD 2900 GT - 940A FireGL V8650 - 940B FireGL V8600 - 940F FireGL V7600 - 9440 Graphics adapter (Radeon 4870) - 94C1 ATI Radeon HD 2400 PRO (REV_00) - 94C3 ATI Radeon HD 2400 PRO (RV610) - 94C4 ATI Radeon HD 3470 PRO AGP (RV610) - 94C5 RADEON HD 2400 LE - 94C7 RADEON HD 2350 - 94C8 Mobility Radeon HD 2400 XT - 94C9 Mobility Radeon HD 2400 - 94CB Radeon E2400 - 94CC ATI Radeon HD 2400 Series (ATI Radeon HD 4670 Series) - 9501 ATI Radeon HD 3870 (RV670) - 9505 Radeon HD 3850 - 9515 ATI Radeon HD3850 AGP - 9581 ATI Mobility Radeon HD2600 (600458) - 9583 Mobility Radeon HD 2600 XT - 9586 Radeon HD 2600 XT AGP - 9587 Radeon hd 2600 pro (agp) ( Radeon hd 2600 pro (agp)) - 9588 ATI Radeon HD 2600 XT (RV530) - 9589 ATI Radeon HD 2600 PRO (RV630) + 9401 ATI RADEON HD 2900 XT (R600) + 9402 ATI RADEON HD 2900 XT (R600) + 9403 ATI RADEON HD 2900 PRO (R600) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Tue May 4 19:18:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CCE61065670; Tue, 4 May 2010 19:18:01 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EE4458FC25; Tue, 4 May 2010 19:18:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o44JI0tS009326; Tue, 4 May 2010 19:18:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44JI0xh009322; Tue, 4 May 2010 19:18:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005041918.o44JI0xh009322@svn.freebsd.org> From: Xin LI Date: Tue, 4 May 2010 19:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207629 - stable/8/usr.bin/unzip X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 19:18:01 -0000 Author: delphij Date: Tue May 4 19:18:00 2010 New Revision: 207629 URL: http://svn.freebsd.org/changeset/base/207629 Log: MFC r196981, r200844, r201630, r203977, r203978, r204352: r196981 (rdivacky): Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups. Obtained from: NetBSD r200844 (jh): Don't print the archive name with -p and -q options. PR: bin/141280 r201630 (kientzle): When restoring files, use the mode for the mode. Thanks to: Jun Kuriyama for pointing this out r203977 (gavin): Implement the rename query, for when a file with the same name as the one about to be extracted already exists. The question, and interpretation of the response is deliberately compatible with Info-Zip. This change was originally obtained from NetBSD, but has three changes: - better compatibility with Info-Zip in the handling of ^D - Use getdelim() rather than getline() - bug fix: != changed to == in the "file rename" code I suspect the latter is also a bug in NetBSD, but I can't easily confirm this. PR: bin/143307 Reviewed by: rdivacky (change to unzip.c only) Obtained from: NetBSD src/usr.bin/unzip/unzip.c 1.8 r203978 (gavin): Bump .Dd for r203977 r204352 (ru): Fixed static linkage. == Requested by: Alex Kozlov Modified: stable/8/usr.bin/unzip/Makefile stable/8/usr.bin/unzip/unzip.1 stable/8/usr.bin/unzip/unzip.c Directory Properties: stable/8/usr.bin/unzip/ (props changed) Modified: stable/8/usr.bin/unzip/Makefile ============================================================================== --- stable/8/usr.bin/unzip/Makefile Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/Makefile Tue May 4 19:18:00 2010 (r207629) @@ -3,7 +3,7 @@ PROG = unzip WARNS ?= 6 CSTD = c99 -DPADD = ${LIBARCHIVE} -LDADD = -larchive +DPADD = ${LIBARCHIVE} ${LIBZ} +LDADD = -larchive -lz .include Modified: stable/8/usr.bin/unzip/unzip.1 ============================================================================== --- stable/8/usr.bin/unzip/unzip.1 Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/unzip.1 Tue May 4 19:18:00 2010 (r207629) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 30, 2008 +.Dd February 16, 2010 .Dt UNZIP 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd extract files from a ZIP archive .Sh SYNOPSIS .Nm -.Op Fl ajLlnoqtu +.Op Fl aCcfjLlnopqtuv .Op Fl d Ar dir .Ar zipfile .Sh DESCRIPTION @@ -44,9 +44,22 @@ The following options are available: .It Fl a When extracting a text file, convert DOS-style line endings to Unix-style line endings. +.It Fl C +Match file names case-insensitively. +.It Fl c +Extract to stdout/screen. +When extracting files from the zipfile, they are written to stdout. +This is similar to +.Fl p , +but doesn't suppress normal output. .It Fl d Ar dir Extract files into the specified directory rather than the current directory. +.It Fl f +Update existing. +Extract only files from the zipfile if a file with the same name +already exists on disk and is older than the former. +Otherwise, the file is silently skipped. .It Fl j Ignore directories stored in the zipfile; instead, extract all files directly into the extraction directory. @@ -56,13 +69,19 @@ Convert the names of the extracted files List, rather than extract, the contents of the zipfile. .It Fl n No overwrite. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the file is silently skipped. .It Fl o Overwrite. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the existing file is replaced with the file from the zipfile. +.It Fl p +Extract to stdout. +When extracting files from the zipfile, they are written to stdout. +The normal output is suppressed as if +.Fl q +was specified. .It Fl q Quiet: print less information while extracting. .It Fl t @@ -70,15 +89,25 @@ Test: do not extract anything, but verif in the archive. .It Fl u Update. -When extacting a file from the zipfile, if a file with the same name +When extracting a file from the zipfile, if a file with the same name already exists on disk, the existing file is replaced with the file from the zipfile if and only if the latter is newer than the former. Otherwise, the file is silently skipped. +.It Fl v +List verbosely, rather than extract, the contents of the zipfile. +This differs from +.Fl l +by using the long listing. +Note that most of the data is currently fake and does not reflect the +content of the archive. +.It Fl x Ar pattern +Exclude files matching the pattern +.Ar pattern . .El .Pp Note that only one of .Fl n , -.Fl o +.Fl o , and .Fl u may be specified. @@ -129,17 +158,6 @@ utility is only able to process ZIP arch Depending on the installed version of .Xr libarchive , this may or may not include self-extracting archives. -.Sh BUGS -The -.Nm -utility currently does not support asking the user whether to -overwrite or skip a file that already exists on disk. -To be on the safe side, it will fail if it encounters a file that -already exists and neither the -.Fl n -nor the -.Fl o -command line option was specified. .Sh SEE ALSO .Xr libarchive 3 .Sh HISTORY Modified: stable/8/usr.bin/unzip/unzip.c ============================================================================== --- stable/8/usr.bin/unzip/unzip.c Tue May 4 19:04:51 2010 (r207628) +++ stable/8/usr.bin/unzip/unzip.c Tue May 4 19:18:00 2010 (r207629) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2009 Joerg Sonnenberger * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav * All rights reserved. * @@ -51,15 +52,19 @@ /* command-line options */ static int a_opt; /* convert EOL */ +static int C_opt; /* match case-insensitively */ +static int c_opt; /* extract to stdout */ static const char *d_arg; /* directory */ +static int f_opt; /* update existing files only */ static int j_opt; /* junk directories */ static int L_opt; /* lowercase names */ -static int l_opt; /* list */ static int n_opt; /* never overwrite */ static int o_opt; /* always overwrite */ +static int p_opt; /* extract to stdout, quiet */ static int q_opt; /* quiet */ static int t_opt; /* test */ static int u_opt; /* update */ +static int v_opt; /* verbose/list */ /* time when unzip started */ static time_t now; @@ -70,9 +75,6 @@ static int unzip_debug; /* running on tty? */ static int tty; -/* error flag for -t */ -static int test_failed; - /* convenience macro */ /* XXX should differentiate between ARCHIVE_{WARN,FAIL,RETRY} */ #define ac(call) \ @@ -162,7 +164,6 @@ static void info(const char *fmt, ...) { va_list ap; - int i; if (q_opt && !unzip_debug) return; @@ -171,9 +172,10 @@ info(const char *fmt, ...) va_end(ap); fflush(stdout); - for (i = 0; fmt[i] != '\0'; ++i) - /* nothing */ ; - noeol = !(i && fmt[i - 1] == '\n'); + if (*fmt == '\0') + noeol = 1; + else + noeol = fmt[strlen(fmt) - 1] != '\n'; } /* debug message (if unzip_debug) */ @@ -181,7 +183,6 @@ static void debug(const char *fmt, ...) { va_list ap; - int i; if (!unzip_debug) return; @@ -190,9 +191,10 @@ debug(const char *fmt, ...) va_end(ap); fflush(stderr); - for (i = 0; fmt[i] != '\0'; ++i) - /* nothing */ ; - noeol = !(i && fmt[i - 1] == '\n'); + if (*fmt == '\0') + noeol = 1; + else + noeol = fmt[strlen(fmt) - 1] != '\n'; } /* duplicate a path name, possibly converting to lower case */ @@ -200,7 +202,7 @@ static char * pathdup(const char *path) { char *str; - int len; + size_t i, len; len = strlen(path); while (len && path[len - 1] == '/') @@ -209,8 +211,12 @@ pathdup(const char *path) errno = ENOMEM; error("malloc()"); } - for (int i = 0; i < len; ++i) - str[i] = L_opt ? tolower(path[i]) : path[i]; + if (L_opt) { + for (i = 0; i < len; ++i) + str[i] = tolower((unsigned char)path[i]); + } else { + memcpy(str, path, len); + } str[len] = '\0'; return (str); @@ -221,7 +227,7 @@ static char * pathcat(const char *prefix, const char *path) { char *str; - int prelen, len; + size_t prelen, len; prelen = prefix ? strlen(prefix) + 1 : 0; len = strlen(path) + 1; @@ -257,7 +263,7 @@ static void add_pattern(struct pattern_list *list, const char *pattern) { struct pattern *entry; - int len; + size_t len; debug("adding pattern '%s'\n", pattern); len = strlen(pattern); @@ -265,7 +271,6 @@ add_pattern(struct pattern_list *list, c errno = ENOMEM; error("malloc()"); } - memset(&entry->link, 0, sizeof entry->link); memcpy(entry->pattern, pattern, len + 1); STAILQ_INSERT_TAIL(list, entry, link); } @@ -279,7 +284,7 @@ match_pattern(struct pattern_list *list, struct pattern *entry; STAILQ_FOREACH(entry, list, link) { - if (fnmatch(entry->pattern, str, 0) == 0) + if (fnmatch(entry->pattern, str, C_opt ? FNM_CASEFOLD : 0) == 0) return (1); } return (0); @@ -378,7 +383,7 @@ extract_dir(struct archive *a, struct ar { int mode; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0755; @@ -406,49 +411,104 @@ extract_dir(struct archive *a, struct ar static unsigned char buffer[8192]; static char spinner[] = { '|', '/', '-', '\\' }; +static int +handle_existing_file(char **path) +{ + size_t alen; + ssize_t len; + char buf[4]; + + for (;;) { + fprintf(stderr, + "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", + *path); + if (fgets(buf, sizeof(buf), stdin) == 0) { + clearerr(stdin); + printf("NULL\n(EOF or read error, " + "treating as \"[N]one\"...)\n"); + n_opt = 1; + return -1; + } + switch (*buf) { + case 'A': + o_opt = 1; + /* FALLTHROUGH */ + case 'y': + case 'Y': + (void)unlink(*path); + return 1; + case 'N': + n_opt = 1; + /* FALLTHROUGH */ + case 'n': + return -1; + case 'r': + case 'R': + printf("New name: "); + fflush(stdout); + free(*path); + *path = NULL; + alen = 0; + len = getdelim(path, &alen, '\n', stdin); + if ((*path)[len - 1] == '\n') + (*path)[len - 1] = '\0'; + return 0; + default: + break; + } + } +} + /* * Extract a regular file. */ static void -extract_file(struct archive *a, struct archive_entry *e, const char *path) +extract_file(struct archive *a, struct archive_entry *e, char **path) { int mode; time_t mtime; struct stat sb; struct timeval tv[2]; - int cr, fd, text, warn; + int cr, fd, text, warn, check; ssize_t len; unsigned char *p, *q, *end; - mode = archive_entry_filetype(e) & 0777; + mode = archive_entry_mode(e) & 0777; if (mode == 0) mode = 0644; mtime = archive_entry_mtime(e); /* look for existing file of same name */ - if (lstat(path, &sb) == 0) { - if (u_opt) { +recheck: + if (lstat(*path, &sb) == 0) { + if (u_opt || f_opt) { /* check if up-to-date */ - if (S_ISREG(sb.st_mode) && sb.st_mtime > mtime) + if (S_ISREG(sb.st_mode) && sb.st_mtime >= mtime) return; - (void)unlink(path); + (void)unlink(*path); } else if (o_opt) { /* overwrite */ - (void)unlink(path); + (void)unlink(*path); } else if (n_opt) { /* do not overwrite */ return; } else { - /* XXX ask user */ - errorx("not implemented"); + check = handle_existing_file(path); + if (check == 0) + goto recheck; + if (check == -1) + return; /* do not overwrite */ } + } else { + if (f_opt) + return; } - if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) - error("open('%s')", path); + if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0) + error("open('%s')", *path); /* loop over file contents and write to disk */ - info("x %s", path); + info(" extracting: %s", *path); text = a_opt; warn = 0; cr = 0; @@ -465,7 +525,7 @@ extract_file(struct archive *a, struct a if (a_opt && cr) { if (len == 0 || buffer[0] != '\n') if (write(fd, "\r", 1) != 1) - error("write('%s')", path); + error("write('%s')", *path); cr = 0; } @@ -496,7 +556,7 @@ extract_file(struct archive *a, struct a /* simple case */ if (!a_opt || !text) { if (write(fd, buffer, len) != len) - error("write('%s')", path); + error("write('%s')", *path); continue; } @@ -506,7 +566,7 @@ extract_file(struct archive *a, struct a if (!warn && !isascii(*q)) { warningx("%s may be corrupted due" " to weak text file detection" - " heuristic", path); + " heuristic", *path); warn = 1; } if (q[0] != '\r') @@ -519,7 +579,7 @@ extract_file(struct archive *a, struct a break; } if (write(fd, p, q - p) != q - p) - error("write('%s')", path); + error("write('%s')", *path); } } if (tty) @@ -534,9 +594,9 @@ extract_file(struct archive *a, struct a tv[1].tv_sec = mtime; tv[1].tv_usec = 0; if (futimes(fd, tv) != 0) - error("utimes('%s')", path); + error("utimes('%s')", *path); if (close(fd) != 0) - error("close('%s')", path); + error("close('%s')", *path); } /* @@ -612,46 +672,178 @@ extract(struct archive *a, struct archiv if (S_ISDIR(filetype)) extract_dir(a, e, realpathname); else - extract_file(a, e, realpathname); + extract_file(a, e, &realpathname); free(realpathname); free(pathname); } +static void +extract_stdout(struct archive *a, struct archive_entry *e) +{ + char *pathname; + mode_t filetype; + int cr, text, warn; + ssize_t len; + unsigned char *p, *q, *end; + + pathname = pathdup(archive_entry_pathname(e)); + filetype = archive_entry_filetype(e); + + /* I don't think this can happen in a zipfile.. */ + if (!S_ISDIR(filetype) && !S_ISREG(filetype)) { + warningx("skipping non-regular entry '%s'", pathname); + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + /* skip directories in -j case */ + if (S_ISDIR(filetype)) { + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + /* apply include / exclude patterns */ + if (!accept_pathname(pathname)) { + ac(archive_read_data_skip(a)); + free(pathname); + return; + } + + if (c_opt) + info("x %s\n", pathname); + + text = a_opt; + warn = 0; + cr = 0; + for (int n = 0; ; n++) { + len = archive_read_data(a, buffer, sizeof buffer); + + if (len < 0) + ac(len); + + /* left over CR from previous buffer */ + if (a_opt && cr) { + if (len == 0 || buffer[0] != '\n') { + if (fwrite("\r", 1, 1, stderr) != 1) + error("write('%s')", pathname); + } + cr = 0; + } + + /* EOF */ + if (len == 0) + break; + end = buffer + len; + + /* + * Detect whether this is a text file. The correct way to + * do this is to check the least significant bit of the + * "internal file attributes" field of the corresponding + * file header in the central directory, but libarchive + * does not read the central directory, so we have to + * guess by looking for non-ASCII characters in the + * buffer. Hopefully we won't guess wrong. If we do + * guess wrong, we print a warning message later. + */ + if (a_opt && n == 0) { + for (p = buffer; p < end; ++p) { + if (!isascii((unsigned char)*p)) { + text = 0; + break; + } + } + } + + /* simple case */ + if (!a_opt || !text) { + if (fwrite(buffer, 1, len, stdout) != (size_t)len) + error("write('%s')", pathname); + continue; + } + + /* hard case: convert \r\n to \n (sigh...) */ + for (p = buffer; p < end; p = q + 1) { + for (q = p; q < end; q++) { + if (!warn && !isascii(*q)) { + warningx("%s may be corrupted due" + " to weak text file detection" + " heuristic", pathname); + warn = 1; + } + if (q[0] != '\r') + continue; + if (&q[1] == end) { + cr = 1; + break; + } + if (q[1] == '\n') + break; + } + if (fwrite(p, 1, q - p, stdout) != (size_t)(q - p)) + error("write('%s')", pathname); + } + } + + free(pathname); +} + /* * Print the name of an entry to stdout. */ static void list(struct archive *a, struct archive_entry *e) { + char buf[20]; + time_t mtime; - printf("%s\n", archive_entry_pathname(e)); + mtime = archive_entry_mtime(e); + strftime(buf, sizeof(buf), "%m-%d-%g %R", localtime(&mtime)); + + if (v_opt == 1) { + printf(" %8ju %s %s\n", + (uintmax_t)archive_entry_size(e), + buf, archive_entry_pathname(e)); + } else if (v_opt == 2) { + printf("%8ju Stored %7ju 0%% %s %08x %s\n", + (uintmax_t)archive_entry_size(e), + (uintmax_t)archive_entry_size(e), + buf, + 0U, + archive_entry_pathname(e)); + } ac(archive_read_data_skip(a)); } /* * Extract to memory to check CRC */ -static void +static int test(struct archive *a, struct archive_entry *e) { ssize_t len; + int error_count; + error_count = 0; if (S_ISDIR(archive_entry_filetype(e))) - return; + return 0; - info("%s ", archive_entry_pathname(e)); + info(" testing: %s\t", archive_entry_pathname(e)); while ((len = archive_read_data(a, buffer, sizeof buffer)) > 0) /* nothing */; if (len < 0) { - info("%s\n", archive_error_string(a)); - ++test_failed; + info(" %s\n", archive_error_string(a)); + ++error_count; } else { - info("OK\n"); + info(" OK\n"); } /* shouldn't be necessary, but it doesn't hurt */ ac(archive_read_data_skip(a)); + + return error_count; } @@ -665,6 +857,7 @@ unzip(const char *fn) struct archive *a; struct archive_entry *e; int fd, ret; + uintmax_t total_size, file_count, error_count; if ((fd = open(fn, O_RDONLY)) < 0) error("%s", fn); @@ -673,33 +866,70 @@ unzip(const char *fn) ac(archive_read_support_format_zip(a)); ac(archive_read_open_fd(a, fd, 8192)); + if (!p_opt && !q_opt) + printf("Archive: %s\n", fn); + if (v_opt == 1) { + printf(" Length Date Time Name\n"); + printf(" -------- ---- ---- ----\n"); + } else if (v_opt == 2) { + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf("-------- ------ ------- ----- ---- ---- ------ ----\n"); + } + + total_size = 0; + file_count = 0; + error_count = 0; for (;;) { ret = archive_read_next_header(a, &e); if (ret == ARCHIVE_EOF) break; ac(ret); if (t_opt) - test(a, e); - else if (l_opt) + error_count += test(a, e); + else if (v_opt) list(a, e); + else if (p_opt || c_opt) + extract_stdout(a, e); else extract(a, e); + + total_size += archive_entry_size(e); + ++file_count; + } + + if (v_opt == 1) { + printf(" -------- -------\n"); + printf(" %8ju %ju file%s\n", + total_size, file_count, file_count != 1 ? "s" : ""); + } else if (v_opt == 2) { + printf("-------- ------- --- -------\n"); + printf("%8ju %7ju 0%% %ju file%s\n", + total_size, total_size, file_count, + file_count != 1 ? "s" : ""); } ac(archive_read_close(a)); (void)archive_read_finish(a); + if (close(fd) != 0) error("%s", fn); - if (t_opt && test_failed) - errorx("%d checksum error(s) found.", test_failed); + if (t_opt) { + if (error_count > 0) { + errorx("%d checksum error(s) found.", error_count); + } + else { + printf("No errors detected in compressed data of %s.\n", + fn); + } + } } static void usage(void) { - fprintf(stderr, "usage: unzip [-ajLlnoqtu] [-d dir] zipfile\n"); + fprintf(stderr, "usage: unzip [-aCcfjLlnopqtuv] [-d dir] [-x pattern] zipfile\n"); exit(1); } @@ -709,14 +939,23 @@ getopts(int argc, char *argv[]) int opt; optreset = optind = 1; - while ((opt = getopt(argc, argv, "ad:jLlnoqtux:")) != -1) + while ((opt = getopt(argc, argv, "aCcd:fjLlnopqtuvx:")) != -1) switch (opt) { case 'a': a_opt = 1; break; + case 'C': + C_opt = 1; + break; + case 'c': + c_opt = 1; + break; case 'd': d_arg = optarg; break; + case 'f': + f_opt = 1; + break; case 'j': j_opt = 1; break; @@ -724,13 +963,18 @@ getopts(int argc, char *argv[]) L_opt = 1; break; case 'l': - l_opt = 1; + if (v_opt == 0) + v_opt = 1; break; case 'n': n_opt = 1; break; case 'o': o_opt = 1; + q_opt = 1; + break; + case 'p': + p_opt = 1; break; case 'q': q_opt = 1; @@ -741,6 +985,9 @@ getopts(int argc, char *argv[]) case 'u': u_opt = 1; break; + case 'v': + v_opt = 2; + break; case 'x': add_pattern(&exclude, optarg); break; From owner-svn-src-stable@FreeBSD.ORG Tue May 4 21:16:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72F6E1065674; Tue, 4 May 2010 21:16:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 628708FC19; Tue, 4 May 2010 21:16:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o44LG1OG035425; Tue, 4 May 2010 21:16:01 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LG17J035423; Tue, 4 May 2010 21:16:01 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201005042116.o44LG17J035423@svn.freebsd.org> From: Andrew Thompson Date: Tue, 4 May 2010 21:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207633 - stable/8/sys/dev/usb/controller X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 21:16:01 -0000 Author: thompsa Date: Tue May 4 21:16:01 2010 New Revision: 207633 URL: http://svn.freebsd.org/changeset/base/207633 Log: MFC r201797 Remove unused uhci_dump_qhs(). Modified: stable/8/sys/dev/usb/controller/uhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/uhci.c Tue May 4 20:51:19 2010 (r207632) +++ stable/8/sys/dev/usb/controller/uhci.c Tue May 4 21:16:01 2010 (r207633) @@ -830,33 +830,6 @@ uhci_dump_all(uhci_softc_t *sc) } static void -uhci_dump_qhs(uhci_qh_t *sqh) -{ - uint8_t temp; - - temp = uhci_dump_qh(sqh); - - /* - * uhci_dump_qhs displays all the QHs and TDs from the given QH - * onwards Traverses sideways first, then down. - * - * QH1 QH2 No QH TD2.1 TD2.2 TD1.1 etc. - * - * TD2.x being the TDs queued at QH2 and QH1 being referenced from QH1. - */ - - if (temp & 1) - uhci_dump_qhs(sqh->h_next); - else - DPRINTF("No QH\n"); - - if (temp & 2) - uhci_dump_tds(sqh->e_next); - else - DPRINTF("No TD\n"); -} - -static void uhci_dump_tds(uhci_td_t *td) { for (; From owner-svn-src-stable@FreeBSD.ORG Tue May 4 21:21:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A73A8106566B; Tue, 4 May 2010 21:21:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB318FC15; Tue, 4 May 2010 21:21:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o44LL57W036586; Tue, 4 May 2010 21:21:05 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LL5g6036581; Tue, 4 May 2010 21:21:05 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201005042121.o44LL5g6036581@svn.freebsd.org> From: John Baldwin Date: Tue, 4 May 2010 21:21: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: r207634 - stable/7/sys/nfsclient X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 21:21:05 -0000 Author: jhb Date: Tue May 4 21:21:05 2010 New Revision: 207634 URL: http://svn.freebsd.org/changeset/base/207634 Log: MFC: 202767,202774 Add a timeout for the negative name cache entries in the NFS client. This avoids a bogus negative name cache entry from persisting forever when another client creates an entry with the same name within the same NFS server time of day clock tick. Unlike 8.x and later, the timeout is only adjustable via a system-wide sysctl (vfs.nfs.negative_name_timeout) rather than a mount option. Setting the timeout to 0 disables negative name caching. I also fixed one obvious typo where args.timeo should be args.maxgrouplist. Modified: stable/7/sys/nfsclient/nfs_vfsops.c stable/7/sys/nfsclient/nfs_vnops.c stable/7/sys/nfsclient/nfsmount.h stable/7/sys/nfsclient/nfsnode.h Modified: stable/7/sys/nfsclient/nfs_vfsops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vfsops.c Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfs_vfsops.c Tue May 4 21:21:05 2010 (r207634) @@ -951,7 +951,7 @@ nfs_mount(struct mount *mp, struct threa } if (vfs_getopt(mp->mnt_optnew, "maxgroups", (void **)&opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.maxgrouplist); - if (ret != 1 || args.timeo <= 0) { + if (ret != 1 || args.maxgrouplist <= 0) { vfs_mount_error(mp, "illegal maxgroups: %s", opt); error = EINVAL; Modified: stable/7/sys/nfsclient/nfs_vnops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vnops.c Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfs_vnops.c Tue May 4 21:21:05 2010 (r207634) @@ -225,6 +225,10 @@ int nfs_directio_enable = 0; SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs_directio_enable, CTLFLAG_RW, &nfs_directio_enable, 0, "Enable NFS directio"); +static u_int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; +SYSCTL_UINT(_vfs_nfs, OID_AUTO, negative_name_timeout, CTLFLAG_RW, + &negnametimeo, 0, "Negative name cache entry timeout"); + /* * This sysctl allows other processes to mmap a file that has been opened * O_DIRECT by a process. In general, having processes mmap the file while @@ -918,9 +922,12 @@ nfs_lookup(struct vop_lookup_args *ap) * We only accept a negative hit in the cache if the * modification time of the parent directory matches * our cached copy. Otherwise, we discard all of the - * negative cache entries for this directory. + * negative cache entries for this directory. We also + * only trust -ve cache entries for less than + * negnametimeo seconds. */ - if (VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 && + if ((u_int)(ticks - np->n_dmtime_ticks) < (negnametimeo * hz) && + VOP_GETATTR(dvp, &vattr, cnp->cn_cred, td) == 0 && vattr.va_mtime.tv_sec == np->n_dmtime) { nfsstats.lookupcache_hits++; return (ENOENT); @@ -1063,8 +1070,10 @@ nfsmout: */ mtx_lock(&np->n_mtx); if (np->n_dmtime <= dmtime) { - if (np->n_dmtime == 0) + if (np->n_dmtime == 0) { np->n_dmtime = dmtime; + np->n_dmtime_ticks = ticks; + } mtx_unlock(&np->n_mtx); cache_enter(dvp, NULL, cnp); } else Modified: stable/7/sys/nfsclient/nfsmount.h ============================================================================== --- stable/7/sys/nfsclient/nfsmount.h Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfsmount.h Tue May 4 21:21:05 2010 (r207634) @@ -114,6 +114,10 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#ifndef NFS_DEFAULT_NEGNAMETIMEO +#define NFS_DEFAULT_NEGNAMETIMEO 60 +#endif + #endif #endif Modified: stable/7/sys/nfsclient/nfsnode.h ============================================================================== --- stable/7/sys/nfsclient/nfsnode.h Tue May 4 21:16:01 2010 (r207633) +++ stable/7/sys/nfsclient/nfsnode.h Tue May 4 21:21:05 2010 (r207634) @@ -110,6 +110,7 @@ struct nfsnode { struct timespec n_mtime; /* Prev modify time. */ time_t n_ctime; /* Prev create time. */ time_t n_dmtime; /* Prev dir modify time. */ + int n_dmtime_ticks; /* Tick of -ve cache entry */ time_t n_expiry; /* Lease expiry time */ nfsfh_t *n_fhp; /* NFS File Handle */ struct vnode *n_vnode; /* associated vnode */ From owner-svn-src-stable@FreeBSD.ORG Tue May 4 21:56:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 671BD1065672; Tue, 4 May 2010 21:56:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 566558FC08; Tue, 4 May 2010 21:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o44LuGc4049832; Tue, 4 May 2010 21:56:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o44LuGq5049829; Tue, 4 May 2010 21:56:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005042156.o44LuGq5049829@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 4 May 2010 21:56: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: r207636 - stable/7/usr.bin/stat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2010 21:56:16 -0000 Author: jilles Date: Tue May 4 21:56:16 2010 New Revision: 207636 URL: http://svn.freebsd.org/changeset/base/207636 Log: MFC r207153: stat: Allow -f %Sf to display the file flags symbolically. PR: 124349 Modified: stable/7/usr.bin/stat/stat.1 stable/7/usr.bin/stat/stat.c Directory Properties: stable/7/usr.bin/stat/ (props changed) Modified: stable/7/usr.bin/stat/stat.1 ============================================================================== --- stable/7/usr.bin/stat/stat.1 Tue May 4 21:23:59 2010 (r207635) +++ stable/7/usr.bin/stat/stat.1 Tue May 4 21:56:16 2010 (r207636) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2007 +.Dd April 24, 2010 .Dt STAT 1 .Os .Sh NAME @@ -239,6 +239,11 @@ Display date in format. .It Cm dr Display actual device name. +.It Cm f +Display the flags of +.Ar file +as in +.Nm ls Fl lTdo . .It Cm gu Display group or user name. .It Cm p Modified: stable/7/usr.bin/stat/stat.c ============================================================================== --- stable/7/usr.bin/stat/stat.c Tue May 4 21:23:59 2010 (r207635) +++ stable/7/usr.bin/stat/stat.c Tue May 4 21:56:16 2010 (r207636) @@ -187,6 +187,9 @@ int format1(const struct stat *, /* stat char *, size_t, /* a place to put the output */ int, int, int, int, /* the parsed format */ int, int); +#if HAVE_STRUCT_STAT_ST_FLAGS +char *xfflagstostr(unsigned long); +#endif char *timefmt; int linkfail; @@ -329,6 +332,25 @@ main(int argc, char *argv[]) return (am_readlink ? linkfail : errs); } +#if HAVE_STRUCT_STAT_ST_FLAGS +/* + * fflagstostr() wrapper that leaks only once + */ +char * +xfflagstostr(unsigned long fflags) +{ + static char *str = NULL; + + if (str != NULL) + free(str); + + str = fflagstostr(fflags); + if (str == NULL) + err(1, "fflagstostr"); + return (str); +} +#endif /* HAVE_STRUCT_STAT_ST_FLAGS */ + void usage(const char *synopsis) { @@ -721,8 +743,11 @@ format1(const struct stat *st, case SHOW_st_flags: small = (sizeof(st->st_flags) == 4); data = st->st_flags; - sdata = NULL; - formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX; + sdata = xfflagstostr(st->st_flags); + if (*sdata == '\0') + sdata = "-"; + formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX | + FMTF_STRING; if (ofmt == 0) ofmt = FMTF_UNSIGNED; break; From owner-svn-src-stable@FreeBSD.ORG Wed May 5 00:38:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68D00106567A; Wed, 5 May 2010 00:38:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 57D9E8FC0A; Wed, 5 May 2010 00:38:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o450cKEI089723; Wed, 5 May 2010 00:38:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450cK27089721; Wed, 5 May 2010 00:38:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050038.o450cK27089721@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207640 - stable/8/share/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 00:38:20 -0000 Author: delphij Date: Wed May 5 00:38:20 2010 New Revision: 207640 URL: http://svn.freebsd.org/changeset/base/207640 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/8/share/mk/bsd.cpu.mk Directory Properties: stable/8/share/mk/ (props changed) Modified: stable/8/share/mk/bsd.cpu.mk ============================================================================== --- stable/8/share/mk/bsd.cpu.mk Tue May 4 23:55:08 2010 (r207639) +++ stable/8/share/mk/bsd.cpu.mk Wed May 5 00:38:20 2010 (r207640) @@ -9,7 +9,7 @@ _CPUCFLAGS = . if ${MACHINE_ARCH} == "i386" MACHINE_CPU = i486 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "powerpc" From owner-svn-src-stable@FreeBSD.ORG Wed May 5 00:39:06 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D529D1065673; Wed, 5 May 2010 00:39:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C428D8FC17; Wed, 5 May 2010 00:39:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o450d6LO089940; Wed, 5 May 2010 00:39:06 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450d63N089938; Wed, 5 May 2010 00:39:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050039.o450d63N089938@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:39: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: r207641 - stable/7/share/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 00:39:06 -0000 Author: delphij Date: Wed May 5 00:39:06 2010 New Revision: 207641 URL: http://svn.freebsd.org/changeset/base/207641 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/7/share/mk/bsd.cpu.mk Directory Properties: stable/7/share/mk/ (props changed) Modified: stable/7/share/mk/bsd.cpu.mk ============================================================================== --- stable/7/share/mk/bsd.cpu.mk Wed May 5 00:38:20 2010 (r207640) +++ stable/7/share/mk/bsd.cpu.mk Wed May 5 00:39:06 2010 (r207641) @@ -9,7 +9,7 @@ _CPUCFLAGS = . if ${MACHINE_ARCH} == "i386" MACHINE_CPU = i486 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "sparc64" From owner-svn-src-stable@FreeBSD.ORG Wed May 5 00:39:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B3741065675; Wed, 5 May 2010 00:39:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3268FC15; Wed, 5 May 2010 00:39:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o450doZN090127; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o450doVB090125; Wed, 5 May 2010 00:39:50 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005050039.o450doVB090125@svn.freebsd.org> From: Xin LI Date: Wed, 5 May 2010 00:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207642 - stable/6/share/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 00:39:50 -0000 Author: delphij Date: Wed May 5 00:39:50 2010 New Revision: 207642 URL: http://svn.freebsd.org/changeset/base/207642 Log: MFC r206973: When CPUTYPE is defined to any value, on amd64 platform "mmx" is available through MACHINE_CPU, indicating the CPU supports that feature, as done by revision 138685. This changeset adds "mmx" into the default amd64 MACHINE_CPU list when no CPUTYPE is specified to provide consistent behavior. PR: amd64/145593 Submitted by: mm Modified: stable/6/share/mk/bsd.cpu.mk Directory Properties: stable/6/share/mk/ (props changed) Modified: stable/6/share/mk/bsd.cpu.mk ============================================================================== --- stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:06 2010 (r207641) +++ stable/6/share/mk/bsd.cpu.mk Wed May 5 00:39:50 2010 (r207642) @@ -12,7 +12,7 @@ MACHINE_CPU = i486 _CPUCFLAGS = -mcpu=ev4 -mtune=ev5 MACHINE_CPU = ev4 . elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse +MACHINE_CPU = amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "ia64" MACHINE_CPU = itanium . elif ${MACHINE_ARCH} == "sparc64" From owner-svn-src-stable@FreeBSD.ORG Wed May 5 05:11:12 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E8092106566C; Wed, 5 May 2010 05:11:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D6C338FC15; Wed, 5 May 2010 05:11:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o455BCsb050268; Wed, 5 May 2010 05:11:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o455BCFd050266; Wed, 5 May 2010 05:11:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005050511.o455BCFd050266@svn.freebsd.org> From: Alexander Motin Date: Wed, 5 May 2010 05:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207646 - stable/8/sys/cam X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 05:11:13 -0000 Author: mav Date: Wed May 5 05:11:12 2010 New Revision: 207646 URL: http://svn.freebsd.org/changeset/base/207646 Log: MFC r207490: Add xpt_schedule_dev_sendq() call, lost at r203108. It is not needed in usual operation, but required in some conditions to make queue running after being shrinked. Modified: stable/8/sys/cam/cam_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Wed May 5 04:37:45 2010 (r207645) +++ stable/8/sys/cam/cam_xpt.c Wed May 5 05:11:12 2010 (r207646) @@ -4809,6 +4809,8 @@ camisr_runqueue(void *V_queue) if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 && (--dev->tag_delay_count == 0)) xpt_start_tags(ccb_h->path); + if (!device_is_send_queued(dev)) + xpt_schedule_dev_sendq(ccb_h->path->bus, dev); } if (ccb_h->status & CAM_RELEASE_SIMQ) { From owner-svn-src-stable@FreeBSD.ORG Wed May 5 05:18:09 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 110B6106564A; Wed, 5 May 2010 05:18:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F3E5C8FC16; Wed, 5 May 2010 05:18:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o455I8M2051803; Wed, 5 May 2010 05:18:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o455I8XL051801; Wed, 5 May 2010 05:18:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005050518.o455I8XL051801@svn.freebsd.org> From: Alexander Motin Date: Wed, 5 May 2010 05:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207647 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 05:18:09 -0000 Author: mav Date: Wed May 5 05:18:08 2010 New Revision: 207647 URL: http://svn.freebsd.org/changeset/base/207647 Log: MFC r207282: Update device identify data and serial number when device change detected. Reprobe immediately following this should have fresh data. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:11:12 2010 (r207646) +++ stable/8/sys/cam/ata/ata_xpt.c Wed May 5 05:18:08 2010 (r207647) @@ -768,6 +768,7 @@ noerror: { struct ccb_pathinq cpi; int16_t *ptr; + int changed = 1; ident_buf = &softc->ident_data; for (ptr = (int16_t *)ident_buf; @@ -809,9 +810,12 @@ noerror: sizeof(ident_buf->serial))) { /* Device changed. */ xpt_async(AC_LOST_DEVICE, path, NULL); - } else + } else { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); - } else { + changed = 0; + } + } + if (changed) { bcopy(&softc->ident_data, ident_buf, sizeof(struct ata_params)); /* Clean up from previous instance of this device */ if (path->device->serial_num != NULL) { From owner-svn-src-stable@FreeBSD.ORG Wed May 5 09:01:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52092106564A; Wed, 5 May 2010 09:01:16 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 403308FC15; Wed, 5 May 2010 09:01:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4591G8t001191; Wed, 5 May 2010 09:01:16 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4591Ghe001189; Wed, 5 May 2010 09:01:16 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <201005050901.o4591Ghe001189@svn.freebsd.org> From: Dmitry Morozovsky Date: Wed, 5 May 2010 09:01: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: r207653 - stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 09:01:16 -0000 Author: marck (doc committer) Date: Wed May 5 09:01:15 2010 New Revision: 207653 URL: http://svn.freebsd.org/changeset/base/207653 Log: MFC r207068: Allow to modify directory's content even if the ZFS_NOUNLINK (SF_NOUNLINK, sunlnk) flag is set. We only deny dirctory's removal or rename. PR: kern/143343 Approved by: pjd Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed May 5 08:58:58 2010 (r207652) +++ stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Wed May 5 09:01:15 2010 (r207653) @@ -2227,11 +2227,24 @@ zfs_zaccess_common(znode_t *zp, uint32_t return (EPERM); } +#ifdef sun if ((v4_mode & (ACE_DELETE | ACE_DELETE_CHILD)) && (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { *check_privs = B_FALSE; return (EPERM); } +#else + /* + * In FreeBSD we allow to modify directory's content is ZFS_NOUNLINK + * (sunlnk) is set. We just don't allow directory removal, which is + * handled in zfs_zaccess_delete(). + */ + if ((v4_mode & ACE_DELETE) && + (zp->z_phys->zp_flags & ZFS_NOUNLINK)) { + *check_privs = B_FALSE; + return (EPERM); + } +#endif if (((v4_mode & (ACE_READ_DATA|ACE_EXECUTE)) && (zp->z_phys->zp_flags & ZFS_AV_QUARANTINED))) { From owner-svn-src-stable@FreeBSD.ORG Wed May 5 09:29:34 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68601106566C; Wed, 5 May 2010 09:29:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 576518FC12; Wed, 5 May 2010 09:29:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o459TY6R007364; Wed, 5 May 2010 09:29:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o459TYHo007362; Wed, 5 May 2010 09:29:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005050929.o459TYHo007362@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 5 May 2010 09:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207654 - stable/8/lib/libc/stdlib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 09:29:34 -0000 Author: kib Date: Wed May 5 09:29:34 2010 New Revision: 207654 URL: http://svn.freebsd.org/changeset/base/207654 Log: MFC r207009: C language does not has references, it provides pointers. Modified: stable/8/lib/libc/stdlib/realpath.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/stdlib/realpath.3 ============================================================================== --- stable/8/lib/libc/stdlib/realpath.3 Wed May 5 09:01:15 2010 (r207653) +++ stable/8/lib/libc/stdlib/realpath.3 Wed May 5 09:29:34 2010 (r207654) @@ -56,13 +56,13 @@ and in .Fa pathname , and copies the resulting absolute pathname into -the memory referenced by +the memory pointed to by .Fa resolved_path . The .Fa resolved_path argument .Em must -refer to a buffer capable of storing at least +point to a buffer capable of storing at least .Dv PATH_MAX characters, or be .Dv NULL . From owner-svn-src-stable@FreeBSD.ORG Wed May 5 12:37:07 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9CD51065673; Wed, 5 May 2010 12:37:07 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B824A8FC1C; Wed, 5 May 2010 12:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45Cb7Rq050360; Wed, 5 May 2010 12:37:07 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45Cb7sI050355; Wed, 5 May 2010 12:37:07 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051237.o45Cb7sI050355@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207655 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 12:37:07 -0000 Author: gavin Date: Wed May 5 12:37:07 2010 New Revision: 207655 URL: http://svn.freebsd.org/changeset/base/207655 Log: Merge r203684 from head (mainly to make future merges easier for people): Update .Dt on these man pages: the kernel modules and corresponding man pages are installed on more platforms than just i386. Modified: stable/8/share/man/man4/io.4 stable/8/share/man/man4/linux.4 stable/8/share/man/man4/ndis.4 stable/8/share/man/man4/nvram.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/io.4 ============================================================================== --- stable/8/share/man/man4/io.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/io.4 Wed May 5 12:37:07 2010 (r207655) @@ -27,8 +27,8 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2004 -.Dt IO 4 i386 +.Dd February 8, 2010 +.Dt IO 4 .Os .Sh NAME .Nm io Modified: stable/8/share/man/man4/linux.4 ============================================================================== --- stable/8/share/man/man4/linux.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/linux.4 Wed May 5 12:37:07 2010 (r207655) @@ -24,8 +24,8 @@ .\" .\" $FreeBSD$ .\" -.Dd March 17, 2008 -.Dt LINUX 4 i386 +.Dd February 8, 2010 +.Dt LINUX 4 .Os .Sh NAME .Nm linux Modified: stable/8/share/man/man4/ndis.4 ============================================================================== --- stable/8/share/man/man4/ndis.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/ndis.4 Wed May 5 12:37:07 2010 (r207655) @@ -30,8 +30,8 @@ .\" .\" $FreeBSD$ .\" -.Dd October 13, 2006 -.Dt NDIS 4 i386 +.Dd February 8, 2010 +.Dt NDIS 4 .Os .Sh NAME .Nm ndis Modified: stable/8/share/man/man4/nvram.4 ============================================================================== --- stable/8/share/man/man4/nvram.4 Wed May 5 09:29:34 2010 (r207654) +++ stable/8/share/man/man4/nvram.4 Wed May 5 12:37:07 2010 (r207655) @@ -26,8 +26,8 @@ .\" .\" $FreeBSD$ .\" -.Dd January 27, 2010 -.Dt NVRAM 4 i386 +.Dd February 8, 2010 +.Dt NVRAM 4 .Os .Sh NAME .Nm nvram From owner-svn-src-stable@FreeBSD.ORG Wed May 5 12:38:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C81A106566B; Wed, 5 May 2010 12:38:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1C28FC1F; Wed, 5 May 2010 12:38:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45CcMAM050666; Wed, 5 May 2010 12:38:22 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45CcMud050664; Wed, 5 May 2010 12:38:22 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051238.o45CcMud050664@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207656 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 12:38:23 -0000 Author: gavin Date: Wed May 5 12:38:22 2010 New Revision: 207656 URL: http://svn.freebsd.org/changeset/base/207656 Log: Merge r205155 from head: Add extra Xrefs PR: docs/114184 Submitted by: Julian Stacey Modified: stable/8/share/man/man4/ndis.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ndis.4 ============================================================================== --- stable/8/share/man/man4/ndis.4 Wed May 5 12:37:07 2010 (r207655) +++ stable/8/share/man/man4/ndis.4 Wed May 5 12:38:22 2010 (r207656) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd March 14, 2010 .Dt NDIS 4 .Os .Sh NAME @@ -133,8 +133,10 @@ before a timeout expired. .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 , +.Xr ndis_events 8 , .Xr ndiscvt 8 , -.Xr ndisgen 8 +.Xr ndisgen 8 , +.Xr wpa_supplicant 8 .Rs .%T "NDIS 5.1 specification" .%O http://www.microsoft.com From owner-svn-src-stable@FreeBSD.ORG Wed May 5 12:39:44 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBD01106566C; Wed, 5 May 2010 12:39:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CAA9A8FC1C; Wed, 5 May 2010 12:39:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45CdiOn051006; Wed, 5 May 2010 12:39:44 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45CdiJd051004; Wed, 5 May 2010 12:39:44 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051239.o45CdiJd051004@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207657 - stable/8/usr.bin/biff X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 12:39:45 -0000 Author: gavin Date: Wed May 5 12:39:44 2010 New Revision: 207657 URL: http://svn.freebsd.org/changeset/base/207657 Log: Merge r205386 from head: Fix command example, presumed leftovers of old markup. Modified: stable/8/usr.bin/biff/biff.1 Directory Properties: stable/8/usr.bin/biff/ (props changed) Modified: stable/8/usr.bin/biff/biff.1 ============================================================================== --- stable/8/usr.bin/biff/biff.1 Wed May 5 12:38:22 2010 (r207656) +++ stable/8/usr.bin/biff/biff.1 Wed May 5 12:39:44 2010 (r207657) @@ -32,7 +32,7 @@ .\" @(#)biff.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 9, 2002 +.Dd March 20, 2010 .Dt BIFF 1 .Os .Sh NAME @@ -67,7 +67,7 @@ Enable bell notification. When header notification is enabled, the header and first few lines of the message will be printed on your terminal whenever mail arrives. A -.Dq "Li biff y" +.Dq "biff y" command is often included in the file .Pa .login or From owner-svn-src-stable@FreeBSD.ORG Wed May 5 12:48:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A755106566B; Wed, 5 May 2010 12:48:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 38E798FC1C; Wed, 5 May 2010 12:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45CmVQd052981; Wed, 5 May 2010 12:48:31 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45CmVUV052978; Wed, 5 May 2010 12:48:31 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051248.o45CmVUV052978@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 12: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: r207658 - stable/7/sbin/sysctl X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 12:48:31 -0000 Author: gavin Date: Wed May 5 12:48:30 2010 New Revision: 207658 URL: http://svn.freebsd.org/changeset/base/207658 Log: Merge r203310,203547,203717 from head: Implement the "-i" option to sysctl(8), to ignore failures while retrieving individual OIDs. This allows the same list of OIDs to be passed to sysctl(8) across different systems where particular OIDs may not exist, and still get as much information as possible from them. PR: bin/123644 Submitted by: dhw Modified: stable/7/sbin/sysctl/sysctl.8 stable/7/sbin/sysctl/sysctl.c Directory Properties: stable/7/sbin/sysctl/ (props changed) Modified: stable/7/sbin/sysctl/sysctl.8 ============================================================================== --- stable/7/sbin/sysctl/sysctl.8 Wed May 5 12:39:44 2010 (r207657) +++ stable/7/sbin/sysctl/sysctl.8 Wed May 5 12:48:30 2010 (r207658) @@ -28,7 +28,7 @@ .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 28, 2007 +.Dd February 6, 2010 .Dt SYSCTL 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm -.Op Fl bdehNnoqx +.Op Fl bdehiNnoqx .Ar name Ns Op = Ns Ar value .Ar ... .Nm @@ -82,6 +82,12 @@ or is specified, or a variable is being set. .It Fl h Format output for human, rather than machine, readability. +.It Fl i +Ignore unknown OIDs. +The purpose is to make use of +.Nm +for collecting data from a variety of machines (not all of which +are necessarily running exactly the same software) easier. .It Fl N Show only variable names, not their values. This is particularly useful with shells that offer programmable Modified: stable/7/sbin/sysctl/sysctl.c ============================================================================== --- stable/7/sbin/sysctl/sysctl.c Wed May 5 12:39:44 2010 (r207657) +++ stable/7/sbin/sysctl/sysctl.c Wed May 5 12:48:30 2010 (r207658) @@ -58,8 +58,8 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, Nflag, nflag, oflag; -static int qflag, xflag; +static int aflag, bflag, dflag, eflag, hflag, iflag, +static int Nflag, nflag, oflag, qflag, xflag; static int oidfmt(int *, int, char *, u_int *); static void parse(char *); @@ -75,7 +75,7 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", - "usage: sysctl [-bdehNnoqx] name[=value] ...", + "usage: sysctl [-bdehiNnoqx] name[=value] ...", " sysctl [-bdehNnoqx] -a"); exit(1); } @@ -89,7 +89,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabdehNnoqwxX")) != -1) { + while ((ch = getopt(argc, argv, "AabdehiNnoqwxX")) != -1) { switch (ch) { case 'A': /* compatibility */ @@ -110,6 +110,9 @@ main(int argc, char **argv) case 'h': hflag = 1; break; + case 'i': + iflag = 1; + break; case 'N': Nflag = 1; break; @@ -185,6 +188,8 @@ parse(char *string) len = name2oid(bufp, mib); if (len < 0) { + if (iflag) + return; if (qflag) exit(1); else From owner-svn-src-stable@FreeBSD.ORG Wed May 5 16:25:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 930C0106566B; Wed, 5 May 2010 16:25:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 826AE8FC12; Wed, 5 May 2010 16:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45GPveH001008; Wed, 5 May 2010 16:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GPv3M001006; Wed, 5 May 2010 16:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051625.o45GPv3M001006@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207660 - in stable/8/release: . picobsd/floppy.tree/sbin X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 16:25:57 -0000 Author: kensmith Date: Wed May 5 16:25:57 2010 New Revision: 207660 URL: http://svn.freebsd.org/changeset/base/207660 Log: Merge r206422: > Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition > to FTP_PASSIVE_MODE so release building works for a machine that needs > to use a proxy. PR: misc/137688 Submitted by: Michael Leun Modified: stable/8/release/Makefile Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed May 5 16:05:51 2010 (r207659) +++ stable/8/release/Makefile Wed May 5 16:25:57 2010 (r207660) @@ -575,7 +575,7 @@ release rerelease: echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} - echo " env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} + echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} From owner-svn-src-stable@FreeBSD.ORG Wed May 5 16:41:15 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 286A5106567B; Wed, 5 May 2010 16:41:15 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 183D18FC14; Wed, 5 May 2010 16:41:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45GfEal004436; Wed, 5 May 2010 16:41:14 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GfEFo004434; Wed, 5 May 2010 16:41:14 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051641.o45GfEFo004434@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:41:14 +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: r207661 - stable/7/release X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 16:41:15 -0000 Author: kensmith Date: Wed May 5 16:41:14 2010 New Revision: 207661 URL: http://svn.freebsd.org/changeset/base/207661 Log: Merge r206422: > Pass the HTTP_PROXY and FTP_PROXY environment variables through in addition > to FTP_PASSIVE_MODE so release building works for a machine that needs > to use a proxy. PR: misc/137688 Submitted by: Michael Leun Modified: stable/7/release/Makefile Directory Properties: stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Wed May 5 16:25:57 2010 (r207660) +++ stable/7/release/Makefile Wed May 5 16:41:14 2010 (r207661) @@ -576,7 +576,7 @@ release rerelease: echo " for i in ${MAKEINDEXPORTS}" >> ${_MK} echo " do" >> ${_MK} echo " cd /usr/ports/\$${i}" >> ${_MK} - echo " env -i FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} + echo " env -i HTTP_PROXY=$${HTTP_PROXY} FTP_PROXY=$${FTP_PROXY} FTP_PASSIVE_MODE=$${FTP_PASSIVE_MODE:-no} PATH=$${PATH} \\" >> ${_MK} echo " make all install clean BATCH=yes FORCE_PKG_REGISTER=yes" >> ${_MK} echo " done" >> ${_MK} echo " cd /usr/ports" >> ${_MK} From owner-svn-src-stable@FreeBSD.ORG Wed May 5 16:58:30 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53B90106564A; Wed, 5 May 2010 16:58:30 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 431028FC0C; Wed, 5 May 2010 16:58:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45GwUI3008480; Wed, 5 May 2010 16:58:30 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45GwUIm008477; Wed, 5 May 2010 16:58:30 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051658.o45GwUIm008477@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 16:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207665 - in stable/8/release: . picobsd/floppy.tree/sbin X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 16:58:30 -0000 Author: kensmith Date: Wed May 5 16:58:29 2010 New Revision: 207665 URL: http://svn.freebsd.org/changeset/base/207665 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/8/release/Makefile stable/8/release/Makefile.inc.docports Directory Properties: stable/8/release/ (props changed) stable/8/release/picobsd/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/ (props changed) stable/8/release/picobsd/floppy.tree/sbin/dhclient-script (props changed) stable/8/release/picobsd/qemu/ (props changed) Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Wed May 5 16:57:02 2010 (r207664) +++ stable/8/release/Makefile Wed May 5 16:58:29 2010 (r207665) @@ -171,7 +171,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 DOCPORTS= textproc/docproj # Set this to wherever the distfiles required by release procedures. .if defined(DOCDISTFILES) Modified: stable/8/release/Makefile.inc.docports ============================================================================== --- stable/8/release/Makefile.inc.docports Wed May 5 16:57:02 2010 (r207664) +++ stable/8/release/Makefile.inc.docports Wed May 5 16:58:29 2010 (r207665) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-stable@FreeBSD.ORG Wed May 5 17:01:04 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02C94106564A; Wed, 5 May 2010 17:01:04 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6DBD8FC14; Wed, 5 May 2010 17:01:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45H13Eb009111; Wed, 5 May 2010 17:01:03 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45H13sU009108; Wed, 5 May 2010 17:01:03 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051701.o45H13sU009108@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 17:01:03 +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: r207666 - stable/7/release X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 17:01:04 -0000 Author: kensmith Date: Wed May 5 17:01:03 2010 New Revision: 207666 URL: http://svn.freebsd.org/changeset/base/207666 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/7/release/Makefile stable/7/release/Makefile.inc.docports Directory Properties: stable/7/release/ (props changed) stable/7/release/doc/ (props changed) stable/7/release/doc/en_US.ISO8859-1/hardware/ (props changed) Modified: stable/7/release/Makefile ============================================================================== --- stable/7/release/Makefile Wed May 5 16:58:29 2010 (r207665) +++ stable/7/release/Makefile Wed May 5 17:01:03 2010 (r207666) @@ -169,7 +169,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is Modified: stable/7/release/Makefile.inc.docports ============================================================================== --- stable/7/release/Makefile.inc.docports Wed May 5 16:58:29 2010 (r207665) +++ stable/7/release/Makefile.inc.docports Wed May 5 17:01:03 2010 (r207666) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-stable@FreeBSD.ORG Wed May 5 17:13:54 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 80FD71065673; Wed, 5 May 2010 17:13:54 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 706BD8FC14; Wed, 5 May 2010 17:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45HDs6d011959; Wed, 5 May 2010 17:13:54 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45HDrP7011958; Wed, 5 May 2010 17:13:53 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201005051713.o45HDrP7011958@svn.freebsd.org> From: Ken Smith Date: Wed, 5 May 2010 17:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207667 - in stable/6/release: . scripts X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 17:13:54 -0000 Author: kensmith Date: Wed May 5 17:13:53 2010 New Revision: 207667 URL: http://svn.freebsd.org/changeset/base/207667 Log: Merge r206423: > Shift the version of perl used by the release build process over to > perl-5.10. This aligns the release build process with the current > default version of perl in the ports tree. Modified: stable/6/release/Makefile stable/6/release/Makefile.inc.docports Directory Properties: stable/6/release/ (props changed) stable/6/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/6/release/scripts/src-install.sh (props changed) Modified: stable/6/release/Makefile ============================================================================== --- stable/6/release/Makefile Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile Wed May 5 17:13:53 2010 (r207667) @@ -140,7 +140,7 @@ NOPORTSATALL= YES # # Doing 'make index' in /usr/ports requires Perl. -MAKEINDEXPORTS= lang/perl5.8 +MAKEINDEXPORTS= lang/perl5.10 # By default, documentation (Handbook, FAQ, etc.) is built for all # the languages. To speed up building, set the DOC_LANG to just # the languages you need. (The language for the release notes is Modified: stable/6/release/Makefile.inc.docports ============================================================================== --- stable/6/release/Makefile.inc.docports Wed May 5 17:01:03 2010 (r207666) +++ stable/6/release/Makefile.inc.docports Wed May 5 17:13:53 2010 (r207667) @@ -81,5 +81,5 @@ MINIMALDOCPORTS+= \ ports/textproc/p5-PodParser .else MINIMALDOCPORTS+= \ - ports/lang/perl5.8 + ports/lang/perl5.10 .endif From owner-svn-src-stable@FreeBSD.ORG Wed May 5 17:17:19 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1EDC1065679; Wed, 5 May 2010 17:17:19 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B0F228FC25; Wed, 5 May 2010 17:17:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45HHJWM012751; Wed, 5 May 2010 17:17:19 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45HHJlr012749; Wed, 5 May 2010 17:17:19 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005051717.o45HHJlr012749@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 17:17: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: r207668 - stable/7/usr.sbin/arlcontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 17:17:19 -0000 Author: gavin Date: Wed May 5 17:17:19 2010 New Revision: 207668 URL: http://svn.freebsd.org/changeset/base/207668 Log: Spell "Hz" correctly in arlcontrol. Direct commit to stable/7 as this code no longer exists in head. PR: bin/142566 Submitted by: N.J. Mann Modified: stable/7/usr.sbin/arlcontrol/arlcontrol.c Modified: stable/7/usr.sbin/arlcontrol/arlcontrol.c ============================================================================== --- stable/7/usr.sbin/arlcontrol/arlcontrol.c Wed May 5 17:13:53 2010 (r207667) +++ stable/7/usr.sbin/arlcontrol/arlcontrol.c Wed May 5 17:17:19 2010 (r207668) @@ -148,21 +148,21 @@ static struct ch_list { int max_freq; } CHSET[] = { { 0, 0, 0, 0, 0, 0 }, - { 1, "900 Mhz", "Canada, U.S.A., Mexico", 0, freq_list_1, MAXFREQ(freq_list_1) }, + { 1, "900 MHz", "Canada, U.S.A., Mexico", 0, freq_list_1, MAXFREQ(freq_list_1) }, { 2, 0, 0, 0, 0, 0 }, { 3, 0, 0, 0, 0, 0 }, { 4, 0, 0, 0, 0, 0 }, { 5, 0, 0, 0, 0, 0 }, - { 6, "900 Mhz", "Australia", 0, freq_list_6, MAXFREQ(freq_list_6) }, + { 6, "900 MHz", "Australia", 0, freq_list_6, MAXFREQ(freq_list_6) }, { 7, 0, 0, 0, 0, 0 }, { 8, 0, 0, 0, 0, 0 }, - { 9, "2400 Mhz", "North America", rate_list_2400, freq_list_9, MAXFREQ(freq_list_9) }, - { 10, "2400 Mhz", "E.T.S.I", rate_list_2400, freq_list_10, MAXFREQ(freq_list_10) }, - { 11, "2400 Mhz", "Japan", rate_list_2400, freq_list_11, MAXFREQ(freq_list_11) }, - { 12, "2400 Mhz", "France", rate_list_2400, freq_list_12, MAXFREQ(freq_list_12) }, - { 13, "2400 Mhz", "Australia", rate_list_2400, freq_list_13, MAXFREQ(freq_list_13) }, - { 14, "2400 Mhz", "Germany", rate_list_2400, freq_list_14, MAXFREQ(freq_list_14) }, - { 15, "2400 Mhz", "U.K.(MPT1349),Spain", rate_list_2400, freq_list_15, MAXFREQ(freq_list_15) } + { 9, "2400 MHz", "North America", rate_list_2400, freq_list_9, MAXFREQ(freq_list_9) }, + { 10, "2400 MHz", "E.T.S.I", rate_list_2400, freq_list_10, MAXFREQ(freq_list_10) }, + { 11, "2400 MHz", "Japan", rate_list_2400, freq_list_11, MAXFREQ(freq_list_11) }, + { 12, "2400 MHz", "France", rate_list_2400, freq_list_12, MAXFREQ(freq_list_12) }, + { 13, "2400 MHz", "Australia", rate_list_2400, freq_list_13, MAXFREQ(freq_list_13) }, + { 14, "2400 MHz", "Germany", rate_list_2400, freq_list_14, MAXFREQ(freq_list_14) }, + { 15, "2400 MHz", "U.K.(MPT1349),Spain", rate_list_2400, freq_list_15, MAXFREQ(freq_list_15) } }; char* registrationMode[] = { @@ -221,7 +221,7 @@ print_al(struct arl_cfg_param *arl_io) arl_io->channelSet, CHSET[arl_io->channelSet].fr, CHSET[arl_io->channelSet].country); - printf("\tfrequency %s Mhz, bitrate %s kb/s, priority %s, receive mode %d\n", + printf("\tfrequency %s MHz, bitrate %s kb/s, priority %s, receive mode %d\n", (CHSET[arl_io->channelSet].freq && CHSET[arl_io->channelSet].max_freq > arl_io->channelNumber) ? CHSET[arl_io->channelSet].freq[arl_io->channelNumber].name : From owner-svn-src-stable@FreeBSD.ORG Wed May 5 20:54:17 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 168421065678; Wed, 5 May 2010 20:54:17 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0596F8FC25; Wed, 5 May 2010 20:54:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45KsG75061198; Wed, 5 May 2010 20:54:16 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45KsGbO061196; Wed, 5 May 2010 20:54:16 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005052054.o45KsGbO061196@svn.freebsd.org> From: Gavin Atkinson Date: Wed, 5 May 2010 20:54: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: r207675 - stable/7/sbin/sysctl X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 20:54:17 -0000 Author: gavin Date: Wed May 5 20:54:16 2010 New Revision: 207675 URL: http://svn.freebsd.org/changeset/base/207675 Log: Fix merge botch. Submitted by: Sofian Brabez Pointy hat: Earned and deserved. Modified: stable/7/sbin/sysctl/sysctl.c Modified: stable/7/sbin/sysctl/sysctl.c ============================================================================== --- stable/7/sbin/sysctl/sysctl.c Wed May 5 20:43:40 2010 (r207674) +++ stable/7/sbin/sysctl/sysctl.c Wed May 5 20:54:16 2010 (r207675) @@ -58,7 +58,7 @@ static const char rcsid[] = #include #include -static int aflag, bflag, dflag, eflag, hflag, iflag, +static int aflag, bflag, dflag, eflag, hflag, iflag; static int Nflag, nflag, oflag, qflag, xflag; static int oidfmt(int *, int, char *, u_int *); From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:00:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E19A3106564A; Wed, 5 May 2010 22:00:57 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D01378FC16; Wed, 5 May 2010 22:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45M0v8Y076178; Wed, 5 May 2010 22:00:57 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45M0vD8076176; Wed, 5 May 2010 22:00:57 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052200.o45M0vD8076176@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207679 - stable/8/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:00:58 -0000 Author: jilles Date: Wed May 5 22:00:57 2010 New Revision: 207679 URL: http://svn.freebsd.org/changeset/base/207679 Log: MFC r207186: sysctl(3): Update description of various kern.* variables. Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 Modified: stable/8/lib/libc/gen/sysctl.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/sysctl.3 ============================================================================== --- stable/8/lib/libc/gen/sysctl.3 Wed May 5 21:48:40 2010 (r207678) +++ stable/8/lib/libc/gen/sysctl.3 Wed May 5 22:00:57 2010 (r207679) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 28, 2009 +.Dd April 25, 2010 .Dt SYSCTL 3 .Os .Sh NAME @@ -326,7 +326,7 @@ information. .It "KERN_BOOTFILE string yes" .It "KERN_BOOTTIME struct timeval no" .It "KERN_CLOCKRATE struct clockinfo no" -.It "KERN_FILE struct file no" +.It "KERN_FILE struct xfile no" .It "KERN_HOSTID integer yes" .It "KERN_HOSTUUID string yes" .It "KERN_HOSTNAME string yes" @@ -343,14 +343,14 @@ information. .It "KERN_OSREV integer no" .It "KERN_OSTYPE string no" .It "KERN_POSIX1 integer no" -.It "KERN_PROC struct proc no" +.It "KERN_PROC node not applicable" .It "KERN_PROF node not applicable" .It "KERN_QUANTUM integer yes" .It "KERN_SAVED_IDS integer no" .It "KERN_SECURELVL integer raise only" .It "KERN_UPDATEINTERVAL integer no" .It "KERN_VERSION string no" -.It "KERN_VNODE struct vnode no" +.It "KERN_VNODE struct xvnode no" .El .Pp .Bl -tag -width 6n @@ -372,10 +372,8 @@ This structure contains the clock, stati frequencies, the number of micro-seconds per hz tick and the skew rate. .It Li KERN_FILE Return the entire file table. -The returned data consists of a single -.Va struct filehead -followed by an array of -.Va struct file , +The returned data consists of an array of +.Va struct xfile , whose size depends on the current number of such objects in the system. .It Li KERN_HOSTID Get or set the host ID. @@ -527,10 +525,8 @@ Note, the vnode table is not necessarily the system. The returned data consists of an array whose size depends on the current number of such objects in the system. -Each element of the array contains the kernel address of a vnode -.Va struct vnode * -followed by the vnode itself -.Va struct vnode . +Each element of the array consists of a +.Va struct xvnode . .El .Ss CTL_NET The string and integer information available for the CTL_NET level @@ -859,6 +855,8 @@ An attempt is made to set a read-only va A process without appropriate privilege attempts to set a value. .El .Sh SEE ALSO +.Xr confstr 3 , +.Xr kvm 3 , .Xr sysconf 3 , .Xr sysctl 8 .Sh HISTORY From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:07:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F18411065674; Wed, 5 May 2010 22:07:28 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E000B8FC1A; Wed, 5 May 2010 22:07:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45M7Sa5077730; Wed, 5 May 2010 22:07:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45M7Seg077728; Wed, 5 May 2010 22:07:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052207.o45M7Seg077728@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:07: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: r207681 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:07:29 -0000 Author: jilles Date: Wed May 5 22:07:28 2010 New Revision: 207681 URL: http://svn.freebsd.org/changeset/base/207681 Log: MFC r207186: sysctl(3): Update description of various kern.* variables. Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 Modified: stable/7/lib/libc/gen/sysctl.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/sysctl.3 ============================================================================== --- stable/7/lib/libc/gen/sysctl.3 Wed May 5 22:06:05 2010 (r207680) +++ stable/7/lib/libc/gen/sysctl.3 Wed May 5 22:07:28 2010 (r207681) @@ -28,7 +28,7 @@ .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd April 10, 2007 +.Dd April 25, 2010 .Dt SYSCTL 3 .Os .Sh NAME @@ -323,7 +323,7 @@ information. .It "KERN_BOOTFILE string yes" .It "KERN_BOOTTIME struct timeval no" .It "KERN_CLOCKRATE struct clockinfo no" -.It "KERN_FILE struct file no" +.It "KERN_FILE struct xfile no" .It "KERN_HOSTID integer yes" .It "KERN_HOSTUUID string yes" .It "KERN_HOSTNAME string yes" @@ -340,14 +340,14 @@ information. .It "KERN_OSREV integer no" .It "KERN_OSTYPE string no" .It "KERN_POSIX1 integer no" -.It "KERN_PROC struct proc no" +.It "KERN_PROC node not applicable" .It "KERN_PROF node not applicable" .It "KERN_QUANTUM integer yes" .It "KERN_SAVED_IDS integer no" .It "KERN_SECURELVL integer raise only" .It "KERN_UPDATEINTERVAL integer no" .It "KERN_VERSION string no" -.It "KERN_VNODE struct vnode no" +.It "KERN_VNODE struct xvnode no" .El .Pp .Bl -tag -width 6n @@ -369,10 +369,8 @@ This structure contains the clock, stati frequencies, the number of micro-seconds per hz tick and the skew rate. .It Li KERN_FILE Return the entire file table. -The returned data consists of a single -.Va struct filehead -followed by an array of -.Va struct file , +The returned data consists of an array of +.Va struct xfile , whose size depends on the current number of such objects in the system. .It Li KERN_HOSTID Get or set the host ID. @@ -526,10 +524,8 @@ Note, the vnode table is not necessarily the system. The returned data consists of an array whose size depends on the current number of such objects in the system. -Each element of the array contains the kernel address of a vnode -.Va struct vnode * -followed by the vnode itself -.Va struct vnode . +Each element of the array consists of a +.Va struct xvnode . .El .Ss CTL_MACHDEP The set of variables defined is architecture dependent. @@ -869,6 +865,8 @@ An attempt is made to set a read-only va A process without appropriate privilege attempts to set a value. .El .Sh SEE ALSO +.Xr confstr 3 , +.Xr kvm 3 , .Xr sysconf 3 , .Xr sysctl 8 .Sh HISTORY From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:12:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE817106564A; Wed, 5 May 2010 22:12:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD83E8FC12; Wed, 5 May 2010 22:12:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45MCuED078969; Wed, 5 May 2010 22:12:56 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MCurp078967; Wed, 5 May 2010 22:12:56 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052212.o45MCurp078967@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207682 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:12:57 -0000 Author: jilles Date: Wed May 5 22:12:56 2010 New Revision: 207682 URL: http://svn.freebsd.org/changeset/base/207682 Log: MFC r207190: unlinkat(2): unlinkat(AT_REMOVEDIR) fails with ENOTEMPTY like rmdir() for non-empty directories. POSIX permits both ENOTEMPTY and EEXIST, but we use the clearer ENOTEMPTY, following BSD tradition. Modified: stable/8/lib/libc/sys/unlink.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/unlink.2 ============================================================================== --- stable/8/lib/libc/sys/unlink.2 Wed May 5 22:07:28 2010 (r207681) +++ stable/8/lib/libc/sys/unlink.2 Wed May 5 22:12:56 2010 (r207682) @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd April 25, 2010 .Dt UNLINK 2 .Os .Sh NAME @@ -165,7 +165,7 @@ argument does not specify an absolute pa argument is neither .Dv AT_FDCWD nor a valid file descriptor open for searching. -.It Bq Er EEXIST +.It Bq Er ENOTEMPTY The .Fa flag parameter has the From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:17:18 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4FA7B106564A; Wed, 5 May 2010 22:17:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3DEEF8FC08; Wed, 5 May 2010 22:17:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45MHHgW080007; Wed, 5 May 2010 22:17:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MHHsT080005; Wed, 5 May 2010 22:17:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052217.o45MHHsT080005@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207684 - stable/8/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:17:18 -0000 Author: jilles Date: Wed May 5 22:17:17 2010 New Revision: 207684 URL: http://svn.freebsd.org/changeset/base/207684 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/8/lib/libc/gen/getcwd.3 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/gen/getcwd.3 ============================================================================== --- stable/8/lib/libc/gen/getcwd.3 Wed May 5 22:15:20 2010 (r207683) +++ stable/8/lib/libc/gen/getcwd.3 Wed May 5 22:17:17 2010 (r207684) @@ -28,7 +28,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -108,8 +108,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -124,6 +122,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:19:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 002A9106566C; Wed, 5 May 2010 22:19:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E2C068FC17; Wed, 5 May 2010 22:19:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45MJqhY080669; Wed, 5 May 2010 22:19:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MJqqX080667; Wed, 5 May 2010 22:19:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052219.o45MJqqX080667@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:19:52 +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: r207685 - stable/7/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:19:53 -0000 Author: jilles Date: Wed May 5 22:19:52 2010 New Revision: 207685 URL: http://svn.freebsd.org/changeset/base/207685 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/7/lib/libc/gen/getcwd.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/getcwd.3 ============================================================================== --- stable/7/lib/libc/gen/getcwd.3 Wed May 5 22:17:17 2010 (r207684) +++ stable/7/lib/libc/gen/getcwd.3 Wed May 5 22:19:52 2010 (r207685) @@ -28,7 +28,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -108,8 +108,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -124,6 +122,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-stable@FreeBSD.ORG Wed May 5 22:23:29 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5F010106567B; Wed, 5 May 2010 22:23:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC2D8FC20; Wed, 5 May 2010 22:23:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o45MNTSi081526; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o45MNTAv081524; Wed, 5 May 2010 22:23:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005052223.o45MNTAv081524@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 5 May 2010 22:23:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207686 - stable/6/lib/libc/gen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2010 22:23:29 -0000 Author: jilles Date: Wed May 5 22:23:29 2010 New Revision: 207686 URL: http://svn.freebsd.org/changeset/base/207686 Log: MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked. POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Modified: stable/6/lib/libc/gen/getcwd.3 Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/gen/getcwd.3 ============================================================================== --- stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:19:52 2010 (r207685) +++ stable/6/lib/libc/gen/getcwd.3 Wed May 5 22:23:29 2010 (r207686) @@ -32,7 +32,7 @@ .\" @(#)getcwd.3 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 24, 1997 +.Dd April 17, 2010 .Dt GETCWD 3 .Os .Sh NAME @@ -112,8 +112,6 @@ The function will fail if: .Bl -tag -width Er -.It Bq Er EACCES -Read or search permission was denied for a component of the pathname. .It Bq Er EINVAL The .Fa size @@ -128,6 +126,16 @@ The argument is greater than zero but smaller than the length of the pathname plus 1. .El +.Pp +The +.Fn getcwd +function +may fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Read or search permission was denied for a component of the pathname. +This is only checked in limited cases, depending on implementation details. +.El .Sh SEE ALSO .Xr chdir 2 , .Xr fchdir 2 , From owner-svn-src-stable@FreeBSD.ORG Thu May 6 00:49:10 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF8DD106566C; Thu, 6 May 2010 00:49:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CE5B98FC0A; Thu, 6 May 2010 00:49:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o460nAIp013802; Thu, 6 May 2010 00:49:10 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o460nAIJ013800; Thu, 6 May 2010 00:49:10 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005060049.o460nAIJ013800@svn.freebsd.org> From: Rick Macklem Date: Thu, 6 May 2010 00:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207690 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 00:49:11 -0000 Author: rmacklem Date: Thu May 6 00:49:10 2010 New Revision: 207690 URL: http://svn.freebsd.org/changeset/base/207690 Log: MFC: r207349 Delete a diagnostic statement that is no longer useful from the experimental NFS client. Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu May 6 00:24:08 2010 (r207689) +++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c Thu May 6 00:49:10 2010 (r207690) @@ -1406,10 +1406,6 @@ nfsrpc_write(vnode_t vp, struct uio *uio else error = nfsrpc_writerpc(vp, uiop, iomode, verfp, newcred, &stateid, p, nap, attrflagp, stuff); -if (error == NFSERR_BADSTATEID) { -printf("st=0x%x 0x%x 0x%x\n",stateid.other[0],stateid.other[1],stateid.other[2]); -nfscl_dumpstate(nmp, 1, 1, 0, 0); -} if (error == NFSERR_STALESTATEID) nfscl_initiate_recovery(nmp->nm_clp); if (lckp != NULL) From owner-svn-src-stable@FreeBSD.ORG Thu May 6 01:08:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E921C1065676; Thu, 6 May 2010 01:08:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D81D88FC13; Thu, 6 May 2010 01:08:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4618aYX018962; Thu, 6 May 2010 01:08:36 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4618aB6018960; Thu, 6 May 2010 01:08:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201005060108.o4618aB6018960@svn.freebsd.org> From: Rick Macklem Date: Thu, 6 May 2010 01:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207691 - stable/8/sys/fs/nfsclient X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 01:08:37 -0000 Author: rmacklem Date: Thu May 6 01:08:36 2010 New Revision: 207691 URL: http://svn.freebsd.org/changeset/base/207691 Log: MFC: r207350 For the experimental NFS client, it should always flush dirty buffers before closing the NFSv4 opens, as the comment states. This patch deletes the call to nfscl_mustflush() which would return 0 for the case where a delegation still exists, which was incorrect and could cause crashes during recovery from an expired lease. Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- stable/8/sys/fs/nfsclient/nfs_clnode.c Thu May 6 00:49:10 2010 (r207690) +++ stable/8/sys/fs/nfsclient/nfs_clnode.c Thu May 6 01:08:36 2010 (r207691) @@ -198,8 +198,7 @@ ncl_inactive(struct vop_inactive_args *a * must be flushed before the close, so that the stateid is * available for the writes. */ - if (nfscl_mustflush(vp)) - (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); + (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); (void) nfsrpc_close(vp, 1, ap->a_td); } From owner-svn-src-stable@FreeBSD.ORG Thu May 6 04:57:11 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A57C41065675; Thu, 6 May 2010 04:57:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 938408FC17; Thu, 6 May 2010 04:57:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o464vBWt069315; Thu, 6 May 2010 04:57:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o464vBBC069314; Thu, 6 May 2010 04:57:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005060457.o464vBBC069314@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 6 May 2010 04:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207693 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 04:57:11 -0000 Author: kib Date: Thu May 6 04:57:10 2010 New Revision: 207693 URL: http://svn.freebsd.org/changeset/base/207693 Log: MFC r207570: Style and comment adjustements. Modified: stable/8/sys/amd64/amd64/exception.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Thu May 6 04:23:52 2010 (r207692) +++ stable/8/sys/amd64/amd64/exception.S Thu May 6 04:57:10 2010 (r207693) @@ -50,14 +50,14 @@ .bss .globl dtrace_invop_jump_addr .align 8 - .type dtrace_invop_jump_addr, @object - .size dtrace_invop_jump_addr, 8 + .type dtrace_invop_jump_addr,@object + .size dtrace_invop_jump_addr,8 dtrace_invop_jump_addr: .zero 8 .globl dtrace_invop_calltrap_addr .align 8 - .type dtrace_invop_calltrap_addr, @object - .size dtrace_invop_calltrap_addr, 8 + .type dtrace_invop_calltrap_addr,@object + .size dtrace_invop_calltrap_addr,8 dtrace_invop_calltrap_addr: .zero 8 #endif @@ -157,7 +157,6 @@ IDTVEC(align) * kernel from userland. Reenable interrupts if they were enabled * before the trap. This approximates SDT_SYS386TGT on the i386 port. */ - SUPERALIGN_TEXT .globl alltraps .type alltraps,@function @@ -211,16 +210,16 @@ alltraps_pushregs_no_rdi: * Set our jump address for the jump back in the event that * the breakpoint wasn't caused by DTrace at all. */ - movq $calltrap, dtrace_invop_calltrap_addr(%rip) + movq $calltrap,dtrace_invop_calltrap_addr(%rip) /* Jump to the code hooked in by DTrace. */ - movq dtrace_invop_jump_addr, %rax + movq dtrace_invop_jump_addr,%rax jmpq *dtrace_invop_jump_addr #endif .globl calltrap .type calltrap,@function calltrap: - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT jmp doreti /* Handle any pending ASTs */ @@ -274,9 +273,11 @@ IDTVEC(dblfault) testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ swapgs -1: movq %rsp, %rdi +1: + movq %rsp,%rdi call dblfault_handler -2: hlt +2: + hlt jmp 2b IDTVEC(page) @@ -369,7 +370,7 @@ IDTVEC(fast_syscall) movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax andq $~PCB_FULLCTX,PCB_FLAGS(%rax) @@ -456,7 +457,7 @@ nmi_fromuserspace: /* Note: this label is also used by ddb and gdb: */ nmi_calltrap: FAKE_MCOUNT(TF_RIP(%rsp)) - movq %rsp, %rdi + movq %rsp,%rdi call trap MEXITCOUNT #ifdef HWPMC_HOOKS @@ -555,9 +556,9 @@ nmi_restoreregs: iretq ENTRY(fork_trampoline) - movq %r12, %rdi /* function */ - movq %rbx, %rsi /* arg1 */ - movq %rsp, %rdx /* trapframe pointer */ + movq %r12,%rdi /* function */ + movq %rbx,%rsi /* arg1 */ + movq %rsp,%rdx /* trapframe pointer */ call fork_exit MEXITCOUNT jmp doreti /* Handle any ASTs */ @@ -628,7 +629,7 @@ doreti_ast: testl $TDF_ASTPENDING | TDF_NEEDRESCHED,TD_FLAGS(%rax) je doreti_exit sti - movq %rsp, %rdi /* pass a pointer to the trapframe */ + movq %rsp,%rdi /* pass a pointer to the trapframe */ call ast jmp doreti_ast @@ -648,8 +649,8 @@ doreti_exit: * Do not reload segment registers for kernel. * Since we do not reload segments registers with sane * values on kernel entry, descriptors referenced by - * segments registers may be not valid. This is fatal - * for the usermode, but is innocent for the kernel. + * segments registers might be not valid. This is fatal + * for user mode, but is not a problem for the kernel. */ testb $SEL_RPL_MASK,TF_CS(%rsp) jz ld_regs @@ -662,14 +663,16 @@ do_segs: /* Restore %fs and fsbase */ movw TF_FS(%rsp),%ax .globl ld_fs -ld_fs: movw %ax,%fs +ld_fs: + movw %ax,%fs cmpw $KUF32SEL,%ax jne 1f movl $MSR_FSBASE,%ecx movl PCB_FSBASE(%r8),%eax movl PCB_FSBASE+4(%r8),%edx .globl ld_fsbase -ld_fsbase: wrmsr +ld_fsbase: + wrmsr 1: /* Restore %gs and gsbase */ movw TF_GS(%rsp),%si @@ -678,7 +681,8 @@ ld_fsbase: wrmsr movl $MSR_GSBASE,%ecx rdmsr .globl ld_gs -ld_gs: movw %si,%gs +ld_gs: + movw %si,%gs wrmsr popfq cmpw $KUG32SEL,%si @@ -687,12 +691,17 @@ ld_gs: movw %si,%gs movl PCB_GSBASE(%r8),%eax movl PCB_GSBASE+4(%r8),%edx .globl ld_gsbase -ld_gsbase: wrmsr -1: .globl ld_es -ld_es: movw TF_ES(%rsp),%es +ld_gsbase: + wrmsr +1: + .globl ld_es +ld_es: + movw TF_ES(%rsp),%es .globl ld_ds -ld_ds: movw TF_DS(%rsp),%ds -ld_regs:movq TF_RDI(%rsp),%rdi +ld_ds: + movw TF_DS(%rsp),%ds +ld_regs: + movq TF_RDI(%rsp),%rdi movq TF_RSI(%rsp),%rsi movq TF_RDX(%rsp),%rdx movq TF_RCX(%rsp),%rcx @@ -711,7 +720,8 @@ ld_regs:movq TF_RDI(%rsp),%rdi jz 1f /* keep running with kernel GS.base */ cli swapgs -1: addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ +1: + addq $TF_RIP,%rsp /* skip over tf_err, tf_trapno */ .globl doreti_iret doreti_iret: iretq @@ -738,7 +748,8 @@ doreti_iret_fault: testl $PSL_I,TF_RFLAGS(%rsp) jz 1f sti -1: movw %fs,TF_FS(%rsp) +1: + movw %fs,TF_FS(%rsp) movw %gs,TF_GS(%rsp) movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) @@ -768,7 +779,7 @@ doreti_iret_fault: .globl ds_load_fault ds_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_DS(%rsp) jmp doreti @@ -777,7 +788,7 @@ ds_load_fault: .globl es_load_fault es_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUDSEL,TF_ES(%rsp) jmp doreti @@ -786,7 +797,7 @@ es_load_fault: .globl fs_load_fault fs_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUF32SEL,TF_FS(%rsp) jmp doreti @@ -796,7 +807,7 @@ fs_load_fault: gs_load_fault: popfq movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movw $KUG32SEL,TF_GS(%rsp) jmp doreti @@ -805,7 +816,7 @@ gs_load_fault: .globl fsbase_load_fault fsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 @@ -816,7 +827,7 @@ fsbase_load_fault: .globl gsbase_load_fault gsbase_load_fault: movl $T_PROTFLT,TF_TRAPNO(%rsp) - movq %rsp, %rdi + movq %rsp,%rdi call trap movq PCPU(CURTHREAD),%r8 movq TD_PCB(%r8),%r8 From owner-svn-src-stable@FreeBSD.ORG Thu May 6 06:44:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 07C8B1065672; Thu, 6 May 2010 06:44:20 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E8ACA8FC18; Thu, 6 May 2010 06:44:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o466iJEm092677; Thu, 6 May 2010 06:44:19 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o466iJxI092654; Thu, 6 May 2010 06:44:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201005060644.o466iJxI092654@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 6 May 2010 06:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207695 - in stable/8/sys: contrib/ipfilter/netinet net netinet netinet6 netipsec X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 06:44:20 -0000 Author: bz Date: Thu May 6 06:44:19 2010 New Revision: 207695 URL: http://svn.freebsd.org/changeset/base/207695 Log: MFC r207369: MFP4: @176978-176982, 176984, 176990-176994, 177441 "Whitspace" churn after the VIMAGE/VNET whirls. Remove the need for some "init" functions within the network stack, like pim6_init(), icmp_init() or significantly shorten others like ip6_init() and nd6_init(), using static initialization again where possible and formerly missed. Move (most) variables back to the place they used to be before the container structs and VIMAGE_GLOABLS (before r185088) and try to reduce the diff to stable/7 and earlier as good as possible, to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9. This also removes some header file pollution for putatively static global variables. Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are no longer needed. Reviewed by: jhb Discussed with: rwatson Sponsored by: The FreeBSD Foundation Sponsored by: CK Software GmbH Modified: stable/8/sys/contrib/ipfilter/netinet/ip_auth.c stable/8/sys/net/if.c stable/8/sys/net/if_gif.c stable/8/sys/net/if_gif.h stable/8/sys/net/route.c stable/8/sys/netinet/icmp6.h stable/8/sys/netinet/if_ether.c stable/8/sys/netinet/in.c stable/8/sys/netinet/in_gif.c stable/8/sys/netinet/in_proto.c stable/8/sys/netinet/in_rmx.c stable/8/sys/netinet/ip_icmp.c stable/8/sys/netinet/ip_icmp.h stable/8/sys/netinet/ip_input.c stable/8/sys/netinet/ip_var.h stable/8/sys/netinet/tcp_hostcache.c stable/8/sys/netinet/tcp_input.c stable/8/sys/netinet/tcp_output.c stable/8/sys/netinet/tcp_reass.c stable/8/sys/netinet/tcp_sack.c stable/8/sys/netinet/tcp_subr.c stable/8/sys/netinet/tcp_syncache.c stable/8/sys/netinet/tcp_timewait.c stable/8/sys/netinet/tcp_var.h stable/8/sys/netinet/udp_usrreq.c stable/8/sys/netinet/udp_var.h stable/8/sys/netinet6/frag6.c stable/8/sys/netinet6/icmp6.c stable/8/sys/netinet6/in6_gif.c stable/8/sys/netinet6/in6_ifattach.c stable/8/sys/netinet6/in6_proto.c stable/8/sys/netinet6/in6_rmx.c stable/8/sys/netinet6/in6_src.c stable/8/sys/netinet6/in6_var.h stable/8/sys/netinet6/ip6_input.c stable/8/sys/netinet6/ip6_mroute.c stable/8/sys/netinet6/ip6_var.h stable/8/sys/netinet6/nd6.c stable/8/sys/netinet6/nd6.h stable/8/sys/netinet6/nd6_nbr.c stable/8/sys/netinet6/nd6_rtr.c stable/8/sys/netinet6/raw_ip6.c stable/8/sys/netinet6/scope6.c stable/8/sys/netipsec/ah_var.h stable/8/sys/netipsec/esp_var.h stable/8/sys/netipsec/ipcomp_var.h stable/8/sys/netipsec/ipip_var.h stable/8/sys/netipsec/ipsec.c stable/8/sys/netipsec/ipsec.h stable/8/sys/netipsec/ipsec6.h stable/8/sys/netipsec/key.c stable/8/sys/netipsec/xform_esp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/contrib/ipfilter/netinet/ip_auth.c ============================================================================== --- stable/8/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/contrib/ipfilter/netinet/ip_auth.c Thu May 6 06:44:19 2010 (r207695) @@ -70,11 +70,6 @@ struct file; #include #include #include -#if !defined(_KERNEL) && defined(__FreeBSD_version) && \ - __FreeBSD_version >= 800049 -# define V_ip_do_randomid ip_do_randomid -# define V_ip_id ip_id -#endif #if !defined(_KERNEL) && !defined(__osf__) && !defined(__sgi) # define KERNEL # define _KERNEL Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if.c Thu May 6 06:44:19 2010 (r207695) @@ -167,9 +167,11 @@ static void if_detach_internal(struct if extern void nd6_setmtu(struct ifnet *); #endif +VNET_DEFINE(int, if_index); +int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ VNET_DEFINE(struct ifgrouphead, ifg_head); -VNET_DEFINE(int, if_index); + static VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. */ @@ -178,8 +180,6 @@ static VNET_DEFINE(struct ifindex_entry #define V_if_indexlim VNET(if_indexlim) #define V_ifindex_table VNET(ifindex_table) -int ifqmaxlen = IFQ_MAXLEN; - /* * The global network interface list (V_ifnet) and related state (such as * if_index, if_indexlim, and ifindex_table) are protected by an sxlock and Modified: stable/8/sys/net/if_gif.c ============================================================================== --- stable/8/sys/net/if_gif.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if_gif.c Thu May 6 06:44:19 2010 (r207695) @@ -94,20 +94,9 @@ */ static struct mtx gif_mtx; static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); - static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); - #define V_gif_softc_list VNET(gif_softc_list) -#ifdef INET -VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; -#define V_ip_gif_ttl VNET(ip_gif_ttl) -#endif -#ifdef INET6 -VNET_DEFINE(int, ip6_gif_hlim) = GIF_HLIM; -#define V_ip6_gif_hlim VNET(ip6_gif_hlim) -#endif - void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); void (*ng_gif_input_orphan_p)(struct ifnet *ifp, struct mbuf *m, int af); void (*ng_gif_attach_p)(struct ifnet *ifp); @@ -135,19 +124,11 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTL */ #define MAX_GIF_NEST 1 #endif - static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; #define V_max_gif_nesting VNET(max_gif_nesting) - SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); -#ifdef INET6 -SYSCTL_DECL(_net_inet6_ip6); -SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_GIF_HLIM, gifhlim, CTLFLAG_RW, - &VNET_NAME(ip6_gif_hlim), 0, ""); -#endif - /* * By default, we disallow creation of multiple tunnels between the same * pair of addresses. Some applications require this functionality so @@ -159,7 +140,6 @@ static VNET_DEFINE(int, parallel_tunnels static VNET_DEFINE(int, parallel_tunnels) = 0; #endif #define V_parallel_tunnels VNET(parallel_tunnels) - SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW, &VNET_NAME(parallel_tunnels), 0, "Allow parallel tunnels?"); Modified: stable/8/sys/net/if_gif.h ============================================================================== --- stable/8/sys/net/if_gif.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/if_gif.h Thu May 6 06:44:19 2010 (r207695) @@ -118,10 +118,6 @@ int gif_ioctl(struct ifnet *, u_long, ca int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); void gif_delete_tunnel(struct ifnet *); int gif_encapcheck(const struct mbuf *, int, int, void *); - -VNET_DECLARE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET(ip_gif_ttl) - #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/net/route.c Thu May 6 06:44:19 2010 (r207695) @@ -88,15 +88,14 @@ SYSCTL_INT(_net, OID_AUTO, add_addr_allf &rt_add_addr_allfibs, 0, ""); TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs); -VNET_DEFINE(struct radix_node_head *, rt_tables); -static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ -VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ VNET_DEFINE(struct rtstat, rtstat); +#define V_rtstat VNET(rtstat) +VNET_DEFINE(struct radix_node_head *, rt_tables); #define V_rt_tables VNET(rt_tables) -#define V_rtzone VNET(rtzone) + +VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ #define V_rttrash VNET(rttrash) -#define V_rtstat VNET(rtstat) /* compare two sockaddr structures */ @@ -114,6 +113,9 @@ VNET_DEFINE(struct rtstat, rtstat); */ #define RNTORT(p) ((struct rtentry *)(p)) +static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ +#define V_rtzone VNET(rtzone) + #if 0 /* default fib for tunnels to use */ u_int tunnel_fib = 0; Modified: stable/8/sys/netinet/icmp6.h ============================================================================== --- stable/8/sys/netinet/icmp6.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/icmp6.h Thu May 6 06:44:19 2010 (r207695) @@ -652,7 +652,6 @@ struct rtentry; struct rttimer; struct in6_multi; # endif -void icmp6_init(void); void icmp6_paramerror(struct mbuf *, int); void icmp6_error(struct mbuf *, int, int, int); void icmp6_error2(struct mbuf *, int, int, int, struct ifnet *); Modified: stable/8/sys/netinet/if_ether.c ============================================================================== --- stable/8/sys/netinet/if_ether.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/if_ether.c Thu May 6 06:44:19 2010 (r207695) @@ -82,16 +82,15 @@ SYSCTL_DECL(_net_link_ether); SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); -VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for - * local traffic */ - /* timer values */ static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ +static VNET_DEFINE(int, arp_maxtries) = 5; +VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for + * local traffic */ +static VNET_DEFINE(int, arp_proxyall) = 0; static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ -static VNET_DEFINE(int, arp_maxtries) = 5; -static VNET_DEFINE(int, arp_proxyall); static VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ #define V_arpt_keep VNET(arpt_keep) @@ -103,7 +102,6 @@ static VNET_DEFINE(struct arpstat, arpst SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, &VNET_NAME(arpt_keep), 0, "ARP entry lifetime in seconds"); - SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxtries, CTLFLAG_RW, &VNET_NAME(arp_maxtries), 0, "ARP resolution attempts before returning error"); Modified: stable/8/sys/netinet/in.c ============================================================================== --- stable/8/sys/netinet/in.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in.c Thu May 6 06:44:19 2010 (r207695) @@ -77,20 +77,19 @@ static int in_ifinit(struct ifnet *, static void in_purgemaddrs(struct ifnet *); static VNET_DEFINE(int, subnetsarelocal); -static VNET_DEFINE(int, sameprefixcarponly); -VNET_DECLARE(struct inpcbinfo, ripcbinfo); - #define V_subnetsarelocal VNET(subnetsarelocal) -#define V_sameprefixcarponly VNET(sameprefixcarponly) -#define V_ripcbinfo VNET(ripcbinfo) - SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, "Treat all subnets as directly connected"); +static VNET_DEFINE(int, sameprefixcarponly); +#define V_sameprefixcarponly VNET(sameprefixcarponly) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, &VNET_NAME(sameprefixcarponly), 0, "Refuse to create same prefixes on different interfaces"); +VNET_DECLARE(struct inpcbinfo, ripcbinfo); +#define V_ripcbinfo VNET(ripcbinfo) + /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). If subnetsarelocal Modified: stable/8/sys/netinet/in_gif.c ============================================================================== --- stable/8/sys/netinet/in_gif.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_gif.c Thu May 6 06:44:19 2010 (r207695) @@ -85,6 +85,8 @@ struct protosw in_gif_protosw = { .pr_usrreqs = &rip_usrreqs }; +VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +#define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, ""); Modified: stable/8/sys/netinet/in_proto.c ============================================================================== --- stable/8/sys/netinet/in_proto.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_proto.c Thu May 6 06:44:19 2010 (r207695) @@ -208,7 +208,6 @@ struct protosw inetsw[] = { .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, .pr_input = icmp_input, .pr_ctloutput = rip_ctloutput, - .pr_init = icmp_init, .pr_usrreqs = &rip_usrreqs }, { Modified: stable/8/sys/netinet/in_rmx.c ============================================================================== --- stable/8/sys/netinet/in_rmx.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/in_rmx.c Thu May 6 06:44:19 2010 (r207695) @@ -131,22 +131,22 @@ in_matroute(void *v_arg, struct radix_no return rn; } -static VNET_DEFINE(int, rtq_reallyold); -static VNET_DEFINE(int, rtq_minreallyold); -static VNET_DEFINE(int, rtq_toomany); - +static VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */ #define V_rtq_reallyold VNET(rtq_reallyold) -#define V_rtq_minreallyold VNET(rtq_minreallyold) -#define V_rtq_toomany VNET(rtq_toomany) - SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, "Default expiration time on dynamically learned routes"); +/* never automatically crank down to less */ +static VNET_DEFINE(int, rtq_minreallyold) = 10; +#define V_rtq_minreallyold VNET(rtq_minreallyold) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &VNET_NAME(rtq_minreallyold), 0, "Minimum time to attempt to hold onto dynamically learned routes"); +/* 128 cached routes is "too many" */ +static VNET_DEFINE(int, rtq_toomany) = 128; +#define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &VNET_NAME(rtq_toomany), 0, "Upper limit on dynamically learned routes"); @@ -239,7 +239,7 @@ in_rtqkill(struct radix_node *rn, void * } #define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout); +static VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT; static VNET_DEFINE(struct callout, rtq_timer); #define V_rtq_timeout VNET(rtq_timeout) @@ -362,11 +362,6 @@ in_inithead(void **head, int off) if (off == 0) /* XXX MRT see above */ return 1; /* only do the rest for a real routing table */ - V_rtq_reallyold = 60*60; /* one hour is "really old" */ - V_rtq_minreallyold = 10; /* never automatically crank down to less */ - V_rtq_toomany = 128; /* 128 cached routes is "too many" */ - V_rtq_timeout = RTQ_TIMEOUT; - rnh = *head; rnh->rnh_addaddr = in_addroute; rnh->rnh_matchaddr = in_matroute; Modified: stable/8/sys/netinet/ip_icmp.c ============================================================================== --- stable/8/sys/netinet/ip_icmp.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_icmp.c Thu May 6 06:44:19 2010 (r207695) @@ -75,65 +75,60 @@ __FBSDID("$FreeBSD$"); * routines to turnaround packets back to the originator, and * host table maintenance routines. */ - VNET_DEFINE(struct icmpstat, icmpstat); -static VNET_DEFINE(int, icmpmaskrepl); -static VNET_DEFINE(u_int, icmpmaskfake); -static VNET_DEFINE(int, drop_redirect); -static VNET_DEFINE(int, log_redirect); -static VNET_DEFINE(int, icmplim); -static VNET_DEFINE(int, icmplim_output); -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); -static VNET_DEFINE(int, icmp_rfi); -static VNET_DEFINE(int, icmp_quotelen); -static VNET_DEFINE(int, icmpbmcastecho); - -#define V_icmpmaskrepl VNET(icmpmaskrepl) -#define V_icmpmaskfake VNET(icmpmaskfake) -#define V_drop_redirect VNET(drop_redirect) -#define V_log_redirect VNET(log_redirect) -#define V_icmplim VNET(icmplim) -#define V_icmplim_output VNET(icmplim_output) -#define V_reply_src VNET(reply_src) -#define V_icmp_rfi VNET(icmp_rfi) -#define V_icmp_quotelen VNET(icmp_quotelen) -#define V_icmpbmcastecho VNET(icmpbmcastecho) - SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); +static VNET_DEFINE(int, icmpmaskrepl) = 0; +#define V_icmpmaskrepl VNET(icmpmaskrepl) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW, &VNET_NAME(icmpmaskrepl), 0, "Reply to ICMP Address Mask Request packets."); +static VNET_DEFINE(u_int, icmpmaskfake) = 0; +#define V_icmpmaskfake VNET(icmpmaskfake) SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW, &VNET_NAME(icmpmaskfake), 0, "Fake reply to ICMP Address Mask Request packets."); +static VNET_DEFINE(int, drop_redirect) = 0; +#define V_drop_redirect VNET(drop_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW, &VNET_NAME(drop_redirect), 0, "Ignore ICMP redirects"); +static VNET_DEFINE(int, log_redirect) = 0; +#define V_log_redirect VNET(log_redirect) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW, &VNET_NAME(log_redirect), 0, "Log ICMP redirects to the console"); +static VNET_DEFINE(int, icmplim) = 200; +#define V_icmplim VNET(icmplim) SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW, &VNET_NAME(icmplim), 0, "Maximum number of ICMP responses per second"); +static VNET_DEFINE(int, icmplim_output) = 1; +#define V_icmplim_output VNET(icmplim_output) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, &VNET_NAME(icmplim_output), 0, "Enable rate limiting of ICMP responses"); +static VNET_DEFINE(char, reply_src[IFNAMSIZ]); +#define V_reply_src VNET(reply_src) SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW, &VNET_NAME(reply_src), IFNAMSIZ, "icmp reply source for non-local packets."); +static VNET_DEFINE(int, icmp_rfi) = 0; +#define V_icmp_rfi VNET(icmp_rfi) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); +static VNET_DEFINE(int, icmp_quotelen) = 8; +#define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, "Number of bytes from original packet to quote in ICMP reply"); @@ -141,7 +136,8 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO /* * ICMP broadcast echo sysctl */ - +static VNET_DEFINE(int, icmpbmcastecho) = 0; +#define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, ""); @@ -156,21 +152,6 @@ static void icmp_send(struct mbuf *, str extern struct protosw inetsw[]; -void -icmp_init(void) -{ - - V_icmpmaskrepl = 0; - V_icmpmaskfake = 0; - V_drop_redirect = 0; - V_log_redirect = 0; - V_icmplim = 200; - V_icmplim_output = 1; - V_icmp_rfi = 0; - V_icmp_quotelen = 8; - V_icmpbmcastecho = 0; -} - /* * Kernel module interface for updating icmpstat. The argument is an index * into icmpstat treated as an array of u_long. While this encodes the Modified: stable/8/sys/netinet/ip_icmp.h ============================================================================== --- stable/8/sys/netinet/ip_icmp.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_icmp.h Thu May 6 06:44:19 2010 (r207695) @@ -208,7 +208,6 @@ struct icmp { #ifdef _KERNEL void icmp_error(struct mbuf *, int, int, uint32_t, int); void icmp_input(struct mbuf *, int); -void icmp_init(void); int ip_next_mtu(int, int); #endif Modified: stable/8/sys/netinet/ip_input.c ============================================================================== --- stable/8/sys/netinet/ip_input.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_input.c Thu May 6 06:44:19 2010 (r207695) @@ -89,66 +89,40 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct ip) == 20); #endif -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ -static VNET_DEFINE(int, ip_checkinterface); -static VNET_DEFINE(int, ip_keepfaith); -static VNET_DEFINE(int, ip_sendsourcequench); - -#define V_ipsendredirects VNET(ipsendredirects) -#define V_ip_checkinterface VNET(ip_checkinterface) -#define V_ip_keepfaith VNET(ip_keepfaith) -#define V_ip_sendsourcequench VNET(ip_sendsourcequench) - -VNET_DEFINE(int, ip_defttl) = IPDEFTTL; -VNET_DEFINE(int, ip_do_randomid); -VNET_DEFINE(int, ipforwarding); - -VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ -VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ -VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ -VNET_DEFINE(struct ipstat, ipstat); - -static VNET_DEFINE(int, ip_rsvp_on); -VNET_DEFINE(struct socket *, ip_rsvpd); -VNET_DEFINE(int, rsvp_on); - -#define V_ip_rsvp_on VNET(ip_rsvp_on) - -static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); -static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ -static VNET_DEFINE(int, maxfragsperpacket); -static VNET_DEFINE(int, nipq); /* Total # of reass queues */ - -#define V_ipq VNET(ipq) -#define V_maxnipq VNET(maxnipq) -#define V_maxfragsperpacket VNET(maxfragsperpacket) -#define V_nipq VNET(nipq) - -VNET_DEFINE(int, ipstealth); - struct rwlock in_ifaddr_lock; RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); +VNET_DEFINE(int, rsvp_on); + +VNET_DEFINE(int, ipforwarding); SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); +static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ +#define V_ipsendredirects VNET(ipsendredirects) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW, &VNET_NAME(ipsendredirects), 0, "Enable sending IP redirects"); +VNET_DEFINE(int, ip_defttl) = IPDEFTTL; SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW, &VNET_NAME(ip_defttl), 0, "Maximum TTL on IP packets"); +static VNET_DEFINE(int, ip_keepfaith); +#define V_ip_keepfaith VNET(ip_keepfaith) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW, &VNET_NAME(ip_keepfaith), 0, "Enable packet capture for FAITH IPv4->IPv6 translater daemon"); +static VNET_DEFINE(int, ip_sendsourcequench); +#define V_ip_sendsourcequench VNET(ip_sendsourcequench) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW, &VNET_NAME(ip_sendsourcequench), 0, "Enable the transmission of source quench packets"); +VNET_DEFINE(int, ip_do_randomid); SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_RW, &VNET_NAME(ip_do_randomid), 0, "Assign random ip_id values"); @@ -166,6 +140,8 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, * to the loopback interface instead of the interface where the * packets for those addresses are received. */ +static VNET_DEFINE(int, ip_checkinterface); +#define V_ip_checkinterface VNET(ip_checkinterface) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, &VNET_NAME(ip_checkinterface), 0, "Verify packet arrives on correct interface"); @@ -182,16 +158,22 @@ static struct netisr_handler ip_nh = { extern struct domain inetdomain; extern struct protosw inetsw[]; u_char ip_protox[IPPROTO_MAX]; +VNET_DEFINE(struct in_ifaddrhead, in_ifaddrhead); /* first inet address */ +VNET_DEFINE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); /* inet addr hash table */ +VNET_DEFINE(u_long, in_ifaddrhmask); /* mask for hash table */ +VNET_DEFINE(struct ipstat, ipstat); SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(ipstat), ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET(ipq_zone) - +static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static struct mtx ipqlock; +#define V_ipq_zone VNET(ipq_zone) +#define V_ipq VNET(ipq) + #define IPQ_LOCK() mtx_lock(&ipqlock) #define IPQ_UNLOCK() mtx_unlock(&ipqlock) #define IPQ_LOCK_INIT() mtx_init(&ipqlock, "ipqlock", NULL, MTX_DEF) @@ -201,10 +183,16 @@ static void maxnipq_update(void); static void ipq_zone_change(void *); static void ip_drain_locked(void); +static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ +static VNET_DEFINE(int, nipq); /* Total # of reass queues */ +#define V_maxnipq VNET(maxnipq) +#define V_nipq VNET(nipq) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD, &VNET_NAME(nipq), 0, "Current number of IPv4 fragment reassembly queue entries"); +static VNET_DEFINE(int, maxfragsperpacket); +#define V_maxfragsperpacket VNET(maxfragsperpacket) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW, &VNET_NAME(maxfragsperpacket), 0, "Maximum number of IPv4 fragments allowed per packet"); @@ -217,6 +205,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, m #endif #ifdef IPSTEALTH +VNET_DEFINE(int, ipstealth); SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW, &VNET_NAME(ipstealth), 0, "IP stealth mode, no TTL decrementation on forwarding"); @@ -1740,6 +1729,11 @@ makedummy: * locking. This code remains in ip_input.c as ip_mroute.c is optionally * compiled. */ +static VNET_DEFINE(int, ip_rsvp_on); +VNET_DEFINE(struct socket *, ip_rsvpd); + +#define V_ip_rsvp_on VNET(ip_rsvp_on) + int ip_rsvp_init(struct socket *so) { Modified: stable/8/sys/netinet/ip_var.h ============================================================================== --- stable/8/sys/netinet/ip_var.h Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/ip_var.h Thu May 6 06:44:19 2010 (r207695) @@ -181,9 +181,13 @@ VNET_DECLARE(int, ipforwarding); /* ip #ifdef IPSTEALTH VNET_DECLARE(int, ipstealth); /* stealth forwarding */ #endif -VNET_DECLARE(int, rsvp_on); +extern u_char ip_protox[]; VNET_DECLARE(struct socket *, ip_rsvpd); /* reservation protocol daemon*/ VNET_DECLARE(struct socket *, ip_mrouter); /* multicast routing daemon */ +extern int (*legal_vif_num)(int); +extern u_long (*ip_mcast_src)(int); +VNET_DECLARE(int, rsvp_on); +extern struct pr_usrreqs rip_usrreqs; #define V_ipstat VNET(ipstat) #define V_ip_id VNET(ip_id) @@ -192,14 +196,9 @@ VNET_DECLARE(struct socket *, ip_mrouter #ifdef IPSTEALTH #define V_ipstealth VNET(ipstealth) #endif -#define V_rsvp_on VNET(rsvp_on) #define V_ip_rsvpd VNET(ip_rsvpd) #define V_ip_mrouter VNET(ip_mrouter) - -extern u_char ip_protox[]; -extern int (*legal_vif_num)(int); -extern u_long (*ip_mcast_src)(int); -extern struct pr_usrreqs rip_usrreqs; +#define V_rsvp_on VNET(rsvp_on) void inp_freemoptions(struct ip_moptions *); int inp_getmoptions(struct inpcb *, struct sockopt *); Modified: stable/8/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/8/sys/netinet/tcp_hostcache.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_hostcache.c Thu May 6 06:44:19 2010 (r207695) @@ -107,9 +107,9 @@ __FBSDID("$FreeBSD$"); #define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */ static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); -static VNET_DEFINE(struct callout, tcp_hc_callout); - #define V_tcp_hostcache VNET(tcp_hostcache) + +static VNET_DEFINE(struct callout, tcp_hc_callout); #define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); Modified: stable/8/sys/netinet/tcp_input.c ============================================================================== --- stable/8/sys/netinet/tcp_input.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_input.c Thu May 6 06:44:19 2010 (r207695) @@ -99,20 +99,6 @@ __FBSDID("$FreeBSD$"); static const int tcprexmtthresh = 3; VNET_DEFINE(struct tcpstat, tcpstat); -VNET_DEFINE(int, blackhole); -VNET_DEFINE(int, tcp_delack_enabled); -VNET_DEFINE(int, drop_synfin); -VNET_DEFINE(int, tcp_do_rfc3042); -VNET_DEFINE(int, tcp_do_rfc3390); -VNET_DEFINE(int, tcp_do_ecn); -VNET_DEFINE(int, tcp_ecn_maxretries); -VNET_DEFINE(int, tcp_insecure_rst); -VNET_DEFINE(int, tcp_do_autorcvbuf); -VNET_DEFINE(int, tcp_autorcvbuf_inc); -VNET_DEFINE(int, tcp_autorcvbuf_max); -VNET_DEFINE(int, tcp_do_rfc3465); -VNET_DEFINE(int, tcp_abc_l_var); - SYSCTL_VNET_STRUCT(_net_inet_tcp, TCPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(tcpstat), tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)"); @@ -122,56 +108,79 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_ &tcp_log_in_vain, 0, "Log all incoming TCP segments to closed ports"); +VNET_DEFINE(int, blackhole) = 0; +#define V_blackhole VNET(blackhole) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW, &VNET_NAME(blackhole), 0, "Do not send RST on segments to closed ports"); +VNET_DEFINE(int, tcp_delack_enabled) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_RW, &VNET_NAME(tcp_delack_enabled), 0, "Delay ACK to try and piggyback it onto a data packet"); +VNET_DEFINE(int, drop_synfin) = 0; +#define V_drop_synfin VNET(drop_synfin) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW, &VNET_NAME(drop_synfin), 0, "Drop TCP packets with SYN+FIN set"); +VNET_DEFINE(int, tcp_do_rfc3042) = 1; +#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3042), 0, "Enable RFC 3042 (Limited Transmit)"); +VNET_DEFINE(int, tcp_do_rfc3390) = 1; +#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3390), 0, "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)"); +VNET_DEFINE(int, tcp_do_rfc3465) = 1; +#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc3465), 0, "Enable RFC 3465 (Appropriate Byte Counting)"); +VNET_DEFINE(int, tcp_abc_l_var) = 2; +#define V_tcp_abc_l_var VNET(tcp_abc_l_var) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, abc_l_var, CTLFLAG_RW, &VNET_NAME(tcp_abc_l_var), 2, "Cap the max cwnd increment during slow-start to this number of segments"); SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW, 0, "TCP ECN"); +VNET_DEFINE(int, tcp_do_ecn) = 0; SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_do_ecn), 0, "TCP ECN support"); +VNET_DEFINE(int, tcp_ecn_maxretries) = 1; SYSCTL_VNET_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, CTLFLAG_RW, &VNET_NAME(tcp_ecn_maxretries), 0, "Max retries before giving up on ECN"); +VNET_DEFINE(int, tcp_insecure_rst) = 0; +#define V_tcp_insecure_rst VNET(tcp_insecure_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, insecure_rst, CTLFLAG_RW, &VNET_NAME(tcp_insecure_rst), 0, "Follow the old (insecure) criteria for accepting RST packets"); +VNET_DEFINE(int, tcp_do_autorcvbuf) = 1; +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_auto, CTLFLAG_RW, &VNET_NAME(tcp_do_autorcvbuf), 0, "Enable automatic receive buffer sizing"); +VNET_DEFINE(int, tcp_autorcvbuf_inc) = 16*1024; +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_inc, CTLFLAG_RW, &VNET_NAME(tcp_autorcvbuf_inc), 0, "Incrementor step size of automatic receive buffer"); +VNET_DEFINE(int, tcp_autorcvbuf_max) = 256*1024; +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, recvbuf_max, CTLFLAG_RW, &VNET_NAME(tcp_autorcvbuf_max), 0, "Max size of automatic receive buffer"); @@ -181,8 +190,8 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, read &tcp_read_locking, 0, "Enable read locking strategy"); VNET_DEFINE(struct inpcbhead, tcb); -VNET_DEFINE(struct inpcbinfo, tcbinfo); #define tcb6 tcb /* for KAME src sync over BSD*'s */ +VNET_DEFINE(struct inpcbinfo, tcbinfo); static void tcp_dooptions(struct tcpopt *, u_char *, int, int); static void tcp_do_segment(struct mbuf *, struct tcphdr *, Modified: stable/8/sys/netinet/tcp_output.c ============================================================================== --- stable/8/sys/netinet/tcp_output.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_output.c Thu May 6 06:44:19 2010 (r207695) @@ -87,43 +87,46 @@ __FBSDID("$FreeBSD$"); extern struct mbuf *m_copypack(); #endif -VNET_DEFINE(int, path_mtu_discovery); -VNET_DEFINE(int, ss_fltsz); -VNET_DEFINE(int, ss_fltsz_local); -VNET_DEFINE(int, tcp_do_newreno); -VNET_DEFINE(int, tcp_do_tso); -VNET_DEFINE(int, tcp_do_autosndbuf); -VNET_DEFINE(int, tcp_autosndbuf_inc); -VNET_DEFINE(int, tcp_autosndbuf_max); - +VNET_DEFINE(int, path_mtu_discovery) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, path_mtu_discovery, CTLFLAG_RW, &VNET_NAME(path_mtu_discovery), 1, "Enable Path MTU Discovery"); +VNET_DEFINE(int, ss_fltsz) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW, &VNET_NAME(ss_fltsz), 1, "Slow start flight size"); +VNET_DEFINE(int, ss_fltsz_local) = 4; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW, &VNET_NAME(ss_fltsz_local), 1, "Slow start flight size for local networks"); +VNET_DEFINE(int, tcp_do_newreno) = 1; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, newreno, CTLFLAG_RW, &VNET_NAME(tcp_do_newreno), 0, "Enable NewReno Algorithms"); +VNET_DEFINE(int, tcp_do_tso) = 1; +#define V_tcp_do_tso VNET(tcp_do_tso) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, tso, CTLFLAG_RW, &VNET_NAME(tcp_do_tso), 0, "Enable TCP Segmentation Offload"); +VNET_DEFINE(int, tcp_do_autosndbuf) = 1; +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_auto, CTLFLAG_RW, &VNET_NAME(tcp_do_autosndbuf), 0, "Enable automatic send buffer sizing"); +VNET_DEFINE(int, tcp_autosndbuf_inc) = 8*1024; +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_inc, CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_inc), 0, "Incrementor step size of automatic send buffer"); +VNET_DEFINE(int, tcp_autosndbuf_max) = 256*1024; +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, sendbuf_max, CTLFLAG_RW, &VNET_NAME(tcp_autosndbuf_max), 0, "Max size of automatic send buffer"); Modified: stable/8/sys/netinet/tcp_reass.c ============================================================================== --- stable/8/sys/netinet/tcp_reass.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_reass.c Thu May 6 06:44:19 2010 (r207695) @@ -74,30 +74,28 @@ __FBSDID("$FreeBSD$"); #include #endif /* TCPDEBUG */ -static VNET_DEFINE(int, tcp_reass_maxseg); -VNET_DEFINE(int, tcp_reass_qsize); -static VNET_DEFINE(int, tcp_reass_maxqlen); -static VNET_DEFINE(int, tcp_reass_overflows); - -#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) -#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) -#define V_tcp_reass_overflows VNET(tcp_reass_overflows) - SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_maxseg) = 0; +#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN, &VNET_NAME(tcp_reass_maxseg), 0, "Global maximum number of TCP Segments in Reassembly Queue"); +VNET_DEFINE(int, tcp_reass_qsize) = 0; SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD, &VNET_NAME(tcp_reass_qsize), 0, "Global number of TCP Segments currently in Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_maxqlen) = 48; +#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, maxqlen, CTLFLAG_RW, &VNET_NAME(tcp_reass_maxqlen), 0, "Maximum number of TCP Segments per individual Reassembly Queue"); +static VNET_DEFINE(int, tcp_reass_overflows) = 0; +#define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD, &VNET_NAME(tcp_reass_overflows), 0, "Global number of TCP Segment Reassembly Queue Overflows"); @@ -117,11 +115,6 @@ void tcp_reass_init(void) { - V_tcp_reass_maxseg = 0; - V_tcp_reass_qsize = 0; - V_tcp_reass_maxqlen = 48; - V_tcp_reass_overflows = 0; - V_tcp_reass_maxseg = nmbclusters / 16; TUNABLE_INT_FETCH("net.inet.tcp.reass.maxsegments", &V_tcp_reass_maxseg); Modified: stable/8/sys/netinet/tcp_sack.c ============================================================================== --- stable/8/sys/netinet/tcp_sack.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_sack.c Thu May 6 06:44:19 2010 (r207695) @@ -123,29 +123,28 @@ __FBSDID("$FreeBSD$"); #include VNET_DECLARE(struct uma_zone *, sack_hole_zone); -VNET_DEFINE(int, tcp_do_sack); -VNET_DEFINE(int, tcp_sack_maxholes); -VNET_DEFINE(int, tcp_sack_globalmaxholes); -VNET_DEFINE(int, tcp_sack_globalholes); - #define V_sack_hole_zone VNET(sack_hole_zone) -#define V_tcp_do_sack VNET(tcp_do_sack) -#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) -#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) -#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); +VNET_DEFINE(int, tcp_do_sack) = 1; +#define V_tcp_do_sack VNET(tcp_do_sack) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_do_sack), 0, "Enable/Disable TCP SACK support"); +VNET_DEFINE(int, tcp_sack_maxholes) = 128; +#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_RW, &VNET_NAME(tcp_sack_maxholes), 0, "Maximum number of TCP SACK holes allowed per connection"); +VNET_DEFINE(int, tcp_sack_globalmaxholes) = 65536; +#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_RW, &VNET_NAME(tcp_sack_globalmaxholes), 0, "Global maximum number of TCP SACK holes"); +VNET_DEFINE(int, tcp_sack_globalholes) = 0; +#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, CTLFLAG_RD, &VNET_NAME(tcp_sack_globalholes), 0, "Global number of TCP SACK holes currently allocated"); Modified: stable/8/sys/netinet/tcp_subr.c ============================================================================== --- stable/8/sys/netinet/tcp_subr.c Thu May 6 04:57:33 2010 (r207694) +++ stable/8/sys/netinet/tcp_subr.c Thu May 6 06:44:19 2010 (r207695) @@ -111,28 +111,10 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(int, tcp_mssdflt); +VNET_DEFINE(int, tcp_mssdflt) = TCP_MSS; #ifdef INET6 -VNET_DEFINE(int, tcp_v6mssdflt); +VNET_DEFINE(int, tcp_v6mssdflt) = TCP6_MSS; #endif -VNET_DEFINE(int, tcp_minmss); -VNET_DEFINE(int, tcp_do_rfc1323); - -static VNET_DEFINE(int, icmp_may_rst); -static VNET_DEFINE(int, tcp_isn_reseed_interval); -static VNET_DEFINE(int, tcp_inflight_enable); -static VNET_DEFINE(int, tcp_inflight_rttthresh); -static VNET_DEFINE(int, tcp_inflight_min); -static VNET_DEFINE(int, tcp_inflight_max); -static VNET_DEFINE(int, tcp_inflight_stab); - -#define V_icmp_may_rst VNET(icmp_may_rst) -#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) -#define V_tcp_inflight_enable VNET(tcp_inflight_enable) -#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) -#define V_tcp_inflight_min VNET(tcp_inflight_min) -#define V_tcp_inflight_max VNET(tcp_inflight_max) -#define V_tcp_inflight_stab VNET(tcp_inflight_stab) static int sysctl_net_inet_tcp_mss_check(SYSCTL_HANDLER_ARGS) @@ -194,10 +176,12 @@ vnet_sysctl_msec_to_ticks(SYSCTL_HANDLER * with packet generation and sending. Set to zero to disable MINMSS * checking. This setting prevents us from sending too small packets. */ +VNET_DEFINE(int, tcp_minmss) = TCP_MINMSS; SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, minmss, CTLFLAG_RW, &VNET_NAME(tcp_minmss), 0, "Minmum TCP Maximum Segment Size"); +VNET_DEFINE(int, tcp_do_rfc1323) = 1; SYSCTL_VNET_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323, CTLFLAG_RW, &VNET_NAME(tcp_do_rfc1323), 0, "Enable rfc1323 (high performance TCP) extensions"); @@ -217,10 +201,14 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs"); +static VNET_DEFINE(int, icmp_may_rst) = 1; +#define V_icmp_may_rst VNET(icmp_may_rst) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, &VNET_NAME(icmp_may_rst), 0, "Certain ICMP unreachable messages may abort connections in SYN_SENT"); +static VNET_DEFINE(int, tcp_isn_reseed_interval) = 0; +#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW, &VNET_NAME(tcp_isn_reseed_interval), 0, "Seconds between reseeding of ISN secret"); @@ -233,6 +221,8 @@ SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, SYSCTL_NODE(_net_inet_tcp, OID_AUTO, inflight, CTLFLAG_RW, 0, "TCP inflight data limiting"); +static VNET_DEFINE(int, tcp_inflight_enable) = 1; +#define V_tcp_inflight_enable VNET(tcp_inflight_enable) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, enable, CTLFLAG_RW, &VNET_NAME(tcp_inflight_enable), 0, "Enable automatic TCP inflight data limiting"); @@ -242,19 +232,27 @@ SYSCTL_INT(_net_inet_tcp_inflight, OID_A &tcp_inflight_debug, 0, "Debug TCP inflight calculations"); +static VNET_DEFINE(int, tcp_inflight_rttthresh); +#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) SYSCTL_VNET_PROC(_net_inet_tcp_inflight, OID_AUTO, rttthresh, CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(tcp_inflight_rttthresh), 0, vnet_sysctl_msec_to_ticks, "I", "RTT threshold below which inflight will deactivate itself"); +static VNET_DEFINE(int, tcp_inflight_min) = 6144; +#define V_tcp_inflight_min VNET(tcp_inflight_min) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, min, CTLFLAG_RW, &VNET_NAME(tcp_inflight_min), 0, "Lower-bound for TCP inflight window"); +static VNET_DEFINE(int, tcp_inflight_max) = TCP_MAXWIN << TCP_MAX_WINSHIFT; +#define V_tcp_inflight_max VNET(tcp_inflight_max) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, max, CTLFLAG_RW, &VNET_NAME(tcp_inflight_max), 0, "Upper-bound for TCP inflight window"); +static VNET_DEFINE(int, tcp_inflight_stab) = 20; +#define V_tcp_inflight_stab VNET(tcp_inflight_stab) SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, stab, CTLFLAG_RW, &VNET_NAME(tcp_inflight_stab), 0, "Inflight Algorithm Stabilization 20 = 2 packets"); @@ -323,53 +321,6 @@ tcp_init(void) { int hashsize; - V_blackhole = 0; - V_tcp_delack_enabled = 1; - V_drop_synfin = 0; - V_tcp_do_rfc3042 = 1; - V_tcp_do_rfc3390 = 1; - V_tcp_do_ecn = 0; - V_tcp_ecn_maxretries = 1; - V_tcp_insecure_rst = 0; - V_tcp_do_autorcvbuf = 1; - V_tcp_autorcvbuf_inc = 16*1024; - V_tcp_autorcvbuf_max = 256*1024; - V_tcp_do_rfc3465 = 1; - V_tcp_abc_l_var = 2; - - V_tcp_mssdflt = TCP_MSS; -#ifdef INET6 - V_tcp_v6mssdflt = TCP6_MSS; -#endif - V_tcp_minmss = TCP_MINMSS; - V_tcp_do_rfc1323 = 1; - V_icmp_may_rst = 1; - V_tcp_isn_reseed_interval = 0; - V_tcp_inflight_enable = 1; - V_tcp_inflight_min = 6144; - V_tcp_inflight_max = TCP_MAXWIN << TCP_MAX_WINSHIFT; - V_tcp_inflight_stab = 20; - - V_path_mtu_discovery = 1; - V_ss_fltsz = 1; - V_ss_fltsz_local = 4; - V_tcp_do_newreno = 1; - V_tcp_do_tso = 1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu May 6 09:52:33 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 55DF71065672; Thu, 6 May 2010 09:52:33 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44F538FC1F; Thu, 6 May 2010 09:52:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o469qXgl034306; Thu, 6 May 2010 09:52:33 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o469qWB1034305; Thu, 6 May 2010 09:52:32 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005060952.o469qWB1034305@svn.freebsd.org> From: Marko Zec Date: Thu, 6 May 2010 09:52:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207697 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 09:52:33 -0000 Author: zec Date: Thu May 6 09:52:32 2010 New Revision: 207697 URL: http://svn.freebsd.org/changeset/base/207697 Log: MFC r207475: Remove a redundant variable assignment. Reviewed by: bz, rwatson Modified: stable/8/sys/kern/uipc_mbuf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/uipc_mbuf.c ============================================================================== --- stable/8/sys/kern/uipc_mbuf.c Thu May 6 06:44:26 2010 (r207696) +++ stable/8/sys/kern/uipc_mbuf.c Thu May 6 09:52:32 2010 (r207697) @@ -948,9 +948,8 @@ m_adj(struct mbuf *mp, int req_len) len = 0; } } - m = mp; if (mp->m_flags & M_PKTHDR) - m->m_pkthdr.len -= (req_len - len); + mp->m_pkthdr.len -= (req_len - len); } else { /* * Trim from tail. Scan the mbuf chain, From owner-svn-src-stable@FreeBSD.ORG Thu May 6 09:54:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DDF81065674; Thu, 6 May 2010 09:54:01 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBC68FC08; Thu, 6 May 2010 09:54:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o469s1af034687; Thu, 6 May 2010 09:54:01 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o469s1RH034685; Thu, 6 May 2010 09:54:01 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <201005060954.o469s1RH034685@svn.freebsd.org> From: Marko Zec Date: Thu, 6 May 2010 09:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207698 - stable/8/sys/netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 09:54:01 -0000 Author: zec Date: Thu May 6 09:54:01 2010 New Revision: 207698 URL: http://svn.freebsd.org/changeset/base/207698 Log: MFC r207572: When destroying a vnet, shut down all netgraph nodes tied to that vnet before proceeding with dismantling other protocol domains. This change only affects options VIMAGE builds. Reviewed by: julian, bz Modified: stable/8/sys/netgraph/ng_base.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netgraph/ng_base.c ============================================================================== --- stable/8/sys/netgraph/ng_base.c Thu May 6 09:52:32 2010 (r207697) +++ stable/8/sys/netgraph/ng_base.c Thu May 6 09:54:01 2010 (r207698) @@ -3067,28 +3067,42 @@ ng_mod_event(module_t mod, int event, vo static void vnet_netgraph_uninit(const void *unused __unused) { -#if 0 - node_p node, last_killed = NULL; + node_p node = NULL, last_killed = NULL; + int i; + + do { + /* Find a node to kill */ + mtx_lock(&ng_namehash_mtx); + for (i = 0; i < NG_NAME_HASH_SIZE; i++) { + LIST_FOREACH(node, &V_ng_name_hash[i], nd_nodes) { + if (node != &ng_deadnode) { + NG_NODE_REF(node); + break; + } + } + if (node != NULL) + break; + } + mtx_unlock(&ng_namehash_mtx); - /* XXXRW: utterly bogus. */ - while ((node = LIST_FIRST(&V_ng_allnodes)) != NULL) { - if (node == last_killed) { - /* This should never happen */ - node->nd_flags |= NGF_REALLY_DIE; - printf("netgraph node %s needs NGF_REALLY_DIE\n", - node->nd_name); + /* Attempt to kill it only if it is a regular node */ + if (node != NULL) { + if (node == last_killed) { + /* This should never happen */ + printf("ng node %s needs" + "NGF_REALLY_DIE\n", node->nd_name); + if (node->nd_flags & NGF_REALLY_DIE) + panic("ng node %s won't die", + node->nd_name); + node->nd_flags |= NGF_REALLY_DIE; + } ng_rmnode(node, NULL, NULL, 0); - /* This must never happen */ - if (node == LIST_FIRST(&V_ng_allnodes)) - panic("netgraph node %s won't die", - node->nd_name); + NG_NODE_UNREF(node); + last_killed = node; } - ng_rmnode(node, NULL, NULL, 0); - last_killed = node; - } -#endif + } while (node != NULL); } -VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_NETGRAPH, SI_ORDER_ANY, +VNET_SYSUNINIT(vnet_netgraph_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY, vnet_netgraph_uninit, NULL); #endif /* VIMAGE */ From owner-svn-src-stable@FreeBSD.ORG Thu May 6 12:37:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0C111065672; Thu, 6 May 2010 12:37:01 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA838FC0A; Thu, 6 May 2010 12:37:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Cb1T0076451; Thu, 6 May 2010 12:37:01 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Cb1se076439; Thu, 6 May 2010 12:37:01 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201005061237.o46Cb1se076439@svn.freebsd.org> From: Gavin Atkinson Date: Thu, 6 May 2010 12:37:01 +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: r207699 - in stable/7: sbin/ifconfig share/man/man4 sys/amd64/amd64 sys/dev/aic7xxx sys/dev/ath sys/dev/ath/ath_hal/ar5210 sys/dev/ct sys/dev/mly sys/i386/i386 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 12:37:01 -0000 Author: gavin Date: Thu May 6 12:37:01 2010 New Revision: 207699 URL: http://svn.freebsd.org/changeset/base/207699 Log: Merge r202161 from head: Spell "Hz" correctly wherever it is user-visible. PR: bin/142566 Submitted by: N.J. Mann njm njm.me.uk Modified: stable/7/sbin/ifconfig/ifieee80211.c stable/7/share/man/man4/ath.4 stable/7/share/man/man4/cpufreq.4 stable/7/share/man/man4/vge.4 stable/7/sys/amd64/amd64/local_apic.c stable/7/sys/dev/aic7xxx/aic79xx_pci.c stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c stable/7/sys/dev/ath/if_ath.c stable/7/sys/dev/ct/ct_isa.c stable/7/sys/dev/mly/mly.c stable/7/sys/i386/i386/local_apic.c Directory Properties: stable/7/sbin/ifconfig/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sbin/ifconfig/ifieee80211.c ============================================================================== --- stable/7/sbin/ifconfig/ifieee80211.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sbin/ifconfig/ifieee80211.c Thu May 6 12:37:01 2010 (r207699) @@ -2259,7 +2259,7 @@ print_chaninfo(const struct ieee80211_ch { char buf[14]; - printf("Channel %3u : %u%c Mhz%-14.14s", + printf("Channel %3u : %u%c MHz%-14.14s", ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', get_chaninfo(c, verb, buf, sizeof(buf))); @@ -2338,7 +2338,7 @@ list_channels(int s, int allchans) static void print_txpow(const struct ieee80211_channel *c) { - printf("Channel %3u : %u Mhz %3.1f reg %2d ", + printf("Channel %3u : %u MHz %3.1f reg %2d ", c->ic_ieee, c->ic_freq, c->ic_maxpower/2., c->ic_maxregpower); } @@ -2800,7 +2800,7 @@ ieee80211_status(int s) c = getcurchan(s); if (c->ic_freq != IEEE80211_CHAN_ANY) { char buf[14]; - printf(" channel %d (%u Mhz%s)", c->ic_ieee, c->ic_freq, + printf(" channel %d (%u MHz%s)", c->ic_ieee, c->ic_freq, get_chaninfo(c, 1, buf, sizeof(buf))); } else if (verbose) printf(" channel UNDEF"); Modified: stable/7/share/man/man4/ath.4 ============================================================================== --- stable/7/share/man/man4/ath.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/ath.4 Thu May 6 12:37:01 2010 (r207699) @@ -224,7 +224,7 @@ This should not happen. An invalid transmit rate was specified for an outgoing frame. The frame is discarded. This should not happen. -.It "ath%d: ath_chan_set: unable to reset channel %u (%u Mhz)" +.It "ath%d: ath_chan_set: unable to reset channel %u (%u MHz)" The Atheros Hardware Access Layer was unable to reset the hardware when switching channels during scanning. This should not happen. Modified: stable/7/share/man/man4/cpufreq.4 ============================================================================== --- stable/7/share/man/man4/cpufreq.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/cpufreq.4 Thu May 6 12:37:01 2010 (r207699) @@ -234,7 +234,7 @@ The driver should set unknown or irrelev All the following elements for each setting should be returned: .Bd -literal struct cf_setting { - int freq; /* CPU clock in Mhz or 100ths of a percent. */ + int freq; /* CPU clock in MHz or 100ths of a percent. */ int volts; /* Voltage in mV. */ int power; /* Power consumed in mW. */ int lat; /* Transition latency in us. */ Modified: stable/7/share/man/man4/vge.4 ============================================================================== --- stable/7/share/man/man4/vge.4 Thu May 6 09:54:01 2010 (r207698) +++ stable/7/share/man/man4/vge.4 Thu May 6 12:37:01 2010 (r207699) @@ -58,7 +58,7 @@ driver provides support for various NICs based on the VIA Technologies VT6120, VT6122, VT6130 and VT6132 Velocity Family Gigabit Ethernet controller chips. .Pp -The VT6120/VT6122 is a 33/66Mhz 64-bit PCI device which combines a tri-speed +The VT6120/VT6122 is a 33/66MHz 64-bit PCI device which combines a tri-speed MAC with an integrated 10/100/1000 copper PHY. (Some older cards use an external PHY.) The VT6130/VT6132 is the PCI express version of Velocity family. Modified: stable/7/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/7/sys/amd64/amd64/local_apic.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/amd64/amd64/local_apic.c Thu May 6 12:37:01 2010 (r207699) @@ -467,7 +467,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* Modified: stable/7/sys/dev/aic7xxx/aic79xx_pci.c ============================================================================== --- stable/7/sys/dev/aic7xxx/aic79xx_pci.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/aic7xxx/aic79xx_pci.c Thu May 6 12:37:01 2010 (r207699) @@ -248,10 +248,10 @@ static const char *pci_bus_modes[] = "PCI bus mode unknown", "PCI bus mode unknown", "PCI bus mode unknown", - "PCI-X 101-133Mhz", - "PCI-X 67-100Mhz", - "PCI-X 50-66Mhz", - "PCI 33 or 66Mhz" + "PCI-X 101-133MHz", + "PCI-X 67-100MHz", + "PCI-X 50-66MHz", + "PCI 33 or 66MHz" }; #define TESTMODE 0x00000800ul Modified: stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu May 6 12:37:01 2010 (r207699) @@ -15,6 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: ar5210_reset.c,v 1.8 2008/11/11 17:25:16 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -86,7 +87,7 @@ ar5210Reset(struct ath_hal *ah, HAL_OPMO if ((chan->channelFlags & CHANNEL_5GHZ) == 0) { /* Only 11a mode */ - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5Ghz\n", __func__); + HALDEBUG(ah, HAL_DEBUG_ANY, "%s: channel not 5GHz\n", __func__); FAIL(HAL_EINVAL); } /* Modified: stable/7/sys/dev/ath/if_ath.c ============================================================================== --- stable/7/sys/dev/ath/if_ath.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ath/if_ath.c Thu May 6 12:37:01 2010 (r207699) @@ -4934,7 +4934,7 @@ ath_chan_set(struct ath_softc *sc, struc ath_stoprecv(sc); /* turn off frame recv */ if (!ath_hal_reset(ah, sc->sc_opmode, &hchan, AH_TRUE, &status)) { if_printf(ic->ic_ifp, "%s: unable to reset " - "channel %u (%u Mhz, flags 0x%x hal flags 0x%x), " + "channel %u (%u MHz, flags 0x%x hal flags 0x%x), " "hal status %u\n", __func__, ieee80211_chan2ieee(ic, chan), chan->ic_freq, chan->ic_flags, hchan.channelFlags, status); Modified: stable/7/sys/dev/ct/ct_isa.c ============================================================================== --- stable/7/sys/dev/ct/ct_isa.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/ct/ct_isa.c Thu May 6 12:37:01 2010 (r207699) @@ -316,7 +316,7 @@ ct_isa_attach(device_t dev) break; } #if 0 - printf("%s: chiprev %s chipclk %d Mhz\n", + printf("%s: chiprev %s chipclk %d MHz\n", slp->sl_dev.dv_xname, s, ct->sc_chipclk); #endif Modified: stable/7/sys/dev/mly/mly.c ============================================================================== --- stable/7/sys/dev/mly/mly.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/dev/mly/mly.c Thu May 6 12:37:01 2010 (r207699) @@ -2528,7 +2528,7 @@ mly_describe_controller(struct mly_softc mly_describe_code(mly_table_memorytype, mi->memory_type), mi->memory_parity ? "+parity": "",mi->memory_ecc ? "+ECC": "", mi->cache_size); - mly_printf(sc, "CPU: %s @ %dMHZ\n", + mly_printf(sc, "CPU: %s @ %dMHz\n", mly_describe_code(mly_table_cputype, mi->cpu[0].type), mi->cpu[0].speed); if (mi->l2cache_size != 0) mly_printf(sc, "%dKB L2 cache\n", mi->l2cache_size); Modified: stable/7/sys/i386/i386/local_apic.c ============================================================================== --- stable/7/sys/i386/i386/local_apic.c Thu May 6 09:54:01 2010 (r207698) +++ stable/7/sys/i386/i386/local_apic.c Thu May 6 12:37:01 2010 (r207699) @@ -470,7 +470,7 @@ lapic_setup_clock(void) panic("lapic: Divisor too big"); value /= 2; if (bootverbose) - printf("lapic: Divisor %lu, Frequency %lu hz\n", + printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); /* From owner-svn-src-stable@FreeBSD.ORG Thu May 6 17:03:28 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2CF771065674; Thu, 6 May 2010 17:03:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9328FC17; Thu, 6 May 2010 17:03:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46H3Rxm035122; Thu, 6 May 2010 17:03:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46H3RbV035121; Thu, 6 May 2010 17:03:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201005061703.o46H3RbV035121@svn.freebsd.org> From: Xin LI Date: Thu, 6 May 2010 17:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207704 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 17:03:28 -0000 Author: delphij Date: Thu May 6 17:03:27 2010 New Revision: 207704 URL: http://svn.freebsd.org/changeset/base/207704 Log: MFC r207382: bwn(4) will first appear in FreeBSD 8.1-RELEASE. Modified: stable/8/share/man/man4/bwn.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/bwn.4 ============================================================================== --- stable/8/share/man/man4/bwn.4 Thu May 6 16:54:46 2010 (r207703) +++ stable/8/share/man/man4/bwn.4 Thu May 6 17:03:27 2010 (r207704) @@ -123,7 +123,7 @@ ifconfig wlan create wlandev bwn0 ssid m The .Nm driver first appeared in -.Fx 8.0 . +.Fx 8.1 . .Sh AUTHORS .An -nosplit The From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:17:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87BAA1065672; Thu, 6 May 2010 18:17:36 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6D7CE8FC12; Thu, 6 May 2010 18:17:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IHa8S051798; Thu, 6 May 2010 18:17:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IHaqZ051795; Thu, 6 May 2010 18:17:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061817.o46IHaqZ051795@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207710 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:17:36 -0000 Author: yongari Date: Thu May 6 18:17:36 2010 New Revision: 207710 URL: http://svn.freebsd.org/changeset/base/207710 Log: MFC r207375-207377. r207375: Preserve unknown bits of RX MAC control register when driver programs RX filter configuration. It seems RX MAC control register is one of key registers to get various offloading features as well as performance. Blindly clearing unrelated bits can result in unexpected results. Tested by: xclin cs dot nctu dot edu dot tw > r207376: Remove wrong link state chage. r207377: Explicitly marks SiS190 to differentiate it from SiS191. Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 17:53:04 2010 (r207709) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:17:36 2010 (r207710) @@ -453,8 +453,9 @@ sge_rxfilter(struct sge_softc *sc) SGE_LOCK_ASSERT(sc); ifp = sc->sge_ifp; - hashes[0] = hashes[1] = 0; - rxfilt = AcceptMyPhys; + rxfilt = CSR_READ_2(sc, RxMacControl); + rxfilt &= ~(AcceptBroadcast | AcceptAllPhys | AcceptMulticast); + rxfilt |= AcceptMyPhys; if ((ifp->if_flags & IFF_BROADCAST) != 0) rxfilt |= AcceptBroadcast; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { @@ -463,20 +464,20 @@ sge_rxfilter(struct sge_softc *sc) rxfilt |= AcceptMulticast; hashes[0] = 0xFFFFFFFF; hashes[1] = 0xFFFFFFFF; - goto done; - } - rxfilt |= AcceptMulticast; - /* Now program new ones. */ - if_maddr_rlock(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN); - hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } else { + rxfilt |= AcceptMulticast; + hashes[0] = hashes[1] = 0; + /* Now program new ones. */ + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN); + hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } + if_maddr_runlock(ifp); } - if_maddr_runlock(ifp); -done: CSR_WRITE_2(sc, RxMacControl, rxfilt | 0x02); CSR_WRITE_4(sc, RxHashTable, hashes[0]); CSR_WRITE_4(sc, RxHashTable2, hashes[1]); @@ -571,7 +572,7 @@ sge_attach(device_t dev) } sc->sge_rev = pci_get_revid(dev); if (pci_get_device(dev) == SIS_DEVICEID_190) - sc->sge_flags |= SGE_FLAG_FASTETHER; + sc->sge_flags |= SGE_FLAG_FASTETHER | SGE_FLAG_SIS190; /* Reset the adapter. */ sge_reset(sc); @@ -1590,7 +1591,6 @@ sge_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; SGE_LOCK(sc); mii = device_get_softc(sc->sge_miibus); - sc->sge_flags &= ~SGE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 17:53:04 2010 (r207709) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:17:36 2010 (r207710) @@ -331,6 +331,7 @@ struct sge_softc { int sge_timer; int sge_flags; #define SGE_FLAG_FASTETHER 0x0001 +#define SGE_FLAG_SIS190 0x0002 #define SGE_FLAG_RGMII 0x0010 #define SGE_FLAG_SPEED_1000 0x2000 #define SGE_FLAG_FDX 0x4000 From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:26:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB94D106566B; Thu, 6 May 2010 18:26:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A0CF38FC0C; Thu, 6 May 2010 18:26:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IQh8P053939; Thu, 6 May 2010 18:26:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IQhEA053936; Thu, 6 May 2010 18:26:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061826.o46IQhEA053936@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:26: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: r207711 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:26:43 -0000 Author: yongari Date: Thu May 6 18:26:43 2010 New Revision: 207711 URL: http://svn.freebsd.org/changeset/base/207711 Log: MFC r207375-207377. r207375: Preserve unknown bits of RX MAC control register when driver programs RX filter configuration. It seems RX MAC control register is one of key registers to get various offloading features as well as performance. Blindly clearing unrelated bits can result in unexpected results. Tested by: xclin cs dot nctu dot edu dot tw > r207376: Remove wrong link state chage. r207377: Explicitly marks SiS190 to differentiate it from SiS191. Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:17:36 2010 (r207710) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:26:43 2010 (r207711) @@ -453,8 +453,9 @@ sge_rxfilter(struct sge_softc *sc) SGE_LOCK_ASSERT(sc); ifp = sc->sge_ifp; - hashes[0] = hashes[1] = 0; - rxfilt = AcceptMyPhys; + rxfilt = CSR_READ_2(sc, RxMacControl); + rxfilt &= ~(AcceptBroadcast | AcceptAllPhys | AcceptMulticast); + rxfilt |= AcceptMyPhys; if ((ifp->if_flags & IFF_BROADCAST) != 0) rxfilt |= AcceptBroadcast; if ((ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) != 0) { @@ -463,20 +464,20 @@ sge_rxfilter(struct sge_softc *sc) rxfilt |= AcceptMulticast; hashes[0] = 0xFFFFFFFF; hashes[1] = 0xFFFFFFFF; - goto done; - } - rxfilt |= AcceptMulticast; - /* Now program new ones. */ - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) - ifma->ifma_addr), ETHER_ADDR_LEN); - hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } else { + rxfilt |= AcceptMulticast; + hashes[0] = hashes[1] = 0; + /* Now program new ones. */ + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + crc = ether_crc32_be(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN); + hashes[crc >> 31] |= 1 << ((crc >> 26) & 0x1f); + } + IF_ADDR_UNLOCK(ifp); } - IF_ADDR_UNLOCK(ifp); -done: CSR_WRITE_2(sc, RxMacControl, rxfilt | 0x02); CSR_WRITE_4(sc, RxHashTable, hashes[0]); CSR_WRITE_4(sc, RxHashTable2, hashes[1]); @@ -571,7 +572,7 @@ sge_attach(device_t dev) } sc->sge_rev = pci_get_revid(dev); if (pci_get_device(dev) == SIS_DEVICEID_190) - sc->sge_flags |= SGE_FLAG_FASTETHER; + sc->sge_flags |= SGE_FLAG_FASTETHER | SGE_FLAG_SIS190; /* Reset the adapter. */ sge_reset(sc); @@ -1590,7 +1591,6 @@ sge_ifmedia_upd(struct ifnet *ifp) sc = ifp->if_softc; SGE_LOCK(sc); mii = device_get_softc(sc->sge_miibus); - sc->sge_flags &= ~SGE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:17:36 2010 (r207710) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:26:43 2010 (r207711) @@ -331,6 +331,7 @@ struct sge_softc { int sge_timer; int sge_flags; #define SGE_FLAG_FASTETHER 0x0001 +#define SGE_FLAG_SIS190 0x0002 #define SGE_FLAG_RGMII 0x0010 #define SGE_FLAG_SPEED_1000 0x2000 #define SGE_FLAG_FDX 0x4000 From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:30:46 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7B7E1065673; Thu, 6 May 2010 18:30:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B69A58FC1D; Thu, 6 May 2010 18:30:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IUkQG054875; Thu, 6 May 2010 18:30:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IUk05054872; Thu, 6 May 2010 18:30:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061830.o46IUk05054872@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207712 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:30:46 -0000 Author: yongari Date: Thu May 6 18:30:46 2010 New Revision: 207712 URL: http://svn.freebsd.org/changeset/base/207712 Log: MFC r207379: Enable FCS stripping and padding 10 bytes bit of RX MAC control register. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. The controller can pad 10 bytes before DMAing a received frame to RX buffer and received bytes include the padded bytes. This padding is very useful on strict-alignment architectures because driver does not have to copy received frame to align IP header on 4 bytes boundary. It also gives better RX performance on non-strict alignment architectures. Special thanks to xclin to give me valuable register information. Without his enthusiastic trial and errors this wouldn't be even possible. While I'm here tighten validity check of received frame. Controller clears RDS_CRCOK bit when it received bad CRC frames. xclin found that using loop back testing. Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 18:26:43 2010 (r207711) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:30:46 2010 (r207712) @@ -1144,7 +1144,8 @@ sge_rxeof(struct sge_softc *sc) if ((rxinfo & RDC_OWN) != 0) break; rxstat = le32toh(cur_rx->sge_sts_size); - if (SGE_RX_ERROR(rxstat) != 0 || SGE_RX_NSEGS(rxstat) != 1) { + if ((rxstat & RDS_CRCOK) == 0 || SGE_RX_ERROR(rxstat) != 0 || + SGE_RX_NSEGS(rxstat) != 1) { /* XXX We don't support multi-segment frames yet. */ #ifdef SGE_SHOW_ERRORS device_printf(sc->sge_dev, "Rx error : 0x%b\n", rxstat, @@ -1177,11 +1178,23 @@ sge_rxeof(struct sge_softc *sc) /* * TODO : VLAN hardware tag stripping. */ - m->m_pkthdr.len = m->m_len = - SGE_RX_BYTES(rxstat) - ETHER_CRC_LEN; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { + /* + * Account for 10bytes auto padding which is used + * to align IP header on 32bit boundary. Also note, + * CRC bytes is automatically removed by the + * hardware. + */ + m->m_data += SGE_RX_PAD_BYTES; + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + SGE_RX_PAD_BYTES; + } else { + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + ETHER_CRC_LEN; #ifndef __NO_STRICT_ALIGNMENT - sge_fixup_rx(m); + sge_fixup_rx(m); #endif + } m->m_pkthdr.rcvif = ifp; ifp->if_ipackets++; SGE_UNLOCK(sc); @@ -1503,6 +1516,7 @@ sge_init_locked(struct sge_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint16_t rxfilt; int i; SGE_LOCK_ASSERT(sc); @@ -1535,10 +1549,19 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ - CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + CSR_WRITE_2(sc, RxMPSControl, + ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + SGE_RX_PAD_BYTES); + else + CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); + /* Configure RX MAC. */ + rxfilt = 0; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); /* Initialize default speed/duplex information. */ Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:26:43 2010 (r207711) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:30:46 2010 (r207712) @@ -137,6 +137,10 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_FCS 0x0010 +#define RXMAC_PAD_ENB 0x0004 + +#define SGE_RX_PAD_BYTES 10 /* Station control register. */ #define SC_LOOPBACK 0x80000000 From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:32:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 880191065670; Thu, 6 May 2010 18:32:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 770958FC16; Thu, 6 May 2010 18:32:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IW2q2055194; Thu, 6 May 2010 18:32:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IW2Fp055191; Thu, 6 May 2010 18:32:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061832.o46IW2Fp055191@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:32: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: r207713 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:32:02 -0000 Author: yongari Date: Thu May 6 18:32:02 2010 New Revision: 207713 URL: http://svn.freebsd.org/changeset/base/207713 Log: MFC r207379: Enable FCS stripping and padding 10 bytes bit of RX MAC control register. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. The controller can pad 10 bytes before DMAing a received frame to RX buffer and received bytes include the padded bytes. This padding is very useful on strict-alignment architectures because driver does not have to copy received frame to align IP header on 4 bytes boundary. It also gives better RX performance on non-strict alignment architectures. Special thanks to xclin to give me valuable register information. Without his enthusiastic trial and errors this wouldn't be even possible. While I'm here tighten validity check of received frame. Controller clears RDS_CRCOK bit when it received bad CRC frames. xclin found that using loop back testing. Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:30:46 2010 (r207712) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:32:02 2010 (r207713) @@ -1144,7 +1144,8 @@ sge_rxeof(struct sge_softc *sc) if ((rxinfo & RDC_OWN) != 0) break; rxstat = le32toh(cur_rx->sge_sts_size); - if (SGE_RX_ERROR(rxstat) != 0 || SGE_RX_NSEGS(rxstat) != 1) { + if ((rxstat & RDS_CRCOK) == 0 || SGE_RX_ERROR(rxstat) != 0 || + SGE_RX_NSEGS(rxstat) != 1) { /* XXX We don't support multi-segment frames yet. */ #ifdef SGE_SHOW_ERRORS device_printf(sc->sge_dev, "Rx error : 0x%b\n", rxstat, @@ -1177,11 +1178,23 @@ sge_rxeof(struct sge_softc *sc) /* * TODO : VLAN hardware tag stripping. */ - m->m_pkthdr.len = m->m_len = - SGE_RX_BYTES(rxstat) - ETHER_CRC_LEN; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { + /* + * Account for 10bytes auto padding which is used + * to align IP header on 32bit boundary. Also note, + * CRC bytes is automatically removed by the + * hardware. + */ + m->m_data += SGE_RX_PAD_BYTES; + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + SGE_RX_PAD_BYTES; + } else { + m->m_pkthdr.len = m->m_len = SGE_RX_BYTES(rxstat) - + ETHER_CRC_LEN; #ifndef __NO_STRICT_ALIGNMENT - sge_fixup_rx(m); + sge_fixup_rx(m); #endif + } m->m_pkthdr.rcvif = ifp; ifp->if_ipackets++; SGE_UNLOCK(sc); @@ -1503,6 +1516,7 @@ sge_init_locked(struct sge_softc *sc) { struct ifnet *ifp; struct mii_data *mii; + uint16_t rxfilt; int i; SGE_LOCK_ASSERT(sc); @@ -1535,10 +1549,19 @@ sge_init_locked(struct sge_softc *sc) CSR_WRITE_4(sc, RxWakeOnLan, 0); CSR_WRITE_4(sc, RxWakeOnLanData, 0); /* Allow receiving VLAN frames. */ - CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + CSR_WRITE_2(sc, RxMPSControl, + ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN + SGE_RX_PAD_BYTES); + else + CSR_WRITE_2(sc, RxMPSControl, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN); for (i = 0; i < ETHER_ADDR_LEN; i++) CSR_WRITE_1(sc, RxMacAddr + i, IF_LLADDR(ifp)[i]); + /* Configure RX MAC. */ + rxfilt = 0; + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; + CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); /* Initialize default speed/duplex information. */ Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:30:46 2010 (r207712) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:32:02 2010 (r207713) @@ -137,6 +137,10 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_FCS 0x0010 +#define RXMAC_PAD_ENB 0x0004 + +#define SGE_RX_PAD_BYTES 10 /* Station control register. */ #define SC_LOOPBACK 0x80000000 From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:34:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24A84106564A; Thu, 6 May 2010 18:34:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 136638FC17; Thu, 6 May 2010 18:34:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IYFbA055810; Thu, 6 May 2010 18:34:15 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IYFD0055807; Thu, 6 May 2010 18:34:15 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061834.o46IYFD0055807@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207714 - stable/8/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:34:16 -0000 Author: yongari Date: Thu May 6 18:34:15 2010 New Revision: 207714 URL: http://svn.freebsd.org/changeset/base/207714 Log: MFC r207380: Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. In theory, controller reinitialization is not needed when VLAN tag configuration is changed, but xclin said controller was not stable whenever toggling VLAN tag bit. To address that, sge(4) reinitialize controller for VLAN configuration which seems to work as expected. VLAN tag information for TX/RX descriptor and configure bit of RxMacControl register was found by xclin. Submitted by: xclin cs dot nctu dot edu dot tw > (initial version) Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sge/if_sgereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Thu May 6 18:32:02 2010 (r207713) +++ stable/8/sys/dev/sge/if_sge.c Thu May 6 18:34:15 2010 (r207714) @@ -137,6 +137,7 @@ static int sge_get_mac_addr_eeprom(struc static uint16_t sge_read_eeprom(struct sge_softc *, int); static void sge_rxfilter(struct sge_softc *); +static void sge_setvlan(struct sge_softc *); static void sge_reset(struct sge_softc *); static int sge_list_rx_init(struct sge_softc *); static int sge_list_rx_free(struct sge_softc *); @@ -484,6 +485,25 @@ sge_rxfilter(struct sge_softc *sc) } static void +sge_setvlan(struct sge_softc *sc) +{ + struct ifnet *ifp; + uint16_t rxfilt; + + SGE_LOCK_ASSERT(sc); + + ifp = sc->sge_ifp; + if ((ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) == 0) + return; + rxfilt = CSR_READ_2(sc, RxMacControl); + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + rxfilt |= RXMAC_STRIP_VLAN; + else + rxfilt &= ~RXMAC_STRIP_VLAN; + CSR_WRITE_2(sc, RxMacControl, rxfilt); +} + +static void sge_reset(struct sge_softc *sc) { @@ -619,6 +639,9 @@ sge_attach(device_t dev) ether_ifattach(ifp, eaddr); /* VLAN setup. */ + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ @@ -1175,9 +1198,12 @@ sge_rxeof(struct sge_softc *sc) m->m_pkthdr.csum_data = 0xffff; } } - /* - * TODO : VLAN hardware tag stripping. - */ + /* Check for VLAN tagged frame. */ + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && + (rxstat & RDS_VLAN) != 0) { + m->m_pkthdr.ether_vtag = rxinfo & RDC_VLAN_MASK; + m->m_flags |= M_VLANTAG; + } if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { /* * Account for 10bytes auto padding which is used @@ -1422,6 +1448,11 @@ sge_encap(struct sge_softc *sc, struct m desc->sge_flags = htole32(txsegs[0].ds_len); if (prod == SGE_TX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); + /* Configure VLAN. */ + if(((*m_head)->m_flags & M_VLANTAG) != 0) { + cflags |= (*m_head)->m_pkthdr.ether_vtag; + desc->sge_sts_size |= htole32(TDS_INS_VLAN); + } desc->sge_cmdsts = htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); #if 1 if ((sc->sge_flags & SGE_FLAG_SPEED_1000) != 0) @@ -1563,6 +1594,7 @@ sge_init_locked(struct sge_softc *sc) rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); + sge_setvlan(sc); /* Initialize default speed/duplex information. */ if ((sc->sge_flags & SGE_FLAG_FASTETHER) == 0) @@ -1653,7 +1685,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm struct sge_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0, mask; + int error = 0, mask, reinit; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1675,6 +1707,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm break; case SIOCSIFCAP: SGE_LOCK(sc); + reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { @@ -1687,7 +1720,24 @@ sge_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_RXCSUM) != 0 && (ifp->if_capabilities & IFCAP_RXCSUM) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; + if ((mask & IFCAP_VLAN_HWCSUM) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { + /* + * Due to unknown reason, toggling VLAN hardware + * tagging require interface reinitialization. + */ + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + reinit = 1; + } + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sge_init_locked(sc); + } SGE_UNLOCK(sc); + VLAN_CAPABILITIES(ifp); break; case SIOCADDMULTI: case SIOCDELMULTI: Modified: stable/8/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:32:02 2010 (r207713) +++ stable/8/sys/dev/sge/if_sgereg.h Thu May 6 18:34:15 2010 (r207714) @@ -137,6 +137,7 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_VLAN 0x0020 #define RXMAC_STRIP_FCS 0x0010 #define RXMAC_PAD_ENB 0x0004 @@ -187,12 +188,14 @@ #define TDC_COL 0x00040000 #define TDC_CRC 0x00020000 #define TDC_PAD 0x00010000 +#define TDC_VLAN_MASK 0x0000FFFF #define SGE_TX_INTR_FRAMES 32 /* * TX descriptor status bits. */ +#define TDS_INS_VLAN 0x80000000 #define TDS_OWC 0x00080000 #define TDS_ABT 0x00040000 #define TDS_FIFO 0x00020000 @@ -219,11 +222,12 @@ #define RDC_UCAST 0x00040000 #define RDC_CRCOFF 0x00020000 #define RDC_PREADD 0x00010000 +#define RDC_VLAN_MASK 0x0000FFFF /* * RX descriptor status bits */ -#define RDS_TAGON 0x80000000 +#define RDS_VLAN 0x80000000 #define RDS_DESCS 0x3f000000 #define RDS_ABORT 0x00800000 #define RDS_SHORT 0x00400000 @@ -240,7 +244,7 @@ #define RX_ERR_BITS "\20" \ "\21CRCOK\22COLON\23NIBON\24OVRUN" \ "\25MIIER\26LIMIT\27SHORT\30ABORT" \ - "\40TAGON" + "\40VLAN" #define RING_END 0x80000000 #define SGE_RX_BYTES(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:35:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72D361065672; Thu, 6 May 2010 18:35:53 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 618928FC1A; Thu, 6 May 2010 18:35:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IZr52056217; Thu, 6 May 2010 18:35:53 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IZrOI056214; Thu, 6 May 2010 18:35:53 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061835.o46IZrOI056214@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:35:53 +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: r207715 - stable/7/sys/dev/sge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:35:53 -0000 Author: yongari Date: Thu May 6 18:35:53 2010 New Revision: 207715 URL: http://svn.freebsd.org/changeset/base/207715 Log: MFC r207380: Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190 controller, I'm not sure whether this is also applicable to SiS190 so this feature is only activated on SiS191 controller. In theory, controller reinitialization is not needed when VLAN tag configuration is changed, but xclin said controller was not stable whenever toggling VLAN tag bit. To address that, sge(4) reinitialize controller for VLAN configuration which seems to work as expected. VLAN tag information for TX/RX descriptor and configure bit of RxMacControl register was found by xclin. Submitted by: xclin cs dot nctu dot edu dot tw > (initial version) Tested by: xclin cs dot nctu dot edu dot tw > Modified: stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sge/if_sgereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Thu May 6 18:34:15 2010 (r207714) +++ stable/7/sys/dev/sge/if_sge.c Thu May 6 18:35:53 2010 (r207715) @@ -137,6 +137,7 @@ static int sge_get_mac_addr_eeprom(struc static uint16_t sge_read_eeprom(struct sge_softc *, int); static void sge_rxfilter(struct sge_softc *); +static void sge_setvlan(struct sge_softc *); static void sge_reset(struct sge_softc *); static int sge_list_rx_init(struct sge_softc *); static int sge_list_rx_free(struct sge_softc *); @@ -484,6 +485,25 @@ sge_rxfilter(struct sge_softc *sc) } static void +sge_setvlan(struct sge_softc *sc) +{ + struct ifnet *ifp; + uint16_t rxfilt; + + SGE_LOCK_ASSERT(sc); + + ifp = sc->sge_ifp; + if ((ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) == 0) + return; + rxfilt = CSR_READ_2(sc, RxMacControl); + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0) + rxfilt |= RXMAC_STRIP_VLAN; + else + rxfilt &= ~RXMAC_STRIP_VLAN; + CSR_WRITE_2(sc, RxMacControl, rxfilt); +} + +static void sge_reset(struct sge_softc *sc) { @@ -619,6 +639,9 @@ sge_attach(device_t dev) ether_ifattach(ifp, eaddr); /* VLAN setup. */ + if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | + IFCAP_VLAN_HWCSUM; ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capenable = ifp->if_capabilities; /* Tell the upper layer(s) we support long frames. */ @@ -1175,9 +1198,12 @@ sge_rxeof(struct sge_softc *sc) m->m_pkthdr.csum_data = 0xffff; } } - /* - * TODO : VLAN hardware tag stripping. - */ + /* Check for VLAN tagged frame. */ + if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0 && + (rxstat & RDS_VLAN) != 0) { + m->m_pkthdr.ether_vtag = rxinfo & RDC_VLAN_MASK; + m->m_flags |= M_VLANTAG; + } if ((sc->sge_flags & SGE_FLAG_SIS190) == 0) { /* * Account for 10bytes auto padding which is used @@ -1422,6 +1448,11 @@ sge_encap(struct sge_softc *sc, struct m desc->sge_flags = htole32(txsegs[0].ds_len); if (prod == SGE_TX_RING_CNT - 1) desc->sge_flags |= htole32(RING_END); + /* Configure VLAN. */ + if(((*m_head)->m_flags & M_VLANTAG) != 0) { + cflags |= (*m_head)->m_pkthdr.ether_vtag; + desc->sge_sts_size |= htole32(TDS_INS_VLAN); + } desc->sge_cmdsts = htole32(TDC_DEF | TDC_CRC | TDC_PAD | cflags); #if 1 if ((sc->sge_flags & SGE_FLAG_SPEED_1000) != 0) @@ -1563,6 +1594,7 @@ sge_init_locked(struct sge_softc *sc) rxfilt |= RXMAC_STRIP_FCS | RXMAC_PAD_ENB; CSR_WRITE_2(sc, RxMacControl, rxfilt); sge_rxfilter(sc); + sge_setvlan(sc); /* Initialize default speed/duplex information. */ if ((sc->sge_flags & SGE_FLAG_FASTETHER) == 0) @@ -1653,7 +1685,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm struct sge_softc *sc; struct ifreq *ifr; struct mii_data *mii; - int error = 0, mask; + int error = 0, mask, reinit; sc = ifp->if_softc; ifr = (struct ifreq *)data; @@ -1675,6 +1707,7 @@ sge_ioctl(struct ifnet *ifp, u_long comm break; case SIOCSIFCAP: SGE_LOCK(sc); + reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { @@ -1687,7 +1720,24 @@ sge_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_RXCSUM) != 0 && (ifp->if_capabilities & IFCAP_RXCSUM) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; + if ((mask & IFCAP_VLAN_HWCSUM) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWCSUM) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) { + /* + * Due to unknown reason, toggling VLAN hardware + * tagging require interface reinitialization. + */ + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + reinit = 1; + } + if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + sge_init_locked(sc); + } SGE_UNLOCK(sc); + VLAN_CAPABILITIES(ifp); break; case SIOCADDMULTI: case SIOCDELMULTI: Modified: stable/7/sys/dev/sge/if_sgereg.h ============================================================================== --- stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:34:15 2010 (r207714) +++ stable/7/sys/dev/sge/if_sgereg.h Thu May 6 18:35:53 2010 (r207715) @@ -137,6 +137,7 @@ #define AcceptAllPhys 0x0100 #define AcceptErr 0x0020 #define AcceptRunt 0x0010 +#define RXMAC_STRIP_VLAN 0x0020 #define RXMAC_STRIP_FCS 0x0010 #define RXMAC_PAD_ENB 0x0004 @@ -187,12 +188,14 @@ #define TDC_COL 0x00040000 #define TDC_CRC 0x00020000 #define TDC_PAD 0x00010000 +#define TDC_VLAN_MASK 0x0000FFFF #define SGE_TX_INTR_FRAMES 32 /* * TX descriptor status bits. */ +#define TDS_INS_VLAN 0x80000000 #define TDS_OWC 0x00080000 #define TDS_ABT 0x00040000 #define TDS_FIFO 0x00020000 @@ -219,11 +222,12 @@ #define RDC_UCAST 0x00040000 #define RDC_CRCOFF 0x00020000 #define RDC_PREADD 0x00010000 +#define RDC_VLAN_MASK 0x0000FFFF /* * RX descriptor status bits */ -#define RDS_TAGON 0x80000000 +#define RDS_VLAN 0x80000000 #define RDS_DESCS 0x3f000000 #define RDS_ABORT 0x00800000 #define RDS_SHORT 0x00400000 @@ -240,7 +244,7 @@ #define RX_ERR_BITS "\20" \ "\21CRCOK\22COLON\23NIBON\24OVRUN" \ "\25MIIER\26LIMIT\27SHORT\30ABORT" \ - "\40TAGON" + "\40VLAN" #define RING_END 0x80000000 #define SGE_RX_BYTES(x) ((x) & 0xFFFF) From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:37:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D03C106566C; Thu, 6 May 2010 18:37:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id F044A8FC0A; Thu, 6 May 2010 18:37:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IbdkI056656; Thu, 6 May 2010 18:37:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IbdfG056653; Thu, 6 May 2010 18:37:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061837.o46IbdfG056653@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207716 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:37:40 -0000 Author: yongari Date: Thu May 6 18:37:39 2010 New Revision: 207716 URL: http://svn.freebsd.org/changeset/base/207716 Log: MFC r207381: Now sge(4) supports hardware VLAN tag insertion/stripping. Modified: stable/8/share/man/man4/sge.4 stable/8/share/man/man4/vlan.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/sge.4 ============================================================================== --- stable/8/share/man/man4/sge.4 Thu May 6 18:35:53 2010 (r207715) +++ stable/8/share/man/man4/sge.4 Thu May 6 18:37:39 2010 (r207716) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd April 29, 2010 .Dt SGE 4 .Os .Sh NAME @@ -53,11 +53,11 @@ controllers and SiS191 Fast/Gigabit Ethe .Pp All LOMs supported by the .Nm -driver have TCP/UDP/IP checksum offload for transmit and receive. +driver have TCP/UDP/IP checksum offload for transmit and receive, +hardware VLAN tag stripping/insertion features. Due to lack of documentation more offloading features like TCP -segmentation offload (TSO), hardware VLAN tag stripping/insertion -features, Wake On Lan (WOL), Jumbo frame and an interrupt moderation -mechanism are not supported yet. +segmentation offload (TSO), Wake On Lan (WOL), Jumbo frame and an +interrupt moderation mechanism are not supported yet. .Pp The .Nm Modified: stable/8/share/man/man4/vlan.4 ============================================================================== --- stable/8/share/man/man4/vlan.4 Thu May 6 18:35:53 2010 (r207715) +++ stable/8/share/man/man4/vlan.4 Thu May 6 18:37:39 2010 (r207716) @@ -134,6 +134,7 @@ in the hardware is limited to the follow .Xr msk 4 , .Xr nge 4 , .Xr re 4 , +.Xr sge 4 , .Xr stge 4 , .Xr ti 4 , .Xr txp 4 , @@ -172,7 +173,6 @@ natively: .Xr nve 4 , .Xr rl 4 , .Xr sf 4 , -.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:38:19 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52331065672; Thu, 6 May 2010 18:38:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D482D8FC1B; Thu, 6 May 2010 18:38:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IcJWX056835; Thu, 6 May 2010 18:38:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IcJHe056832; Thu, 6 May 2010 18:38:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061838.o46IcJHe056832@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:38: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: r207717 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:38:20 -0000 Author: yongari Date: Thu May 6 18:38:19 2010 New Revision: 207717 URL: http://svn.freebsd.org/changeset/base/207717 Log: MFC r207381: Now sge(4) supports hardware VLAN tag insertion/stripping. Modified: stable/7/share/man/man4/sge.4 stable/7/share/man/man4/vlan.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/sge.4 ============================================================================== --- stable/7/share/man/man4/sge.4 Thu May 6 18:37:39 2010 (r207716) +++ stable/7/share/man/man4/sge.4 Thu May 6 18:38:19 2010 (r207717) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2010 +.Dd April 29, 2010 .Dt SGE 4 .Os .Sh NAME @@ -53,11 +53,11 @@ controllers and SiS191 Fast/Gigabit Ethe .Pp All LOMs supported by the .Nm -driver have TCP/UDP/IP checksum offload for transmit and receive. +driver have TCP/UDP/IP checksum offload for transmit and receive, +hardware VLAN tag stripping/insertion features. Due to lack of documentation more offloading features like TCP -segmentation offload (TSO), hardware VLAN tag stripping/insertion -features, Wake On Lan (WOL), Jumbo frame and an interrupt moderation -mechanism are not supported yet. +segmentation offload (TSO), Wake On Lan (WOL), Jumbo frame and an +interrupt moderation mechanism are not supported yet. .Pp The .Nm Modified: stable/7/share/man/man4/vlan.4 ============================================================================== --- stable/7/share/man/man4/vlan.4 Thu May 6 18:37:39 2010 (r207716) +++ stable/7/share/man/man4/vlan.4 Thu May 6 18:38:19 2010 (r207717) @@ -134,6 +134,7 @@ in the hardware is limited to the follow .Xr msk 4 , .Xr nge 4 , .Xr re 4 , +.Xr sge 4 , .Xr stge 4 , .Xr ti 4 , .Xr txp 4 , @@ -172,7 +173,6 @@ natively: .Xr nve 4 , .Xr rl 4 , .Xr sf 4 , -.Xr sge 4 , .Xr sis 4 , .Xr sk 4 , .Xr ste 4 , From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:43:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5FFD71065676; Thu, 6 May 2010 18:43:01 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 44FF48FC13; Thu, 6 May 2010 18:43:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Ih1Ns057905; Thu, 6 May 2010 18:43:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Ih1NB057902; Thu, 6 May 2010 18:43:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061843.o46Ih1NB057902@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207718 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:43:01 -0000 Author: yongari Date: Thu May 6 18:43:00 2010 New Revision: 207718 URL: http://svn.freebsd.org/changeset/base/207718 Log: MFC r207409,207442: r207409: Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If it is 8bits register then RX FIFO size can't exceed 2KB which is not true for almost all Yukon II controller. r207442: Disable non-ASF packet flushing on Yukon Extreme as vendor's driver does. Without this change, Yukon Extreme seems to generate lots of RX FIFO overruns even though controller has available RX buffers. These excessive RX FIFO overruns generated lots of pause frames which in turn killed devices plugged into switch. It seems there is still occasional RX frame corruption on Yukon Extreme but this change seems to fix the pause frame storm. Reported by: jhb Tested by: jhb Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/msk/if_mskreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Thu May 6 18:38:19 2010 (r207717) +++ stable/8/sys/dev/msk/if_msk.c Thu May 6 18:43:00 2010 (r207718) @@ -3673,9 +3673,9 @@ msk_init_locked(struct msk_if_softc *sc_ if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { /* Set Rx Pause threshould. */ - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), MSK_ECU_ULPP); /* Configure store-and-forward for Tx. */ msk_set_tx_stfwd(sc_if); @@ -3763,6 +3763,11 @@ msk_init_locked(struct msk_if_softc *sc_ msk_stop(sc_if); return; } + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + /* Disable flushing of non-ASF packets. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), + GMF_RX_MACSEC_FLUSH_OFF); + } /* Configure interrupt handling. */ if (sc_if->msk_port == MSK_PORT_A) { Modified: stable/8/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:38:19 2010 (r207717) +++ stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:43:00 2010 (r207718) @@ -621,8 +621,8 @@ #define RX_GMF_FL_MSK 0x0c4c /* 32 bit Rx GMAC FIFO Flush Mask */ #define RX_GMF_FL_THR 0x0c50 /* 32 bit Rx GMAC FIFO Flush Threshold */ #define RX_GMF_TR_THR 0x0c54 /* 32 bit Rx Truncation Threshold (Yukon-2) */ -#define RX_GMF_UP_THR 0x0c58 /* 8 bit Rx Upper Pause Thr (Yukon-EC_U) */ -#define RX_GMF_LP_THR 0x0c5a /* 8 bit Rx Lower Pause Thr (Yukon-EC_U) */ +#define RX_GMF_UP_THR 0x0c58 /* 16 bit Rx Upper Pause Thr (Yukon-EC_U) */ +#define RX_GMF_LP_THR 0x0c5a /* 16 bit Rx Lower Pause Thr (Yukon-EC_U) */ #define RX_GMF_VLAN 0x0c5c /* 32 bit Rx VLAN Type Register (Yukon-2) */ #define RX_GMF_WP 0x0c60 /* 32 bit Rx GMAC FIFO Write Pointer */ #define RX_GMF_WLEV 0x0c68 /* 32 bit Rx GMAC FIFO Write Level */ @@ -1941,6 +1941,8 @@ #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_MACSEC_FLUSH_ON BIT_23 +#define GMF_RX_MACSEC_FLUSH_OFF BIT_22 #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 */ From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:44:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11F9B1065675; Thu, 6 May 2010 18:44:50 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 00F968FC14; Thu, 6 May 2010 18:44:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Iinoa058410; Thu, 6 May 2010 18:44:49 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Iin09058407; Thu, 6 May 2010 18:44:49 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061844.o46Iin09058407@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:44: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: r207720 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:44:50 -0000 Author: yongari Date: Thu May 6 18:44:49 2010 New Revision: 207720 URL: http://svn.freebsd.org/changeset/base/207720 Log: MFC r207409,207442: r207409: Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If it is 8bits register then RX FIFO size can't exceed 2KB which is not true for almost all Yukon II controller. r207442: Disable non-ASF packet flushing on Yukon Extreme as vendor's driver does. Without this change, Yukon Extreme seems to generate lots of RX FIFO overruns even though controller has available RX buffers. These excessive RX FIFO overruns generated lots of pause frames which in turn killed devices plugged into switch. It seems there is still occasional RX frame corruption on Yukon Extreme but this change seems to fix the pause frame storm. Reported by: jhb Tested by: jhb Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu May 6 18:43:19 2010 (r207719) +++ stable/7/sys/dev/msk/if_msk.c Thu May 6 18:44:49 2010 (r207720) @@ -3673,9 +3673,9 @@ msk_init_locked(struct msk_if_softc *sc_ if ((sc_if->msk_flags & MSK_FLAG_RAMBUF) == 0) { /* Set Rx Pause threshould. */ - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_LP_THR), MSK_ECU_LLPP); - CSR_WRITE_1(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), + CSR_WRITE_2(sc, MR_ADDR(sc_if->msk_port, RX_GMF_UP_THR), MSK_ECU_ULPP); /* Configure store-and-forward for Tx. */ msk_set_tx_stfwd(sc_if); @@ -3763,6 +3763,11 @@ msk_init_locked(struct msk_if_softc *sc_ msk_stop(sc_if); return; } + if (sc->msk_hw_id == CHIP_ID_YUKON_EX) { + /* Disable flushing of non-ASF packets. */ + CSR_WRITE_4(sc, MR_ADDR(sc_if->msk_port, RX_GMF_CTRL_T), + GMF_RX_MACSEC_FLUSH_OFF); + } /* Configure interrupt handling. */ if (sc_if->msk_port == MSK_PORT_A) { Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:43:19 2010 (r207719) +++ stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:44:49 2010 (r207720) @@ -621,8 +621,8 @@ #define RX_GMF_FL_MSK 0x0c4c /* 32 bit Rx GMAC FIFO Flush Mask */ #define RX_GMF_FL_THR 0x0c50 /* 32 bit Rx GMAC FIFO Flush Threshold */ #define RX_GMF_TR_THR 0x0c54 /* 32 bit Rx Truncation Threshold (Yukon-2) */ -#define RX_GMF_UP_THR 0x0c58 /* 8 bit Rx Upper Pause Thr (Yukon-EC_U) */ -#define RX_GMF_LP_THR 0x0c5a /* 8 bit Rx Lower Pause Thr (Yukon-EC_U) */ +#define RX_GMF_UP_THR 0x0c58 /* 16 bit Rx Upper Pause Thr (Yukon-EC_U) */ +#define RX_GMF_LP_THR 0x0c5a /* 16 bit Rx Lower Pause Thr (Yukon-EC_U) */ #define RX_GMF_VLAN 0x0c5c /* 32 bit Rx VLAN Type Register (Yukon-2) */ #define RX_GMF_WP 0x0c60 /* 32 bit Rx GMAC FIFO Write Pointer */ #define RX_GMF_WLEV 0x0c68 /* 32 bit Rx GMAC FIFO Write Level */ @@ -1941,6 +1941,8 @@ #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_MACSEC_FLUSH_ON BIT_23 +#define GMF_RX_MACSEC_FLUSH_OFF BIT_22 #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 */ From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:47:16 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA85F1065675; Thu, 6 May 2010 18:47:16 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA5A8FC08; Thu, 6 May 2010 18:47:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IlGGF058989; Thu, 6 May 2010 18:47:16 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IlGHV058986; Thu, 6 May 2010 18:47:16 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061847.o46IlGHV058986@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:47:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207721 - stable/8/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:47:16 -0000 Author: yongari Date: Thu May 6 18:47:16 2010 New Revision: 207721 URL: http://svn.freebsd.org/changeset/base/207721 Log: MFC r207445: Add basic support for Marvell 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/msk/if_mskreg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Thu May 6 18:44:49 2010 (r207720) +++ stable/8/sys/dev/msk/if_msk.c Thu May 6 18:47:16 2010 (r207721) @@ -223,6 +223,8 @@ static struct msk_product { "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4380, "Marvell Yukon 88E8057 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4381, + "Marvell Yukon 88E8059 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -239,7 +241,9 @@ static const char *model_name[] = { "Yukon FE", "Yukon FE+", "Yukon Supreme", - "Yukon Ultra 2" + "Yukon Ultra 2", + "Yukon Unknown", + "Yukon Optima", }; static int mskc_probe(device_t); @@ -1142,6 +1146,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: case CHIP_ID_YUKON_UL_2: + case CHIP_ID_YUKON_OPT: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1285,6 +1290,10 @@ mskc_reset(struct msk_softc *sc) GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); } + if (sc->msk_hw_id == CHIP_ID_YUKON_OPT && sc->msk_hw_rev == 0) { + /* Disable PCIe PHY powerdown(reg 0x80, bit7). */ + CSR_WRITE_4(sc, Y2_PEX_PHY_DATA, (0x0080 << 16) | 0x0080); + } CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); /* LED On. */ @@ -1629,8 +1638,9 @@ 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_UL_2 || - sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { + sc->msk_hw_id > CHIP_ID_YUKON_OPT || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR || + sc->msk_hw_id == CHIP_ID_YUKON_UNKNOWN) { 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); @@ -1743,6 +1753,10 @@ mskc_attach(device_t dev) sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_OPT: + sc->msk_clock = 125; /* 125 MHz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2; + break; default: sc->msk_clock = 156; /* 156 MHz */ break; Modified: stable/8/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:44:49 2010 (r207720) +++ stable/8/sys/dev/msk/if_mskreg.h Thu May 6 18:47:16 2010 (r207721) @@ -145,6 +145,7 @@ #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C #define DEVICEID_MRVL_4380 0x4380 +#define DEVICEID_MRVL_4381 0x4381 /* * D-Link gigabit ethernet device ID @@ -828,6 +829,9 @@ #define Y2_IS_CHK_RX2 BIT_10 /* Descriptor error Rx 2 */ #define Y2_IS_CHK_TXS2 BIT_9 /* Descriptor error TXS 2 */ #define Y2_IS_CHK_TXA2 BIT_8 /* Descriptor error TXA 2 */ +#define Y2_IS_PSM_ACK BIT_7 /* PSM Ack (Yukon Optima) */ +#define Y2_IS_PTP_TIST BIT_6 /* PTP TIme Stamp (Yukon Optima) */ +#define Y2_IS_PHY_QLNK BIT_5 /* PHY Quick Link (Yukon Optima) */ #define Y2_IS_IRQ_PHY1 BIT_4 /* Interrupt from PHY 1 */ #define Y2_IS_IRQ_MAC1 BIT_3 /* Interrupt from MAC 1 */ #define Y2_IS_CHK_RX1 BIT_2 /* Descriptor error Rx 1 */ @@ -894,6 +898,8 @@ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ #define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ #define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ +#define CHIP_ID_YUKON_UNKNOWN 0xbb +#define CHIP_ID_YUKON_OPT 0xbc /* Chip ID for YUKON-2 Optima */ #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 */ From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:48:45 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 169B6106566C; Thu, 6 May 2010 18:48:45 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id EFD158FC15; Thu, 6 May 2010 18:48:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Imi6s059365; Thu, 6 May 2010 18:48:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46Imiil059362; Thu, 6 May 2010 18:48:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061848.o46Imiil059362@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:48:44 +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: r207722 - stable/7/sys/dev/msk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:48:45 -0000 Author: yongari Date: Thu May 6 18:48:44 2010 New Revision: 207722 URL: http://svn.freebsd.org/changeset/base/207722 Log: MFC r207445: Add basic support for Marvell 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/msk/if_mskreg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Thu May 6 18:47:16 2010 (r207721) +++ stable/7/sys/dev/msk/if_msk.c Thu May 6 18:48:44 2010 (r207722) @@ -223,6 +223,8 @@ static struct msk_product { "Marvell Yukon 88E8072 Gigabit Ethernet" }, { VENDORID_MARVELL, DEVICEID_MRVL_4380, "Marvell Yukon 88E8057 Gigabit Ethernet" }, + { VENDORID_MARVELL, DEVICEID_MRVL_4381, + "Marvell Yukon 88E8059 Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE550SX, "D-Link 550SX Gigabit Ethernet" }, { VENDORID_DLINK, DEVICEID_DLINK_DGE560SX, @@ -239,7 +241,9 @@ static const char *model_name[] = { "Yukon FE", "Yukon FE+", "Yukon Supreme", - "Yukon Ultra 2" + "Yukon Ultra 2", + "Yukon Unknown", + "Yukon Optima", }; static int mskc_probe(device_t); @@ -1142,6 +1146,7 @@ msk_phy_power(struct msk_softc *sc, int case CHIP_ID_YUKON_EX: case CHIP_ID_YUKON_FE_P: case CHIP_ID_YUKON_UL_2: + case CHIP_ID_YUKON_OPT: CSR_WRITE_2(sc, B0_CTST, Y2_HW_WOL_OFF); /* Enable all clocks. */ @@ -1285,6 +1290,10 @@ mskc_reset(struct msk_softc *sc) GMC_BYP_MACSECRX_ON | GMC_BYP_MACSECTX_ON | GMC_BYP_RETR_ON); } + if (sc->msk_hw_id == CHIP_ID_YUKON_OPT && sc->msk_hw_rev == 0) { + /* Disable PCIe PHY powerdown(reg 0x80, bit7). */ + CSR_WRITE_4(sc, Y2_PEX_PHY_DATA, (0x0080 << 16) | 0x0080); + } CSR_WRITE_1(sc, B2_TST_CTRL1, TST_CFG_WRITE_OFF); /* LED On. */ @@ -1629,8 +1638,9 @@ 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_UL_2 || - sc->msk_hw_id == CHIP_ID_YUKON_SUPR) { + sc->msk_hw_id > CHIP_ID_YUKON_OPT || + sc->msk_hw_id == CHIP_ID_YUKON_SUPR || + sc->msk_hw_id == CHIP_ID_YUKON_UNKNOWN) { 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); @@ -1743,6 +1753,10 @@ mskc_attach(device_t dev) sc->msk_clock = 125; /* 125 MHz */ sc->msk_pflags |= MSK_FLAG_JUMBO; break; + case CHIP_ID_YUKON_OPT: + sc->msk_clock = 125; /* 125 MHz */ + sc->msk_pflags |= MSK_FLAG_JUMBO | MSK_FLAG_DESCV2; + break; default: sc->msk_clock = 156; /* 156 MHz */ break; Modified: stable/7/sys/dev/msk/if_mskreg.h ============================================================================== --- stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:47:16 2010 (r207721) +++ stable/7/sys/dev/msk/if_mskreg.h Thu May 6 18:48:44 2010 (r207722) @@ -145,6 +145,7 @@ #define DEVICEID_MRVL_436B 0x436B #define DEVICEID_MRVL_436C 0x436C #define DEVICEID_MRVL_4380 0x4380 +#define DEVICEID_MRVL_4381 0x4381 /* * D-Link gigabit ethernet device ID @@ -828,6 +829,9 @@ #define Y2_IS_CHK_RX2 BIT_10 /* Descriptor error Rx 2 */ #define Y2_IS_CHK_TXS2 BIT_9 /* Descriptor error TXS 2 */ #define Y2_IS_CHK_TXA2 BIT_8 /* Descriptor error TXA 2 */ +#define Y2_IS_PSM_ACK BIT_7 /* PSM Ack (Yukon Optima) */ +#define Y2_IS_PTP_TIST BIT_6 /* PTP TIme Stamp (Yukon Optima) */ +#define Y2_IS_PHY_QLNK BIT_5 /* PHY Quick Link (Yukon Optima) */ #define Y2_IS_IRQ_PHY1 BIT_4 /* Interrupt from PHY 1 */ #define Y2_IS_IRQ_MAC1 BIT_3 /* Interrupt from MAC 1 */ #define Y2_IS_CHK_RX1 BIT_2 /* Descriptor error Rx 1 */ @@ -894,6 +898,8 @@ #define CHIP_ID_YUKON_FE_P 0xb8 /* Chip ID for YUKON-2 FE+ */ #define CHIP_ID_YUKON_SUPR 0xb9 /* Chip ID for YUKON-2 Supreme */ #define CHIP_ID_YUKON_UL_2 0xba /* Chip ID for YUKON-2 Ultra 2 */ +#define CHIP_ID_YUKON_UNKNOWN 0xbb +#define CHIP_ID_YUKON_OPT 0xbc /* Chip ID for YUKON-2 Optima */ #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 */ From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:50:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6EA8D1065674; Thu, 6 May 2010 18:50:23 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5E0FF8FC1C; Thu, 6 May 2010 18:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IoNNV059772; Thu, 6 May 2010 18:50:23 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IoN1o059769; Thu, 6 May 2010 18:50:23 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061850.o46IoN1o059769@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207723 - stable/8/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:50:23 -0000 Author: yongari Date: Thu May 6 18:50:23 2010 New Revision: 207723 URL: http://svn.freebsd.org/changeset/base/207723 Log: MFC r207446: Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/8/sys/dev/mii/e1000phy.c stable/8/sys/dev/mii/miidevs Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/mii/e1000phy.c ============================================================================== --- stable/8/sys/dev/mii/e1000phy.c Thu May 6 18:48:44 2010 (r207722) +++ stable/8/sys/dev/mii/e1000phy.c Thu May 6 18:50:23 2010 (r207723) @@ -112,6 +112,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1116R), MII_PHY_DESC(MARVELL, E1118), MII_PHY_DESC(MARVELL, E3016), + MII_PHY_DESC(MARVELL, PHYG65G), MII_PHY_DESC(xxMARVELL, E1000), MII_PHY_DESC(xxMARVELL, E1011), MII_PHY_DESC(xxMARVELL, E1000_3), @@ -230,6 +231,7 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1118: case MII_MODEL_MARVELL_E1149: + case MII_MODEL_MARVELL_PHYG65G: /* Disable energy detect mode. */ reg &= ~E1000_SCR_EN_DETECT_MASK; reg |= E1000_SCR_AUTO_X_MODE; Modified: stable/8/sys/dev/mii/miidevs ============================================================================== --- stable/8/sys/dev/mii/miidevs Thu May 6 18:48:44 2010 (r207722) +++ stable/8/sys/dev/mii/miidevs Thu May 6 18:50:23 2010 (r207723) @@ -254,6 +254,7 @@ model MARVELL E1116 0x0021 Marvell 88E1 model MARVELL E1116R 0x0024 Marvell 88E1116R Gigabit PHY model MARVELL E1118 0x0022 Marvell 88E1118 Gigabit PHY model MARVELL E3016 0x0026 Marvell 88E3016 10/100 Fast Ethernet PHY +model MARVELL PHYG65G 0x0027 Marvell PHYG65G Gigabit 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@FreeBSD.ORG Thu May 6 18:51:48 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5981E106564A; Thu, 6 May 2010 18:51:48 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 473F08FC15; Thu, 6 May 2010 18:51:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IpmQe060146; Thu, 6 May 2010 18:51:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IpmLD060143; Thu, 6 May 2010 18:51:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061851.o46IpmLD060143@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:51: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: r207724 - stable/7/sys/dev/mii X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:51:48 -0000 Author: yongari Date: Thu May 6 18:51:47 2010 New Revision: 207724 URL: http://svn.freebsd.org/changeset/base/207724 Log: MFC r207446: Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima. Tested by: James LaLagna < jameslalagna <> gmail dot com > Modified: stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/miidevs Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/mii/e1000phy.c ============================================================================== --- stable/7/sys/dev/mii/e1000phy.c Thu May 6 18:50:23 2010 (r207723) +++ stable/7/sys/dev/mii/e1000phy.c Thu May 6 18:51:47 2010 (r207724) @@ -111,6 +111,7 @@ static const struct mii_phydesc e1000phy MII_PHY_DESC(MARVELL, E1116), MII_PHY_DESC(MARVELL, E1118), MII_PHY_DESC(MARVELL, E3016), + MII_PHY_DESC(MARVELL, PHYG65G), MII_PHY_DESC(xxMARVELL, E1000), MII_PHY_DESC(xxMARVELL, E1011), MII_PHY_DESC(xxMARVELL, E1000_3), @@ -229,6 +230,7 @@ e1000phy_reset(struct mii_softc *sc) case MII_MODEL_MARVELL_E1116: case MII_MODEL_MARVELL_E1118: case MII_MODEL_MARVELL_E1149: + case MII_MODEL_MARVELL_PHYG65G: /* Disable energy detect mode. */ reg &= ~E1000_SCR_EN_DETECT_MASK; reg |= E1000_SCR_AUTO_X_MODE; Modified: stable/7/sys/dev/mii/miidevs ============================================================================== --- stable/7/sys/dev/mii/miidevs Thu May 6 18:50:23 2010 (r207723) +++ stable/7/sys/dev/mii/miidevs Thu May 6 18:51:47 2010 (r207724) @@ -243,6 +243,7 @@ model MARVELL E1111 0x000c Marvell 88E1 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 MARVELL PHYG65G 0x0027 Marvell PHYG65G Gigabit 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@FreeBSD.ORG Thu May 6 18:53:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1680E1065783; Thu, 6 May 2010 18:53:00 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 05F7C8FC1F; Thu, 6 May 2010 18:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46Iqxmw060467; Thu, 6 May 2010 18:52:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IqxBa060465; Thu, 6 May 2010 18:52:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061852.o46IqxBa060465@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:52:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207726 - stable/8/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:53:00 -0000 Author: yongari Date: Thu May 6 18:52:59 2010 New Revision: 207726 URL: http://svn.freebsd.org/changeset/base/207726 Log: MFC r207447: Marvell 88E8059(Yukon Optima) is now supported. Modified: stable/8/share/man/man4/msk.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/msk.4 ============================================================================== --- stable/8/share/man/man4/msk.4 Thu May 6 18:52:41 2010 (r207725) +++ stable/8/share/man/man4/msk.4 Thu May 6 18:52:59 2010 (r207726) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2010 +.Dd April 30, 2010 .Dt MSK 4 .Os .Sh NAME @@ -208,6 +208,8 @@ Marvell Yukon 88E8057 Gigabit Ethernet .It Marvell Yukon 88E8058 Gigabit Ethernet .It +Marvell Yukon 88E8059 Gigabit Ethernet +.It Marvell Yukon 88E8070 Gigabit Ethernet .It Marvell Yukon 88E8071 Gigabit Ethernet From owner-svn-src-stable@FreeBSD.ORG Thu May 6 18:53:44 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 72B34106564A; Thu, 6 May 2010 18:53:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 6186D8FC1E; Thu, 6 May 2010 18:53:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o46IrhtJ060683; Thu, 6 May 2010 18:53:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o46IrhGj060681; Thu, 6 May 2010 18:53:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201005061853.o46IrhGj060681@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 6 May 2010 18:53: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: r207727 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 May 2010 18:53:44 -0000 Author: yongari Date: Thu May 6 18:53:43 2010 New Revision: 207727 URL: http://svn.freebsd.org/changeset/base/207727 Log: MFC r207447: Marvell 88E8059(Yukon Optima) is now supported. Modified: stable/7/share/man/man4/msk.4 Directory Properties: stable/7/share/man/man4/ (props changed) Modified: stable/7/share/man/man4/msk.4 ============================================================================== --- stable/7/share/man/man4/msk.4 Thu May 6 18:52:59 2010 (r207726) +++ stable/7/share/man/man4/msk.4 Thu May 6 18:53:43 2010 (r207727) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2010 +.Dd April 30, 2010 .Dt MSK 4 .Os .Sh NAME @@ -208,6 +208,8 @@ Marvell Yukon 88E8057 Gigabit Ethernet .It Marvell Yukon 88E8058 Gigabit Ethernet .It +Marvell Yukon 88E8059 Gigabit Ethernet +.It Marvell Yukon 88E8070 Gigabit Ethernet .It Marvell Yukon 88E8071 Gigabit Ethernet From owner-svn-src-stable@FreeBSD.ORG Fri May 7 11:12:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A5C71065674; Fri, 7 May 2010 11:12:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id ED6F98FC0C; Fri, 7 May 2010 11:11:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o47BBxML078767; Fri, 7 May 2010 11:11:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47BBxjs078766; Fri, 7 May 2010 11:11:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005071111.o47BBxjs078766@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 May 2010 11:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207743 - stable/8/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 11:12:00 -0000 Author: kib Date: Fri May 7 11:11:58 2010 New Revision: 207743 URL: http://svn.freebsd.org/changeset/base/207743 Log: MFC r207606: Fix typo in comment. Modified: stable/8/sys/kern/kern_thread.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/kern/kern_thread.c ============================================================================== --- stable/8/sys/kern/kern_thread.c Fri May 7 08:45:21 2010 (r207742) +++ stable/8/sys/kern/kern_thread.c Fri May 7 11:11:58 2010 (r207743) @@ -398,7 +398,7 @@ thread_exit(void) /* * The test below is NOT true if we are the - * sole exiting thread. P_STOPPED_SNGL is unset + * sole exiting thread. P_STOPPED_SINGLE is unset * in exit1() after it is the only survivor. */ if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { From owner-svn-src-stable@FreeBSD.ORG Fri May 7 11:17:20 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B42651065674; Fri, 7 May 2010 11:17:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A32018FC1E; Fri, 7 May 2010 11:17:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o47BHKe2080019; Fri, 7 May 2010 11:17:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47BHK4E080017; Fri, 7 May 2010 11:17:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005071117.o47BHK4E080017@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 7 May 2010 11:17: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: r207744 - stable/7/sys/kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 11:17:20 -0000 Author: kib Date: Fri May 7 11:17:20 2010 New Revision: 207744 URL: http://svn.freebsd.org/changeset/base/207744 Log: MFC r207606: Fix typo in comment. Modified: stable/7/sys/kern/kern_thread.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_thread.c ============================================================================== --- stable/7/sys/kern/kern_thread.c Fri May 7 11:11:58 2010 (r207743) +++ stable/7/sys/kern/kern_thread.c Fri May 7 11:17:20 2010 (r207744) @@ -469,7 +469,7 @@ thread_exit(void) /* * The test below is NOT true if we are the - * sole exiting thread. P_STOPPED_SNGL is unset + * sole exiting thread. P_STOPPED_SINGLE is unset * in exit1() after it is the only survivor. */ if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) { From owner-svn-src-stable@FreeBSD.ORG Fri May 7 20:02:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 012A4106566C; Fri, 7 May 2010 20:02:37 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E255A8FC0C; Fri, 7 May 2010 20:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o47K2aHC096484; Fri, 7 May 2010 20:02:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47K2aSk096479; Fri, 7 May 2010 20:02:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201005072002.o47K2aSk096479@svn.freebsd.org> From: Michael Tuexen Date: Fri, 7 May 2010 20:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207756 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 20:02:37 -0000 Author: tuexen Date: Fri May 7 20:02:36 2010 New Revision: 207756 URL: http://svn.freebsd.org/changeset/base/207756 Log: MFC 206758, 206840, 206891, 206892, 207099, 207191, 207197 * Fix a bug where SACKs are not sent when they should. * Get delayed SACK working again. * Really print the nr_mapping array when it should be printed. * Update highest_tsn variables when sliding mapping arrays. * Sending a FWDTSN chunk should not affect the retran count. * Cleanups. Modified: stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c ============================================================================== --- stable/8/sys/netinet/sctp_asconf.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_asconf.c Fri May 7 20:02:36 2010 (r207756) @@ -1113,7 +1113,7 @@ sctp_assoc_immediate_retrans(struct sctp } SCTP_TCB_LOCK_ASSERT(stcb); #ifdef SCTP_AUDITING_ENABLED - sctp_auditing(4, stcb->sctp_ep, stcb->asoc.deleted_primary); + sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary); #endif sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED); if ((stcb->asoc.num_send_timers_up == 0) && Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_indata.c Fri May 7 20:02:36 2010 (r207756) @@ -1466,7 +1466,7 @@ sctp_process_a_data_chunk(struct sctp_tc asoc->send_sack = 1; } protocol_id = ch->dp.protocol_id; - ordered = ((ch->ch.chunk_flags & SCTP_DATA_UNORDERED) == 0); + ordered = ((chunk_flags & SCTP_DATA_UNORDERED) == 0); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(tsn, asoc->cumulative_tsn, asoc->highest_tsn_inside_map, SCTP_MAP_TSN_ENTERS); } @@ -2123,6 +2123,10 @@ failed_pdapi_express_del: } } finish_express_del: + if (tsn == (asoc->cumulative_tsn + 1)) { + /* Update cum-ack */ + asoc->cumulative_tsn = tsn; + } if (last_chunk) { *m = NULL; } @@ -2300,7 +2304,12 @@ sctp_slide_mapping_arrays(struct sctp_tc if ((asoc->cumulative_tsn == highest_tsn) && (at >= 8)) { /* The complete array was completed by a single FR */ /* highest becomes the cum-ack */ - int clr, i; + int clr; + +#ifdef INVARIANTS + unsigned int i; + +#endif /* clear the array */ clr = ((at + 7) >> 3); @@ -2309,12 +2318,14 @@ sctp_slide_mapping_arrays(struct sctp_tc } memset(asoc->mapping_array, 0, clr); memset(asoc->nr_mapping_array, 0, clr); +#ifdef INVARIANTS for (i = 0; i < asoc->mapping_array_size; i++) { if ((asoc->mapping_array[i]) || (asoc->nr_mapping_array[i])) { printf("Error Mapping array's not clean at clear\n"); sctp_print_mapping_array(asoc); } } +#endif asoc->mapping_array_base_tsn = asoc->cumulative_tsn + 1; asoc->highest_tsn_inside_nr_map = asoc->highest_tsn_inside_map = asoc->cumulative_tsn; } else if (at >= 8) { @@ -2371,16 +2382,20 @@ sctp_slide_mapping_arrays(struct sctp_tc int ii; for (ii = 0; ii < distance; ii++) { - asoc->mapping_array[ii] = - asoc->mapping_array[slide_from + ii]; - asoc->nr_mapping_array[ii] = - asoc->nr_mapping_array[slide_from + ii]; + asoc->mapping_array[ii] = asoc->mapping_array[slide_from + ii]; + asoc->nr_mapping_array[ii] = asoc->nr_mapping_array[slide_from + ii]; } for (ii = distance; ii < asoc->mapping_array_size; ii++) { asoc->mapping_array[ii] = 0; asoc->nr_mapping_array[ii] = 0; } + if (asoc->highest_tsn_inside_map + 1 == asoc->mapping_array_base_tsn) { + asoc->highest_tsn_inside_map += (slide_from << 3); + } + if (asoc->highest_tsn_inside_nr_map + 1 == asoc->mapping_array_base_tsn) { + asoc->highest_tsn_inside_nr_map += (slide_from << 3); + } asoc->mapping_array_base_tsn += (slide_from << 3); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, @@ -2808,25 +2823,7 @@ sctp_process_data(struct mbuf **mm, int stcb->asoc.send_sack = 1; } /* Start a sack timer or QUEUE a SACK for sending */ - if ((stcb->asoc.cumulative_tsn == stcb->asoc.highest_tsn_inside_map) && - (stcb->asoc.mapping_array[0] != 0xff)) { - if ((stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) || - (stcb->asoc.delayed_ack == 0) || - (stcb->asoc.numduptsns) || - (stcb->asoc.send_sack == 1)) { - if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer); - } - sctp_send_sack(stcb); - } else { - if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) { - sctp_timer_start(SCTP_TIMER_TYPE_RECV, - stcb->sctp_ep, stcb, NULL); - } - } - } else { - sctp_sack_check(stcb, was_a_gap, &abort_flag); - } + sctp_sack_check(stcb, was_a_gap, &abort_flag); if (abort_flag) return (2); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctp_output.c Fri May 7 20:02:36 2010 (r207756) @@ -8973,7 +8973,7 @@ sctp_chunk_retransmission(struct sctp_in /* (void)SCTP_GETTIME_TIMEVAL(&chk->whoTo->last_sent_time); */ *cnt_out += 1; chk->sent = SCTP_DATAGRAM_SENT; - sctp_ucount_decr(asoc->sent_queue_retran_cnt); + /* sctp_ucount_decr(asoc->sent_queue_retran_cnt); */ if (fwd_tsn == 0) { return (0); } else { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Fri May 7 19:48:50 2010 (r207755) +++ stable/8/sys/netinet/sctputil.c Fri May 7 20:02:36 2010 (r207756) @@ -674,7 +674,7 @@ sctp_auditing(int from, struct sctp_inpc sctp_audit_indx = 0; } rep = 1; - SCTP_PRINTF("tot_flt_book:%d\n", tot_book); + SCTP_PRINTF("tot_flt_book:%d\n", tot_book_cnt); stcb->asoc.total_flight_count = tot_book_cnt; } @@ -703,8 +703,8 @@ sctp_auditing(int from, struct sctp_inpc } } if (lnet->flight_size != tot_out) { - SCTP_PRINTF("net:%x flight was %d corrected to %d\n", - (uint32_t) lnet, lnet->flight_size, + SCTP_PRINTF("net:%p flight was %d corrected to %d\n", + lnet, lnet->flight_size, tot_out); lnet->flight_size = tot_out; } @@ -1215,7 +1215,7 @@ sctp_print_mapping_array(struct sctp_ass } printf("Non renegable mapping array (last %d entries are zero):\n", asoc->mapping_array_size - limit); for (i = 0; i < limit; i++) { - printf("%2.2x%c", asoc->mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); + printf("%2.2x%c", asoc->nr_mapping_array[i], ((i + 1) % 16) ? ' ' : '\n'); } if (limit % 16) printf("\n"); From owner-svn-src-stable@FreeBSD.ORG Fri May 7 20:58:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E87E71065673; Fri, 7 May 2010 20:58:50 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id D708B8FC13; Fri, 7 May 2010 20:58:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o47KwocB009005; Fri, 7 May 2010 20:58:50 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o47KwoBx008998; Fri, 7 May 2010 20:58:50 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201005072058.o47KwoBx008998@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 7 May 2010 20:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207758 - stable/8/contrib/telnet/telnet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2010 20:58:51 -0000 Author: jilles Date: Fri May 7 20:58:50 2010 New Revision: 207758 URL: http://svn.freebsd.org/changeset/base/207758 Log: MFC r207449: telnet: Fix infinite loop if local output generates SIGPIPE. Instead of catching SIGPIPE and jumping out of the signal handler with longjmp, ignore it and handle write errors to the local output by exiting from there. I have changed the error message to mention the local output instead of NetBSD's wrong "Connection closed by foreign host". Write errors to the network were already handled by exiting immediately and this now applies to EPIPE too. The code assumed that SIGPIPE could only be generated by the network connection; if it was generated by the local output, it would longjmp out of the signal handler and write an error message which caused another SIGPIPE. PR: 19773 Obtained from: NetBSD Modified: stable/8/contrib/telnet/telnet/commands.c stable/8/contrib/telnet/telnet/externs.h stable/8/contrib/telnet/telnet/network.c stable/8/contrib/telnet/telnet/sys_bsd.c stable/8/contrib/telnet/telnet/telnet.c stable/8/contrib/telnet/telnet/terminal.c Directory Properties: stable/8/contrib/telnet/ (props changed) Modified: stable/8/contrib/telnet/telnet/commands.c ============================================================================== --- stable/8/contrib/telnet/telnet/commands.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/commands.c Fri May 7 20:58:50 2010 (r207758) @@ -2491,8 +2491,7 @@ tn(int argc, char *argv[]) env_export("USER"); } (void) call(status, "status", "notmuch", 0); - if (setjmp(peerdied) == 0) - telnet(user); + telnet(user); (void) NetClose(net); ExitString("Connection closed by foreign host.\n",1); /*NOTREACHED*/ Modified: stable/8/contrib/telnet/telnet/externs.h ============================================================================== --- stable/8/contrib/telnet/telnet/externs.h Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/externs.h Fri May 7 20:58:50 2010 (r207758) @@ -233,7 +233,6 @@ extern void SetNetTrace(char *); /* Function to change where debugging goes */ extern jmp_buf - peerdied, toplevel; /* For error conditions. */ extern void Modified: stable/8/contrib/telnet/telnet/network.c ============================================================================== --- stable/8/contrib/telnet/telnet/network.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/network.c Fri May 7 20:58:50 2010 (r207758) @@ -158,7 +158,7 @@ netflush(void) perror(hostname); (void)NetClose(net); ring_clear_mark(&netoring); - longjmp(peerdied, -1); + ExitString("Connection closed by foreign host.\n", 1); /*NOTREACHED*/ } n = 0; Modified: stable/8/contrib/telnet/telnet/sys_bsd.c ============================================================================== --- stable/8/contrib/telnet/telnet/sys_bsd.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/sys_bsd.c Fri May 7 20:58:50 2010 (r207758) @@ -809,14 +809,6 @@ NetNonblockingIO(int fd, int onoff) */ /* ARGSUSED */ -static SIG_FUNC_RET -deadpeer(int sig __unused) -{ - setcommandmode(); - longjmp(peerdied, -1); -} - -/* ARGSUSED */ SIG_FUNC_RET intr(int sig __unused) { @@ -884,7 +876,7 @@ sys_telnet_init(void) { (void) signal(SIGINT, intr); (void) signal(SIGQUIT, intr2); - (void) signal(SIGPIPE, deadpeer); + (void) signal(SIGPIPE, SIG_IGN); #ifdef SIGWINCH (void) signal(SIGWINCH, sendwin); #endif Modified: stable/8/contrib/telnet/telnet/telnet.c ============================================================================== --- stable/8/contrib/telnet/telnet/telnet.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/telnet.c Fri May 7 20:58:50 2010 (r207758) @@ -146,7 +146,6 @@ unsigned char telopt_environ = TELOPT_NE #endif jmp_buf toplevel; -jmp_buf peerdied; int flushline; int linemode; Modified: stable/8/contrib/telnet/telnet/terminal.c ============================================================================== --- stable/8/contrib/telnet/telnet/terminal.c Fri May 7 20:46:22 2010 (r207757) +++ stable/8/contrib/telnet/telnet/terminal.c Fri May 7 20:58:50 2010 (r207758) @@ -111,7 +111,8 @@ init_terminal(void) } /* - * Send as much data as possible to the terminal. + * Send as much data as possible to the terminal, else exits if + * it encounters a permanent failure when writing to the tty. * * Return value: * -1: No useful work done, data waiting to go out. @@ -152,8 +153,19 @@ ttyflush(int drop) } ring_consumed(&ttyoring, n); } - if (n < 0) + if (n < 0) { + if (errno == EAGAIN || errno == EINTR) { + return -1; + } else { + ring_consumed(&ttyoring, ring_full_count(&ttyoring)); + setconnmode(0); + setcommandmode(); + NetClose(net); + fprintf(stderr, "Write error on local output.\n"); + exit(1); + } return -1; + } if (n == n0) { if (n0) return -1; From owner-svn-src-stable@FreeBSD.ORG Sat May 8 12:40:39 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E2591065673; Sat, 8 May 2010 12:40:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 63FF78FC1E; Sat, 8 May 2010 12:40:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Cedwk016429; Sat, 8 May 2010 12:40:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Cedt7016428; Sat, 8 May 2010 12:40:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005081240.o48Cedt7016428@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 May 2010 12:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207769 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 12:40:39 -0000 Author: kib Date: Sat May 8 12:40:38 2010 New Revision: 207769 URL: http://svn.freebsd.org/changeset/base/207769 Log: MFC r207463: Remove debugging code that was not used once since commit. Modified: stable/8/sys/amd64/amd64/trap.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Sat May 8 11:56:00 2010 (r207768) +++ stable/8/sys/amd64/amd64/trap.c Sat May 8 12:40:38 2010 (r207769) @@ -172,52 +172,6 @@ SYSCTL_INT(_machdep, OID_AUTO, prot_faul extern char *syscallnames[]; -/* #define DEBUG 1 */ -#ifdef DEBUG -static void -report_seg_fault(const char *segn, struct trapframe *frame) -{ - struct proc_ldt *pldt; - struct trapframe *pf; - - pldt = curproc->p_md.md_ldt; - printf("%d: %s load fault %lx %p %d\n", - curproc->p_pid, segn, frame->tf_err, - pldt != NULL ? pldt->ldt_base : NULL, - pldt != NULL ? pldt->ldt_refcnt : 0); - kdb_backtrace(); - pf = (struct trapframe *)frame->tf_rsp; - printf("rdi %lx\n", pf->tf_rdi); - printf("rsi %lx\n", pf->tf_rsi); - printf("rdx %lx\n", pf->tf_rdx); - printf("rcx %lx\n", pf->tf_rcx); - printf("r8 %lx\n", pf->tf_r8); - printf("r9 %lx\n", pf->tf_r9); - printf("rax %lx\n", pf->tf_rax); - printf("rbx %lx\n", pf->tf_rbx); - printf("rbp %lx\n", pf->tf_rbp); - printf("r10 %lx\n", pf->tf_r10); - printf("r11 %lx\n", pf->tf_r11); - printf("r12 %lx\n", pf->tf_r12); - printf("r13 %lx\n", pf->tf_r13); - printf("r14 %lx\n", pf->tf_r14); - printf("r15 %lx\n", pf->tf_r15); - printf("fs %x\n", pf->tf_fs); - printf("gs %x\n", pf->tf_gs); - printf("es %x\n", pf->tf_es); - printf("ds %x\n", pf->tf_ds); - printf("tno %x\n", pf->tf_trapno); - printf("adr %lx\n", pf->tf_addr); - printf("flg %x\n", pf->tf_flags); - printf("err %lx\n", pf->tf_err); - printf("rip %lx\n", pf->tf_rip); - printf("cs %lx\n", pf->tf_cs); - printf("rfl %lx\n", pf->tf_rflags); - printf("rsp %lx\n", pf->tf_rsp); - printf("ss %lx\n", pf->tf_ss); -} -#endif - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -314,9 +268,7 @@ trap(struct trapframe *frame) */ printf("kernel trap %d with interrupts disabled\n", type); -#ifdef DEBUG - report_seg_fault("hlt", frame); -#endif + /* * We shouldn't enable interrupts while holding a * spin lock or servicing an NMI. @@ -532,33 +484,21 @@ trap(struct trapframe *frame) goto out; } if (frame->tf_rip == (long)ld_ds) { -#ifdef DEBUG - report_seg_fault("ds", frame); -#endif frame->tf_rip = (long)ds_load_fault; frame->tf_ds = _udatasel; goto out; } if (frame->tf_rip == (long)ld_es) { -#ifdef DEBUG - report_seg_fault("es", frame); -#endif frame->tf_rip = (long)es_load_fault; frame->tf_es = _udatasel; goto out; } if (frame->tf_rip == (long)ld_fs) { -#ifdef DEBUG - report_seg_fault("fs", frame); -#endif frame->tf_rip = (long)fs_load_fault; frame->tf_fs = _ufssel; goto out; } if (frame->tf_rip == (long)ld_gs) { -#ifdef DEBUG - report_seg_fault("gs", frame); -#endif frame->tf_rip = (long)gs_load_fault; frame->tf_gs = _ugssel; goto out; @@ -664,30 +604,6 @@ trap(struct trapframe *frame) ksi.ksi_addr = (void *)addr; trapsignal(td, &ksi); -#ifdef DEBUG -{ - register_t rg,rgk, rf; - - if (type <= MAX_TRAP_MSG) { - uprintf("fatal process exception: %s", - trap_msg[type]); - if ((type == T_PAGEFLT) || (type == T_PROTFLT)) - uprintf(", fault VA = 0x%lx", frame->tf_addr); - uprintf("\n"); - } - rf = rdmsr(0xc0000100); - rg = rdmsr(0xc0000101); - rgk = rdmsr(0xc0000102); - uprintf("pid %d TRAP %d rip %lx err %lx addr %lx cs %lx ss %lx ds %x " - "es %x fs %x fsbase %lx %lx gs %x gsbase %lx %lx %lx\n", - curproc->p_pid, type, frame->tf_rip, frame->tf_err, - frame->tf_addr, - frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, - frame->tf_fs, td->td_pcb->pcb_fsbase, rf, - frame->tf_gs, td->td_pcb->pcb_gsbase, rg, rgk); -} -#endif - user: userret(td, frame); mtx_assert(&Giant, MA_NOTOWNED); From owner-svn-src-stable@FreeBSD.ORG Sat May 8 12:58:22 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C73E4106566B; Sat, 8 May 2010 12:58:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6B248FC0C; Sat, 8 May 2010 12:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48CwM9d020379; Sat, 8 May 2010 12:58:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48CwM8D020377; Sat, 8 May 2010 12:58:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081258.o48CwM8D020377@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 12:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207770 - stable/8/sys/cam/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 12:58:22 -0000 Author: mav Date: Sat May 8 12:58:22 2010 New Revision: 207770 URL: http://svn.freebsd.org/changeset/base/207770 Log: MFC r207428: Report PMP absence using target 15, same as for precence (not a wildcard), to not confuse target ID checks at SIMs. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sat May 8 12:40:38 2010 (r207769) +++ stable/8/sys/cam/ata/ata_xpt.c Sat May 8 12:58:22 2010 (r207770) @@ -1118,13 +1118,13 @@ ata_scan_bus(struct cam_periph *periph, work_ccb = request_ccb; /* Reuse the same CCB to query if a device was really found */ scan_info = (ata_scan_bus_info *)work_ccb->ccb_h.ppriv_ptr0; - /* Free the current request path- we're done with it. */ - xpt_free_path(work_ccb->ccb_h.path); /* If there is PMP... */ if ((scan_info->cpi->hba_inquiry & PI_SATAPM) && (scan_info->counter == scan_info->cpi->max_target)) { if (work_ccb->ccb_h.status == CAM_REQ_CMP) { - /* everything else willbe probed by it */ + /* everything else will be probed by it */ + /* Free the current request path- we're done with it. */ + xpt_free_path(work_ccb->ccb_h.path); goto done; } else { struct ccb_trans_settings cts; @@ -1132,7 +1132,7 @@ ata_scan_bus(struct cam_periph *periph, /* Report SIM that PM is absent. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, - scan_info->request_ccb->ccb_h.path, 1); + work_ccb->ccb_h.path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.pm_present = 0; @@ -1140,6 +1140,8 @@ ata_scan_bus(struct cam_periph *periph, xpt_action((union ccb *)&cts); } } + /* Free the current request path- we're done with it. */ + xpt_free_path(work_ccb->ccb_h.path); if (scan_info->counter == ((scan_info->cpi->hba_inquiry & PI_SATAPM) ? 0 : scan_info->cpi->max_target)) { From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:02:52 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DDD5C1065676; Sat, 8 May 2010 13:02:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id CD08F8FC0C; Sat, 8 May 2010 13:02:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48D2qIe021495; Sat, 8 May 2010 13:02:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D2qZk021493; Sat, 8 May 2010 13:02:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081302.o48D2qZk021493@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207771 - stable/8/sys/dev/ahci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:02:53 -0000 Author: mav Date: Sat May 8 13:02:52 2010 New Revision: 207771 URL: http://svn.freebsd.org/changeset/base/207771 Log: MFC r207430: Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. Enforce PMA bit clearing when PMP detached to avoid further scan timeouts. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 12:58:22 2010 (r207770) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 13:02:52 2010 (r207771) @@ -2077,6 +2077,7 @@ ahci_start(device_t dev, int fbs) } /* Start operations on this channel */ cmd = ATA_INL(ch->r_mem, AHCI_P_CMD); + cmd &= ~AHCI_P_CMD_PMA; ATA_OUTL(ch->r_mem, AHCI_P_CMD, cmd | AHCI_P_CMD_ST | (ch->pm_present ? AHCI_P_CMD_PMA : 0)); } @@ -2375,6 +2376,24 @@ ahci_sata_phy_reset(device_t dev) return (1); } +static int +ahci_check_ids(device_t dev, union ccb *ccb) +{ + struct ahci_channel *ch = device_get_softc(dev); + + if (ccb->ccb_h.target_id > ((ch->caps & AHCI_CAP_SPM) ? 15 : 0)) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void ahciaction(struct cam_sim *sim, union ccb *ccb) { @@ -2390,9 +2409,12 @@ ahciaction(struct cam_sim *sim, union cc /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: - if (ch->devices == 0) { + if (ahci_check_ids(dev, ccb)) + return; + if (ch->devices == 0 || + (ch->pm_present == 0 && + ccb->ccb_h.target_id > 0 && ccb->ccb_h.target_id < 15)) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } /* Check for command collision. */ @@ -2404,7 +2426,7 @@ ahciaction(struct cam_sim *sim, union cc return; } ahci_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -2412,13 +2434,14 @@ ahciaction(struct cam_sim *sim, union cc case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct ahci_device *d; + if (ahci_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -2436,7 +2459,6 @@ ahciaction(struct cam_sim *sim, union cc if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -2446,6 +2468,8 @@ ahciaction(struct cam_sim *sim, union cc struct ahci_device *d; uint32_t status; + if (ahci_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -2481,48 +2505,16 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ ahci_reset(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -2558,14 +2550,13 @@ ahciaction(struct cam_sim *sim, union cc if (pci_get_devid(device_get_parent(dev)) == 0x43801002) cpi->maxio = min(cpi->maxio, 128 * 512); cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:05:27 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A949B106566C; Sat, 8 May 2010 13:05:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 98A378FC13; Sat, 8 May 2010 13:05:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48D5RC6022129; Sat, 8 May 2010 13:05:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D5Rx6022127; Sat, 8 May 2010 13:05:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081305.o48D5Rx6022127@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:05:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207772 - stable/8/sys/dev/siis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:05:27 -0000 Author: mav Date: Sat May 8 13:05:27 2010 New Revision: 207772 URL: http://svn.freebsd.org/changeset/base/207772 Log: MFC r207431: Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. Modified: stable/8/sys/dev/siis/siis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sat May 8 13:02:52 2010 (r207771) +++ stable/8/sys/dev/siis/siis.c Sat May 8 13:05:27 2010 (r207772) @@ -1610,6 +1610,23 @@ siis_sata_connect(struct siis_channel *c return (1); } +static int +siis_check_ids(device_t dev, union ccb *ccb) +{ + + if (ccb->ccb_h.target_id > 15) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void siisaction(struct cam_sim *sim, union ccb *ccb) { @@ -1626,9 +1643,12 @@ siisaction(struct cam_sim *sim, union cc /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: - if (ch->devices == 0) { + if (siis_check_ids(dev, ccb)) + return; + if (ch->devices == 0 || + (ch->pm_present == 0 && + ccb->ccb_h.target_id > 0 && ccb->ccb_h.target_id < 15)) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } /* Check for command collision. */ @@ -1640,7 +1660,7 @@ siisaction(struct cam_sim *sim, union cc return; } siis_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -1648,13 +1668,14 @@ siisaction(struct cam_sim *sim, union cc case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct siis_device *d; + if (siis_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1677,7 +1698,6 @@ siisaction(struct cam_sim *sim, union cc if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) d->atapi = cts->xport_specific.sata.atapi; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -1687,6 +1707,8 @@ siisaction(struct cam_sim *sim, union cc struct siis_device *d; uint32_t status; + if (siis_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1722,48 +1744,16 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ siis_reset(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -1790,14 +1780,13 @@ siisaction(struct cam_sim *sim, union cc cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->ccb_h.status = CAM_REQ_CMP; cpi->maxio = MAXPHYS; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:07:50 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0A141065673; Sat, 8 May 2010 13:07:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id C6B768FC0A; Sat, 8 May 2010 13:07:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48D7ofl022739; Sat, 8 May 2010 13:07:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D7oUC022737; Sat, 8 May 2010 13:07:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081307.o48D7oUC022737@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207773 - stable/8/sys/dev/ata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:07:51 -0000 Author: mav Date: Sat May 8 13:07:50 2010 New Revision: 207773 URL: http://svn.freebsd.org/changeset/base/207773 Log: MFC r207432: Add Target/LUN ID checks. Modified: stable/8/sys/dev/ata/ata-all.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sat May 8 13:05:27 2010 (r207772) +++ stable/8/sys/dev/ata/ata-all.c Sat May 8 13:07:50 2010 (r207773) @@ -1430,6 +1430,24 @@ ata_cam_end_transaction(device_t dev, st ata_reinit(dev); } +static int +ata_check_ids(device_t dev, union ccb *ccb) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ccb->ccb_h.target_id > ((ch->flags & ATA_NO_SLAVE) ? 0 : 1)) { + ccb->ccb_h.status = CAM_TID_INVALID; + xpt_done(ccb); + return (-1); + } + if (ccb->ccb_h.target_lun != 0) { + ccb->ccb_h.status = CAM_LUN_INVALID; + xpt_done(ccb); + return (-1); + } + return (0); +} + static void ataaction(struct cam_sim *sim, union ccb *ccb) { @@ -1445,10 +1463,11 @@ ataaction(struct cam_sim *sim, union ccb /* Common cases first */ case XPT_ATA_IO: /* Execute the requested I/O operation */ case XPT_SCSI_IO: + if (ata_check_ids(dev, ccb)) + return; if ((ch->devices & ((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << ccb->ccb_h.target_id)) == 0) { ccb->ccb_h.status = CAM_SEL_TIMEOUT; - xpt_done(ccb); break; } if (ch->running) @@ -1467,11 +1486,10 @@ ataaction(struct cam_sim *sim, union ccb res->lba_mid = 0x14; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } ata_cam_begin_transaction(dev, ccb); - break; + return; case XPT_EN_LUN: /* Enable LUN as a target */ case XPT_TARGET_IO: /* Execute target I/O request */ case XPT_ACCEPT_TARGET_IO: /* Accept Host Target Mode CDB */ @@ -1479,13 +1497,14 @@ ataaction(struct cam_sim *sim, union ccb case XPT_ABORT: /* Abort the specified CCB */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_SET_TRAN_SETTINGS: { struct ccb_trans_settings *cts = &ccb->cts; struct ata_cam_device *d; + if (ata_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1520,7 +1539,6 @@ ataaction(struct cam_sim *sim, union ccb d->atapi = cts->xport_specific.ata.atapi; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } case XPT_GET_TRAN_SETTINGS: @@ -1528,6 +1546,8 @@ ataaction(struct cam_sim *sim, union ccb struct ccb_trans_settings *cts = &ccb->cts; struct ata_cam_device *d; + if (ata_check_ids(dev, ccb)) + return; if (cts->type == CTS_TYPE_CURRENT_SETTINGS) d = &ch->curr[ccb->ccb_h.target_id]; else @@ -1567,48 +1587,16 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } -#if 0 - case XPT_CALC_GEOMETRY: - { - struct ccb_calc_geometry *ccg; - uint32_t size_mb; - uint32_t secs_per_cylinder; - - ccg = &ccb->ccg; - size_mb = ccg->volume_size - / ((1024L * 1024L) / ccg->block_size); - if (size_mb >= 1024 && (aha->extended_trans != 0)) { - if (size_mb >= 2048) { - ccg->heads = 255; - ccg->secs_per_track = 63; - } else { - ccg->heads = 128; - ccg->secs_per_track = 32; - } - } else { - ccg->heads = 64; - ccg->secs_per_track = 32; - } - secs_per_cylinder = ccg->heads * ccg->secs_per_track; - ccg->cylinders = ccg->volume_size / secs_per_cylinder; - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); - break; - } -#endif case XPT_RESET_BUS: /* Reset the specified SCSI bus */ case XPT_RESET_DEV: /* Bus Device Reset the specified SCSI device */ ata_reinit(dev); ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; case XPT_TERM_IO: /* Terminate the I/O process */ /* XXX Implement */ ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; case XPT_PATH_INQ: /* Path routing inquiry */ { @@ -1643,14 +1631,13 @@ ataaction(struct cam_sim *sim, union ccb cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS; cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(ccb); break; } default: ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(ccb); break; } + xpt_done(ccb); } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:09:36 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F1E51065673; Sat, 8 May 2010 13:09:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8AE8FC1D; Sat, 8 May 2010 13:09:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48D9apH023190; Sat, 8 May 2010 13:09:36 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48D9a2n023188; Sat, 8 May 2010 13:09:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081309.o48D9a2n023188@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207774 - stable/8/sys/cam X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:09:36 -0000 Author: mav Date: Sat May 8 13:09:36 2010 New Revision: 207774 URL: http://svn.freebsd.org/changeset/base/207774 Log: MFC r207433: Revert r198705. As scottl@ noticed, max_target/max_lun was intended to be only a hint for existing bus scanner. Some FC/SAS SIMs report fake values there, that are smaller then maximum supported IDs. In that case this check makes impossible manual scan outside hinted range. For ATA/SATA SIMs respective check was instead implemented at SIM level. Newer SCSI SIMs expected to have these checks at driver or firmware level. Some older SCSI SIMs have no this check and the issues will get back there. Modified: stable/8/sys/cam/cam_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/cam_xpt.c ============================================================================== --- stable/8/sys/cam/cam_xpt.c Sat May 8 13:07:50 2010 (r207773) +++ stable/8/sys/cam/cam_xpt.c Sat May 8 13:09:36 2010 (r207774) @@ -462,34 +462,7 @@ xptioctl(struct cdev *dev, u_long cmd, c ccb = xpt_alloc_ccb(); CAM_SIM_LOCK(bus->sim); - /* Ensure passed in target/lun supported on this bus. */ - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD)) { - if (xpt_create_path(&ccb->ccb_h.path, - xpt_periph, - inccb->ccb_h.path_id, - CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - xpt_setup_ccb(&ccb->ccb_h, ccb->ccb_h.path, - inccb->ccb_h.pinfo.priority); - ccb->ccb_h.func_code = XPT_PATH_INQ; - xpt_action(ccb); - xpt_free_path(ccb->ccb_h.path); - if ((inccb->ccb_h.target_id != CAM_TARGET_WILDCARD && - inccb->ccb_h.target_id > ccb->cpi.max_target) || - (inccb->ccb_h.target_lun != CAM_LUN_WILDCARD && - inccb->ccb_h.target_lun > ccb->cpi.max_lun)) { - error = EINVAL; - CAM_SIM_UNLOCK(bus->sim); - xpt_free_ccb(ccb); - break; - } - } + /* * Create a path using the bus, target, and lun the * user passed in. From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:12:53 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03962106564A; Sat, 8 May 2010 13:12:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E73868FC0A; Sat, 8 May 2010 13:12:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DCqG3023978; Sat, 8 May 2010 13:12:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DCqeA023975; Sat, 8 May 2010 13:12:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081312.o48DCqeA023975@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 13:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207775 - stable/8/sbin/camcontrol X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:12:53 -0000 Author: mav Date: Sat May 8 13:12:52 2010 New Revision: 207775 URL: http://svn.freebsd.org/changeset/base/207775 Log: MFC r207498: Add -d and -f arguments to `camcontrol cmd`, to execute DMA ATA commands. Modified: stable/8/sbin/camcontrol/camcontrol.8 stable/8/sbin/camcontrol/camcontrol.c Directory Properties: stable/8/sbin/camcontrol/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.8 Sat May 8 13:09:36 2010 (r207774) +++ stable/8/sbin/camcontrol/camcontrol.8 Sat May 8 13:12:52 2010 (r207775) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2010 +.Dd May 2, 2010 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -123,6 +123,8 @@ .Op generic args .Aq Fl a Ar cmd Op args .Aq Fl c Ar cmd Op args +.Op Fl d +.Op Fl f .Op Fl i Ar len Ar fmt .Bk -words .Op Fl o Ar len Ar fmt Op args @@ -530,6 +532,10 @@ lba_high_exp, features_exp, sector_count .It Fl c Ar cmd Op args This specifies the SCSI CDB. SCSI CDBs may be 6, 10, 12 or 16 bytes. +.It Fl d +Specifies DMA protocol to be used for ATA command. +.It Fl f +Specifies FPDMA (NCQ) protocol to be used for ATA command. .It Fl i Ar len Ar fmt This specifies the amount of data to read, and how it should be displayed. If the format is Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sat May 8 13:09:36 2010 (r207774) +++ stable/8/sbin/camcontrol/camcontrol.c Sat May 8 13:12:52 2010 (r207775) @@ -123,7 +123,7 @@ struct camcontrol_opts { }; #ifndef MINIMALISTIC -static const char scsicmd_opts[] = "a:c:i:o:r"; +static const char scsicmd_opts[] = "a:c:dfi:o:r"; static const char readdefect_opts[] = "f:GP"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; #endif @@ -2184,6 +2184,8 @@ scsicmd(struct cam_device *device, int a int c, data_bytes = 0; int cdb_len = 0; int atacmd_len = 0; + int dmacmd = 0; + int fpdmacmd = 0; int need_res = 0; char *datastr = NULL, *tstr, *resstr = NULL; int error = 0; @@ -2246,6 +2248,12 @@ scsicmd(struct cam_device *device, int a */ optind += hook.got; break; + case 'd': + dmacmd = 1; + break; + case 'f': + fpdmacmd = 1; + break; case 'i': if (arglist & CAM_ARG_CMD_OUT) { warnx("command must either be " @@ -2422,6 +2430,10 @@ scsicmd(struct cam_device *device, int a bcopy(atacmd, &ccb->ataio.cmd.command, atacmd_len); if (need_res) ccb->ataio.cmd.flags |= CAM_ATAIO_NEEDRESULT; + if (dmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_DMA; + if (fpdmacmd) + ccb->ataio.cmd.flags |= CAM_ATAIO_FPDMA; cam_fill_ataio(&ccb->ataio, /*retries*/ retry_count, @@ -4353,7 +4365,7 @@ usage(int verbose) " [-P pagectl][-e | -b][-d]\n" " camcontrol cmd [dev_id][generic args]\n" " <-a cmd [args] | -c cmd [args]>\n" -" [-i len fmt|-o len fmt [args]] [-r fmt]\n" +" [-d] [-f] [-i len fmt|-o len fmt [args]] [-r fmt]\n" " camcontrol debug [-I][-P][-T][-S][-X][-c]\n" " \n" " camcontrol tags [dev_id][generic args] [-N tags] [-q] [-v]\n" From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:21:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41B561065670; Sat, 8 May 2010 13:21:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF718FC15; Sat, 8 May 2010 13:21:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DLN1s025911; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DLNSM025906; Sat, 8 May 2010 13:21:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081321.o48DLNSM025906@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207776 - in stable/6/gnu/usr.bin/gdb: . gdbserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:21:23 -0000 Author: imp Date: Sat May 8 13:21:22 2010 New Revision: 207776 URL: http://svn.freebsd.org/changeset/base/207776 Log: Merge gdbserver support for arm from head (r185023). Added: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c Modified: stable/6/gnu/usr.bin/gdb/Makefile stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/6/gnu/usr.bin/gdb/ (props changed) stable/6/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/6/gnu/usr.bin/gdb/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" SUBDIR+=gdbserver .endif Modified: stable/6/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:12:52 2010 (r207775) +++ stable/6/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:21:22 2010 (r207776) @@ -10,9 +10,17 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g PROG= gdbserver -SRCS= i387-fp.c inferiors.c mem-break.c regcache.c remote-utils.c \ - server.c signals.c target.c reg-i386.c utils.c -SRCS+= fbsd-low.c fbsd-i386-low.c +SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ + server.c signals.c target.c utils.c +SRCS+= fbsd-low.c + +.if ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c +.endif + +.if ${MACHINE_ARCH} == "arm" +SRCS+= fbsd-arm-low.c reg-arm.c +.endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver Copied: stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) @@ -0,0 +1,146 @@ +/* FreeBSD/ARM specific low level interface, for the remote server for GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#ifdef HAVE_SYS_REG_H +#include +#endif + +#include +#include + +#define arm_num_regs 26 + +static int arm_regmap[] = { + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + 64 +}; + +static int +arm_cannot_store_register (int regno) +{ + return (regno >= arm_num_regs); +} + +static int +arm_cannot_fetch_register (int regno) +{ + return (regno >= arm_num_regs); +} + +extern int debug_threads; + +static CORE_ADDR +arm_get_pc () +{ + unsigned long pc; + collect_register_by_name ("pc", &pc); + if (debug_threads) + fprintf (stderr, "stop pc is %08lx\n", pc); + return pc; +} + +static void +arm_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. We do not support Thumb yet. */ +static const unsigned long arm_breakpoint = 0xef9f0001; +#define arm_breakpoint_len 4 + +static int +arm_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == arm_breakpoint) + return 1; + + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +/* We only place breakpoints in empty marker functions, and thread locking + is outside of the function. So rather than importing software single-step, + we can just run until exit. */ +static CORE_ADDR +arm_reinsert_addr () +{ + unsigned long pc; + collect_register_by_name ("lr", &pc); + return pc; +} + +static void +arm_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + collect_register (i, ((char *) buf) + arm_regmap[i]); + +} + +static void +arm_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + supply_register (i, ((char *) buf) + arm_regmap[i]); + +} + + +struct regset_info target_regsets[] = { + {PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + arm_fill_gregset, arm_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + arm_num_regs, + arm_regmap, + arm_cannot_fetch_register, + arm_cannot_store_register, + arm_get_pc, + arm_set_pc, + (const char *) &arm_breakpoint, + arm_breakpoint_len, + arm_reinsert_addr, + 0, + arm_breakpoint_at, +}; Copied: stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/6/gnu/usr.bin/gdb/gdbserver/reg-arm.c Sat May 8 13:21:22 2010 (r207776, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) @@ -0,0 +1,68 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_arm[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "sp", 416, 32 }, + { "lr", 448, 32 }, + { "pc", 480, 32 }, + { "f0", 512, 96 }, + { "f1", 608, 96 }, + { "f2", 704, 96 }, + { "f3", 800, 96 }, + { "f4", 896, 96 }, + { "f5", 992, 96 }, + { "f6", 1088, 96 }, + { "f7", 1184, 96 }, + { "fps", 1280, 32 }, + { "cpsr", 1312, 32 }, +}; + +const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_arm, + sizeof (regs_arm) / sizeof (regs_arm[0])); + gdbserver_expedite_regs = expedite_regs_arm; +} From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:23:57 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7F04106566C; Sat, 8 May 2010 13:23:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B631D8FC15; Sat, 8 May 2010 13:23:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DNvUm026526; Sat, 8 May 2010 13:23:57 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DNvpt026521; Sat, 8 May 2010 13:23:57 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081323.o48DNvpt026521@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:23: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: r207777 - in stable/7/gnu/usr.bin/gdb: . gdbserver X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:23:57 -0000 Author: imp Date: Sat May 8 13:23:57 2010 New Revision: 207777 URL: http://svn.freebsd.org/changeset/base/207777 Log: MFC 185023 (by raj): Initial gdbserver support for ARM. Obtained from: Juniper Networks, Semihalf Added: stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c - copied unchanged from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c Modified: stable/7/gnu/usr.bin/gdb/Makefile stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Directory Properties: stable/7/gnu/usr.bin/gdb/ (props changed) stable/7/gnu/usr.bin/gdb/kgdb/ (props changed) Modified: stable/7/gnu/usr.bin/gdb/Makefile ============================================================================== --- stable/7/gnu/usr.bin/gdb/Makefile Sat May 8 13:21:22 2010 (r207776) +++ stable/7/gnu/usr.bin/gdb/Makefile Sat May 8 13:23:57 2010 (r207777) @@ -2,7 +2,7 @@ SUBDIR= doc libgdb gdb gdbtui kgdb -.if ${MACHINE_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" SUBDIR+=gdbserver .endif Modified: stable/7/gnu/usr.bin/gdb/gdbserver/Makefile ============================================================================== --- stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:21:22 2010 (r207776) +++ stable/7/gnu/usr.bin/gdb/gdbserver/Makefile Sat May 8 13:23:57 2010 (r207777) @@ -10,9 +10,17 @@ GDBDIR= ${.CURDIR}/../../../../contrib/g PROG= gdbserver -SRCS= i387-fp.c inferiors.c mem-break.c regcache.c remote-utils.c \ - server.c signals.c target.c reg-i386.c utils.c -SRCS+= fbsd-low.c fbsd-i386-low.c +SRCS= inferiors.c mem-break.c regcache.c remote-utils.c \ + server.c signals.c target.c utils.c +SRCS+= fbsd-low.c + +.if ${MACHINE_ARCH} == "i386" +SRCS+= fbsd-i386-low.c i387-fp.c reg-i386.c +.endif + +.if ${MACHINE_ARCH} == "arm" +SRCS+= fbsd-arm-low.c reg-arm.c +.endif #CFLAGS+= -I${.CURDIR}/../arch/${MACHINE_ARCH} CFLAGS+= -I${GDBDIR}/gdb/gdbserver Copied: stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c Sat May 8 13:23:57 2010 (r207777, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/fbsd-arm-low.c) @@ -0,0 +1,146 @@ +/* FreeBSD/ARM specific low level interface, for the remote server for GDB. + Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "server.h" +#include "fbsd-low.h" + +#ifdef HAVE_SYS_REG_H +#include +#endif + +#include +#include + +#define arm_num_regs 26 + +static int arm_regmap[] = { + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 36, 40, 44, 48, 52, 56, 60, + -1, -1, -1, -1, -1, -1, -1, -1, -1, + 64 +}; + +static int +arm_cannot_store_register (int regno) +{ + return (regno >= arm_num_regs); +} + +static int +arm_cannot_fetch_register (int regno) +{ + return (regno >= arm_num_regs); +} + +extern int debug_threads; + +static CORE_ADDR +arm_get_pc () +{ + unsigned long pc; + collect_register_by_name ("pc", &pc); + if (debug_threads) + fprintf (stderr, "stop pc is %08lx\n", pc); + return pc; +} + +static void +arm_set_pc (CORE_ADDR pc) +{ + unsigned long newpc = pc; + supply_register_by_name ("pc", &newpc); +} + +/* Correct in either endianness. We do not support Thumb yet. */ +static const unsigned long arm_breakpoint = 0xef9f0001; +#define arm_breakpoint_len 4 + +static int +arm_breakpoint_at (CORE_ADDR where) +{ + unsigned long insn; + + (*the_target->read_memory) (where, (char *) &insn, 4); + if (insn == arm_breakpoint) + return 1; + + /* If necessary, recognize more trap instructions here. GDB only uses the + one. */ + return 0; +} + +/* We only place breakpoints in empty marker functions, and thread locking + is outside of the function. So rather than importing software single-step, + we can just run until exit. */ +static CORE_ADDR +arm_reinsert_addr () +{ + unsigned long pc; + collect_register_by_name ("lr", &pc); + return pc; +} + +static void +arm_fill_gregset (void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + collect_register (i, ((char *) buf) + arm_regmap[i]); + +} + +static void +arm_store_gregset (const void *buf) +{ + int i; + + for (i = 0; i < arm_num_regs; i++) + if (arm_regmap[i] != -1) + supply_register (i, ((char *) buf) + arm_regmap[i]); + +} + + +struct regset_info target_regsets[] = { + {PT_GETREGS, PT_SETREGS, sizeof (struct reg), + GENERAL_REGS, + arm_fill_gregset, arm_store_gregset }, + { 0, 0, -1, -1, NULL, NULL } +}; + +struct fbsd_target_ops the_low_target = { + arm_num_regs, + arm_regmap, + arm_cannot_fetch_register, + arm_cannot_store_register, + arm_get_pc, + arm_set_pc, + (const char *) &arm_breakpoint, + arm_breakpoint_len, + arm_reinsert_addr, + 0, + arm_breakpoint_at, +}; Copied: stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c (from r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/gnu/usr.bin/gdb/gdbserver/reg-arm.c Sat May 8 13:23:57 2010 (r207777, copy of r185023, head/gnu/usr.bin/gdb/gdbserver/reg-arm.c) @@ -0,0 +1,68 @@ +/* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ + +/* A register protocol for GDB, the GNU debugger. + Copyright 2001, 2002 Free Software Foundation, Inc. + + This file is part of GDB. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file was created with the aid of ``regdat.sh'' and ``reg-arm.dat''. */ + +#include +__FBSDID("$FreeBSD$"); + +#include "regdef.h" +#include "regcache.h" + +struct reg regs_arm[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "sp", 416, 32 }, + { "lr", 448, 32 }, + { "pc", 480, 32 }, + { "f0", 512, 96 }, + { "f1", 608, 96 }, + { "f2", 704, 96 }, + { "f3", 800, 96 }, + { "f4", 896, 96 }, + { "f5", 992, 96 }, + { "f6", 1088, 96 }, + { "f7", 1184, 96 }, + { "fps", 1280, 32 }, + { "cpsr", 1312, 32 }, +}; + +const char *expedite_regs_arm[] = { "r11", "sp", "pc", 0 }; + +void +init_registers () +{ + set_register_cache (regs_arm, + sizeof (regs_arm) / sizeof (regs_arm[0])); + gdbserver_expedite_regs = expedite_regs_arm; +} From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:41:02 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3439B106566C; Sat, 8 May 2010 13:41:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 23E808FC1A; Sat, 8 May 2010 13:41:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Df2TO030288; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Df2bC030286; Sat, 8 May 2010 13:41:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48Df2bC030286@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207778 - in stable/6/lib/libthread_db: . arch/arm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:41:02 -0000 Author: imp Date: Sat May 8 13:41:01 2010 New Revision: 207778 URL: http://svn.freebsd.org/changeset/base/207778 Log: MFC r173703(cognet): Add arm support in libthread_db Added: stable/6/lib/libthread_db/arch/arm/ - copied from r173703, head/lib/libthread_db/arch/arm/ Modified: stable/6/lib/libthread_db/Makefile Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/Makefile ============================================================================== --- stable/6/lib/libthread_db/Makefile Sat May 8 13:23:57 2010 (r207777) +++ stable/6/lib/libthread_db/Makefile Sat May 8 13:41:01 2010 (r207778) @@ -6,7 +6,11 @@ LIB= thread_db SHLIB_MAJOR= 2 SRCS= thread_db.c SRCS+= libpthread_db.c libpthread_md.c +# libc_r not supported on arm +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "ia64" && \ + ${MACHINE_ARCH} != "poewrpc" && !defined(NO_LIBC_R) SRCS+= libc_r_db.c libc_r_md.c +.endif SRCS+= libthr_db.c INCS= thread_db.h WARNS?= 6 From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:41:58 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2764106564A; Sat, 8 May 2010 13:41:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B25818FC18; Sat, 8 May 2010 13:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DfwYX030547; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DfwMI030545; Sat, 8 May 2010 13:41:58 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081341.o48DfwMI030545@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207779 - stable/6/lib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:41:58 -0000 Author: imp Date: Sat May 8 13:41:58 2010 New Revision: 207779 URL: http://svn.freebsd.org/changeset/base/207779 Log: Hand merge in support for compiling libthread_db on arm (from change r173703). Given the large delta between this and head, mergeinfo likely would do more harm than good. Modified: stable/6/lib/Makefile Modified: stable/6/lib/Makefile ============================================================================== --- stable/6/lib/Makefile Sat May 8 13:41:01 2010 (r207778) +++ stable/6/lib/Makefile Sat May 8 13:41:58 2010 (r207779) @@ -101,7 +101,7 @@ _libpthread= libpthread _libthr= libthr .endif -.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" _libthread_db= libthread_db .endif From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:47:00 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AF3D1065672; Sat, 8 May 2010 13:47:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9098FC18; Sat, 8 May 2010 13:47:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DkxHr031734; Sat, 8 May 2010 13:47:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48Dkxpx031732; Sat, 8 May 2010 13:46:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081346.o48Dkxpx031732@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207780 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:47:00 -0000 Author: imp Date: Sat May 8 13:46:59 2010 New Revision: 207780 URL: http://svn.freebsd.org/changeset/base/207780 Log: MFC r181044 (marcel): Cleanup for WARNS 2. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:41:58 2010 (r207779) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) @@ -97,7 +97,6 @@ pt_fpreg_to_ucontext(const struct fpreg void pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) { - const mcontext_t *mc = &uc->uc_mcontext; /* XXX */ memset(r, 0, sizeof(*r)); @@ -113,4 +112,5 @@ pt_reg_sstep(struct reg *reg, int step) { /* XXX */ + return (0); } From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:48:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C600F106567B; Sat, 8 May 2010 13:48:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B58418FC1E; Sat, 8 May 2010 13:48:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48DmVVg032117; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DmVtY032115; Sat, 8 May 2010 13:48:31 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081348.o48DmVtY032115@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207781 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:48:31 -0000 Author: imp Date: Sat May 8 13:48:31 2010 New Revision: 207781 URL: http://svn.freebsd.org/changeset/base/207781 Log: MFC r181059: Cleanup for WARNS 3. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:46:59 2010 (r207780) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) @@ -27,9 +27,8 @@ #include __FBSDID("$FreeBSD$"); -#include #include -#include +#include #include #include "libpthread_db.h" From owner-svn-src-stable@FreeBSD.ORG Sat May 8 13:49:43 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D7361065670; Sat, 8 May 2010 13:49:43 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCD68FC08; Sat, 8 May 2010 13:49:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Dnh2W032429; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48DnhFj032427; Sat, 8 May 2010 13:49:43 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081349.o48DnhFj032427@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 13:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207782 - stable/6/lib/libthread_db/arch/arm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 13:49:43 -0000 Author: imp Date: Sat May 8 13:49:43 2010 New Revision: 207782 URL: http://svn.freebsd.org/changeset/base/207782 Log: MFC r181341 (marcel): Cleanup for WARNS 6. Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c Directory Properties: stable/6/lib/libthread_db/ (props changed) Modified: stable/6/lib/libthread_db/arch/arm/libpthread_md.c ============================================================================== --- stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:48:31 2010 (r207781) +++ stable/6/lib/libthread_db/arch/arm/libpthread_md.c Sat May 8 13:49:43 2010 (r207782) @@ -85,7 +85,7 @@ pt_ucontext_to_reg(const ucontext_t *uc, } void -pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc) +pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc) { mcontext_t *mc = &uc->uc_mcontext; @@ -94,7 +94,7 @@ pt_fpreg_to_ucontext(const struct fpreg } void -pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r) +pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r) { /* XXX */ @@ -107,7 +107,7 @@ pt_md_init(void) } int -pt_reg_sstep(struct reg *reg, int step) +pt_reg_sstep(struct reg *reg __unused, int step __unused) { /* XXX */ From owner-svn-src-stable@FreeBSD.ORG Sat May 8 14:12:04 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B67361065675; Sat, 8 May 2010 14:12:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id A65658FC0C; Sat, 8 May 2010 14:12:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48EC4GK037379; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48EC4mf037377; Sat, 8 May 2010 14:12:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201005081412.o48EC4mf037377@svn.freebsd.org> From: Warner Losh Date: Sat, 8 May 2010 14:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207784 - stable/6/gnu/usr.bin X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 14:12:04 -0000 Author: imp Date: Sat May 8 14:12:04 2010 New Revision: 207784 URL: http://svn.freebsd.org/changeset/base/207784 Log: gdb compiles and seems to work on arm on stable/6, so enable building it. Modified: stable/6/gnu/usr.bin/Makefile Modified: stable/6/gnu/usr.bin/Makefile ============================================================================== --- stable/6/gnu/usr.bin/Makefile Sat May 8 14:00:01 2010 (r207783) +++ stable/6/gnu/usr.bin/Makefile Sat May 8 14:12:04 2010 (r207784) @@ -21,7 +21,7 @@ SUBDIR= bc \ sort \ texinfo -.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" NO_GDB= # not yet .endif From owner-svn-src-stable@FreeBSD.ORG Sat May 8 16:06:56 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59FA7106566B; Sat, 8 May 2010 16:06:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 114C38FC0A; Sat, 8 May 2010 16:06:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48G6tgW062535; Sat, 8 May 2010 16:06:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48G6sZr062526; Sat, 8 May 2010 16:06:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081606.o48G6sZr062526@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 16:06:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207787 - in stable/8: sbin/camcontrol sys/cam sys/cam/ata sys/dev/ahci sys/dev/siis X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 16:06:56 -0000 Author: mav Date: Sat May 8 16:06:54 2010 New Revision: 207787 URL: http://svn.freebsd.org/changeset/base/207787 Log: MFC r207499: Make SATA XPT negotiate and enable some additional SATA features, such as: - device initiated power management (some devices support only this way); - Automatic Partial to Slumber Transition (more power saving); - DMA auto-activation (expected to slightly improve performance). More features could be added later, when hardware supports. Modified: stable/8/sbin/camcontrol/camcontrol.c stable/8/sys/cam/ata/ata_pmp.c stable/8/sys/cam/ata/ata_xpt.c stable/8/sys/cam/cam_ccb.h stable/8/sys/dev/ahci/ahci.c stable/8/sys/dev/ahci/ahci.h stable/8/sys/dev/siis/siis.c stable/8/sys/dev/siis/siis.h Directory Properties: stable/8/sbin/camcontrol/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/8/sbin/camcontrol/camcontrol.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sbin/camcontrol/camcontrol.c Sat May 8 16:06:54 2010 (r207787) @@ -2855,6 +2855,10 @@ cts_print(struct cam_device *device, str fprintf(stdout, "%sNumber of tags: %d\n", pathstr, sata->tags); } + if ((sata->valid & CTS_SATA_VALID_CAPS) != 0) { + fprintf(stdout, "%sSATA capabilities: %08x\n", pathstr, + sata->caps); + } } if (cts->protocol == PROTO_SCSI) { struct ccb_trans_settings_scsi *scsi= Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/ata/ata_pmp.c Sat May 8 16:06:54 2010 (r207787) @@ -101,6 +101,7 @@ struct pmp_softc { int events; #define PMP_EV_RESET 1 #define PMP_EV_RESCAN 2 + u_int caps; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -457,6 +458,14 @@ pmpstart(struct cam_periph *periph, unio ata_pm_read_cmd(ataio, 2, 15); break; case PMP_STATE_PRECONFIG: + /* Get/update host SATA capabilities. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, periph->path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + softc->caps = cts.xport_specific.sata.caps; cam_fill_ataio(ataio, pmp_retry_count, pmpdone, @@ -644,14 +653,16 @@ pmpdone(struct cam_periph *periph, union (done_ccb->ataio.res.lba_mid << 16) + (done_ccb->ataio.res.lba_low << 8) + done_ccb->ataio.res.sector_count; - if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) { + if (((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) || + (res & 0x600) != 0) { if (bootverbose) { printf("%s%d: port %d status: %08x\n", periph->periph_name, periph->unit_number, softc->pm_step, res); } - /* Report device speed. */ - if (xpt_create_path(&dpath, periph, + /* Report device speed if it is online. */ + if ((res & 0xf0f) == 0x103 && + xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), softc->pm_step, 0) == CAM_REQ_CMP) { bzero(&cts, sizeof(cts)); @@ -660,6 +671,9 @@ pmpdone(struct cam_periph *periph, union cts.type = CTS_TYPE_CURRENT_SETTINGS; cts.xport_specific.sata.revision = (res & 0x0f0) >> 4; cts.xport_specific.sata.valid = CTS_SATA_VALID_REVISION; + cts.xport_specific.sata.caps = softc->caps & + (CTS_SATA_CAPS_H_PMREQ | CTS_SATA_CAPS_H_DMAAA); + cts.xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); xpt_free_path(dpath); } Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/ata/ata_xpt.c Sat May 8 16:06:54 2010 (r207787) @@ -88,6 +88,9 @@ typedef enum { PROBE_IDENTIFY, PROBE_SPINUP, PROBE_SETMODE, + PROBE_SETPM, + PROBE_SETAPST, + PROBE_SETDMAAA, PROBE_SET_MULTI, PROBE_INQUIRY, PROBE_FULL_INQUIRY, @@ -101,6 +104,9 @@ static char *probe_action_text[] = { "PROBE_IDENTIFY", "PROBE_SPINUP", "PROBE_SETMODE", + "PROBE_SETPM", + "PROBE_SETAPST", + "PROBE_SETDMAAA", "PROBE_SET_MULTI", "PROBE_INQUIRY", "PROBE_FULL_INQUIRY", @@ -132,6 +138,7 @@ typedef struct { uint32_t pm_prv; int restart; int spinup; + u_int caps; struct cam_periph *periph; } probe_softc; @@ -393,6 +400,45 @@ negotiate: ata_28bit_cmd(ataio, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); break; } + case PROBE_SETPM: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_PMREQ) ? 0x10 : 0x90, + 0, 0x03); + break; + case PROBE_SETAPST: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_APST) ? 0x10 : 0x90, + 0, 0x07); + break; + case PROBE_SETDMAAA: + cam_fill_ataio(ataio, + 1, + probedone, + CAM_DIR_NONE, + 0, + NULL, + 0, + 30*1000); + ata_28bit_cmd(ataio, ATA_SETFEATURES, + (softc->caps & CTS_SATA_CAPS_H_DMAAA) ? 0x10 : 0x90, + 0, 0x02); + break; case PROBE_SET_MULTI: { u_int sectors, bytecount; @@ -685,6 +731,7 @@ probedone(struct cam_periph *periph, uni probe_softc *softc; struct cam_path *path; u_int32_t priority; + u_int caps; int found = 1; CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("probedone\n")); @@ -879,6 +926,67 @@ noerror: xpt_schedule(periph, priority); return; case PROBE_SETMODE: + if (path->device->transport != XPORT_SATA) + goto notsata; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + if (ident_buf->satacapabilities != 0xffff) { + if (ident_buf->satacapabilities & ATA_SUPPORT_IFPWRMNGTRCV) + caps |= CTS_SATA_CAPS_D_PMREQ; + if (ident_buf->satacapabilities & ATA_SUPPORT_HAPST) + caps |= CTS_SATA_CAPS_D_APST; + } + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; + if (ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) { + PROBE_SET_ACTION(softc, PROBE_SETPM); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETPM: + if (ident_buf->satacapabilities != 0xffff && + ident_buf->satacapabilities & ATA_SUPPORT_DAPST) { + PROBE_SET_ACTION(softc, PROBE_SETAPST); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETAPST: + if (ident_buf->satasupport & ATA_SUPPORT_AUTOACTIVATE) { + PROBE_SET_ACTION(softc, PROBE_SETDMAAA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } + /* FALLTHROUGH */ + case PROBE_SETDMAAA: +notsata: if (path->device->protocol == PROTO_ATA) { PROBE_SET_ACTION(softc, PROBE_SET_MULTI); } else { @@ -964,6 +1072,35 @@ noerror: snprintf(ident_buf->revision, sizeof(ident_buf->revision), "%04x", softc->pm_prv); path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID; + /* Set supported bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else + caps = 0; + /* All PMPs must support PM requests. */ + caps |= CTS_SATA_CAPS_D_PMREQ; + /* Mask unwanted bits. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; + cts.type = CTS_TYPE_USER_SETTINGS; + xpt_action((union ccb *)&cts); + if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + caps &= cts.xport_specific.sata.caps; + /* Store result to SIM. */ + bzero(&cts, sizeof(cts)); + xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); + cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; + cts.type = CTS_TYPE_CURRENT_SETTINGS; + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + xpt_action((union ccb *)&cts); + softc->caps = caps; if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); Modified: stable/8/sys/cam/cam_ccb.h ============================================================================== --- stable/8/sys/cam/cam_ccb.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/cam/cam_ccb.h Sat May 8 16:06:54 2010 (r207787) @@ -837,12 +837,21 @@ struct ccb_trans_settings_sata { #define CTS_SATA_VALID_PM 0x08 #define CTS_SATA_VALID_TAGS 0x10 #define CTS_SATA_VALID_ATAPI 0x20 +#define CTS_SATA_VALID_CAPS 0x40 int mode; /* Legacy PATA mode */ u_int bytecount; /* Length of PIO transaction */ int revision; /* SATA revision */ u_int pm_present; /* PM is present (XPT->SIM) */ u_int tags; /* Number of allowed tags */ u_int atapi; /* Length of ATAPI CDB */ + u_int caps; /* Device and host SATA caps. */ +#define CTS_SATA_CAPS_H 0x0000ffff +#define CTS_SATA_CAPS_H_PMREQ 0x00000001 +#define CTS_SATA_CAPS_H_APST 0x00000002 +#define CTS_SATA_CAPS_H_DMAAA 0x00000010 /* Auto-activation */ +#define CTS_SATA_CAPS_D 0xffff0000 +#define CTS_SATA_CAPS_D_PMREQ 0x00010000 +#define CTS_SATA_CAPS_D_APST 0x00020000 }; /* Get/Set transfer rate/width/disconnection/tag queueing settings */ Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 16:06:54 2010 (r207787) @@ -111,6 +111,7 @@ static struct { #define AHCI_Q_EDGEIS 64 #define AHCI_Q_SATA2 128 #define AHCI_Q_NOBSYRES 256 +#define AHCI_Q_NOAA 512 } ahci_ids[] = { {0x43801002, 0x00, "ATI IXP600", 0}, {0x43901002, 0x00, "ATI IXP700", 0}, @@ -167,75 +168,75 @@ static struct { {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x044c10de, 0x00, "NVIDIA MCP65", 0}, - {0x044d10de, 0x00, "NVIDIA MCP65", 0}, - {0x044e10de, 0x00, "NVIDIA MCP65", 0}, - {0x044f10de, 0x00, "NVIDIA MCP65", 0}, - {0x045c10de, 0x00, "NVIDIA MCP65", 0}, - {0x045d10de, 0x00, "NVIDIA MCP65", 0}, - {0x045e10de, 0x00, "NVIDIA MCP65", 0}, - {0x045f10de, 0x00, "NVIDIA MCP65", 0}, - {0x055010de, 0x00, "NVIDIA MCP67", 0}, - {0x055110de, 0x00, "NVIDIA MCP67", 0}, - {0x055210de, 0x00, "NVIDIA MCP67", 0}, - {0x055310de, 0x00, "NVIDIA MCP67", 0}, - {0x055410de, 0x00, "NVIDIA MCP67", 0}, - {0x055510de, 0x00, "NVIDIA MCP67", 0}, - {0x055610de, 0x00, "NVIDIA MCP67", 0}, - {0x055710de, 0x00, "NVIDIA MCP67", 0}, - {0x055810de, 0x00, "NVIDIA MCP67", 0}, - {0x055910de, 0x00, "NVIDIA MCP67", 0}, - {0x055A10de, 0x00, "NVIDIA MCP67", 0}, - {0x055B10de, 0x00, "NVIDIA MCP67", 0}, - {0x058410de, 0x00, "NVIDIA MCP67", 0}, - {0x07f010de, 0x00, "NVIDIA MCP73", 0}, - {0x07f110de, 0x00, "NVIDIA MCP73", 0}, - {0x07f210de, 0x00, "NVIDIA MCP73", 0}, - {0x07f310de, 0x00, "NVIDIA MCP73", 0}, - {0x07f410de, 0x00, "NVIDIA MCP73", 0}, - {0x07f510de, 0x00, "NVIDIA MCP73", 0}, - {0x07f610de, 0x00, "NVIDIA MCP73", 0}, - {0x07f710de, 0x00, "NVIDIA MCP73", 0}, - {0x07f810de, 0x00, "NVIDIA MCP73", 0}, - {0x07f910de, 0x00, "NVIDIA MCP73", 0}, - {0x07fa10de, 0x00, "NVIDIA MCP73", 0}, - {0x07fb10de, 0x00, "NVIDIA MCP73", 0}, - {0x0ad010de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad110de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad210de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad310de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad410de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad510de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad610de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad710de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad810de, 0x00, "NVIDIA MCP77", 0}, - {0x0ad910de, 0x00, "NVIDIA MCP77", 0}, - {0x0ada10de, 0x00, "NVIDIA MCP77", 0}, - {0x0adb10de, 0x00, "NVIDIA MCP77", 0}, - {0x0ab410de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab510de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab610de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab710de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab810de, 0x00, "NVIDIA MCP79", 0}, - {0x0ab910de, 0x00, "NVIDIA MCP79", 0}, - {0x0aba10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abb10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abc10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abd10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abe10de, 0x00, "NVIDIA MCP79", 0}, - {0x0abf10de, 0x00, "NVIDIA MCP79", 0}, - {0x0d8410de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8510de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8610de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8710de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8810de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8910de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8a10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8b10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8c10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8d10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8e10de, 0x00, "NVIDIA MCP89", 0}, - {0x0d8f10de, 0x00, "NVIDIA MCP89", 0}, + {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x044f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x045f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, + {0x055010de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055110de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055210de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055310de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055510de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055610de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055710de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055810de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055910de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055A10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x055B10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x058410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, + {0x07f010de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f110de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f210de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f310de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f410de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f510de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f610de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f710de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f810de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07f910de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fa10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x07fb10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, + {0x0ad010de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad110de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad210de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad310de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad410de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad510de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad610de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad710de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad810de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ad910de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ada10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0adb10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, + {0x0ab410de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab510de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab610de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab710de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab810de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0ab910de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0aba10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abb10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abc10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abd10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abe10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0abf10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, + {0x0d8410de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8510de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8610de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8710de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8810de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8910de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8a10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8b10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8c10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, + {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, {0x33491106, 0x00, "VIA VT8251", 0}, {0x62871106, 0x00, "VIA VT8251", 0}, {0x11841039, 0x00, "SiS 966", 0}, @@ -854,7 +855,14 @@ ahci_ch_attach(device_t dev) ch->user[i].mode = 0; ch->user[i].bytecount = 8192; ch->user[i].tags = ch->numslots; + ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; + if (ch->pm_level) { + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ | + CTS_SATA_CAPS_H_APST | + CTS_SATA_CAPS_D_PMREQ | CTS_SATA_CAPS_D_APST; + } + ch->user[i].caps |= CTS_SATA_CAPS_H_DMAAA; } rid = ch->unit; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, @@ -1954,7 +1962,8 @@ ahci_end_transaction(struct ahci_slot *s et != AHCI_ERR_TIMEOUT) ahci_rearm_timeout(dev); /* Start PM timer. */ - if (ch->numrslots == 0 && ch->pm_level > 3) { + if (ch->numrslots == 0 && ch->pm_level > 3 && + (ch->curr[ch->pm_present ? 15 : 0].caps & CTS_SATA_CAPS_D_PMREQ)) { callout_schedule(&ch->pm_timer, (ch->pm_level == 4) ? hz / 1000 : hz / 8); } @@ -2458,6 +2467,8 @@ ahciaction(struct cam_sim *sim, union cc ch->pm_present = cts->xport_specific.sata.pm_present; if (cts->xport_specific.sata.valid & CTS_SATA_VALID_ATAPI) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -2490,9 +2501,24 @@ ahciaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) { + if (ch->caps & (AHCI_CAP_PSC | AHCI_CAP_SSC)) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->caps2 & AHCI_CAP2_APST) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_APST; + } + if ((ch->caps & AHCI_CAP_SNCQ) && + (ch->quirks & AHCI_Q_NOAA) == 0) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_DMAAA; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: stable/8/sys/dev/ahci/ahci.h ============================================================================== --- stable/8/sys/dev/ahci/ahci.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/ahci/ahci.h Sat May 8 16:06:54 2010 (r207787) @@ -372,6 +372,7 @@ struct ahci_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ Modified: stable/8/sys/dev/siis/siis.c ============================================================================== --- stable/8/sys/dev/siis/siis.c Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/siis/siis.c Sat May 8 16:06:54 2010 (r207787) @@ -448,6 +448,8 @@ siis_ch_attach(device_t dev) ch->user[i].bytecount = 8192; ch->user[i].tags = SIIS_MAX_SLOTS; ch->curr[i] = ch->user[i]; + if (ch->pm_level) + ch->user[i].caps = CTS_SATA_CAPS_H_PMREQ; } mtx_init(&ch->mtx, "SIIS channel lock", NULL, MTX_DEF); rid = ch->unit; @@ -1697,6 +1699,8 @@ siisaction(struct cam_sim *sim, union cc } if (cts->xport_specific.sata.valid & CTS_SATA_VALID_TAGS) d->atapi = cts->xport_specific.sata.atapi; + if (cts->xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + d->caps = cts->xport_specific.sata.caps; ccb->ccb_h.status = CAM_REQ_CMP; break; } @@ -1729,9 +1733,17 @@ siisaction(struct cam_sim *sim, union cc cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; } + cts->xport_specific.sata.caps = d->caps & CTS_SATA_CAPS_D; + if (ch->pm_level) + cts->xport_specific.sata.caps |= CTS_SATA_CAPS_H_PMREQ; + cts->xport_specific.sata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; + cts->xport_specific.sata.caps = d->caps; + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } cts->xport_specific.sata.mode = d->mode; cts->xport_specific.sata.valid |= CTS_SATA_VALID_MODE; Modified: stable/8/sys/dev/siis/siis.h ============================================================================== --- stable/8/sys/dev/siis/siis.h Sat May 8 15:43:59 2010 (r207786) +++ stable/8/sys/dev/siis/siis.h Sat May 8 16:06:54 2010 (r207787) @@ -358,6 +358,7 @@ struct siis_device { u_int bytecount; u_int atapi; u_int tags; + u_int caps; }; /* structure describing an ATA channel */ From owner-svn-src-stable@FreeBSD.ORG Sat May 8 16:10:55 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 158751065672; Sat, 8 May 2010 16:10:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 059928FC16; Sat, 8 May 2010 16:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48GAsJC063463; Sat, 8 May 2010 16:10:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48GAsGP063461; Sat, 8 May 2010 16:10:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201005081610.o48GAsGP063461@svn.freebsd.org> From: Alexander Motin Date: Sat, 8 May 2010 16:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207788 - stable/8/sys/dev/ahci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 16:10:55 -0000 Author: mav Date: Sat May 8 16:10:54 2010 New Revision: 207788 URL: http://svn.freebsd.org/changeset/base/207788 Log: MFC r207511: Enable PCI busmastering explicitly to be sure. Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Sat May 8 16:06:54 2010 (r207787) +++ stable/8/sys/dev/ahci/ahci.c Sat May 8 16:10:54 2010 (r207788) @@ -340,6 +340,7 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } + pci_enable_busmaster(dev); /* Reset controller */ if ((error = ahci_ctlr_reset(dev)) != 0) { bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); From owner-svn-src-stable@FreeBSD.ORG Sat May 8 18:54:48 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 16CBD1065670; Sat, 8 May 2010 18:54:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 036098FC12; Sat, 8 May 2010 18:54:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48Isl55099535; Sat, 8 May 2010 18:54:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48IslRS099525; Sat, 8 May 2010 18:54:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201005081854.o48IslRS099525@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 8 May 2010 18:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207793 - in stable/8/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include sun4v/include sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 18:54:48 -0000 Author: kib Date: Sat May 8 18:54:47 2010 New Revision: 207793 URL: http://svn.freebsd.org/changeset/base/207793 Log: MFC r204051 (by imp): n64 has a different size for KINFO_PROC_SIZE. Approved by: imp MFC r207152: Move the constants specifying the size of struct kinfo_proc into machine-specific header files. Add KINFO_PROC32_SIZE for struct kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add CTASSERT for the size of struct kinfo_proc32. MFC r207269: Style: use #define instead of #define. Modified: stable/8/sys/amd64/include/proc.h stable/8/sys/arm/include/proc.h stable/8/sys/i386/include/proc.h stable/8/sys/ia64/include/proc.h stable/8/sys/kern/kern_proc.c stable/8/sys/mips/include/proc.h stable/8/sys/powerpc/include/proc.h stable/8/sys/sparc64/include/proc.h stable/8/sys/sun4v/include/proc.h stable/8/sys/sys/user.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/amd64/include/proc.h ============================================================================== --- stable/8/sys/amd64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/amd64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -53,6 +53,9 @@ struct mdproc { struct system_segment_descriptor md_ldt_sd; }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ Modified: stable/8/sys/arm/include/proc.h ============================================================================== --- stable/8/sys/arm/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/arm/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -60,4 +60,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 792 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/i386/include/proc.h ============================================================================== --- stable/8/sys/i386/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/i386/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -57,6 +57,8 @@ struct mdproc { struct proc_ldt *md_ldt; /* (t) per-process ldt */ }; +#define KINFO_PROC_SIZE 768 + #ifdef _KERNEL /* Get the current kernel thread stack usage. */ Modified: stable/8/sys/ia64/include/proc.h ============================================================================== --- stable/8/sys/ia64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/ia64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -38,4 +38,7 @@ struct mdproc { int __dummy; /* Avoid having an empty struct. */ }; +#define KINFO_PROC_SIZE 1088 +#define KINFO_PROC32_SIZE 768 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/kern/kern_proc.c ============================================================================== --- stable/8/sys/kern/kern_proc.c Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/kern/kern_proc.c Sat May 8 18:54:47 2010 (r207793) @@ -151,6 +151,9 @@ int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE); +#ifdef COMPAT_FREEBSD32 +CTASSERT(sizeof(struct kinfo_proc32) == KINFO_PROC32_SIZE); +#endif /* * Initialize global process hashing structures. Modified: stable/8/sys/mips/include/proc.h ============================================================================== --- stable/8/sys/mips/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/mips/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -68,4 +68,10 @@ struct thread; void mips_cpu_switch(struct thread *, struct thread *, struct mtx *); void mips_cpu_throw(struct thread *, struct thread *); +#ifdef __mips_n64 +#define KINFO_PROC_SIZE 1088 +#else +#define KINFO_PROC_SIZE 816 +#endif + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/powerpc/include/proc.h ============================================================================== --- stable/8/sys/powerpc/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/powerpc/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -46,4 +46,6 @@ struct mdthread { struct mdproc { }; +#define KINFO_PROC_SIZE 768 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sparc64/include/proc.h ============================================================================== --- stable/8/sys/sparc64/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sparc64/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -51,4 +51,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 1088 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sun4v/include/proc.h ============================================================================== --- stable/8/sys/sun4v/include/proc.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sun4v/include/proc.h Sat May 8 18:54:47 2010 (r207793) @@ -51,4 +51,6 @@ struct mdproc { void *md_sigtramp; }; +#define KINFO_PROC_SIZE 1088 + #endif /* !_MACHINE_PROC_H_ */ Modified: stable/8/sys/sys/user.h ============================================================================== --- stable/8/sys/sys/user.h Sat May 8 16:47:33 2010 (r207792) +++ stable/8/sys/sys/user.h Sat May 8 18:54:47 2010 (r207793) @@ -87,30 +87,11 @@ #define KI_NSPARE_LONG 12 #define KI_NSPARE_PTR 7 -#ifdef __amd64__ -#define KINFO_PROC_SIZE 1088 -#endif -#ifdef __arm__ -#define KINFO_PROC_SIZE 792 -#endif -#ifdef __ia64__ -#define KINFO_PROC_SIZE 1088 -#endif -#ifdef __i386__ -#define KINFO_PROC_SIZE 768 -#endif -#ifdef __mips__ -#define KINFO_PROC_SIZE 816 -#endif -#ifdef __powerpc__ -#define KINFO_PROC_SIZE 768 -#endif -#ifdef __sparc64__ -#define KINFO_PROC_SIZE 1088 -#endif +#ifndef _KERNEL #ifndef KINFO_PROC_SIZE #error "Unknown architecture" #endif +#endif /* !_KERNEL */ #define WMESGLEN 8 /* size of returned wchan message */ #define LOCKNAMELEN 8 /* size of returned lock name */ From owner-svn-src-stable@FreeBSD.ORG Sat May 8 20:02:40 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36C301065672; Sat, 8 May 2010 20:02:40 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 24F238FC16; Sat, 8 May 2010 20:02:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48K2exe014680; Sat, 8 May 2010 20:02:40 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48K2eXj014678; Sat, 8 May 2010 20:02:40 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201005082002.o48K2eXj014678@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 8 May 2010 20:02: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: r207794 - stable/7/usr.sbin/iostat X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 20:02:40 -0000 Author: keramida (doc committer) Date: Sat May 8 20:02:39 2010 New Revision: 207794 URL: http://svn.freebsd.org/changeset/base/207794 Log: MFC r196254 iostat: add a bit of space between tty in/out columns The columns for tty input and output may bump against each other if the tty output needs more than 5 columns. Add a bit of space that pushes everything 1 column to the right, but also avoids the problem. Approved by: rwatson Modified: stable/7/usr.sbin/iostat/iostat.c Directory Properties: stable/7/usr.sbin/iostat/ (props changed) Modified: stable/7/usr.sbin/iostat/iostat.c ============================================================================== --- stable/7/usr.sbin/iostat/iostat.c Sat May 8 18:54:47 2010 (r207793) +++ stable/7/usr.sbin/iostat/iostat.c Sat May 8 20:02:39 2010 (r207794) @@ -589,7 +589,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -676,7 +676,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty"); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -699,7 +699,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -744,7 +744,7 @@ devstats(int perf_select, long double et if (xflag > 0) { printf(" extended device statistics "); if (Tflag > 0) - printf(" tty "); + printf(" tty "); if (Cflag > 0) printf(" cpu "); printf("\n"); @@ -757,7 +757,7 @@ devstats(int perf_select, long double et "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -898,7 +898,7 @@ devstats(int perf_select, long double et */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); From owner-svn-src-stable@FreeBSD.ORG Sat May 8 21:18:23 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 535101065670; Sat, 8 May 2010 21:18:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 429DF8FC18; Sat, 8 May 2010 21:18:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48LINnN031453; Sat, 8 May 2010 21:18:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48LINMG031452; Sat, 8 May 2010 21:18:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082118.o48LINMG031452@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 21:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207797 - stable/8/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 21:18:23 -0000 Author: dougb Date: Sat May 8 21:18:22 2010 New Revision: 207797 URL: http://svn.freebsd.org/changeset/base/207797 Log: MFC r206686: Make 'stop' work even if ${name}_enable is not set. Modified: stable/8/etc/rc.subr Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.subr ============================================================================== --- stable/8/etc/rc.subr Sat May 8 20:34:01 2010 (r207796) +++ stable/8/etc/rc.subr Sat May 8 21:18:22 2010 (r207797) @@ -663,12 +663,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then if [ -n "${rc_quiet}" ]; then return 0 From owner-svn-src-stable@FreeBSD.ORG Sat May 8 22:13:49 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 131E91065673; Sat, 8 May 2010 22:13:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0276C8FC14; Sat, 8 May 2010 22:13:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MDmY1043786; Sat, 8 May 2010 22:13:48 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MDmKv043785; Sat, 8 May 2010 22:13:48 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082213.o48MDmKv043785@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:13: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: r207800 - stable/7/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:13:49 -0000 Author: dougb Date: Sat May 8 22:13:48 2010 New Revision: 207800 URL: http://svn.freebsd.org/changeset/base/207800 Log: MFC r179870: Move the check for enabled knobs further down in run_rc_command() so that bogus commands cause usage information to be printed instead of diagnostics about enabling the knob. This is a prerequisite for merging r206686. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat May 8 21:42:28 2010 (r207799) +++ stable/7/etc/rc.subr Sat May 8 22:13:48 2010 (r207800) @@ -603,23 +603,26 @@ run_rc_command() fi fi + eval $_pidcmd # determine the pid if necessary + + for _elem in $_keywords; do + if [ "$_elem" != "$rc_arg" ]; then + continue + fi # if ${rcvar} is set, and $1 is not # "rcvar", then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then - if ! checkyesno ${rcvar}; then - return 0 + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if ! checkyesno ${rcvar}; then + echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " + echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " + echo "instead of '${rc_arg}'." + return 0 + fi fi - fi - - eval $_pidcmd # determine the pid if necessary - for _elem in $_keywords; do - if [ "$_elem" != "$rc_arg" ]; then - continue - fi # if there's a custom ${XXX_cmd}, # run that instead of the default # From owner-svn-src-stable@FreeBSD.ORG Sat May 8 22:15:05 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC26D1065670; Sat, 8 May 2010 22:15:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id ABF788FC0C; Sat, 8 May 2010 22:15:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MF5bf044104; Sat, 8 May 2010 22:15:05 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MF5eo044102; Sat, 8 May 2010 22:15:05 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082215.o48MF5eo044102@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:15: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: r207801 - stable/7/etc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:15:05 -0000 Author: dougb Date: Sat May 8 22:15:05 2010 New Revision: 207801 URL: http://svn.freebsd.org/changeset/base/207801 Log: MFC r206686: Make 'stop' work even if ${name}_enable is not set. Modified: stable/7/etc/rc.subr Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.subr ============================================================================== --- stable/7/etc/rc.subr Sat May 8 22:13:48 2010 (r207800) +++ stable/7/etc/rc.subr Sat May 8 22:15:05 2010 (r207801) @@ -609,12 +609,12 @@ run_rc_command() if [ "$_elem" != "$rc_arg" ]; then continue fi - # if ${rcvar} is set, and $1 is not - # "rcvar", then run + # if ${rcvar} is set, $1 is not "rcvar" + # and ${rc_pid} is not set, then run # checkyesno ${rcvar} # and return if that failed # - if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" ]; then + if [ -n "${rcvar}" -a "$rc_arg" != "rcvar" -a -z "${rc_pid}" ]; then if ! checkyesno ${rcvar}; then echo -n "Cannot '${rc_arg}' $name. Set ${rcvar} to " echo -n "YES in /etc/rc.conf or use 'one${rc_arg}' " From owner-svn-src-stable@FreeBSD.ORG Sat May 8 22:24:01 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7393106566B; Sat, 8 May 2010 22:24:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id B6B998FC0C; Sat, 8 May 2010 22:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MO1J2046112; Sat, 8 May 2010 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MO1Ab046110; Sat, 8 May 2010 22:24:01 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082224.o48MO1Ab046110@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207802 - stable/8/etc/rc.d X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:24:01 -0000 Author: dougb Date: Sat May 8 22:24:01 2010 New Revision: 207802 URL: http://svn.freebsd.org/changeset/base/207802 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/8/etc/rc.d/named Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/rc.d/named ============================================================================== --- stable/8/etc/rc.d/named Sat May 8 22:15:05 2010 (r207801) +++ stable/8/etc/rc.d/named Sat May 8 22:24:01 2010 (r207802) @@ -192,6 +192,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -201,7 +208,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -263,8 +270,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -272,7 +278,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" From owner-svn-src-stable@FreeBSD.ORG Sat May 8 22:24:31 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D5181065672; Sat, 8 May 2010 22:24:31 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCD68FC1A; Sat, 8 May 2010 22:24:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MOVk8046259; Sat, 8 May 2010 22:24:31 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MOVa5046257; Sat, 8 May 2010 22:24:31 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082224.o48MOVa5046257@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:24: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: r207803 - stable/7/etc/rc.d X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:24:31 -0000 Author: dougb Date: Sat May 8 22:24:31 2010 New Revision: 207803 URL: http://svn.freebsd.org/changeset/base/207803 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/7/etc/rc.d/named Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Sat May 8 22:24:01 2010 (r207802) +++ stable/7/etc/rc.d/named Sat May 8 22:24:31 2010 (r207803) @@ -192,6 +192,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -201,7 +208,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -263,8 +270,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -272,7 +278,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}" From owner-svn-src-stable@FreeBSD.ORG Sat May 8 22:25:37 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97C7B1065675; Sat, 8 May 2010 22:25:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 874568FC17; Sat, 8 May 2010 22:25:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o48MPbJS046543; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o48MPb4n046541; Sat, 8 May 2010 22:25:37 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201005082225.o48MPb4n046541@svn.freebsd.org> From: Doug Barton Date: Sat, 8 May 2010 22:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207804 - stable/6/etc/rc.d X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 22:25:37 -0000 Author: dougb Date: Sat May 8 22:25:37 2010 New Revision: 207804 URL: http://svn.freebsd.org/changeset/base/207804 Log: MFC 207346: Fix named-checkconf in the situation where named_chroot_autoupdate is NOT set, but named_chrootdir IS set. Remove required_files for named.conf, named-checkconf is enough. Modified: stable/6/etc/rc.d/named Directory Properties: stable/6/etc/ (props changed) Modified: stable/6/etc/rc.d/named ============================================================================== --- stable/6/etc/rc.d/named Sat May 8 22:24:31 2010 (r207803) +++ stable/6/etc/rc.d/named Sat May 8 22:25:37 2010 (r207804) @@ -193,6 +193,13 @@ named_prestart() $confgen_command fi + local checkconf + + checkconf="${command%/named}/named-checkconf" + if ! checkyesno named_chroot_autoupdate && [ -n "$named_chrootdir" ]; then + checkconf="$checkconf -t $named_chrootdir" + fi + # Create a forwarder configuration based on /etc/resolv.conf if checkyesno named_auto_forward; then if [ ! -s /etc/resolv.conf ]; then @@ -202,7 +209,7 @@ named_prestart() [ -s "${named_confdir}/auto_forward.conf" ] && create_file ${named_confdir}/auto_forward.conf - ${command%/named}/named-checkconf $named_conf || + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' return fi @@ -264,8 +271,7 @@ named_prestart() create_file ${named_confdir}/auto_forward.conf fi - ${command%/named}/named-checkconf $named_conf || - err 3 'named-checkconf for $named_conf failed' + $checkconf $named_conf || err 3 'named-checkconf for $named_conf failed' } load_rc_config $name @@ -273,7 +279,7 @@ load_rc_config $name # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist -required_files="${named_conf:=/etc/namedb/named.conf}" + pidfile="${named_pidfile:-/var/run/named/pid}" named_confdir="${named_chrootdir}${named_conf%/*}"