From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 27 11:11:19 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F2B1065672; Mon, 27 Jun 2011 11:11:19 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 608B98FC1D; Mon, 27 Jun 2011 11:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RBBJaW095207; Mon, 27 Jun 2011 11:11:19 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5RBBJ0C095204; Mon, 27 Jun 2011 11:11:19 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201106271111.p5RBBJ0C095204@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 27 Jun 2011 11:11: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: r223589 - stable/7/sys/net X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2011 11:11:19 -0000 Author: bz Date: Mon Jun 27 11:11:19 2011 New Revision: 223589 URL: http://svn.freebsd.org/changeset/base/223589 Log: MFC r223223: gre(4) was using a field in the softc to detect possible recursion. On MP systems this is not a usable solution anymore and could easily lead to false positives triggering enough logging that even using the console was no longer usable (multiple parallel ping -f can do). Switch to the suggested solution of using mbuf tags to carry per packet state between gre_output() invocations. Contrary to the proposed solution modelled after gif(4) only allocate one mbuf tag per packet rather than per packet and per gre_output() pass through. As the sysctl to control the possible valid (gre in gre) nestings does no sanity checks, make sure to always allocate space in the mbuf tag for at least one, and at most 255 possible gre interfaces to detect loops in addition to the counter. Submitted by: Cristian KLEIN (cristi net.utcluj.ro) (original version) PR: kern/114714 Reviewed by: Cristian KLEIN (cristi net.utcluj.ro) Reviewed bu: Wooseog Choi (ben_choi hotmail.com) Sponsored by: Sandvine Incorporated Modified: stable/7/sys/net/if_gre.c stable/7/sys/net/if_gre.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/net/if_gre.c ============================================================================== --- stable/7/sys/net/if_gre.c Mon Jun 27 11:10:15 2011 (r223588) +++ stable/7/sys/net/if_gre.c Mon Jun 27 11:11:19 2011 (r223589) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -97,6 +98,14 @@ #define GRENAME "gre" +#define MTAG_COOKIE_GRE 1307983903 +#define MTAG_GRE_NESTING 1 +struct mtag_gre_nesting { + uint16_t count; + uint16_t max; + struct ifnet *ifp[]; +}; + /* * gre_mtx protects all global variables in if_gre.c. * XXX: gre_softc data not protected yet. @@ -202,7 +211,6 @@ gre_clone_create(ifc, unit, params) sc->g_proto = IPPROTO_GRE; GRE2IFP(sc)->if_flags |= IFF_LINK0; sc->encap = NULL; - sc->called = 0; sc->gre_fibnum = curthread->td_proc->p_fibnum; sc->wccp_ver = WCCP_V1; sc->key = 0; @@ -246,23 +254,77 @@ gre_output(struct ifnet *ifp, struct mbu struct gre_softc *sc = ifp->if_softc; struct greip *gh; struct ip *ip; + struct m_tag *mtag; + struct mtag_gre_nesting *gt; + size_t len; u_short gre_ip_id = 0; uint8_t gre_ip_tos = 0; u_int16_t etype = 0; struct mobile_h mob_h; u_int32_t af; - int extra = 0; + int extra = 0, max; /* - * gre may cause infinite recursion calls when misconfigured. - * We'll prevent this by introducing upper limit. + * gre may cause infinite recursion calls when misconfigured. High + * nesting level may cause stack exhaustion. We'll prevent this by + * detecting loops and by introducing upper limit. */ - if (++(sc->called) > max_gre_nesting) { - printf("%s: gre_output: recursively called too many " - "times(%d)\n", if_name(GRE2IFP(sc)), sc->called); - m_freem(m); - error = EIO; /* is there better errno? */ - goto end; + mtag = m_tag_locate(m, MTAG_COOKIE_GRE, MTAG_GRE_NESTING, NULL); + if (mtag != NULL) { + struct ifnet **ifp2; + + gt = (struct mtag_gre_nesting *)(mtag + 1); + gt->count++; + if (gt->count > min(gt->max,max_gre_nesting)) { + printf("%s: hit maximum recursion limit %u on %s\n", + __func__, gt->count - 1, ifp->if_xname); + m_freem(m); + error = EIO; /* is there better errno? */ + goto end; + } + + ifp2 = gt->ifp; + for (max = gt->count - 1; max > 0; max--) { + if (*ifp2 == ifp) + break; + ifp2++; + } + if (*ifp2 == ifp) { + printf("%s: detected loop with nexting %u on %s\n", + __func__, gt->count-1, ifp->if_xname); + m_freem(m); + error = EIO; /* is there better errno? */ + goto end; + } + *ifp2 = ifp; + + } else { + /* + * Given that people should NOT increase max_gre_nesting beyond + * their real needs, we allocate once per packet rather than + * allocating an mtag once per passing through gre. + * + * Note: the sysctl does not actually check for saneness, so we + * limit the maximum numbers of possible recursions here. + */ + max = imin(max_gre_nesting, 256); + /* If someone sets the sysctl <= 0, we want at least 1. */ + max = imax(max, 1); + len = sizeof(struct mtag_gre_nesting) + + max * sizeof(struct ifnet *); + mtag = m_tag_alloc(MTAG_COOKIE_GRE, MTAG_GRE_NESTING, len, + M_NOWAIT); + if (mtag == NULL) { + m_freem(m); + error = ENOMEM; + goto end; + } + gt = (struct mtag_gre_nesting *)(mtag + 1); + bzero(gt, len); + gt->count = 1; + gt->max = max; + *gt->ifp = ifp; + m_tag_prepend(m, mtag); } if (!((ifp->if_flags & IFF_UP) && @@ -450,7 +512,6 @@ gre_output(struct ifnet *ifp, struct mbu error = ip_output(m, NULL, &sc->route, IP_FORWARDING, (struct ip_moptions *)NULL, (struct inpcb *)NULL); end: - sc->called = 0; if (error) ifp->if_oerrors++; return (error); Modified: stable/7/sys/net/if_gre.h ============================================================================== --- stable/7/sys/net/if_gre.h Mon Jun 27 11:10:15 2011 (r223588) +++ stable/7/sys/net/if_gre.h Mon Jun 27 11:11:19 2011 (r223589) @@ -68,8 +68,6 @@ struct gre_softc { const struct encaptab *encap; /* encapsulation cookie */ - int called; /* infinite recursion preventer */ - uint32_t key; /* key included in outgoing GRE packets */ /* zero means none */ From owner-svn-src-stable-7@FreeBSD.ORG Mon Jun 27 11:13:59 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442FE106567F; Mon, 27 Jun 2011 11:13:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B0D88FC22; Mon, 27 Jun 2011 11:13:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RBDx6e095369; Mon, 27 Jun 2011 11:13:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5RBDxrm095361; Mon, 27 Jun 2011 11:13:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201106271113.p5RBDxrm095361@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 27 Jun 2011 11:13:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223591 - stable/7/usr.sbin/mfiutil X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2011 11:13:59 -0000 Author: bz Date: Mon Jun 27 11:13:58 2011 New Revision: 223591 URL: http://svn.freebsd.org/changeset/base/223591 Log: MFC r223267: Add 'show logstate' to usage(). MFC r223345: Add global -d and -e options to either print device numbers (usually default) or enclosure:slot information as (Exx:Sxx) or both. Discussed with: jhb Reviewed by: jhb Sponsored by: Sandvine Incorporated Modified: stable/7/usr.sbin/mfiutil/mfi_config.c stable/7/usr.sbin/mfiutil/mfi_drive.c stable/7/usr.sbin/mfiutil/mfi_patrol.c stable/7/usr.sbin/mfiutil/mfi_show.c stable/7/usr.sbin/mfiutil/mfiutil.8 stable/7/usr.sbin/mfiutil/mfiutil.c stable/7/usr.sbin/mfiutil/mfiutil.h Directory Properties: stable/7/usr.sbin/mfiutil/ (props changed) Modified: stable/7/usr.sbin/mfiutil/mfi_config.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_config.c Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfi_config.c Mon Jun 27 11:13:58 2011 (r223591) @@ -419,8 +419,10 @@ build_array(int fd, char *arrayp, struct ar->array_ref = find_next_array(state); for (i = 0; i < array_info->drive_count; i++) { if (verbose) - printf("Adding drive %u to array %u\n", + printf("Adding drive %s to array %u\n", + mfi_drive_name(NULL, array_info->drives[i].ref.v.device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS), ar->array_ref); if (ar->size > array_info->drives[i].coerced_size) ar->size = array_info->drives[i].coerced_size; Modified: stable/7/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_drive.c Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfi_drive.c Mon Jun 27 11:13:58 2011 (r223591) @@ -45,6 +45,87 @@ MFI_TABLE(top, drive); +/* + * Print the name of a drive either by drive number as %2u or by enclosure:slot + * as Exx:Sxx (or both). Use default unless command line options override it + * and the command allows this (which we usually do unless we already print + * both). We prefer pinfo if given, otherwise try to look it up by device_id. + */ +const char * +mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, uint32_t def) +{ + struct mfi_pd_info info; + static char buf[16]; + char *p; + int error, fd, len; + + if ((def & MFI_DNAME_HONOR_OPTS) != 0 && + (mfi_opts & (MFI_DNAME_ES|MFI_DNAME_DEVICE_ID)) != 0) + def = mfi_opts & (MFI_DNAME_ES|MFI_DNAME_DEVICE_ID); + + buf[0] = '\0'; + if (pinfo == NULL && def & MFI_DNAME_ES) { + /* Fallback in case of error, just ignore flags. */ + if (device_id == 0xffff) + snprintf(buf, sizeof(buf), "MISSING"); + else + snprintf(buf, sizeof(buf), "%2u", device_id); + + fd = mfi_open(mfi_unit); + if (fd < 0) { + warn("mfi_open"); + return (buf); + } + + /* Get the info for this drive. */ + if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) { + warn("Failed to fetch info for drive %2u", device_id); + close(fd); + return (buf); + } + + close(fd); + pinfo = &info; + } + + p = buf; + len = sizeof(buf); + if (def & MFI_DNAME_DEVICE_ID) { + if (device_id == 0xffff) + error = snprintf(p, len, "MISSING"); + else + error = snprintf(p, len, "%2u", device_id); + if (error >= 0) { + p += error; + len -= error; + } + } + if ((def & (MFI_DNAME_ES|MFI_DNAME_DEVICE_ID)) == + (MFI_DNAME_ES|MFI_DNAME_DEVICE_ID) && len >= 2) { + *p++ = ' '; + len--; + *p = '\0'; + len--; + } + if (def & MFI_DNAME_ES) { + if (pinfo->encl_device_id == 0xffff) + error = snprintf(p, len, "S%u", + pinfo->slot_number); + else if (pinfo->encl_device_id == pinfo->ref.v.device_id) + error = snprintf(p, len, "E%u", + pinfo->encl_index); + else + error = snprintf(p, len, "E%u:S%u", + pinfo->encl_index, pinfo->slot_number); + if (error >= 0) { + p += error; + len -= error; + } + } + + return (buf); +} + const char * mfi_pdstate(enum mfi_pd_state state) { @@ -547,7 +628,9 @@ drive_progress(int ac, char **av) mfi_display_progress("Clear", &info.prog_info.clear); if ((info.prog_info.active & (MFI_PD_PROGRESS_REBUILD | MFI_PD_PROGRESS_PATROL | MFI_PD_PROGRESS_CLEAR)) == 0) - printf("No activity in progress for drive %u.\n", device_id); + printf("No activity in progress for drive %s.\n", + mfi_drive_name(NULL, device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); return (0); } Modified: stable/7/usr.sbin/mfiutil/mfi_patrol.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_patrol.c Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfi_patrol.c Mon Jun 27 11:13:58 2011 (r223591) @@ -80,7 +80,7 @@ show_patrol(int ac, char **av) struct mfi_pr_status status; struct mfi_pd_list *list; struct mfi_pd_info info; - char label[16]; + char label[24]; time_t now; uint32_t at; int error, fd; @@ -174,8 +174,10 @@ show_patrol(int ac, char **av) return (error); } if (info.prog_info.active & MFI_PD_PROGRESS_PATROL) { - snprintf(label, sizeof(label), " Drive %u", - list->addr[i].device_id); + snprintf(label, sizeof(label), " Drive %s", + mfi_drive_name(NULL, + list->addr[i].device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress(label, &info.prog_info.patrol); } Modified: stable/7/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_show.c Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfi_show.c Mon Jun 27 11:13:58 2011 (r223591) @@ -258,7 +258,7 @@ print_ld(struct mfi_ld_info *info, int s } static void -print_pd(struct mfi_pd_info *info, int state_len, int location) +print_pd(struct mfi_pd_info *info, int state_len) { const char *s; char buf[6]; @@ -273,15 +273,6 @@ print_pd(struct mfi_pd_info *info, int s s = mfi_pd_inq_string(info); if (s != NULL) printf(" %s", s); - if (!location) - return; - if (info->encl_device_id == 0xffff) - printf(" slot %d", info->slot_number); - else if (info->encl_device_id == info->ref.v.device_id) - printf(" enclosure %d", info->encl_index); - else - printf(" enclosure %d, slot %d", info->encl_index, - info->slot_number); } static int @@ -329,16 +320,16 @@ show_config(int ac, char **av) ar->num_drives); for (j = 0; j < ar->num_drives; j++) { device_id = ar->pd[j].ref.v.device_id; - if (device_id == 0xffff) - printf(" drive MISSING\n"); - else { - printf(" drive %u ", device_id); + printf(" drive %s ", mfi_drive_name(NULL, + device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); + if (device_id != 0xffff) { if (mfi_pd_get_info(fd, device_id, &pinfo, NULL) < 0) printf("%s", mfi_pdstate(ar->pd[j].fw_state)); else - print_pd(&pinfo, -1, 1); + print_pd(&pinfo, -1); printf("\n"); } } @@ -367,13 +358,14 @@ show_config(int ac, char **av) for (i = 0; i < config->spares_count; i++) { sp = (struct mfi_spare *)p; - printf(" %s spare %u ", + printf(" %s spare %s ", sp->spare_type & MFI_SPARE_DEDICATED ? "dedicated" : - "global", sp->ref.v.device_id); + "global", mfi_drive_name(NULL, sp->ref.v.device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); if (mfi_pd_get_info(fd, sp->ref.v.device_id, &pinfo, NULL) < 0) printf("%s", mfi_pdstate(MFI_PD_STATE_HOT_SPARE)); else - print_pd(&pinfo, -1, 1); + print_pd(&pinfo, -1); if (sp->spare_type & MFI_SPARE_DEDICATED) { printf(" backs:\n"); for (j = 0; j < sp->array_count; j++) @@ -534,7 +526,11 @@ show_drives(int ac, char **av) goto error; } - print_pd(&info, state_len, 1); + printf("%s ", mfi_drive_name(&info, list->addr[i].device_id, + MFI_DNAME_DEVICE_ID)); + print_pd(&info, state_len); + printf(" %s", mfi_drive_name(&info, list->addr[i].device_id, + MFI_DNAME_ES)); printf("\n"); } error: @@ -719,18 +715,21 @@ show_progress(int ac, char **av) } if (pinfo.prog_info.active & MFI_PD_PROGRESS_REBUILD) { - printf("drive %u ", device_id); + printf("drive %s ", mfi_drive_name(NULL, device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress("Rebuild", &pinfo.prog_info.rbld); busy = 1; } if (pinfo.prog_info.active & MFI_PD_PROGRESS_PATROL) { - printf("drive %u ", device_id); + printf("drive %s ", mfi_drive_name(NULL, device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress("Patrol Read", &pinfo.prog_info.patrol); busy = 1; } if (pinfo.prog_info.active & MFI_PD_PROGRESS_CLEAR) { - printf("drive %u ", device_id); + printf("drive %s ", mfi_drive_name(NULL, device_id, + MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); mfi_display_progress("Clear", &pinfo.prog_info.clear); busy = 1; } Modified: stable/7/usr.sbin/mfiutil/mfiutil.8 ============================================================================== --- stable/7/usr.sbin/mfiutil/mfiutil.8 Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfiutil.8 Mon Jun 27 11:13:58 2011 (r223591) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 29, 2011 +.Dd June 20, 2011 .Dt MFIUTIL 8 .Os .Sh NAME @@ -43,6 +43,8 @@ .Op Fl u Ar unit .Cm show battery .Nm +.Op Fl d +.Op Fl e .Op Fl u Ar unit .Cm show config .Nm @@ -63,9 +65,13 @@ .Op Fl u Ar unit .Cm show logstate .Nm +.Op Fl d +.Op Fl e .Op Fl u Ar unit .Cm show patrol .Nm +.Op Fl d +.Op Fl e .Op Fl u Ar unit .Cm show progress .Nm @@ -155,15 +161,19 @@ If no unit is specified, then unit 0 is used. .El .Pp -Volumes may be specified in two forms. -First, -a volume may be identified by its target ID. -Second, -on the volume may be specified by the corresponding -.Em mfidX -device, -such as -.Em mfid0 . +Various commands accept either or both of the two options: +.Bl -tag -width indent +.It Fl d +Print numeric device IDs as drive identifier. +This is the default. +Useful in combination with +.Fl e +to print both, numeric device IDs and enclosure:slot information. +.It Fl e +Print drive identifiers in enclosure:slot form. +See next paragraph on format details in context of input rather than +output. +.El .Pp Drives may be specified in two forms. First, @@ -184,6 +194,16 @@ and is the slot for each drive as displayed in .Cm show drives . .Pp +Volumes may be specified in two forms. +First, +a volume may be identified by its target ID. +Second, +on the volume may be specified by the corresponding +.Em mfidX +device, +such as +.Em mfid0 . +.Pp The .Nm utility supports several different groups of commands. Modified: stable/7/usr.sbin/mfiutil/mfiutil.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfiutil.c Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfiutil.c Mon Jun 27 11:13:58 2011 (r223591) @@ -45,11 +45,13 @@ MFI_TABLE(top, abort); int mfi_unit; +u_int mfi_opts; + static void usage(void) { - fprintf(stderr, "usage: mfiutil [-u unit] ...\n\n"); + fprintf(stderr, "usage: mfiutil [-de] [-u unit] ...\n\n"); fprintf(stderr, "Commands include:\n"); fprintf(stderr, " version\n"); fprintf(stderr, " show adapter - display controller information\n"); @@ -58,6 +60,7 @@ usage(void) fprintf(stderr, " show drives - list physical drives\n"); fprintf(stderr, " show events - display event log\n"); fprintf(stderr, " show firmware - list firmware images\n"); + fprintf(stderr, " show logstate - display event log sequence numbers\n"); fprintf(stderr, " show volumes - list logical volumes\n"); fprintf(stderr, " show patrol - display patrol read status\n"); fprintf(stderr, " show progress - display status of active operations\n"); @@ -107,8 +110,14 @@ main(int ac, char **av) struct mfiutil_command **cmd; int ch; - while ((ch = getopt(ac, av, "u:")) != -1) { + while ((ch = getopt(ac, av, "deu:")) != -1) { switch (ch) { + case 'd': + mfi_opts |= MFI_DNAME_DEVICE_ID; + break; + case 'e': + mfi_opts |= MFI_DNAME_ES; + break; case 'u': mfi_unit = atoi(optarg); break; Modified: stable/7/usr.sbin/mfiutil/mfiutil.h ============================================================================== --- stable/7/usr.sbin/mfiutil/mfiutil.h Mon Jun 27 11:13:26 2011 (r223590) +++ stable/7/usr.sbin/mfiutil/mfiutil.h Mon Jun 27 11:13:58 2011 (r223591) @@ -115,7 +115,13 @@ struct mfiutil_command { } \ MFI_COMMAND(set, name, mfiutil_ ## name ## _table_handler) +/* Drive name printing options */ +#define MFI_DNAME_ES 0x0001 /* E%u:S%u */ +#define MFI_DNAME_DEVICE_ID 0x0002 /* %u */ +#define MFI_DNAME_HONOR_OPTS 0x8000 /* Allow cmd line to override default */ + extern int mfi_unit; +extern u_int mfi_opts; void mbox_store_ldref(uint8_t *mbox, union mfi_ld_ref *ref); void mbox_store_pdref(uint8_t *mbox, union mfi_pd_ref *ref); @@ -143,5 +149,7 @@ int mfi_pd_get_info(int fd, uint16_t dev int mfi_pd_get_list(int fd, struct mfi_pd_list **listp, uint8_t *statusp); int mfi_reconfig_supported(void); const char *mfi_status(u_int status_code); +const char *mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, + uint32_t def); #endif /* !__MFIUTIL_H__ */ From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 28 05:04:32 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CC94106566C; Tue, 28 Jun 2011 05:04:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8AB8FC14; Tue, 28 Jun 2011 05:04:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5S54WA5029252; Tue, 28 Jun 2011 05:04:32 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5S54V9W029250; Tue, 28 Jun 2011 05:04:31 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201106280504.p5S54V9W029250@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 28 Jun 2011 05:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223619 - stable/7/sbin/geom/class/part X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 05:04:32 -0000 Author: ae Date: Tue Jun 28 05:04:31 2011 New Revision: 223619 URL: http://svn.freebsd.org/changeset/base/223619 Log: MFC r223364: When user specifies the bootcode with size smaller than VTOC_BOOTSIZE, gpart_write_partcode_vtoc8 does access out of range of allocated memory. Check size of bootcode before writing it. Pointed out by: ru Modified: stable/7/sbin/geom/class/part/geom_part.c Directory Properties: stable/7/sbin/geom/class/part/ (props changed) Modified: stable/7/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/7/sbin/geom/class/part/geom_part.c Tue Jun 28 04:57:53 2011 (r223618) +++ stable/7/sbin/geom/class/part/geom_part.c Tue Jun 28 05:04:31 2011 (r223619) @@ -576,8 +576,11 @@ gpart_bootcode(struct gctl_req *req, uns if (idx == 0) errx(EXIT_FAILURE, "missing -i option"); gpart_write_partcode(gp, idx, partcode, partsize); - } else + } else { + if (partsize != VTOC_BOOTSIZE) + errx(EXIT_FAILURE, "invalid bootcode"); gpart_write_partcode_vtoc8(gp, idx, partcode); + } } else if (bootcode == NULL) errx(EXIT_FAILURE, "no -b nor -p"); From owner-svn-src-stable-7@FreeBSD.ORG Tue Jun 28 10:29:19 2011 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B10D1065674; Tue, 28 Jun 2011 10:29:19 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDF198FC15; Tue, 28 Jun 2011 10:29:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5SATIce041772; Tue, 28 Jun 2011 10:29:18 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5SATIwH041766; Tue, 28 Jun 2011 10:29:18 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201106281029.p5SATIwH041766@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 28 Jun 2011 10:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223631 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 10:29:19 -0000 Author: edwin Date: Tue Jun 28 10:29:18 2011 New Revision: 223631 URL: http://svn.freebsd.org/changeset/base/223631 Log: MFC of tzdata2011h, r223629 - Russia scraps DST in 2011 - Remove Netherlands Antilles, add Bonaire, Curacao, Sint Maarten Modified: stable/7/share/zoneinfo/antarctica stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/southamerica stable/7/share/zoneinfo/zone.tab Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/antarctica ============================================================================== --- stable/7/share/zoneinfo/antarctica Tue Jun 28 10:27:49 2011 (r223630) +++ stable/7/share/zoneinfo/antarctica Tue Jun 28 10:29:18 2011 (r223631) @@ -1,5 +1,5 @@ #
-# @(#)antarctica	8.8
+# @(#)antarctica	8.9
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -19,18 +19,6 @@
 # I made up all time zone abbreviations mentioned here; corrections welcome!
 # FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
 
-# These rules are stolen from the `europe' file.
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	RussAQ	1981	1984	-	Apr	 1	 0:00	1:00	S
-Rule	RussAQ	1981	1983	-	Oct	 1	 0:00	0	-
-Rule	RussAQ	1984	1991	-	Sep	lastSun	 2:00s	0	-
-Rule	RussAQ	1985	1991	-	Mar	lastSun	 2:00s	1:00	S
-Rule	RussAQ	1992	only	-	Mar	lastSat	 23:00	1:00	S
-Rule	RussAQ	1992	only	-	Sep	lastSat	 23:00	0	-
-Rule	RussAQ	1993	max	-	Mar	lastSun	 2:00s	1:00	S
-Rule	RussAQ	1993	1995	-	Sep	lastSun	 2:00s	0	-
-Rule	RussAQ	1996	max	-	Oct	lastSun	 2:00s	0	-
-
 # These rules are stolen from the `southamerica' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	ArgAQ	1964	1966	-	Mar	 1	0:00	0	-

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Tue Jun 28 10:27:49 2011	(r223630)
+++ stable/7/share/zoneinfo/asia	Tue Jun 28 10:29:18 2011	(r223631)
@@ -1,4 +1,4 @@
-# @(#)asia	8.64
+# @(#)asia	8.65
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -77,6 +77,10 @@ Rule RussiaAsia	1993	max	-	Mar	lastSun	 
 Rule RussiaAsia	1993	1995	-	Sep	lastSun	 2:00s	0	-
 Rule RussiaAsia	1996	max	-	Oct	lastSun	 2:00s	0	-
 
+# From Arthur David Olson (2011-06-15):
+# While Russia abandoned DST in 2011, Armenia may choose to
+# follow Russia's "old" rules.
+
 # Afghanistan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Kabul	4:36:48 -	LMT	1890

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Tue Jun 28 10:27:49 2011	(r223630)
+++ stable/7/share/zoneinfo/europe	Tue Jun 28 10:29:18 2011	(r223631)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.32
+# @(#)europe	8.33
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -565,6 +565,26 @@ Rule	Russia	1993	max	-	Mar	lastSun	 2:00
 Rule	Russia	1993	1995	-	Sep	lastSun	 2:00s	0	-
 Rule	Russia	1996	max	-	Oct	lastSun	 2:00s	0	-
 
+# From Alexander Krivenyshev (2011-06-14):
+# According to Kremlin press service, Russian President Dmitry Medvedev
+# signed a federal law "On calculation of time" on June 9, 2011.
+# According to the law Russia is abolishing daylight saving time.
+# 
+# Medvedev signed a law "On the Calculation of Time" (in russian): 
+# 
+# http://bmockbe.ru/events/?ID=7583
+# 
+# 
+# Medvedev signed a law on the calculation of the time (in russian):
+# 
+# http://www.regnum.ru/news/polit/1413906.html
+# 
+
+# From Arthur David Olson (2011-06-15):
+# Take "abolishing daylight saving time" to mean that time is now considered
+# to be standard.
+# At least for now, keep the "old" Russia rules for the benefit of Belarus.
+
 # These are for backward compatibility with older versions.
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -2013,7 +2033,8 @@ Zone Europe/Kaliningrad	 1:22:00 -	LMT	1
 			 1:00	C-Eur	CE%sT	1945
 			 2:00	Poland	CE%sT	1946
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
-			 2:00	Russia	EE%sT
+			 2:00	Russia	EE%sT	2011 Mar 27 2:00s
+			 3:00	-	EET
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Adygeya, Arkhangel'skaya oblast',
@@ -2042,7 +2063,8 @@ Zone Europe/Moscow	 2:30:20 -	LMT	1880
 			 2:00	-	EET	1930 Jun 21
 			 3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			 2:00	Russia	EE%sT	1992 Jan 19 2:00s
-			 3:00	Russia	MSK/MSD
+			 3:00	Russia	MSK/MSD	2011 Mar 27 2:00s
+			 4:00	-	MSK
 #
 # Astrakhanskaya oblast', Kirovskaya oblast', Saratovskaya oblast',
 # Volgogradskaya oblast'.  Shanks & Pottenger say Kirov is still at +0400
@@ -2055,7 +2077,8 @@ Zone Europe/Volgograd	 2:57:40 -	LMT	192
 			 4:00	Russia	VOL%sT	1989 Mar 26 2:00s # Volgograd T
 			 3:00	Russia	VOL%sT	1991 Mar 31 2:00s
 			 4:00	-	VOLT	1992 Mar 29 2:00s
-			 3:00	Russia	VOL%sT
+			 3:00	Russia	VOL%sT	2011 Mar 27 2:00s
+			 4:00	-	VOLT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Samarskaya oblast', Udmyrtskaya respublika
@@ -2067,7 +2090,8 @@ Zone Europe/Samara	 3:20:36 -	LMT	1919 J
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
 			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
-			 3:00	Russia	SAM%sT
+			 3:00	Russia	SAM%sT	2011 Mar 27 2:00s
+			 4:00	-	SAMT
 
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
@@ -2080,7 +2104,8 @@ Zone Asia/Yekaterinburg	 4:02:24 -	LMT	1
 			 4:00	-	SVET	1930 Jun 21 # Sverdlovsk Time
 			 5:00	Russia	SVE%sT	1991 Mar 31 2:00s
 			 4:00	Russia	SVE%sT	1992 Jan 19 2:00s
-			 5:00	Russia	YEK%sT	# Yekaterinburg Time
+			 5:00	Russia	YEK%sT	2011 Mar 27 2:00s
+			 6:00	-	YEKT	# Yekaterinburg Time
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Altaj, Altajskij kraj, Omskaya oblast'.
@@ -2088,7 +2113,8 @@ Zone Asia/Omsk		 4:53:36 -	LMT	1919 Nov 
 			 5:00	-	OMST	1930 Jun 21 # Omsk TIme
 			 6:00	Russia	OMS%sT	1991 Mar 31 2:00s
 			 5:00	Russia	OMS%sT	1992 Jan 19 2:00s
-			 6:00	Russia	OMS%sT
+			 6:00	Russia	OMS%sT	2011 Mar 27 2:00s
+			 7:00	-	OMST
 #
 # From Paul Eggert (2006-08-19): I'm guessing about Tomsk here; it's
 # not clear when it switched from +7 to +6.
@@ -2098,7 +2124,8 @@ Zone Asia/Novosibirsk	 5:31:40 -	LMT	191
 			 7:00	Russia	NOV%sT	1991 Mar 31 2:00s
 			 6:00	Russia	NOV%sT	1992 Jan 19 2:00s
 			 7:00	Russia	NOV%sT	1993 May 23 # say Shanks & P.
-			 6:00	Russia	NOV%sT
+			 6:00	Russia	NOV%sT	2011 Mar 27 2:00s
+			 7:00	-	NOVT
 
 # From Alexander Krivenyshev (2009-10-13):
 # Kemerovo oblast' (Kemerovo region) in Russia will change current time zone on
@@ -2131,7 +2158,8 @@ Zone Asia/Novokuznetsk	 5:48:48 -	NMT	19
 			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
 			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
 			 7:00	Russia	KRA%sT	2010 Mar 28 2:00s
-			 6:00	Russia	NOV%sT # Novosibirsk/Novokuznetsk Time
+			 6:00	Russia	NOV%sT	2011 Mar 27 2:00s
+			 7:00	-	NOVT # Novosibirsk/Novokuznetsk Time
 
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
@@ -2142,7 +2170,8 @@ Zone Asia/Krasnoyarsk	 6:11:20 -	LMT	192
 			 6:00	-	KRAT	1930 Jun 21 # Krasnoyarsk Time
 			 7:00	Russia	KRA%sT	1991 Mar 31 2:00s
 			 6:00	Russia	KRA%sT	1992 Jan 19 2:00s
-			 7:00	Russia	KRA%sT
+			 7:00	Russia	KRA%sT	2011 Mar 27 2:00s
+			 8:00	-	KRAT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Buryatiya, Irkutskaya oblast',
@@ -2152,7 +2181,8 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 			 7:00	-	IRKT	1930 Jun 21 # Irkutsk Time
 			 8:00	Russia	IRK%sT	1991 Mar 31 2:00s
 			 7:00	Russia	IRK%sT	1992 Jan 19 2:00s
-			 8:00	Russia	IRK%sT
+			 8:00	Russia	IRK%sT	2011 Mar 27 2:00s
+			 9:00	-	IRKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
@@ -2175,7 +2205,8 @@ Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 De
 			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
 			 9:00	Russia	YAK%sT	1991 Mar 31 2:00s
 			 8:00	Russia	YAK%sT	1992 Jan 19 2:00s
-			 9:00	Russia	YAK%sT
+			 9:00	Russia	YAK%sT	2011 Mar 27 2:00s
+			 10:00	-	YAKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
@@ -2188,7 +2219,8 @@ Zone Asia/Vladivostok	 8:47:44 -	LMT	192
 			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
 			10:00	Russia	VLA%sT	1991 Mar 31 2:00s
 			 9:00	Russia	VLA%sST	1992 Jan 19 2:00s
-			10:00	Russia	VLA%sT
+			10:00	Russia	VLA%sT	2011 Mar 27 2:00s
+			11:00	-	VLAT
 #
 # Sakhalinskaya oblast'.
 # The Zone name should be Yuzhno-Sakhalinsk, but that's too long.
@@ -2198,7 +2230,8 @@ Zone Asia/Sakhalin	 9:30:48 -	LMT	1905 A
 			11:00	Russia	SAK%sT	1991 Mar 31 2:00s # Sakhalin T.
 			10:00	Russia	SAK%sT	1992 Jan 19 2:00s
 			11:00	Russia	SAK%sT	1997 Mar lastSun 2:00s
-			10:00	Russia	SAK%sT
+			10:00	Russia	SAK%sT	2011 Mar 27 2:00s
+			11:00	-	SAKT
 #
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Magadanskaya oblast', Respublika Sakha (Yakutiya).
@@ -2211,7 +2244,8 @@ Zone Asia/Magadan	10:03:12 -	LMT	1924 Ma
 			10:00	-	MAGT	1930 Jun 21 # Magadan Time
 			11:00	Russia	MAG%sT	1991 Mar 31 2:00s
 			10:00	Russia	MAG%sT	1992 Jan 19 2:00s
-			11:00	Russia	MAG%sT
+			11:00	Russia	MAG%sT	2011 Mar 27 2:00s
+			12:00	-	MAGT
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Kamchatskaya oblast', Koryakskij avtonomnyj okrug.
@@ -2222,7 +2256,8 @@ Zone Asia/Kamchatka	10:34:36 -	LMT	1922 
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
 			12:00	Russia	PET%sT	2010 Mar 28 2:00s
-			11:00	Russia	PET%sT
+			11:00	Russia	PET%sT	2011 Mar 27 2:00s
+			12:00	-	PETT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2231,7 +2266,8 @@ Zone Asia/Anadyr	11:49:56 -	LMT	1924 May
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
 			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
-			11:00	Russia	ANA%sT
+			11:00	Russia	ANA%sT	2011 Mar 27 2:00s
+			12:00	-	ANAT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Jun 28 10:27:49 2011	(r223630)
+++ stable/7/share/zoneinfo/southamerica	Tue Jun 28 10:29:18 2011	(r223631)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.49
+# @(#)southamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1276,6 +1276,14 @@ Zone	America/Curacao	-4:35:44 -	LMT	1912
 			-4:30	-	ANT	1965 # Netherlands Antilles Time
 			-4:00	-	AST
 
+# From Arthur David Olson (2011-06-15):
+# At least for now, use links for places with new iso3166 codes.
+# The name "Lower Prince's Quarter" is both longer than fourteen charaters
+# and contains an apostrophe; use "Lower_Princes" below.
+
+Link	America/Curacao	America/Lower_Princes # Sint Maarten
+Link	America/Curacao	America/Kralendijk # Bonaire, Sint Estatius and Saba
+
 # Ecuador
 #
 # From Paul Eggert (2007-03-04):

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Jun 28 10:27:49 2011	(r223630)
+++ stable/7/share/zoneinfo/zone.tab	Tue Jun 28 10:29:18 2011	(r223631)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.43
+# @(#)zone.tab	8.45
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -32,7 +32,6 @@ AG	+1703-06148	America/Antigua
 AI	+1812-06304	America/Anguilla
 AL	+4120+01950	Europe/Tirane
 AM	+4011+04430	Asia/Yerevan
-AN	+1211-06900	America/Curacao
 AO	-0848+01314	Africa/Luanda
 AQ	-7750+16636	Antarctica/McMurdo	McMurdo Station, Ross Island
 AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
@@ -87,6 +86,7 @@ BL	+1753-06251	America/St_Barthelemy
 BM	+3217-06446	Atlantic/Bermuda
 BN	+0456+11455	Asia/Brunei
 BO	-1630-06809	America/La_Paz
+BQ	+120903-0681636	America/Kralendijk
 BR	-0351-03225	America/Noronha	Atlantic islands
 BR	-0127-04829	America/Belem	Amapa, E Para
 BR	-0343-03830	America/Fortaleza	NE Brazil (MA, PI, CE, RN, PB)
@@ -155,6 +155,7 @@ CO	+0436-07405	America/Bogota
 CR	+0956-08405	America/Costa_Rica
 CU	+2308-08222	America/Havana
 CV	+1455-02331	Atlantic/Cape_Verde
+CW	+1211-06900	America/Curacao
 CX	-1025+10543	Indian/Christmas
 CY	+3510+03322	Asia/Nicosia
 CZ	+5005+01426	Europe/Prague
@@ -362,6 +363,7 @@ SO	+0204+04522	Africa/Mogadishu
 SR	+0550-05510	America/Paramaribo
 ST	+0020+00644	Africa/Sao_Tome
 SV	+1342-08912	America/El_Salvador
+SX	+180305-0630250	America/Lower_Princes
 SY	+3330+03618	Asia/Damascus
 SZ	-2618+03106	Africa/Mbabane
 TC	+2128-07108	America/Grand_Turk

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Jun 28 11:01:12 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E185710656D0;
	Tue, 28 Jun 2011 11:01:11 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C6CDC8FC17;
	Tue, 28 Jun 2011 11:01:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5SB1Bar043291;
	Tue, 28 Jun 2011 11:01:11 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5SB1BlK043289;
	Tue, 28 Jun 2011 11:01:11 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201106281101.p5SB1BlK043289@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Jun 2011 11:01:11 +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: r223635 - stable/7/share/misc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 28 Jun 2011 11:01:12 -0000

Author: edwin
Date: Tue Jun 28 11:01:11 2011
New Revision: 223635
URL: http://svn.freebsd.org/changeset/base/223635

Log:
  Get ISO3166 in sync with head.
  
  MFC of recent updates on the ISO3166 file:
  
  r223633
  - Remove AN again now that tzdata2011h has been imported.
  
  r222094
  - Put AN back after finding out that tzsetup(1) will complain that
    it doesn't exist. It will be removed again once the tzdata distribution
    files have been updated with the replacements for AN.
  
  r222014
  - Revert change to "MF" I made in r189767.  I bet that at the time of r189767
    I checked with http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm
    and "MF" was officially spelled in English as "Saint Martin" there, but now
    that "SX" exists (for "Sint Maarten (Dutch part)") (nice official "English"
    spelling!) they seem to have added a "(French part)" suffix to "MF".  Since
    this is also in line with Newsletter VI-1 (2007-09-21), catch up.
  
  r222011
  - ISO3166: Update for newsletters VI-7 and VI-8 from 2010
    - Name change for SH
    - BQ, CW, and SX replace AN
  
    Reviewed by:	ru
  
  r222010
  - Whitespace and typo fixes.
  
    Found by:	codespell
    Reviewed by:	ru
  
  r198948
  - Revert the spelling of Taiwan to be politically neutral in accordance
    with the policy published at http://www.freebsd.org/internal/i18n.html.
  
    Requested by:	core (murray)
  
  r197392
  - List newsletters VI-2, VI-3 and VI-4 that were already applied.
  - Apply newsletters VI-5 (BO's name change) and VI-6 (VE's name change).
  
  r191347
  - Back out my previous change
  
  r191197
  - Change Taiwan, Province of China to Taiwan, Republic of China
  
  r189767
  - Switch to using official English short country names.
  
  r174241
  - Update with data from Newsletter VI-1 2007-09-21:
      Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).
    This allows an MFV of src/share/zoneinfo which uses these two new codes.

Modified:
  stable/7/share/misc/iso3166
Directory Properties:
  stable/7/share/misc/   (props changed)
  stable/7/share/misc/iso639   (props changed)
  stable/7/share/misc/pci_vendors   (props changed)

Modified: stable/7/share/misc/iso3166
==============================================================================
--- stable/7/share/misc/iso3166	Tue Jun 28 10:46:02 2011	(r223634)
+++ stable/7/share/misc/iso3166	Tue Jun 28 11:01:11 2011	(r223635)
@@ -1,5 +1,8 @@
 # $FreeBSD$
 #
+# Please consult with http://www.FreeBSD.org/internal/i18n.html before
+# making changes to this file.
+#
 # ISO 3166 country codes
 # This includes many places that are not legally independent countries,
 # but which is it convenient to refer to separately from their
@@ -13,7 +16,7 @@
 # been deleted unless necessary to distinguish two countries.
 #
 # The ISO3166 Maintenance Agency can be found at:
-#	http://www.iso.ch/iso/en/prods-services/iso3166ma/index.html
+#	http://www.iso.org/iso/country_codes.htm
 #
 # two	three	number	name
 AF	AFG	004	Afghanistan
@@ -42,8 +45,9 @@ BZ	BLZ	084	Belize
 BJ	BEN	204	Benin
 BM	BMU	060	Bermuda
 BT	BTN	064	Bhutan
-BO	BOL	068	Bolivia
-BA	BIH	070	Bosnia and Herzegowina
+BO	BOL	068	Bolivia, Plurinational State of
+BQ	BES	535	Bonaire, Saint Eustatius and Saba
+BA	BIH	070	Bosnia and Herzegovina
 BW	BWA	072	Botswana
 BV	BVT	074	Bouvet Island
 BR	BRA	076	Brazil
@@ -65,13 +69,14 @@ CX	CXR	162	Christmas Island
 CC	CCK	166	Cocos (Keeling) Islands
 CO	COL	170	Colombia
 KM	COM	174	Comoros
-CG	COG	178	Congo (Rep.)
-CD	COD	180	Congo (Dem. Rep.)
+CG	COG	178	Congo
+CD	COD	180	Congo, the Democratic Republic of the
 CK	COK	184	Cook Islands
 CR	CRI	188	Costa Rica
 CI	CIV	384	Cote d'Ivoire
 HR	HRV	191	Croatia
 CU	CUB	192	Cuba
+CW	CUW	531	Curacao
 CY	CYP	196	Cyprus
 CZ	CZE	203	Czech Republic
 DK	DNK	208	Denmark
@@ -86,7 +91,7 @@ GQ	GNQ	226	Equatorial Guinea
 ER	ERI	232	Eritrea
 EE	EST	233	Estonia
 ET	ETH	231	Ethiopia
-FK	FLK	238	Falkland Islands
+FK	FLK	238	Falkland Islands (Malvinas)
 FO	FRO	234	Faroe Islands
 FJ	FJI	242	Fiji
 FI	FIN	246	Finland
@@ -111,14 +116,14 @@ GN	GIN	324	Guinea
 GW	GNB	624	Guinea-Bissau
 GY	GUY	328	Guyana
 HT	HTI	332	Haiti
-HM	HMD	334	Heard and McDonald Islands
+HM	HMD	334	Heard Island and McDonald Islands
 HN	HND	340	Honduras
 HK	HKG	344	Hong Kong
 HU	HUN	348	Hungary
 IS	ISL	352	Iceland
 IN	IND	356	India
 ID	IDN	360	Indonesia
-IR	IRN	364	Iran
+IR	IRN	364	Iran, Islamic Republic of
 IQ	IRQ	368	Iraq
 IE	IRL	372	Ireland
 IM	IMN	833	Isle of Man
@@ -131,8 +136,8 @@ JO	JOR	400	Jordan
 KZ	KAZ	398	Kazakhstan
 KE	KEN	404	Kenya
 KI	KIR	296	Kiribati
-KP	PRK	408	Korea (Democratic People's Republic of)
-KR	KOR	410	Korea (Republic of)
+KP	PRK	408	Korea, Democratic People's Republic of
+KR	KOR	410	Korea, Republic of
 KW	KWT	414	Kuwait
 KG	KGZ	417	Kyrgyzstan
 LA	LAO	418	Lao People's Democratic Republic
@@ -145,7 +150,7 @@ LI	LIE	438	Liechtenstein
 LT	LTU	440	Lithuania
 LU	LUX	442	Luxembourg
 MO	MAC	446	Macao
-MK	MKD	807	Macedonia (The Former Yugoslav Republic of)
+MK	MKD	807	Macedonia, the Former Yugoslav Republic of
 MG	MDG	450	Madagascar
 MW	MWI	454	Malawi
 MY	MYS	458	Malaysia
@@ -158,8 +163,8 @@ MR	MRT	478	Mauritania
 MU	MUS	480	Mauritius
 YT	MYT	175	Mayotte
 MX	MEX	484	Mexico
-FM	FSM	583	Micronesia (Federated States of)
-MD	MDA	498	Moldova
+FM	FSM	583	Micronesia, Federated States of
+MD	MDA	498	Moldova, Republic of
 MC	MCO	492	Monaco
 MN	MNG	496	Mongolia
 ME	MNE	499	Montenegro
@@ -171,7 +176,6 @@ NA	NAM	516	Namibia
 NR	NRU	520	Nauru
 NP	NPL	524	Nepal
 NL	NLD	528	Netherlands
-AN	ANT	530	Netherlands Antilles
 NC	NCL	540	New Caledonia
 NZ	NZL	554	New Zealand
 NI	NIC	558	Nicaragua
@@ -184,9 +188,9 @@ NO	NOR	578	Norway
 OM	OMN	512	Oman
 PK	PAK	586	Pakistan
 PW	PLW	585	Palau
-PS	PSE	275	Occupied Palestinian Territory
+PS	PSE	275	Palestinian Territory, Occupied
 PA	PAN	591	Panama
-PG	PNG	598	Papua-New Guinea
+PG	PNG	598	Papua New Guinea
 PY	PRY	600	Paraguay
 PE	PER	604	Peru
 PH	PHL	608	Philippines
@@ -202,7 +206,7 @@ RW	RWA	646	Rwanda
 BL	BLM	652	Saint Barthelemy
 KN	KNA	659	Saint Kitts and Nevis
 LC	LCA	662	Saint Lucia
-MF	MAF	663	Saint Martin (French part)
+MF	MAF	663	Saint Martin (French Part)
 VC	VCT	670	Saint Vincent and the Grenadines
 WS	WSM	882	Samoa
 SM	SMR	674	San Marino
@@ -213,6 +217,7 @@ RS	SRB	688	Serbia
 SC	SYC	690	Seychelles
 SL	SLE	694	Sierra Leone
 SG	SGP	702	Singapore
+SX	SXM	534	Sint Maarten (Dutch part)
 SK	SVK	703	Slovakia
 SI	SVN	705	Slovenia
 SB	SLB	090	Solomon Islands
@@ -221,18 +226,18 @@ ZA	ZAF	710	South Africa
 GS	SGS	239	South Georgia and the South Sandwich Islands
 ES	ESP	724	Spain
 LK	LKA	144	Sri Lanka
-SH	SHN	654	St. Helena
-PM	SPM	666	St. Pierre and Miquelon
+SH	SHN	654	Saint Helena, Ascension and Tristan da Cunha
+PM	SPM	666	Saint Pierre and Miquelon
 SD	SDN	736	Sudan
 SR	SUR	740	Suriname
-SJ	SJM	744	Svalbard and Jan Mayen Islands
+SJ	SJM	744	Svalbard and Jan Mayen
 SZ	SWZ	748	Swaziland
 SE	SWE	752	Sweden
 CH	CHE	756	Switzerland
 SY	SYR	760	Syrian Arab Republic
 TW	TWN	158	Taiwan
 TJ	TJK	762	Tajikistan
-TZ	TZA	834	Tanzania
+TZ	TZA	834	Tanzania, United Republic of
 TH	THA	764	Thailand
 TG	TGO	768	Togo
 TK	TKL	772	Tokelau
@@ -252,12 +257,12 @@ UM	UMI	581	United States Minor Outlying 
 UY	URY	858	Uruguay
 UZ	UZB	860	Uzbekistan
 VU	VUT	548	Vanuatu
-VA	VAT	336	Vatican City State
-VE	VEN	862	Venezuela
+VA	VAT	336	Holy See (Vatican City State)
+VE	VEN	862	Venezuela, Bolivarian Republic of
 VN	VNM	704	Viet Nam
-VG	VGB	092	Virgin Islands (British)
-VI	VIR	850	Virgin Islands (U.S.)
-WF	WLF	876	Wallis and Futuna Islands
+VG	VGB	092	Virgin Islands, British
+VI	VIR	850	Virgin Islands, U.S.
+WF	WLF	876	Wallis and Futuna
 EH	ESH	732	Western Sahara
 YE	YEM	887	Yemen
 ZM	ZMB	894	Zambia
@@ -392,7 +397,7 @@ ZW	ZWE	716	Zimbabwe
 # Newsletter III-41 1993-07-28
 #   MAURITIUS, changes outside this document
 #
-# Newletter III-42 1993-07-12
+# Newsletter III-42 1993-07-12
 #   SAINT VINCENT AND THE GRENADINES, changes outside this document
 #
 # Newsletter III-43 1993-07-12
@@ -423,15 +428,15 @@ ZW	ZWE	716	Zimbabwe
 #   Czechoslovakia officially deleted
 #
 # Newsletter III-52, 1993-07-02
-#   Angola, changing information not included in this file. Offical name
+#   Angola, changing information not included in this file. Official name
 #   change to Republic of Angola
 #
 # Newsletter III-53, 1993-07-12
-#   Madagascar, changing information not included in this file. Official 
+#   Madagascar, changing information not included in this file. Official
 #   name change to Republic of Madagascar
 #
 # Newsletter III-54, 1993-07-23
-#   South Georgia and the South Sandwich Islands, previously covered by 
+#   South Georgia and the South Sandwich Islands, previously covered by
 #   Falkland Islands
 #
 # Newsletter III-55, 1993-07-16
@@ -447,23 +452,23 @@ ZW	ZWE	716	Zimbabwe
 #
 # Newsletter III-58, 1993-07-16
 #   Afghanistan, changing information not included in this file
-#   Official name change to Islamic State of Afghanistan  
+#   Official name change to Islamic State of Afghanistan
 #
-# Newsletter III-32, 1993-07-25 ammendment
-#   Kyrgyzstan, changing information not included in this file. Offical name
+# Newsletter III-32, 1993-07-25 amendment
+#   Kyrgyzstan, changing information not included in this file. Official name
 #   change to Kyrgyz Republic
 #
 # Newsletter III-59, 1994-01-26
-#   Andorra, changing information not included in this file. Offical name
+#   Andorra, changing information not included in this file. Official name
 #   change to Pricipality of Andorra
 #
 # Newsletter III-60, 1994-01-26
-#   Cambodia, changing information not included in this file. Offical name
+#   Cambodia, changing information not included in this file. Official name
 #   change to Kingdom of Cambodia
 #
 # Thu Feb 10 1994
 # At this point the fourth edition of ISO 3166 appears. It can *now* be
-# ordered from national standards institutions. The RIPE NCC will continue 
+# ordered from national standards institutions. The RIPE NCC will continue
 # tracking changes.
 #
 # [deletia]
@@ -518,3 +523,27 @@ ZW	ZWE	716	Zimbabwe
 #
 # Newsletter VI-1 2007-09-21
 #  Added SAINT BARTHELEMY (BL) and SAINT MARTIN (MF).
+#
+# Newsletter VI-2 2008-04-25
+#  Name changes for Moldova, Montenegro and other minor corrections.
+#
+# Newsletter VI-3 2008-09-09
+#  Name change for Nepal and other minor corrections.
+#  Not relevant to this file.
+#
+# Newsletter VI-4 2009-01-07
+#  Name change for the Republic of Moldova and other minor corrections.
+#
+# Newsletter VI-5 2009-03-03
+#  Name change for Bolivarian Republic of Venezuela and other minor corrections.
+#
+# Newsletter VI-6 2009-05-08
+#  Name change for Plurinational State of Bolivia.
+#
+# Newsletter VI-7 2010-02-22
+#  Name change for Saint Helena, Ascension and Tristan da Cunha
+#
+# Newsletter VI-8 2010-12-15
+#  BONAIRE, SAINT EUSTATIUS AND SABA (BQ), CURACAO (CW) and
+#  SINT MAARTEN (DUTCH PART) (SX) added as new entries.
+#  NETHERLANDS ANTILLES (AN) removed.

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Jun 29 16:46:12 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A7511106564A;
	Wed, 29 Jun 2011 16:46:12 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9665E8FC16;
	Wed, 29 Jun 2011 16:46:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5TGkC60005814;
	Wed, 29 Jun 2011 16:46:12 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5TGkCxW005812;
	Wed, 29 Jun 2011 16:46:12 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201106291646.p5TGkCxW005812@svn.freebsd.org>
From: Dimitry Andric 
Date: Wed, 29 Jun 2011 16:46: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: r223679 - stable/7/contrib/traceroute
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 29 Jun 2011 16:46:12 -0000

Author: dim
Date: Wed Jun 29 16:46:12 2011
New Revision: 223679
URL: http://svn.freebsd.org/changeset/base/223679

Log:
  MFC r223579:
  
  For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
  is defined, but then proceeds to use a hardcoded maximum hostname length
  of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.
  
  PR:	bin/157732

Modified:
  stable/7/contrib/traceroute/traceroute.c
Directory Properties:
  stable/7/contrib/traceroute/   (props changed)

Modified: stable/7/contrib/traceroute/traceroute.c
==============================================================================
--- stable/7/contrib/traceroute/traceroute.c	Wed Jun 29 16:43:44 2011	(r223678)
+++ stable/7/contrib/traceroute/traceroute.c	Wed Jun 29 16:46:12 2011	(r223679)
@@ -1625,7 +1625,7 @@ gethostinfo(register char *hostname)
 	register char **p;
 	register u_int32_t addr, *ap;
 
-	if (strlen(hostname) > 64) {
+	if (strlen(hostname) >= MAXHOSTNAMELEN) {
 		Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n",
 		    prog, hostname);
 		exit(1);

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Jun 29 17:20:11 2011
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C55D106567F;
	Wed, 29 Jun 2011 17:20:11 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 21E608FC25;
	Wed, 29 Jun 2011 17:20:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5THKB9O006983;
	Wed, 29 Jun 2011 17:20:11 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5THKAk4006980;
	Wed, 29 Jun 2011 17:20:10 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201106291720.p5THKAk4006980@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 29 Jun 2011 17:20:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r223682 - stable/7/sys/dev/vr
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 29 Jun 2011 17:20:11 -0000

Author: yongari
Date: Wed Jun 29 17:20:10 2011
New Revision: 223682
URL: http://svn.freebsd.org/changeset/base/223682

Log:
  MFC r223405:
    Remove link state change callback handler.  There is no need to
    register both status change and link state change callbacks.
    Implement checking valid link in state change callback and poll
    active link state in vr_tick().  This allows immediate detection of
    lost link as well as protecting driver from frequent link flips during
    link renegotiation.  taskq implementation was removed because driver
    now needs to poll link state in vr_tick().
    While I'm here do not report current link state if interface is not
    running.
  
    Tested by:	n_hibma

Modified:
  stable/7/sys/dev/vr/if_vr.c
  stable/7/sys/dev/vr/if_vrreg.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/vr/if_vr.c
==============================================================================
--- stable/7/sys/dev/vr/if_vr.c	Wed Jun 29 17:18:33 2011	(r223681)
+++ stable/7/sys/dev/vr/if_vr.c	Wed Jun 29 17:20:10 2011	(r223682)
@@ -185,7 +185,6 @@ static int vr_miibus_readreg(device_t, i
 static int vr_miibus_writereg(device_t, int, int, int);
 static void vr_miibus_statchg(device_t);
 
-static void vr_link_task(void *, int);
 static void vr_cam_mask(struct vr_softc *, uint32_t, int);
 static int vr_cam_data(struct vr_softc *, int, int, uint8_t *);
 static void vr_set_filter(struct vr_softc *);
@@ -226,7 +225,6 @@ static device_method_t vr_methods[] = {
 	DEVMETHOD(miibus_readreg,	vr_miibus_readreg),
 	DEVMETHOD(miibus_writereg,	vr_miibus_writereg),
 	DEVMETHOD(miibus_statchg,	vr_miibus_statchg),
-	DEVMETHOD(miibus_linkchg,	vr_miibus_statchg),
 
 	{ NULL, NULL }
 };
@@ -290,22 +288,13 @@ vr_miibus_writereg(device_t dev, int phy
 	return (0);
 }
 
-static void
-vr_miibus_statchg(device_t dev)
-{
-	struct vr_softc		*sc;
-
-	sc = device_get_softc(dev);
-	taskqueue_enqueue(taskqueue_swi, &sc->vr_link_task);
-}
-
 /*
  * In order to fiddle with the
  * 'full-duplex' and '100Mbps' bits in the netconfig register, we
  * first have to put the transmit and/or receive logic in the idle state.
  */
 static void
-vr_link_task(void *arg, int pending)
+vr_miibus_statchg(device_t dev)
 {
 	struct vr_softc		*sc;
 	struct mii_data		*mii;
@@ -313,22 +302,25 @@ vr_link_task(void *arg, int pending)
 	int			lfdx, mfdx;
 	uint8_t			cr0, cr1, fc;
 
-	sc = (struct vr_softc *)arg;
-
-	VR_LOCK(sc);
+	sc = device_get_softc(dev);
 	mii = device_get_softc(sc->vr_miibus);
 	ifp = sc->vr_ifp;
 	if (mii == NULL || ifp == NULL ||
-	    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
-		VR_UNLOCK(sc);
+	    (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
 		return;
-	}
 
-	if (mii->mii_media_status & IFM_ACTIVE) {
-		if (IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)
+	sc->vr_link = 0;
+	if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) ==
+	    (IFM_ACTIVE | IFM_AVALID)) {
+		switch (IFM_SUBTYPE(mii->mii_media_active)) {
+		case IFM_10_T:
+		case IFM_100_TX:
 			sc->vr_link = 1;
-	} else
-		sc->vr_link = 0;
+			break;
+		default:
+			break;
+		}
+	}
 
 	if (sc->vr_link != 0) {
 		cr0 = CSR_READ_1(sc, VR_CR0);
@@ -384,11 +376,8 @@ vr_link_task(void *arg, int pending)
 			    "%s: Tx/Rx shutdown error -- resetting\n",
 			    __func__);
 			sc->vr_flags |= VR_F_RESTART;
-			VR_UNLOCK(sc);
-			return;
 		}
 	}
-	VR_UNLOCK(sc);
 }
 
 
@@ -621,7 +610,6 @@ vr_attach(device_t dev)
 	mtx_init(&sc->vr_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
 	    MTX_DEF);
 	callout_init_mtx(&sc->vr_stat_callout, &sc->vr_mtx, 0);
-	TASK_INIT(&sc->vr_link_task, 0, vr_link_task, sc);
 	SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 	    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 	    OID_AUTO, "stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0,
@@ -841,7 +829,6 @@ vr_detach(device_t dev)
 		vr_stop(sc);
 		VR_UNLOCK(sc);
 		callout_drain(&sc->vr_stat_callout);
-		taskqueue_drain(taskqueue_swi, &sc->vr_link_task);
 		ether_ifdetach(ifp);
 	}
 	if (sc->vr_miibus)
@@ -1556,6 +1543,8 @@ vr_tick(void *xsc)
 
 	mii = device_get_softc(sc->vr_miibus);
 	mii_tick(mii);
+	if (sc->vr_link == 0)
+		vr_miibus_statchg(sc->vr_dev);
 	vr_watchdog(sc);
 	callout_reset(&sc->vr_stat_callout, hz, vr_tick, sc);
 }
@@ -2155,6 +2144,10 @@ vr_ifmedia_sts(struct ifnet *ifp, struct
 	sc = ifp->if_softc;
 	mii = device_get_softc(sc->vr_miibus);
 	VR_LOCK(sc);
+	if ((ifp->if_flags & IFF_UP) == 0) {
+		VR_UNLOCK(sc);
+		return;
+	}
 	mii_pollstat(mii);
 	VR_UNLOCK(sc);
 	ifmr->ifm_active = mii->mii_media_active;

Modified: stable/7/sys/dev/vr/if_vrreg.h
==============================================================================
--- stable/7/sys/dev/vr/if_vrreg.h	Wed Jun 29 17:18:33 2011	(r223681)
+++ stable/7/sys/dev/vr/if_vrreg.h	Wed Jun 29 17:20:10 2011	(r223682)
@@ -723,7 +723,6 @@ struct vr_softc {
 	uint8_t			vr_flags;	/* See VR_F_* below */
 #define	VR_F_RESTART		0x01		/* Restart unit on next tick */
 	int			vr_if_flags;
-	struct task		vr_link_task;
 	struct vr_chain_data	vr_cdata;
 	struct vr_ring_data	vr_rdata;
 	struct vr_statistics	vr_stat;