From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 01:34:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4FA51065674; Sun, 23 Oct 2011 01:34:19 +0000 (UTC) (envelope-from bogorodskiy@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2624D8FC12; Sun, 23 Oct 2011 01:34:18 +0000 (UTC) Received: by yxt33 with SMTP id 33so1338101yxt.13 for ; Sat, 22 Oct 2011 18:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=pRCRWqAKO7M5u7RN3OCkxiwQXUe+N46gES3kJY0a6Jw=; b=J1lMhWTwOrydUwzMp6N8LoPvhc6A4LBnaC/KQ0nTxeFq1fYhPR8Fhk9amFo7b37IY9 Vw/Fdgoflo90MShEQexNoXBYskXwlg+uLGXADcDKrT50FDyOrvppboLWNSCkRL4HmTaD thJVdzmq/0n7mJMRMS/HHqX2meA+826MREgPk= Received: by 10.236.133.241 with SMTP id q77mr25272516yhi.117.1319332174724; Sat, 22 Oct 2011 18:09:34 -0700 (PDT) Received: from korsakoff ([12.204.99.164]) by mx.google.com with ESMTPS id j25sm26069663yhm.12.2011.10.22.18.09.32 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 22 Oct 2011 18:09:33 -0700 (PDT) Sender: Roman Bogorodskiy Date: Sat, 22 Oct 2011 18:09:48 -0700 From: Roman Bogorodskiy To: Nathan Whitehorn Message-ID: <20111023010947.GA6795@korsakoff> References: <201110162101.p9GL1hJX079685@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <201110162101.p9GL1hJX079685@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226449 - in head: etc/devd share/man/man4/man4.powerpc sys/conf sys/dev/adb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 01:34:19 -0000 Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Oct 16 21:01:42 2011 > New Revision: 226449 > URL: http://svn.freebsd.org/changeset/base/226449 >=20 > Log: > Add support for special keys (volume/brightness/eject) on Apple laptops= with > ADB keyboards. > =20 > Submitted by: Justin Hibbits > MFC after: 9.0-RELEASE Thanks for committing this! There's a tiny in a abtn.4, see below. > Added: > head/etc/devd/apple.conf (contents, props changed) > head/share/man/man4/man4.powerpc/abtn.4 (contents, props changed) > head/sys/dev/adb/adb_buttons.c (contents, props changed) > Modified: > head/etc/devd/Makefile > head/share/man/man4/man4.powerpc/Makefile > head/share/man/man4/man4.powerpc/akbd.4 > head/sys/conf/files.powerpc > head/sys/dev/adb/adb_kbd.c =2E.. > Added: head/share/man/man4/man4.powerpc/abtn.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/man4.powerpc/abtn.4 Sun Oct 16 21:01:42 2011 (r22= 6449) =2E.. > +Examples are included in /etc/devd/apple.conf. > +.Sh SEE ALSO > +.Xr adb 4 , > +.Xr akbd 4 , > +.Xr cuda 4 , > +.Xr pmu 4, ^ Space missing before the comma, as a result "SEE ALSO" looks like this: adb(4), akbd(4), cuda(4), pmu(4,) devd(8) ^^^ > +.Xr devd 8 > +.Sh HISTORY > +The > +.Nm > +device driver first appeared in > +.Nx 5.0 > +and was ported to > +.Fx 10.0 . > +.Sh AUTHORS > +.An -nosplit > +The > +.Nm > +driver was written by > +.An Tsubai Masanari > +for > +.Nx > +and ported to > +.Fx > +by > +.An Justin Hibbits . Roman Bogorodskiy From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 02:51:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66777106566B; Sun, 23 Oct 2011 02:51:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D2D88FC08; Sun, 23 Oct 2011 02:51:23 +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 p9N2pNq9006971; Sun, 23 Oct 2011 02:51:23 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N2pN79006969; Sun, 23 Oct 2011 02:51:23 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110230251.p9N2pN79006969@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 23 Oct 2011 02:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226647 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 02:51:23 -0000 Author: marcel Date: Sun Oct 23 02:51:23 2011 New Revision: 226647 URL: http://svn.freebsd.org/changeset/base/226647 Log: Add support for Boot Camp. The support is defined as follows: o Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT). o When Boot Camp is enabled, update the MBR whenever we write the GPT. o Creation of a Boot Camp enabled GPT is not supported. o Automatically disable Boot Camp when the GPT has been changed so that there's either no EFI partition or no HFS+ partition. o The first 4 partitions (by index) get mirrored in the MBR. Requested by, discussed with and tested by: kris@pcbsd.org MFC after: 1 week Modified: head/sys/geom/part/g_part_gpt.c Modified: head/sys/geom/part/g_part_gpt.c ============================================================================== --- head/sys/geom/part/g_part_gpt.c Sun Oct 23 01:19:01 2011 (r226646) +++ head/sys/geom/part/g_part_gpt.c Sun Oct 23 02:51:23 2011 (r226647) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002, 2005, 2006, 2007 Marcel Moolenaar + * Copyright (c) 2002, 2005-2007, 2011 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,6 +79,7 @@ struct g_part_gpt_table { struct gpt_hdr *hdr; quad_t lba[GPT_ELT_COUNT]; enum gpt_state state[GPT_ELT_COUNT]; + int bootcamp; }; struct g_part_gpt_entry { @@ -178,41 +179,165 @@ static struct uuid gpt_uuid_unused = GPT static struct g_part_uuid_alias { struct uuid *uuid; int alias; + int mbrtype; } gpt_uuid_alias_match[] = { - { &gpt_uuid_apple_boot, G_PART_ALIAS_APPLE_BOOT }, - { &gpt_uuid_apple_hfs, G_PART_ALIAS_APPLE_HFS }, - { &gpt_uuid_apple_label, G_PART_ALIAS_APPLE_LABEL }, - { &gpt_uuid_apple_raid, G_PART_ALIAS_APPLE_RAID }, - { &gpt_uuid_apple_raid_offline, G_PART_ALIAS_APPLE_RAID_OFFLINE }, - { &gpt_uuid_apple_tv_recovery, G_PART_ALIAS_APPLE_TV_RECOVERY }, - { &gpt_uuid_apple_ufs, G_PART_ALIAS_APPLE_UFS }, - { &gpt_uuid_bios_boot, G_PART_ALIAS_BIOS_BOOT }, - { &gpt_uuid_efi, G_PART_ALIAS_EFI }, - { &gpt_uuid_freebsd, G_PART_ALIAS_FREEBSD }, - { &gpt_uuid_freebsd_boot, G_PART_ALIAS_FREEBSD_BOOT }, - { &gpt_uuid_freebsd_swap, G_PART_ALIAS_FREEBSD_SWAP }, - { &gpt_uuid_freebsd_ufs, G_PART_ALIAS_FREEBSD_UFS }, - { &gpt_uuid_freebsd_vinum, G_PART_ALIAS_FREEBSD_VINUM }, - { &gpt_uuid_freebsd_zfs, G_PART_ALIAS_FREEBSD_ZFS }, - { &gpt_uuid_linux_data, G_PART_ALIAS_LINUX_DATA }, - { &gpt_uuid_linux_lvm, G_PART_ALIAS_LINUX_LVM }, - { &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID }, - { &gpt_uuid_linux_swap, G_PART_ALIAS_LINUX_SWAP }, - { &gpt_uuid_mbr, G_PART_ALIAS_MBR }, - { &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA }, - { &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA }, - { &gpt_uuid_ms_ldm_metadata, G_PART_ALIAS_MS_LDM_METADATA }, - { &gpt_uuid_ms_reserved, G_PART_ALIAS_MS_RESERVED }, - { &gpt_uuid_netbsd_ccd, G_PART_ALIAS_NETBSD_CCD }, - { &gpt_uuid_netbsd_cgd, G_PART_ALIAS_NETBSD_CGD }, - { &gpt_uuid_netbsd_ffs, G_PART_ALIAS_NETBSD_FFS }, - { &gpt_uuid_netbsd_lfs, G_PART_ALIAS_NETBSD_LFS }, - { &gpt_uuid_netbsd_raid, G_PART_ALIAS_NETBSD_RAID }, - { &gpt_uuid_netbsd_swap, G_PART_ALIAS_NETBSD_SWAP }, - - { NULL, 0 } + { &gpt_uuid_apple_boot, G_PART_ALIAS_APPLE_BOOT, 0xab }, + { &gpt_uuid_apple_hfs, G_PART_ALIAS_APPLE_HFS, 0xaf }, + { &gpt_uuid_apple_label, G_PART_ALIAS_APPLE_LABEL, 0 }, + { &gpt_uuid_apple_raid, G_PART_ALIAS_APPLE_RAID, 0 }, + { &gpt_uuid_apple_raid_offline, G_PART_ALIAS_APPLE_RAID_OFFLINE, 0 }, + { &gpt_uuid_apple_tv_recovery, G_PART_ALIAS_APPLE_TV_RECOVERY, 0 }, + { &gpt_uuid_apple_ufs, G_PART_ALIAS_APPLE_UFS, 0 }, + { &gpt_uuid_bios_boot, G_PART_ALIAS_BIOS_BOOT, 0 }, + { &gpt_uuid_efi, G_PART_ALIAS_EFI, 0xee }, + { &gpt_uuid_freebsd, G_PART_ALIAS_FREEBSD, 0xa5 }, + { &gpt_uuid_freebsd_boot, G_PART_ALIAS_FREEBSD_BOOT, 0 }, + { &gpt_uuid_freebsd_swap, G_PART_ALIAS_FREEBSD_SWAP, 0 }, + { &gpt_uuid_freebsd_ufs, G_PART_ALIAS_FREEBSD_UFS, 0 }, + { &gpt_uuid_freebsd_vinum, G_PART_ALIAS_FREEBSD_VINUM, 0 }, + { &gpt_uuid_freebsd_zfs, G_PART_ALIAS_FREEBSD_ZFS, 0 }, + { &gpt_uuid_linux_data, G_PART_ALIAS_LINUX_DATA, 0x0b }, + { &gpt_uuid_linux_lvm, G_PART_ALIAS_LINUX_LVM, 0 }, + { &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID, 0 }, + { &gpt_uuid_linux_swap, G_PART_ALIAS_LINUX_SWAP, 0 }, + { &gpt_uuid_mbr, G_PART_ALIAS_MBR, 0 }, + { &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA, 0x0b }, + { &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA, 0 }, + { &gpt_uuid_ms_ldm_metadata, G_PART_ALIAS_MS_LDM_METADATA, 0 }, + { &gpt_uuid_ms_reserved, G_PART_ALIAS_MS_RESERVED, 0 }, + { &gpt_uuid_netbsd_ccd, G_PART_ALIAS_NETBSD_CCD, 0 }, + { &gpt_uuid_netbsd_cgd, G_PART_ALIAS_NETBSD_CGD, 0 }, + { &gpt_uuid_netbsd_ffs, G_PART_ALIAS_NETBSD_FFS, 0 }, + { &gpt_uuid_netbsd_lfs, G_PART_ALIAS_NETBSD_LFS, 0 }, + { &gpt_uuid_netbsd_raid, G_PART_ALIAS_NETBSD_RAID, 0 }, + { &gpt_uuid_netbsd_swap, G_PART_ALIAS_NETBSD_SWAP, 0 }, + { NULL, 0, 0 } }; +static int +gpt_write_mbr_entry(u_char *mbr, int idx, int typ, quad_t start, + quad_t end) +{ + + if (typ == 0 || start > UINT32_MAX || end > UINT32_MAX) + return (EINVAL); + + mbr += DOSPARTOFF + idx * DOSPARTSIZE; + mbr[0] = 0; + if (start == 1) { + /* + * Treat the PMBR partition specially to maximize + * interoperability with BIOSes. + */ + mbr[1] = mbr[3] = 0; + mbr[2] = 2; + } else + mbr[1] = mbr[2] = mbr[3] = 0xff; + mbr[4] = typ; + mbr[5] = mbr[6] = mbr[7] = 0xff; + le32enc(mbr + 8, (uint32_t)start); + le32enc(mbr + 12, (uint32_t)(end - start + 1)); + return (0); +} + +static int +gpt_map_type(struct uuid *t) +{ + struct g_part_uuid_alias *uap; + + for (uap = &gpt_uuid_alias_match[0]; uap->uuid; uap++) { + if (EQUUID(t, uap->uuid)) + return (uap->mbrtype); + } + return (0); +} + +/* + * Under Boot Camp the PMBR partition (type 0xEE) doesn't cover the + * whole disk anymore. Rather, it covers the GPT table and the EFI + * system partition only. This way the HFS+ partition and any FAT + * partitions can be added to the MBR without creating an overlap. + */ +static int +gpt_is_bootcamp(struct g_part_gpt_table *table, const char *provname) +{ + uint8_t *p; + + p = table->mbr + DOSPARTOFF; + if (p[4] != 0xee || le32dec(p + 8) != 1) + return (0); + + p += DOSPARTSIZE; + if (p[4] != 0xaf) + return (0); + + printf("GEOM: %s: enabling Boot Camp\n", provname); + return (1); +} + +static void +gpt_update_bootcamp(struct g_part_table *basetable) +{ + struct g_part_entry *baseentry; + struct g_part_gpt_entry *entry; + struct g_part_gpt_table *table; + int bootable, error, index, slices, typ; + + table = (struct g_part_gpt_table *)basetable; + + bootable = -1; + for (index = 0; index < NDOSPART; index++) { + if (table->mbr[DOSPARTOFF + DOSPARTSIZE * index]) + bootable = index; + } + + bzero(table->mbr + DOSPARTOFF, DOSPARTSIZE * NDOSPART); + slices = 0; + LIST_FOREACH(baseentry, &basetable->gpt_entry, gpe_entry) { + if (baseentry->gpe_deleted) + continue; + index = baseentry->gpe_index - 1; + if (index >= NDOSPART) + continue; + + entry = (struct g_part_gpt_entry *)baseentry; + + switch (index) { + case 0: /* This must be the EFI system partition. */ + if (!EQUUID(&entry->ent.ent_type, &gpt_uuid_efi)) + goto disable; + error = gpt_write_mbr_entry(table->mbr, index, 0xee, + 1ull, entry->ent.ent_lba_end); + break; + case 1: /* This must be the HFS+ partition. */ + if (!EQUUID(&entry->ent.ent_type, &gpt_uuid_apple_hfs)) + goto disable; + error = gpt_write_mbr_entry(table->mbr, index, 0xaf, + entry->ent.ent_lba_start, entry->ent.ent_lba_end); + break; + default: + typ = gpt_map_type(&entry->ent.ent_type); + error = gpt_write_mbr_entry(table->mbr, index, typ, + entry->ent.ent_lba_start, entry->ent.ent_lba_end); + break; + } + if (error) + continue; + + if (index == bootable) + table->mbr[DOSPARTOFF + DOSPARTSIZE * index] = 0x80; + slices |= 1 << index; + } + if ((slices & 3) == 3) + return; + + disable: + table->bootcamp = 0; + bzero(table->mbr + DOSPARTOFF, DOSPARTSIZE * NDOSPART); + gpt_write_mbr_entry(table->mbr, 0, 0xee, 1ull, + MIN(table->lba[GPT_ELT_SECHDR], UINT32_MAX)); +} + static struct gpt_hdr * gpt_read_hdr(struct g_part_gpt_table *table, struct g_consumer *cp, enum gpt_elt elt) @@ -457,8 +582,9 @@ g_part_gpt_bootcode(struct g_part_table if (codesz > 0) bcopy(gpp->gpp_codeptr, table->mbr, codesz); - /* Mark the PMBR active since some BIOS require it */ - table->mbr[DOSPARTOFF] = 0x80; /* status */ + /* Mark the PMBR active since some BIOS require it. */ + if (!table->bootcamp) + table->mbr[DOSPARTOFF] = 0x80; /* status */ return (0); } @@ -486,15 +612,7 @@ g_part_gpt_create(struct g_part_table *b last = (pp->mediasize / pp->sectorsize) - 1; le16enc(table->mbr + DOSMAGICOFFSET, DOSMAGIC); - table->mbr[DOSPARTOFF + 1] = 0x01; /* shd */ - table->mbr[DOSPARTOFF + 2] = 0x01; /* ssect */ - table->mbr[DOSPARTOFF + 3] = 0x00; /* scyl */ - table->mbr[DOSPARTOFF + 4] = 0xee; /* typ */ - table->mbr[DOSPARTOFF + 5] = 0xff; /* ehd */ - table->mbr[DOSPARTOFF + 6] = 0xff; /* esect */ - table->mbr[DOSPARTOFF + 7] = 0xff; /* ecyl */ - le32enc(table->mbr + DOSPARTOFF + 8, 1); /* start */ - le32enc(table->mbr + DOSPARTOFF + 12, MIN(last, UINT32_MAX)); + gpt_write_mbr_entry(table->mbr, 0, 0xee, 1, MIN(last, UINT32_MAX)); /* Allocate space for the header */ table->hdr = g_malloc(sizeof(struct gpt_hdr), M_WAITOK | M_ZERO); @@ -802,6 +920,21 @@ g_part_gpt_read(struct g_part_table *bas } g_free(tbl); + + /* + * Under Mac OS X, the MBR mirrors the first 4 GPT partitions + * if (and only if) any FAT32 or FAT16 partitions have been + * created. This happens irrespective of whether Boot Camp is + * used/enabled, though it's generally understood to be done + * to support legacy Windows under Boot Camp. We refer to this + * mirroring simply as Boot Camp. We try to detect Boot Camp + * so that we can update the MBR if and when GPT changes have + * been made. Note that we do not enable Boot Camp if not + * previously enabled because we can't assume that we're on a + * Mac alongside Mac OS X. + */ + table->bootcamp = gpt_is_bootcamp(table, pp->name); + return (0); } @@ -816,73 +949,52 @@ g_part_gpt_recover(struct g_part_table * } static int -g_part_gpt_setunset(struct g_part_table *table, struct g_part_entry *baseentry, - const char *attrib, unsigned int set) +g_part_gpt_setunset(struct g_part_table *basetable, + struct g_part_entry *baseentry, const char *attrib, unsigned int set) { - struct g_part_entry *iter; struct g_part_gpt_entry *entry; - int changed, bootme, bootonce, bootfailed; + struct g_part_gpt_table *table; + uint64_t attr; + int i; - bootme = bootonce = bootfailed = 0; + table = (struct g_part_gpt_table *)basetable; + entry = (struct g_part_gpt_entry *)baseentry; + + if (strcasecmp(attrib, "active") == 0) { + if (!table->bootcamp || baseentry->gpe_index > NDOSPART) + return (EINVAL); + for (i = 0; i < NDOSPART; i++) { + table->mbr[DOSPARTOFF + i * DOSPARTSIZE] = + (i == baseentry->gpe_index - 1) ? 0x80 : 0; + } + return (0); + } + + attr = 0; if (strcasecmp(attrib, "bootme") == 0) { - bootme = 1; + attr |= GPT_ENT_ATTR_BOOTME; } else if (strcasecmp(attrib, "bootonce") == 0) { - /* BOOTME is set automatically with BOOTONCE, but not unset. */ - bootonce = 1; + attr |= GPT_ENT_ATTR_BOOTONCE; if (set) - bootme = 1; + attr |= GPT_ENT_ATTR_BOOTME; } else if (strcasecmp(attrib, "bootfailed") == 0) { /* * It should only be possible to unset BOOTFAILED, but it might * be useful for test purposes to also be able to set it. */ - bootfailed = 1; + attr |= GPT_ENT_ATTR_BOOTFAILED; } - if (!bootme && !bootonce && !bootfailed) + if (attr == 0) return (EINVAL); - LIST_FOREACH(iter, &table->gpt_entry, gpe_entry) { - if (iter->gpe_deleted) - continue; - if (iter != baseentry) - continue; - changed = 0; - entry = (struct g_part_gpt_entry *)iter; - if (set) { - if (bootme && - !(entry->ent.ent_attr & GPT_ENT_ATTR_BOOTME)) { - entry->ent.ent_attr |= GPT_ENT_ATTR_BOOTME; - changed = 1; - } - if (bootonce && - !(entry->ent.ent_attr & GPT_ENT_ATTR_BOOTONCE)) { - entry->ent.ent_attr |= GPT_ENT_ATTR_BOOTONCE; - changed = 1; - } - if (bootfailed && - !(entry->ent.ent_attr & GPT_ENT_ATTR_BOOTFAILED)) { - entry->ent.ent_attr |= GPT_ENT_ATTR_BOOTFAILED; - changed = 1; - } - } else { - if (bootme && - (entry->ent.ent_attr & GPT_ENT_ATTR_BOOTME)) { - entry->ent.ent_attr &= ~GPT_ENT_ATTR_BOOTME; - changed = 1; - } - if (bootonce && - (entry->ent.ent_attr & GPT_ENT_ATTR_BOOTONCE)) { - entry->ent.ent_attr &= ~GPT_ENT_ATTR_BOOTONCE; - changed = 1; - } - if (bootfailed && - (entry->ent.ent_attr & GPT_ENT_ATTR_BOOTFAILED)) { - entry->ent.ent_attr &= ~GPT_ENT_ATTR_BOOTFAILED; - changed = 1; - } - } - if (changed && !iter->gpe_created) - iter->gpe_modified = 1; + if (set) + attr = entry->ent.ent_attr | attr; + else + attr = entry->ent.ent_attr & ~attr; + if (attr != entry->ent.ent_attr) { + entry->ent.ent_attr = attr; + if (!baseentry->gpe_created) + baseentry->gpe_modified = 1; } return (0); } @@ -923,6 +1035,10 @@ g_part_gpt_write(struct g_part_table *ba tblsz = (table->hdr->hdr_entries * table->hdr->hdr_entsz + pp->sectorsize - 1) / pp->sectorsize; + /* Reconstruct the MBR from the GPT if under Boot Camp. */ + if (table->bootcamp) + gpt_update_bootcamp(basetable); + /* Write the PMBR */ buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); bcopy(table->mbr, buf, MBRSIZE); From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 02:52:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE1F7106566C; Sun, 23 Oct 2011 02:52:20 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE2C28FC19; Sun, 23 Oct 2011 02:52:20 +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 p9N2qKuS007041; Sun, 23 Oct 2011 02:52:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N2qKlP007039; Sun, 23 Oct 2011 02:52:20 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110230252.p9N2qKlP007039@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 23 Oct 2011 02:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226648 - head/share/man/man4/man4.powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 02:52:20 -0000 Author: nwhitehorn Date: Sun Oct 23 02:52:20 2011 New Revision: 226648 URL: http://svn.freebsd.org/changeset/base/226648 Log: Fix missing space in SEE ALSO section. Submitted by: novel Modified: head/share/man/man4/man4.powerpc/abtn.4 Modified: head/share/man/man4/man4.powerpc/abtn.4 ============================================================================== --- head/share/man/man4/man4.powerpc/abtn.4 Sun Oct 23 02:51:23 2011 (r226647) +++ head/share/man/man4/man4.powerpc/abtn.4 Sun Oct 23 02:52:20 2011 (r226648) @@ -92,7 +92,7 @@ Examples are included in /etc/devd/apple .Xr adb 4 , .Xr akbd 4 , .Xr cuda 4 , -.Xr pmu 4, +.Xr pmu 4 , .Xr devd 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 05:56:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3208106564A; Sun, 23 Oct 2011 05:56:59 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3A0B8FC18; Sun, 23 Oct 2011 05:56: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 p9N5uxqZ013847; Sun, 23 Oct 2011 05:56:59 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N5uxlt013845; Sun, 23 Oct 2011 05:56:59 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110230556.p9N5uxlt013845@svn.freebsd.org> From: Hiroki Sato Date: Sun, 23 Oct 2011 05:56:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226649 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 05:57:00 -0000 Author: hrs Date: Sun Oct 23 05:56:59 2011 New Revision: 226649 URL: http://svn.freebsd.org/changeset/base/226649 Log: Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty. Spotted by: ume Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Sun Oct 23 02:52:20 2011 (r226648) +++ head/etc/network.subr Sun Oct 23 05:56:59 2011 (r226649) @@ -532,7 +532,7 @@ ipv4_up() # Add 127.0.0.1/8 to lo0 unless otherwise specified. if [ "${_if}" = "lo0" ]; then - ifconfig_args=`ifconfig_getargs ${_if}` + ifconfig_args=`get_if_var ${_if} ifconfig_IF` if [ -z "${ifconfig_args}" ]; then ifconfig ${_if} inet 127.0.0.1/8 alias fi From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 06:23:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94A2D106564A; Sun, 23 Oct 2011 06:23:11 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 844D08FC17; Sun, 23 Oct 2011 06:23: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 p9N6NBrY014758; Sun, 23 Oct 2011 06:23:11 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N6NBEC014756; Sun, 23 Oct 2011 06:23:11 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201110230623.p9N6NBEC014756@svn.freebsd.org> From: Colin Percival Date: Sun, 23 Oct 2011 06:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226650 - head/usr.sbin/freebsd-update X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 06:23:11 -0000 Author: cperciva Date: Sun Oct 23 06:23:11 2011 New Revision: 226650 URL: http://svn.freebsd.org/changeset/base/226650 Log: Add '%' and '@' to the set of characters which can appear in path names. Without this change, freebsd-update refuses to accept 9.0 metadata files. Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Sun Oct 23 05:56:59 2011 (r226649) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Sun Oct 23 06:23:11 2011 (r226650) @@ -1200,7 +1200,7 @@ fetch_metadata_sanity () { # Some aliases to save space later: ${P} is a character which can # appear in a path; ${M} is the four numeric metadata fields; and # ${H} is a sha256 hash. - P="[-+./:=_[[:alnum:]]" + P="[-+./:=%@_[[:alnum:]]" M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+" H="[0-9a-f]{64}" From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 06:34:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40E531065675; Sun, 23 Oct 2011 06:34:53 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1768D8FC0A; Sun, 23 Oct 2011 06:34:53 +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 p9N6Yqop015222; Sun, 23 Oct 2011 06:34:52 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N6YqTA015220; Sun, 23 Oct 2011 06:34:52 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110230634.p9N6YqTA015220@svn.freebsd.org> From: Hiroki Sato Date: Sun, 23 Oct 2011 06:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226651 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 06:34:53 -0000 Author: hrs Date: Sun Oct 23 06:34:52 2011 New Revision: 226651 URL: http://svn.freebsd.org/changeset/base/226651 Log: - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6 is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Oct 23 06:23:11 2011 (r226650) +++ head/share/man/man5/rc.conf.5 Sun Oct 23 06:34:52 2011 (r226651) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2011 +.Dd October 23, 2011 .Dt RC.CONF 5 .Os .Sh NAME @@ -1423,6 +1423,11 @@ IPv6 functionality on an interface shoul .Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 , instead of setting ifconfig parameters in .Va ifconfig_ Ns Aq Ar interface . +If this variable is empty, all of IPv6 configurations on the +specified interface by other variables such as +.Va ipv6_prefix_ Ns Ao Ar interface Ac +will be ignored. +.Pp Aliases should be set by .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n with @@ -1433,6 +1438,17 @@ ifconfig_ed0_ipv6="inet6 2001:db8:1::1 p ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" .Ed .Pp +Interfaces that have an +.Dq Li inet6 accept_rtadv +keyword in +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +setting will be automatically configured by SLAAC +.Pq StateLess Address AutoConfiguration +described in +.Rs +.%T "RFC 4862" +.Re +.Pp Note that a link-local address will be automatically configured in addition to the configured global-scope addresses because the IPv6 specifications require it on each link. @@ -1457,19 +1473,32 @@ For example: .Bd -literal ifconfig_ed0_ipv6="inet6 fe80::1 prefixlen 64" .Ed -.Pp -Interfaces that have an -.Dq Li inet6 accept_rtadv -keyword in -.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 -setting will be automatically configured by -.Xr rtsol 8 . .It Va ipv6_prefix_ Ns Aq Ar interface .Pq Vt str If one or more prefixes are defined in .Va ipv6_prefix_ Ns Aq Ar interface addresses based on each prefix and the EUI-64 interface index will be configured on that interface. +Note that this variable will be ignored when +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +is empty. +.Pp +For example, the following configuration +.Bd -literal +ipv6_prefix_ed0="2001:db8:1:: 2001:db8:2::" +.Ed +.Pp +is equivalent to the following: +.Bd -literal +ifconfig_ed0_alias0="inet6 2001:db8:1:: eui64 prefixlen 64" +ifconfig_ed0_alias1="inet6 2001:db8:1:: prefixlen 64 anycast" +ifconfig_ed0_alias2="inet6 2001:db8:2:: eui64 prefixlen 64" +ifconfig_ed0_alias3="inet6 2001:db8:2:: prefixlen 64 anycast" +.Ed +.Pp +These Subnet-Router anycast addresses will be added only when +.Va ipv6_gateway_enable +is YES. .It Va ipv6_default_interface .Pq Vt str If not set to From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 07:37:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F11B1065673; Sun, 23 Oct 2011 07:37:37 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EEAD8FC0C; Sun, 23 Oct 2011 07:37:37 +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 p9N7bbiP017312; Sun, 23 Oct 2011 07:37:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N7bbXb017310; Sun, 23 Oct 2011 07:37:37 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110230737.p9N7bbXb017310@svn.freebsd.org> From: Hiroki Sato Date: Sun, 23 Oct 2011 07:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226652 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 07:37:37 -0000 Author: hrs Date: Sun Oct 23 07:37:36 2011 New Revision: 226652 URL: http://svn.freebsd.org/changeset/base/226652 Log: Add support for removing addresses added by ipv6_prefix_hostid_addr_up() upon rc.d/netif stop. Modified: head/etc/network.subr Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Sun Oct 23 06:34:52 2011 (r226651) +++ head/etc/network.subr Sun Oct 23 07:37:36 2011 (r226652) @@ -556,7 +556,7 @@ ipv6_up() fi ifalias_up ${_if} inet6 && _ret=0 - ipv6_prefix_hostid_addr_up ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 ipv6_accept_rtadv_up ${_if} && _ret=0 # wait for DAD @@ -612,6 +612,7 @@ ipv6_down() fi ipv6_accept_rtadv_down ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 ifalias_down ${_if} inet6 && _ret=0 inetList="`ifconfig ${_if} | grep 'inet6 ' | tr "\n" "$_ifs"`" @@ -859,12 +860,14 @@ ifalias_ipv6_down() return $_ret } -# ipv6_prefix_hostid_addr_up if -# add IPv6 prefix + hostid addr to the interface $if -ipv6_prefix_hostid_addr_up() +# ipv6_prefix_hostid_addr_common if action +# Add or remove IPv6 prefix + hostid addr on the interface $if +# +ipv6_prefix_hostid_addr_common() { - local _if prefix laddr hostid j address + local _if _action prefix laddr hostid j address _if=$1 + _action=$2 prefix=`get_if_var ${_if} ipv6_prefix_IF` if [ -n "${prefix}" ]; then @@ -874,13 +877,13 @@ ipv6_prefix_hostid_addr_up() for j in ${prefix}; do address=$j\:${hostid} - ifconfig ${_if} inet6 ${address} prefixlen 64 alias + ifconfig ${_if} inet6 ${address} prefixlen 64 ${_action} # if I am a router, add subnet router # anycast address (RFC 2373). if checkyesno ipv6_gateway_enable; then ifconfig ${_if} inet6 $j:: prefixlen 64 \ - alias anycast + ${_action} anycast fi done fi From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 07:38:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E85D106566B; Sun, 23 Oct 2011 07:38:56 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5998FC15; Sun, 23 Oct 2011 07:38:56 +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 p9N7cu1Z017395; Sun, 23 Oct 2011 07:38:56 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N7cuGT017393; Sun, 23 Oct 2011 07:38:56 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201110230738.p9N7cuGT017393@svn.freebsd.org> From: Hiroki Sato Date: Sun, 23 Oct 2011 07:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226653 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 07:38:56 -0000 Author: hrs Date: Sun Oct 23 07:38:55 2011 New Revision: 226653 URL: http://svn.freebsd.org/changeset/base/226653 Log: Fix typos. Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Oct 23 07:37:36 2011 (r226652) +++ head/share/man/man5/rc.conf.5 Sun Oct 23 07:38:55 2011 (r226653) @@ -1485,7 +1485,7 @@ is empty. .Pp For example, the following configuration .Bd -literal -ipv6_prefix_ed0="2001:db8:1:: 2001:db8:2::" +ipv6_prefix_ed0="2001:db8:1:0 2001:db8:2:0" .Ed .Pp is equivalent to the following: From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 09:08:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F09B106566B; Sun, 23 Oct 2011 09:08:42 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9CC8FC08; Sun, 23 Oct 2011 09:08:42 +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 p9N98ggE020441; Sun, 23 Oct 2011 09:08:42 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9N98gOH020436; Sun, 23 Oct 2011 09:08:42 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110230908.p9N98gOH020436@svn.freebsd.org> From: Martin Matuska Date: Sun, 23 Oct 2011 09:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226654 - in head/etc: defaults rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 09:08:42 -0000 Author: mm Date: Sun Oct 23 09:08:42 2011 New Revision: 226654 URL: http://svn.freebsd.org/changeset/base/226654 Log: Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp. Make sure that static ARP and NDP bindings are set before NETWORKING. As static_ndp is based on static_arp, pass copyright to the project with permission of the original author (delphij@). Reviewed by: delphij@FreeBSD.org MFC after: 3 days Added: head/etc/rc.d/static_ndp (contents, props changed) Modified: head/etc/defaults/rc.conf head/etc/rc.d/Makefile head/etc/rc.d/NETWORKING Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sun Oct 23 07:38:55 2011 (r226653) +++ head/etc/defaults/rc.conf Sun Oct 23 09:08:42 2011 (r226654) @@ -383,6 +383,7 @@ bsnmpd_flags="" # Flags for bsnmpd. ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). static_arp_pairs="" # Set to static ARP list (or leave empty). +static_ndp_pairs="" # Set to static NDP list (or leave empty). static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sun Oct 23 07:38:55 2011 (r226653) +++ head/etc/rc.d/Makefile Sun Oct 23 09:08:42 2011 (r226654) @@ -32,7 +32,7 @@ FILES= DAEMON FILESYSTEMS LOGIN NETWORKI random rarpd rctl resolv rfcomm_pppd_server root \ route6d routed routing rpcbind rtadvd rtsold rwho \ savecore sdpd securelevel sendmail \ - serial sppp statd static_arp stf swap1 \ + serial sppp statd static_arp static_ndp stf swap1 \ syscons sysctl syslogd \ timed tmp \ ugidfw \ Modified: head/etc/rc.d/NETWORKING ============================================================================== --- head/etc/rc.d/NETWORKING Sun Oct 23 07:38:55 2011 (r226653) +++ head/etc/rc.d/NETWORKING Sun Oct 23 09:08:42 2011 (r226654) @@ -6,6 +6,7 @@ # PROVIDE: NETWORKING NETWORK # REQUIRE: netif netoptions routing ppp ipfw stf faith # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge +# REQUIRE: static_arp static_ndp # This is a dummy dependency, for services which require networking # to be operational before starting. Added: head/etc/rc.d/static_ndp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/rc.d/static_ndp Sun Oct 23 09:08:42 2011 (r226654) @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Copyright (c) 2011 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# Configure static NDP table +# +# $FreeBSD$ +# + +# PROVIDE: static_ndp +# REQUIRE: netif +# KEYWORD: nojail + +. /etc/rc.subr +. /etc/network.subr + +name="static_ndp" +start_cmd="static_ndp_start" +stop_cmd="static_ndp_stop" + +static_ndp_start() +{ + local e ndp_args + + if [ -n "${static_ndp_pairs}" ]; then + echo -n 'Binding static NDP pair(s):' + for e in ${static_ndp_pairs}; do + echo -n " ${e}" + eval ndp_args=\$static_ndp_${e} + ndp -s ${ndp_args} >/dev/null 2>&1 + done + echo '.' + fi +} + +static_ndp_stop() +{ + local e ndp_args + + if [ -n "${static_ndp_pairs}" ]; then + echo -n 'Unbinding static NDP pair(s):' + for e in ${static_ndp_pairs}; do + echo -n " ${e}" + eval ndp_args=\$static_ndp_${e} + ndp -d ${ndp_args%%[ ]*} > /dev/null 2>&1 + done + echo '.' + fi +} + +load_rc_config $name +run_rc_command "$1" From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 09:40:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE514106564A; Sun, 23 Oct 2011 09:40:33 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 55EE78FC14; Sun, 23 Oct 2011 09:40:33 +0000 (UTC) Received: by yxt33 with SMTP id 33so1478428yxt.13 for ; Sun, 23 Oct 2011 02:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MZ/M+RiWmWMAwp7Z2fnX/iHPikIimcx//1LCUpdXlkk=; b=XJTVG0RdpGGFJ+VmWcwFve2dWJgyreu8Y9Wgx1ae1Ubk5RQFNmFKXtjm1BdQqVpr/K 0I0TYcsnRuC8AIUR67EQEiLLzvQECDlxYbYmY253ohlKQbz3bVtGUAzfAoMDhvQJYqfm uYU0K1T9lkPZ/0i2V3G3H5mVq61BUyVzsiw7k= MIME-Version: 1.0 Received: by 10.182.110.1 with SMTP id hw1mr2392360obb.38.1319362832524; Sun, 23 Oct 2011 02:40:32 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.182.216.38 with HTTP; Sun, 23 Oct 2011 02:40:32 -0700 (PDT) In-Reply-To: <201110230908.p9N98gOH020436@svn.freebsd.org> References: <201110230908.p9N98gOH020436@svn.freebsd.org> Date: Sun, 23 Oct 2011 13:40:32 +0400 X-Google-Sender-Auth: PTnJHA1FqGu9TIlGvy3BoORGI5U Message-ID: From: Sergey Kandaurov To: Martin Matuska Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226654 - in head/etc: defaults rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 09:40:33 -0000 On 23 October 2011 13:08, Martin Matuska wrote: > Author: mm > Date: Sun Oct 23 09:08:42 2011 > New Revision: 226654 > URL: http://svn.freebsd.org/changeset/base/226654 > > Log: > =A0Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp. > =A0Make sure that static ARP and NDP bindings are set before NETWORKING. > > =A0As static_ndp is based on static_arp, pass copyright to the project wi= th > =A0permission of the original author (delphij@). > > =A0Reviewed by: =A0delphij@FreeBSD.org > =A0MFC after: =A0 =A03 days What about to reflect this change in man rc.conf? Something like this: Index: share/man/man5/rc.conf.5 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/man/man5/rc.conf.5 (revision 225671) +++ share/man/man5/rc.conf.5 (working copy) @@ -2568,6 +2582,22 @@ For example static_arp_pairs=3D"gw" static_arp_gw=3D"192.168.1.1 00:01:02:03:04:05" .Ed +.It Va static_ndp_pairs +.Pq Vt str +Set to the list of static NDP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va static_ndp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm ndp Cm -s +operation. +For example +.Bd -literal +static_ndp_pairs=3D"gw" +static_ndp_gw=3D"2001:DB8::1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system > > Added: > =A0head/etc/rc.d/static_ndp =A0 (contents, props changed) > Modified: > =A0head/etc/defaults/rc.conf > =A0head/etc/rc.d/Makefile > =A0head/etc/rc.d/NETWORKING [...] --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 10:05:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4E6B106566C; Sun, 23 Oct 2011 10:05:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3B8F8FC0C; Sun, 23 Oct 2011 10:05:25 +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 p9NA5PZ8022371; Sun, 23 Oct 2011 10:05:25 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NA5PT6022369; Sun, 23 Oct 2011 10:05:25 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231005.p9NA5PT6022369@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 10:05:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226655 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 10:05:25 -0000 Author: glebius Date: Sun Oct 23 10:05:25 2011 New Revision: 226655 URL: http://svn.freebsd.org/changeset/base/226655 Log: Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and deprecated flag from historical mbuf(9) allocator. This is style only change. Modified: head/sys/contrib/pf/net/pfvar.h Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Sun Oct 23 09:08:42 2011 (r226654) +++ head/sys/contrib/pf/net/pfvar.h Sun Oct 23 10:05:25 2011 (r226655) @@ -222,7 +222,7 @@ struct pfi_dynaddr { #define PF_NAME "pf" #define PR_NOWAIT M_NOWAIT -#define PR_WAITOK M_WAIT +#define PR_WAITOK M_WAITOK #define PR_ZERO M_ZERO #define pool_get(p, f) uma_zalloc(*(p), (f)) #define pool_put(p, o) uma_zfree(*(p), (o)) From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 10:13:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11468106566C; Sun, 23 Oct 2011 10:13:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 005998FC16; Sun, 23 Oct 2011 10:13:21 +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 p9NADK27022662; Sun, 23 Oct 2011 10:13:20 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NADKr5022660; Sun, 23 Oct 2011 10:13:20 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231013.p9NADKr5022660@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 10:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226656 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 10:13:21 -0000 Author: glebius Date: Sun Oct 23 10:13:20 2011 New Revision: 226656 URL: http://svn.freebsd.org/changeset/base/226656 Log: Absense of M_WAITOK in malloc flags for UMA doesn't equals presense of M_NOWAIT. Specify M_NOWAIT explicitly. This fixes sleeping with PF_LOCK(). Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 10:05:25 2011 (r226655) +++ head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 10:13:20 2011 (r226656) @@ -762,7 +762,7 @@ pfsync_state_import(struct pfsync_state if (flags & PFSYNC_SI_IOCTL) pool_flags = PR_WAITOK | PR_ZERO; else - pool_flags = PR_ZERO; + pool_flags = PR_NOWAIT | PR_ZERO; if ((st = pool_get(&V_pf_state_pl, pool_flags)) == NULL) goto cleanup; From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 10:17:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F269106564A; Sun, 23 Oct 2011 10:17:43 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E468FC13; Sun, 23 Oct 2011 10:17:42 +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 p9NAHgx1022846; Sun, 23 Oct 2011 10:17:42 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NAHgYi022844; Sun, 23 Oct 2011 10:17:42 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110231017.p9NAHgYi022844@svn.freebsd.org> From: Martin Matuska Date: Sun, 23 Oct 2011 10:17:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226657 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 10:17:43 -0000 Author: mm Date: Sun Oct 23 10:17:42 2011 New Revision: 226657 URL: http://svn.freebsd.org/changeset/base/226657 Log: Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@ as the project itself is no legal entity Reported by: Joe Dahl MFC after: 3 days Modified: head/etc/rc.d/static_ndp Modified: head/etc/rc.d/static_ndp ============================================================================== --- head/etc/rc.d/static_ndp Sun Oct 23 10:13:20 2011 (r226656) +++ head/etc/rc.d/static_ndp Sun Oct 23 10:17:42 2011 (r226657) @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2011 The FreeBSD Project +# Copyright (c) 2011 Xin Li # All rights reserved. # # Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 10:20:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E93C1106564A; Sun, 23 Oct 2011 10:20:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D85908FC0C; Sun, 23 Oct 2011 10:20:31 +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 p9NAKVb5022975; Sun, 23 Oct 2011 10:20:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NAKVW1022973; Sun, 23 Oct 2011 10:20:31 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110231020.p9NAKVW1022973@svn.freebsd.org> From: Martin Matuska Date: Sun, 23 Oct 2011 10:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226658 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 10:20:32 -0000 Author: mm Date: Sun Oct 23 10:20:31 2011 New Revision: 226658 URL: http://svn.freebsd.org/changeset/base/226658 Log: Add information about static_ndp_pairs to rc.conf(5) manual page Submitted by: Sergey Kandaurov MFC after: 3 days Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Oct 23 10:17:42 2011 (r226657) +++ head/share/man/man5/rc.conf.5 Sun Oct 23 10:20:31 2011 (r226658) @@ -2597,6 +2597,22 @@ For example static_arp_pairs="gw" static_arp_gw="192.168.1.1 00:01:02:03:04:05" .Ed +.It Va static_ndp_pairs +.Pq Vt str +Set to the list of static NDP pairs that are to be added at system +boot time. +For each whitespace separated +.Ar element +in the value, a +.Va static_ndp_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm ndp Cm -s +operation. +For example +.Bd -literal +static_ndp_pairs="gw" +static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05" +.Ed .It Va static_routes .Pq Vt str Set to the list of static routes that are to be added at system From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 11:43:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F025106564A; Sun, 23 Oct 2011 11:43:56 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id 103EC8FC17; Sun, 23 Oct 2011 11:43:55 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id BABC1E3F07C; Sun, 23 Oct 2011 13:27:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fknrzkqj61dr; Sun, 23 Oct 2011 13:27:04 +0200 (CEST) Received: from [10.10.10.101] (unknown [83.223.1.131]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 9EE2AE3F079; Sun, 23 Oct 2011 13:27:03 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Joel Dahl In-Reply-To: <201110231017.p9NAHgYi022844@svn.freebsd.org> Date: Sun, 23 Oct 2011 13:27:02 +0200 Content-Transfer-Encoding: 7bit Message-Id: <021EE5A6-A982-4D31-96E9-D5E0A7800FA4@FreeBSD.org> References: <201110231017.p9NAHgYi022844@svn.freebsd.org> To: Martin Matuska X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226657 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 11:43:56 -0000 23 okt 2011 kl. 12:17 skrev Martin Matuska: > Author: mm > Date: Sun Oct 23 10:17:42 2011 > New Revision: 226657 > URL: http://svn.freebsd.org/changeset/base/226657 > > Log: > Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@ > as the project itself is no legal entity Thanks, -- Joel joel@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 12:58:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20889106566C; Sun, 23 Oct 2011 12:58:03 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3226F8FC14; Sun, 23 Oct 2011 12:58:01 +0000 (UTC) Received: by eyd10 with SMTP id 10so6486056eyd.13 for ; Sun, 23 Oct 2011 05:58:01 -0700 (PDT) Received: by 10.14.6.9 with SMTP id 9mr2444005eem.247.1319373198527; Sun, 23 Oct 2011 05:33:18 -0700 (PDT) Received: from rnote.ddteam.net (143-168-133-95.pool.ukrtel.net. [95.133.168.143]) by mx.google.com with ESMTPS id v3sm37919420eej.7.2011.10.23.05.33.13 (version=SSLv3 cipher=OTHER); Sun, 23 Oct 2011 05:33:16 -0700 (PDT) Date: Sun, 23 Oct 2011 15:33:02 +0300 From: Aleksandr Rybalko To: Gabor Kovesdan Message-Id: <20111023153302.56645b59.ray@ddteam.net> In-Reply-To: <201110112227.p9BMROEX034985@svn.freebsd.org> References: <201110112227.p9BMROEX034985@svn.freebsd.org> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226271 - in head/usr.bin/grep: . regex X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 12:58:03 -0000 On Tue, 11 Oct 2011 22:27:24 +0000 (UTC) Gabor Kovesdan wrote: > Author: gabor > Date: Tue Oct 11 22:27:23 2011 > New Revision: 226271 > URL: http://svn.freebsd.org/changeset/base/226271 > > Log: > - Use getprogname() instead of __progname > - Allow disabling bzip2 support with WITHOUT_BZIP2 > - Fix handling patterns that start with a dot > - Remove superfluous semicolon > > Approved by: delphij (mentor) > > Modified: > head/usr.bin/grep/Makefile > head/usr.bin/grep/file.c > head/usr.bin/grep/grep.c > head/usr.bin/grep/regex/tre-fastmatch.c > Hi Gabor, attached path fix install with WITH_BSD_GREP=yes Index: Makefile =================================================================== --- Makefile (revision 226462) +++ Makefile (working copy) @@ -53,12 +53,14 @@ LDADD+= -lbz2 DPADD+= ${LIBBZ2} +.if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ ${BINDIR}/grep ${BINDIR}/bzegrep \ ${BINDIR}/grep ${BINDIR}/bzfgrep MLINKS+= grep.1 bzgrep.1 \ grep.1 bzegrep.1 \ grep.1 bzfgrep.1 +.endif .else CFLAGS+= -DWITHOUT_BZIP2 .endif =8<================================8<===========================8<= Thank you for your big work! WBW -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 13:33:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C64B106564A; Sun, 23 Oct 2011 13:33:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1A28FC12; Sun, 23 Oct 2011 13:33: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 p9NDXBqb040338; Sun, 23 Oct 2011 13:33:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NDXBHE040336; Sun, 23 Oct 2011 13:33:11 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110231333.p9NDXBHE040336@svn.freebsd.org> From: Xin LI Date: Sun, 23 Oct 2011 13:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226659 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 13:33:11 -0000 Author: delphij Date: Sun Oct 23 13:33:10 2011 New Revision: 226659 URL: http://svn.freebsd.org/changeset/base/226659 Log: Release gabor@ from mentorship and congratulations! Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Oct 23 10:20:31 2011 (r226658) +++ svnadmin/conf/mentors Sun Oct 23 13:33:10 2011 (r226659) @@ -15,7 +15,6 @@ andrew imp art avg Co-mentor: marcel benl philip Co-mentor: simon eri mlaier Co-mentor: thompsa -gabor delphij gber cognet gleb mdf jceel wkoszek Co-mentor: cognet From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 14:59:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48B37106564A; Sun, 23 Oct 2011 14:59:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 385958FC0A; Sun, 23 Oct 2011 14:59:55 +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 p9NExt08043174; Sun, 23 Oct 2011 14:59:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NExtYQ043172; Sun, 23 Oct 2011 14:59:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231459.p9NExtYQ043172@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 14:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226660 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 14:59:55 -0000 Author: glebius Date: Sun Oct 23 14:59:54 2011 New Revision: 226660 URL: http://svn.freebsd.org/changeset/base/226660 Log: Fix from r226623 is not sufficient to close all races in pfsync(4). The root of problem is re-locking at the end of pfsync_sendout(). Several functions are calling pfsync_sendout() holding pointers to pf data on stack, and these functions expect this data to be consistent. To fix this, the following approach was taken: - The pfsync_sendout() doesn't call ip_output() directly, but enqueues the mbuf on sc->sc_ifp's interfaces queue, that is currently unused. Then pfsync netisr is scheduled. PF_LOCK isn't dropped in pfsync_sendout(). - The netisr runs through queue and ip_output()s packets on it. Apart from fixing race, this also decouples stack, fixing potential issues, that may happen, when sending pfsync(4) packets on input path. Reviewed by: eri (a quick review) Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 13:33:10 2011 (r226659) +++ head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 14:59:54 2011 (r226660) @@ -856,7 +856,11 @@ pfsync_state_import(struct pfsync_state CLR(st->state_flags, PFSTATE_NOSYNC); if (ISSET(st->state_flags, PFSTATE_ACK)) { pfsync_q_ins(st, PFSYNC_S_IACK); +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif } } CLR(st->state_flags, PFSTATE_ACK); @@ -1312,7 +1316,11 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st V_pfsyncstats.pfsyncs_stale++; pfsync_update_state(st); +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif continue; } pfsync_alloc_scrub_memory(&sp->dst, &st->dst); @@ -1418,7 +1426,11 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, V_pfsyncstats.pfsyncs_stale++; pfsync_update_state(st); +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif continue; } pfsync_alloc_scrub_memory(&up->dst, &st->dst); @@ -2146,6 +2158,7 @@ pfsync_sendout(void) #endif #ifdef __FreeBSD__ size_t pktlen; + int dummy_error; #endif int offset; int q, count = 0; @@ -2349,32 +2362,21 @@ pfsync_sendout(void) #ifdef __FreeBSD__ sc->sc_ifp->if_opackets++; sc->sc_ifp->if_obytes += m->m_pkthdr.len; + sc->sc_len = PFSYNC_MINPKT; + + IFQ_ENQUEUE(&sc->sc_ifp->if_snd, m, dummy_error); + schednetisr(NETISR_PFSYNC); #else sc->sc_if.if_opackets++; sc->sc_if.if_obytes += m->m_pkthdr.len; -#endif - sc->sc_len = PFSYNC_MINPKT; -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL) == 0) -#ifdef __FreeBSD__ - { - PF_LOCK(); -#endif - V_pfsyncstats.pfsyncs_opackets++; -#ifdef __FreeBSD__ - } -#endif + pfsyncstats.pfsyncs_opackets++; else -#ifdef __FreeBSD__ - { - PF_LOCK(); -#endif - V_pfsyncstats.pfsyncs_oerrors++; -#ifdef __FreeBSD__ - } + pfsyncstats.pfsyncs_oerrors++; + + /* start again */ + sc->sc_len = PFSYNC_MINPKT; #endif } @@ -2422,7 +2424,11 @@ pfsync_insert_state(struct pf_state *st) pfsync_q_ins(st, PFSYNC_S_INS); if (ISSET(st->state_flags, PFSTATE_ACK)) +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif else st->sync_updates = 0; } @@ -2619,7 +2625,11 @@ pfsync_update_state(struct pf_state *st) if (sync || (time_second - st->pfsync_time) < 2) { pfsync_upds++; +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif } } @@ -2670,7 +2680,11 @@ pfsync_request_update(u_int32_t creatori TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); sc->sc_len += nlen; +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif } void @@ -2699,7 +2713,11 @@ pfsync_update_state_req(struct pf_state pfsync_q_del(st); case PFSYNC_S_NONE: pfsync_q_ins(st, PFSYNC_S_UPD); +#ifdef __FreeBSD__ + pfsync_sendout(); +#else schednetisr(NETISR_PFSYNC); +#endif return; case PFSYNC_S_INS: @@ -3253,37 +3271,38 @@ pfsync_timeout(void *arg) void #ifdef __FreeBSD__ pfsyncintr(void *arg) +{ + struct pfsync_softc *sc = arg; + struct mbuf *m; + + CURVNET_SET(sc->sc_ifp->if_vnet); + pfsync_ints++; + + for (;;) { + IF_DEQUEUE(&sc->sc_ifp->if_snd, m); + if (m == 0) + break; + + if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL) + == 0) + V_pfsyncstats.pfsyncs_opackets++; + else + V_pfsyncstats.pfsyncs_oerrors++; + } + CURVNET_RESTORE(); +} #else pfsyncintr(void) -#endif { -#ifdef __FreeBSD__ - struct pfsync_softc *sc = arg; -#endif int s; -#ifdef __FreeBSD__ - if (sc == NULL) - return; - - CURVNET_SET(sc->sc_ifp->if_vnet); -#endif pfsync_ints++; s = splnet(); -#ifdef __FreeBSD__ - PF_LOCK(); -#endif pfsync_sendout(); -#ifdef __FreeBSD__ - PF_UNLOCK(); -#endif splx(s); - -#ifdef __FreeBSD__ - CURVNET_RESTORE(); -#endif } +#endif int pfsync_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 15:08:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7B171065673; Sun, 23 Oct 2011 15:08:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE4238FC14; Sun, 23 Oct 2011 15:08: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 p9NF8I6I043492; Sun, 23 Oct 2011 15:08:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NF8Ifk043490; Sun, 23 Oct 2011 15:08:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231508.p9NF8Ifk043490@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 15:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226661 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 15:08:18 -0000 Author: glebius Date: Sun Oct 23 15:08:18 2011 New Revision: 226661 URL: http://svn.freebsd.org/changeset/base/226661 Log: - Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail() was scheduled. This lead to instant 100% state leak after first bulk update request. - After above fix, it appeared that pfsync_bulk_update() lacks locking. To fix this, sc_bulk_tmo callout was converted to an mtx one. Eventually, all pf/pfsync callouts should be converted to mtx version, since it isn't possible to stop or drain a non-mtx callout without risk of race. - Add comment that callout_stop() in pfsync_clone_destroy() lacks locking. Since pfsync0 can't be destroyed (yet), let it be here. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 14:59:54 2011 (r226660) +++ head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 15:08:18 2011 (r226661) @@ -493,7 +493,7 @@ pfsync_clone_create(struct if_clone *ifc ifp->if_mtu = 1500; /* XXX */ #ifdef __FreeBSD__ callout_init(&sc->sc_tmo, CALLOUT_MPSAFE); - callout_init(&sc->sc_bulk_tmo, CALLOUT_MPSAFE); + callout_init_mtx(&sc->sc_bulk_tmo, &pf_task_mtx, 0); callout_init(&sc->sc_bulkfail_tmo, CALLOUT_MPSAFE); #else ifp->if_hardmtu = MCLBYTES; /* XXX */ @@ -540,7 +540,7 @@ pfsync_clone_destroy(struct ifnet *ifp) #ifdef __FreeBSD__ EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag); #endif - timeout_del(&sc->sc_bulk_tmo); + timeout_del(&sc->sc_bulk_tmo); /* XXX: need PF_LOCK() before */ timeout_del(&sc->sc_tmo); #if NCARP > 0 #ifdef notyet @@ -3061,7 +3061,7 @@ pfsync_bulk_update(void *arg) sc->sc_bulk_next = st; #ifdef __FreeBSD__ callout_reset(&sc->sc_bulk_tmo, 1, - pfsync_bulk_fail, sc); + pfsync_bulk_update, sc); #else timeout_add(&sc->sc_bulk_tmo, 1); #endif From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 15:10:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D431C106566C; Sun, 23 Oct 2011 15:10:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C48CB8FC08; Sun, 23 Oct 2011 15:10:15 +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 p9NFAFgA043594; Sun, 23 Oct 2011 15:10:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NFAF4G043592; Sun, 23 Oct 2011 15:10:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231510.p9NFAF4G043592@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 15:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226662 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 15:10:15 -0000 Author: glebius Date: Sun Oct 23 15:10:15 2011 New Revision: 226662 URL: http://svn.freebsd.org/changeset/base/226662 Log: Fix indentation, no code changed. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 15:08:18 2011 (r226661) +++ head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 15:10:15 2011 (r226662) @@ -2006,8 +2006,8 @@ pfsyncioctl(struct ifnet *ifp, u_long cm #endif printf("pfsync: requesting bulk update\n"); #ifdef __FreeBSD__ - callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, - pfsync_bulk_fail, V_pfsyncif); + callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, + pfsync_bulk_fail, V_pfsyncif); #else timeout_add_sec(&sc->sc_bulkfail_tmo, 5); #endif From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 15:15:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 682C01065670; Sun, 23 Oct 2011 15:15:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5869B8FC17; Sun, 23 Oct 2011 15:15:17 +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 p9NFFH3Q043814; Sun, 23 Oct 2011 15:15:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NFFHcp043812; Sun, 23 Oct 2011 15:15:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110231515.p9NFFHcp043812@svn.freebsd.org> From: Gleb Smirnoff Date: Sun, 23 Oct 2011 15:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226663 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 15:15:17 -0000 Author: glebius Date: Sun Oct 23 15:15:17 2011 New Revision: 226663 URL: http://svn.freebsd.org/changeset/base/226663 Log: Merge several fixes to bulk update processing from OpenBSD. Merged revisions: 1.148, 1.149, 1.150. This makes number of states on master/slave to be of a sane value. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 15:10:15 2011 (r226662) +++ head/sys/contrib/pf/net/if_pfsync.c Sun Oct 23 15:15:17 2011 (r226663) @@ -3004,16 +3004,6 @@ pfsync_bulk_start(void) struct pfsync_softc *sc = pfsyncif; #endif - sc->sc_ureq_received = time_uptime; - - if (sc->sc_bulk_next == NULL) -#ifdef __FreeBSD__ - sc->sc_bulk_next = TAILQ_FIRST(&V_state_list); -#else - sc->sc_bulk_next = TAILQ_FIRST(&state_list); -#endif - sc->sc_bulk_last = sc->sc_bulk_next; - #ifdef __FreeBSD__ if (V_pf_status.debug >= PF_DEBUG_MISC) #else @@ -3021,10 +3011,30 @@ pfsync_bulk_start(void) #endif printf("pfsync: received bulk update request\n"); +#ifdef __FreeBSD__ PF_LOCK(); - pfsync_bulk_status(PFSYNC_BUS_START); - pfsync_bulk_update(sc); + if (TAILQ_EMPTY(&V_state_list)) +#else + if (TAILQ_EMPTY(&state_list)) +#endif + pfsync_bulk_status(PFSYNC_BUS_END); + else { + sc->sc_ureq_received = time_uptime; + if (sc->sc_bulk_next == NULL) +#ifdef __FreeBSD__ + sc->sc_bulk_next = TAILQ_FIRST(&V_state_list); +#else + sc->sc_bulk_next = TAILQ_FIRST(&state_list); +#endif + sc->sc_bulk_last = sc->sc_bulk_next; + + pfsync_bulk_status(PFSYNC_BUS_START); + callout_reset(&sc->sc_bulk_tmo, 1, + pfsync_bulk_update, sc); + } +#ifdef __FreeBSD__ PF_UNLOCK(); +#endif } void @@ -3041,7 +3051,7 @@ pfsync_bulk_update(void *arg) #ifdef __FreeBSD__ CURVNET_SET(sc->sc_ifp->if_vnet); #endif - do { + for (;;) { if (st->sync_state == PFSYNC_S_NONE && st->timeout < PFTM_MAX && st->pfsync_time <= sc->sc_ureq_received) { @@ -3057,7 +3067,21 @@ pfsync_bulk_update(void *arg) st = TAILQ_FIRST(&state_list); #endif - if (i > 0 && TAILQ_EMPTY(&sc->sc_qs[PFSYNC_S_UPD])) { + if (st == sc->sc_bulk_last) { + /* we're done */ + sc->sc_bulk_next = NULL; + sc->sc_bulk_last = NULL; + pfsync_bulk_status(PFSYNC_BUS_END); + break; + } + +#ifdef __FreeBSD__ + if (i > 1 && (sc->sc_ifp->if_mtu - sc->sc_len) < +#else + if (i > 1 && (sc->sc_if.if_mtu - sc->sc_len) < +#endif + sizeof(struct pfsync_state)) { + /* we've filled a packet */ sc->sc_bulk_next = st; #ifdef __FreeBSD__ callout_reset(&sc->sc_bulk_tmo, 1, @@ -3065,16 +3089,10 @@ pfsync_bulk_update(void *arg) #else timeout_add(&sc->sc_bulk_tmo, 1); #endif - goto out; + break; } - } while (st != sc->sc_bulk_last); - - /* we're done */ - sc->sc_bulk_next = NULL; - sc->sc_bulk_last = NULL; - pfsync_bulk_status(PFSYNC_BUS_END); + } -out: #ifdef __FreeBSD__ CURVNET_RESTORE(); #endif @@ -3226,13 +3244,12 @@ pfsync_state_in_use(struct pf_state *st) if (sc == NULL) return (0); - if (st->sync_state != PFSYNC_S_NONE) + if (st->sync_state != PFSYNC_S_NONE || + st == sc->sc_bulk_next || + st == sc->sc_bulk_last) return (1); - if (sc->sc_bulk_next == NULL && sc->sc_bulk_last == NULL) - return (0); - - return (1); + return (0); } u_int pfsync_ints; From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 16:04:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655BE1065673; Sun, 23 Oct 2011 16:04:07 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 565C48FC0C; Sun, 23 Oct 2011 16:04:07 +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 p9NG47Qs045470; Sun, 23 Oct 2011 16:04:07 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NG47bl045468; Sun, 23 Oct 2011 16:04:07 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201110231604.p9NG47bl045468@svn.freebsd.org> From: Gabor Kovesdan Date: Sun, 23 Oct 2011 16:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226664 - head/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 16:04:07 -0000 Author: gabor Date: Sun Oct 23 16:04:07 2011 New Revision: 226664 URL: http://svn.freebsd.org/changeset/base/226664 Log: - Fix installation when WITH_BSD_GREP is set to yes Submitted by: Aleksandr Rybalko Modified: head/usr.bin/grep/Makefile Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Sun Oct 23 15:15:17 2011 (r226663) +++ head/usr.bin/grep/Makefile Sun Oct 23 16:04:07 2011 (r226664) @@ -53,12 +53,14 @@ DPADD= ${LIBZ} ${LIBLZMA} LDADD+= -lbz2 DPADD+= ${LIBBZ2} +.if ${MK_BSD_GREP} == "yes" LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \ ${BINDIR}/grep ${BINDIR}/bzegrep \ ${BINDIR}/grep ${BINDIR}/bzfgrep MLINKS+= grep.1 bzgrep.1 \ grep.1 bzegrep.1 \ grep.1 bzfgrep.1 +.endif .else CFLAGS+= -DWITHOUT_BZIP2 .endif From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 16:27:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4689E106564A; Sun, 23 Oct 2011 16:27:04 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37B7E8FC08; Sun, 23 Oct 2011 16:27:04 +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 p9NGR4Zp046271; Sun, 23 Oct 2011 16:27:04 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NGR47P046269; Sun, 23 Oct 2011 16:27:04 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201110231627.p9NGR47P046269@svn.freebsd.org> From: Robert Millan Date: Sun, 23 Oct 2011 16:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226665 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 16:27:04 -0000 Author: rmh Date: Sun Oct 23 16:27:03 2011 New Revision: 226665 URL: http://svn.freebsd.org/changeset/base/226665 Log: Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only used with FreeBSD GCC. Approved by: kib (mentor) Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Oct 23 16:04:07 2011 (r226664) +++ head/sys/conf/kern.mk Sun Oct 23 16:27:03 2011 (r226665) @@ -1,11 +1,21 @@ # $FreeBSD$ +.if ${CC:T:Mclang} != "clang" +FREEBSD_GCC!= ${CC} --version | grep FreeBSD || true +.endif + # # Warning flags for compiling the kernel and components of the kernel: # +.if ${FREEBSD_GCC} +# FreeBSD extensions, not available in upstream GCC +format_extensions= -fformat-extensions +no_align_long_strings= -mno-align-long-strings +.endif + CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -Wundef -Wno-pointer-sign -fformat-extensions \ + -Wundef -Wno-pointer-sign ${format_extensions} \ -Wmissing-include-dirs -fdiagnostics-show-option # # The following flags are next up for working on: @@ -32,7 +42,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # .if ${MACHINE_CPUARCH} == "i386" .if ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse +CFLAGS+= ${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse .else CFLAGS+= -mno-aes -mno-avx .endif From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 16:57:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABF4D106566C; Sun, 23 Oct 2011 16:57:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 831378FC1A; Sun, 23 Oct 2011 16:57:10 +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 p9NGvA9E047332; Sun, 23 Oct 2011 16:57:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NGvAee047330; Sun, 23 Oct 2011 16:57:10 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110231657.p9NGvAee047330@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 23 Oct 2011 16:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226666 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 16:57:10 -0000 Author: nwhitehorn Date: Sun Oct 23 16:57:10 2011 New Revision: 226666 URL: http://svn.freebsd.org/changeset/base/226666 Log: Avoid some "Invalid argument" errors in the installer. PR: bin/161926 MFC after: 5 days Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Oct 23 16:27:03 2011 (r226665) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Oct 23 16:57:10 2011 (r226666) @@ -392,8 +392,14 @@ gpart_destroy(struct ggeom *lg_geom) gctl_ro_param(r, "force", sizeof(force), &force); gctl_ro_param(r, "verb", -1, "destroy"); errstr = gctl_issue(r); - if (errstr != NULL && errstr[0] != '\0') - gpart_show_error("Error", NULL, errstr); + if (errstr != NULL && errstr[0] != '\0') { + /* + * Check if we reverted away the existence of the geom + * altogether. Show all other errors to the user. + */ + if (strtol(errstr, NULL, 0) != EINVAL) + gpart_show_error("Error", NULL, errstr); + } gctl_free(r); /* And any metadata associated with the partition scheme itself */ @@ -450,6 +456,10 @@ gpart_edit(struct gprovider *pp) return; } + /* If this is a nested partition, edit as usual */ + if (strcmp(pp->lg_geom->lg_class->lg_name, "PART") == 0) + break; + /* Destroy the geom and all sub-partitions */ gpart_destroy(cp->lg_geom); @@ -507,7 +517,7 @@ editpart: choice = dlg_form("Edit Partition", "", 0, 0, 0, nitems, items, &junk); if (choice) /* Cancel pressed */ - return; + goto endedit; /* Check if the label has a / in it */ if (strchr(items[3].text, '/') != NULL) { @@ -538,6 +548,13 @@ editpart: items[2].text, (strcmp(oldtype, items[0].text) != 0) ? newfs : NULL); +endedit: + if (strcmp(oldtype, items[0].text) != 0 && cp != NULL) + gpart_destroy(cp->lg_geom); + if (strcmp(oldtype, items[0].text) != 0 && strcmp(items[0].text, + "freebsd") == 0) + gpart_partition(pp->lg_name, "BSD"); + for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) if (items[i].text_free) free(items[i].text); From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 18:20:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B782E106566C; Sun, 23 Oct 2011 18:20:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A76608FC15; Sun, 23 Oct 2011 18:20:51 +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 p9NIKptT050090; Sun, 23 Oct 2011 18:20:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIKpN8050088; Sun, 23 Oct 2011 18:20:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231820.p9NIKpN8050088@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226667 - stable/9/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 18:20:51 -0000 Author: brueffer Date: Sun Oct 23 18:20:51 2011 New Revision: 226667 URL: http://svn.freebsd.org/changeset/base/226667 Log: MFC: r226398, r226442 Move the allocation of usrbufs down a few lines to avoid leaking it in case of an error. Approved by: re (kib) Modified: stable/9/sys/dev/iicbus/iic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/iicbus/iic.c ============================================================================== --- stable/9/sys/dev/iicbus/iic.c Sun Oct 23 16:57:10 2011 (r226666) +++ stable/9/sys/dev/iicbus/iic.c Sun Oct 23 18:20:51 2011 (r226667) @@ -346,11 +346,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); if (error) break; /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 18:24:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F12C1065677; Sun, 23 Oct 2011 18:24:55 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F04C8FC15; Sun, 23 Oct 2011 18:24:55 +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 p9NIOt5N050273; Sun, 23 Oct 2011 18:24:55 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIOtYp050271; Sun, 23 Oct 2011 18:24:55 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231824.p9NIOtYp050271@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:24:55 +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: r226668 - stable/8/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 18:24:55 -0000 Author: brueffer Date: Sun Oct 23 18:24:55 2011 New Revision: 226668 URL: http://svn.freebsd.org/changeset/base/226668 Log: MFC: r226398, r226442 Move the allocation of usrbufs down a few lines to avoid leaking it in case of an error. Modified: stable/8/sys/dev/iicbus/iic.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) Modified: stable/8/sys/dev/iicbus/iic.c ============================================================================== --- stable/8/sys/dev/iicbus/iic.c Sun Oct 23 18:20:51 2011 (r226667) +++ stable/8/sys/dev/iicbus/iic.c Sun Oct 23 18:24:55 2011 (r226668) @@ -346,11 +346,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); if (error) break; /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 18:27:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BE9E106564A; Sun, 23 Oct 2011 18:27:54 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD6C8FC1E; Sun, 23 Oct 2011 18:27:54 +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 p9NIRr3f050424; Sun, 23 Oct 2011 18:27:53 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIRrKu050422; Sun, 23 Oct 2011 18:27:53 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231827.p9NIRrKu050422@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:27: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: r226669 - stable/7/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 18:27:54 -0000 Author: brueffer Date: Sun Oct 23 18:27:53 2011 New Revision: 226669 URL: http://svn.freebsd.org/changeset/base/226669 Log: MFC: r226398, r226442 Move the allocation of usrbufs down a few lines to avoid leaking it in case of an error. Modified: stable/7/sys/dev/iicbus/iic.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/iicbus/iic.c ============================================================================== --- stable/7/sys/dev/iicbus/iic.c Sun Oct 23 18:24:55 2011 (r226668) +++ stable/7/sys/dev/iicbus/iic.c Sun Oct 23 18:27:53 2011 (r226669) @@ -301,11 +301,11 @@ iicioctl(struct cdev *dev, u_long cmd, c case I2CRDWR: buf = malloc(sizeof(*d->msgs) * d->nmsgs, M_TEMP, M_WAITOK); - usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); error = copyin(d->msgs, buf, sizeof(*d->msgs) * d->nmsgs); if (error) break; /* Alloc kernel buffers for userland data, copyin write data */ + usrbufs = malloc(sizeof(void *) * d->nmsgs, M_TEMP, M_ZERO | M_WAITOK); for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; usrbufs[i] = m->buf; From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 18:31:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39129106566B; Sun, 23 Oct 2011 18:31:25 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 291738FC15; Sun, 23 Oct 2011 18:31:25 +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 p9NIVPSn050591; Sun, 23 Oct 2011 18:31:25 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIVPYG050589; Sun, 23 Oct 2011 18:31:25 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231831.p9NIVPYG050589@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226670 - stable/9/sys/dev/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 18:31:25 -0000 Author: brueffer Date: Sun Oct 23 18:31:24 2011 New Revision: 226670 URL: http://svn.freebsd.org/changeset/base/226670 Log: MFC: r226406 Properly free resources in case of an error. Approved by: re (kib) Modified: stable/9/sys/dev/siba/siba_bwn.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/siba/siba_bwn.c ============================================================================== --- stable/9/sys/dev/siba/siba_bwn.c Sun Oct 23 18:27:53 2011 (r226669) +++ stable/9/sys/dev/siba/siba_bwn.c Sun Oct 23 18:31:24 2011 (r226670) @@ -208,6 +208,7 @@ siba_bwn_suspend(device_t dev) if (error) { for (j = 0; j < i; j++) DEVICE_RESUME(devlistp[j]); + free(devlistp, M_TEMP); return (error); } } From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 18:37:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77E941065680; Sun, 23 Oct 2011 18:37:57 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 674548FC13; Sun, 23 Oct 2011 18:37:57 +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 p9NIbve7050852; Sun, 23 Oct 2011 18:37:57 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NIbvo3050850; Sun, 23 Oct 2011 18:37:57 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201110231837.p9NIbvo3050850@svn.freebsd.org> From: Christian Brueffer Date: Sun, 23 Oct 2011 18:37: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: r226671 - stable/8/sys/dev/siba X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 18:37:57 -0000 Author: brueffer Date: Sun Oct 23 18:37:57 2011 New Revision: 226671 URL: http://svn.freebsd.org/changeset/base/226671 Log: MFC: r226406 Properly free resources in case of an error. Modified: stable/8/sys/dev/siba/siba_bwn.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) Modified: stable/8/sys/dev/siba/siba_bwn.c ============================================================================== --- stable/8/sys/dev/siba/siba_bwn.c Sun Oct 23 18:31:24 2011 (r226670) +++ stable/8/sys/dev/siba/siba_bwn.c Sun Oct 23 18:37:57 2011 (r226671) @@ -208,6 +208,7 @@ siba_bwn_suspend(device_t dev) if (error) { for (j = 0; j < i; j++) DEVICE_RESUME(devlistp[j]); + free(devlistp, M_TEMP); return (error); } } From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 19:46:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC6701065670; Sun, 23 Oct 2011 19:46:01 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC2208FC15; Sun, 23 Oct 2011 19:46:01 +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 p9NJk1XF053868; Sun, 23 Oct 2011 19:46:01 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NJk1Lt053866; Sun, 23 Oct 2011 19:46:01 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <201110231946.p9NJk1Lt053866@svn.freebsd.org> From: Poul-Henning Kamp Date: Sun, 23 Oct 2011 19:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226672 - head/tools/tools/sysbuild X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 19:46:01 -0000 Author: phk Date: Sun Oct 23 19:46:01 2011 New Revision: 226672 URL: http://svn.freebsd.org/changeset/base/226672 Log: Add a "-P olddistfiles" facility to prefetch ports distfiles, using an old distfile directory as primary source: mkdir /freebsd/ports/distfiles.old mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old rm -rf /freebsd/ports/distfiles.old Unfortunately bsd.ports.mk does not attempt to use a hard-link so while this runs you need diskspace for both your old and your "new" distfiles. Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Sun Oct 23 18:37:57 2011 (r226671) +++ head/tools/tools/sysbuild/sysbuild.sh Sun Oct 23 19:46:01 2011 (r226672) @@ -113,6 +113,17 @@ final_chroot() ( ) ####################################################################### +# -P is a pretty neat way to clean junk out from your ports dist-files: +# +# mkdir /freebsd/ports/distfiles.old +# mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old +# sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old +# rm -rf /freebsd/ports/distfiles.old +# +# Unfortunately bsd.ports.mk does not attempt to use a hard-link so +# while this runs you need diskspace for both your old and your "new" +# distfiles. +# ####################################################################### usage () { @@ -122,6 +133,7 @@ usage () { echo " -k suppress buildkernel" echo " -w suppress buildworld" echo " -p used cached packages" + echo " -P prefetch ports" echo " -c specify config file" ) 1>&2 exit 2 @@ -249,12 +261,13 @@ ports_build() ( ports_prefetch() ( ( set +x - true > /mnt/_.prefetch - echo "Building /tmp/_.plist" >> /mnt/_.prefetch + ldir=$1 + true > /${ldir}/_.prefetch + echo "Building /tmp/_.plist" >> /${ldir}/_.prefetch ports_recurse . $PORTS_WE_WANT - echo "Completed /tmp/_.plist" >> /mnt/_.prefetch + echo "Completed /tmp/_.plist" >> /${ldir}/_.prefetch # Now checksump/fetch them for p in `cat /tmp/_.plist` do @@ -262,21 +275,22 @@ ports_prefetch() ( ( cd $p if make checksum $PORTS_OPTS ; then - rm -f /mnt/_.prefetch.$b - echo "OK $p" >> /mnt/_.prefetch + rm -f /${ldir}/_.prefetch.$b + echo "OK $p" >> /${ldir}/_.prefetch exit 0 fi make distclean make checksum $PORTS_OPTS || true if make checksum $PORTS_OPTS > /dev/null 2>&1 ; then - rm -f /mnt/_.prefetch.$b - echo "OK $p" >> /mnt/_.prefetch + rm -f /${ldir}/_.prefetch.$b + echo "OK $p" >> /${ldir}/_.prefetch else - echo "BAD $p" >> /mnt/_.prefetch + echo "BAD $p" >> /${ldir}/_.prefetch fi - ) > /mnt/_.prefetch.$b 2>&1 + ) > /${ldir}/_.prefetch.$b 2>&1 done + echo "Done" >> /${ldir}/_.prefetch ) ) @@ -284,11 +298,12 @@ ports_prefetch() ( do_world=true do_kernel=true +do_prefetch=false use_pkg="" c_arg="" set +e -args=`getopt bc:hkpw $*` +args=`getopt bc:hkpP:w $*` if [ $? -ne 0 ] ; then usage fi @@ -325,6 +340,12 @@ do shift; use_pkg="-p" ;; + -P) + shift; + do_prefetch=true + distfile_cache=$1 + shift; + ;; -w) shift; do_world=false @@ -366,6 +387,15 @@ fi T0=`date +%s` echo $T0 $T0 > /tmp/_sb_log +if $do_prefetch ; then + rm -rf /tmp/sysbuild/ports + mkdir -p /tmp/sysbuild/ports + ln -s ${distfile_cache} /tmp/sysbuild/ports/distfiles + export PORTS_OPTS=CD_MOUNTPTS=/tmp/sysbuild + ports_prefetch /tmp + exit 0 +fi + log_it Unmount everything ( ( cleanup ) @@ -446,7 +476,7 @@ log_it copy ports config files (cd / ; find var/db/ports -print | cpio -dumpv /mnt > /dev/null 2>&1) log_it "Start prefetch of ports distfiles" -ports_prefetch & +ports_prefetch /mnt & if $do_world ; then ( @@ -558,13 +588,14 @@ if [ "x$SERCONS" != "xfalse" ] ; then sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' /mnt/etc/ttys fi -log_it move config files +log_it move dist config files "(expect warnings)" ( cd /mnt mkdir root/configfiles_dist find ${CONFIGFILES} -print | cpio -dumpv root/configfiles_dist ) +log_it copy live config files (cd / && find ${CONFIGFILES} -print | cpio -dumpv /mnt) log_it final_root From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 20:03:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB6771065673; Sun, 23 Oct 2011 20:03:33 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3568FC08; Sun, 23 Oct 2011 20:03:33 +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 p9NK3XYR054478; Sun, 23 Oct 2011 20:03:33 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9NK3XaV054476; Sun, 23 Oct 2011 20:03:33 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201110232003.p9NK3XaV054476@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 23 Oct 2011 20:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226673 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 20:03:33 -0000 Author: marcel Date: Sun Oct 23 20:03:33 2011 New Revision: 226673 URL: http://svn.freebsd.org/changeset/base/226673 Log: Don't terminate the interactive root mount prompt on mount failure. This restores the previous behaviour. While here, match '?' and '.' inputs exactly and improve the error message. Requested by: avg@ Derived from a patch by: Arnaud Lacombe Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Oct 23 19:46:01 2011 (r226672) +++ head/sys/kern/vfs_mountroot.c Sun Oct 23 20:03:33 2011 (r226673) @@ -483,26 +483,27 @@ parse_dir_ask(char **conf) printf(" . Yield 1 second (for background tasks)\n"); printf(" Abort manual input\n"); - again: - printf("\nmountroot> "); - gets(name, sizeof(name), GETS_ECHO); - if (name[0] == '\0') - return (0); - if (name[0] == '?') { - printf("\nList of GEOM managed disk devices:\n "); - g_dev_print(); - goto again; - } - if (name[0] == '.') { - pause("rmask", hz); - goto again; - } - mnt = name; - error = parse_mount(&mnt); - if (error == -1) { - printf("Invalid specification.\n"); - goto again; - } + do { + error = EINVAL; + printf("\nmountroot> "); + gets(name, sizeof(name), GETS_ECHO); + if (name[0] == '\0') + break; + if (name[0] == '?' && name[1] == '\0') { + printf("\nList of GEOM managed disk devices:\n "); + g_dev_print(); + continue; + } + if (name[0] == '.' && name[1] == '\0') { + pause("rmask", hz); + continue; + } + mnt = name; + error = parse_mount(&mnt); + if (error == -1) + printf("Invalid file system specification.\n"); + } while (error != 0); + return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 20:06:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 420A1106564A; Sun, 23 Oct 2011 20:06:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 03A868FC08; Sun, 23 Oct 2011 20:06:31 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:49e5:3d59:f85e:515a] (unknown [IPv6:2001:7b8:3a7:0:49e5:3d59:f85e:515a]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DED435C37; Sun, 23 Oct 2011 22:06:28 +0200 (CEST) Message-ID: <4EA473CA.8050104@FreeBSD.org> Date: Sun, 23 Oct 2011 22:06:34 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111012 Thunderbird/8.0 MIME-Version: 1.0 To: Robert Millan References: <201110231627.p9NGR47P046269@svn.freebsd.org> In-Reply-To: <201110231627.p9NGR47P046269@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226665 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 20:06:31 -0000 On 2011-10-23 18:27, Robert Millan wrote: > Author: rmh > Date: Sun Oct 23 16:27:03 2011 > New Revision: 226665 > URL: http://svn.freebsd.org/changeset/base/226665 > > Log: > Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only > used with FreeBSD GCC. > > Approved by: kib (mentor) > > Modified: > head/sys/conf/kern.mk > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Sun Oct 23 16:04:07 2011 (r226664) > +++ head/sys/conf/kern.mk Sun Oct 23 16:27:03 2011 (r226665) > @@ -1,11 +1,21 @@ > # $FreeBSD$ > > +.if ${CC:T:Mclang} != "clang" > +FREEBSD_GCC!= ${CC} --version | grep FreeBSD || true > +.endif > + > # > # Warning flags for compiling the kernel and components of the kernel: > # > +.if ${FREEBSD_GCC} > +# FreeBSD extensions, not available in upstream GCC > +format_extensions= -fformat-extensions > +no_align_long_strings= -mno-align-long-strings > +.endif Note: this breaks builds where CC=clang, with: >>> Kernel build for GENERIC started on Sun Oct 23 22:01:23 CEST 2011 ... >>> stage 2.1: cleaning up the object tree -------------------------------------------------------------- cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj MACHINE_ARCH=i386 MACHINE=i386 CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp VERSION="FreeBSD 10.0-CURRENT i386 1000000" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin make KERNEL=kernel cleandir "/usr/src/sys/conf/kern.mk", line 10: Malformed conditional (${FREEBSD_GCC}) "/usr/src/sys/conf/kern.mk", line 14: if-less endif make: fatal errors encountered -- cannot continue *** Error code 1 1 error *** Error code 2 1 error Exited Process exited with status 2 Since our base 'clang --version' also has 'FreeBSD' in its output, you might want to drop the first .if ${CC:T:Mclang} != "clang" test. E.g. just unconditionally set the FREEBSD_GCC macro (although it's then no longer correctly named, but that aside). From owner-svn-src-all@FreeBSD.ORG Sun Oct 23 23:11:20 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B789F106564A; Sun, 23 Oct 2011 23:11:20 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF2B8FC17; Sun, 23 Oct 2011 23:11:19 +0000 (UTC) Received: by wwi18 with SMTP id 18so7886763wwi.31 for ; Sun, 23 Oct 2011 16:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=FBqesIvFAf+u+BodMTVaakAaiHVCQ+HATqTJ9Oi8PZI=; b=pVceXXE7h3dyxpfYiLDrsDsUVe2uNKyeM8L1K455zoodx1BIOtoH1DvnrYR4I5WOAB ZBYCTXqntMseH8Y8Iwn19O4g8fILbG1XlitEIwxfYEPX8quG1XceQZOcsK703lYXx291 dpN5k1UNNdIF6hhpDkMOHG+dQseiomLg807I0= MIME-Version: 1.0 Received: by 10.227.6.199 with SMTP id a7mr8308136wba.74.1319410779766; Sun, 23 Oct 2011 15:59:39 -0700 (PDT) Received: by 10.180.98.5 with HTTP; Sun, 23 Oct 2011 15:59:39 -0700 (PDT) Date: Sun, 23 Oct 2011 18:59:39 -0400 Message-ID: From: "b. f." To: phk@FreeBSD.org, svn-src-all@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: svn commit: r226672 - head/tools/tools/sysbuild X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 23:11:20 -0000 > Author: phk > Date: Sun Oct 23 19:46:01 2011 > New Revision: 226672 > URL: http://svn.freebsd.org/changeset/base/226672 > > Log: > Add a "-P olddistfiles" facility to prefetch ports distfiles, using an > old distfile directory as primary source: > > mkdir /freebsd/ports/distfiles.old > mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old > sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old > rm -rf /freebsd/ports/distfiles.old > > Unfortunately bsd.ports.mk does not attempt to use a hard-link so > while this runs you need diskspace for both your old and your "new" > distfiles. With regard to removing old distfiles, if a full Ports tree is assumed to be available, then ports/Tools/scripts/distclean.sh -f may be used. With regard to pre-fetching new distfiles, new versions of ports may have new dependencies, so it would be prudent to run the "fetch-recursive" target in addition to "checksum". (Of course, this is a best effort in batch mode: some new dependencies may be dependent upon non-default choices for new options that the user may make later.) Nits: I think you mean bsd.port.mk(only 1 "s")? Also, there is a typo in the comment on line 271: s/checksump/checksum/. b. From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 00:38:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F32C91065675; Mon, 24 Oct 2011 00:38:09 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFF508FC12; Mon, 24 Oct 2011 00:38:09 +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 p9O0c9Ut063719; Mon, 24 Oct 2011 00:38:09 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9O0c95O063707; Mon, 24 Oct 2011 00:38:09 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110240038.p9O0c95O063707@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 00:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226676 - in head: cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 00:38:10 -0000 Author: pjd Date: Mon Oct 24 00:38:09 2011 New Revision: 226676 URL: http://svn.freebsd.org/changeset/base/226676 Log: Allow to rename file systems without remounting if it is possible. It is possible for file systems with 'mountpoint' preperty set to 'legacy' or 'none' - we don't have to change mount directory for them. Currently such file systems are unmounted on rename and not even mounted back. This introduces layering violation, as we need to update 'f_mntfromname' field in statfs structure related to mountpoint (for the dataset we are renaming and all its children). In my opinion it is worth it, as it allow to update FreeBSD in even cleaner way - in ZFS-only configuration root file system is ZFS file system with 'mountpoint' property set to 'legacy'. If root dataset is named system/rootfs, we can snapshot it (system/rootfs@upgrade), clone it (system/oldrootfs), update FreeBSD and if it doesn't boot we can boot back from system/oldrootfs and rename it back to system/rootfs while it is mounted as /. Before it was not possible, because unmounting / was not possible. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 00:38:09 2011 (r226676) @@ -122,6 +122,10 @@ changelist_prefix(prop_changelist_t *clp */ switch (clp->cl_prop) { case ZFS_PROP_MOUNTPOINT: + if (clp->cl_waslegacy && + (clp->cl_gflags & CL_GATHER_KEEP_LEGACY)) { + break; + } if (zfs_unmount(cn->cn_handle, NULL, clp->cl_mflags) != 0) { ret = -1; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 24 00:38:09 2011 (r226676) @@ -3489,6 +3489,7 @@ zfs_rename(zfs_handle_t *zhp, const char zfs_handle_t *zhrp = NULL; char *parentname = NULL; char parent[ZFS_MAXNAMELEN]; + char property[ZFS_MAXPROPLEN]; libzfs_handle_t *hdl = zhp->zfs_hdl; char errbuf[1024]; @@ -3592,8 +3593,10 @@ zfs_rename(zfs_handle_t *zhp, const char } } else { - if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0)) == NULL) + if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, + CL_GATHER_KEEP_LEGACY, 0)) == NULL) { return (-1); + } if (changelist_haszonedchild(cl)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, @@ -3615,7 +3618,13 @@ zfs_rename(zfs_handle_t *zhp, const char (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); (void) strlcpy(zc.zc_value, target, sizeof (zc.zc_value)); - zc.zc_cookie = recursive; + zc.zc_cookie = recursive ? 1 : 0; + if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, property, sizeof (property), + NULL, NULL, 0, B_FALSE) == 0 && + (strcmp(property, "legacy") == 0 || + strcmp(property, "none") == 0)) { + zc.zc_cookie |= 2; + } if ((ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_RENAME, &zc)) != 0) { /* Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Sun Oct 23 23:04:39 2011 (r226675) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 00:38:09 2011 (r226676) @@ -158,7 +158,13 @@ int zprop_expand_list(libzfs_handle_t *h * on each change node regardless of whether or not it is currently * mounted. */ -#define CL_GATHER_MOUNT_ALWAYS 1 +#define CL_GATHER_MOUNT_ALWAYS 0x01 +/* + * Use this changelist_gather() flag to prevent unmounting of legacy + * file systems. Useful when renaming legacy file systems, where there is + * no need to unmount them. + */ +#define CL_GATHER_KEEP_LEGACY 0x02 typedef struct prop_changelist prop_changelist_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 24 00:38:09 2011 (r226676) @@ -2461,7 +2461,7 @@ dsl_valid_rename(const char *oldname, vo #pragma weak dmu_objset_rename = dsl_dataset_rename int -dsl_dataset_rename(char *oldname, const char *newname, boolean_t recursive) +dsl_dataset_rename(char *oldname, const char *newname, int flags) { dsl_dir_t *dd; dsl_dataset_t *ds; @@ -2481,7 +2481,7 @@ dsl_dataset_rename(char *oldname, const &delta, DS_FIND_CHILDREN | DS_FIND_SNAPSHOTS); if (err == 0) - err = dsl_dir_rename(dd, newname); + err = dsl_dir_rename(dd, newname, flags); dsl_dir_close(dd, FTAG); return (err); } @@ -2502,7 +2502,7 @@ dsl_dataset_rename(char *oldname, const if (strncmp(oldname, newname, tail - newname) != 0) return (EXDEV); - if (recursive) { + if (flags & ZFS_RENAME_RECURSIVE) { err = dsl_recursive_rename(oldname, newname); } else { err = dsl_dataset_hold(oldname, FTAG, &ds); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 00:38:09 2011 (r226676) @@ -37,6 +37,7 @@ #include #include #include +#include #include "zfs_namecheck.h" static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); @@ -1245,6 +1246,7 @@ would_change(dsl_dir_t *dd, int64_t delt struct renamearg { dsl_dir_t *newparent; const char *mynewname; + boolean_t islegacy; }; static int @@ -1263,9 +1265,13 @@ dsl_dir_rename_check(void *arg1, void *a * stats), but any that are present in open context will likely * be gone by syncing context, so only fail from syncing * context. + * Don't check if we are renaming dataset with mountpoint set to + * "legacy" or "none". */ - if (dmu_tx_is_syncing(tx) && dmu_buf_refcount(dd->dd_dbuf) > 1) + if (!ra->islegacy && dmu_tx_is_syncing(tx) && + dmu_buf_refcount(dd->dd_dbuf) > 1) { return (EBUSY); + } /* check for existing name */ err = zap_lookup(mos, ra->newparent->dd_phys->dd_child_dir_zapobj, @@ -1302,7 +1308,7 @@ dsl_dir_rename_sync(void *arg1, void *ar objset_t *mos = dp->dp_meta_objset; int err; - ASSERT(dmu_buf_refcount(dd->dd_dbuf) <= 2); + ASSERT(ra->islegacy || dmu_buf_refcount(dd->dd_dbuf) <= 2); if (ra->newparent != dd->dd_parent) { dsl_dir_diduse_space(dd->dd_parent, DD_USED_CHILD, @@ -1345,6 +1351,7 @@ dsl_dir_rename_sync(void *arg1, void *ar ASSERT3U(err, ==, 0); dsl_dir_name(dd, newname); #ifdef _KERNEL + zfsvfs_update_fromname(oldname, newname); zvol_rename_minors(oldname, newname); #endif @@ -1353,7 +1360,7 @@ dsl_dir_rename_sync(void *arg1, void *ar } int -dsl_dir_rename(dsl_dir_t *dd, const char *newname) +dsl_dir_rename(dsl_dir_t *dd, const char *newname, int flags) { struct renamearg ra; int err; @@ -1375,6 +1382,8 @@ dsl_dir_rename(dsl_dir_t *dd, const char goto out; } + ra.islegacy = !!(flags & ZFS_RENAME_IS_LEGACY); + err = dsl_sync_task_do(dd->dd_pool, dsl_dir_rename_check, dsl_dir_rename_sync, dd, &ra, 3); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Mon Oct 24 00:38:09 2011 (r226676) @@ -178,6 +178,12 @@ struct dsl_ds_holdarg { char failed[MAXPATHLEN]; }; +/* + * Flags for dsl_dataset_rename(). + */ +#define ZFS_RENAME_RECURSIVE 0x01 +#define ZFS_RENAME_IS_LEGACY 0x02 + #define dsl_dataset_is_snapshot(ds) \ ((ds)->ds_phys->ds_num_children != 0) @@ -211,7 +217,7 @@ dsl_syncfunc_t dsl_dataset_destroy_sync; dsl_checkfunc_t dsl_dataset_snapshot_check; dsl_syncfunc_t dsl_dataset_snapshot_sync; dsl_syncfunc_t dsl_dataset_user_hold_sync; -int dsl_dataset_rename(char *name, const char *newname, boolean_t recursive); +int dsl_dataset_rename(char *name, const char *newname, int flags); int dsl_dataset_promote(const char *name, char *conflsnap); int dsl_dataset_clone_swap(dsl_dataset_t *clone, dsl_dataset_t *origin_head, boolean_t force); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Mon Oct 24 00:38:09 2011 (r226676) @@ -131,7 +131,7 @@ int dsl_dir_set_quota(const char *ddname uint64_t quota); int dsl_dir_set_reservation(const char *ddname, zprop_source_t source, uint64_t reservation); -int dsl_dir_rename(dsl_dir_t *dd, const char *newname); +int dsl_dir_rename(dsl_dir_t *dd, const char *newname, int flags); int dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd, uint64_t space); int dsl_dir_set_reservation_check(void *arg1, void *arg2, dmu_tx_t *tx); boolean_t dsl_dir_is_clone(dsl_dir_t *dd); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Mon Oct 24 00:38:09 2011 (r226676) @@ -153,6 +153,10 @@ extern void zfsvfs_free(zfsvfs_t *zfsvfs extern int zfs_check_global_label(const char *dsname, const char *hexsl); extern int zfs_vnode_lock(vnode_t *vp, int flags); +#ifdef _KERNEL +extern void zfsvfs_update_fromname(const char *oldname, const char *newname); +#endif + #ifdef __cplusplus } #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Oct 24 00:38:09 2011 (r226676) @@ -785,7 +785,7 @@ zfsctl_snapdir_rename(vnode_t *sdvp, cha return (ENOENT); } - err = dmu_objset_rename(from, to, B_FALSE); + err = dmu_objset_rename(from, to, 0); if (err == 0) zfsctl_rename_snap(sdp, sep, tnm); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 24 00:38:09 2011 (r226676) @@ -3261,7 +3261,12 @@ out: static int zfs_ioc_rename(zfs_cmd_t *zc) { - boolean_t recursive = zc->zc_cookie & 1; + int flags = 0; + + if (zc->zc_cookie & 1) + flags |= ZFS_RENAME_RECURSIVE; + if (zc->zc_cookie & 2) + flags |= ZFS_RENAME_IS_LEGACY; zc->zc_value[sizeof (zc->zc_value) - 1] = '\0'; if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || @@ -3273,13 +3278,14 @@ zfs_ioc_rename(zfs_cmd_t *zc) * in which case the dataset code figures out which snapshots * to unmount. */ - if (!recursive && strchr(zc->zc_name, '@') != NULL && + if (!(flags & ZFS_RENAME_RECURSIVE) && + strchr(zc->zc_name, '@') != NULL && zc->zc_objset_type == DMU_OST_ZFS) { int err = zfs_unmount_snap(zc->zc_name, NULL); if (err) return (err); } - return (dmu_objset_rename(zc->zc_name, zc->zc_value, recursive)); + return (dmu_objset_rename(zc->zc_name, zc->zc_value, flags)); } static int Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sun Oct 23 23:04:39 2011 (r226675) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 24 00:38:09 2011 (r226676) @@ -2416,3 +2416,35 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t } return (error); } + +#ifdef _KERNEL +void +zfsvfs_update_fromname(const char *oldname, const char *newname) +{ + char tmpbuf[MAXPATHLEN]; + struct mount *mp; + char *fromname; + size_t oldlen; + + oldlen = strlen(oldname); + + mtx_lock(&mountlist_mtx); + TAILQ_FOREACH(mp, &mountlist, mnt_list) { + fromname = mp->mnt_stat.f_mntfromname; + if (strcmp(fromname, oldname) == 0) { + (void)strlcpy(fromname, newname, + sizeof(mp->mnt_stat.f_mntfromname)); + continue; + } + if (strncmp(fromname, oldname, oldlen) == 0 && + fromname[oldlen] == '/') { + (void)snprintf(tmpbuf, sizeof(tmpbuf), "%s%s", + newname, fromname + oldlen); + (void)strlcpy(fromname, tmpbuf, + sizeof(mp->mnt_stat.f_mntfromname)); + continue; + } + } + mtx_unlock(&mountlist_mtx); +} +#endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 04:40:09 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B647106564A; Mon, 24 Oct 2011 04:40:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id ABE898FC0A; Mon, 24 Oct 2011 04:40:08 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p9O4e4w8012220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Oct 2011 15:40:05 +1100 Date: Mon, 24 Oct 2011 15:40:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <4EA473CA.8050104@FreeBSD.org> Message-ID: <20111024145107.R994@besplex.bde.org> References: <201110231627.p9NGR47P046269@svn.freebsd.org> <4EA473CA.8050104@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Robert Millan Subject: Re: svn commit: r226665 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 04:40:09 -0000 On Sun, 23 Oct 2011, Dimitry Andric wrote: > On 2011-10-23 18:27, Robert Millan wrote: >> Log: >> Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are >> only >> used with FreeBSD GCC. Bug in non-FreeBSD gcc. >> Modified: head/sys/conf/kern.mk >> ============================================================================== >> --- head/sys/conf/kern.mk Sun Oct 23 16:04:07 2011 (r226664) >> +++ head/sys/conf/kern.mk Sun Oct 23 16:27:03 2011 (r226665) >> @@ -1,11 +1,21 @@ >> # $FreeBSD$ >> >> +.if ${CC:T:Mclang} != "clang" >> +FREEBSD_GCC!= ${CC} --version | grep FreeBSD || true >> +.endif >> + Runtime tests like this should never be used in central makefiles since they are slow. This one doesn't even work. Use some user-defined-macro like NON_FREEBSD_GCC. >> # >> # Warning flags for compiling the kernel and components of the kernel: >> # >> +.if ${FREEBSD_GCC} >> +# FreeBSD extensions, not available in upstream GCC >> +format_extensions= -fformat-extensions >> +no_align_long_strings= -mno-align-long-strings >> +.endif How can this help? Builds should still fail due to -Wformat (-Werror) errors when the FreeBSD format extensions are used, and kernel code uses them a lot. You can turn off -Werror or -Wformat but then the non-FreeBSD gcc is even more unsuitable for development. > Note: this breaks builds where CC=clang, with: > >>>> Kernel build for GENERIC started on Sun Oct 23 22:01:23 CEST 2011 > ... > make KERNEL=kernel cleandir > "/usr/src/sys/conf/kern.mk", line 10: Malformed conditional (${FREEBSD_GCC}) > "/usr/src/sys/conf/kern.mk", line 14: if-less endif > make: fatal errors encountered -- cannot continue > ... > > Since our base 'clang --version' also has 'FreeBSD' in its output, you > might want to drop the first .if ${CC:T:Mclang} != "clang" test. E.g. > just unconditionally set the FREEBSD_GCC macro (although it's then no > longer correctly named, but that aside). clang is broken for -mno-align-long-strings too. This is worked around using a static test on ${CC}. clang also doesn't support -mpreferred-stack-boundary. This handled using using a static test on ${MACHINE_CPUARCH}. This is correct for clang, since it handles stack alignment better than gcc and uses the minimal alignment. clang doesn't properly fail when 1 or both of -mno-align-long-strings or -mpreferred-stack-boundary. It prints a diagnostic, but exits with status 0 even with -Werror, and even if the -mpreferred-stack- boundary arg is invalid so that it would case a fatal error with gcc. amd64 never used -preferred-stack-boundary even for gcc. It is avoided using the same static test on ${MACHINE_CPUARCH}. I'm not sure if this is a bug, of if the ABI requires 16-byte alignment even in the freestanding case. Certainly, the hardware only prefers 8-byte alignment for most args, like it only prefers 4-byte alignment on i386. Both amd64 and i386 require 16-byte alignment for some SSE args. This should be implemented by aligning the stack only if such args exists, like clang does on i386. amd64 never used -mno-align-long-strings even for FreeBSD gcc where it is supported. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 05:26:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A629106566C; Mon, 24 Oct 2011 05:26:41 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09C2C8FC0A; Mon, 24 Oct 2011 05:26:41 +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 p9O5QeQi074065; Mon, 24 Oct 2011 05:26:40 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9O5QeLi074063; Mon, 24 Oct 2011 05:26:40 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110240526.p9O5QeLi074063@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 05:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226678 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 05:26:41 -0000 Author: pjd Date: Mon Oct 24 05:26:40 2011 New Revision: 226678 URL: http://svn.freebsd.org/changeset/base/226678 Log: Include only when compiling kernel module. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 01:19:34 2011 (r226677) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 05:26:40 2011 (r226678) @@ -37,7 +37,9 @@ #include #include #include +#ifdef _KERNEL #include +#endif #include "zfs_namecheck.h" static uint64_t dsl_dir_space_towrite(dsl_dir_t *dd); From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 07:37:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00245106566C; Mon, 24 Oct 2011 07:37:01 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB09A8FC13; Mon, 24 Oct 2011 07:37:01 +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 p9O7b1Xo078382; Mon, 24 Oct 2011 07:37:01 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9O7b1Vg078380; Mon, 24 Oct 2011 07:37:01 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201110240737.p9O7b1Vg078380@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 24 Oct 2011 07:37:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226679 - head/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 07:37:02 -0000 Author: bschmidt Date: Mon Oct 24 07:37:01 2011 New Revision: 226679 URL: http://svn.freebsd.org/changeset/base/226679 Log: Let net80211 also know about stopped BA sessions. This fixes some issues where the driver assumed that BA resources are still available due to net80211 saying so. PR: 161407, 159768 Tested by: cperciva, rene MFC after: 3 days Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Oct 24 05:26:40 2011 (r226678) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 24 07:37:01 2011 (r226679) @@ -5641,6 +5641,7 @@ iwn_ampdu_tx_stop(struct ieee80211_node sc->qid2tap[qid] = NULL; free(tap->txa_private, M_DEVBUF); tap->txa_private = NULL; + sc->sc_addba_stop(ni, tap); } static void From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 08:47:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DEA7106564A; Mon, 24 Oct 2011 08:47:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CFF18FC15; Mon, 24 Oct 2011 08:47:24 +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 p9O8lO7u080732; Mon, 24 Oct 2011 08:47:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9O8lOUx080728; Mon, 24 Oct 2011 08:47:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201110240847.p9O8lOUx080728@svn.freebsd.org> From: Alexander Motin Date: Mon, 24 Oct 2011 08:47:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226680 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 08:47:24 -0000 Author: mav Date: Mon Oct 24 08:47:23 2011 New Revision: 226680 URL: http://svn.freebsd.org/changeset/base/226680 Log: Some dmesg cosmetics: - for the legacy PCI ATA channels move channel number out of the device description, same as it is for ahci(4), siis(4) and mvs(4); - add device description for the ISA ATA channels. Modified: head/sys/dev/ata/ata-isa.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h Modified: head/sys/dev/ata/ata-isa.c ============================================================================== --- head/sys/dev/ata/ata-isa.c Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-isa.c Mon Oct 24 08:47:23 2011 (r226680) @@ -92,6 +92,7 @@ ata_isa_probe(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, ATA_CTLADDR_RID, ctlio); bus_release_resource(dev, SYS_RES_IOPORT, ATA_IOADDR_RID, io); + device_set_desc(dev, "ATA channel"); return (ata_probe(dev)); } Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-pci.c Mon Oct 24 08:47:23 2011 (r226680) @@ -545,6 +545,19 @@ ata_pci_dmafini(device_t dev) } int +ata_pci_print_child(device_t dev, device_t child) +{ + int retval; + + retval = bus_print_child_header(dev, child); + retval += printf(" at channel %d", + (int)(intptr_t)device_get_ivars(child)); + retval += bus_print_child_footer(dev, child); + + return (retval); +} + +int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { @@ -574,6 +587,7 @@ static device_method_t ata_pci_methods[] DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), DEVMETHOD(pci_read_config, ata_pci_read_config), DEVMETHOD(pci_write_config, ata_pci_write_config), + DEVMETHOD(bus_print_child, ata_pci_print_child), DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), { 0, 0 } @@ -594,12 +608,10 @@ MODULE_DEPEND(atapci, ata, 1, 1, 1); static int ata_pcichannel_probe(device_t dev) { - char buffer[32]; if ((intptr_t)device_get_ivars(dev) < 0) return (ENXIO); - sprintf(buffer, "ATA channel %d", (int)(intptr_t)device_get_ivars(dev)); - device_set_desc_copy(dev, buffer); + device_set_desc(dev, "ATA channel"); return ata_probe(dev); } Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Mon Oct 24 07:37:01 2011 (r226679) +++ head/sys/dev/ata/ata-pci.h Mon Oct 24 08:47:23 2011 (r226680) @@ -549,6 +549,7 @@ int ata_pci_write_ivar(device_t dev, dev uint32_t ata_pci_read_config(device_t dev, device_t child, int reg, int width); void ata_pci_write_config(device_t dev, device_t child, int reg, uint32_t val, int width); +int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen); struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags); @@ -601,6 +602,7 @@ static device_method_t __CONCAT(dname,_m DEVMETHOD(bus_teardown_intr, ata_pci_teardown_intr), \ DEVMETHOD(pci_read_config, ata_pci_read_config), \ DEVMETHOD(pci_write_config, ata_pci_write_config), \ + DEVMETHOD(bus_print_child, ata_pci_print_child), \ DEVMETHOD(bus_child_location_str, ata_pci_child_location_str), \ { 0, 0 } \ }; \ From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 09:27:44 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3591065670; Mon, 24 Oct 2011 09:27:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2716B8FC12; Mon, 24 Oct 2011 09:27:42 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA18632; Mon, 24 Oct 2011 12:27:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RIGom-0006a3-Iz; Mon, 24 Oct 2011 12:27:40 +0300 Message-ID: <4EA52F8B.1060702@FreeBSD.org> Date: Mon, 24 Oct 2011 12:27:39 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Marcel Moolenaar References: <201110232003.p9NK3XaV054476@svn.freebsd.org> In-Reply-To: <201110232003.p9NK3XaV054476@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r226673 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 09:27:44 -0000 on 23/10/2011 23:03 Marcel Moolenaar said the following: > Author: marcel > Date: Sun Oct 23 20:03:33 2011 > New Revision: 226673 > URL: http://svn.freebsd.org/changeset/base/226673 > > Log: > Don't terminate the interactive root mount prompt on mount failure. > This restores the previous behaviour. While here, match '?' and '.' > inputs exactly and improve the error message. > > Requested by: avg@ > Derived from a patch by: Arnaud Lacombe > > Modified: > head/sys/kern/vfs_mountroot.c Thank you very much! Just to be sure - you are planning to MFC this to stable/9? -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 10:35:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075E61065670; Mon, 24 Oct 2011 10:35:38 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB5348FC13; Mon, 24 Oct 2011 10:35:37 +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 p9OAZbG4039773; Mon, 24 Oct 2011 10:35:37 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OAZbOK039771; Mon, 24 Oct 2011 10:35:37 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201110241035.p9OAZbOK039771@svn.freebsd.org> From: Peter Holm Date: Mon, 24 Oct 2011 10:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226681 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 10:35:38 -0000 Author: pho Date: Mon Oct 24 10:35:37 2011 New Revision: 226681 URL: http://svn.freebsd.org/changeset/base/226681 Log: Only unlock if the lock is exclusive. Reported by: Subbsd Discussed with: kib Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 08:47:23 2011 (r226680) +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 10:35:37 2011 (r226681) @@ -104,11 +104,10 @@ nullfs_mount(struct mount *mp) return (EINVAL); /* - * Unlock lower node to avoid deadlock. - * (XXX) VOP_ISLOCKED is needed? + * Unlock lower node to avoid possible deadlock. */ if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) && - VOP_ISLOCKED(mp->mnt_vnodecovered)) { + VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { VOP_UNLOCK(mp->mnt_vnodecovered, 0); isvnunlocked = 1; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 12:21:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25D52106567D; Mon, 24 Oct 2011 12:21:59 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBB2F8FC22; Mon, 24 Oct 2011 12:21:58 +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 p9OCLw2A043365; Mon, 24 Oct 2011 12:21:58 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OCLwxk043362; Mon, 24 Oct 2011 12:21:58 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201110241221.p9OCLwxk043362@svn.freebsd.org> From: Ivan Voras Date: Mon, 24 Oct 2011 12:21:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226683 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 12:21:59 -0000 Author: ivoras Date: Mon Oct 24 12:21:58 2011 New Revision: 226683 URL: http://svn.freebsd.org/changeset/base/226683 Log: Fix typo MFC after: 1 month Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 10:48:13 2011 (r226682) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:21:58 2011 (r226683) @@ -634,7 +634,7 @@ op_hrDiskStorageTable(struct snmp_contex value->v.integer = entry->media; return (SNMP_ERR_NOERROR); - case LEAF_hrDiskStorageRemoveble: + case LEAF_hrDiskStorageRemovable: value->v.integer = entry->removable; return (SNMP_ERR_NOERROR); Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Mon Oct 24 10:48:13 2011 (r226682) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_tree.def Mon Oct 24 12:21:58 2011 (r226683) @@ -149,7 +149,7 @@ (1 hrDiskStorageEntry : INTEGER op_hrDiskStorageTable (1 hrDiskStorageAccess INTEGER GET) (2 hrDiskStorageMedia INTEGER GET) - (3 hrDiskStorageRemoveble INTEGER GET) + (3 hrDiskStorageRemovable INTEGER GET) (4 hrDiskStorageCapacity INTEGER GET) ) ) From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 12:43:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE4B3106566B; Mon, 24 Oct 2011 12:43:20 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDC218FC08; Mon, 24 Oct 2011 12:43:20 +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 p9OChKF5044060; Mon, 24 Oct 2011 12:43:20 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OChKgS044058; Mon, 24 Oct 2011 12:43:20 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201110241243.p9OChKgS044058@svn.freebsd.org> From: Ivan Voras Date: Mon, 24 Oct 2011 12:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226684 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 12:43:20 -0000 Author: ivoras Date: Mon Oct 24 12:43:20 2011 New Revision: 226684 URL: http://svn.freebsd.org/changeset/base/226684 Log: It seems that the warning is much less severe than its message says. The device is certainly added to the list after the first pass. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:21:58 2011 (r226683) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:43:20 2011 (r226684) @@ -442,7 +442,7 @@ disk_OS_get_disks(void) /* * not found there - insert it as immutable */ - syslog(LOG_WARNING, "%s: device '%s' not in " + syslog(LOG_WARNING, "%s: adding device '%s' to " "device list", __func__, disk); if ((entry = device_entry_create(disk, "", "")) == NULL) From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 12:59:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894921065670; Mon, 24 Oct 2011 12:59:39 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78C9E8FC12; Mon, 24 Oct 2011 12:59:39 +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 p9OCxd62044612; Mon, 24 Oct 2011 12:59:39 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OCxdpE044610; Mon, 24 Oct 2011 12:59:39 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201110241259.p9OCxdpE044610@svn.freebsd.org> From: Ivan Voras Date: Mon, 24 Oct 2011 12:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226685 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 12:59:39 -0000 Author: ivoras Date: Mon Oct 24 12:59:39 2011 New Revision: 226685 URL: http://svn.freebsd.org/changeset/base/226685 Log: Apparently, "ada" drives are better treated similarly to "da" drives. Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:43:20 2011 (r226684) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Mon Oct 24 12:59:39 2011 (r226685) @@ -476,7 +476,8 @@ disk_OS_get_disks(void) disk_entry->media = DSM_UNKNOWN; disk_entry->removable = SNMP_FALSE; - if (strncmp(disk_entry->dev_name, "da", 2) == 0) { + if (strncmp(disk_entry->dev_name, "da", 2) == 0 || + strncmp(disk_entry->dev_name, "ada", 3) == 0) { disk_entry->media = DSM_HARDDISK; disk_entry->removable = SNMP_FALSE; } else if (strncmp(disk_entry->dev_name, "cd", 2) == 0) { From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 13:48:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813D61065674; Mon, 24 Oct 2011 13:48:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 714E88FC15; Mon, 24 Oct 2011 13:48:13 +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 p9ODmDuJ046231; Mon, 24 Oct 2011 13:48:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ODmDLu046229; Mon, 24 Oct 2011 13:48:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110241348.p9ODmDLu046229@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Oct 2011 13:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226686 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 13:48:13 -0000 Author: kib Date: Mon Oct 24 13:48:13 2011 New Revision: 226686 URL: http://svn.freebsd.org/changeset/base/226686 Log: The covered vnode must be reloced if it was unlocked. Remove VOP_ISLOCKED test because of this and also because it can lead to false positives. Tested by: pho MFC after: 1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 12:59:39 2011 (r226685) +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:48:13 2011 (r226686) @@ -119,7 +119,7 @@ nullfs_mount(struct mount *mp) /* * Re-lock vnode. */ - if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered)) + if (isvnunlocked) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY); if (error) From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 13:53:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67813106564A; Mon, 24 Oct 2011 13:53:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5788B8FC18; Mon, 24 Oct 2011 13:53: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 p9ODrW7g046447; Mon, 24 Oct 2011 13:53:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ODrW99046445; Mon, 24 Oct 2011 13:53:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110241353.p9ODrW99046445@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Oct 2011 13:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226687 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 13:53:32 -0000 Author: kib Date: Mon Oct 24 13:53:32 2011 New Revision: 226687 URL: http://svn.freebsd.org/changeset/base/226687 Log: The only possible error return from null_nodeget() is due to insmntque1 failure (the getnewvnode cannot return an error). In this case, the null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK() in the nullfs_mount() after null_nodeget() failure is wrong. Tested by: pho MFC after: 1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:48:13 2011 (r226686) +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:53:32 2011 (r226687) @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) * Make sure the node alias worked */ if (error) { - VOP_UNLOCK(vp, 0); vrele(lowerrootvp); free(xmp, M_NULLFSMNT); /* XXX */ return (error); From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 13:56:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A03C1065676; Mon, 24 Oct 2011 13:56:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A57B8FC25; Mon, 24 Oct 2011 13:56: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 p9ODuWq2046599; Mon, 24 Oct 2011 13:56:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ODuW4c046597; Mon, 24 Oct 2011 13:56:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201110241356.p9ODuW4c046597@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 24 Oct 2011 13:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226688 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 13:56:32 -0000 Author: kib Date: Mon Oct 24 13:56:31 2011 New Revision: 226688 URL: http://svn.freebsd.org/changeset/base/226688 Log: The use of VOP_ISLOCKED() without a check for the return values can cause false positives. Replace the #ifdef block with the proper ASSERT_VOP_UNLOCKED() assert. Tested by: pho MFC after: 1 week Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:53:32 2011 (r226687) +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:56:31 2011 (r226688) @@ -242,10 +242,7 @@ nullfs_root(mp, flags, vpp) vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; VREF(vp); -#ifdef NULLFS_DEBUG - if (VOP_ISLOCKED(vp)) - panic("root vnode is locked.\n"); -#endif + ASSERT_VOP_UNLOCKED(vp, "root vnode is locked"); vn_lock(vp, flags | LK_RETRY); *vpp = vp; return 0; From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 14:29:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F83A1065673; Mon, 24 Oct 2011 14:29:08 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 5146D8FC16; Mon, 24 Oct 2011 14:29:08 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 864027F384F; Mon, 24 Oct 2011 16:22:45 +0200 (CEST) Date: Mon, 24 Oct 2011 16:22:45 +0200 From: Roman Divacky To: Konstantin Belousov Message-ID: <20111024142245.GA73120@freebsd.org> References: <201110241353.p9ODrW99046445@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110241353.p9ODrW99046445@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226687 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 14:29:08 -0000 On Mon, Oct 24, 2011 at 01:53:32PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Oct 24 13:53:32 2011 > New Revision: 226687 > URL: http://svn.freebsd.org/changeset/base/226687 > > Log: > The only possible error return from null_nodeget() is due to insmntque1 > failure (the getnewvnode cannot return an error). In this case, the > null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNLOCK() > in the nullfs_mount() after null_nodeget() failure is wrong. > > Tested by: pho > MFC after: 1 week > > Modified: > head/sys/fs/nullfs/null_vfsops.c > > Modified: head/sys/fs/nullfs/null_vfsops.c > ============================================================================== > --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:48:13 2011 (r226686) > +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:53:32 2011 (r226687) > @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) > * Make sure the node alias worked > */ > if (error) { > - VOP_UNLOCK(vp, 0); Maybe you want to assert that it's indeed unlocked at this point? roman From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 14:35:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A3FA1065676; Mon, 24 Oct 2011 14:35:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1B88FC12; Mon, 24 Oct 2011 14:35: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 p9OEZWZj048041; Mon, 24 Oct 2011 14:35:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OEZWkb048039; Mon, 24 Oct 2011 14:35:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110241435.p9OEZWkb048039@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 24 Oct 2011 14:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226690 - head/usr.sbin/ypbind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 14:35:32 -0000 Author: glebius Date: Mon Oct 24 14:35:31 2011 New Revision: 226690 URL: http://svn.freebsd.org/changeset/base/226690 Log: Protect NIS client with madvise(2) since this daemon is required for succesful authentication of users. Modified: head/usr.sbin/ypbind/ypbind.c Modified: head/usr.sbin/ypbind/ypbind.c ============================================================================== --- head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:23:40 2011 (r226689) +++ head/usr.sbin/ypbind/ypbind.c Mon Oct 24 14:35:31 2011 (r226690) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -465,6 +466,9 @@ main(int argc, char *argv[]) openlog(argv[0], LOG_PID, LOG_DAEMON); + if (madvise(NULL, 0, MADV_PROTECT) != 0) + syslog(LOG_WARNING, "madvise(): %m"); + /* Kick off the default domain */ broadcast(ypbindlist); From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 14:42:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05091065670; Mon, 24 Oct 2011 14:42:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 675F68FC0C; Mon, 24 Oct 2011 14:42:32 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9OEgSCi050482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Oct 2011 17:42:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9OEgSJD089521; Mon, 24 Oct 2011 17:42:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9OEgSli089520; Mon, 24 Oct 2011 17:42:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 24 Oct 2011 17:42:28 +0300 From: Kostik Belousov To: Roman Divacky Message-ID: <20111024144228.GL50300@deviant.kiev.zoral.com.ua> References: <201110241353.p9ODrW99046445@svn.freebsd.org> <20111024142245.GA73120@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dYbRCasfhpyZLUd7" Content-Disposition: inline In-Reply-To: <20111024142245.GA73120@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226687 - head/sys/fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 14:42:34 -0000 --dYbRCasfhpyZLUd7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 24, 2011 at 04:22:45PM +0200, Roman Divacky wrote: > On Mon, Oct 24, 2011 at 01:53:32PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Mon Oct 24 13:53:32 2011 > > New Revision: 226687 > > URL: http://svn.freebsd.org/changeset/base/226687 > >=20 > > Log: > > The only possible error return from null_nodeget() is due to insmntqu= e1 > > failure (the getnewvnode cannot return an error). In this case, the > > null_insmntque_dtr() already unlocked the reclaimed vnode, so VOP_UNL= OCK() > > in the nullfs_mount() after null_nodeget() failure is wrong. > > =20 > > Tested by: pho > > MFC after: 1 week > >=20 > > Modified: > > head/sys/fs/nullfs/null_vfsops.c > >=20 > > Modified: head/sys/fs/nullfs/null_vfsops.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:48:13 2011 (r226686) > > +++ head/sys/fs/nullfs/null_vfsops.c Mon Oct 24 13:53:32 2011 (r226687) > > @@ -157,7 +157,6 @@ nullfs_mount(struct mount *mp) > > * Make sure the node alias worked > > */ > > if (error) { > > - VOP_UNLOCK(vp, 0); >=20 > Maybe you want to assert that it's indeed unlocked at this point? No, I don't, since the vnode pointer is already invalid at this point. The vput() call in dtr released the vnode reference owned by current thread. --dYbRCasfhpyZLUd7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6leVQACgkQC3+MBN1Mb4ibCwCfRusCwPjeHfURw4eduKBaKgkR E7sAoLjo+IQl7ju/dSeagnxYoxzk35A/ =rR/d -----END PGP SIGNATURE----- --dYbRCasfhpyZLUd7-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 16:11:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0493F1065670; Mon, 24 Oct 2011 16:11:25 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id C5CCB8FC0C; Mon, 24 Oct 2011 16:11:24 +0000 (UTC) Received: from sa-nc-common-207.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9OGBH91090170 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 24 Oct 2011 09:11:23 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Marcel Moolenaar In-Reply-To: <4EA52F8B.1060702@FreeBSD.org> Date: Mon, 24 Oct 2011 09:11:16 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201110232003.p9NK3XaV054476@svn.freebsd.org> <4EA52F8B.1060702@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org Subject: Re: svn commit: r226673 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 16:11:25 -0000 On Oct 24, 2011, at 2:27 AM, Andriy Gapon wrote: > on 23/10/2011 23:03 Marcel Moolenaar said the following: >> Author: marcel >> Date: Sun Oct 23 20:03:33 2011 >> New Revision: 226673 >> URL: http://svn.freebsd.org/changeset/base/226673 >> >> Log: >> Don't terminate the interactive root mount prompt on mount failure. >> This restores the previous behaviour. While here, match '?' and '.' >> inputs exactly and improve the error message. >> >> Requested by: avg@ >> Derived from a patch by: Arnaud Lacombe >> >> Modified: >> head/sys/kern/vfs_mountroot.c > > Thank you very much! > Just to be sure - you are planning to MFC this to stable/9? Yes, I will. In a week or so. Please test it and let me know if it's good enough for you or if can tweak it a bit more. FYI, -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 17:06:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55630106564A; Mon, 24 Oct 2011 17:06:00 +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 455008FC14; Mon, 24 Oct 2011 17:06:00 +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 p9OH60Ar053690; Mon, 24 Oct 2011 17:06:00 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OH60Zp053688; Mon, 24 Oct 2011 17:06:00 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110241706.p9OH60Zp053688@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 17:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226695 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 17:06:00 -0000 Author: yongari Date: Mon Oct 24 17:05:59 2011 New Revision: 226695 URL: http://svn.freebsd.org/changeset/base/226695 Log: Fix a regression introduced in r218832. For TX status check, driver should use a TX list DMA tag. MFC after: 3 days Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Mon Oct 24 15:50:23 2011 (r226694) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 17:05:59 2011 (r226695) @@ -2970,7 +2970,7 @@ dc_txeof(struct dc_softc *sc) * Go through our tx list and free mbufs for those * frames that have been transmitted. */ - bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD | + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); setup = 0; for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod; From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 17:09:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12594106566C; Mon, 24 Oct 2011 17:09:23 +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 024868FC15; Mon, 24 Oct 2011 17:09:23 +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 p9OH9M2p053852; Mon, 24 Oct 2011 17:09:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OH9Mgw053850; Mon, 24 Oct 2011 17:09:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110241709.p9OH9Mgw053850@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 17:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226696 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 17:09:23 -0000 Author: yongari Date: Mon Oct 24 17:09:22 2011 New Revision: 226696 URL: http://svn.freebsd.org/changeset/base/226696 Log: Add missing bus_dmamap_sync() in setup frame transmit. MFC after: 3 days Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Mon Oct 24 17:05:59 2011 (r226695) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 17:09:22 2011 (r226696) @@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc) sp[41] = DC_SP_MAC(eaddr[2]); sframe->dc_status = htole32(DC_TXSTAT_OWN); + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF); @@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc) DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON); sframe->dc_status = htole32(DC_TXSTAT_OWN); + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE); CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF); From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 18:29:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0EDE106566B; Mon, 24 Oct 2011 18:29:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B084F8FC13; Mon, 24 Oct 2011 18:29:50 +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 p9OIToe8056777; Mon, 24 Oct 2011 18:29:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OIToRK056775; Mon, 24 Oct 2011 18:29:50 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201110241829.p9OIToRK056775@svn.freebsd.org> From: Ed Maste Date: Mon, 24 Oct 2011 18:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226697 - head/usr.sbin/pkg_install/info X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 18:29:50 -0000 Author: emaste Date: Mon Oct 24 18:29:50 2011 New Revision: 226697 URL: http://svn.freebsd.org/changeset/base/226697 Log: Avoid printing // for packages that install to / I have some packages that install to / (for whatever reason). Right now we print entries of the form //path/to/file when listing files (pkg_info -L, pkg_info -g etc.) This change avoids printing the redundant / . Modified: head/usr.sbin/pkg_install/info/show.c Modified: head/usr.sbin/pkg_install/info/show.c ============================================================================== --- head/usr.sbin/pkg_install/info/show.c Mon Oct 24 17:09:22 2011 (r226696) +++ head/usr.sbin/pkg_install/info/show.c Mon Oct 24 18:29:50 2011 (r226697) @@ -207,6 +207,14 @@ show_plist(const char *title, Package *p } } +const char * +elide_root(const char *dir) +{ + if (strcmp(dir, "/") == 0) + return ""; + return dir; +} + /* Show all files in the packing list (except ignored ones) */ void show_files(const char *title, Package *plist) @@ -223,7 +231,7 @@ show_files(const char *title, Package *p switch(p->type) { case PLIST_FILE: if (!ign) - printf("%s/%s\n", dir, p->name); + printf("%s/%s\n", elide_root(dir), p->name); ign = FALSE; break; @@ -270,7 +278,7 @@ show_size(const char *title, Package *pl switch (p->type) { case PLIST_FILE: if (!ign) { - snprintf(tmp, FILENAME_MAX, "%s/%s", dir, p->name); + snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); if (!lstat(tmp, &sb)) { size += sb.st_size; if (Verbose) @@ -328,7 +336,7 @@ show_cksum(const char *title, Package *p else dir = p->name; } else if (p->type == PLIST_FILE) { - snprintf(tmp, FILENAME_MAX, "%s/%s", dir, p->name); + snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name); if (!fexists(tmp)) warnx("%s doesn't exist", tmp); else if (p->next && p->next->type == PLIST_COMMENT && From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 18:35:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9A45106566B; Mon, 24 Oct 2011 18:35:16 +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 C9E3D8FC14; Mon, 24 Oct 2011 18:35:16 +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 p9OIZGdh057015; Mon, 24 Oct 2011 18:35:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OIZGMg057013; Mon, 24 Oct 2011 18:35:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201110241835.p9OIZGMg057013@svn.freebsd.org> From: Dimitry Andric Date: Mon, 24 Oct 2011 18:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226698 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 18:35:16 -0000 Author: dim Date: Mon Oct 24 18:35:16 2011 New Revision: 226698 URL: http://svn.freebsd.org/changeset/base/226698 Log: Put in a temporary band-aid to fix kernel builds when CC=clang, after r226665. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Oct 24 18:29:50 2011 (r226697) +++ head/sys/conf/kern.mk Mon Oct 24 18:35:16 2011 (r226698) @@ -7,7 +7,7 @@ FREEBSD_GCC!= ${CC} --version | grep Fre # # Warning flags for compiling the kernel and components of the kernel: # -.if ${FREEBSD_GCC} +.if defined(FREEBSD_GCC) && ${FREEBSD_GCC} # FreeBSD extensions, not available in upstream GCC format_extensions= -fformat-extensions no_align_long_strings= -mno-align-long-strings From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 20:26:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655D2106566B; Mon, 24 Oct 2011 20:26:38 +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 4B95E8FC17; Mon, 24 Oct 2011 20:26:38 +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 p9OKQcgx061210; Mon, 24 Oct 2011 20:26:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OKQcmO061208; Mon, 24 Oct 2011 20:26:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110242026.p9OKQcmO061208@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 20:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226699 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 20:26:38 -0000 Author: yongari Date: Mon Oct 24 20:26:37 2011 New Revision: 226699 URL: http://svn.freebsd.org/changeset/base/226699 Log: When driver is run for the first time there would be no established link such that calling dc_setcfg() right after media change would be meaningless unless controller in question is not Davicom DM9102. Ideally dc_setcfg() should be called when speed/duplex is resolved otherwise it would reprogram controller with wrong speed/duplex information. Because MII status change callback already calls dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is wrong. For instance, it would take some time to establish a link after mii_mediachg(), so blindly calling dc_setcfg() right after mii_mediachg() will always yield wrong media configuration. Extend dc_ifmedia_upd() to handle media change and still allow 21143 and Davidcom controllers program speed/duplex regardless of current resolved speed/duplex of link. In theory 21143 may not need to call dc_setcfg() right after media change, but leave it as it is because there are too many variants to test that change. Probably dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to verify correctness of the change. This change reliably makes ULi M5263 establish a link. While I'm here correctly report media change result. Previously it always reported a success. Modified: head/sys/dev/dc/if_dc.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Mon Oct 24 18:35:16 2011 (r226698) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 20:26:37 2011 (r226699) @@ -252,6 +252,7 @@ static void dc_stop(struct dc_softc *); static void dc_watchdog(void *); static int dc_shutdown(device_t); static int dc_ifmedia_upd(struct ifnet *); +static int dc_ifmedia_upd_locked(struct dc_softc *); static void dc_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int dc_dma_alloc(struct dc_softc *); @@ -3740,8 +3741,7 @@ dc_init_locked(struct dc_softc *sc) ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - mii_mediachg(mii); - dc_setcfg(sc, sc->dc_if_media); + dc_ifmedia_upd_locked(sc); /* Clear missed frames and overflow counter. */ CSR_READ_4(sc, DC_FRAMESDISCARDED); @@ -3767,25 +3767,37 @@ static int dc_ifmedia_upd(struct ifnet *ifp) { struct dc_softc *sc; - struct mii_data *mii; - struct ifmedia *ifm; + int error; sc = ifp->if_softc; - mii = device_get_softc(sc->dc_miibus); DC_LOCK(sc); - mii_mediachg(mii); - ifm = &mii->mii_media; - - if (DC_IS_INTEL(sc)) - dc_setcfg(sc, ifm->ifm_media); - else if (DC_IS_DAVICOM(sc) && - IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) - dc_setcfg(sc, ifm->ifm_media); - else - sc->dc_link = 0; + error = dc_ifmedia_upd_locked(sc); DC_UNLOCK(sc); + return (error); +} - return (0); +static int +dc_ifmedia_upd_locked(struct dc_softc *sc) +{ + struct mii_data *mii; + struct ifmedia *ifm; + int error; + + DC_LOCK_ASSERT(sc); + + sc->dc_link = 0; + mii = device_get_softc(sc->dc_miibus); + error = mii_mediachg(mii); + if (error == 0) { + ifm = &mii->mii_media; + if (DC_IS_INTEL(sc)) + dc_setcfg(sc, ifm->ifm_media); + else if (DC_IS_DAVICOM(sc) && + IFM_SUBTYPE(ifm->ifm_media) == IFM_HPNA_1) + dc_setcfg(sc, ifm->ifm_media); + } + + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 20:41:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29FDC1065670; Mon, 24 Oct 2011 20:41:32 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 199108FC0A; Mon, 24 Oct 2011 20:41: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 p9OKfVDO061771; Mon, 24 Oct 2011 20:41:31 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OKfV3t061769; Mon, 24 Oct 2011 20:41:31 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110242041.p9OKfV3t061769@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 20:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226700 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 20:41:33 -0000 Author: pjd Date: Mon Oct 24 20:41:31 2011 New Revision: 226700 URL: http://svn.freebsd.org/changeset/base/226700 Log: Don't forget to rename mounted snapshots of the file system being renamed. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 24 20:26:37 2011 (r226699) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 24 20:41:31 2011 (r226700) @@ -2437,7 +2437,7 @@ zfsvfs_update_fromname(const char *oldna continue; } if (strncmp(fromname, oldname, oldlen) == 0 && - fromname[oldlen] == '/') { + (fromname[oldlen] == '/' || fromname[oldlen] == '@')) { (void)snprintf(tmpbuf, sizeof(tmpbuf), "%s%s", newname, fromname + oldlen); (void)strlcpy(fromname, tmpbuf, From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 20:48:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EFF4106566C; Mon, 24 Oct 2011 20:48:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1368FC08; Mon, 24 Oct 2011 20:48:02 +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 p9OKm2EA062066; Mon, 24 Oct 2011 20:48:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OKm21o062063; Mon, 24 Oct 2011 20:48:02 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110242048.p9OKm21o062063@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 20:48:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226701 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 20:48:02 -0000 Author: yongari Date: Mon Oct 24 20:48:02 2011 New Revision: 226701 URL: http://svn.freebsd.org/changeset/base/226701 Log: Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet controller which is found on ULi M1563 South Bridge & M1689 Bridge. These controllers look like a tulip clone. M5263 controller does not support MII bitbang so use DC_ROM register to access MII registers. Like other tulip variants, ULi controller uses a setup frame to configure RX filter and uses new setup frame format. It's not clear to me whether the controller supports a hash based multicast filtering so this patch uses 14 perfect multicast filter to filter multicast frames. If number of multicast addresses is greater than 14, controller is put into a mode that receives all multicast frames. Due to lack of access to M5261, this change was not tested with M5261 but it probably works. Many thanks to Marco who provided remote access to M5263. Tested by: Marco Steinbach executive-computing dot de>, Martin MATO orange dot fr> Modified: head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Mon Oct 24 20:41:31 2011 (r226700) +++ head/sys/dev/dc/if_dc.c Mon Oct 24 20:48:02 2011 (r226701) @@ -224,6 +224,10 @@ static const struct dc_type dc_devs[] = "Linksys PCMPC200 CardBus 10/100" }, { DC_DEVID(DC_VENDORID_LINKSYS, DC_DEVICEID_PCMPC200_AB09), 0, "Linksys PCMPC200 CardBus 10/100" }, + { DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5261), 0, + "ULi M5261 FastEthernet" }, + { DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5263), 0, + "ULi M5263 FastEthernet" }, { 0, 0, NULL } }; @@ -286,6 +290,7 @@ static uint32_t dc_mchash_be(const uint8 static void dc_setfilt_21143(struct dc_softc *); static void dc_setfilt_asix(struct dc_softc *); static void dc_setfilt_admtek(struct dc_softc *); +static void dc_setfilt_uli(struct dc_softc *); static void dc_setfilt_xircom(struct dc_softc *); static void dc_setfilt(struct dc_softc *); @@ -828,6 +833,23 @@ dc_miibus_readreg(device_t dev, int phy, return (0); } + if (sc->dc_type == DC_TYPE_ULI_M5263) { + CSR_WRITE_4(sc, DC_ROM, + ((phy << DC_ULI_PHY_ADDR_SHIFT) & DC_ULI_PHY_ADDR_MASK) | + ((reg << DC_ULI_PHY_REG_SHIFT) & DC_ULI_PHY_REG_MASK) | + DC_ULI_PHY_OP_READ); + for (i = 0; i < DC_TIMEOUT; i++) { + DELAY(1); + rval = CSR_READ_4(sc, DC_ROM); + if ((rval & DC_ULI_PHY_OP_DONE) != 0) { + return (rval & DC_ULI_PHY_DATA_MASK); + } + } + if (i == DC_TIMEOUT) + device_printf(dev, "phy read timed out\n"); + return (0); + } + if (DC_IS_COMET(sc)) { switch (reg) { case MII_BMCR: @@ -898,6 +920,16 @@ dc_miibus_writereg(device_t dev, int phy return (0); } + if (sc->dc_type == DC_TYPE_ULI_M5263) { + CSR_WRITE_4(sc, DC_ROM, + ((phy << DC_ULI_PHY_ADDR_SHIFT) & DC_ULI_PHY_ADDR_MASK) | + ((reg << DC_ULI_PHY_REG_SHIFT) & DC_ULI_PHY_REG_MASK) | + ((data << DC_ULI_PHY_DATA_SHIFT) & DC_ULI_PHY_DATA_MASK) | + DC_ULI_PHY_OP_WRITE); + DELAY(1); + return (0); + } + if (DC_IS_COMET(sc)) { switch (reg) { case MII_BMCR: @@ -1285,6 +1317,97 @@ dc_setfilt_asix(struct dc_softc *sc) } static void +dc_setfilt_uli(struct dc_softc *sc) +{ + uint8_t eaddr[ETHER_ADDR_LEN]; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + struct dc_desc *sframe; + uint32_t filter, *sp; + uint8_t *ma; + int i, mcnt; + + ifp = sc->dc_ifp; + + i = sc->dc_cdata.dc_tx_prod; + DC_INC(sc->dc_cdata.dc_tx_prod, DC_TX_LIST_CNT); + sc->dc_cdata.dc_tx_cnt++; + sframe = &sc->dc_ldata.dc_tx_list[i]; + sp = sc->dc_cdata.dc_sbuf; + bzero(sp, DC_SFRAME_LEN); + + sframe->dc_data = htole32(DC_ADDR_LO(sc->dc_saddr)); + sframe->dc_ctl = htole32(DC_SFRAME_LEN | DC_TXCTL_SETUP | + DC_TXCTL_TLINK | DC_FILTER_PERFECT | DC_TXCTL_FINT); + + sc->dc_cdata.dc_tx_chain[i] = (struct mbuf *)sc->dc_cdata.dc_sbuf; + + /* Set station address. */ + bcopy(IF_LLADDR(sc->dc_ifp), eaddr, ETHER_ADDR_LEN); + *sp++ = DC_SP_MAC(eaddr[1] << 8 | eaddr[0]); + *sp++ = DC_SP_MAC(eaddr[3] << 8 | eaddr[2]); + *sp++ = DC_SP_MAC(eaddr[5] << 8 | eaddr[4]); + + /* Set broadcast address. */ + *sp++ = DC_SP_MAC(0xFFFF); + *sp++ = DC_SP_MAC(0xFFFF); + *sp++ = DC_SP_MAC(0xFFFF); + + /* Extract current filter configuration. */ + filter = CSR_READ_4(sc, DC_NETCFG); + filter &= ~(DC_NETCFG_RX_PROMISC | DC_NETCFG_RX_ALLMULTI); + + /* Now build perfect filters. */ + mcnt = 0; + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt >= DC_ULI_FILTER_NPERF) { + filter |= DC_NETCFG_RX_ALLMULTI; + break; + } + ma = LLADDR((struct sockaddr_dl *)ifma->ifma_addr); + *sp++ = DC_SP_MAC(ma[1] << 8 | ma[0]); + *sp++ = DC_SP_MAC(ma[3] << 8 | ma[2]); + *sp++ = DC_SP_MAC(ma[5] << 8 | ma[4]); + mcnt++; + } + if_maddr_runlock(ifp); + + for (; mcnt < DC_ULI_FILTER_NPERF; mcnt++) { + *sp++ = DC_SP_MAC(0xFFFF); + *sp++ = DC_SP_MAC(0xFFFF); + *sp++ = DC_SP_MAC(0xFFFF); + } + + if (filter & (DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)) + CSR_WRITE_4(sc, DC_NETCFG, + filter & ~(DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)); + if (ifp->if_flags & IFF_PROMISC) + filter |= DC_NETCFG_RX_PROMISC | DC_NETCFG_RX_ALLMULTI; + if (ifp->if_flags & IFF_ALLMULTI) + filter |= DC_NETCFG_RX_ALLMULTI; + CSR_WRITE_4(sc, DC_NETCFG, + filter & ~(DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)); + if (filter & (DC_NETCFG_TX_ON | DC_NETCFG_RX_ON)) + CSR_WRITE_4(sc, DC_NETCFG, filter); + + sframe->dc_status = htole32(DC_TXSTAT_OWN); + bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD | + BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE); + CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF); + + /* + * Wait some time... + */ + DELAY(1000); + + sc->dc_wdog_timer = 5; +} + +static void dc_setfilt_xircom(struct dc_softc *sc) { uint16_t eaddr[(ETHER_ADDR_LEN+1)/2]; @@ -1372,6 +1495,9 @@ dc_setfilt(struct dc_softc *sc) if (DC_IS_ADMTEK(sc)) dc_setfilt_admtek(sc); + if (DC_IS_ULI(sc)) + dc_setfilt_uli(sc); + if (DC_IS_XIRCOM(sc)) dc_setfilt_xircom(sc); } @@ -1540,7 +1666,7 @@ dc_reset(struct dc_softc *sc) } if (DC_IS_ASIX(sc) || DC_IS_ADMTEK(sc) || DC_IS_CONEXANT(sc) || - DC_IS_XIRCOM(sc) || DC_IS_INTEL(sc)) { + DC_IS_XIRCOM(sc) || DC_IS_INTEL(sc) || DC_IS_ULI(sc)) { DELAY(10000); DC_CLRBIT(sc, DC_BUSCTL, DC_BUSCTL_RESET); i = 0; @@ -1752,7 +1878,7 @@ dc_read_srom(struct dc_softc *sc, int bi int size; size = DC_ROM_SIZE(bits); - sc->dc_srom = malloc(size, M_DEVBUF, M_NOWAIT); + sc->dc_srom = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); if (sc->dc_srom == NULL) { device_printf(sc->dc_dev, "Could not allocate SROM buffer\n"); return (ENOMEM); @@ -2046,7 +2172,8 @@ dc_attach(device_t dev) struct ifnet *ifp; struct dc_mediainfo *m; uint32_t reg, revision; - int error, mac_offset, phy, rid, tmp; + uint16_t *srom; + int error, mac_offset, n, phy, rid, tmp; uint8_t *mac; sc = device_get_softc(dev); @@ -2226,6 +2353,21 @@ dc_attach(device_t dev) if (error != 0) goto fail; break; + case DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5261): + case DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5263): + if (sc->dc_info->dc_devid == + DC_DEVID(DC_VENDORID_ULI, DC_DEVICEID_M5261)) + sc->dc_type = DC_TYPE_ULI_M5261; + else + sc->dc_type = DC_TYPE_ULI_M5263; + /* TX buffers should be aligned on 4 byte boundary. */ + sc->dc_flags |= DC_TX_INTR_ALWAYS | DC_TX_COALESCE | + DC_TX_ALIGN; + sc->dc_pmode = DC_PMODE_MII; + error = dc_read_srom(sc, sc->dc_romwidth); + if (error != 0) + goto fail; + break; default: device_printf(dev, "unknown device: %x\n", sc->dc_info->dc_devid); @@ -2323,6 +2465,33 @@ dc_attach(device_t dev) } bcopy(mac, eaddr, ETHER_ADDR_LEN); break; + case DC_TYPE_ULI_M5261: + case DC_TYPE_ULI_M5263: + srom = (uint16_t *)sc->dc_srom; + if (srom == NULL || *srom == 0xFFFF || *srom == 0) { + /* + * No valid SROM present, read station address + * from ID Table. + */ + device_printf(dev, + "Reading station address from ID Table.\n"); + CSR_WRITE_4(sc, DC_BUSCTL, 0x10000); + CSR_WRITE_4(sc, DC_SIARESET, 0x01C0); + CSR_WRITE_4(sc, DC_10BTCTRL, 0x0000); + CSR_WRITE_4(sc, DC_10BTCTRL, 0x0010); + CSR_WRITE_4(sc, DC_10BTCTRL, 0x0000); + CSR_WRITE_4(sc, DC_SIARESET, 0x0000); + CSR_WRITE_4(sc, DC_SIARESET, 0x01B0); + mac = (uint8_t *)eaddr; + for (n = 0; n < ETHER_ADDR_LEN; n++) + mac[n] = (uint8_t)CSR_READ_4(sc, DC_10BTCTRL); + CSR_WRITE_4(sc, DC_SIARESET, 0x0000); + CSR_WRITE_4(sc, DC_BUSCTL, 0x0000); + DELAY(10); + } else + dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, + 0); + break; default: dc_read_eeprom(sc, (caddr_t)&eaddr, DC_EE_NODEADDR, 3, 0); break; @@ -3599,7 +3768,7 @@ dc_init_locked(struct dc_softc *sc) /* * Set cache alignment and burst length. */ - if (DC_IS_ASIX(sc) || DC_IS_DAVICOM(sc)) + if (DC_IS_ASIX(sc) || DC_IS_DAVICOM(sc) || DC_IS_ULI(sc)) CSR_WRITE_4(sc, DC_BUSCTL, 0); else CSR_WRITE_4(sc, DC_BUSCTL, DC_BUSCTL_MRME | DC_BUSCTL_MRLE); @@ -3712,6 +3881,11 @@ dc_init_locked(struct dc_softc *sc) CSR_WRITE_4(sc, DC_IMR, DC_INTRS); CSR_WRITE_4(sc, DC_ISR, 0xFFFFFFFF); + /* Initialize TX jabber and RX watchdog timer. */ + if (DC_IS_ULI(sc)) + CSR_WRITE_4(sc, DC_WATCHDOG, DC_WDOG_JABBERCLK | + DC_WDOG_HOSTUNJAB); + /* Enable transmitter. */ DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON); Modified: head/sys/dev/dc/if_dcreg.h ============================================================================== --- head/sys/dev/dc/if_dcreg.h Mon Oct 24 20:41:31 2011 (r226700) +++ head/sys/dev/dc/if_dcreg.h Mon Oct 24 20:48:02 2011 (r226701) @@ -78,6 +78,8 @@ #define DC_TYPE_PNIC 0xA /* 82c168/82c169 PNIC I */ #define DC_TYPE_XIRCOM 0xB /* Xircom X3201 */ #define DC_TYPE_CONEXANT 0xC /* Conexant LANfinity RS7112 */ +#define DC_TYPE_ULI_M5261 0xD /* ALi/ULi M5261 */ +#define DC_TYPE_ULI_M5263 0xE /* ALi/ULi M5263 */ #define DC_IS_MACRONIX(x) \ (x->dc_type == DC_TYPE_98713 || \ @@ -88,6 +90,10 @@ (x->dc_type == DC_TYPE_AL981 || \ x->dc_type == DC_TYPE_AN983) +#define DC_IS_ULI(x) \ + (x->dc_type == DC_TYPE_ULI_M5261 || \ + x->dc_type == DC_TYPE_ULI_M5263) + #define DC_IS_INTEL(x) (x->dc_type == DC_TYPE_21143) #define DC_IS_ASIX(x) (x->dc_type == DC_TYPE_ASIX) #define DC_IS_COMET(x) (x->dc_type == DC_TYPE_AL981) @@ -725,6 +731,23 @@ struct dc_mii_frame { /* End of CONEXANT specific registers */ +/* + * ULi M5263 specific registers. + */ +#define DC_ULI_FILTER_NPERF 14 + +#define DC_ULI_PHY_DATA_MASK 0x0000FFFF +#define DC_ULI_PHY_REG_MASK 0x001F0000 +#define DC_ULI_PHY_ADDR_MASK 0x03E00000 +#define DC_ULI_PHY_OP_WRITE 0x04000000 +#define DC_ULI_PHY_OP_READ 0x08000000 +#define DC_ULI_PHY_OP_DONE 0x10000000 + +#define DC_ULI_PHY_DATA_SHIFT 0 +#define DC_ULI_PHY_REG_SHIFT 16 +#define DC_ULI_PHY_ADDR_SHIFT 21 + +/* End of ULi M5263 specific registers */ struct dc_softc { struct ifnet *dc_ifp; /* interface info */ @@ -1032,6 +1055,17 @@ struct dc_softc { #define DC_DEVICEID_PCMPC200_AB08 0xab08 #define DC_DEVICEID_PCMPC200_AB09 0xab09 +/* + * ULi vendor ID. + */ +#define DC_VENDORID_ULI 0x10b9 + +/* + * ULi device IDs. + */ +#define DC_DEVICEID_M5261 0x5261 +#define DC_DEVICEID_M5263 0x5263 + #define DC_DEVID(vendor, device) ((device) << 16 | (vendor)) /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 20:52:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8006106564A; Mon, 24 Oct 2011 20:52:41 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7C088FC1A; Mon, 24 Oct 2011 20:52:41 +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 p9OKqfaY062269; Mon, 24 Oct 2011 20:52:41 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OKqfwj062265; Mon, 24 Oct 2011 20:52:41 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201110242052.p9OKqfwj062265@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 24 Oct 2011 20:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226702 - in head: contrib/gcc gnu/usr.bin/cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 20:52:41 -0000 Author: obrien Date: Mon Oct 24 20:52:41 2011 New Revision: 226702 URL: http://svn.freebsd.org/changeset/base/226702 Log: * Don't give the impression that this compiler is GPLv3. (It is "well known" that GCC 4.2.2 is GPLv3.) * Don't give the impression that this compiler isn't "trustable". * Fix dependency nit. Modified: head/contrib/gcc/BASE-VER head/contrib/gcc/DEV-PHASE head/gnu/usr.bin/cc/Makefile.ver Modified: head/contrib/gcc/BASE-VER ============================================================================== --- head/contrib/gcc/BASE-VER Mon Oct 24 20:48:02 2011 (r226701) +++ head/contrib/gcc/BASE-VER Mon Oct 24 20:52:41 2011 (r226702) @@ -1 +1 @@ -4.2.2 +4.2.1 Modified: head/contrib/gcc/DEV-PHASE ============================================================================== --- head/contrib/gcc/DEV-PHASE Mon Oct 24 20:48:02 2011 (r226701) +++ head/contrib/gcc/DEV-PHASE Mon Oct 24 20:52:41 2011 (r226702) @@ -1 +1 @@ -prerelease +patched Modified: head/gnu/usr.bin/cc/Makefile.ver ============================================================================== --- head/gnu/usr.bin/cc/Makefile.ver Mon Oct 24 20:48:02 2011 (r226701) +++ head/gnu/usr.bin/cc/Makefile.ver Mon Oct 24 20:52:41 2011 (r226702) @@ -4,7 +4,7 @@ BASEVER!= cat ${GCCDIR}/BASE-VER DATESTAMP!= cat ${GCCDIR}/DATESTAMP DEVPHASE!= cat ${GCCDIR}/DEV-PHASE -version.o: version.c +version.o: version.c ${GCCDIR}/BASE-VER ${GCCDIR}/DATESTAMP ${GCCDIR}/DEV-PHASE ${CC} ${CFLAGS} -DBASEVER=\"${BASEVER}\" \ -DDATESTAMP=\"\ ${DATESTAMP}\" \ -DDEVPHASE=\"\ ${DEVPHASE}\" -c ${.IMPSRC} From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 20:57:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B066106566B; Mon, 24 Oct 2011 20:57:50 +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 5B40C8FC0C; Mon, 24 Oct 2011 20:57:50 +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 p9OKvocm062512; Mon, 24 Oct 2011 20:57:50 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OKvoGl062510; Mon, 24 Oct 2011 20:57:50 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110242057.p9OKvoGl062510@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 20:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226703 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 20:57:50 -0000 Author: yongari Date: Mon Oct 24 20:57:50 2011 New Revision: 226703 URL: http://svn.freebsd.org/changeset/base/226703 Log: Add ALi/ULi M5261/M5263 to supported hardware chipets. Modified: head/share/man/man4/dc.4 Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Mon Oct 24 20:52:41 2011 (r226702) +++ head/share/man/man4/dc.4 Mon Oct 24 20:57:50 2011 (r226703) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd October 24, 2011 .Dt DC 4 .Os .Sh NAME @@ -160,6 +160,8 @@ DEC/Intel 21143 ADMtek AL981 Comet, AN985 Centaur, ADM9511 Centaur II and ADM9513 Centaur II .It +ALi/ULi M5261 and M5263 +.It ASIX Electronics AX88140A and AX88141 .It Conexant LANfinity RS7112 (miniPCI) From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 21:01:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B94C1065705; Mon, 24 Oct 2011 21:01:20 +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 7BB848FC15; Mon, 24 Oct 2011 21:01:20 +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 p9OL1KUv062688; Mon, 24 Oct 2011 21:01:20 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OL1KVu062686; Mon, 24 Oct 2011 21:01:20 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110242101.p9OL1KVu062686@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 21:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226704 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:01:20 -0000 Author: yongari Date: Mon Oct 24 21:01:20 2011 New Revision: 226704 URL: http://svn.freebsd.org/changeset/base/226704 Log: All dc(4) controllers support VLAN over-sized frame. Xr vlan Modified: head/share/man/man4/dc.4 Modified: head/share/man/man4/dc.4 ============================================================================== --- head/share/man/man4/dc.4 Mon Oct 24 20:57:50 2011 (r226703) +++ head/share/man/man4/dc.4 Mon Oct 24 21:01:20 2011 (r226704) @@ -347,6 +347,7 @@ the card should be configured correctly. .Xr netintro 4 , .Xr ng_ether 4 , .Xr polling 4 , +.Xr vlan 4 , .Xr eeprom 8 , .Xr ifconfig 8 .Rs From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 21:14:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 456861065675; Mon, 24 Oct 2011 21:14:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 338688FC22; Mon, 24 Oct 2011 21:14:51 +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 p9OLEp9i063184; Mon, 24 Oct 2011 21:14:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OLEp4Q063177; Mon, 24 Oct 2011 21:14:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110242114.p9OLEp4Q063177@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 21:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226705 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:14:51 -0000 Author: pjd Date: Mon Oct 24 21:14:50 2011 New Revision: 226705 URL: http://svn.freebsd.org/changeset/base/226705 Log: Extend r226676 to allow rename without unmount even for file systems with non-legacy mountpoints. It is better to be able to rename such file systems and let them be mounted in old places until next reboot than using live CD, etc. to rename with remount. This is implemented by adding -u option to 'zfs rename'. If file system's mountpoint property is set to 'legacy' or 'none', there is no need to specify -u. Update zfs(8) manual page to reflect this addition. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Oct 24 21:14:50 2011 (r226705) @@ -76,6 +76,11 @@ zfs \- configures ZFS file systems .LP .nf +\fBzfs\fR \fBrename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR +.fi + +.LP +.nf \fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR][\fB-H\fR][\fB-o\fR \fIproperty\fR[,...]] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIproperty\fR] ... [\fB-S\fR \fIproperty\fR] ... [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ... .fi @@ -1479,6 +1484,10 @@ The snapshot that was cloned, and any sn .na \fB\fBzfs rename\fR [\fB-p\fR] \fIfilesystem\fR|\fIvolume\fR \fIfilesystem\fR|\fIvolume\fR\fR .ad +.br +.na +\fB\fBzfs rename\fR \fB-u\fR [\fB-p\fR] \fIfilesystem\fR \fIfilesystem\fR\fR +.ad .sp .6 .RS 4n Renames the given dataset. The new target can be located anywhere in the \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point. @@ -1493,6 +1502,17 @@ Renames the given dataset. The new targe Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the \fBmountpoint\fR property inherited from their parent. .RE +.sp +.ne 2 +.mk +.na +\fB\fB-u\fR\fR +.ad +.sp .6 +.RS 4n +Do not remount file systems during rename. If a file system's \fBmountpoint\fR property is set to \fBlegacy\fR or \fBnone\fR, file system is not unmounted even if this option is not given. +.RE + .RE .sp Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 24 21:14:50 2011 (r226705) @@ -253,7 +253,8 @@ get_usage(zfs_help_t idx) return (gettext("\trename " "\n" "\trename -p \n" - "\trename -r ")); + "\trename -r \n" + "\trename -u [-p] ")); case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: @@ -2851,6 +2852,7 @@ zfs_do_list(int argc, char **argv) * zfs rename * zfs rename -p * zfs rename -r + * zfs rename -u [-p] * * Renames the given dataset to another of the same type. * @@ -2861,19 +2863,21 @@ static int zfs_do_rename(int argc, char **argv) { zfs_handle_t *zhp; - int c; - int ret; - boolean_t recurse = B_FALSE; + renameflags_t flags = { 0 }; + int c, ret, types; boolean_t parents = B_FALSE; /* check options */ - while ((c = getopt(argc, argv, "pr")) != -1) { + while ((c = getopt(argc, argv, "pru")) != -1) { switch (c) { case 'p': parents = B_TRUE; break; case 'r': - recurse = B_TRUE; + flags.recurse = B_TRUE; + break; + case 'u': + flags.nounmount = B_TRUE; break; case '?': default: @@ -2902,20 +2906,32 @@ zfs_do_rename(int argc, char **argv) usage(B_FALSE); } - if (recurse && parents) { + if (flags.recurse && parents) { (void) fprintf(stderr, gettext("-p and -r options are mutually " "exclusive\n")); usage(B_FALSE); } - if (recurse && strchr(argv[0], '@') == 0) { + if (flags.recurse && strchr(argv[0], '@') == 0) { (void) fprintf(stderr, gettext("source dataset for recursive " "rename must be a snapshot\n")); usage(B_FALSE); } - if ((zhp = zfs_open(g_zfs, argv[0], parents ? ZFS_TYPE_FILESYSTEM | - ZFS_TYPE_VOLUME : ZFS_TYPE_DATASET)) == NULL) + if (flags.nounmount && parents) { + (void) fprintf(stderr, gettext("-u and -r options are mutually " + "exclusive\n")); + usage(B_FALSE); + } + + if (flags.nounmount) + types = ZFS_TYPE_FILESYSTEM; + else if (parents) + types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME; + else + types = ZFS_TYPE_DATASET; + + if ((zhp = zfs_open(g_zfs, argv[0], types)) == NULL) return (1); /* If we were asked and the name looks good, try to create ancestors. */ @@ -2925,7 +2941,7 @@ zfs_do_rename(int argc, char **argv) return (1); } - ret = (zfs_rename(zhp, argv[1], recurse) != 0); + ret = (zfs_rename(zhp, argv[1], flags) != 0); zfs_close(zhp); return (ret); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 24 21:14:50 2011 (r226705) @@ -518,7 +518,16 @@ extern int zfs_destroy_snaps(zfs_handle_ extern int zfs_clone(zfs_handle_t *, const char *, nvlist_t *); extern int zfs_snapshot(libzfs_handle_t *, const char *, boolean_t, nvlist_t *); extern int zfs_rollback(zfs_handle_t *, zfs_handle_t *, boolean_t); -extern int zfs_rename(zfs_handle_t *, const char *, boolean_t); + +typedef struct renameflags { + /* recursive rename */ + int recurse : 1; + + /* don't unmount file systems */ + int nounmount : 1; +} renameflags_t; + +extern int zfs_rename(zfs_handle_t *, const char *, renameflags_t flags); typedef struct sendflags { /* print informational messages (ie, -v was specified) */ Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:14:50 2011 (r226705) @@ -122,10 +122,8 @@ changelist_prefix(prop_changelist_t *clp */ switch (clp->cl_prop) { case ZFS_PROP_MOUNTPOINT: - if (clp->cl_waslegacy && - (clp->cl_gflags & CL_GATHER_KEEP_LEGACY)) { + if (clp->cl_gflags & CL_GATHER_DONT_UNMOUNT) break; - } if (zfs_unmount(cn->cn_handle, NULL, clp->cl_mflags) != 0) { ret = -1; @@ -172,8 +170,10 @@ changelist_postfix(prop_changelist_t *cl if ((cn = uu_list_last(clp->cl_list)) == NULL) return (0); - if (clp->cl_prop == ZFS_PROP_MOUNTPOINT) + if (clp->cl_prop == ZFS_PROP_MOUNTPOINT && + !(clp->cl_gflags & CL_GATHER_DONT_UNMOUNT)) { remove_mountpoint(cn->cn_handle); + } /* * It is possible that the changelist_prefix() used libshare @@ -228,7 +228,8 @@ changelist_postfix(prop_changelist_t *cl shareopts, sizeof (shareopts), NULL, NULL, 0, B_FALSE) == 0) && (strcmp(shareopts, "off") != 0)); - mounted = zfs_is_mounted(cn->cn_handle, NULL); + mounted = (clp->cl_gflags & CL_GATHER_DONT_UNMOUNT) || + zfs_is_mounted(cn->cn_handle, NULL); if (!mounted && (cn->cn_mounted || ((sharenfs || sharesmb || clp->cl_waslegacy) && Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 24 21:14:50 2011 (r226705) @@ -3480,7 +3480,7 @@ zfs_iter_dependents(zfs_handle_t *zhp, b * Renames the given dataset. */ int -zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive) +zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags) { int ret; zfs_cmd_t zc = { 0 }; @@ -3536,7 +3536,7 @@ zfs_rename(zfs_handle_t *zhp, const char if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE)) return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf)); } else { - if (recursive) { + if (flags.recurse) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "recursive rename must be a snapshot")); return (zfs_error(hdl, EZFS_BADTYPE, errbuf)); @@ -3577,7 +3577,20 @@ zfs_rename(zfs_handle_t *zhp, const char return (zfs_error(hdl, EZFS_ZONED, errbuf)); } - if (recursive) { + /* + * Avoid unmounting file systems with mountpoint property set to + * 'legacy' or 'none' even if -u option is not given. + */ + if (zhp->zfs_type == ZFS_TYPE_FILESYSTEM && + !flags.recurse && !flags.nounmount && + zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, property, + sizeof (property), NULL, NULL, 0, B_FALSE) == 0 && + (strcmp(property, "legacy") == 0 || + strcmp(property, "none") == 0)) { + flags.nounmount = B_TRUE; + } + + if (flags.recurse) { parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name); if (parentname == NULL) { @@ -3594,7 +3607,7 @@ zfs_rename(zfs_handle_t *zhp, const char } else { if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, - CL_GATHER_KEEP_LEGACY, 0)) == NULL) { + flags.nounmount ? CL_GATHER_DONT_UNMOUNT : 0, 0)) == NULL) { return (-1); } @@ -3618,13 +3631,9 @@ zfs_rename(zfs_handle_t *zhp, const char (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); (void) strlcpy(zc.zc_value, target, sizeof (zc.zc_value)); - zc.zc_cookie = recursive ? 1 : 0; - if (zfs_prop_get(zhp, ZFS_PROP_MOUNTPOINT, property, sizeof (property), - NULL, NULL, 0, B_FALSE) == 0 && - (strcmp(property, "legacy") == 0 || - strcmp(property, "none") == 0)) { + zc.zc_cookie = flags.recurse ? 1 : 0; + if (flags.nounmount) zc.zc_cookie |= 2; - } if ((ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_RENAME, &zc)) != 0) { /* @@ -3634,7 +3643,7 @@ zfs_rename(zfs_handle_t *zhp, const char (void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN, "cannot rename '%s'"), zc.zc_name); - if (recursive && errno == EEXIST) { + if (flags.recurse && errno == EEXIST) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "a child dataset already has a snapshot " "with the new name")); @@ -3647,10 +3656,10 @@ zfs_rename(zfs_handle_t *zhp, const char * On failure, we still want to remount any filesystems that * were previously mounted, so we don't alter the system state. */ - if (!recursive) + if (!flags.recurse) (void) changelist_postfix(cl); } else { - if (!recursive) { + if (!flags.recurse) { changelist_rename(cl, zfs_get_name(zhp), target); ret = changelist_postfix(cl); } Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:01:20 2011 (r226704) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:14:50 2011 (r226705) @@ -160,11 +160,9 @@ int zprop_expand_list(libzfs_handle_t *h */ #define CL_GATHER_MOUNT_ALWAYS 0x01 /* - * Use this changelist_gather() flag to prevent unmounting of legacy - * file systems. Useful when renaming legacy file systems, where there is - * no need to unmount them. + * Use this changelist_gather() flag to prevent unmounting of file systems. */ -#define CL_GATHER_KEEP_LEGACY 0x02 +#define CL_GATHER_DONT_UNMOUNT 0x02 typedef struct prop_changelist prop_changelist_t; From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 21:22:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77FFD106566B; Mon, 24 Oct 2011 21:22:55 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6720C8FC0C; Mon, 24 Oct 2011 21:22:55 +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 p9OLMtZt063510; Mon, 24 Oct 2011 21:22:55 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OLMtiX063504; Mon, 24 Oct 2011 21:22:55 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110242122.p9OLMtiX063504@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 21:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226706 - in head/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:22:55 -0000 Author: pjd Date: Mon Oct 24 21:22:55 2011 New Revision: 226706 URL: http://svn.freebsd.org/changeset/base/226706 Log: Update copyright to include myself. MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 24 21:14:50 2011 (r226705) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Mon Oct 24 21:22:55 2011 (r226706) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 24 21:14:50 2011 (r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Mon Oct 24 21:22:55 2011 (r226706) @@ -22,6 +22,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef _LIBZFS_H Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:14:50 2011 (r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c Mon Oct 24 21:22:55 2011 (r226706) @@ -24,6 +24,9 @@ * Use is subject to license terms. * * Portions Copyright 2007 Ramprakash Jelari + * + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 24 21:14:50 2011 (r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Mon Oct 24 21:22:55 2011 (r226706) @@ -23,6 +23,8 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:14:50 2011 (r226705) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h Mon Oct 24 21:22:55 2011 (r226706) @@ -21,6 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef _LIBFS_IMPL_H From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 21:31:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF65106566C; Mon, 24 Oct 2011 21:31:53 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8371F8FC14; Mon, 24 Oct 2011 21:31:53 +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 p9OLVrsS063855; Mon, 24 Oct 2011 21:31:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OLVrBb063846; Mon, 24 Oct 2011 21:31:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110242131.p9OLVrBb063846@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 24 Oct 2011 21:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226707 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:31:53 -0000 Author: pjd Date: Mon Oct 24 21:31:53 2011 New Revision: 226707 URL: http://svn.freebsd.org/changeset/base/226707 Log: - Use better naming now that we allow to rename any mounted file system (not only legacy). - Update copyright to include myself. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon Oct 24 21:31:53 2011 (r226707) @@ -21,6 +21,8 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -1248,7 +1250,7 @@ would_change(dsl_dir_t *dd, int64_t delt struct renamearg { dsl_dir_t *newparent; const char *mynewname; - boolean_t islegacy; + boolean_t allowmounted; }; static int @@ -1267,10 +1269,9 @@ dsl_dir_rename_check(void *arg1, void *a * stats), but any that are present in open context will likely * be gone by syncing context, so only fail from syncing * context. - * Don't check if we are renaming dataset with mountpoint set to - * "legacy" or "none". + * Don't check if we allow renaming of busy (mounted) dataset. */ - if (!ra->islegacy && dmu_tx_is_syncing(tx) && + if (!ra->allowmounted && dmu_tx_is_syncing(tx) && dmu_buf_refcount(dd->dd_dbuf) > 1) { return (EBUSY); } @@ -1310,7 +1311,7 @@ dsl_dir_rename_sync(void *arg1, void *ar objset_t *mos = dp->dp_meta_objset; int err; - ASSERT(ra->islegacy || dmu_buf_refcount(dd->dd_dbuf) <= 2); + ASSERT(ra->allowmounted || dmu_buf_refcount(dd->dd_dbuf) <= 2); if (ra->newparent != dd->dd_parent) { dsl_dir_diduse_space(dd->dd_parent, DD_USED_CHILD, @@ -1384,7 +1385,7 @@ dsl_dir_rename(dsl_dir_t *dd, const char goto out; } - ra.islegacy = !!(flags & ZFS_RENAME_IS_LEGACY); + ra.allowmounted = !!(flags & ZFS_RENAME_ALLOW_MOUNTED); err = dsl_sync_task_do(dd->dd_pool, dsl_dir_rename_check, dsl_dir_rename_sync, dd, &ra, 3); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef _SYS_DSL_DATASET_H @@ -181,8 +183,8 @@ struct dsl_ds_holdarg { /* * Flags for dsl_dataset_rename(). */ -#define ZFS_RENAME_RECURSIVE 0x01 -#define ZFS_RENAME_IS_LEGACY 0x02 +#define ZFS_RENAME_RECURSIVE 0x01 +#define ZFS_RENAME_ALLOW_MOUNTED 0x02 #define dsl_dataset_is_snapshot(ds) \ ((ds)->ds_phys->ds_num_children != 0) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef _SYS_DSL_DIR_H Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #ifndef _SYS_FS_ZFS_VFSOPS_H Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ #include @@ -3266,7 +3268,7 @@ zfs_ioc_rename(zfs_cmd_t *zc) if (zc->zc_cookie & 1) flags |= ZFS_RENAME_RECURSIVE; if (zc->zc_cookie & 2) - flags |= ZFS_RENAME_IS_LEGACY; + flags |= ZFS_RENAME_ALLOW_MOUNTED; zc->zc_value[sizeof (zc->zc_value) - 1] = '\0'; if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 24 21:22:55 2011 (r226706) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Mon Oct 24 21:31:53 2011 (r226707) @@ -20,6 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 Pawel Jakub Dawidek . + * All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 21:38:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F434106564A; Mon, 24 Oct 2011 21:38:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F1DE8FC08; Mon, 24 Oct 2011 21:38:25 +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 p9OLcPMK064114; Mon, 24 Oct 2011 21:38:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9OLcPqL064112; Mon, 24 Oct 2011 21:38:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201110242138.p9OLcPqL064112@svn.freebsd.org> From: Xin LI Date: Mon, 24 Oct 2011 21:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226708 - head/usr.sbin/pkg_install/info X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 21:38:25 -0000 Author: delphij Date: Mon Oct 24 21:38:25 2011 New Revision: 226708 URL: http://svn.freebsd.org/changeset/base/226708 Log: Staticify elide_root() for now to fix build. Modified: head/usr.sbin/pkg_install/info/show.c Modified: head/usr.sbin/pkg_install/info/show.c ============================================================================== --- head/usr.sbin/pkg_install/info/show.c Mon Oct 24 21:31:53 2011 (r226707) +++ head/usr.sbin/pkg_install/info/show.c Mon Oct 24 21:38:25 2011 (r226708) @@ -207,7 +207,7 @@ show_plist(const char *title, Package *p } } -const char * +static const char * elide_root(const char *dir) { if (strcmp(dir, "/") == 0) From owner-svn-src-all@FreeBSD.ORG Mon Oct 24 23:38:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC401065670; Mon, 24 Oct 2011 23:38: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 631C08FC0A; Mon, 24 Oct 2011 23:38: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 p9ONcBtb068343; Mon, 24 Oct 2011 23:38:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9ONcBFn068340; Mon, 24 Oct 2011 23:38:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110242338.p9ONcBFn068340@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 24 Oct 2011 23:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226709 - head/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 23:38:11 -0000 Author: yongari Date: Mon Oct 24 23:38:11 2011 New Revision: 226709 URL: http://svn.freebsd.org/changeset/base/226709 Log: This change makes it possible to define driver specific attach handler such that driver can announce interface capabilities and can do its own MII attach. Currently all USB ethernet controllers have no way to establish a link with pause capabilities. Lack of checksum offloading support also was one of reason to bring this change in. This change adds a couple of wrappers to USB ethernet drivers (uether_ifmedia_upd, uether_init and uether_start). All exported functions in uether has prefix uether_ so I think it's more consistent to have wrappers that follow the convention. This change preserves ABI/KPI so it should be safe to merge this change to stable/8. While I'm here add missing __FBSDID and clean up headers. Reviewed by: hselasky Modified: head/sys/dev/usb/net/usb_ethernet.c head/sys/dev/usb/net/usb_ethernet.h Modified: head/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.c Mon Oct 24 21:38:25 2011 (r226708) +++ head/sys/dev/usb/net/usb_ethernet.c Mon Oct 24 23:38:11 2011 (r226709) @@ -24,24 +24,32 @@ * SUCH DAMAGE. */ -#include -#include +#include +__FBSDID("$FreeBSD$"); + #include -#include -#include #include -#include #include -#include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -197,42 +205,53 @@ ue_attach_post_task(struct usb_proc_msg usb_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0); sysctl_ctx_init(&ue->ue_sysctl_ctx); + error = 0; ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); - goto error; + goto fail; } ifp->if_softc = ue; if_initname(ifp, "ue", ue->ue_unit); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - if (ue->ue_methods->ue_ioctl != NULL) - ifp->if_ioctl = ue->ue_methods->ue_ioctl; - else - ifp->if_ioctl = uether_ioctl; - ifp->if_start = ue_start; - ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; - IFQ_SET_READY(&ifp->if_snd); - ue->ue_ifp = ifp; - - if (ue->ue_methods->ue_mii_upd != NULL && - ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ - error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, - ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); - mtx_unlock(&Giant); - if (error) { - device_printf(ue->ue_dev, "attaching PHYs failed\n"); - goto error; + if (ue->ue_methods->ue_attach_post_sub != NULL) { + ue->ue_ifp = ifp; + error = ue->ue_methods->ue_attach_post_sub(ue); + } else { + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + if (ue->ue_methods->ue_ioctl != NULL) + ifp->if_ioctl = ue->ue_methods->ue_ioctl; + else + ifp->if_ioctl = uether_ioctl; + ifp->if_start = ue_start; + ifp->if_init = ue_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + ue->ue_ifp = ifp; + + if (ue->ue_methods->ue_mii_upd != NULL && + ue->ue_methods->ue_mii_sts != NULL) { + /* device_xxx() depends on this */ + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + mtx_unlock(&Giant); } } + if (error) { + device_printf(ue->ue_dev, "attaching PHYs failed\n"); + goto fail; + } + if_printf(ifp, " on %s\n", device_get_nameunit(ue->ue_dev)); ether_ifattach(ifp, ue->ue_eaddr); + /* Tell upper layer we support VLAN oversized frames. */ + if (ifp->if_capabilities & IFCAP_VLAN_MTU) + ifp->if_hdrlen = sizeof(struct ether_vlan_header); snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, @@ -246,7 +265,7 @@ ue_attach_post_task(struct usb_proc_msg UE_LOCK(ue); return; -error: +fail: free_unr(ueunit, ue->ue_unit); if (ue->ue_ifp != NULL) { if_free(ue->ue_ifp); @@ -307,6 +326,13 @@ uether_is_gone(struct usb_ether *ue) return (usb_proc_is_gone(&ue->ue_tq)); } +void +uether_init(void *arg) +{ + + ue_init(arg); +} + static void ue_init(void *arg) { @@ -352,6 +378,13 @@ ue_stop_task(struct usb_proc_msg *_task) ue->ue_methods->ue_stop(ue); } +void +uether_start(struct ifnet *ifp) +{ + + ue_start(ifp); +} + static void ue_start(struct ifnet *ifp) { @@ -385,6 +418,13 @@ ue_setmulti_task(struct usb_proc_msg *_t ue->ue_methods->ue_setmulti(ue); } +int +uether_ifmedia_upd(struct ifnet *ifp) +{ + + return (ue_ifmedia_upd(ifp)); +} + static int ue_ifmedia_upd(struct ifnet *ifp) { Modified: head/sys/dev/usb/net/usb_ethernet.h ============================================================================== --- head/sys/dev/usb/net/usb_ethernet.h Mon Oct 24 21:38:25 2011 (r226708) +++ head/sys/dev/usb/net/usb_ethernet.h Mon Oct 24 23:38:11 2011 (r226709) @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef _USB_ETHERNET_H_ @@ -66,7 +68,7 @@ struct usb_ether_methods { void (*ue_mii_sts)(struct ifnet *, struct ifmediareq *); int (*ue_ioctl)(struct ifnet *, u_long, caddr_t); - + int (*ue_attach_post_sub)(struct usb_ether *); }; struct usb_ether_cfg_task { @@ -110,6 +112,8 @@ struct mii_data *uether_getmii(struct us void *uether_getsc(struct usb_ether *); int uether_ifattach(struct usb_ether *); void uether_ifdetach(struct usb_ether *); +int uether_ifmedia_upd(struct ifnet *); +void uether_init(void *); int uether_ioctl(struct ifnet *, u_long, caddr_t); struct mbuf *uether_newbuf(void); int uether_rxmbuf(struct usb_ether *, struct mbuf *, @@ -119,4 +123,5 @@ int uether_rxbuf(struct usb_ether *, unsigned int, unsigned int); void uether_rxflush(struct usb_ether *); uint8_t uether_is_gone(struct usb_ether *); +void uether_start(struct ifnet *); #endif /* _USB_ETHERNET_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 00:34:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1698106564A; Tue, 25 Oct 2011 00:34:39 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B15AC8FC17; Tue, 25 Oct 2011 00:34:39 +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 p9P0YdmH070306; Tue, 25 Oct 2011 00:34:39 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P0YdCP070304; Tue, 25 Oct 2011 00:34:39 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110250034.p9P0YdCP070304@svn.freebsd.org> From: Qing Li Date: Tue, 25 Oct 2011 00:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226710 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 00:34:39 -0000 Author: qingli Date: Tue Oct 25 00:34:39 2011 New Revision: 226710 URL: http://svn.freebsd.org/changeset/base/226710 Log: The host-id/interface-id can have a specific value and is properly masked out when adding a prefix route through the "route" command. However, when deleting the route, simply changing the command keyword from "add" to "delete" does not work. The failoure is observed in both IPv4 and IPv6 route insertion. The patch makes the route command behavior consistent between the "add" and the "delete" operation. MFC after: 1 week Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Oct 24 23:38:11 2011 (r226709) +++ head/sys/net/route.c Tue Oct 25 00:34:39 2011 (r226710) @@ -1025,6 +1025,7 @@ rtrequest1_fib(int req, struct rt_addrin register struct radix_node_head *rnh; struct ifaddr *ifa; struct sockaddr *ndst; + struct sockaddr_storage mdst; #define senderr(x) { error = x ; goto bad; } KASSERT((fibnum < rt_numfibs), ("rtrequest1_fib: bad fibnum")); @@ -1051,6 +1052,10 @@ rtrequest1_fib(int req, struct rt_addrin switch (req) { case RTM_DELETE: + if (netmask) { + rt_maskedcopy(dst, (struct sockaddr *)&mdst, netmask); + dst = (struct sockaddr *)&mdst; + } #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { error = rn_mpath_update(req, info, rnh, ret_nrt); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 01:46:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3067E106564A; Tue, 25 Oct 2011 01:46:43 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06B188FC0C; Tue, 25 Oct 2011 01:46:43 +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 p9P1kgMN072596; Tue, 25 Oct 2011 01:46:42 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P1kgvL072593; Tue, 25 Oct 2011 01:46:42 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201110250146.p9P1kgvL072593@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 25 Oct 2011 01:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226711 - head/sbin/fsck X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 01:46:43 -0000 Author: sobomax Date: Tue Oct 25 01:46:42 2011 New Revision: 226711 URL: http://svn.freebsd.org/changeset/base/226711 Log: Add new option -c to specify alternatve location of the /etc/fstab file. MFC after: 1 month Modified: head/sbin/fsck/fsck.8 head/sbin/fsck/fsck.c Modified: head/sbin/fsck/fsck.8 ============================================================================== --- head/sbin/fsck/fsck.8 Tue Oct 25 00:34:39 2011 (r226710) +++ head/sbin/fsck/fsck.8 Tue Oct 25 01:46:42 2011 (r226711) @@ -41,6 +41,7 @@ .Op Fl B | F .Op Fl T Ar fstype : Ns Ar fsoptions .Op Fl t Ar fstype +.Op Fl c Ar fstab .Oo Ar special | node Oc ... .Sh DESCRIPTION The @@ -117,6 +118,10 @@ Check if the .Dq clean flag is set in the superblock and skip file system checks if file system was properly dismounted and marked clean. +.It Fl c Ar fstab +Specify the +.Pa fstab +file to use. .It Fl d Debugging mode. Just print the commands without executing them. Modified: head/sbin/fsck/fsck.c ============================================================================== --- head/sbin/fsck/fsck.c Tue Oct 25 00:34:39 2011 (r226710) +++ head/sbin/fsck/fsck.c Tue Oct 25 01:46:42 2011 (r226711) @@ -96,6 +96,7 @@ main(int argc, char *argv[]) int i, rval = 0; const char *vfstype = NULL; char globopt[3]; + const char *etc_fstab; globopt[0] = '-'; globopt[2] = '\0'; @@ -103,7 +104,8 @@ main(int argc, char *argv[]) TAILQ_INIT(&selhead); TAILQ_INIT(&opthead); - while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:")) != -1) + etc_fstab = NULL; + while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:c:")) != -1) switch (i) { case 'B': if (flags & CHECK_BACKGRD) @@ -160,6 +162,10 @@ main(int argc, char *argv[]) vfstype = optarg; break; + case 'c': + etc_fstab = optarg; + break; + case '?': default: usage(); @@ -169,6 +175,9 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if (etc_fstab != NULL) + setfstab(etc_fstab); + if (argc == 0) return checkfstab(flags, isok, checkfs); @@ -571,7 +580,7 @@ static void usage(void) { static const char common[] = - "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; + "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype] [-c fstab]"; (void)fprintf(stderr, "usage: %s %s [special | node] ...\n", getprogname(), common); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 01:47:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55273106566B; Tue, 25 Oct 2011 01:47:34 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6DA8FC15; Tue, 25 Oct 2011 01:47:34 +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 p9P1lYBf072660; Tue, 25 Oct 2011 01:47:34 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P1lYtK072657; Tue, 25 Oct 2011 01:47:34 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201110250147.p9P1lYtK072657@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 25 Oct 2011 01:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226712 - head/sbin/swapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 01:47:34 -0000 Author: sobomax Date: Tue Oct 25 01:47:33 2011 New Revision: 226712 URL: http://svn.freebsd.org/changeset/base/226712 Log: Add new option -F to specify alternative location of the /etc/fstab file. MFC after: 1 month Modified: head/sbin/swapon/swapon.8 head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.8 ============================================================================== --- head/sbin/swapon/swapon.8 Tue Oct 25 01:46:42 2011 (r226711) +++ head/sbin/swapon/swapon.8 Tue Oct 25 01:47:33 2011 (r226712) @@ -35,8 +35,14 @@ .Nm swapon , swapoff , swapctl .Nd "specify devices for paging and swapping" .Sh SYNOPSIS -.Nm swapon Fl aq | Ar -.Nm swapoff Fl aq | Ar +.Nm swapon +.Oo Fl F Ar fstab +.Oc +.Fl aq | Ar +.Nm swapoff +.Oo Fl F Ar fstab +.Oc +.Fl aq | Ar .Nm swapctl .Op Fl AghklmsU .Oo @@ -99,6 +105,18 @@ must move swapped pages out of the devic lead to high system loads for a period of time, depending on how much data has been swapped out to that device. .Pp +Other options supported by both +.Nm swapon +and +.Nm swapoff +are as follows: +.Bl -tag -width indent +.It Fl F Ar fstab +Specify the +.Pa fstab +file to use. +.El +.Pp The .Nm swapctl utility exists primarily for those familiar with other Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Tue Oct 25 01:46:42 2011 (r226711) +++ head/sbin/swapon/swapon.c Tue Oct 25 01:47:33 2011 (r226712) @@ -70,6 +70,7 @@ main(int argc, char **argv) int stat; int ch, doall; int sflag = 0, lflag = 0, hflag = 0, qflag = 0; + const char *etc_fstab; if ((ptr = strrchr(argv[0], '/')) == NULL) ptr = argv[0]; @@ -80,7 +81,8 @@ main(int argc, char **argv) orig_prog = which_prog; doall = 0; - while ((ch = getopt(argc, argv, "AadghklmqsU")) != -1) { + etc_fstab = NULL; + while ((ch = getopt(argc, argv, "AadghklmqsUF:")) != -1) { switch(ch) { case 'A': if (which_prog == SWAPCTL) { @@ -132,6 +134,9 @@ main(int argc, char **argv) usage(); } break; + case 'F': + etc_fstab = optarg; + break; case '?': default: usage(); @@ -140,6 +145,8 @@ main(int argc, char **argv) argv += optind; stat = 0; + if (etc_fstab != NULL) + setfstab(etc_fstab); if (which_prog == SWAPON || which_prog == SWAPOFF) { if (doall) { while ((fsp = getfsent()) != NULL) { @@ -210,7 +217,7 @@ usage(void) switch(orig_prog) { case SWAPON: case SWAPOFF: - fprintf(stderr, "-aq | file ...\n"); + fprintf(stderr, "[-F fstab] -aq | file ...\n"); break; case SWAPCTL: fprintf(stderr, "[-AghklmsU] [-a file ... | -d file ...]\n"); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 04:06:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C4D0106566B; Tue, 25 Oct 2011 04:06:30 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C4038FC0C; Tue, 25 Oct 2011 04:06:30 +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 p9P46UCd077847; Tue, 25 Oct 2011 04:06:30 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P46UEb077845; Tue, 25 Oct 2011 04:06:30 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <201110250406.p9P46UEb077845@svn.freebsd.org> From: Qing Li Date: Tue, 25 Oct 2011 04:06:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226713 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 04:06:30 -0000 Author: qingli Date: Tue Oct 25 04:06:29 2011 New Revision: 226713 URL: http://svn.freebsd.org/changeset/base/226713 Log: Exclude host routes when checking for prefix coverage on multiple interfaces. A host route has a NULL mask so check for that condition. I have also been told by developers who customize the packet output path with direct manipulation of the route entry (or the outgoing interface to be specific). This patch checks for the route mask explicitly to make sure custom code will not panic. PR: kern/161805 MFC after: 3 days Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Oct 25 01:47:33 2011 (r226712) +++ head/sys/netinet/in.c Tue Oct 25 04:06:29 2011 (r226713) @@ -1429,12 +1429,21 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ * on one interface and the corresponding outgoing packet leaves * another interface. */ - if (rt->rt_ifp != ifp) { + if (!(rt->rt_flags & RTF_HOST) && rt->rt_ifp != ifp) { const char *sa, *mask, *addr, *lim; int len; - sa = (const char *)rt_key(rt); mask = (const char *)rt_mask(rt); + /* + * Just being extra cautious to avoid some custom + * code getting into trouble. + */ + if (mask == NULL) { + RTFREE_LOCKED(rt); + return (EINVAL); + } + + sa = (const char *)rt_key(rt); addr = (const char *)l3addr; len = ((const struct sockaddr_in *)l3addr)->sin_len; lim = addr + len; From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 04:15:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC806106566B; Tue, 25 Oct 2011 04:15:45 +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 AC6348FC15; Tue, 25 Oct 2011 04:15:45 +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 p9P4Fj98078168; Tue, 25 Oct 2011 04:15:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P4Fjt2078166; Tue, 25 Oct 2011 04:15:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201110250415.p9P4Fjt2078166@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 25 Oct 2011 04:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226714 - head/usr.sbin/boot0cfg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 04:15:45 -0000 Author: ae Date: Tue Oct 25 04:15:45 2011 New Revision: 226714 URL: http://svn.freebsd.org/changeset/base/226714 Log: Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART' control interface. MFC after: 3 days Modified: head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Tue Oct 25 04:06:29 2011 (r226713) +++ head/usr.sbin/boot0cfg/boot0cfg.c Tue Oct 25 04:15:45 2011 (r226714) @@ -378,7 +378,7 @@ write_mbr(const char *fname, int flags, } grq = gctl_get_handle(); gctl_ro_param(grq, "class", -1, "PART"); - gctl_ro_param(grq, "geom", -1, pname); + gctl_ro_param(grq, "arg0", -1, pname); gctl_ro_param(grq, "verb", -1, "bootcode"); gctl_ro_param(grq, "bootcode", mbr_size, mbr); gctl_ro_param(grq, "flags", -1, "C"); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:10:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 263E11065679; Tue, 25 Oct 2011 07:10:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id D2A4A8FC14; Tue, 25 Oct 2011 07:10:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:b856:9cc9:6f07:5d55] (unknown [IPv6:2001:7b8:3a7:0:b856:9cc9:6f07:5d55]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 92AB55C37; Tue, 25 Oct 2011 09:10:01 +0200 (CEST) Message-ID: <4EA660C6.1020200@FreeBSD.org> Date: Tue, 25 Oct 2011 09:09:58 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111019 Thunderbird/8.0 MIME-Version: 1.0 To: "David E. O'Brien" References: <201110242052.p9OKqfwj062265@svn.freebsd.org> In-Reply-To: <201110242052.p9OKqfwj062265@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226702 - in head: contrib/gcc gnu/usr.bin/cc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:10:03 -0000 On 2011-10-24 22:52, David E. O'Brien wrote: > Author: obrien > Date: Mon Oct 24 20:52:41 2011 > New Revision: 226702 > URL: http://svn.freebsd.org/changeset/base/226702 > > Log: > * Don't give the impression that this compiler is GPLv3. > (It is "well known" that GCC 4.2.2 is GPLv3.) > * Don't give the impression that this compiler isn't "trustable". Hmm, this might be nice to have in 9.0R... :) From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:24:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 418D6106566B; Tue, 25 Oct 2011 07:24:52 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3150A8FC12; Tue, 25 Oct 2011 07:24:52 +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 p9P7Oq6j083992; Tue, 25 Oct 2011 07:24:52 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7OqkW083990; Tue, 25 Oct 2011 07:24:52 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250724.p9P7OqkW083990@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226715 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:24:52 -0000 Author: pjd Date: Tue Oct 25 07:24:51 2011 New Revision: 226715 URL: http://svn.freebsd.org/changeset/base/226715 Log: Sort includes. MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 04:15:45 2011 (r226714) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:24:51 2011 (r226715) @@ -27,27 +27,27 @@ #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include +#include #include -#include -#include -#include #include #include -#include -#include -#include -#include +#include -#include -#include -#include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:31:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A9C106566B; Tue, 25 Oct 2011 07:31:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3C1E8FC0C; Tue, 25 Oct 2011 07:31:13 +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 p9P7VD6D084222; Tue, 25 Oct 2011 07:31:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7VDQi084220; Tue, 25 Oct 2011 07:31:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250731.p9P7VDQi084220@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226716 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:31:13 -0000 Author: pjd Date: Tue Oct 25 07:31:13 2011 New Revision: 226716 URL: http://svn.freebsd.org/changeset/base/226716 Log: Simplify eli_backup_create() and eli_backup_restore() functions. As a side-effect it is now possible to backup unsupported (newer) GELI metadata versions. MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:24:51 2011 (r226715) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:31:13 2011 (r226716) @@ -1295,66 +1295,53 @@ eli_kill(struct gctl_req *req) static int eli_backup_create(struct gctl_req *req, const char *prov, const char *file) { - struct g_eli_metadata md; unsigned char *sector; ssize_t secsize; - off_t mediasize; - int filefd, provfd, ret; + int error, filefd, ret; ret = -1; - provfd = filefd = -1; + filefd = -1; sector = NULL; secsize = 0; - provfd = g_open(prov, 0); - if (provfd == -1) { - gctl_error(req, "Cannot open %s: %s.", prov, strerror(errno)); - goto out; - } - filefd = open(file, O_WRONLY | O_TRUNC | O_CREAT, 0600); - if (filefd == -1) { - gctl_error(req, "Cannot open %s: %s.", file, strerror(errno)); - goto out; - } - - mediasize = g_mediasize(provfd); - secsize = g_sectorsize(provfd); - if (mediasize == -1 || secsize == -1) { + secsize = g_get_sectorsize(prov); + if (secsize == 0) { gctl_error(req, "Cannot get informations about %s: %s.", prov, strerror(errno)); goto out; } - sector = malloc(secsize); if (sector == NULL) { gctl_error(req, "Cannot allocate memory."); goto out; } - /* Read metadata from the provider. */ - if (pread(provfd, sector, secsize, mediasize - secsize) != secsize) { - gctl_error(req, "Cannot read metadata: %s.", strerror(errno)); + error = g_metadata_read(prov, sector, secsize, G_ELI_MAGIC); + if (error != 0) { + gctl_error(req, "Unable to read metadata from %s: %s.", prov, + strerror(error)); goto out; } - /* Check if this is geli provider. */ - if (eli_metadata_decode(sector, &md) != 0) { - gctl_error(req, "MD5 hash mismatch: not a geli provider?"); + + filefd = open(file, O_WRONLY | O_TRUNC | O_CREAT, 0600); + if (filefd == -1) { + gctl_error(req, "Unable to open %s: %s.", file, + strerror(errno)); goto out; } /* Write metadata to the destination file. */ if (write(filefd, sector, secsize) != secsize) { - gctl_error(req, "Cannot write to %s: %s.", file, + gctl_error(req, "Unable to write to %s: %s.", file, strerror(errno)); + (void)close(filefd); + (void)unlink(file); goto out; } (void)fsync(filefd); + (void)close(filefd); /* Success. */ ret = 0; out: - if (provfd >= 0) - (void)g_close(provfd); - if (filefd >= 0) - (void)close(filefd); if (sector != NULL) { bzero(sector, secsize); free(sector); @@ -1384,10 +1371,8 @@ eli_restore(struct gctl_req *req) { struct g_eli_metadata md; const char *file, *prov; - unsigned char *sector; - ssize_t secsize; off_t mediasize; - int nargs, filefd, provfd; + int nargs; nargs = gctl_get_int(req, "nargs"); if (nargs != 2) { @@ -1397,72 +1382,28 @@ eli_restore(struct gctl_req *req) file = gctl_get_ascii(req, "arg0"); prov = gctl_get_ascii(req, "arg1"); - provfd = filefd = -1; - sector = NULL; - secsize = 0; - - filefd = open(file, O_RDONLY); - if (filefd == -1) { - gctl_error(req, "Cannot open %s: %s.", file, strerror(errno)); - goto out; - } - provfd = g_open(prov, 1); - if (provfd == -1) { - gctl_error(req, "Cannot open %s: %s.", prov, strerror(errno)); - goto out; - } - - mediasize = g_mediasize(provfd); - secsize = g_sectorsize(provfd); - if (mediasize == -1 || secsize == -1) { - gctl_error(req, "Cannot get informations about %s: %s.", prov, - strerror(errno)); - goto out; - } - - sector = malloc(secsize); - if (sector == NULL) { - gctl_error(req, "Cannot allocate memory."); - goto out; - } - /* Read metadata from the backup file. */ - if (read(filefd, sector, secsize) != secsize) { - gctl_error(req, "Cannot read from %s: %s.", file, + if (eli_metadata_read(req, file, &md) == -1) + return; + /* Obtain provider's mediasize. */ + mediasize = g_get_mediasize(prov); + if (mediasize == 0) { + gctl_error(req, "Cannot get informations about %s: %s.", prov, strerror(errno)); - goto out; - } - /* Check if this file contains geli metadata. */ - if (eli_metadata_decode(sector, &md) != 0) { - gctl_error(req, "MD5 hash mismatch: not a geli backup file?"); - goto out; + return; } /* Check if the provider size has changed since we did the backup. */ if (md.md_provsize != (uint64_t)mediasize) { if (gctl_get_int(req, "force")) { md.md_provsize = mediasize; - eli_metadata_encode(&md, sector); } else { gctl_error(req, "Provider size mismatch: " "wrong backup file?"); - goto out; + return; } } - /* Write metadata from the provider. */ - if (pwrite(provfd, sector, secsize, mediasize - secsize) != secsize) { - gctl_error(req, "Cannot write metadata: %s.", strerror(errno)); - goto out; - } - (void)g_flush(provfd); -out: - if (provfd >= 0) - (void)g_close(provfd); - if (filefd >= 0) - (void)close(filefd); - if (sector != NULL) { - bzero(sector, secsize); - free(sector); - } + /* Write metadata to the provider. */ + (void)eli_metadata_store(req, prov, &md); } static void From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:32:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68E9D1065674; Tue, 25 Oct 2011 07:32:43 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58E218FC16; Tue, 25 Oct 2011 07:32:43 +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 p9P7Wh1B084299; Tue, 25 Oct 2011 07:32:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7Whjo084297; Tue, 25 Oct 2011 07:32:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250732.p9P7Whjo084297@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226717 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:32:43 -0000 Author: pjd Date: Tue Oct 25 07:32:43 2011 New Revision: 226717 URL: http://svn.freebsd.org/changeset/base/226717 Log: Simplify eli_is_attached() function and make it return boot instead of int. MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:31:13 2011 (r226716) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:32:43 2011 (r226717) @@ -333,11 +333,10 @@ arc4rand(unsigned char *buf, size_t size buf[i] = arc4random() % 0xff; } -static int +static bool eli_is_attached(const char *prov) { char name[MAXPATHLEN]; - unsigned secsize; /* * Not the best way to do it, but the easiest. @@ -345,10 +344,7 @@ eli_is_attached(const char *prov) * by asking about its sectorsize. */ snprintf(name, sizeof(name), "%s%s", prov, G_ELI_SUFFIX); - secsize = g_get_sectorsize(name); - if (secsize > 0) - return (1); - return (0); + return (g_get_sectorsize(name) > 0); } static int From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:34:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 095501065679; Tue, 25 Oct 2011 07:34:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDAE68FC17; Tue, 25 Oct 2011 07:34:35 +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 p9P7YZ9N084408; Tue, 25 Oct 2011 07:34:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7YZlV084406; Tue, 25 Oct 2011 07:34:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250734.p9P7YZlV084406@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226718 - head/sbin/geom/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:34:36 -0000 Author: pjd Date: Tue Oct 25 07:34:35 2011 New Revision: 226718 URL: http://svn.freebsd.org/changeset/base/226718 Log: If 'req' is NULL, print error on stderr. MFC after: 3 days Modified: head/sbin/geom/misc/subr.c Modified: head/sbin/geom/misc/subr.c ============================================================================== --- head/sbin/geom/misc/subr.c Tue Oct 25 07:32:43 2011 (r226717) +++ head/sbin/geom/misc/subr.c Tue Oct 25 07:34:35 2011 (r226718) @@ -379,10 +379,15 @@ gctl_error(struct gctl_req *req, const c { va_list ap; - if (req->error != NULL) + if (req != NULL && req->error != NULL) return; va_start(ap, error); - vasprintf(&req->error, error, ap); + if (req != NULL) { + vasprintf(&req->error, error, ap); + } else { + vfprintf(stderr, error, ap); + fprintf(stderr, "\n"); + } va_end(ap); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:37:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 436B81065673; Tue, 25 Oct 2011 07:37:03 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 329A78FC0A; Tue, 25 Oct 2011 07:37:03 +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 p9P7b3fw084521; Tue, 25 Oct 2011 07:37:03 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7b3OY084519; Tue, 25 Oct 2011 07:37:03 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250737.p9P7b3OY084519@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226719 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:37:03 -0000 Author: pjd Date: Tue Oct 25 07:37:02 2011 New Revision: 226719 URL: http://svn.freebsd.org/changeset/base/226719 Log: Simplify eli_dump() function and allow to dump metadata stored in backup file. MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:34:35 2011 (r226718) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:37:02 2011 (r226719) @@ -1528,9 +1528,9 @@ eli_clear(struct gctl_req *req) static void eli_dump(struct gctl_req *req) { - struct g_eli_metadata md, tmpmd; + struct g_eli_metadata md; const char *name; - int error, i, nargs; + int i, nargs; nargs = gctl_get_int(req, "nargs"); if (nargs < 1) { @@ -1540,17 +1540,7 @@ eli_dump(struct gctl_req *req) for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); - error = g_metadata_read(name, (unsigned char *)&tmpmd, - sizeof(tmpmd), G_ELI_MAGIC); - if (error != 0) { - fprintf(stderr, "Cannot read metadata from %s: %s.\n", - name, strerror(error)); - gctl_error(req, "Not fully done."); - continue; - } - if (eli_metadata_decode((unsigned char *)&tmpmd, &md) != 0) { - fprintf(stderr, "MD5 hash mismatch for %s, skipping.\n", - name); + if (eli_metadata_read(NULL, name, &md) == -1) { gctl_error(req, "Not fully done."); continue; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:44:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6FD106566B; Tue, 25 Oct 2011 07:44:10 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE4618FC16; Tue, 25 Oct 2011 07:44:10 +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 p9P7iAgW084772; Tue, 25 Oct 2011 07:44:10 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7iAN9084770; Tue, 25 Oct 2011 07:44:10 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250744.p9P7iAN9084770@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226720 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:44:10 -0000 Author: pjd Date: Tue Oct 25 07:44:10 2011 New Revision: 226720 URL: http://svn.freebsd.org/changeset/base/226720 Log: Simplify eli_resize() function. MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:37:02 2011 (r226719) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:44:10 2011 (r226720) @@ -1480,18 +1480,12 @@ eli_resize(struct gctl_req *req) * it back to the correct place on the provider. */ md.md_provsize = mediasize; - eli_metadata_encode(&md, sector); - if (pwrite(provfd, sector, secsize, mediasize - secsize) != secsize) { - gctl_error(req, "Cannot write metadata: %s.", strerror(errno)); - goto out; - } - (void)g_flush(provfd); - + /* Write metadata to the provider. */ + (void)eli_metadata_store(req, prov, &md); /* Now trash the old metadata. */ - if (eli_trash_metadata(req, prov, provfd, oldsize - secsize) == -1) - goto out; + (void)eli_trash_metadata(req, prov, provfd, oldsize - secsize); out: - if (provfd >= 0) + if (provfd != -1) (void)g_close(provfd); if (sector != NULL) { bzero(sector, secsize); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:48:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A85F31065673; Tue, 25 Oct 2011 07:48:53 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 982948FC15; Tue, 25 Oct 2011 07:48:53 +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 p9P7mrOl084960; Tue, 25 Oct 2011 07:48:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7mrHX084958; Tue, 25 Oct 2011 07:48:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250748.p9P7mrHX084958@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226721 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:48:53 -0000 Author: pjd Date: Tue Oct 25 07:48:53 2011 New Revision: 226721 URL: http://svn.freebsd.org/changeset/base/226721 Log: When metadata is at newer version than the highest supported, return EOPNOTSUPP when decoding. MFC after: 3 days Modified: head/sys/geom/eli/g_eli.h Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Tue Oct 25 07:44:10 2011 (r226720) +++ head/sys/geom/eli/g_eli.h Tue Oct 25 07:48:53 2011 (r226721) @@ -308,7 +308,7 @@ eli_metadata_decode(const u_char *data, error = eli_metadata_decode_v1v2v3v4v5v6(data, md); break; default: - error = EINVAL; + error = EOPNOTSUPP; break; } return (error); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 07:56:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A9D81065677; Tue, 25 Oct 2011 07:56:28 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 00D418FC08; Tue, 25 Oct 2011 07:56:28 +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 p9P7uRdR085229; Tue, 25 Oct 2011 07:56:27 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P7uRFY085227; Tue, 25 Oct 2011 07:56:27 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250756.p9P7uRFY085227@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 07:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226722 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:56:28 -0000 Author: pjd Date: Tue Oct 25 07:56:27 2011 New Revision: 226722 URL: http://svn.freebsd.org/changeset/base/226722 Log: When we detect GELI metadata version that is newer than the highest we support, inform the user about that instead of 'MD5 hash mismatch'. Suggested by: Garrett Cooper MFC after: 3 days Modified: head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:48:53 2011 (r226721) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:56:27 2011 (r226722) @@ -594,8 +594,23 @@ eli_metadata_read(struct gctl_req *req, return (-1); } } - if (eli_metadata_decode(sector, md) != 0) { - gctl_error(req, "MD5 hash mismatch for %s.", prov); + error = eli_metadata_decode(sector, md); + switch (error) { + case 0: + break; + case EOPNOTSUPP: + gctl_error(req, + "Provider's %s metadata version %u is too new.\n" + "geli: The highest supported version is %u.", + prov, (unsigned int)md->md_version, G_ELI_VERSION); + return (-1); + case EINVAL: + gctl_error(req, "Inconsistent provider's %s metadata.", prov); + return (-1); + default: + gctl_error(req, + "Unexpected error while decoding provider's %s metadata: %s.", + prov, strerror(error)); return (-1); } return (0); @@ -1410,7 +1425,7 @@ eli_resize(struct gctl_req *req) unsigned char *sector; ssize_t secsize; off_t mediasize, oldsize; - int nargs, provfd; + int error, nargs, provfd; nargs = gctl_get_int(req, "nargs"); if (nargs != 1) { @@ -1461,8 +1476,23 @@ eli_resize(struct gctl_req *req) } /* Check if this sector contains geli metadata. */ - if (eli_metadata_decode(sector, &md) != 0) { - gctl_error(req, "MD5 hash mismatch: no metadata for oldsize."); + error = eli_metadata_decode(sector, &md); + switch (error) { + case 0: + break; + case EOPNOTSUPP: + gctl_error(req, + "Provider's %s metadata version %u is too new.\n" + "geli: The highest supported version is %u.", + prov, (unsigned int)md.md_version, G_ELI_VERSION); + goto out; + case EINVAL: + gctl_error(req, "Inconsistent provider's %s metadata.", prov); + goto out; + default: + gctl_error(req, + "Unexpected error while decoding provider's %s metadata: %s.", + prov, strerror(error)); goto out; } From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 08:03:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9FB8106566C; Tue, 25 Oct 2011 08:03:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF43F8FC13; Tue, 25 Oct 2011 08:03:51 +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 p9P83pIx085507; Tue, 25 Oct 2011 08:03:51 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P83puw085504; Tue, 25 Oct 2011 08:03:51 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110250803.p9P83puw085504@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 08:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226723 - head/sbin/geom/class/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 08:03:52 -0000 Author: pjd Date: Tue Oct 25 08:03:51 2011 New Revision: 226723 URL: http://svn.freebsd.org/changeset/base/226723 Log: Add 'geli version' subcommand, which will print GELI metadata version of each given GEOM provider or if not providers are given it will print versions supported by userland geli(8) utility and by ELI GEOM class. MFC after: 3 days Modified: head/sbin/geom/class/eli/geli.8 head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Tue Oct 25 07:56:27 2011 (r226722) +++ head/sbin/geom/class/eli/geli.8 Tue Oct 25 08:03:51 2011 (r226723) @@ -134,6 +134,9 @@ utility: .Fl s Ar oldsize .Ar prov .Nm +.Cm version +.Op Ar prov ... +.Nm .Cm clear .Op Fl v .Ar prov ... @@ -597,6 +600,18 @@ Additional options include: .It Fl s Ar oldsize The size of the provider before it was resized. .El +.It Cm version +If no arguments are given, the +.Cm version +subcommand will print the version of +.Nm +userland utility as well as the version of the +.Nm ELI +GEOM class. +.Pp +If GEOM providers are specified, the +.Cm version +subcommand will print metadata version used by each of them. .It Cm clear Clear metadata from the given providers. .It Cm dump Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 07:56:27 2011 (r226722) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 08:03:51 2011 (r226723) @@ -72,6 +72,7 @@ static void eli_kill(struct gctl_req *re static void eli_backup(struct gctl_req *req); static void eli_restore(struct gctl_req *req); static void eli_resize(struct gctl_req *req); +static void eli_version(struct gctl_req *req); static void eli_clear(struct gctl_req *req); static void eli_dump(struct gctl_req *req); @@ -96,6 +97,7 @@ static int eli_backup_create(struct gctl * backup [-v] prov file * restore [-fv] file prov * resize [-v] -s oldsize prov + * version [prov ...] * clear [-v] prov ... * dump [-v] prov ... */ @@ -241,6 +243,9 @@ struct g_command class_commands[] = { }, "[-v] -s oldsize prov" }, + { "version", G_FLAG_LOADKLD, eli_main, G_NULL_OPTS, + "[prov ...]" + }, { "clear", G_FLAG_VERBOSE, eli_main, G_NULL_OPTS, "[-v] prov ..." }, @@ -309,6 +314,8 @@ eli_main(struct gctl_req *req, unsigned eli_restore(req); else if (strcmp(name, "resize") == 0) eli_resize(req); + else if (strcmp(name, "version") == 0) + eli_version(req); else if (strcmp(name, "dump") == 0) eli_dump(req); else if (strcmp(name, "clear") == 0) @@ -1524,6 +1531,46 @@ out: } static void +eli_version(struct gctl_req *req) +{ + struct g_eli_metadata md; + const char *name; + unsigned int version; + int error, i, nargs; + + nargs = gctl_get_int(req, "nargs"); + + if (nargs == 0) { + unsigned int kernver; + ssize_t size; + + size = sizeof(kernver); + if (sysctlbyname("kern.geom.eli.version", &kernver, &size, + NULL, 0) == -1) { + warn("Unable to obtain GELI kernel version"); + } else { + printf("kernel: %u\n", kernver); + } + printf("userland: %u\n", G_ELI_VERSION); + return; + } + + for (i = 0; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + error = g_metadata_read(name, (unsigned char *)&md, + sizeof(md), G_ELI_MAGIC); + if (error != 0) { + warn("%s: Unable to read metadata: %s.", name, + strerror(error)); + gctl_error(req, "Not fully done."); + continue; + } + version = le32dec(&md.md_version); + printf("%s: %u\n", name, version); + } +} + +static void eli_clear(struct gctl_req *req) { const char *name; From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 08:35:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AB7A106566B; Tue, 25 Oct 2011 08:35:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE1398FC13; Tue, 25 Oct 2011 08:35:30 +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 p9P8ZUZe086665; Tue, 25 Oct 2011 08:35:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9P8ZUG3086659; Tue, 25 Oct 2011 08:35:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110250835.p9P8ZUG3086659@svn.freebsd.org> From: Martin Matuska Date: Tue, 25 Oct 2011 08:35:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226724 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 08:35:31 -0000 Author: mm Date: Tue Oct 25 08:35:30 2011 New Revision: 226724 URL: http://svn.freebsd.org/changeset/base/226724 Log: Update copyright information in several ZFS files, as the clause 3.3 of the CDDL licence explicitly requires every Contributor to add a copyright notice. This also reflects the copyright notices for the changes recently added by Illumos. MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Tue Oct 25 08:03:51 2011 (r226723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c Tue Oct 25 08:35:30 2011 (r226724) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Portions Copyright 2011 iXsystems, Inc */ #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue Oct 25 08:03:51 2011 (r226723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Tue Oct 25 08:35:30 2011 (r226724) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Portions Copyright 2011 Martin Matuska */ #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Oct 25 08:03:51 2011 (r226723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Oct 25 08:35:30 2011 (r226724) @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011 Pawel Jakub Dawidek . * All rights reserved. + * Portions Copyright 2011 Martin Matuska */ #include Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 25 08:03:51 2011 (r226723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 25 08:35:30 2011 (r226724) @@ -23,6 +23,7 @@ */ /* Portions Copyright 2007 Jeremy Teo */ +/* Portions Copyright 2011 Martin Matuska Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Oct 25 08:03:51 2011 (r226723) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Tue Oct 25 08:35:30 2011 (r226724) @@ -26,6 +26,7 @@ */ /* Portions Copyright 2010 Robert Milkowski */ +/* Portions Copyright 2011 Martin Matuska */ /* * ZFS volume emulation driver. From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 09:07:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 905B2106564A; Tue, 25 Oct 2011 09:07:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 2C99E8FC15; Tue, 25 Oct 2011 09:07:39 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p9P97Wir013651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Oct 2011 20:07:37 +1100 Date: Tue, 25 Oct 2011 20:07:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201110241835.p9OIZGMg057013@svn.freebsd.org> Message-ID: <20111025190233.P9463@besplex.bde.org> References: <201110241835.p9OIZGMg057013@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226698 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 09:07:40 -0000 On Mon, 24 Oct 2011, Dimitry Andric wrote: > Log: > Put in a temporary band-aid to fix kernel builds when CC=clang, after > r226665. Hrmph. It is still quite broken for clang. > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Mon Oct 24 18:29:50 2011 (r226697) > +++ head/sys/conf/kern.mk Mon Oct 24 18:35:16 2011 (r226698) > @@ -7,7 +7,7 @@ FREEBSD_GCC!= ${CC} --version | grep Fre > # > # Warning flags for compiling the kernel and components of the kernel: > # > -.if ${FREEBSD_GCC} > +.if defined(FREEBSD_GCC) && ${FREEBSD_GCC} > # FreeBSD extensions, not available in upstream GCC > format_extensions= -fformat-extensions > no_align_long_strings= -mno-align-long-strings For clang, FREEBSD_GCC is not defined. Thus -fformat-extensions is null for clang, and all files using FreeBSD format extensions fail to compile. A critical example of such a file is if_ethersubr.o. This file uses %6D, so it now correctly fails to compile. clang emits disgustingly verbose diagnostics about all 4 instances of %6D and then exits with nonzero status. Quick fix: change the ifdef to: .if !defined(FREEBSD_GCC) || ${FREEBSD_GCC} With this fix, if_ethersubr.o now incorrectly compiles. The bug is now: % clang: warning: argument unused during compilation: '-frename-registers' kern.pre.mk adds -frename-registers unconditionally on amd64. clang doesn't support this, but doesn't even fail. It emits the above error message and exits with status 0. This error message is not disgustingly verbose, but it occurs for almost every object file. Before finding if_ethersubr.o, clang seemed to be not noticing any -fformat-extensions bugs, but that was because I stopped the compile after a few -frename-registers bugs. I first tested handling of -fformat-extensions separately: % z.c: % #include % % int % main() % { % printf("%r\n", 1); % return (0); % } This showed the following bugs: cc -c z.c: works correctly (no warning) clang -c z.c: gives bogus warnings and broken color escape sequences in the warnings when the output file is "typescript" created by script(1) cc -c z.c -Wformat: works correctly (warning) clang -c z.c -Wformat: works correctly (warning) cc -c z.c -Wformat -fformat-extensions: works correctly (no warning) clang -c z.c -Wformat -fformat-extensions: works correctly (no warning) cc -c z.c -Wformat -fformat-extensions -std=c99: works correctly (no warning) clang -c z.c -Wformat -fformat-extensions -std=c99: works correctly (no warning) cc -c z.c -Wformat -fformat-extensions -std=c99 -pedantic: gives broken warnings. Now the warnings are bugs instead of just bogus, since -fformat-extensions is supposed to extend the standard. Both -std=c99 and -pedantic should only warn for extensions that are not explicitly asked for. gcc mostly gets this right. E.g., you write __asm() instead of asm() if you want to use asm() in otherwise standard code. clang -c z.c -Wformat -fformat-extensions -std=c99 -pedantic: gives broken warnings and broken color escape sequences. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 10:33:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F90106566C; Tue, 25 Oct 2011 10:33:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E4D8FC0C; Tue, 25 Oct 2011 10:33:26 +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 p9PAXQx7092065; Tue, 25 Oct 2011 10:33:26 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PAXQ1o092063; Tue, 25 Oct 2011 10:33:26 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110251033.p9PAXQ1o092063@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 25 Oct 2011 10:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226725 - head/usr.sbin/ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 10:33:26 -0000 Author: glebius Date: Tue Oct 25 10:33:26 2011 New Revision: 226725 URL: http://svn.freebsd.org/changeset/base/226725 Log: Protect NIS server with madvise(2) since this daemon is required for succesful authentication of users. Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Tue Oct 25 08:35:30 2011 (r226724) +++ head/usr.sbin/ypserv/yp_main.c Tue Oct 25 10:33:26 2011 (r226725) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); */ #include +#include #include #include #include @@ -525,6 +526,9 @@ main(int argc, char *argv[]) unregister(); } + if (madvise(NULL, 0, MADV_PROTECT) != 0) + _msgout("madvise(): %s", strerror(errno)); + /* * Create RPC service for each transport. */ From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 12:26:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F1E31065675; Tue, 25 Oct 2011 12:26:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9ED98FC0C; Tue, 25 Oct 2011 12:26: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 p9PCQJFN095538; Tue, 25 Oct 2011 12:26:19 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PCQJd2095536; Tue, 25 Oct 2011 12:26:19 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251226.p9PCQJd2095536@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 12:26:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226726 - head/sbin/hastctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 12:26:20 -0000 Author: pjd Date: Tue Oct 25 12:26:19 2011 New Revision: 226726 URL: http://svn.freebsd.org/changeset/base/226726 Log: Remove duplicated line. MFC after: 3 days Modified: head/sbin/hastctl/Makefile Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Tue Oct 25 10:33:26 2011 (r226725) +++ head/sbin/hastctl/Makefile Tue Oct 25 12:26:19 2011 (r226726) @@ -28,7 +28,6 @@ CFLAGS+=-DINET6 .endif # This is needed to have WARNS > 1. CFLAGS+=-DYY_NO_UNPUT -CFLAGS+=-DYY_NO_INPUT DPADD= ${LIBL} ${LIBUTIL} LDADD= -ll -lutil From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:08:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8847106566C; Tue, 25 Oct 2011 13:08:03 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 980D98FC12; Tue, 25 Oct 2011 13:08:03 +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 p9PD83B9096863; Tue, 25 Oct 2011 13:08:03 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PD83s5096861; Tue, 25 Oct 2011 13:08:03 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251308.p9PD83s5096861@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:08:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226727 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:08:03 -0000 Author: pjd Date: Tue Oct 25 13:08:03 2011 New Revision: 226727 URL: http://svn.freebsd.org/changeset/base/226727 Log: Fit lines into 80 chars. MFC after: 3 days Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Tue Oct 25 12:26:19 2011 (r226726) +++ head/sys/geom/eli/g_eli.c Tue Oct 25 13:08:03 2011 (r226727) @@ -475,7 +475,8 @@ again: } while (sc->sc_flags & G_ELI_FLAG_SUSPEND) { if (sc->sc_inflight > 0) { - G_ELI_DEBUG(0, "inflight=%d", sc->sc_inflight); + G_ELI_DEBUG(0, "inflight=%d", + sc->sc_inflight); /* * We still have inflight BIOs, so * sleep and retry. @@ -1132,7 +1133,8 @@ g_eli_taste(struct g_class *mp, struct g /* Try again. */ continue; } else if (error > 0) { - G_ELI_DEBUG(0, "Cannot decrypt Master Key for %s (error=%d).", + G_ELI_DEBUG(0, + "Cannot decrypt Master Key for %s (error=%d).", pp->name, error); g_eli_keyfiles_clear(pp->name); return (NULL); @@ -1226,8 +1228,8 @@ g_eli_dumpconf(struct sbuf *sb, const ch } sbuf_printf(sb, "%s%u\n", indent, sc->sc_ekeylen); - sbuf_printf(sb, "%s%s\n", indent, - g_eli_algo2str(sc->sc_ealgo)); + sbuf_printf(sb, "%s%s\n", + indent, g_eli_algo2str(sc->sc_ealgo)); sbuf_printf(sb, "%s%s\n", indent, (sc->sc_flags & G_ELI_FLAG_SUSPEND) ? "SUSPENDED" : "ACTIVE"); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:09:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E37A91065670; Tue, 25 Oct 2011 13:09:22 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D35F98FC13; Tue, 25 Oct 2011 13:09:22 +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 p9PD9MwN096937; Tue, 25 Oct 2011 13:09:22 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PD9MvU096935; Tue, 25 Oct 2011 13:09:22 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251309.p9PD9MvU096935@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226728 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:09:23 -0000 Author: pjd Date: Tue Oct 25 13:09:22 2011 New Revision: 226728 URL: http://svn.freebsd.org/changeset/base/226728 Log: Prefer G_ELI_VERSION_* defines for version numbers over plain digits. MFC after: 3 days Modified: head/sys/geom/eli/g_eli.c Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Tue Oct 25 13:08:03 2011 (r226727) +++ head/sys/geom/eli/g_eli.c Tue Oct 25 13:09:22 2011 (r226728) @@ -717,12 +717,14 @@ g_eli_create(struct gctl_req *req, struc sc->sc_crypto = G_ELI_CRYPTO_UNKNOWN; sc->sc_flags = md->md_flags; /* Backward compatibility. */ - if (md->md_version < 4) + if (md->md_version < G_ELI_VERSION_04) sc->sc_flags |= G_ELI_FLAG_NATIVE_BYTE_ORDER; - if (md->md_version < 5) + if (md->md_version < G_ELI_VERSION_05) sc->sc_flags |= G_ELI_FLAG_SINGLE_KEY; - if (md->md_version < 6 && (sc->sc_flags & G_ELI_FLAG_AUTH) != 0) + if (md->md_version < G_ELI_VERSION_06 && + (sc->sc_flags & G_ELI_FLAG_AUTH) != 0) { sc->sc_flags |= G_ELI_FLAG_FIRST_KEY; + } sc->sc_ealgo = md->md_ealgo; sc->sc_nkey = nkey; From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:41:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E9B51065674; Tue, 25 Oct 2011 13:41:13 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DE238FC0A; Tue, 25 Oct 2011 13:41:13 +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 p9PDfCFP097965; Tue, 25 Oct 2011 13:41:12 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PDfC9h097963; Tue, 25 Oct 2011 13:41:12 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251341.p9PDfC9h097963@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226729 - head/tools/regression/geom_eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:41:13 -0000 Author: pjd Date: Tue Oct 25 13:41:12 2011 New Revision: 226729 URL: http://svn.freebsd.org/changeset/base/226729 Log: Fix resize regressions tests - we need to destroy BSDlabel before we can create GPT. MFC after: 3 days Modified: head/tools/regression/geom_eli/resize.t Modified: head/tools/regression/geom_eli/resize.t ============================================================================== --- head/tools/regression/geom_eli/resize.t Tue Oct 25 13:09:22 2011 (r226728) +++ head/tools/regression/geom_eli/resize.t Tue Oct 25 13:41:12 2011 (r226729) @@ -118,6 +118,7 @@ echo ok $i - "fsck says ${md}a.eli is cl i=$((i + 1)) geli detach ${md}a.eli +gpart destroy -F $md >/dev/null # Verify that the man page example works, changing ada0 to $md, From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:44:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59FE31065675; Tue, 25 Oct 2011 13:44:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49C498FC0A; Tue, 25 Oct 2011 13:44:24 +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 p9PDiOli098104; Tue, 25 Oct 2011 13:44:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PDiOpw098102; Tue, 25 Oct 2011 13:44:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251344.p9PDiOpw098102@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226730 - head/sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:44:24 -0000 Author: pjd Date: Tue Oct 25 13:44:23 2011 New Revision: 226730 URL: http://svn.freebsd.org/changeset/base/226730 Log: When decoding metadata, check magic string, so we know this is not GELI device before we check its version. We don't want to report that some garbage is unsupported version if this is not even GELI provider. MFC after: 3 days Modified: head/sys/geom/eli/g_eli.h Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Tue Oct 25 13:41:12 2011 (r226729) +++ head/sys/geom/eli/g_eli.h Tue Oct 25 13:44:23 2011 (r226730) @@ -294,6 +294,8 @@ eli_metadata_decode(const u_char *data, int error; bcopy(data, md->md_magic, sizeof(md->md_magic)); + if (strcmp(md->md_magic, G_ELI_MAGIC) != 0) + return (EINVAL); md->md_version = le32dec(data + sizeof(md->md_magic)); switch (md->md_version) { case G_ELI_VERSION_00: From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:49:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15755106564A; Tue, 25 Oct 2011 13:49:49 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 052048FC16; Tue, 25 Oct 2011 13:49:49 +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 p9PDnmbC098311; Tue, 25 Oct 2011 13:49:48 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PDnmw0098309; Tue, 25 Oct 2011 13:49:48 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251349.p9PDnmw0098309@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226731 - head/sbin/hastctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:49:49 -0000 Author: pjd Date: Tue Oct 25 13:49:48 2011 New Revision: 226731 URL: http://svn.freebsd.org/changeset/base/226731 Log: Revert r226726. The line was not duplicated. Spotted by: pluknet MFC after: 3 days Modified: head/sbin/hastctl/Makefile Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Tue Oct 25 13:44:23 2011 (r226730) +++ head/sbin/hastctl/Makefile Tue Oct 25 13:49:48 2011 (r226731) @@ -28,6 +28,7 @@ CFLAGS+=-DINET6 .endif # This is needed to have WARNS > 1. CFLAGS+=-DYY_NO_UNPUT +CFLAGS+=-DYY_NO_INPUT DPADD= ${LIBL} ${LIBUTIL} LDADD= -ll -lutil From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:52:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694B51065675; Tue, 25 Oct 2011 13:52:38 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58B8F8FC19; Tue, 25 Oct 2011 13:52:38 +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 p9PDqckN098444; Tue, 25 Oct 2011 13:52:38 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PDqcIc098442; Tue, 25 Oct 2011 13:52:38 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201110251352.p9PDqcIc098442@svn.freebsd.org> From: Martin Matuska Date: Tue, 25 Oct 2011 13:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226732 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:52:38 -0000 Author: mm Date: Tue Oct 25 13:52:38 2011 New Revision: 226732 URL: http://svn.freebsd.org/changeset/base/226732 Log: Fix typo in copyright notice introduced in r226724 (missing character in e-mail adress) Reported by: pjd MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 25 13:49:48 2011 (r226731) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Oct 25 13:52:38 2011 (r226732) @@ -23,7 +23,7 @@ */ /* Portions Copyright 2007 Jeremy Teo */ -/* Portions Copyright 2011 Martin Matuska */ #ifdef _KERNEL #include From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 13:57:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08AEF1065670; Tue, 25 Oct 2011 13:57:51 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E16AD8FC18; Tue, 25 Oct 2011 13:57:50 +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 p9PDvohK098645; Tue, 25 Oct 2011 13:57:50 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PDvoHG098640; Tue, 25 Oct 2011 13:57:50 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251357.p9PDvoHG098640@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 13:57:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226733 - in head: sbin/geom/class/eli sys/geom/eli X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 13:57:51 -0000 Author: pjd Date: Tue Oct 25 13:57:50 2011 New Revision: 226733 URL: http://svn.freebsd.org/changeset/base/226733 Log: Add support for creating GELI devices with older metadata version for use with older FreeBSD versions: - Add -V option to 'geli init' to specify version number. If no -V is given the most recent version is used. - If -V is given don't allow to use features not supported by this version. - Print version in 'geli list' output. - Update manual page and add table describing which GELI version is supported by which FreeBSD version, so one can use it when preparing GELI device for older FreeBSD version. Inspired by: Garrett Cooper MFC after: 3 days Modified: head/sbin/geom/class/eli/geli.8 head/sbin/geom/class/eli/geom_eli.c head/sys/geom/eli/g_eli.c head/sys/geom/eli/g_eli.h Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Tue Oct 25 13:52:38 2011 (r226732) +++ head/sbin/geom/class/eli/geli.8 Tue Oct 25 13:57:50 2011 (r226733) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2011 +.Dd October 25, 2011 .Dt GELI 8 .Os .Sh NAME @@ -60,6 +60,7 @@ utility: .Op Fl K Ar newkeyfile .Op Fl l Ar keylen .Op Fl s Ar sectorsize +.Op Fl V Ar version .Ar prov .Nm .Cm label - an alias for @@ -322,6 +323,15 @@ Change decrypted provider's sector size. Increasing sector size allows to increase performance, because we need to generate an IV and do encrypt/decrypt for every single sector - less number of sectors means less work to do. +.It Fl V Ar version +Metadata version to use. +This option is helpful when creating provider that may be used by older +.Nm FreeBSD/GELI +versions. +Consult the +.Sx HISTORY +section to find which metadata version is supported by which FreeBSD version. +Note that using older metadata version may limit numer of features available. .El .It Cm attach Attach the given provider. @@ -931,5 +941,33 @@ Support for .Nm Camellia block cipher is implemented by Yoshisato Yanagisawa in .Fx 7.0 . +.Pp +Highest +.Nm GELI +metadata version supported by the given FreeBSD version: +.Pp +.Bl -column -offset indent ".Sy FreeBSD" ".Sy version" +.It Sy FreeBSD Ta Sy GELI +.It Sy version Ta Sy version +.Pp +.It Li 6.0 Ta 0 +.It Li 6.1 Ta 0 +.It Li 6.2 Ta 3 +.It Li 6.3 Ta 3 +.It Li 6.4 Ta 3 +.Pp +.It Li 7.0 Ta 3 +.It Li 7.1 Ta 3 +.It Li 7.2 Ta 3 +.It Li 7.3 Ta 3 +.It Li 7.4 Ta 3 +.Pp +.It Li 8.0 Ta 3 +.It Li 8.1 Ta 3 +.It Li 8.2 Ta 5 +.Pp +.It Li 9.0 Ta 6 +.El +.Pp .Sh AUTHORS .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 13:52:38 2011 (r226732) +++ head/sbin/geom/class/eli/geom_eli.c Tue Oct 25 13:57:50 2011 (r226733) @@ -82,7 +82,7 @@ static int eli_backup_create(struct gctl /* * Available commands: * - * init [-bhPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] prov + * init [-bhPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-V version] prov * label - alias for 'init' * attach [-dprv] [-j passfile] [-k keyfile] prov * detach [-fl] prov ... @@ -107,29 +107,31 @@ struct g_command class_commands[] = { { 'a', "aalgo", "", G_TYPE_STRING }, { 'b', "boot", NULL, G_TYPE_BOOL }, { 'B', "backupfile", "", G_TYPE_STRING }, - { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, + { 'e', "ealgo", "", G_TYPE_STRING }, { 'i', "iterations", "-1", G_TYPE_NUMBER }, { 'J', "newpassfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'K', "newkeyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'l', "keylen", "0", G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", "0", G_TYPE_NUMBER }, + { 'V', "mdversion", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-bPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] prov" + "[-bPv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov" }, { "label", G_FLAG_VERBOSE, eli_main, { { 'a', "aalgo", "", G_TYPE_STRING }, { 'b', "boot", NULL, G_TYPE_BOOL }, { 'B', "backupfile", "", G_TYPE_STRING }, - { 'e', "ealgo", GELI_ENC_ALGO, G_TYPE_STRING }, + { 'e', "ealgo", "", G_TYPE_STRING }, { 'i', "iterations", "-1", G_TYPE_NUMBER }, { 'J', "newpassfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'K', "newkeyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'l', "keylen", "0", G_TYPE_NUMBER }, { 'P', "nonewpassphrase", NULL, G_TYPE_BOOL }, { 's', "sectorsize", "0", G_TYPE_NUMBER }, + { 'V', "mdversion", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, "- an alias for 'init'" @@ -672,7 +674,7 @@ eli_init(struct gctl_req *req) unsigned char key[G_ELI_USERKEYLEN]; char backfile[MAXPATHLEN]; const char *str, *prov; - unsigned secsize; + unsigned int secsize, version; off_t mediasize; intmax_t val; int error, nargs; @@ -693,13 +695,30 @@ eli_init(struct gctl_req *req) bzero(&md, sizeof(md)); strlcpy(md.md_magic, G_ELI_MAGIC, sizeof(md.md_magic)); - md.md_version = G_ELI_VERSION; + val = gctl_get_intmax(req, "mdversion"); + if (val == -1) { + version = G_ELI_VERSION; + } else if (val < 0 || val > G_ELI_VERSION) { + gctl_error(req, + "Invalid version specified should be between %u and %u.", + G_ELI_VERSION_00, G_ELI_VERSION); + return; + } else { + version = val; + } + md.md_version = version; md.md_flags = 0; if (gctl_get_int(req, "boot")) md.md_flags |= G_ELI_FLAG_BOOT; md.md_ealgo = CRYPTO_ALGORITHM_MIN - 1; str = gctl_get_ascii(req, "aalgo"); if (*str != '\0') { + if (version < G_ELI_VERSION_01) { + gctl_error(req, + "Data authentication is supported starting from version %u.", + G_ELI_VERSION_01); + return; + } md.md_aalgo = g_eli_str2aalgo(str); if (md.md_aalgo >= CRYPTO_ALGORITHM_MIN && md.md_aalgo <= CRYPTO_ALGORITHM_MAX) { @@ -725,12 +744,32 @@ eli_init(struct gctl_req *req) if (md.md_ealgo < CRYPTO_ALGORITHM_MIN || md.md_ealgo > CRYPTO_ALGORITHM_MAX) { str = gctl_get_ascii(req, "ealgo"); + if (*str == '\0') { + if (version < G_ELI_VERSION_05) + str = "aes-cbc"; + else + str = GELI_ENC_ALGO; + } md.md_ealgo = g_eli_str2ealgo(str); if (md.md_ealgo < CRYPTO_ALGORITHM_MIN || md.md_ealgo > CRYPTO_ALGORITHM_MAX) { gctl_error(req, "Invalid encryption algorithm."); return; } + if (md.md_ealgo == CRYPTO_CAMELLIA_CBC && + version < G_ELI_VERSION_04) { + gctl_error(req, + "Camellia-CBC algorithm is supported starting from version %u.", + G_ELI_VERSION_04); + return; + } + if (md.md_ealgo == CRYPTO_AES_XTS && + version < G_ELI_VERSION_05) { + gctl_error(req, + "AES-XTS algorithm is supported starting from version %u.", + G_ELI_VERSION_05); + return; + } } val = gctl_get_intmax(req, "keylen"); md.md_keylen = val; Modified: head/sys/geom/eli/g_eli.c ============================================================================== --- head/sys/geom/eli/g_eli.c Tue Oct 25 13:52:38 2011 (r226732) +++ head/sys/geom/eli/g_eli.c Tue Oct 25 13:57:50 2011 (r226733) @@ -713,6 +713,7 @@ g_eli_create(struct gctl_req *req, struc else gp->access = g_std_access; + sc->sc_version = md->md_version; sc->sc_inflight = 0; sc->sc_crypto = G_ELI_CRYPTO_UNKNOWN; sc->sc_flags = md->md_flags; @@ -1210,6 +1211,7 @@ g_eli_dumpconf(struct sbuf *sb, const ch sbuf_printf(sb, "%s%u\n", indent, sc->sc_nkey); } + sbuf_printf(sb, "%s%u\n", indent, sc->sc_version); sbuf_printf(sb, "%s", indent); switch (sc->sc_crypto) { case G_ELI_CRYPTO_HW: Modified: head/sys/geom/eli/g_eli.h ============================================================================== --- head/sys/geom/eli/g_eli.h Tue Oct 25 13:52:38 2011 (r226732) +++ head/sys/geom/eli/g_eli.h Tue Oct 25 13:57:50 2011 (r226733) @@ -43,6 +43,7 @@ #include #include #else +#include #include #include #include @@ -166,6 +167,7 @@ struct g_eli_worker { struct g_eli_softc { struct g_geom *sc_geom; + u_int sc_version; u_int sc_crypto; uint8_t sc_mkey[G_ELI_DATAIVKEYLEN]; uint8_t sc_ekey[G_ELI_DATAKEYLEN]; @@ -217,14 +219,28 @@ struct g_eli_metadata { } __packed; #ifndef _OpenSSL_ static __inline void -eli_metadata_encode(struct g_eli_metadata *md, u_char *data) +eli_metadata_encode_v0(struct g_eli_metadata *md, u_char **datap) { - MD5_CTX ctx; u_char *p; - p = data; - bcopy(md->md_magic, p, sizeof(md->md_magic)); p += sizeof(md->md_magic); - le32enc(p, md->md_version); p += sizeof(md->md_version); + p = *datap; + le32enc(p, md->md_flags); p += sizeof(md->md_flags); + le16enc(p, md->md_ealgo); p += sizeof(md->md_ealgo); + le16enc(p, md->md_keylen); p += sizeof(md->md_keylen); + le64enc(p, md->md_provsize); p += sizeof(md->md_provsize); + le32enc(p, md->md_sectorsize); p += sizeof(md->md_sectorsize); + *p = md->md_keys; p += sizeof(md->md_keys); + le32enc(p, md->md_iterations); p += sizeof(md->md_iterations); + bcopy(md->md_salt, p, sizeof(md->md_salt)); p += sizeof(md->md_salt); + bcopy(md->md_mkeys, p, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); + *datap = p; +} +static __inline void +eli_metadata_encode_v1v2v3v4v5v6(struct g_eli_metadata *md, u_char **datap) +{ + u_char *p; + + p = *datap; le32enc(p, md->md_flags); p += sizeof(md->md_flags); le16enc(p, md->md_ealgo); p += sizeof(md->md_ealgo); le16enc(p, md->md_keylen); p += sizeof(md->md_keylen); @@ -235,6 +251,39 @@ eli_metadata_encode(struct g_eli_metadat le32enc(p, md->md_iterations); p += sizeof(md->md_iterations); bcopy(md->md_salt, p, sizeof(md->md_salt)); p += sizeof(md->md_salt); bcopy(md->md_mkeys, p, sizeof(md->md_mkeys)); p += sizeof(md->md_mkeys); + *datap = p; +} +static __inline void +eli_metadata_encode(struct g_eli_metadata *md, u_char *data) +{ + MD5_CTX ctx; + u_char *p; + + p = data; + bcopy(md->md_magic, p, sizeof(md->md_magic)); + p += sizeof(md->md_magic); + le32enc(p, md->md_version); + p += sizeof(md->md_version); + switch (md->md_version) { + case G_ELI_VERSION_00: + eli_metadata_encode_v0(md, &p); + break; + case G_ELI_VERSION_01: + case G_ELI_VERSION_02: + case G_ELI_VERSION_03: + case G_ELI_VERSION_04: + case G_ELI_VERSION_05: + case G_ELI_VERSION_06: + eli_metadata_encode_v1v2v3v4v5v6(md, &p); + break; + default: +#ifdef _KERNEL + panic("%s: Unsupported version %u.", __func__, + (u_int)md->md_version); +#else + assert(!"Unsupported metadata version."); +#endif + } MD5Init(&ctx); MD5Update(&ctx, data, p - data); MD5Final(md->md_hash, &ctx); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 14:01:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A78106566C; Tue, 25 Oct 2011 14:01:18 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 478D68FC1F; Tue, 25 Oct 2011 14:01: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 p9PE1Iwx098813; Tue, 25 Oct 2011 14:01:18 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PE1IaO098811; Tue, 25 Oct 2011 14:01:18 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251401.p9PE1IaO098811@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 14:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226734 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 14:01:18 -0000 Author: pjd Date: Tue Oct 25 14:01:17 2011 New Revision: 226734 URL: http://svn.freebsd.org/changeset/base/226734 Log: The v_data field is a pointer, so set it to NULL, not 0. MFC after: 3 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Tue Oct 25 13:57:50 2011 (r226733) +++ head/sys/kern/vfs_subr.c Tue Oct 25 14:01:17 2011 (r226734) @@ -1054,7 +1054,7 @@ alloc: vp->v_tag = tag; vp->v_op = vops; v_incr_usecount(vp); - vp->v_data = 0; + vp->v_data = NULL; #ifdef MAC mac_vnode_init(vp); if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0) From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 14:05:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E84410657AC; Tue, 25 Oct 2011 14:05:00 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F27398FC0A; Tue, 25 Oct 2011 14:04: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 p9PE4xQh098958; Tue, 25 Oct 2011 14:04:59 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PE4xvC098956; Tue, 25 Oct 2011 14:04:59 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251404.p9PE4xvC098956@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 14:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226735 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 14:05:00 -0000 Author: pjd Date: Tue Oct 25 14:04:59 2011 New Revision: 226735 URL: http://svn.freebsd.org/changeset/base/226735 Log: Simplify disk_alloc(). MFC after: 3 days Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Tue Oct 25 14:01:17 2011 (r226734) +++ head/sys/geom/geom_disk.c Tue Oct 25 14:04:59 2011 (r226735) @@ -537,12 +537,10 @@ g_disk_ident_adjust(char *ident, size_t } struct disk * -disk_alloc() +disk_alloc(void) { - struct disk *dp; - dp = g_malloc(sizeof *dp, M_WAITOK | M_ZERO); - return (dp); + return (g_malloc(sizeof(struct disk), M_WAITOK | M_ZERO)); } void From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 14:05:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 292AA1065676; Tue, 25 Oct 2011 14:05:40 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 190A08FC24; Tue, 25 Oct 2011 14:05:40 +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 p9PE5d5e099019; Tue, 25 Oct 2011 14:05:39 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PE5dYY099017; Tue, 25 Oct 2011 14:05:39 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251405.p9PE5dYY099017@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 14:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226736 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 14:05:40 -0000 Author: pjd Date: Tue Oct 25 14:05:39 2011 New Revision: 226736 URL: http://svn.freebsd.org/changeset/base/226736 Log: Improve style a bit. MFC after: 3 days Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Tue Oct 25 14:04:59 2011 (r226735) +++ head/sys/geom/geom_disk.c Tue Oct 25 14:05:39 2011 (r226736) @@ -109,6 +109,7 @@ DECLARE_GEOM_CLASS(g_disk_class, g_disk) static void __inline g_disk_lock_giant(struct disk *dp) { + if (dp->d_flags & DISKFLAG_NEEDSGIANT) mtx_lock(&Giant); } @@ -116,6 +117,7 @@ g_disk_lock_giant(struct disk *dp) static void __inline g_disk_unlock_giant(struct disk *dp) { + if (dp->d_flags & DISKFLAG_NEEDSGIANT) mtx_unlock(&Giant); } @@ -251,9 +253,9 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) && - (sc = bp2->bio_to->geom->softc) && - (dp = sc->dp)) { + if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0 && + (sc = bp2->bio_to->geom->softc) != NULL && + (dp = sc->dp) != NULL) { devstat_end_transaction_bio(dp->d_devstat, bp); } g_destroy_bio(bp); @@ -282,7 +284,7 @@ g_disk_ioctl(struct g_provider *pp, u_lo g_disk_lock_giant(dp); error = dp->d_ioctl(dp, cmd, data, fflag, td); g_disk_unlock_giant(dp); - return(error); + return (error); } static void @@ -546,6 +548,7 @@ disk_alloc(void) void disk_create(struct disk *dp, int version) { + if (version != DISK_VERSION_00 && version != DISK_VERSION_01) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, @@ -635,4 +638,3 @@ sysctl_disks(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern, OID_AUTO, disks, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_disks, "A", "names of available disks"); - From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 14:07:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAFD8106564A; Tue, 25 Oct 2011 14:07:17 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AA008FC17; Tue, 25 Oct 2011 14:07:17 +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 p9PE7Hsb099112; Tue, 25 Oct 2011 14:07:17 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PE7HHT099110; Tue, 25 Oct 2011 14:07:17 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251407.p9PE7HHT099110@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 14:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226737 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 14:07:17 -0000 Author: pjd Date: Tue Oct 25 14:07:17 2011 New Revision: 226737 URL: http://svn.freebsd.org/changeset/base/226737 Log: Allow upper layers to discover than BIO_DELETE and/or BIO_FLUSH is not supported by returning EOPNOTSUPP instead of 0 or ENODEV. MFC after: 3 days Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Tue Oct 25 14:05:39 2011 (r226736) +++ head/sys/geom/geom_disk.c Tue Oct 25 14:07:17 2011 (r226737) @@ -305,7 +305,7 @@ g_disk_start(struct bio *bp) switch(bp->bio_cmd) { case BIO_DELETE: if (!(dp->d_flags & DISKFLAG_CANDELETE)) { - error = 0; + error = EOPNOTSUPP; break; } /* fall-through */ @@ -394,8 +394,8 @@ g_disk_start(struct bio *bp) g_trace(G_T_TOPOLOGY, "g_disk_flushcache(%s)", bp->bio_to->name); if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) { - g_io_deliver(bp, ENODEV); - return; + error = EOPNOTSUPP; + break; } bp2 = g_clone_bio(bp); if (bp2 == NULL) { From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 16:22:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BD28106566B; Tue, 25 Oct 2011 16:22:44 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BABD8FC13; Tue, 25 Oct 2011 16:22:44 +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 p9PGMi0q004984; Tue, 25 Oct 2011 16:22:44 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PGMhhC004982; Tue, 25 Oct 2011 16:22:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201110251622.p9PGMhhC004982@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Tue, 25 Oct 2011 16:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226738 - head/sys/modules/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 16:22:44 -0000 Author: pjd Date: Tue Oct 25 16:22:43 2011 New Revision: 226738 URL: http://svn.freebsd.org/changeset/base/226738 Log: Don't look for includes in userland directories. There is no need for it and it breaks building the kernel without userland sources. Reported by: andre, imp MFC after: 3 days Modified: head/sys/modules/zfs/Makefile Modified: head/sys/modules/zfs/Makefile ============================================================================== --- head/sys/modules/zfs/Makefile Tue Oct 25 14:07:17 2011 (r226737) +++ head/sys/modules/zfs/Makefile Tue Oct 25 16:22:43 2011 (r226738) @@ -82,7 +82,6 @@ CFLAGS+=-I${SUNW}/uts/common CFLAGS+=-I${.CURDIR}/../.. CFLAGS+=-I${SUNW}/common/zfs CFLAGS+=-I${SUNW}/common -CFLAGS+=-I${.CURDIR}/../../../include CFLAGS+=-DBUILDING_ZFS .if ${MACHINE_ARCH} == "powerpc64" From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 16:30:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C0A11065688; Tue, 25 Oct 2011 16:30:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7CFE8FC1C; Tue, 25 Oct 2011 16:30:16 +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 p9PGUGS3005294; Tue, 25 Oct 2011 16:30:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PGUG0C005292; Tue, 25 Oct 2011 16:30:16 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110251630.p9PGUG0C005292@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 25 Oct 2011 16:30:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226739 - head/usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 16:30:17 -0000 Author: nwhitehorn Date: Tue Oct 25 16:30:16 2011 New Revision: 226739 URL: http://svn.freebsd.org/changeset/base/226739 Log: Provide an error message instead of silent failure if no disks are present in the system. PR: bin/161950 MFC after: 3 days Modified: head/usr.sbin/bsdinstall/partedit/partedit.c Modified: head/usr.sbin/bsdinstall/partedit/partedit.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit.c Tue Oct 25 16:22:43 2011 (r226738) +++ head/usr.sbin/bsdinstall/partedit/partedit.c Tue Oct 25 16:30:16 2011 (r226739) @@ -70,7 +70,7 @@ main(int argc, const char **argv) { struct partition_metadata *md; const char *prompt; - struct partedit_item *items; + struct partedit_item *items = NULL; struct gmesh mesh; int i, op, nitems, nscroll; int error; @@ -99,12 +99,21 @@ main(int argc, const char **argv) /* Show the part editor either immediately, or to confirm wizard */ while (1) { - error = geom_gettree(&mesh); - items = read_geom_mesh(&mesh, &nitems); - get_mount_points(items, nitems); dlg_clear(); dlg_put_backtitle(); + error = geom_gettree(&mesh); + if (error == 0) + items = read_geom_mesh(&mesh, &nitems); + if (error || items == NULL) { + dialog_msgbox("Error", "No disks found. If you need to " + "install a kernel driver, choose Shell at the " + "installation menu.", 0, 0, TRUE); + break; + } + + get_mount_points(items, nitems); + if (i >= nitems) i = nitems - 1; op = diskeditor_show("Partition Editor", prompt, From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 16:35:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D3201065673; Tue, 25 Oct 2011 16:35:09 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CB3A8FC16; Tue, 25 Oct 2011 16:35:09 +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 p9PGZ9qA005492; Tue, 25 Oct 2011 16:35:09 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PGZ97C005490; Tue, 25 Oct 2011 16:35:09 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201110251635.p9PGZ97C005490@svn.freebsd.org> From: Alan Cox Date: Tue, 25 Oct 2011 16:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226740 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 16:35:09 -0000 Author: alc Date: Tue Oct 25 16:35:08 2011 New Revision: 226740 URL: http://svn.freebsd.org/changeset/base/226740 Log: Speed up vm_page_cache() and vm_page_remove() by checking for a few common cases that can be handled in constant time. The insight being that a page's parent in the vm object's tree is very often its predecessor or successor in the vm object's ordered memq. Tested by: jhb MFC after: 10 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Oct 25 16:30:16 2011 (r226739) +++ head/sys/vm/vm_page.c Tue Oct 25 16:35:08 2011 (r226740) @@ -908,7 +908,7 @@ void vm_page_remove(vm_page_t m) { vm_object_t object; - vm_page_t root; + vm_page_t next, prev, root; if ((m->oflags & VPO_UNMANAGED) == 0) vm_page_lock_assert(m, MA_OWNED); @@ -923,15 +923,42 @@ vm_page_remove(vm_page_t m) /* * Now remove from the object's list of backed pages. */ - if (m != object->root) - vm_page_splay(m->pindex, object->root); - if (m->left == NULL) - root = m->right; - else { - root = vm_page_splay(m->pindex, m->left); - root->right = m->right; + if ((next = TAILQ_NEXT(m, listq)) != NULL && next->left == m) { + /* + * Since the page's successor in the list is also its parent + * in the tree, its right subtree must be empty. + */ + next->left = m->left; + KASSERT(m->right == NULL, + ("vm_page_remove: page %p has right child", m)); + } else if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->right == m) { + /* + * Since the page's predecessor in the list is also its parent + * in the tree, its left subtree must be empty. + */ + KASSERT(m->left == NULL, + ("vm_page_remove: page %p has left child", m)); + prev->right = m->right; + } else { + if (m != object->root) + vm_page_splay(m->pindex, object->root); + if (m->left == NULL) + root = m->right; + else if (m->right == NULL) + root = m->left; + else { + /* + * Move the page's successor to the root, because + * pages are usually removed in ascending order. + */ + if (m->right != next) + vm_page_splay(m->pindex, m->right); + next->left = m->left; + root = next; + } + object->root = root; } - object->root = root; TAILQ_REMOVE(&object->memq, m, listq); /* @@ -2021,7 +2048,7 @@ void vm_page_cache(vm_page_t m) { vm_object_t object; - vm_page_t root; + vm_page_t next, prev, root; vm_page_lock_assert(m, MA_OWNED); object = m->object; @@ -2056,15 +2083,42 @@ vm_page_cache(vm_page_t m) * Remove the page from the object's collection of resident * pages. */ - if (m != object->root) - vm_page_splay(m->pindex, object->root); - if (m->left == NULL) - root = m->right; - else { - root = vm_page_splay(m->pindex, m->left); - root->right = m->right; + if ((next = TAILQ_NEXT(m, listq)) != NULL && next->left == m) { + /* + * Since the page's successor in the list is also its parent + * in the tree, its right subtree must be empty. + */ + next->left = m->left; + KASSERT(m->right == NULL, + ("vm_page_cache: page %p has right child", m)); + } else if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL && + prev->right == m) { + /* + * Since the page's predecessor in the list is also its parent + * in the tree, its left subtree must be empty. + */ + KASSERT(m->left == NULL, + ("vm_page_cache: page %p has left child", m)); + prev->right = m->right; + } else { + if (m != object->root) + vm_page_splay(m->pindex, object->root); + if (m->left == NULL) + root = m->right; + else if (m->right == NULL) + root = m->left; + else { + /* + * Move the page's successor to the root, because + * pages are usually removed in ascending order. + */ + if (m->right != next) + vm_page_splay(m->pindex, m->right); + next->left = m->left; + root = next; + } + object->root = root; } - object->root = root; TAILQ_REMOVE(&object->memq, m, listq); object->resident_page_count--; From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 16:35:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4244F1065670; Tue, 25 Oct 2011 16:35:49 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31AD58FC0C; Tue, 25 Oct 2011 16:35:49 +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 p9PGZnI6005546; Tue, 25 Oct 2011 16:35:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PGZnRd005544; Tue, 25 Oct 2011 16:35:49 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201110251635.p9PGZnRd005544@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 25 Oct 2011 16:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226741 - head/usr.sbin/bsdinstall/scripts X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 16:35:49 -0000 Author: nwhitehorn Date: Tue Oct 25 16:35:48 2011 New Revision: 226741 URL: http://svn.freebsd.org/changeset/base/226741 Log: Provide an error message and error handling if there are no network interfaces in the system. This is a non-fatal error except when doing a network installation. PR: bin/161950 MFC after: 3 days Modified: head/usr.sbin/bsdinstall/scripts/netconfig Modified: head/usr.sbin/bsdinstall/scripts/netconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/netconfig Tue Oct 25 16:35:08 2011 (r226740) +++ head/usr.sbin/bsdinstall/scripts/netconfig Tue Oct 25 16:35:48 2011 (r226741) @@ -49,6 +49,13 @@ for IF in `ifconfig -l`; do DIALOG_TAGS="$DIALOG_TAGS $IF \"$DESC\"" done +if [ -z "$INTERFACES" ]; then + dialog --backtitle 'FreeBSD Installer' \ + --title 'Network Configuration Error' \ + --msgbox 'No network interfaces present to configure.' 0 0 + exit 1 +fi + exec 3>&1 INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3` if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 17:10:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1056E10656EA; Tue, 25 Oct 2011 17:10:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0050B8FC19; Tue, 25 Oct 2011 17:10:16 +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 p9PHAFcS006641; Tue, 25 Oct 2011 17:10:15 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PHAFq7006638; Tue, 25 Oct 2011 17:10:15 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110251710.p9PHAFq7006638@svn.freebsd.org> From: Ed Schouten Date: Tue, 25 Oct 2011 17:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226742 - head/sbin/swapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 17:10:16 -0000 Author: ed Date: Tue Oct 25 17:10:15 2011 New Revision: 226742 URL: http://svn.freebsd.org/changeset/base/226742 Log: Build swapon with WARNS=6. Don't use a variable called stat, because it collides with stat(2). Modified: head/sbin/swapon/Makefile head/sbin/swapon/swapon.c Modified: head/sbin/swapon/Makefile ============================================================================== --- head/sbin/swapon/Makefile Tue Oct 25 16:35:48 2011 (r226741) +++ head/sbin/swapon/Makefile Tue Oct 25 17:10:15 2011 (r226742) @@ -8,7 +8,6 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapc MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -WARNS?= 3 DPADD= ${LIBUTIL} LDADD= -lutil Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Tue Oct 25 16:35:48 2011 (r226741) +++ head/sbin/swapon/swapon.c Tue Oct 25 17:10:15 2011 (r226742) @@ -67,7 +67,7 @@ main(int argc, char **argv) { struct fstab *fsp; char *ptr; - int stat; + int ret; int ch, doall; int sflag = 0, lflag = 0, hflag = 0, qflag = 0; const char *etc_fstab; @@ -144,7 +144,7 @@ main(int argc, char **argv) } argv += optind; - stat = 0; + ret = 0; if (etc_fstab != NULL) setfstab(etc_fstab); if (which_prog == SWAPON || which_prog == SWAPOFF) { @@ -155,7 +155,7 @@ main(int argc, char **argv) if (strstr(fsp->fs_mntops, "noauto")) continue; if (swap_on_off(fsp->fs_spec, 1)) { - stat = 1; + ret = 1; } else { if (!qflag) { printf("%s: %sing %s as swap device\n", @@ -170,7 +170,7 @@ main(int argc, char **argv) usage(); for (; *argv; ++argv) { if (swap_on_off(*argv, 0)) { - stat = 1; + ret = 1; } else if (orig_prog == SWAPCTL) { printf("%s: %sing %s as swap device\n", getprogname(), which_prog == SWAPOFF ? "remov" : "add", @@ -183,7 +183,7 @@ main(int argc, char **argv) else usage(); } - exit(stat); + exit(ret); } static int From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 18:36:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4303106564A; Tue, 25 Oct 2011 18:36:18 +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 930D38FC0A; Tue, 25 Oct 2011 18:36: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 p9PIaI4n009272; Tue, 25 Oct 2011 18:36:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PIaIwx009269; Tue, 25 Oct 2011 18:36:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110251836.p9PIaIwx009269@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 25 Oct 2011 18:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226743 - head/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 18:36:18 -0000 Author: yongari Date: Tue Oct 25 18:36:18 2011 New Revision: 226743 URL: http://svn.freebsd.org/changeset/base/226743 Log: Implement TX/RX checksum offloading support for ASIX AX88772B controller. AX88772B data sheet does not show detailed information about checksum offloading related things. It seems the controller has lots of options to support checksum offloading but I failed to understand why this feature requires so much complex controller configuration and status bits. One of major difference between AX88772B and its predecessor is AX88772B uses a new RX header format when RX checksum offloading is enabled. It also requires the received length of a frame should be multiple of 4. Controller will pad necessary bytes to make the length of received frame to be multiple of 4. It is driver's responsibility to offset this pad bytes. Note, AX88772B could be configured to get partial checksum value in in RX header. This mode uses different RX header format and currently we don't use that fature. This change makes axe(4) use driver specific MII attach handler to override uether(9)'s default MII attach and announce flow-control capability for AX88178/AX88772A/AX88772B to PHY drivers. It seems original AX88772 also supports flow-control but I didn't enable it due to lack of test/access to the controller. The flow-control threshold parameter is loaded from EEPROM and there is no way to override this value without reprogramming EEPROM. For AX88772B, TX/RX IP/TCP/UDP checksum offloading is announced to network stack. IPv6 and PPPoE checksum offloading is also supported by controller but we have no way to take advantage of these features. Driver already knows PHY address so make PHY driver know that information and remove unnecessary PHY address check used in miibus_readreg/miibus_writereg callbacks. Also announce AX88178, AX88772A and AX88772B support VLAN over-sized frame. While I'm here clean up headers and remove axe_start() in axe_init() because the link wouldn't be available right after media change. Modified: head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axereg.h Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Tue Oct 25 17:10:15 2011 (r226742) +++ head/sys/dev/usb/net/if_axe.c Tue Oct 25 18:36:18 2011 (r226743) @@ -76,24 +76,30 @@ __FBSDID("$FreeBSD$"); * http://www.asix.com.tw/FrootAttach/datasheet/AX88772_datasheet_Rev10.pdf */ -#include -#include #include -#include -#include #include -#include #include -#include +#include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -122,6 +128,8 @@ __FBSDID("$FreeBSD$"); */ #define AXE_178_MAX_FRAME_BURST 1 +#define AXE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + #ifdef USB_DEBUG static int axe_debug = 0; @@ -186,6 +194,7 @@ static uether_fn_t axe_tick; static uether_fn_t axe_setmulti; static uether_fn_t axe_setpromisc; +static int axe_attach_post_sub(struct usb_ether *); static int axe_ifmedia_upd(struct ifnet *); static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int axe_cmd(struct axe_softc *, int, int, int, void *); @@ -195,6 +204,11 @@ static void axe_ax88772_phywake(struct a static void axe_ax88772a_init(struct axe_softc *); static void axe_ax88772b_init(struct axe_softc *); static int axe_get_phyno(struct axe_softc *, int); +static int axe_ioctl(struct ifnet *, u_long, caddr_t); +static int axe_rx_frame(struct usb_ether *, struct usb_page_cache *, int); +static int axe_rxeof(struct usb_ether *, struct usb_page_cache *, + unsigned int offset, unsigned int, struct axe_csum_hdr *); +static void axe_csum_cfg(struct usb_ether *); static const struct usb_config axe_config[AXE_N_TRANSFER] = { @@ -266,6 +280,7 @@ MODULE_VERSION(axe, 1); static const struct usb_ether_methods axe_ue_methods = { .ue_attach_post = axe_attach_post, + .ue_attach_post_sub = axe_attach_post_sub, .ue_start = axe_start, .ue_init = axe_init, .ue_stop = axe_stop, @@ -304,9 +319,6 @@ axe_miibus_readreg(device_t dev, int phy uint16_t val; int locked; - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -338,10 +350,6 @@ axe_miibus_writereg(device_t dev, int ph int locked; val = htole32(val); - - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -372,7 +380,7 @@ axe_miibus_statchg(device_t dev) if (mii == NULL || ifp == NULL || (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) goto done; - + sc->sc_flags &= ~AXE_FLAG_LINK; if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == (IFM_ACTIVE | IFM_AVALID)) { @@ -390,14 +398,23 @@ axe_miibus_statchg(device_t dev) break; } } - + /* Lost link, do nothing. */ if ((sc->sc_flags & AXE_FLAG_LINK) == 0) goto done; - + val = 0; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { val |= AXE_MEDIA_FULL_DUPLEX; + if (AXE_IS_178_FAMILY(sc)) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) + val |= AXE_178_MEDIA_TXFLOW_CONTROL_EN; + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) + val |= AXE_178_MEDIA_RXFLOW_CONTROL_EN; + } + } if (AXE_IS_178_FAMILY(sc)) { val |= AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC; if ((sc->sc_flags & AXE_FLAG_178) != 0) @@ -845,6 +862,53 @@ axe_attach_post(struct usb_ether *ue) axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); } +static int +axe_attach_post_sub(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + u_int adv_pause; + int error; + + sc = uether_getsc(ue); + ifp = ue->ue_ifp; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = uether_start; + ifp->if_ioctl = axe_ioctl; + ifp->if_init = uether_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + if (AXE_IS_178_FAMILY(sc)) + ifp->if_capabilities |= IFCAP_VLAN_MTU; + if (sc->sc_flags & AXE_FLAG_772B) { + ifp->if_capabilities |= IFCAP_TXCSUM | IFCAP_RXCSUM; + ifp->if_hwassist = AXE_CSUM_FEATURES; + /* + * Checksum offloading of AX88772B also works with VLAN + * tagged frames but there is no way to take advantage + * of the feature because vlan(4) assumes + * IFCAP_VLAN_HWTAGGING is prerequisite condition to + * support checksum offloading with VLAN. VLAN hardware + * tagging support of AX88772B is very limited so it's + * not possible to announce IFCAP_VLAN_HWTAGGING. + */ + } + ifp->if_capenable = ifp->if_capabilities; + if (sc->sc_flags & (AXE_FLAG_772A | AXE_FLAG_772B | AXE_FLAG_178)) + adv_pause = MIIF_DOPAUSE; + else + adv_pause = 0; + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, adv_pause); + mtx_unlock(&Giant); + + return (error); +} + /* * Probe for a AX88172 chip. */ @@ -930,52 +994,15 @@ axe_bulk_read_callback(struct usb_xfer * { struct axe_softc *sc = usbd_xfer_softc(xfer); struct usb_ether *ue = &sc->sc_ue; - struct ifnet *ifp = uether_getifp(ue); - struct axe_sframe_hdr hdr; struct usb_page_cache *pc; - int err, pos, len; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - pos = 0; - len = 0; - err = 0; - pc = usbd_xfer_get_frame(xfer, 0); - if (AXE_IS_178_FAMILY(sc)) { - while (pos < actlen) { - if ((pos + sizeof(hdr)) > actlen) { - /* too little data */ - err = EINVAL; - break; - } - usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); - - if ((hdr.len ^ hdr.ilen) != 0xFFFF) { - /* we lost sync */ - err = EINVAL; - break; - } - pos += sizeof(hdr); - - len = le16toh(hdr.len); - if ((pos + len) > actlen) { - /* invalid length */ - err = EINVAL; - break; - } - uether_rxbuf(ue, pc, pos, len); - - pos += len + (len % 2); - } - } else - uether_rxbuf(ue, pc, 0, actlen); - - if (err != 0) - ifp->if_ierrors++; + axe_rx_frame(ue, pc, actlen); /* FALLTHROUGH */ case USB_ST_SETUP: @@ -998,6 +1025,131 @@ tr_setup: } } +static int +axe_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) +{ + struct axe_softc *sc; + struct axe_sframe_hdr hdr; + struct axe_csum_hdr csum_hdr; + int error, len, pos; + + sc = uether_getsc(ue); + pos = 0; + len = 0; + error = 0; + if ((sc->sc_flags & AXE_FLAG_STD_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); + + if ((hdr.len ^ hdr.ilen) != sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + pos += sizeof(hdr); + len = le16toh(hdr.len); + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos, len, NULL); + pos += len + (len % 2); + } + } else if ((sc->sc_flags & AXE_FLAG_CSUM_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(csum_hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &csum_hdr, sizeof(csum_hdr)); + + csum_hdr.len = le16toh(csum_hdr.len); + csum_hdr.ilen = le16toh(csum_hdr.ilen); + csum_hdr.cstatus = le16toh(csum_hdr.cstatus); + if ((AXE_CSUM_RXBYTES(csum_hdr.len) ^ + AXE_CSUM_RXBYTES(csum_hdr.ilen)) != + sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + /* + * Get total transferred frame length including + * checksum header. The length should be multiple + * of 4. + */ + len = sizeof(csum_hdr) + AXE_CSUM_RXBYTES(csum_hdr.len); + len = (len + 3) & ~3; + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos + sizeof(csum_hdr), + AXE_CSUM_RXBYTES(csum_hdr.len), &csum_hdr); + pos += len; + } + } else + axe_rxeof(ue, pc, 0, actlen, NULL); + + if (error != 0) + ue->ue_ifp->if_ierrors++; + return (error); +} + +static int +axe_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset, + unsigned int len, struct axe_csum_hdr *csum_hdr) +{ + struct ifnet *ifp = ue->ue_ifp; + struct mbuf *m; + + if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) { + ifp->if_ierrors++; + return (EINVAL); + } + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + ifp->if_iqdrops++; + return (ENOMEM); + } + m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); + + usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); + + ifp->if_ipackets++; + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = len; + + if (csum_hdr != NULL && csum_hdr->cstatus & AXE_CSUM_HDR_L3_TYPE_IPV4) { + if ((csum_hdr->cstatus & (AXE_CSUM_HDR_L4_CSUM_ERR | + AXE_CSUM_HDR_L3_CSUM_ERR)) == 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | + CSUM_IP_VALID; + if ((csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_TCP || + (csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_UDP) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } + } + + _IF_ENQUEUE(&ue->ue_rxq, m); + return (0); +} + #if ((AXE_BULK_BUF_SIZE >= 0x10000) || (AXE_BULK_BUF_SIZE < (MCLBYTES+4))) #error "Please update axe_bulk_write_callback()!" #endif @@ -1040,6 +1192,21 @@ tr_setup: if (AXE_IS_178_FAMILY(sc)) { hdr.len = htole16(m->m_pkthdr.len); hdr.ilen = ~hdr.len; + /* + * If upper stack computed checksum, driver + * should tell controller not to insert + * computed checksum for checksum offloading + * enabled controller. + */ + if (ifp->if_capabilities & IFCAP_TXCSUM) { + if ((m->m_pkthdr.csum_flags & + AXE_CSUM_FEATURES) != 0) + hdr.len |= htole16( + AXE_TX_CSUM_PSEUDO_HDR); + else + hdr.len |= htole16( + AXE_TX_CSUM_DIS); + } usbd_copy_in(pc, pos, &hdr, sizeof(hdr)); pos += sizeof(hdr); usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); @@ -1131,6 +1298,34 @@ axe_start(struct usb_ether *ue) } static void +axe_csum_cfg(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + uint16_t csum1, csum2; + + sc = uether_getsc(ue); + AXE_LOCK_ASSERT(sc, MA_OWNED); + + if ((sc->sc_flags & AXE_FLAG_772B) != 0) { + ifp = uether_getifp(ue); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + csum1 |= AXE_TXCSUM_IP | AXE_TXCSUM_TCP | + AXE_TXCSUM_UDP; + axe_cmd(sc, AXE_772B_CMD_WRITE_TXCSUM, csum2, csum1, NULL); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + csum1 |= AXE_RXCSUM_IP | AXE_RXCSUM_IPVE | + AXE_RXCSUM_TCP | AXE_RXCSUM_UDP | AXE_RXCSUM_ICMP | + AXE_RXCSUM_IGMP; + axe_cmd(sc, AXE_772B_CMD_WRITE_RXCSUM, csum2, csum1, NULL); + } +} + +static void axe_init(struct usb_ether *ue) { struct axe_softc *sc = uether_getsc(ue); @@ -1147,27 +1342,40 @@ axe_init(struct usb_ether *ue) axe_reset(sc); - /* Set MAC address. */ - if (AXE_IS_178_FAMILY(sc)) + /* Set MAC address and transmitter IPG values. */ + if (AXE_IS_178_FAMILY(sc)) { axe_cmd(sc, AXE_178_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - else - axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - - /* Set transmitter IPG values */ - if (AXE_IS_178_FAMILY(sc)) axe_cmd(sc, AXE_178_CMD_WRITE_IPG012, sc->sc_ipgs[2], (sc->sc_ipgs[1] << 8) | (sc->sc_ipgs[0]), NULL); - else { + } else { + axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->sc_ipgs[0], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->sc_ipgs[1], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->sc_ipgs[2], NULL); } - /* AX88772B uses different maximum frame burst configuration. */ - if (sc->sc_flags & AXE_FLAG_772B) + if (AXE_IS_178_FAMILY(sc)) { + sc->sc_flags &= ~(AXE_FLAG_STD_FRAME | AXE_FLAG_CSUM_FRAME); + if ((sc->sc_flags & AXE_FLAG_772B) != 0) + sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK; + else + sc->sc_lenmask = AXE_HDR_LEN_MASK; + if ((sc->sc_flags & AXE_FLAG_772B) != 0 && + (ifp->if_capenable & IFCAP_RXCSUM) != 0) + sc->sc_flags |= AXE_FLAG_CSUM_FRAME; + else + sc->sc_flags |= AXE_FLAG_STD_FRAME; + } + + /* Configure TX/RX checksum offloading. */ + axe_csum_cfg(ue); + + if (sc->sc_flags & AXE_FLAG_772B) { + /* AX88772B uses different maximum frame burst configuration. */ axe_cmd(sc, AXE_772B_CMD_RXCTL_WRITE_CFG, ax88772b_mfb_table[AX88772B_MFB_16K].threshold, ax88772b_mfb_table[AX88772B_MFB_16K].byte_cnt, NULL); + } /* Enable receiver, set RX mode. */ rxmode = (AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE); @@ -1175,11 +1383,17 @@ axe_init(struct usb_ether *ue) if (sc->sc_flags & AXE_FLAG_772B) { /* * Select RX header format type 1. Aligning IP - * header on 4 byte boundary is not needed + * header on 4 byte boundary is not needed when + * checksum offloading feature is not used * because we always copy the received frame in - * RX handler. + * RX handler. When RX checksum offloading is + * active, aligning IP header is required to + * reflect actual frame length including RX + * header size. */ rxmode |= AXE_772B_RXCMD_HDR_TYPE_1; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + rxmode |= AXE_772B_RXCMD_IPHDR_ALIGN; } else { /* * Default Rx buffer size is too small to get @@ -1208,7 +1422,6 @@ axe_init(struct usb_ether *ue) ifp->if_drv_flags |= IFF_DRV_RUNNING; /* Switch to selected media. */ axe_ifmedia_upd(ifp); - axe_start(ue); } static void @@ -1250,3 +1463,45 @@ axe_stop(struct usb_ether *ue) usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]); usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]); } + +static int +axe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct usb_ether *ue = ifp->if_softc; + struct axe_softc *sc; + struct ifreq *ifr; + int error, mask, reinit; + + sc = uether_getsc(ue); + ifr = (struct ifreq *)data; + error = 0; + reinit = 0; + if (cmd == SIOCSIFCAP) { + AXE_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= AXE_CSUM_FEATURES; + else + ifp->if_hwassist &= ~AXE_CSUM_FEATURES; + reinit++; + } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; + reinit++; + } + if (reinit > 0 && ifp->if_drv_flags & IFF_DRV_RUNNING) + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + else + reinit = 0; + AXE_UNLOCK(sc); + if (reinit > 0) + uether_init(ue); + } else + error = uether_ioctl(ifp, cmd, data); + + return (error); +} Modified: head/sys/dev/usb/net/if_axereg.h ============================================================================== --- head/sys/dev/usb/net/if_axereg.h Tue Oct 25 17:10:15 2011 (r226742) +++ head/sys/dev/usb/net/if_axereg.h Tue Oct 25 18:36:18 2011 (r226743) @@ -97,6 +97,10 @@ #define AXE_CMD_WRITE_VLAN_CTRL 0x4028 #define AXE_772B_CMD_RXCTL_WRITE_CFG 0x012A +#define AXE_772B_CMD_READ_RXCSUM 0x002B +#define AXE_772B_CMD_WRITE_RXCSUM 0x012C +#define AXE_772B_CMD_READ_TXCSUM 0x002D +#define AXE_772B_CMD_WRITE_TXCSUM 0x012E #define AXE_SW_RESET_CLEAR 0x00 #define AXE_SW_RESET_RR 0x01 @@ -199,6 +203,40 @@ #define AXE_VLAN_CTRL_VID1_MASK 0x00000FFF #define AXE_VLAN_CTRL_VID2_MASK 0x0FFF0000 +#define AXE_RXCSUM_IP 0x0001 +#define AXE_RXCSUM_IPVE 0x0002 +#define AXE_RXCSUM_IPV6E 0x0004 +#define AXE_RXCSUM_TCP 0x0008 +#define AXE_RXCSUM_UDP 0x0010 +#define AXE_RXCSUM_ICMP 0x0020 +#define AXE_RXCSUM_IGMP 0x0040 +#define AXE_RXCSUM_ICMP6 0x0080 +#define AXE_RXCSUM_TCPV6 0x0100 +#define AXE_RXCSUM_UDPV6 0x0200 +#define AXE_RXCSUM_ICMPV6 0x0400 +#define AXE_RXCSUM_IGMPV6 0x0800 +#define AXE_RXCSUM_ICMP6V6 0x1000 +#define AXE_RXCSUM_FOPC 0x8000 + +#define AXE_RXCSUM_64TE 0x0100 +#define AXE_RXCSUM_PPPOE 0x0200 +#define AXE_RXCSUM_RPCE 0x8000 + +#define AXE_TXCSUM_IP 0x0001 +#define AXE_TXCSUM_TCP 0x0002 +#define AXE_TXCSUM_UDP 0x0004 +#define AXE_TXCSUM_ICMP 0x0008 +#define AXE_TXCSUM_IGMP 0x0010 +#define AXE_TXCSUM_ICMP6 0x0020 +#define AXE_TXCSUM_TCPV6 0x0100 +#define AXE_TXCSUM_UDPV6 0x0200 +#define AXE_TXCSUM_ICMPV6 0x0400 +#define AXE_TXCSUM_IGMPV6 0x0800 +#define AXE_TXCSUM_ICMP6V6 0x1000 + +#define AXE_TXCSUM_64TE 0x0001 +#define AXE_TXCSUM_PPPOE 0x0002 + #define AXE_BULK_BUF_SIZE 16384 /* bytes */ #define AXE_CTL_READ 0x01 @@ -227,9 +265,62 @@ struct ax88772b_mfb { struct axe_sframe_hdr { uint16_t len; +#define AXE_HDR_LEN_MASK 0xFFFF + uint16_t ilen; +} __packed; + +#define AXE_TX_CSUM_PSEUDO_HDR 0x4000 +#define AXE_TX_CSUM_DIS 0x8000 + +/* + * When RX checksum offloading is enabled, AX88772B uses new RX header + * format and it's not compatible with previous RX header format. In + * addition, IP header align option should be enabled to get correct + * frame size including RX header. Total transferred size including + * the RX header is multiple of 4 and controller will pad necessary + * bytes if the length is not multiple of 4. + * This driver does not enable partial checksum feature which will + * compute 16bit checksum from 14th byte to the end of the frame. If + * this feature is enabled, computed checksum value is embedded into + * RX header which in turn means it uses different RX header format. + */ +struct axe_csum_hdr { + uint16_t len; +#define AXE_CSUM_HDR_LEN_MASK 0x07FF +#define AXE_CSUM_HDR_CRC_ERR 0x1000 +#define AXE_CSUM_HDR_MII_ERR 0x2000 +#define AXE_CSUM_HDR_RUNT 0x4000 +#define AXE_CSUM_HDR_BMCAST 0x8000 uint16_t ilen; + uint16_t cstatus; +#define AXE_CSUM_HDR_VLAN_MASK 0x0007 +#define AXE_CSUM_HDR_VLAN_STRIP 0x0008 +#define AXE_CSUM_HDR_VLAN_PRI_MASK 0x0070 +#define AXE_CSUM_HDR_L4_CSUM_ERR 0x0100 +#define AXE_CSUM_HDR_L3_CSUM_ERR 0x0200 +#define AXE_CSUM_HDR_L4_TYPE_UDP 0x0400 +#define AXE_CSUM_HDR_L4_TYPE_ICMP 0x0800 +#define AXE_CSUM_HDR_L4_TYPE_IGMP 0x0C00 +#define AXE_CSUM_HDR_L4_TYPE_TCP 0x1000 +#define AXE_CSUM_HDR_L4_TYPE_TCPV6 0x1400 +#define AXE_CSUM_HDR_L4_TYPE_MASK 0x1C00 +#define AXE_CSUM_HDR_L3_TYPE_IPV4 0x2000 +#define AXE_CSUM_HDR_L3_TYPE_IPV6 0x4000 + +#ifdef AXE_APPEND_PARTIAL_CSUM + /* + * These members present only when partial checksum + * offloading is enabled. The checksum value is simple + * 16bit sum of received frame starting at offset 14 of + * the frame to the end of the frame excluding FCS bytes. + */ + uint16_t csum_value; + uint16_t dummy; +#endif } __packed; +#define AXE_CSUM_RXBYTES(x) ((x) & AXE_CSUM_HDR_LEN_MASK) + #define GET_MII(sc) uether_getmii(&(sc)->sc_ue) /* The interrupt endpoint is currently unused by the ASIX part. */ @@ -247,6 +338,8 @@ struct axe_softc { int sc_flags; #define AXE_FLAG_LINK 0x0001 +#define AXE_FLAG_STD_FRAME 0x0010 +#define AXE_FLAG_CSUM_FRAME 0x0020 #define AXE_FLAG_772 0x1000 /* AX88772 */ #define AXE_FLAG_772A 0x2000 /* AX88772A */ #define AXE_FLAG_772B 0x4000 /* AX88772B */ @@ -255,6 +348,7 @@ struct axe_softc { uint8_t sc_ipgs[3]; uint8_t sc_phyaddrs[2]; uint16_t sc_pwrcfg; + uint16_t sc_lenmask; int sc_tx_bufsz; }; From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 19:04:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32437106564A; Tue, 25 Oct 2011 19:04:57 +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 2280C8FC19; Tue, 25 Oct 2011 19:04:57 +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 p9PJ4vD7010818; Tue, 25 Oct 2011 19:04:57 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PJ4vkl010816; Tue, 25 Oct 2011 19:04:57 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110251904.p9PJ4vkl010816@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 25 Oct 2011 19:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226744 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 19:04:57 -0000 Author: yongari Date: Tue Oct 25 19:04:56 2011 New Revision: 226744 URL: http://svn.freebsd.org/changeset/base/226744 Log: AX88178/AX88772A/AX88772B supports VLAN over-sized frame. Xr vlan. Modified: head/share/man/man4/axe.4 Modified: head/share/man/man4/axe.4 ============================================================================== --- head/share/man/man4/axe.4 Tue Oct 25 18:36:18 2011 (r226743) +++ head/share/man/man4/axe.4 Tue Oct 25 19:04:56 2011 (r226744) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2011 +.Dd October 25, 2011 .Dt AXE 4 .Os .Sh NAME @@ -238,6 +238,7 @@ The driver failed to allocate an mbuf fo .Xr netintro 4 , .Xr ng_ether 4 , .Xr rgephy 4 , +.Xr vlan 4 , .Xr ifconfig 8 .Rs .%T "ASIX AX88x7x and AX88760 data sheets" From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 19:10:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15CB5106564A; Tue, 25 Oct 2011 19:10: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 0630F8FC12; Tue, 25 Oct 2011 19:10: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 p9PJAAjD011319; Tue, 25 Oct 2011 19:10:10 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PJAAmM011317; Tue, 25 Oct 2011 19:10:10 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110251910.p9PJAAmM011317@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 25 Oct 2011 19:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226745 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 19:10:11 -0000 Author: yongari Date: Tue Oct 25 19:10:10 2011 New Revision: 226745 URL: http://svn.freebsd.org/changeset/base/226745 Log: axe(4) got VLAN over-sized frame support. Add axe(4) to the list of interfaces that support VLAN over-sized frame. Modified: head/share/man/man4/vlan.4 Modified: head/share/man/man4/vlan.4 ============================================================================== --- head/share/man/man4/vlan.4 Tue Oct 25 19:04:56 2011 (r226744) +++ head/share/man/man4/vlan.4 Tue Oct 25 19:10:10 2011 (r226745) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2010 +.Dd October 25, 2011 .Dt VLAN 4 .Os .Sh NAME @@ -166,6 +166,7 @@ filtering that breaks the Path MTU Disco The following interfaces support long frames for .Nm natively: +.Xr axe 4 , .Xr bfe 4 , .Xr cas 4 , .Xr dc 4 , From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 19:22:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCA331065670; Tue, 25 Oct 2011 19:22:47 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id F11348FC0C; Tue, 25 Oct 2011 19:22:46 +0000 (UTC) Received: by eyd10 with SMTP id 10so1157315eyd.13 for ; Tue, 25 Oct 2011 12:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=TmN7mASRc0VAGPts9Sfb0qlY/v+yVpDCussrAk5BT2c=; b=hILOGpRhQ1Vom1GyoyATbJBk3cfHZXWTJ/p2Jlf5GqhiIzsLe41013CxOLCqtlKXnY h34VQgFtApjCvdLkfsWKOdU8BEG079K864W3PJY+fbr6GFls4TKfQGhu3C+4OlHgEwjr N/1OLwf6A4WwsInxLM1sk+GbL6n40EVNw8+/E= MIME-Version: 1.0 Received: by 10.182.86.232 with SMTP id s8mr4591230obz.58.1319570565433; Tue, 25 Oct 2011 12:22:45 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.182.160.97 with HTTP; Tue, 25 Oct 2011 12:22:45 -0700 (PDT) In-Reply-To: <1318862413.55691.12.camel@bauer.cse.buffalo.edu> References: <201110152123.p9FLN5Ht031202@svn.freebsd.org> <1318862413.55691.12.camel@bauer.cse.buffalo.edu> Date: Tue, 25 Oct 2011 23:22:45 +0400 X-Google-Sender-Auth: YF3EjaeImM_QzqpQzyPBrQfFNjA Message-ID: From: Sergey Kandaurov To: Ken Smith Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf sys/sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 19:22:47 -0000 On 17 October 2011 18:40, Ken Smith wrote: > On Sun, 2011-10-16 at 09:24 +0800, Adrian Chadd wrote: >> Hi! >> >> Would you consider leaving these in but just commenting them out? >> >> That way if a user hits a deadlock or memory corruption issue, we can >> just say "uncomment the section marked _debugging_ in your config >> file." >> >> Thanks, > > I'm not completely against it. =A0My *slight* hesitation in doing it woul= d > be that from my experience these knobs aren't a one-size-fits-all thing > for people trying to debug stuff in production. =A0So you sorta need to > know a bit more about what you're doing when fiddling with them. > > Turning them all on is probably OK for a workstation user but less > likely to be OK for a server admin. =A0Some may want/need to add in > KDB_UNATTENDED depending on their circumstances, etc. > Hi. In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC kernels (added in r214326, I guess they are needed for printing a stack trace on panic). Were these options removed intentionally in this commit? --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 19:45:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD111065678; Tue, 25 Oct 2011 19:45:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E9898FC0A; Tue, 25 Oct 2011 19:45:13 +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 p9PJjCB3013817; Tue, 25 Oct 2011 19:45:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PJjCHi013801; Tue, 25 Oct 2011 19:45:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201110251945.p9PJjCHi013801@svn.freebsd.org> From: John Baldwin Date: Tue, 25 Oct 2011 19:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226746 - in head/sys/boot: i386/boot2 i386/btx/lib i386/common i386/libi386 pc98/boot2 pc98/btx/lib pc98/libpc98 pc98/loader X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 19:45:13 -0000 Author: jhb Date: Tue Oct 25 19:45:12 2011 New Revision: 226746 URL: http://svn.freebsd.org/changeset/base/226746 Log: Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for the carry and zero flags being set, respectively, in and use them throughout the x86 boot code. Modified: head/sys/boot/i386/boot2/boot2.c head/sys/boot/i386/btx/lib/btxv86.h head/sys/boot/i386/common/cons.c head/sys/boot/i386/common/drv.c head/sys/boot/i386/libi386/bioscd.c head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/i386/libi386/biosmem.c head/sys/boot/i386/libi386/biospci.c head/sys/boot/i386/libi386/biossmap.c head/sys/boot/i386/libi386/vidconsole.c head/sys/boot/pc98/boot2/boot2.c head/sys/boot/pc98/btx/lib/btxv86.h head/sys/boot/pc98/libpc98/bioscd.c head/sys/boot/pc98/libpc98/vidconsole.c head/sys/boot/pc98/loader/main.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/boot2/boot2.c Tue Oct 25 19:45:12 2011 (r226746) @@ -24,7 +24,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include @@ -85,8 +84,6 @@ __FBSDID("$FreeBSD$"); #define NDEV 3 #define MEM_BASE 0x12 #define MEM_EXT 0x15 -#define V86_CY(x) ((x) & PSL_C) -#define V86_ZR(x) ((x) & PSL_Z) #define DRV_HARD 0x80 #define DRV_MASK 0x7f Modified: head/sys/boot/i386/btx/lib/btxv86.h ============================================================================== --- head/sys/boot/i386/btx/lib/btxv86.h Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/btx/lib/btxv86.h Tue Oct 25 19:45:12 2011 (r226746) @@ -21,6 +21,7 @@ #define _BTXV86_H_ #include +#include #define V86_ADDR 0x10000 /* Segment:offset address */ #define V86_CALLF 0x20000 /* Emulate far call */ @@ -57,6 +58,9 @@ extern u_int32_t __args; #define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4) #define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf) +#define V86_CY(x) ((x) & PSL_C) +#define V86_ZR(x) ((x) & PSL_Z) + void __exit(int) __attribute__((__noreturn__)); void __exec(caddr_t, ...); Modified: head/sys/boot/i386/common/cons.c ============================================================================== --- head/sys/boot/i386/common/cons.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/common/cons.c Tue Oct 25 19:45:12 2011 (r226746) @@ -27,8 +27,6 @@ __FBSDID("$FreeBSD$"); #include "util.h" #include "cons.h" -#define V86_ZR(x) ((x) & PSL_Z) - #define SECOND 18 /* Circa that many ticks in a second. */ uint8_t ioctrl = IO_KEYBOARD; Modified: head/sys/boot/i386/common/drv.c ============================================================================== --- head/sys/boot/i386/common/drv.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/common/drv.c Tue Oct 25 19:45:12 2011 (r226746) @@ -19,8 +19,6 @@ __FBSDID("$FreeBSD$"); #include -#include - #include #include "rbx.h" @@ -30,9 +28,6 @@ __FBSDID("$FreeBSD$"); #include "xreadorg.h" #endif -#define V86_CY(x) ((x) & PSL_C) -#define V86_ZR(x) ((x) & PSL_Z) - #ifdef GPT uint64_t drvsize(struct dsk *dskp) Modified: head/sys/boot/i386/libi386/bioscd.c ============================================================================== --- head/sys/boot/i386/libi386/bioscd.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/bioscd.c Tue Oct 25 19:45:12 2011 (r226746) @@ -42,12 +42,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include +#include #include "libi386.h" #define BIOSCD_SECSIZE 2048 @@ -337,7 +337,7 @@ bc_read(int unit, daddr_t dblk, int blks v86.ds = VTOPSEG(&packet); v86.esi = VTOPOFF(&packet); v86int(); - result = (v86.efl & PSL_C); + result = V86_CY(v86.efl); if (result == 0) break; } Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/biosdisk.c Tue Oct 25 19:45:12 2011 (r226746) @@ -250,7 +250,7 @@ bd_int13probe(struct bdinfo *bd) v86.edx = bd->bd_unit; v86int(); - if (!(v86.efl & 0x1) && /* carry clear */ + if (!(V86_CY(v86.efl)) && /* carry clear */ ((v86.edx & 0xff) > ((unsigned)bd->bd_unit & 0x7f))) { /* unit # OK */ if ((v86.ecx & 0x3f) == 0) { /* absurd sector size */ DEBUG("Invalid geometry for unit %d", bd->bd_unit); @@ -264,11 +264,11 @@ bd_int13probe(struct bdinfo *bd) v86.edx = bd->bd_unit; v86.ebx = 0x55aa; v86int(); - if (!(v86.efl & 0x1) && /* carry clear */ + if (!(V86_CY(v86.efl)) && /* carry clear */ ((v86.ebx & 0xffff) == 0xaa55) && /* signature */ (v86.ecx & 0x1)) { /* packets mode ok */ bd->bd_flags |= BD_MODEEDD1; - if((v86.eax & 0xff00) >= 0x3000) + if ((v86.eax & 0xff00) >= 0x3000) bd->bd_flags |= BD_MODEEDD3; } return(1); @@ -562,7 +562,7 @@ bd_opendisk(struct open_disk **odp, stru return (ENOMEM); } - /* Look up BIOS unit number, intialise open_disk structure */ + /* Look up BIOS unit number, initalise open_disk structure */ od->od_dkunit = dev->d_unit; od->od_unit = bdinfo[od->od_dkunit].bd_unit; od->od_flags = bdinfo[od->od_dkunit].bd_flags; @@ -1150,7 +1150,7 @@ bd_edd_io(struct open_disk *od, daddr_t v86.ds = VTOPSEG(&packet); v86.esi = VTOPOFF(&packet); v86int(); - return (v86.efl & 0x1); + return (V86_CY(v86.efl)); } static int @@ -1183,7 +1183,7 @@ bd_chs_io(struct open_disk *od, daddr_t v86.es = VTOPSEG(dest); v86.ebx = VTOPOFF(dest); v86int(); - return (v86.efl & 0x1); + return (V86_CY(v86.efl)); } static int @@ -1311,7 +1311,7 @@ bd_getgeom(struct open_disk *od) v86.edx = od->od_unit; v86int(); - if ((v86.efl & 0x1) || /* carry set */ + if ((V86_CY(v86.efl)) || /* carry set */ ((v86.edx & 0xff) <= (unsigned)(od->od_unit & 0x7f))) /* unit # bad */ return(1); @@ -1348,7 +1348,7 @@ bd_getbigeom(int bunit) v86.eax = 0x800; v86.edx = 0x80 + bunit; v86int(); - if (v86.efl & 0x1) + if (V86_CY(v86.efl)) return 0x4f010f; return ((v86.ecx & 0xc0) << 18) | ((v86.ecx & 0xff00) << 8) | (v86.edx & 0xff00) | (v86.ecx & 0x3f); Modified: head/sys/boot/i386/libi386/biosmem.c ============================================================================== --- head/sys/boot/i386/libi386/biosmem.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/biosmem.c Tue Oct 25 19:45:12 2011 (r226746) @@ -61,7 +61,7 @@ bios_getmem(void) v86.es = VTOPSEG(&smap); v86.edi = VTOPOFF(&smap); v86int(); - if ((v86.efl & 1) || (v86.eax != SMAP_SIG)) + if ((V86_CY(v86.efl)) || (v86.eax != SMAP_SIG)) break; /* look for a low-memory segment that's large enough */ if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0) && @@ -108,7 +108,7 @@ bios_getmem(void) v86.addr = 0x15; /* int 0x15 function 0xe801*/ v86.eax = 0xe801; v86int(); - if (!(v86.efl & 1)) { + if (!(V86_CY(v86.efl))) { bios_extmem = ((v86.ecx & 0xffff) + ((v86.edx & 0xffff) * 64)) * 1024; } } Modified: head/sys/boot/i386/libi386/biospci.c ============================================================================== --- head/sys/boot/i386/libi386/biospci.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/biospci.c Tue Oct 25 19:45:12 2011 (r226746) @@ -218,7 +218,8 @@ biospci_enumerate(void) v86int(); /* Check for OK response */ - if ((v86.efl & 1) || ((v86.eax & 0xff00) != 0) || (v86.edx != 0x20494350)) + if (V86_CY(v86.efl) || ((v86.eax & 0xff00) != 0) || + (v86.edx != 0x20494350)) return; biospci_version = v86.ebx & 0xffff; @@ -295,7 +296,7 @@ biospci_find_devclass(uint32_t class, in v86int(); /* error */ - if ((v86.efl & 1) || (v86.eax & 0xff00)) + if (V86_CY(v86.efl) || (v86.eax & 0xff00)) return (-1); *locator = v86.ebx; @@ -317,7 +318,7 @@ biospci_write_config(uint32_t locator, i v86int(); /* error */ - if ((v86.efl & 1) || (v86.eax & 0xff00)) + if (V86_CY(v86.efl) || (v86.eax & 0xff00)) return (-1); return(0); @@ -334,7 +335,7 @@ biospci_read_config(uint32_t locator, in v86int(); /* error */ - if ((v86.efl & 1) || (v86.eax & 0xff00)) + if (V86_CY(v86.efl) || (v86.eax & 0xff00)) return (-1); *val = v86.ecx; Modified: head/sys/boot/i386/libi386/biossmap.c ============================================================================== --- head/sys/boot/i386/libi386/biossmap.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/biossmap.c Tue Oct 25 19:45:12 2011 (r226746) @@ -36,14 +36,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" -#define V86_CY(x) ((x) & PSL_C) - struct smap_buf { struct bios_smap smap; uint32_t xattr; /* Extended attribute from ACPI 3.0 */ Modified: head/sys/boot/i386/libi386/vidconsole.c ============================================================================== --- head/sys/boot/i386/libi386/vidconsole.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/i386/libi386/vidconsole.c Tue Oct 25 19:45:12 2011 (r226746) @@ -516,7 +516,7 @@ vidc_ischar(void) v86.addr = 0x16; v86.eax = 0x100; v86int(); - return (!(v86.efl & PSL_Z)); + return (!V86_ZR(v86.efl)); } #if KEYBOARD_PROBE Modified: head/sys/boot/pc98/boot2/boot2.c ============================================================================== --- head/sys/boot/pc98/boot2/boot2.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/pc98/boot2/boot2.c Tue Oct 25 19:45:12 2011 (r226746) @@ -26,7 +26,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -85,8 +84,6 @@ __FBSDID("$FreeBSD$"); #define ARGS 0x900 #define NOPT 14 #define NDEV 3 -#define V86_CY(x) ((x) & PSL_C) -#define V86_ZR(x) ((x) & PSL_Z) #define DRV_DISK 0xf0 #define DRV_UNIT 0x0f Modified: head/sys/boot/pc98/btx/lib/btxv86.h ============================================================================== --- head/sys/boot/pc98/btx/lib/btxv86.h Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/pc98/btx/lib/btxv86.h Tue Oct 25 19:45:12 2011 (r226746) @@ -21,6 +21,7 @@ #define _BTXV86_H_ #include +#include #define V86_ADDR 0x10000 /* Segment:offset address */ #define V86_CALLF 0x20000 /* Emulate far call */ @@ -57,6 +58,9 @@ extern u_int32_t __args; #define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4) #define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf) +#define V86_CY(x) ((x) & PSL_C) +#define V86_ZR(x) ((x) & PSL_Z) + void __exit(int) __attribute__((__noreturn__)); void __exec(caddr_t, ...); Modified: head/sys/boot/pc98/libpc98/bioscd.c ============================================================================== --- head/sys/boot/pc98/libpc98/bioscd.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/pc98/libpc98/bioscd.c Tue Oct 25 19:45:12 2011 (r226746) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include @@ -325,7 +324,7 @@ bc_read(int unit, daddr_t dblk, int blks v86.ebp = VTOPOFF(xp); v86.es = VTOPSEG(xp); v86int(); - result = (v86.efl & PSL_C); + result = V86_CY(v86.efl); if (result == 0) break; } Modified: head/sys/boot/pc98/libpc98/vidconsole.c ============================================================================== --- head/sys/boot/pc98/libpc98/vidconsole.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/pc98/libpc98/vidconsole.c Tue Oct 25 19:45:12 2011 (r226746) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "libi386.h" Modified: head/sys/boot/pc98/loader/main.c ============================================================================== --- head/sys/boot/pc98/loader/main.c Tue Oct 25 19:10:10 2011 (r226745) +++ head/sys/boot/pc98/loader/main.c Tue Oct 25 19:45:12 2011 (r226746) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 19:54:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73E3C106566C; Tue, 25 Oct 2011 19:54:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 632B28FC16; Tue, 25 Oct 2011 19:54:06 +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 p9PJs6sa014189; Tue, 25 Oct 2011 19:54:06 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PJs6g5014181; Tue, 25 Oct 2011 19:54:06 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201110251954.p9PJs6g5014181@svn.freebsd.org> From: John Baldwin Date: Tue, 25 Oct 2011 19:54:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226748 - in head/sys/boot/i386: common libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 19:54:06 -0000 Author: jhb Date: Tue Oct 25 19:54:06 2011 New Revision: 226748 URL: http://svn.freebsd.org/changeset/base/226748 Log: - Add a new header for the x86 boot code that defines various structures and constants related to the BIOS Enhanced Disk Drive Specification. - Use this header instead of magic numbers and various duplicate structure definitions for doing I/O. - Use an actual structure for the request to fetch drive parameters in drvsize() rather than a gross hack of a char array with some magic size. While here, change drvsize() to only pass the 1.1 version of the structure and not request device path information. If we want device path information you have to set the length of the device path information as an input (along with probably checking the actual EDD version to see which size one should use as the device path information is variable-length). This fixes data smashing problems from passing an EDD 3 structure to BIOSes supporting EDD 4. Reviewed by: avg Tested by: Dennis Koegel dk neveragain.de MFC after: 1 week Added: head/sys/boot/i386/common/edd.h (contents, props changed) Modified: head/sys/boot/i386/common/drv.c head/sys/boot/i386/libi386/Makefile head/sys/boot/i386/libi386/bioscd.c head/sys/boot/i386/libi386/biosdisk.c head/sys/boot/i386/libi386/libi386.h Modified: head/sys/boot/i386/common/drv.c ============================================================================== --- head/sys/boot/i386/common/drv.c Tue Oct 25 19:47:28 2011 (r226747) +++ head/sys/boot/i386/common/drv.c Tue Oct 25 19:54:06 2011 (r226748) @@ -24,43 +24,36 @@ __FBSDID("$FreeBSD$"); #include "rbx.h" #include "util.h" #include "drv.h" +#include "edd.h" #ifdef USE_XREAD #include "xreadorg.h" #endif #ifdef GPT +static struct edd_params params; + uint64_t drvsize(struct dsk *dskp) { - unsigned char params[0x42]; - uint64_t sectors; - - *(uint32_t *)params = sizeof(params); + params.len = sizeof(struct edd_params); v86.ctl = V86_FLAGS; v86.addr = 0x13; v86.eax = 0x4800; v86.edx = dskp->drive; - v86.ds = VTOPSEG(params); - v86.esi = VTOPOFF(params); + v86.ds = VTOPSEG(¶ms); + v86.esi = VTOPOFF(¶ms); v86int(); if (V86_CY(v86.efl)) { printf("error %u\n", v86.eax >> 8 & 0xff); return (0); } - memcpy(§ors, params + 0x10, sizeof(sectors)); - return (sectors); + return (params.sectors); } #endif /* GPT */ #ifndef USE_XREAD -static struct { - uint16_t len; - uint16_t count; - uint16_t off; - uint16_t seg; - uint64_t lba; -} packet; +static struct edd_packet packet; #endif int @@ -71,7 +64,7 @@ drvread(struct dsk *dskp, void *buf, dad if (!OPT_CHECK(RBX_QUIET)) printf("%c\b", c = c << 8 | c >> 24); #ifndef USE_XREAD - packet.len = 0x10; + packet.len = sizeof(struct edd_packet); packet.count = nblk; packet.off = VTOPOFF(buf); packet.seg = VTOPSEG(buf); @@ -105,7 +98,7 @@ int drvwrite(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk) { - packet.len = 0x10; + packet.len = sizeof(struct edd_packet); packet.count = nblk; packet.off = VTOPOFF(buf); packet.seg = VTOPSEG(buf); Added: head/sys/boot/i386/common/edd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/common/edd.h Tue Oct 25 19:54:06 2011 (r226748) @@ -0,0 +1,110 @@ +/*- + * Copyright (c) 2011 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _EDD_H_ +#define _EDD_H_ + +/* Supported interfaces for "Check Extensions Present". */ +#define EDD_INTERFACE_FIXED_DISK 0x01 +#define EDD_INTERFACE_EJECT 0x02 +#define EDD_INTERFACE_EDD 0x04 + +struct edd_packet { + uint16_t len; + uint16_t count; + uint16_t off; + uint16_t seg; + uint64_t lba; +}; + +struct edd_packet_v3 { + uint16_t len; + uint16_t count; + uint16_t off; + uint16_t seg; + uint64_t lba; + uint64_t phys_addr; +}; + +struct edd_params { + uint16_t len; + uint16_t flags; + uint32_t cylinders; + uint32_t heads; + uint32_t sectors_per_track; + uint64_t sectors; + uint16_t sector_size; + uint16_t edd_params_seg; + uint16_t edd_params_off; +}; + +struct edd_device_path_v3 { + uint16_t key; + uint8_t len; + uint8_t reserved[3]; + char host_bus[4]; + char interface[8]; + uint64_t interface_path; + uint64_t device_path; + uint8_t reserved2[1]; + uint8_t checksum; +}; + +struct edd_params_v3 { + struct edd_params params; + struct edd_device_path_v3 device_path; +}; + +struct edd_device_path_v4 { + uint16_t key; + uint8_t len; + uint8_t reserved[3]; + char host_bus[4]; + char interface[8]; + uint64_t interface_path; + uint64_t device_path[2]; + uint8_t reserved2[1]; + uint8_t checksum; +}; + +struct edd_params_v4 { + struct edd_params params; + struct edd_device_path_v4 device_path; +}; + +#define EDD_FLAGS_DMA_BOUNDARY_HANDLING 0x0001 +#define EDD_FLAGS_REMOVABLE_MEDIA 0x0002 +#define EDD_FLAGS_WRITE_VERIFY 0x0004 +#define EDD_FLAGS_MEDIA_CHANGE_NOTIFICATION 0x0008 +#define EDD_FLAGS_LOCKABLE_MEDIA 0x0010 +#define EDD_FLAGS_NO_MEDIA_PRESENT 0x0020 + +#define EDD_DEVICE_PATH_KEY 0xbedd + +#endif /* !_EDD_H_ */ Modified: head/sys/boot/i386/libi386/Makefile ============================================================================== --- head/sys/boot/i386/libi386/Makefile Tue Oct 25 19:47:28 2011 (r226747) +++ head/sys/boot/i386/libi386/Makefile Tue Oct 25 19:54:06 2011 (r226748) @@ -47,7 +47,8 @@ CFLAGS+= -DTERM_EMU # XXX: make alloca() useable CFLAGS+= -Dalloca=__builtin_alloca -CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../btx/lib \ +CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../common \ + -I${.CURDIR}/../btx/lib \ -I${.CURDIR}/../../../contrib/dev/acpica/include \ -I${.CURDIR}/../../.. -I. # the location of libstand Modified: head/sys/boot/i386/libi386/bioscd.c ============================================================================== --- head/sys/boot/i386/libi386/bioscd.c Tue Oct 25 19:47:28 2011 (r226747) +++ head/sys/boot/i386/libi386/bioscd.c Tue Oct 25 19:54:06 2011 (r226748) @@ -325,9 +325,9 @@ bc_read(int unit, daddr_t dblk, int blks v86int(); } - packet.len = 0x10; + packet.len = sizeof(struct edd_packet); packet.count = x; - packet.offset = VTOPOFF(xp); + packet.off = VTOPOFF(xp); packet.seg = VTOPSEG(xp); packet.lba = dblk; v86.ctl = V86_FLAGS; Modified: head/sys/boot/i386/libi386/biosdisk.c ============================================================================== --- head/sys/boot/i386/libi386/biosdisk.c Tue Oct 25 19:47:28 2011 (r226747) +++ head/sys/boot/i386/libi386/biosdisk.c Tue Oct 25 19:54:06 2011 (r226748) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "libi386.h" #define BIOS_NUMDRIVES 0x475 @@ -266,7 +267,7 @@ bd_int13probe(struct bdinfo *bd) v86int(); if (!(V86_CY(v86.efl)) && /* carry clear */ ((v86.ebx & 0xffff) == 0xaa55) && /* signature */ - (v86.ecx & 0x1)) { /* packets mode ok */ + (v86.ecx & EDD_INTERFACE_FIXED_DISK)) { /* packets mode ok */ bd->bd_flags |= BD_MODEEDD1; if ((v86.eax & 0xff00) >= 0x3000) bd->bd_flags |= BD_MODEEDD3; @@ -1134,9 +1135,9 @@ bd_edd_io(struct open_disk *od, daddr_t { static struct edd_packet packet; - packet.len = 0x10; + packet.len = sizeof(struct edd_packet); packet.count = blks; - packet.offset = VTOPOFF(dest); + packet.off = VTOPOFF(dest); packet.seg = VTOPSEG(dest); packet.lba = dblk; v86.ctl = V86_FLAGS; Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Tue Oct 25 19:47:28 2011 (r226747) +++ head/sys/boot/i386/libi386/libi386.h Tue Oct 25 19:54:06 2011 (r226748) @@ -52,14 +52,6 @@ struct i386_devdesc } d_kind; }; -struct edd_packet { - uint16_t len; - uint16_t count; - uint16_t offset; - uint16_t seg; - uint64_t lba; -}; - int i386_getdev(void **vdev, const char *devspec, const char **path); char *i386_fmtdev(void *vdev); int i386_setcurrdev(struct env_var *ev, int flags, const void *value); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 20:45:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C90CD106566B; Tue, 25 Oct 2011 20:45:14 +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 B971F8FC08; Tue, 25 Oct 2011 20:45:14 +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 p9PKjEr1015798; Tue, 25 Oct 2011 20:45:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PKjEaV015796; Tue, 25 Oct 2011 20:45:14 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201110252045.p9PKjEaV015796@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 25 Oct 2011 20:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226749 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 20:45:14 -0000 Author: yongari Date: Tue Oct 25 20:45:14 2011 New Revision: 226749 URL: http://svn.freebsd.org/changeset/base/226749 Log: Whitespace nits. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Oct 25 19:54:06 2011 (r226748) +++ head/sys/dev/bge/if_bge.c Tue Oct 25 20:45:14 2011 (r226749) @@ -2985,9 +2985,9 @@ bge_attach(device_t dev) sc->bge_flags |= BGE_FLAG_TSO; } - /* + /* * Check if this is a PCI-X or PCI Express device. - */ + */ if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { /* * Found a PCI Express capabilities register, this @@ -3995,7 +3995,7 @@ bge_intr_task(void *arg, int pending) if (ifp->if_drv_flags & IFF_DRV_RUNNING) { /* Check TX ring producer/consumer. */ bge_txeof(sc, tx_cons); - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) bge_start_locked(ifp); } BGE_UNLOCK(sc); @@ -4112,7 +4112,7 @@ bge_tick(void *xsc) /* Synchronize with possible callout reset/stop. */ if (callout_pending(&sc->bge_stat_ch) || !callout_active(&sc->bge_stat_ch)) - return; + return; if (BGE_IS_5705_PLUS(sc)) bge_stats_update_regs(sc); @@ -5036,7 +5036,7 @@ bge_ioctl(struct ifnet *ifp, u_long comm break; } } else if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU) { - error = EINVAL; + error = EINVAL; break; } BGE_LOCK(sc); From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 21:48:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 649AE106566C; Tue, 25 Oct 2011 21:48:46 +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 488A18FC0A; Tue, 25 Oct 2011 21:48:46 +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 p9PLmkgg017766; Tue, 25 Oct 2011 21:48:46 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLmkKm017758; Tue, 25 Oct 2011 21:48:46 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201110252148.p9PLmkKm017758@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 25 Oct 2011 21:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226750 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 21:48:46 -0000 Author: edwin Date: Tue Oct 25 21:48:45 2011 New Revision: 226750 URL: http://svn.freebsd.org/changeset/base/226750 Log: Vendor import of tzdata2011m Europe: - Pridnestrovian Moldavian Republic (PMR, also known as "Pridnestrovie") has abolished seasonal clock change (no transition to the Winter Time). - The recent change to the Ukranian time zone (Europe/Kiev) to introduce permanent daylight saving time (similar to Russia) was reverted. South America: - Bahia: The President signed a decree that includes Bahia in summer time. zone.tab: - Add Europe/Tiraspol Pridnestrovie Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/backward vendor/tzdata/dist/europe vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Tue Oct 25 20:45:14 2011 (r226749) +++ vendor/tzdata/dist/asia Tue Oct 25 21:48:45 2011 (r226750) @@ -1,4 +1,4 @@ -# @(#)asia 8.68 +# @(#)asia 8.69 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Tue Oct 25 20:45:14 2011 (r226749) +++ vendor/tzdata/dist/australasia Tue Oct 25 21:48:45 2011 (r226750) @@ -1,5 +1,5 @@ #
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: vendor/tzdata/dist/backward
==============================================================================
--- vendor/tzdata/dist/backward	Tue Oct 25 20:45:14 2011	(r226749)
+++ vendor/tzdata/dist/backward	Tue Oct 25 21:48:45 2011	(r226750)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: vendor/tzdata/dist/europe
==============================================================================
--- vendor/tzdata/dist/europe	Tue Oct 25 20:45:14 2011	(r226749)
+++ vendor/tzdata/dist/europe	Tue Oct 25 21:48:45 2011	(r226750)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: vendor/tzdata/dist/northamerica
==============================================================================
--- vendor/tzdata/dist/northamerica	Tue Oct 25 20:45:14 2011	(r226749)
+++ vendor/tzdata/dist/northamerica	Tue Oct 25 21:48:45 2011	(r226750)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: vendor/tzdata/dist/southamerica
==============================================================================
--- vendor/tzdata/dist/southamerica	Tue Oct 25 20:45:14 2011	(r226749)
+++ vendor/tzdata/dist/southamerica	Tue Oct 25 21:48:45 2011	(r226750)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Tue Oct 25 20:45:14 2011	(r226749)
+++ vendor/tzdata/dist/zone.tab	Tue Oct 25 21:48:45 2011	(r226750)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 21:51:35 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0DE9F1065675;
	Tue, 25 Oct 2011 21:51:35 +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 D8A598FC19;
	Tue, 25 Oct 2011 21:51:34 +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 p9PLpY5F017897;
	Tue, 25 Oct 2011 21:51:34 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLpY30017896;
	Tue, 25 Oct 2011 21:51:34 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110252151.p9PLpY30017896@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 25 Oct 2011 21:51:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226751 - vendor/tzdata/tzdata2011m
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 21:51:35 -0000

Author: edwin
Date: Tue Oct 25 21:51:34 2011
New Revision: 226751
URL: http://svn.freebsd.org/changeset/base/226751

Log:
  Tag of tzdata2011m

Added:
  vendor/tzdata/tzdata2011m/
     - copied from r226750, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 21:53:43 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 88BDF106566C;
	Tue, 25 Oct 2011 21:53:43 +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 6D5578FC0A;
	Tue, 25 Oct 2011 21:53:43 +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 p9PLrhIK018016;
	Tue, 25 Oct 2011 21:53:43 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLrhQP018008;
	Tue, 25 Oct 2011 21:53:43 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110252153.p9PLrhQP018008@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 25 Oct 2011 21:53:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226752 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 21:53:43 -0000

Author: edwin
Date: Tue Oct 25 21:53:43 2011
New Revision: 226752
URL: http://svn.freebsd.org/changeset/base/226752

Log:
  MFV of r226750, tzdata2011m
  
  Europe:
  - Pridnestrovian Moldavian Republic (PMR, also known as
    "Pridnestrovie") has abolished seasonal clock change (no transition
    to the Winter Time).
  - The recent change to the Ukranian time zone (Europe/Kiev) to
    introduce permanent daylight saving time (similar to Russia) was
    reverted.
  
  South America:
  - Bahia: The President signed a decree that includes Bahia in summer
    time.
  
  zone.tab:
  - Add Europe/Tiraspol Pridnestrovie
  
  Obtained from:  ftp://ftp.iana.org/tz/releases/

Modified:
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/backward
  head/contrib/tzdata/europe
  head/contrib/tzdata/northamerica
  head/contrib/tzdata/southamerica
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/asia
==============================================================================
--- head/contrib/tzdata/asia	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/asia	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,4 +1,4 @@
-# @(#)asia	8.68
+# @(#)asia	8.69
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/australasia
==============================================================================
--- head/contrib/tzdata/australasia	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/australasia	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/backward
==============================================================================
--- head/contrib/tzdata/backward	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/backward	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/europe	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: head/contrib/tzdata/northamerica
==============================================================================
--- head/contrib/tzdata/northamerica	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/northamerica	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: head/contrib/tzdata/southamerica
==============================================================================
--- head/contrib/tzdata/southamerica	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/southamerica	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Tue Oct 25 21:51:34 2011	(r226751)
+++ head/contrib/tzdata/zone.tab	Tue Oct 25 21:53:43 2011	(r226752)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 21:58:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37FC2106566B;
	Tue, 25 Oct 2011 21:58:30 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 258488FC08;
	Tue, 25 Oct 2011 21:58:30 +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 p9PLwU1f018243;
	Tue, 25 Oct 2011 21:58:30 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLwT5Q018235;
	Tue, 25 Oct 2011 21:58:29 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110252158.p9PLwT5Q018235@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 25 Oct 2011 21:58: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: r226753 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 21:58:30 -0000

Author: edwin
Date: Tue Oct 25 21:58:29 2011
New Revision: 226753
URL: http://svn.freebsd.org/changeset/base/226753

Log:
  MFC of 226752, tzdata2011m
  
  Europe:
  - Pridnestrovian Moldavian Republic (PMR, also known as
    "Pridnestrovie") has abolished seasonal clock change (no transition
    to the Winter Time).
  - The recent change to the Ukranian time zone (Europe/Kiev) to
    introduce permanent daylight saving time (similar to Russia) was
    reverted.
  
  South America:
  - Bahia: The President signed a decree that includes Bahia in summer
    time.
  
  zone.tab:
  - Add Europe/Tiraspol Pridnestrovie
  
  Obtained from:  ftp://ftp.iana.org/tz/releases/

Modified:
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/backward
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/northamerica
  stable/8/share/zoneinfo/southamerica
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/asia
==============================================================================
--- stable/8/share/zoneinfo/asia	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/asia	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,4 +1,4 @@
-# @(#)asia	8.68
+# @(#)asia	8.69
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/8/share/zoneinfo/australasia
==============================================================================
--- stable/8/share/zoneinfo/australasia	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/australasia	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/8/share/zoneinfo/backward
==============================================================================
--- stable/8/share/zoneinfo/backward	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/backward	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/europe	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: stable/8/share/zoneinfo/northamerica
==============================================================================
--- stable/8/share/zoneinfo/northamerica	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/northamerica	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/southamerica	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Tue Oct 25 21:53:43 2011	(r226752)
+++ stable/8/share/zoneinfo/zone.tab	Tue Oct 25 21:58:29 2011	(r226753)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 21:59:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1DC401065677;
	Tue, 25 Oct 2011 21:59:25 +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 0B5048FC17;
	Tue, 25 Oct 2011 21:59:25 +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 p9PLxOeu018325;
	Tue, 25 Oct 2011 21:59:24 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PLxO3A018316;
	Tue, 25 Oct 2011 21:59:24 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110252159.p9PLxO3A018316@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 25 Oct 2011 21:59: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: r226754 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 21:59:25 -0000

Author: edwin
Date: Tue Oct 25 21:59:24 2011
New Revision: 226754
URL: http://svn.freebsd.org/changeset/base/226754

Log:
  MFC of 226752, tzdata2011m
  
  Europe:
  - Pridnestrovian Moldavian Republic (PMR, also known as
    "Pridnestrovie") has abolished seasonal clock change (no transition
    to the Winter Time).
  - The recent change to the Ukranian time zone (Europe/Kiev) to
    introduce permanent daylight saving time (similar to Russia) was
    reverted.
  
  South America:
  - Bahia: The President signed a decree that includes Bahia in summer
    time.
  
  zone.tab:
  - Add Europe/Tiraspol Pridnestrovie
  
  Obtained from:  ftp://ftp.iana.org/tz/releases/

Modified:
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/backward
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/northamerica
  stable/7/share/zoneinfo/southamerica
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/asia	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,4 +1,4 @@
-# @(#)asia	8.68
+# @(#)asia	8.69
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/7/share/zoneinfo/australasia
==============================================================================
--- stable/7/share/zoneinfo/australasia	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/australasia	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/7/share/zoneinfo/backward
==============================================================================
--- stable/7/share/zoneinfo/backward	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/backward	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/europe	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: stable/7/share/zoneinfo/northamerica
==============================================================================
--- stable/7/share/zoneinfo/northamerica	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/northamerica	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/southamerica	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Oct 25 21:58:29 2011	(r226753)
+++ stable/7/share/zoneinfo/zone.tab	Tue Oct 25 21:59:24 2011	(r226754)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 22:02:53 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 28B03106564A;
	Tue, 25 Oct 2011 22:02:53 +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 1628C8FC12;
	Tue, 25 Oct 2011 22:02:53 +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 p9PM2q0d018508;
	Tue, 25 Oct 2011 22:02:52 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PM2qDi018500;
	Tue, 25 Oct 2011 22:02:52 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110252202.p9PM2qDi018500@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 25 Oct 2011 22:02:52 +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: r226755 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 22:02:53 -0000

Author: edwin
Date: Tue Oct 25 22:02:52 2011
New Revision: 226755
URL: http://svn.freebsd.org/changeset/base/226755

Log:
  MFC of 226752, tzdata2011m
  
  Europe:
  - Pridnestrovian Moldavian Republic (PMR, also known as
    "Pridnestrovie") has abolished seasonal clock change (no transition
    to the Winter Time).
  - The recent change to the Ukranian time zone (Europe/Kiev) to
    introduce permanent daylight saving time (similar to Russia) was
    reverted.
  
  South America:
  - Bahia: The President signed a decree that includes Bahia in summer
    time.
  
  zone.tab:
  - Add Europe/Tiraspol Pridnestrovie
  
  Obtained from:	ftp://ftp.iana.org/tz/releases/

Modified:
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/australasia
  stable/6/share/zoneinfo/backward
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/northamerica
  stable/6/share/zoneinfo/southamerica
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/asia	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,4 +1,4 @@
-# @(#)asia	8.68
+# @(#)asia	8.69
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/6/share/zoneinfo/australasia
==============================================================================
--- stable/6/share/zoneinfo/australasia	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/australasia	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/6/share/zoneinfo/backward
==============================================================================
--- stable/6/share/zoneinfo/backward	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/backward	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/europe	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: stable/6/share/zoneinfo/northamerica
==============================================================================
--- stable/6/share/zoneinfo/northamerica	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/northamerica	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/southamerica	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Tue Oct 25 21:59:24 2011	(r226754)
+++ stable/6/share/zoneinfo/zone.tab	Tue Oct 25 22:02:52 2011	(r226755)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -258,6 +258,7 @@ LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
 MD	+4700+02850	Europe/Chisinau
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:01:53 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 921F71065673;
	Tue, 25 Oct 2011 23:01:53 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 811088FC08;
	Tue, 25 Oct 2011 23:01:53 +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 p9PN1rve020534;
	Tue, 25 Oct 2011 23:01:53 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PN1rJS020532;
	Tue, 25 Oct 2011 23:01:53 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252301.p9PN1rJS020532@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:01:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226758 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:01:53 -0000

Author: adrian
Date: Tue Oct 25 23:01:53 2011
New Revision: 226758
URL: http://svn.freebsd.org/changeset/base/226758

Log:
  Reduce the NF wait timeout. When doing heavy 11n RX loads, this can actually
  interfere with traffic, as the NF load can take quite a while and poking the
  AGC every 10uS is just a bit silly.
  
  Instead, just leave the baseband NF calibration where it is and just read it
  back next time a longcal interval happens.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Tue Oct 25 22:47:36 2011	(r226757)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c	Tue Oct 25 23:01:53 2011	(r226758)
@@ -642,7 +642,15 @@ ar5416LoadNF(struct ath_hal *ah, const s
 	OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
 
 	/* Wait for load to complete, should be fast, a few 10s of us. */
-	if (! ar5212WaitNFCalComplete(ah, 1000)) {
+	/*
+	 * XXX For now, don't be so aggressive in waiting for the NF
+	 * XXX load to complete. A very busy 11n RX load will cause this
+	 * XXX to always fail; so just leave it.
+	 * XXX Later on we may wish to split longcal into two parts - one to do
+	 * XXX the initial longcal, and one to load in an updated NF value
+	 * XXX once it's finished - say, by checking it every 500ms.
+	 */
+	if (! ar5212WaitNFCalComplete(ah, 5)) {
 		/*
 		 * We timed out waiting for the noisefloor to load, probably due to an
 		 * in-progress rx. Simply return here and allow the load plenty of time

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:09:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 96D83106566C;
	Tue, 25 Oct 2011 23:09:07 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 855808FC08;
	Tue, 25 Oct 2011 23:09:07 +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 p9PN97j4020781;
	Tue, 25 Oct 2011 23:09:07 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PN97n9020775;
	Tue, 25 Oct 2011 23:09:07 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252309.p9PN97n9020775@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:09:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226759 - in head/sys/dev/ath/ath_hal: . ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:09:07 -0000

Author: adrian
Date: Tue Oct 25 23:09:07 2011
New Revision: 226759
URL: http://svn.freebsd.org/changeset/base/226759

Log:
  Add some 11n bits from the if_ath_tx 11n branch:
  
  * Add the TID field in the TX status descriptor;
  * Add in the 11n first/middle/last functions for fiddling
    with the descriptors. These are from the Linux and the
    reference driver, but I'm not (currently) using them.
  * Add further AR_ISR_S5 register definitions.
  
  Obtained from:	Linux ath9k, Atheros

Modified:
  head/sys/dev/ath/ath_hal/ah_desc.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h

Modified: head/sys/dev/ath/ath_hal/ah_desc.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_desc.h	Tue Oct 25 23:01:53 2011	(r226758)
+++ head/sys/dev/ath/ath_hal/ah_desc.h	Tue Oct 25 23:09:07 2011	(r226759)
@@ -50,6 +50,7 @@ struct ath_tx_status {
 /* #define ts_rssi ts_rssi_combined */
 	uint32_t   	ts_ba_low;	/* blockack bitmap low */
 	uint32_t   	ts_ba_high;	/* blockack bitmap high */
+	uint8_t		ts_tid;		/* TID */
 	uint32_t  	ts_evm0;	/* evm bytes */
 	uint32_t   	ts_evm1;
 	uint32_t   	ts_evm2;

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416.h	Tue Oct 25 23:01:53 2011	(r226758)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h	Tue Oct 25 23:09:07 2011	(r226759)
@@ -339,8 +339,14 @@ extern	u_int ar5416GetGlobalTxTimeout(st
 extern	void ar5416Set11nRateScenario(struct ath_hal *ah, struct ath_desc *ds,
 		u_int durUpdateEn, u_int rtsctsRate, HAL_11N_RATE_SERIES series[],
 		u_int nseries, u_int flags);
+
+extern void ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds,
+		u_int aggrLen, u_int numDelims);
 extern	void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims);
+extern void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds);
+
 extern	void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds);
+
 extern	void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration);
 
 extern	const HAL_RATE_TABLE *ar5416GetRateTable(struct ath_hal *, u_int mode);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Oct 25 23:01:53 2011	(r226758)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Oct 25 23:09:07 2011	(r226759)
@@ -504,6 +504,7 @@ ar5416ProcTxDesc(struct ath_hal *ah,
 	/* Update software copies of the HW status */
 	ts->ts_seqnum = MS(ds_txstatus[9], AR_SeqNum);
 	ts->ts_tstamp = AR_SendTimestamp(ds_txstatus);
+	ts->ts_tid = MS(ds_txstatus[9], AR_TxTid);
 
 	ts->ts_status = 0;
 	if (ds_txstatus[1] & AR_ExcessiveRetries)
@@ -692,6 +693,19 @@ ar5416Set11nRateScenario(struct ath_hal 
 }
 
 void
+ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds,
+    u_int aggrLen, u_int numDelims)
+{
+	struct ar5416_desc *ads = AR5416DESC(ds);
+
+	ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
+
+	ads->ds_ctl6 &= ~(AR_AggrLen | AR_PadDelim);
+	ads->ds_ctl6 |= SM(aggrLen, AR_AggrLen) |
+	    SM(numDelims, AR_PadDelim);
+}
+
+void
 ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims)
 {
 	struct ar5416_desc *ads = AR5416DESC(ds);
@@ -711,6 +725,16 @@ ar5416Set11nAggrMiddle(struct ath_hal *a
 }
 
 void
+ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds)
+{
+	struct ar5416_desc *ads = AR5416DESC(ds);
+
+	ads->ds_ctl1 |= AR_IsAggr;
+	ads->ds_ctl1 &= ~AR_MoreAggr;
+	ads->ds_ctl6 &= ~AR_PadDelim;
+}
+
+void
 ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds)
 {
 	struct ar5416_desc *ads = AR5416DESC(ds);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h	Tue Oct 25 23:01:53 2011	(r226758)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h	Tue Oct 25 23:09:07 2011	(r226759)
@@ -302,6 +302,8 @@ struct ar5416_desc {
 #define AR_FinalTxIdx_S     21
 #define AR_TxStatusRsvd82   0x01800000
 #define AR_PowerMgmt        0x02000000
+#define AR_TxTid            0xf0000000
+#define AR_TxTid_S          28
 #define AR_TxStatusRsvd83   0xfc000000
 
 /***********

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Tue Oct 25 23:01:53 2011	(r226758)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Tue Oct 25 23:09:07 2011	(r226759)
@@ -260,7 +260,13 @@
 
 #define	AR_ISR_S5		0x0098
 #define	AR_ISR_S5_S		0x00d8
-#define	AR_ISR_S5_TIM_TIMER	0x00000010
+#define	AR_ISR_S5_GENTIMER7	0x00000080 // Mask for timer 7 trigger
+#define	AR_ISR_S5_TIM_TIMER	0x00000010 // TIM Timer ISR
+#define	AR_ISR_S5_DTIM_TIMER	0x00000020 // DTIM Timer ISR
+#define	AR_ISR_S5_GENTIMER_TRIG	0x0000FF80 // ISR for generic timer trigger 7-15
+#define	AR_ISR_S5_GENTIMER_TRIG_S	0
+#define	AR_ISR_S5_GENTIMER_THRESH	0xFF800000 // ISR for generic timer threshold 7-15
+#define	AR_ISR_S5_GENTIMER_THRESH_S	16
 
 #define	AR_INTR_SPURIOUS	0xffffffff
 #define	AR_INTR_RTC_IRQ		0x00000001	/* rtc in shutdown state */

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:13:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7253E106566C;
	Tue, 25 Oct 2011 23:13:36 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 60E458FC08;
	Tue, 25 Oct 2011 23:13:36 +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 p9PNDahT020967;
	Tue, 25 Oct 2011 23:13:36 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNDatK020962;
	Tue, 25 Oct 2011 23:13:36 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252313.p9PNDatK020962@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:13:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226760 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:13:36 -0000

Author: adrian
Date: Tue Oct 25 23:13:36 2011
New Revision: 226760
URL: http://svn.freebsd.org/changeset/base/226760

Log:
  Save and restore the association ID across interface resets.
  
  Obtained from:	Atheros
  MFC after:	1 week

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212.h
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  head/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Tue Oct 25 23:09:07 2011	(r226759)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h	Tue Oct 25 23:13:36 2011	(r226760)
@@ -252,6 +252,7 @@ struct ath_hal_5212 {
 	uint8_t		ah_macaddr[IEEE80211_ADDR_LEN];
 	uint8_t		ah_bssid[IEEE80211_ADDR_LEN];
 	uint8_t		ah_bssidmask[IEEE80211_ADDR_LEN];
+	uint16_t	ah_assocId;
 
 	/*
 	 * Runtime state.

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Tue Oct 25 23:09:07 2011	(r226759)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Tue Oct 25 23:13:36 2011	(r226760)
@@ -218,8 +218,9 @@ ar5212WriteAssocid(struct ath_hal *ah, c
 {
 	struct ath_hal_5212 *ahp = AH5212(ah);
 
-	/* XXX save bssid for possible re-use on reset */
+	/* save bssid for possible re-use on reset */
 	OS_MEMCPY(ahp->ah_bssid, bssid, IEEE80211_ADDR_LEN);
+	ahp->ah_assocId = assocId;
 	OS_REG_WRITE(ah, AR_BSS_ID0, LE_READ_4(ahp->ah_bssid));
 	OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid+4) |
 				     ((assocId & 0x3fff)<ah_bssid));
-	OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4));
+	OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4) |
+	    (ahp->ah_assocId & 0x3fff) << AR_BSS_ID1_AID_S);
 
 	/* Restore bmiss rssi & count thresholds */
 	OS_REG_WRITE(ah, AR_RSSI_THR, ahp->ah_rssiThr);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Oct 25 23:09:07 2011	(r226759)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Oct 25 23:13:36 2011	(r226760)
@@ -278,9 +278,10 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 	/* Restore previous antenna */
 	OS_REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna);
 
-	/* then our BSSID */
+	/* then our BSSID and associate id */
 	OS_REG_WRITE(ah, AR_BSS_ID0, LE_READ_4(ahp->ah_bssid));
-	OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4));
+	OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4) |
+	    (ahp->ah_assocId & 0x3fff) << AR_BSS_ID1_AID_S);
 
 	/* Restore bmiss rssi & count thresholds */
 	OS_REG_WRITE(ah, AR_RSSI_THR, ahp->ah_rssiThr);

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:14:40 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85945106567A;
	Tue, 25 Oct 2011 23:14:40 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 74E0D8FC15;
	Tue, 25 Oct 2011 23:14:40 +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 p9PNEeVG021034;
	Tue, 25 Oct 2011 23:14:40 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNEejQ021032;
	Tue, 25 Oct 2011 23:14:40 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252314.p9PNEejQ021032@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:14:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226761 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:14:40 -0000

Author: adrian
Date: Tue Oct 25 23:14:40 2011
New Revision: 226761
URL: http://svn.freebsd.org/changeset/base/226761

Log:
  Fix an incorrect flag.
  
  Obtained from:	Atheros

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Tue Oct 25 23:13:36 2011	(r226760)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Tue Oct 25 23:14:40 2011	(r226761)
@@ -284,7 +284,7 @@ ar5416Get11nRxClear(struct ath_hal *ah)
         rxclear |= HAL_RX_CLEAR_CTL_LOW;
     }
     /* extension channel */
-    if (val & AR_DIAG_RXCLEAR_CTL_LOW) {
+    if (val & AR_DIAG_RXCLEAR_EXT_LOW) {
         rxclear |= HAL_RX_CLEAR_EXT_LOW;
     }
     return rxclear;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:17:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 33FA1106566B;
	Tue, 25 Oct 2011 23:17:54 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2336B8FC12;
	Tue, 25 Oct 2011 23:17:54 +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 p9PNHs88021179;
	Tue, 25 Oct 2011 23:17:54 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNHs8b021177;
	Tue, 25 Oct 2011 23:17:54 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252317.p9PNHs8b021177@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:17:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226762 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:17:54 -0000

Author: adrian
Date: Tue Oct 25 23:17:53 2011
New Revision: 226762
URL: http://svn.freebsd.org/changeset/base/226762

Log:
  Correct/complete a partially-disabled TX interrupt mitigation configuration.
  
  Although a previous commit disabled TX interrupt mitigation handling and
  configuration, the mask register bits weren't setup correctly.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Oct 25 23:14:40 2011	(r226761)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Oct 25 23:17:53 2011	(r226762)
@@ -358,12 +358,12 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 	 */
 	OS_REG_WRITE(ah, AR_OBS, 8);
 
-#ifdef	AH_AR5416_INTERRUPT_MITIGATION
 	/*
 	 * Disable the "general" TX/RX mitigation timers.
 	 */
 	OS_REG_WRITE(ah, AR_MIRT, 0);
 
+#ifdef	AH_AR5416_INTERRUPT_MITIGATION
 	/*
 	 * This initialises the RX interrupt mitigation timers.
 	 *
@@ -631,11 +631,11 @@ ar5416InitIMR(struct ath_hal *ah, HAL_OP
                         | AR_IMR_BCNMISC;
 
 #ifdef	AH_AR5416_INTERRUPT_MITIGATION
-	ahp->ah_maskReg |= AR_IMR_TXINTM | AR_IMR_RXINTM
-			|  AR_IMR_TXMINTR | AR_IMR_RXMINTR;
+	ahp->ah_maskReg |= AR_IMR_RXINTM | AR_IMR_RXMINTR;
 #else
-	ahp->ah_maskReg |= AR_IMR_TXOK | AR_IMR_RXOK;
+	ahp->ah_maskReg |= AR_IMR_RXOK;
 #endif	
+	ahp->ah_maskReg |= AR_IMR_TXOK;
 
 	if (opmode == HAL_M_HOSTAP)
 		ahp->ah_maskReg |= AR_IMR_MIB;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:19:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A6EC41065678;
	Tue, 25 Oct 2011 23:19:57 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7C5F08FC13;
	Tue, 25 Oct 2011 23:19:57 +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 p9PNJvFi021276;
	Tue, 25 Oct 2011 23:19:57 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNJv5J021272;
	Tue, 25 Oct 2011 23:19:57 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110252319.p9PNJv5J021272@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 25 Oct 2011 23:19: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: r226763 - in stable/8/sys: sys vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:19:57 -0000

Author: alc
Date: Tue Oct 25 23:19:57 2011
New Revision: 226763
URL: http://svn.freebsd.org/changeset/base/226763

Log:
  MFC r211937
    Add the MAP_PREFAULT_READ option to mmap(2).

Modified:
  stable/8/sys/sys/mman.h
  stable/8/sys/sys/param.h
  stable/8/sys/vm/vm_mmap.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)

Modified: stable/8/sys/sys/mman.h
==============================================================================
--- stable/8/sys/sys/mman.h	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/sys/mman.h	Tue Oct 25 23:19:57 2011	(r226763)
@@ -87,6 +87,7 @@
  * Extended flags
  */
 #define	MAP_NOCORE	 0x00020000 /* dont include these pages in a coredump */
+#define	MAP_PREFAULT_READ 0x00040000 /* prefault mapping for reading */
 #endif /* __BSD_VISIBLE */
 
 #if __POSIX_VISIBLE >= 199309

Modified: stable/8/sys/sys/param.h
==============================================================================
--- stable/8/sys/sys/param.h	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/sys/param.h	Tue Oct 25 23:19:57 2011	(r226763)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 802512	/* Master, propagated to newvers */
+#define __FreeBSD_version 802513	/* Master, propagated to newvers */
 
 #ifdef _KERNEL
 #define	P_OSREL_SIGWAIT		700000

Modified: stable/8/sys/vm/vm_mmap.c
==============================================================================
--- stable/8/sys/vm/vm_mmap.c	Tue Oct 25 23:17:53 2011	(r226762)
+++ stable/8/sys/vm/vm_mmap.c	Tue Oct 25 23:19:57 2011	(r226763)
@@ -1388,9 +1388,10 @@ vm_mmap(vm_map_t map, vm_offset_t *addr,
 		 */
 		if (handle == 0)
 			foff = 0;
-	} else {
+	} else if (flags & MAP_PREFAULT_READ)
+		docow = MAP_PREFAULT;
+	else
 		docow = MAP_PREFAULT_PARTIAL;
-	}
 
 	if ((flags & (MAP_ANON|MAP_SHARED)) == 0)
 		docow |= MAP_COPY_ON_WRITE;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:24:06 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56CEF106564A;
	Tue, 25 Oct 2011 23:24:06 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B9B18FC13;
	Tue, 25 Oct 2011 23:24:06 +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 p9PNO6Ea021469;
	Tue, 25 Oct 2011 23:24:06 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNO6ru021467;
	Tue, 25 Oct 2011 23:24:06 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252324.p9PNO6ru021467@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:24:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226764 - head/sys/dev/ath/ath_hal/ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:24:06 -0000

Author: adrian
Date: Tue Oct 25 23:24:05 2011
New Revision: 226764
URL: http://svn.freebsd.org/changeset/base/226764

Log:
  Add some fixes to the 11n aggregation HAL calls:
  
  * preserve AR_TxIntrReq on every descriptor in an aggregate chain,
    not just the first descriptor;
  * always blank out the descriptor in ar5416ChainTxDesc() when forming
    aggregates - the way I'm using this in the 11n branch is to first
    chain aggregates together, then use the other HAL calls to fill in
    the details.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Oct 25 23:19:57 2011	(r226763)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c	Tue Oct 25 23:24:05 2011	(r226764)
@@ -295,12 +295,14 @@ ar5416FillTxDesc(struct ath_hal *ah, str
 		 * copy the multi-rate transmit parameters from
 		 * the first frame for processing on completion. 
 		 */
-		ads->ds_ctl0 = 0;
 		ads->ds_ctl1 = segLen;
 #ifdef AH_NEED_DESC_SWAP
+		ads->ds_ctl0 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl0)
+		    & AR_TxIntrReq;
 		ads->ds_ctl2 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl2);
 		ads->ds_ctl3 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl3);
 #else
+		ads->ds_ctl0 = AR5416DESC_CONST(ds0)->ds_ctl0 & AR_TxIntrReq;
 		ads->ds_ctl2 = AR5416DESC_CONST(ds0)->ds_ctl2;
 		ads->ds_ctl3 = AR5416DESC_CONST(ds0)->ds_ctl3;
 #endif
@@ -308,7 +310,12 @@ ar5416FillTxDesc(struct ath_hal *ah, str
 		/*
 		 * Intermediate descriptor in a multi-descriptor frame.
 		 */
-		ads->ds_ctl0 = 0;
+#ifdef AH_NEED_DESC_SWAP
+		ads->ds_ctl0 = __bswap32(AR5416DESC_CONST(ds0)->ds_ctl0)
+		    & AR_TxIntrReq;
+#else
+		ads->ds_ctl0 = AR5416DESC_CONST(ds0)->ds_ctl0 & AR_TxIntrReq;
+#endif
 		ads->ds_ctl1 = segLen | AR_TxMore;
 		ads->ds_ctl2 = 0;
 		ads->ds_ctl3 = 0;
@@ -318,6 +325,9 @@ ar5416FillTxDesc(struct ath_hal *ah, str
 	return AH_TRUE;
 }
 
+/*
+ * NB: cipher is no longer used, it's calculated.
+ */
 HAL_BOOL
 ar5416ChainTxDesc(struct ath_hal *ah, struct ath_desc *ds,
 	u_int pktLen,
@@ -347,10 +357,20 @@ ar5416ChainTxDesc(struct ath_hal *ah, st
 		isaggr = 1;
 	}
 
-	if (!firstSeg) {
-		OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ);
-	}
+	/*
+	 * Since this function is called before any of the other
+	 * descriptor setup functions (at least in this particular
+	 * 802.11n aggregation implementation), always bzero() the
+	 * descriptor. Previously this would be done for all but
+	 * the first segment.
+	 * XXX TODO: figure out why; perhaps I'm using this slightly
+	 * XXX incorrectly.
+	 */
+	OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ);
 
+	/*
+	 * Note: VEOL should only be for the last descriptor in the chain.
+	 */
 	ads->ds_ctl0 = (pktLen & AR_FrameLen);
 	ads->ds_ctl1 = (type << AR_FrameType_S)
 			| (isaggr ? (AR_IsAggr | AR_MoreAggr) : 0);
@@ -362,7 +382,7 @@ ar5416ChainTxDesc(struct ath_hal *ah, st
 		ads->ds_ctl0 |= AR_DestIdxValid;
 	}
 
-	ads->ds_ctl6 = SM(ahp->ah_keytype[cipher], AR_EncrType);
+	ads->ds_ctl6 |= SM(ahp->ah_keytype[keyIx], AR_EncrType);
 	if (isaggr) {
 		ads->ds_ctl6 |= SM(delims, AR_PadDelim);
 	}

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:28:17 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0A7F3106564A;
	Tue, 25 Oct 2011 23:28:17 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EDC0F8FC0C;
	Tue, 25 Oct 2011 23:28:16 +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 p9PNSGqx021639;
	Tue, 25 Oct 2011 23:28:16 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNSGbc021637;
	Tue, 25 Oct 2011 23:28:16 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252328.p9PNSGbc021637@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:28:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226765 - head/sys/dev/ath/ath_hal/ar5212
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:28:17 -0000

Author: adrian
Date: Tue Oct 25 23:28:16 2011
New Revision: 226765
URL: http://svn.freebsd.org/changeset/base/226765

Log:
  The AR5413 datasheet specifies that AR_TxIntrReq should be set consistently
  for all frames, so do so.

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c	Tue Oct 25 23:24:05 2011	(r226764)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c	Tue Oct 25 23:28:16 2011	(r226765)
@@ -821,12 +821,14 @@ ar5212FillTxDesc(struct ath_hal *ah, str
 		 * copy the multi-rate transmit parameters from
 		 * the first frame for processing on completion. 
 		 */
-		ads->ds_ctl0 = 0;
 		ads->ds_ctl1 = segLen;
 #ifdef AH_NEED_DESC_SWAP
+		ads->ds_ctl0 = __bswap32(AR5212DESC_CONST(ds0)->ds_ctl0)
+		    & AR_TxInterReq;
 		ads->ds_ctl2 = __bswap32(AR5212DESC_CONST(ds0)->ds_ctl2);
 		ads->ds_ctl3 = __bswap32(AR5212DESC_CONST(ds0)->ds_ctl3);
 #else
+		ads->ds_ctl0 = AR5212DESC_CONST(ds0)->ds_ctl0 & AR_TxInterReq;
 		ads->ds_ctl2 = AR5212DESC_CONST(ds0)->ds_ctl2;
 		ads->ds_ctl3 = AR5212DESC_CONST(ds0)->ds_ctl3;
 #endif
@@ -834,7 +836,12 @@ ar5212FillTxDesc(struct ath_hal *ah, str
 		/*
 		 * Intermediate descriptor in a multi-descriptor frame.
 		 */
-		ads->ds_ctl0 = 0;
+#ifdef AH_NEED_DESC_SWAP
+		ads->ds_ctl0 = __bswap32(AR5212DESC_CONST(ds0)->ds_ctl0)
+		    & AR_TxInterReq;
+#else
+		ads->ds_ctl0 = AR5212DESC_CONST(ds0)->ds_ctl0 & AR_TxInterReq;
+#endif
 		ads->ds_ctl1 = segLen | AR_More;
 		ads->ds_ctl2 = 0;
 		ads->ds_ctl3 = 0;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:29:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A1CA41065673;
	Tue, 25 Oct 2011 23:29:36 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 908E58FC15;
	Tue, 25 Oct 2011 23:29:36 +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 p9PNTagR021715;
	Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNTaEf021713;
	Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110252329.p9PNTaEf021713@svn.freebsd.org>
From: Alan Cox 
Date: Tue, 25 Oct 2011 23:29: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: r226766 - stable/8/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:29:36 -0000

Author: alc
Date: Tue Oct 25 23:29:36 2011
New Revision: 226766
URL: http://svn.freebsd.org/changeset/base/226766

Log:
  MFC r211937
    Add the MAP_PREFAULT_READ option to mmap(2).

Modified:
  stable/8/lib/libc/sys/mmap.2
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/sys/mmap.2
==============================================================================
--- stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:28:16 2011	(r226765)
+++ stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:29:36 2011	(r226766)
@@ -28,7 +28,7 @@
 .\"	@(#)mmap.2	8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd July 26, 2009
+.Dd August 28, 2010
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -207,6 +207,19 @@ implements a coherent file system buffer
 However, it may be
 used to associate dirty VM pages with file system buffers and thus cause
 them to be flushed to physical media sooner rather than later.
+.It Dv MAP_PREFAULT_READ
+Immediately update the calling process's lowest-level virtual address
+translation structures, such as its page table, so that every memory
+resident page within the region is mapped for read access.
+Ordinarily these structures are updated lazily.
+The effect of this option is to eliminate any soft faults that would
+otherwise occur on the initial read accesses to the region.
+Although this option does not preclude
+.Fa prot
+from including
+.Dv PROT_WRITE ,
+it does not eliminate soft faults on the initial write accesses to the
+region.
 .It Dv MAP_PRIVATE
 Modifications are private.
 .It Dv MAP_SHARED

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 25 23:33:55 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58704106564A;
	Tue, 25 Oct 2011 23:33:55 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 479828FC16;
	Tue, 25 Oct 2011 23:33:55 +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 p9PNXtKG021896;
	Tue, 25 Oct 2011 23:33:55 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNXtQg021893;
	Tue, 25 Oct 2011 23:33:55 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110252333.p9PNXtQg021893@svn.freebsd.org>
From: Adrian Chadd 
Date: Tue, 25 Oct 2011 23:33:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226767 - in head/sys/dev/ath/ath_hal: . ar5416
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 25 Oct 2011 23:33:55 -0000

Author: adrian
Date: Tue Oct 25 23:33:54 2011
New Revision: 226767
URL: http://svn.freebsd.org/changeset/base/226767

Log:
  Add in some more 11n related HAL methods.

Modified:
  head/sys/dev/ath/ath_hal/ah.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c

Modified: head/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.h	Tue Oct 25 23:29:36 2011	(r226766)
+++ head/sys/dev/ath/ath_hal/ah.h	Tue Oct 25 23:33:54 2011	(r226767)
@@ -1013,8 +1013,12 @@ struct ath_hal {
 	void	  __ahdecl(*ah_set11nRateScenario)(struct ath_hal *,
 	    			struct ath_desc *, u_int, u_int,
 				HAL_11N_RATE_SERIES [], u_int, u_int);
+	void	  __ahdecl(*ah_set11nAggrFirst)(struct ath_hal *,
+				struct ath_desc *, u_int, u_int);
 	void	  __ahdecl(*ah_set11nAggrMiddle)(struct ath_hal *,
 	    			struct ath_desc *, u_int);
+	void	  __ahdecl(*ah_set11nAggrLast)(struct ath_hal *,
+				struct ath_desc *);
 	void	  __ahdecl(*ah_clr11nAggr)(struct ath_hal *,
 	    			struct ath_desc *);
 	void	  __ahdecl(*ah_set11nBurstDuration)(struct ath_hal *,

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Tue Oct 25 23:29:36 2011	(r226766)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Tue Oct 25 23:33:54 2011	(r226767)
@@ -168,7 +168,9 @@ ar5416InitState(struct ath_hal_5416 *ahp
 	ah->ah_setupFirstTxDesc		= ar5416SetupFirstTxDesc;
 	ah->ah_setupLastTxDesc		= ar5416SetupLastTxDesc;
 	ah->ah_set11nRateScenario	= ar5416Set11nRateScenario;
+	ah->ah_set11nAggrFirst		= ar5416Set11nAggrFirst;
 	ah->ah_set11nAggrMiddle		= ar5416Set11nAggrMiddle;
+	ah->ah_set11nAggrLast		= ar5416Set11nAggrLast;
 	ah->ah_clr11nAggr		= ar5416Clr11nAggr;
 	ah->ah_set11nBurstDuration	= ar5416Set11nBurstDuration;
 	ah->ah_get11nExtBusy		= ar5416Get11nExtBusy;

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 01:03:53 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CAD55106566B;
	Wed, 26 Oct 2011 01:03:53 +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 A0A4F8FC15;
	Wed, 26 Oct 2011 01:03:53 +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 p9Q13rYB024929;
	Wed, 26 Oct 2011 01:03:53 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q13roa024927;
	Wed, 26 Oct 2011 01:03:53 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110260103.p9Q13roa024927@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 01:03:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226770 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 01:03:53 -0000

Author: yongari
Date: Wed Oct 26 01:03:53 2011
New Revision: 226770
URL: http://svn.freebsd.org/changeset/base/226770

Log:
  Fix long standing bge_sysctl_debug_info() issues.
   o Protect bge(4) status block access and register dump with driver lock.
   o Add missing bus_dmamap_sync() before dumping status block.
   o Use minimum status block size, 32 bytes, for status block dump on most
     controllers except BCM5700 AX/BX.
  While I'm here, make the handler show 5717 Plus in hardware flags.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Tue Oct 25 23:57:38 2011	(r226769)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 01:03:53 2011	(r226770)
@@ -5797,8 +5797,7 @@ bge_sysctl_debug_info(SYSCTL_HANDLER_ARG
 {
 	struct bge_softc *sc;
 	uint16_t *sbdata;
-	int error;
-	int result;
+	int error, result, sbsz;
 	int i, j;
 
 	result = -1;
@@ -5809,14 +5808,21 @@ bge_sysctl_debug_info(SYSCTL_HANDLER_ARG
 	if (result == 1) {
 		sc = (struct bge_softc *)arg1;
 
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5700 &&
+		    sc->bge_chipid != BGE_CHIPID_BCM5700_C0)
+			sbsz = BGE_STATUS_BLK_SZ;
+		else
+			sbsz = 32;
 		sbdata = (uint16_t *)sc->bge_ldata.bge_status_block;
 		printf("Status Block:\n");
-		for (i = 0x0; i < (BGE_STATUS_BLK_SZ / 4); ) {
+		BGE_LOCK(sc);
+		bus_dmamap_sync(sc->bge_cdata.bge_status_tag,
+		    sc->bge_cdata.bge_status_map,
+		    BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
+		for (i = 0x0; i < sbsz / sizeof(uint16_t); ) {
 			printf("%06x:", i);
-			for (j = 0; j < 8; j++) {
-				printf(" %04x", sbdata[i]);
-				i += 4;
-			}
+			for (j = 0; j < 8; j++)
+				printf(" %04x", sbdata[i++]);
 			printf("\n");
 		}
 
@@ -5829,8 +5835,11 @@ bge_sysctl_debug_info(SYSCTL_HANDLER_ARG
 			}
 			printf("\n");
 		}
+		BGE_UNLOCK(sc);
 
 		printf("Hardware Flags:\n");
+		if (BGE_IS_5717_PLUS(sc))
+			printf(" - 5717 Plus\n");
 		if (BGE_IS_5755_PLUS(sc))
 			printf(" - 5755 Plus\n");
 		if (BGE_IS_575X_PLUS(sc))

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 01:56:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2CE94106566B;
	Wed, 26 Oct 2011 01:56:23 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C7F98FC0A;
	Wed, 26 Oct 2011 01:56:23 +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 p9Q1uNPd026554;
	Wed, 26 Oct 2011 01:56:23 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q1uMU2026552;
	Wed, 26 Oct 2011 01:56:22 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260156.p9Q1uMU2026552@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 01:56:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226771 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 01:56:23 -0000

Author: edwin
Date: Wed Oct 26 01:56:22 2011
New Revision: 226771
URL: http://svn.freebsd.org/changeset/base/226771

Log:
  Fix breakage in tzsetup:
  MD      +4700+02850     Europe/Chisinau most locations

Modified:
  head/contrib/tzdata/zone.tab

Modified: head/contrib/tzdata/zone.tab
==============================================================================
--- head/contrib/tzdata/zone.tab	Wed Oct 26 01:03:53 2011	(r226770)
+++ head/contrib/tzdata/zone.tab	Wed Oct 26 01:56:22 2011	(r226771)
@@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
 MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 01:57:47 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E01D1065686;
	Wed, 26 Oct 2011 01:57:47 +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 8CEF48FC1E;
	Wed, 26 Oct 2011 01:57:47 +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 p9Q1vllI026655;
	Wed, 26 Oct 2011 01:57:47 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q1vlXb026653;
	Wed, 26 Oct 2011 01:57:47 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260157.p9Q1vlXb026653@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 01:57: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: r226772 - stable/8/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 01:57:47 -0000

Author: edwin
Date: Wed Oct 26 01:57:47 2011
New Revision: 226772
URL: http://svn.freebsd.org/changeset/base/226772

Log:
  MFC of r226771
  
  Fix breakage in tzsetup:
  MD      +4700+02850     Europe/Chisinau most locations

Modified:
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/zone.tab
==============================================================================
--- stable/8/share/zoneinfo/zone.tab	Wed Oct 26 01:56:22 2011	(r226771)
+++ stable/8/share/zoneinfo/zone.tab	Wed Oct 26 01:57:47 2011	(r226772)
@@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
 MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 01:58:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4823C1065695;
	Wed, 26 Oct 2011 01:58:14 +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 371298FC1A;
	Wed, 26 Oct 2011 01:58:14 +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 p9Q1wECe026721;
	Wed, 26 Oct 2011 01:58:14 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q1wEHg026719;
	Wed, 26 Oct 2011 01:58:14 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260158.p9Q1wEHg026719@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 01:58: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: r226773 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 01:58:14 -0000

Author: edwin
Date: Wed Oct 26 01:58:13 2011
New Revision: 226773
URL: http://svn.freebsd.org/changeset/base/226773

Log:
  MFC of r226771
  
  Fix breakage in tzsetup:
  MD      +4700+02850     Europe/Chisinau most locations

Modified:
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Wed Oct 26 01:57:47 2011	(r226772)
+++ stable/7/share/zoneinfo/zone.tab	Wed Oct 26 01:58:13 2011	(r226773)
@@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
 MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 01:58:37 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6137F106568A;
	Wed, 26 Oct 2011 01:58:37 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 503878FC1C;
	Wed, 26 Oct 2011 01:58:37 +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 p9Q1wbGK026779;
	Wed, 26 Oct 2011 01:58:37 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q1wboR026777;
	Wed, 26 Oct 2011 01:58:37 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260158.p9Q1wboR026777@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 01:58: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: r226774 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 01:58:37 -0000

Author: edwin
Date: Wed Oct 26 01:58:36 2011
New Revision: 226774
URL: http://svn.freebsd.org/changeset/base/226774

Log:
  MFC of r226771
  
  Fix breakage in tzsetup:
  MD      +4700+02850     Europe/Chisinau most locations

Modified:
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Wed Oct 26 01:58:13 2011	(r226773)
+++ stable/6/share/zoneinfo/zone.tab	Wed Oct 26 01:58:36 2011	(r226774)
@@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
 MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 02:11:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B4045106564A;
	Wed, 26 Oct 2011 02:11:28 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 99BBB8FC14;
	Wed, 26 Oct 2011 02:11:28 +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 p9Q2BS0P027235;
	Wed, 26 Oct 2011 02:11:28 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q2BStn027230;
	Wed, 26 Oct 2011 02:11:28 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201110260211.p9Q2BStn027230@svn.freebsd.org>
From: Hiroki Sato 
Date: Wed, 26 Oct 2011 02:11:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226775 - in head: etc sbin/devd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 02:11:28 -0000

Author: hrs
Date: Wed Oct 26 02:11:28 2011
New Revision: 226775
URL: http://svn.freebsd.org/changeset/base/226775

Log:
  - Add support for a "!" character in regex matching in devd(8).  It inverts
    the logic (true/false) of the matching.
  
  - Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
    devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.
  
  Reviewed by:	imp

Modified:
  head/etc/devd.conf
  head/sbin/devd/devd.cc
  head/sbin/devd/devd.conf.5
  head/sbin/devd/devd.hh

Modified: head/etc/devd.conf
==============================================================================
--- head/etc/devd.conf	Wed Oct 26 01:58:36 2011	(r226774)
+++ head/etc/devd.conf	Wed Oct 26 02:11:28 2011	(r226775)
@@ -38,6 +38,7 @@ options {
 #
 notify 0 {
 	match "system"		"IFNET";
+	match "subsystem"	"!usbus[0-9]+";
 	match "type"		"ATTACH";
 	action "/etc/pccard_ether $subsystem start";
 };

Modified: head/sbin/devd/devd.cc
==============================================================================
--- head/sbin/devd/devd.cc	Wed Oct 26 01:58:36 2011	(r226774)
+++ head/sbin/devd/devd.cc	Wed Oct 26 02:11:28 2011	(r226775)
@@ -251,7 +251,14 @@ match::match(config &c, const char *var,
 	: _var(var)
 {
 	_re = "^";
-	_re.append(c.expand_string(string(re)));
+	if (!c.expand_string(string(re)).empty() &&
+	    c.expand_string(string(re)).at(0) == '!') {
+		_re.append(c.expand_string(string(re)).substr(1));
+		_inv = 1;
+	} else {
+		_re.append(c.expand_string(string(re)));
+		_inv = 0;
+	}
 	_re.append("$");
 	regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE);
 }
@@ -268,10 +275,13 @@ match::do_match(config &c)
 	bool retval;
 
 	if (Dflag)
-		fprintf(stderr, "Testing %s=%s against %s\n", _var.c_str(),
-		    value.c_str(), _re.c_str());
+		fprintf(stderr, "Testing %s=%s against %s, invert=%d\n",
+		    _var.c_str(), value.c_str(), _re.c_str(), _inv);
 
 	retval = (regexec(&_regex, value.c_str(), 0, NULL, 0) == 0);
+	if (_inv == 1)
+		retval = (retval == 0) ? 1 : 0;
+
 	return retval;
 }
 

Modified: head/sbin/devd/devd.conf.5
==============================================================================
--- head/sbin/devd/devd.conf.5	Wed Oct 26 01:58:36 2011	(r226774)
+++ head/sbin/devd/devd.conf.5	Wed Oct 26 02:11:28 2011	(r226775)
@@ -41,7 +41,7 @@
 .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 .\" SOFTWARE.
 .\"
-.Dd March 8, 2009
+.Dd October 25, 2011
 .Dt DEVD.CONF 5
 .Os
 .Sh NAME
@@ -121,6 +121,10 @@ Creates a regular expression and assigns
 .Ar regexp-name .
 The variable is available throughout the rest of
 the configuration file.
+If the string begins with
+.Ql \&! ,
+it matches if the regular expression formed by the rest of the string
+does not match.
 All regular expressions have an implicit
 .Ql ^$
 around them.

Modified: head/sbin/devd/devd.hh
==============================================================================
--- head/sbin/devd/devd.hh	Wed Oct 26 01:58:36 2011	(r226774)
+++ head/sbin/devd/devd.hh	Wed Oct 26 02:11:28 2011	(r226775)
@@ -92,6 +92,7 @@ public:
 private:
 	std::string _var;
 	std::string _re;
+	bool _inv;
 	regex_t _regex;
 };
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 04:38:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 30BB1106564A;
	Wed, 26 Oct 2011 04:38:24 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 20EAF8FC1B;
	Wed, 26 Oct 2011 04:38:24 +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 p9Q4cOAP032388;
	Wed, 26 Oct 2011 04:38:24 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q4cNaK032385;
	Wed, 26 Oct 2011 04:38:23 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110260438.p9Q4cNaK032385@svn.freebsd.org>
From: Alan Cox 
Date: Wed, 26 Oct 2011 04:38: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: r226783 - in stable/8: lib/libc/sys sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 04:38:24 -0000

Author: alc
Date: Wed Oct 26 04:38:23 2011
New Revision: 226783
URL: http://svn.freebsd.org/changeset/base/226783

Log:
  MFC r198973
    Add MAP_ANONYMOUS.

Modified:
  stable/8/lib/libc/sys/mmap.2
  stable/8/sys/sys/mman.h
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (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)

Modified: stable/8/lib/libc/sys/mmap.2
==============================================================================
--- stable/8/lib/libc/sys/mmap.2	Wed Oct 26 03:48:49 2011	(r226782)
+++ stable/8/lib/libc/sys/mmap.2	Wed Oct 26 04:38:23 2011	(r226783)
@@ -108,6 +108,10 @@ The
 argument must be 0.
 .\".It Dv MAP_FILE
 .\"Mapped from a regular file or character-special device memory.
+.It Dv MAP_ANONYMOUS
+This flag is identical to
+.Dv MAP_ANON
+and is provided for compatibility.
 .It Dv MAP_FIXED
 Do not permit the system to select a different address than the one
 specified.

Modified: stable/8/sys/sys/mman.h
==============================================================================
--- stable/8/sys/sys/mman.h	Wed Oct 26 03:48:49 2011	(r226782)
+++ stable/8/sys/sys/mman.h	Wed Oct 26 04:38:23 2011	(r226783)
@@ -82,6 +82,9 @@
  */
 #define	MAP_FILE	 0x0000	/* map from file (default) */
 #define	MAP_ANON	 0x1000	/* allocated from memory, swap space */
+#ifndef _KERNEL
+#define	MAP_ANONYMOUS	 MAP_ANON /* For compatibility. */
+#endif /* !_KERNEL */
 
 /*
  * Extended flags

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 06:50:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 32A1C106566B;
	Wed, 26 Oct 2011 06:50:41 +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 1873C8FC12;
	Wed, 26 Oct 2011 06:50:41 +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 p9Q6oev0036838;
	Wed, 26 Oct 2011 06:50:40 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q6oeC9036830;
	Wed, 26 Oct 2011 06:50:40 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201110260650.p9Q6oeC9036830@svn.freebsd.org>
From: Edwin Groothuis 
Date: Wed, 26 Oct 2011 06:50:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226784 - stable/9/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 06:50:41 -0000

Author: edwin
Date: Wed Oct 26 06:50:40 2011
New Revision: 226784
URL: http://svn.freebsd.org/changeset/base/226784

Log:
  MFC of r226752, r226771, tzdata2011m
  
  Europe:
  - Pridnestrovian Moldavian Republic (PMR, also known as
    "Pridnestrovie") has abolished seasonal clock change (no transition
    to the Winter Time).
  - The recent change to the Ukranian time zone (Europe/Kiev) to
    introduce permanent daylight saving time (similar to Russia) was
    reverted.
  
  South America:
  - Bahia: The President signed a decree that includes Bahia in summer
    time.
  
  zone.tab:
  - Add Europe/Tiraspol Pridnestrovie
  
  Obtained from:  ftp://ftp.iana.org/tz/releases/
  Approved by:	re (Kostik Belousov)

Modified:
  stable/9/contrib/tzdata/asia
  stable/9/contrib/tzdata/australasia
  stable/9/contrib/tzdata/backward
  stable/9/contrib/tzdata/europe
  stable/9/contrib/tzdata/northamerica
  stable/9/contrib/tzdata/southamerica
  stable/9/contrib/tzdata/zone.tab
Directory Properties:
  stable/9/contrib/tzdata/   (props changed)

Modified: stable/9/contrib/tzdata/asia
==============================================================================
--- stable/9/contrib/tzdata/asia	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/asia	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,4 +1,4 @@
-# @(#)asia	8.68
+# @(#)asia	8.69
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/9/contrib/tzdata/australasia
==============================================================================
--- stable/9/contrib/tzdata/australasia	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/australasia	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)australasia	8.27
+# @(#)australasia	8.28
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/9/contrib/tzdata/backward
==============================================================================
--- stable/9/contrib/tzdata/backward	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/backward	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)backward	8.9
+# @(#)backward	8.10
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -67,7 +67,6 @@ Link	America/Havana		Cuba
 Link	Africa/Cairo		Egypt
 Link	Europe/Dublin		Eire
 Link	Europe/London		Europe/Belfast
-Link	Europe/Chisinau		Europe/Tiraspol
 Link	Europe/London		GB
 Link	Europe/London		GB-Eire
 Link	Etc/GMT			GMT+0

Modified: stable/9/contrib/tzdata/europe
==============================================================================
--- stable/9/contrib/tzdata/europe	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/europe	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.38
+# @(#)europe	8.39
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1655,6 +1655,29 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov
 # But [two people] separately reported via
 # Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
 # The Tiraspol entry has therefore been removed for now.
+#
+# From Alexander Krivenyshev (2011-10-17):
+# Pridnestrovian Moldavian Republic (PMR, also known as
+# "Pridnestrovie") has abolished seasonal clock change (no transition
+# to the Winter Time).
+#
+# News (in Russian):
+# 
+# http://www.kyivpost.ua/russia/news/pridnestrove-otkazalos-ot-perehoda-na-zimnee-vremya-30954.html
+# 
+#
+# 
+# http://www.allmoldova.com/moldova-news/1249064116.html
+# 
+#
+# The substance of this change (reinstatement of the Tiraspol entry)
+# is from a patch from Petr Machata (2011-10-17)
+#
+# From Tim Parenti (2011-10-19)
+# In addition, being situated at +4651+2938 would give Tiraspol
+# a pre-1880 LMT offset of 1:58:32.
+#
+# (which agrees with the earlier entry that had been removed)
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1880
@@ -1671,6 +1694,21 @@ Zone	Europe/Chisinau	1:55:20 -	LMT	1880
 # See Romania commentary for the guessed 1997 transition to EU rules.
 			2:00	EU	EE%sT
 
+Zone	Europe/Tiraspol	1:58:32 -	LMT	1880
+			1:55	-	CMT	1918 Feb 15 # Chisinau MT
+			1:44:24	-	BMT	1931 Jul 24 # Bucharest MT
+			2:00	Romania	EE%sT	1940 Aug 15
+			2:00	1:00	EEST	1941 Jul 17
+			1:00	C-Eur	CE%sT	1944 Aug 24
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1990 May 6
+			2:00	-	EET	1991
+			2:00	Russia	EE%sT	1992
+			2:00	E-Eur	EE%sT	1997
+# See Romania commentary for the guessed 1997 transition to EU rules.
+			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
+			3:00	-	FET # Further-eastern European Time
+
 # Monaco
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
@@ -2651,6 +2689,28 @@ Link	Europe/Istanbul	Asia/Istanbul	# Ist
 # 
 # http://www.pravda.com.ua/rus/news/2011/09/20/6600616/
 # 
+#
+# From Philip Pizzey (2011-10-18):
+# Today my Ukrainian colleagues have informed me that the
+# Ukrainian parliament have decided that they will go to winter
+# time this year after all.
+#
+# From Udo Schwedt (2011-10-18):
+# As far as I understand, the recent change to the Ukranian time zone 
+# (Europe/Kiev) to introduce permanent daylight saving time (similar
+# to Russia) was reverted today:
+#
+# 
+# http://portal.rada.gov.ua/rada/control/en/publish/article/info_left?art_id=287324&cat_id=105995
+# 
+#
+# Also reported by Alexander Bokovoy (2011-10-18) who also noted:
+# The law documents themselves are at
+#
+# 
+# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
+# 
+
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Most of Ukraine since 1970 has been like Kiev.
@@ -2665,8 +2725,7 @@ Zone Europe/Kiev	2:02:04 -	LMT	1880
 			3:00	-	MSK	1990 Jul  1 2:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Ruthenia used CET 1990/1991.
 # "Uzhhorod" is the transliteration of the Ukrainian name, but
 # "Uzhgorod" is more common in English.
@@ -2680,8 +2739,7 @@ Zone Europe/Uzhgorod	1:29:12 -	LMT	1890 
 			1:00	-	CET	1991 Mar 31 3:00
 			2:00	-	EET	1992
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
 # "Zaporizhia" is the transliteration of the Ukrainian name, but
 # "Zaporozh'ye" is more common in English.  Use the common English
@@ -2694,8 +2752,7 @@ Zone Europe/Zaporozhye	2:20:40 -	LMT	188
 			1:00	C-Eur	CE%sT	1943 Oct 25
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00
 			2:00	E-Eur	EE%sT	1995
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 # Central Crimea used Moscow time 1994/1997.
 Zone Europe/Simferopol	2:16:24 -	LMT	1880
 			2:16	-	SMT	1924 May  2 # Simferopol Mean T
@@ -2720,8 +2777,7 @@ Zone Europe/Simferopol	2:16:24 -	LMT	188
 # Assume it happened in March by not changing the clocks.
 			3:00	Russia	MSK/MSD	1997
 			3:00	-	MSK	1997 Mar lastSun 1:00u
-			2:00	EU	EE%sT	2011 Mar lastSun 1:00u
-			3:00	-	FET # Further-eastern European Time
+			2:00	EU	EE%sT
 
 ###############################################################################
 

Modified: stable/9/contrib/tzdata/northamerica
==============================================================================
--- stable/9/contrib/tzdata/northamerica	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/northamerica	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)northamerica	8.49
+# @(#)northamerica	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 

Modified: stable/9/contrib/tzdata/southamerica
==============================================================================
--- stable/9/contrib/tzdata/southamerica	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/southamerica	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.50
+# @(#)southamerica	8.52
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -818,6 +818,19 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # oficial agency about time in Brazil, and she confirmed that the old rule is
 # still in force.
 
+# From Guilherme Bernardes Rodrigues (2011-10-14)
+# It's official, the President signed a decree that includes Bahia in summer
+# time.
+#	 [ and in a second message (same day): ]
+# I found the decree.
+#
+# DECRETO No- 7.584, DE 13 DE OUTUBRO DE 2011
+# Link :
+# 
+# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
+# 
+
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree 20,466 (1931-10-01)
 # Decree 21,896 (1932-01-10)
@@ -1054,10 +1067,8 @@ Zone America/Maceio	-2:22:52 -	LMT	1914
 # of America/Salvador.
 Zone America/Bahia	-2:34:04 -	LMT	1914
 			-3:00	Brazil	BR%sT	2003 Sep 24
-			-3:00	-	BRT
-# as noted above, not yet in operation.
-#			-3:00	-	BRT	2011 Oct 16
-#			-3:00	Brazil	BR%sT
+			-3:00	-	BRT	2011 Oct 16
+			-3:00	Brazil	BR%sT
 #
 # Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
 # Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),

Modified: stable/9/contrib/tzdata/zone.tab
==============================================================================
--- stable/9/contrib/tzdata/zone.tab	Wed Oct 26 04:38:23 2011	(r226783)
+++ stable/9/contrib/tzdata/zone.tab	Wed Oct 26 06:50:40 2011	(r226784)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.49
+# @(#)zone.tab	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -257,7 +257,8 @@ LV	+5657+02406	Europe/Riga
 LY	+3254+01311	Africa/Tripoli
 MA	+3339-00735	Africa/Casablanca
 MC	+4342+00723	Europe/Monaco
-MD	+4700+02850	Europe/Chisinau
+MD	+4700+02850	Europe/Chisinau	most locations
+MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
 ME	+4226+01916	Europe/Podgorica
 MF	+1804-06305	America/Marigot
 MG	-1855+04731	Indian/Antananarivo

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 06:52:28 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 782BB106566B;
	Wed, 26 Oct 2011 06:52:28 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
	by mx1.freebsd.org (Postfix) with ESMTP id 2084C8FC15;
	Wed, 26 Oct 2011 06:52:19 +0000 (UTC)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
	[212.40.38.100])
	by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA28488;
	Wed, 26 Oct 2011 09:52:18 +0300 (EEST)
	(envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
	by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
	id 1RIxLW-000D7n-84; Wed, 26 Oct 2011 09:52:18 +0300
Message-ID: <4EA7AE21.4030608@FreeBSD.org>
Date: Wed, 26 Oct 2011 09:52:17 +0300
From: Andriy Gapon 
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
	rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1
MIME-Version: 1.0
To: Sergey Kandaurov , Ken Smith 
References: <201110152123.p9FLN5Ht031202@svn.freebsd.org>
	
	<1318862413.55691.12.camel@bauer.cse.buffalo.edu>
	
In-Reply-To: 
X-Enigmail-Version: undefined
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@FreeBSD.org, Adrian Chadd ,
	src-committers@FreeBSD.org, svn-src-all@FreeBSD.org,
	svn-src-stable-9@FreeBSD.org
Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults
 lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf
 sys/sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 06:52:28 -0000

on 25/10/2011 22:22 Sergey Kandaurov said the following:
> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
> kernels (added in r214326, I guess they are needed for printing a stack
> trace on panic). Were these options removed intentionally in this commit?
> 

Sergey,

good catch!

Ken,

could you please restore the KDB option and add the KDB_TRACE option to GENERICs
in stable/9?
KDB is not a debugger, but a "debugger support"; that is, it adds a few routines
useful for debugging.  KDB_TRACE provides a nice stack trace on panic.
Please see r214326.

-- 
Andriy Gapon

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 07:49:47 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A18C3106566C;
	Wed, 26 Oct 2011 07:49:47 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 91DB38FC12;
	Wed, 26 Oct 2011 07:49:47 +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 p9Q7nl3N038766;
	Wed, 26 Oct 2011 07:49:47 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q7nlj3038764;
	Wed, 26 Oct 2011 07:49:47 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
From: Ed Schouten 
Date: Wed, 26 Oct 2011 07:49:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226785 - head
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 07:49:47 -0000

Author: ed
Date: Wed Oct 26 07:49:47 2011
New Revision: 226785
URL: http://svn.freebsd.org/changeset/base/226785

Log:
  Attempt to fix build logic for gensnmptree.
  
  There are two problems with the existing logic. It builds gensnmptree
  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
  not forget to build gensnmptree on systems that have originally been
  built without. This causes a buildworld on those systems to fail.
  
  MFC after:	1 week

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Wed Oct 26 06:50:40 2011	(r226784)
+++ head/Makefile.inc1	Wed Oct 26 07:49:47 2011	(r226785)
@@ -1018,7 +1018,8 @@ _yacc=		usr.bin/yacc
 _awk=		usr.bin/awk
 .endif
 
-.if ${BOOTSTRAPPING} < 700018
+.if ${MK_BSNMP} != "no" && \
+    (${BOOTSTRAPPING} < 700018 || !exists(/usr/sbin/gensnmptree))
 _gensnmptree=	usr.sbin/bsnmpd/gensnmptree
 .endif
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 07:54:35 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5898D106567A;
	Wed, 26 Oct 2011 07:54:35 +0000 (UTC)
	(envelope-from yanegomi@gmail.com)
Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com
	[209.85.213.54])
	by mx1.freebsd.org (Postfix) with ESMTP id D417D8FC14;
	Wed, 26 Oct 2011 07:54:34 +0000 (UTC)
Received: by ywt32 with SMTP id 32so1718610ywt.13
	for ; Wed, 26 Oct 2011 00:54:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=li3Ip0J2KoC48y5QkWcT/BznAV+vs4mMiQDqFNSalWw=;
	b=IZcvY25noOnoa2Rty3YnkbeZaJ5Akpscd8anVxDJn7HPV+tq1KwpkVdr3GqbisxPk6
	oDQfHafR7gZsMAcaES9N6A6F7BS3wzGD7Q1T0lT+meG040JdTNX8htImrQfxizXyG1Vv
	Fefm6esenVyV+voapt0myC2pgdIExjZNpyMtA=
Received: by 10.68.1.229 with SMTP id 5mr19436099pbp.88.1319615673863;
	Wed, 26 Oct 2011 00:54:33 -0700 (PDT)
Received: from [192.168.20.5] (c-24-6-49-154.hsd1.ca.comcast.net.
	[24.6.49.154])
	by mx.google.com with ESMTPS id lt6sm3685487pbb.17.2011.10.26.00.54.31
	(version=TLSv1/SSLv3 cipher=OTHER);
	Wed, 26 Oct 2011 00:54:32 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Garrett Cooper 
In-Reply-To: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
Date: Wed, 26 Oct 2011 00:54:30 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <4E5789B4-3370-4EE0-A5BE-A753070E0FD6@gmail.com>
References: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
To: Ed Schouten 
X-Mailer: Apple Mail (2.1084)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226785 - head
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 07:54:35 -0000

On Oct 26, 2011, at 12:49 AM, Ed Schouten wrote:

> Author: ed
> Date: Wed Oct 26 07:49:47 2011
> New Revision: 226785
> URL: http://svn.freebsd.org/changeset/base/226785
>=20
> Log:
>  Attempt to fix build logic for gensnmptree.
>=20
>  There are two problems with the existing logic. It builds gensnmptree
>  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we =
must
>  not forget to build gensnmptree on systems that have originally been
>  built without. This causes a buildworld on those systems to fail.

	I addressed the overall issue a bit more thoroughly via =
bin/143830 . Could you take a look at that PR and let me know what you =
think of it?
Thanks,
-Garrett=

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 08:34:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ABBCF1065782;
	Wed, 26 Oct 2011 08:34:00 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9085C8FC12;
	Wed, 26 Oct 2011 08:34:00 +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 p9Q8Y0cT040168;
	Wed, 26 Oct 2011 08:34:00 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q8Y0ar040162;
	Wed, 26 Oct 2011 08:34:00 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201110260834.p9Q8Y0ar040162@svn.freebsd.org>
From: Martin Matuska 
Date: Wed, 26 Oct 2011 08:34:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226786 - in stable/9: etc/defaults etc/rc.d
	share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 08:34:00 -0000

Author: mm
Date: Wed Oct 26 08:34:00 2011
New Revision: 226786
URL: http://svn.freebsd.org/changeset/base/226786

Log:
  MFC r226654, r226657, r226658:
  
  MFC r226654 [1]:
  Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
  Make sure that static ARP and NDP bindings are set before NETWORKING.
  
  As static_ndp is based on static_arp, pass copyright to the project with
  permission of the original author (delphij@).
  
  MFC r226657 [2]:
  Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
  as the project itself is no legal entity
  
  MFC r226658 [3]:
  Add information about static_ndp_pairs to rc.conf(5) manual page
  
  Reviewed by:	Xin Li  [1]
  Reported by:	Joe Dahl  [2]
  Submitted by:	Sergey Kandaurov  [3]
  Approved by:	re (kib)

Added:
  stable/9/etc/rc.d/static_ndp
     - copied, changed from r226654, head/etc/rc.d/static_ndp
Modified:
  stable/9/etc/defaults/rc.conf
  stable/9/etc/rc.d/Makefile
  stable/9/etc/rc.d/NETWORKING
  stable/9/share/man/man5/rc.conf.5
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/man/man5/   (props changed)

Modified: stable/9/etc/defaults/rc.conf
==============================================================================
--- stable/9/etc/defaults/rc.conf	Wed Oct 26 07:49:47 2011	(r226785)
+++ stable/9/etc/defaults/rc.conf	Wed Oct 26 08:34:00 2011	(r226786)
@@ -383,6 +383,7 @@ bsnmpd_flags=""			# Flags for bsnmpd.
 ### Network routing options: ###
 defaultrouter="NO"		# Set to default gateway (or NO).
 static_arp_pairs=""		# Set to static ARP list (or leave empty).
+static_ndp_pairs=""		# Set to static NDP list (or leave empty).
 static_routes=""		# Set to static route list (or leave empty).
 natm_static_routes=""		# Set to static route list for NATM (or leave empty).
 gateway_enable="NO"		# Set to YES if this host will be a gateway.

Modified: stable/9/etc/rc.d/Makefile
==============================================================================
--- stable/9/etc/rc.d/Makefile	Wed Oct 26 07:49:47 2011	(r226785)
+++ stable/9/etc/rc.d/Makefile	Wed Oct 26 08:34:00 2011	(r226786)
@@ -32,7 +32,7 @@ FILES=	DAEMON FILESYSTEMS LOGIN NETWORKI
 	random rarpd rctl resolv rfcomm_pppd_server root \
 	route6d routed routing rpcbind rtadvd rtsold rwho \
 	savecore sdpd securelevel sendmail \
-	serial sppp statd static_arp stf swap1 \
+	serial sppp statd static_arp static_ndp stf swap1 \
 	syscons sysctl syslogd \
 	timed tmp \
 	ugidfw \

Modified: stable/9/etc/rc.d/NETWORKING
==============================================================================
--- stable/9/etc/rc.d/NETWORKING	Wed Oct 26 07:49:47 2011	(r226785)
+++ stable/9/etc/rc.d/NETWORKING	Wed Oct 26 08:34:00 2011	(r226786)
@@ -6,6 +6,7 @@
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing ppp ipfw stf faith
 # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv bridge
+# REQUIRE: static_arp static_ndp
 
 #	This is a dummy dependency, for services which require networking
 #	to be operational before starting.

Copied and modified: stable/9/etc/rc.d/static_ndp (from r226654, head/etc/rc.d/static_ndp)
==============================================================================
--- head/etc/rc.d/static_ndp	Sun Oct 23 09:08:42 2011	(r226654, copy source)
+++ stable/9/etc/rc.d/static_ndp	Wed Oct 26 08:34:00 2011	(r226786)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2011  The FreeBSD Project
+# Copyright (c) 2011  Xin Li 
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without

Modified: stable/9/share/man/man5/rc.conf.5
==============================================================================
--- stable/9/share/man/man5/rc.conf.5	Wed Oct 26 07:49:47 2011	(r226785)
+++ stable/9/share/man/man5/rc.conf.5	Wed Oct 26 08:34:00 2011	(r226786)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 13, 2011
+.Dd October 23, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2568,6 +2568,22 @@ For example
 static_arp_pairs="gw"
 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
 .Ed
+.It Va static_ndp_pairs
+.Pq Vt str
+Set to the list of static NDP pairs that are to be added at system
+boot time.
+For each whitespace separated
+.Ar element
+in the value, a
+.Va static_ndp_ Ns Aq Ar element
+variable is assumed to exist whose contents will later be passed to a
+.Dq Nm ndp Cm -s
+operation.
+For example
+.Bd -literal
+static_ndp_pairs="gw"
+static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
+.Ed
 .It Va static_routes
 .Pq Vt str
 Set to the list of static routes that are to be added at system

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 08:41:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 82C88106564A;
	Wed, 26 Oct 2011 08:41:41 +0000 (UTC) (envelope-from mm@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 67CB68FC14;
	Wed, 26 Oct 2011 08:41:41 +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 p9Q8ffsf040469;
	Wed, 26 Oct 2011 08:41:41 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9Q8ffxh040463;
	Wed, 26 Oct 2011 08:41:41 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201110260841.p9Q8ffxh040463@svn.freebsd.org>
From: Martin Matuska 
Date: Wed, 26 Oct 2011 08:41: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: r226787 - in stable/8: etc/defaults etc/rc.d
	share/man/man5
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 08:41:41 -0000

Author: mm
Date: Wed Oct 26 08:41:41 2011
New Revision: 226787
URL: http://svn.freebsd.org/changeset/base/226787

Log:
  MFC r226654, r226657, r226658:
  
  MFC r226654 [1]:
  Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.
  Make sure that static ARP and NDP bindings are set before NETWORKING.
  
  As static_ndp is based on static_arp, pass copyright to the project with
  permission of the original author (delphij@).
  
  MFC r226657 [2]:
  Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@
  as the project itself is no legal entity
  
  MFC r226658 [3]:
  Add information about static_ndp_pairs to rc.conf(5) manual page
  
  Reviewed by:	Xin Li  [1]
  Reported by:	Joe Dahl  [2]
  Submitted by:	Sergey Kandaurov  [3]

Added:
  stable/8/etc/rc.d/static_ndp
     - copied, changed from r226654, head/etc/rc.d/static_ndp
Modified:
  stable/8/etc/defaults/rc.conf
  stable/8/etc/rc.d/Makefile
  stable/8/etc/rc.d/NETWORKING
  stable/8/share/man/man5/rc.conf.5
Directory Properties:
  stable/8/etc/   (props changed)
  stable/8/share/man/man5/   (props changed)

Modified: stable/8/etc/defaults/rc.conf
==============================================================================
--- stable/8/etc/defaults/rc.conf	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/defaults/rc.conf	Wed Oct 26 08:41:41 2011	(r226787)
@@ -379,6 +379,7 @@ bsnmpd_flags=""			# Flags for bsnmpd.
 ### Network routing options: ###
 defaultrouter="NO"		# Set to default gateway (or NO).
 static_arp_pairs=""		# Set to static ARP list (or leave empty).
+static_ndp_pairs=""		# Set to static NDP list (or leave empty).
 static_routes=""		# Set to static route list (or leave empty).
 natm_static_routes=""		# Set to static route list for NATM (or leave empty).
 gateway_enable="NO"		# Set to YES if this host will be a gateway.

Modified: stable/8/etc/rc.d/Makefile
==============================================================================
--- stable/8/etc/rc.d/Makefile	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/rc.d/Makefile	Wed Oct 26 08:41:41 2011	(r226787)
@@ -32,7 +32,7 @@ FILES=	DAEMON FILESYSTEMS LOGIN NETWORKI
 	random rarpd resolv rfcomm_pppd_server root \
 	route6d routed routing rpcbind rtadvd rtsold rwho \
 	savecore sdpd securelevel sendmail \
-	serial sppp statd static_arp swap1 \
+	serial sppp statd static_arp static_ndp swap1 \
 	syscons sysctl syslogd \
 	timed tmp \
 	ugidfw \

Modified: stable/8/etc/rc.d/NETWORKING
==============================================================================
--- stable/8/etc/rc.d/NETWORKING	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/etc/rc.d/NETWORKING	Wed Oct 26 08:41:41 2011	(r226787)
@@ -6,6 +6,7 @@
 # PROVIDE: NETWORKING NETWORK
 # REQUIRE: netif netoptions routing network_ipv6 ppp ipfw
 # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv
+# REQUIRE: static_arp static_ndp
 
 #	This is a dummy dependency, for services which require networking
 #	to be operational before starting.

Copied and modified: stable/8/etc/rc.d/static_ndp (from r226654, head/etc/rc.d/static_ndp)
==============================================================================
--- head/etc/rc.d/static_ndp	Sun Oct 23 09:08:42 2011	(r226654, copy source)
+++ stable/8/etc/rc.d/static_ndp	Wed Oct 26 08:41:41 2011	(r226787)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2011  The FreeBSD Project
+# Copyright (c) 2011  Xin Li 
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without

Modified: stable/8/share/man/man5/rc.conf.5
==============================================================================
--- stable/8/share/man/man5/rc.conf.5	Wed Oct 26 08:34:00 2011	(r226786)
+++ stable/8/share/man/man5/rc.conf.5	Wed Oct 26 08:41:41 2011	(r226787)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 19, 2011
+.Dd October 23, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2312,6 +2312,22 @@ For example
 static_arp_pairs="gw"
 static_arp_gw="192.168.1.1 00:01:02:03:04:05"
 .Ed
+.It Va static_ndp_pairs
+.Pq Vt str
+Set to the list of static NDP pairs that are to be added at system
+boot time.
+For each whitespace separated
+.Ar element
+in the value, a
+.Va static_ndp_ Ns Aq Ar element
+variable is assumed to exist whose contents will later be passed to a
+.Dq Nm ndp Cm -s
+operation.
+For example
+.Bd -literal
+static_ndp_pairs="gw"
+static_ndp_gw="2001:db8:3::1 00:01:02:03:04:05"
+.Ed
 .It Va static_routes
 .Pq Vt str
 Set to the list of static routes that are to be added at system

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 08:46:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29AE7106564A;
	Wed, 26 Oct 2011 08:46:50 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa])
	by mx1.freebsd.org (Postfix) with ESMTP id BA3398FC0C;
	Wed, 26 Oct 2011 08:46:49 +0000 (UTC)
Received: by mx0.hoeg.nl (Postfix, from userid 1000)
	id CED942A28CBC; Wed, 26 Oct 2011 10:46:48 +0200 (CEST)
Date: Wed, 26 Oct 2011 10:46:48 +0200
From: Ed Schouten 
To: Garrett Cooper 
Message-ID: <20111026084648.GF63910@hoeg.nl>
References: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
	<4E5789B4-3370-4EE0-A5BE-A753070E0FD6@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="65ImJOski3p8EhYV"
Content-Disposition: inline
In-Reply-To: <4E5789B4-3370-4EE0-A5BE-A753070E0FD6@gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226785 - head
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 08:46:50 -0000


--65ImJOski3p8EhYV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Garrett,

* Garrett Cooper , 20111026 09:54:
> I addressed the overall issue a bit more thoroughly via bin/143830 .
> Could you take a look at that PR and let me know what you think of it?

The patch looks okay, but I think it can be simplified. Maybe we should
get rid of all the `RESCUE' bits from the atmconfig source code itself
and add something like this to the Makefile:

=2Eif !defined(RESCUE) && ${MK_BNSMP} !=3D "no"
CFLAGS+=3D -DWITH_BSNMP
=2Eendif

That way you can simply use `#ifdef WITH_BSNMP' throughout the source
files.

Thanks,
--=20
 Ed Schouten 
 WWW: http://80386.nl/

--65ImJOski3p8EhYV
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iQIcBAEBAgAGBQJOp8j4AAoJEG5e2P40kaK7OAYP/RivBi2KG07kmVRsQ+gK5mAv
hjl/gkrwyXp1TGsRfdgRix5p4OyWxJIAIda8YJt41MxdVEDXtuG75iLgAJCT+H/r
Dh5q1dscb8ma4WlXabPsH5RgEn4dwZvLoxRROqzLObBfFYCOPKugO+z0DrIgZ4OQ
cCkCcp0nPt4GQ6rRu/Lki8EWZJGPEfxiZ8UmI6U7rOWu4GDKKkyHXDUtKJrWaBqO
allav3z9/sDHrLGucC52sBVSLRxEuYTxdfDeri25dPcjDXjexdzZnvos8ubqYI+L
VzNvF7Vbw8iZt104RuhmLjeOWlXq4rkEq+sN4ANju3JVEsligEm0zQ89hqSQjZP6
tGmllf1xfqDpuzgm3uvyGo4Zdy/N/rt8FdhE3ykmrrRkWcgriMzwX0TFzm0Nro+A
dOZBzUlWEPSN6vfdS1y+GlOFH+qwRb9LsrzQMRBHGVsSQ4Fl3gpHjgztcmq5JS0u
hrpz9VfjrZZDaHDewJ7ErICjC65ChFTplr3itH4GN6pAnpz8J04mtaAL0PlNlCbo
YiVWbNcthJSzOG8Fam+DNyPCEAY9QqIzc4IWXdU2iVaxOzZ2fdZqpOD8AwBGbQIZ
GLxqY5/BmI1C//gsH9WWNgKf8H/eoneNI7bBGp1F3FTC1/N6/O6Nn4n8jT8rwrCp
It1sZhUi+46riNc05t4s
=2kid
-----END PGP SIGNATURE-----

--65ImJOski3p8EhYV--

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 08:47:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DD62E1065676;
	Wed, 26 Oct 2011 08:47:23 +0000 (UTC)
	(envelope-from edwin@mavetju.org)
Received: from mail4out.barnet.com.au (mail4out.barnet.com.au [202.83.178.123])
	by mx1.freebsd.org (Postfix) with ESMTP id 51D948FC18;
	Wed, 26 Oct 2011 08:47:23 +0000 (UTC)
Received: by mail4out.barnet.com.au (Postfix, from userid 1001)
	id E555F37B959; Wed, 26 Oct 2011 19:29:23 +1100 (EST)
X-Viruscan-Id: <4EA7C4E3000139358EF849@BarNet>
Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "*.barnet.com.au", Issuer "Equifax" (verified OK))
	by mail4.barnet.com.au (Postfix) with ESMTPS id 83D32434DF2;
	Wed, 26 Oct 2011 19:29:23 +1100 (EST)
Received: from [10.204.250.203] (ppp121-44-96-188.lns20.syd6.internode.on.net
	[121.44.96.188]) (using TLSv1 with cipher AES128-SHA (128/128 bits))
	(Client did not present a certificate)
	by mail4auth.barnet.com.au (Postfix) with ESMTPSA id 30CBE37B8F8;
	Wed, 26 Oct 2011 19:29:23 +1100 (EST)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1251.1)
From: Edwin Groothuis 
In-Reply-To: <201110260156.p9Q1uMU2026552@svn.freebsd.org>
Date: Wed, 26 Oct 2011 19:29:21 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201110260156.p9Q1uMU2026552@svn.freebsd.org>
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-Mailer: Apple Mail (2.1251.1)
Cc: 
Subject: Re: svn commit: r226771 - head/contrib/tzdata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 08:47:24 -0000


For about a 4 hour window (09:00 till 12:30 Sydney time), tzsetup(8) =
would complain about this missing patch in head, stable/[678]/.
When I committed the port earlier on (misc/zoneinfo) I had spend some =
time to make sure it worked properly.
No idea why I fell for it during the commit in the src/-tree later on.

On 26/10/2011, at 12:56 , Edwin Groothuis wrote:

> Author: edwin
> Date: Wed Oct 26 01:56:22 2011
> New Revision: 226771
> URL: http://svn.freebsd.org/changeset/base/226771
>=20
> Log:
>  Fix breakage in tzsetup:
>  MD      +4700+02850     Europe/Chisinau most locations
>=20
> Modified:
>  head/contrib/tzdata/zone.tab
>=20
> Modified: head/contrib/tzdata/zone.tab
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/contrib/tzdata/zone.tab	Wed Oct 26 01:03:53 2011	=
(r226770)
> +++ head/contrib/tzdata/zone.tab	Wed Oct 26 01:56:22 2011	=
(r226771)
> @@ -257,7 +257,7 @@ LV	+5657+02406	Europe/Riga
> LY	+3254+01311	Africa/Tripoli
> MA	+3339-00735	Africa/Casablanca
> MC	+4342+00723	Europe/Monaco
> -MD	+4700+02850	Europe/Chisinau
> +MD	+4700+02850	Europe/Chisinau	most locations
> MD	+4651+02938	Europe/Tiraspol	Pridnestrovie
> ME	+4226+01916	Europe/Podgorica
> MF	+1804-06305	America/Marigot


From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 12:20:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCDBE106564A;
	Wed, 26 Oct 2011 12:20:20 +0000 (UTC)
	(envelope-from bzeeb-lists@lists.zabbadoz.net)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 83D828FC16;
	Wed, 26 Oct 2011 12:20:20 +0000 (UTC)
Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587])
	(using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.sbone.de (Postfix) with ESMTPS id B8CB525D388E;
	Wed, 26 Oct 2011 12:20:19 +0000 (UTC)
Received: from content-filter.sbone.de (content-filter.sbone.de
	[IPv6:fde9:577b:c1a9:31::2013:2742])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPS id F39C7BD3D43;
	Wed, 26 Oct 2011 12:20:18 +0000 (UTC)
X-Virus-Scanned: amavisd-new at sbone.de
Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587])
	by content-filter.sbone.de (content-filter.sbone.de
	[fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024)
	with ESMTP id Z4PORPFyCDQh; Wed, 26 Oct 2011 12:20:18 +0000 (UTC)
Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPSA id DC2C7BD3D19;
	Wed, 26 Oct 2011 12:20:17 +0000 (UTC)
Date: Wed, 26 Oct 2011 12:20:17 +0000 (UTC)
From: "Bjoern A. Zeeb" 
To: Ed Schouten 
In-Reply-To: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
Message-ID: 
References: <201110260749.p9Q7nlj3038764@svn.freebsd.org>
X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226785 - head
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 12:20:20 -0000

On Wed, 26 Oct 2011, Ed Schouten wrote:

> Author: ed
> Date: Wed Oct 26 07:49:47 2011
> New Revision: 226785
> URL: http://svn.freebsd.org/changeset/base/226785
>
> Log:
>  Attempt to fix build logic for gensnmptree.
>
>  There are two problems with the existing logic. It builds gensnmptree
>  on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
>  not forget to build gensnmptree on systems that have originally been
>  built without. This causes a buildworld on those systems to fail.

Wasn't it originally located in a different path?   Could be my memory
doesn't serve me right on this one.  You might want to ping syrinx.


>  MFC after:	1 week
>
> Modified:
>  head/Makefile.inc1
>
> Modified: head/Makefile.inc1
> ==============================================================================
> --- head/Makefile.inc1	Wed Oct 26 06:50:40 2011	(r226784)
> +++ head/Makefile.inc1	Wed Oct 26 07:49:47 2011	(r226785)
> @@ -1018,7 +1018,8 @@ _yacc=		usr.bin/yacc
> _awk=		usr.bin/awk
> .endif
>
> -.if ${BOOTSTRAPPING} < 700018
> +.if ${MK_BSNMP} != "no" && \
> +    (${BOOTSTRAPPING} < 700018 || !exists(/usr/sbin/gensnmptree))
> _gensnmptree=	usr.sbin/bsnmpd/gensnmptree
> .endif
>
>

-- 
Bjoern A. Zeeb                                 You have to have visions!
          Stop bit received. Insert coin for new address family.

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 12:27:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1233)
	id 676771065674; Wed, 26 Oct 2011 12:27:11 +0000 (UTC)
Date: Wed, 26 Oct 2011 12:27:11 +0000
From: Alexander Best 
To: Ed Schouten 
Message-ID: <20111026122711.GA25999@freebsd.org>
References: <201109290631.p8T6VgJ3008377@svn.freebsd.org>
	<20110929121457.GA53600@freebsd.org>
	<20111001130643.GC91943@hoeg.nl>
	<20111009011141.GA63608@freebsd.org>
	<20111009072008.GJ91943@hoeg.nl>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt"
Content-Disposition: inline
In-Reply-To: <20111009072008.GJ91943@hoeg.nl>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Edward Tomasz Napierala 
Subject: Re: svn commit: r225868 - head/bin/ps
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 12:27:11 -0000


--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun Oct  9 11, Ed Schouten wrote:
> * Alexander Best , 20111009 03:11:
> > is this what you had in mind?
> 
> Yes, exactly. :-)

here's an updated patch, which also includes a man page addition. please
anybody feel free to commit.

cheers.
alex

> 
> -- 
>  Ed Schouten 
>  WWW: http://80386.nl/



--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ps.diff"

Index: bin/ps/ps.1
===================================================================
--- bin/ps/ps.1	(revision 226769)
+++ bin/ps/ps.1	(working copy)
@@ -29,7 +29,7 @@
 .\"     @(#)ps.1	8.3 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd October 1, 2011
+.Dd October 26, 2011
 .Dt PS 1
 .Os
 .Sh NAME
@@ -437,6 +437,10 @@
 .Ql -
 if the process can no longer reach that
 controlling terminal (i.e., it has been revoked).
+A
+.Ql -
+without a preceding two letter abbreviation or pseudo-terminal device number
+indicates a process which never had a controlling terminal.
 The full pathname of the controlling terminal is available via the
 .Cm tty
 keyword.
Index: bin/ps/print.c
===================================================================
--- bin/ps/print.c	(revision 226769)
+++ bin/ps/print.c	(working copy)
@@ -362,7 +362,7 @@
 	v = ve->var;
 	dev = k->ki_p->ki_tdev;
 	if (dev == NODEV)
-		str = strdup("??");
+		str = strdup("-");
 	else
 		asprintf(&str, "%#jx", (uintmax_t)dev);
 
@@ -379,7 +379,7 @@
 	v = ve->var;
 	dev = k->ki_p->ki_tdev;
 	if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
-		str = strdup("?? ");
+		str = strdup("- ");
 	else {
 		if (strncmp(ttname, "tty", 3) == 0 ||
 		    strncmp(ttname, "cua", 3) == 0)
@@ -403,7 +403,7 @@
 	v = ve->var;
 	dev = k->ki_p->ki_tdev;
 	if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL)
-		ttname = "??";
+		ttname = "-";
 
 	return (strdup(ttname));
 }

--pf9I7BMVVzbSWLtt--

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 14:26:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 45CD6106564A;
	Wed, 26 Oct 2011 14:26:11 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 357D98FC13;
	Wed, 26 Oct 2011 14:26: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 p9QEQBgR053867;
	Wed, 26 Oct 2011 14:26:11 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QEQBYD053865;
	Wed, 26 Oct 2011 14:26:11 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201110261426.p9QEQBYD053865@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Wed, 26 Oct 2011 14:26:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226790 - head/lib/libc/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 14:26:11 -0000

Author: pluknet
Date: Wed Oct 26 14:26:10 2011
New Revision: 226790
URL: http://svn.freebsd.org/changeset/base/226790

Log:
  Fix typo in timer_getoverrun cross-reference.
  
  MFC after:	3 days

Modified:
  head/lib/libc/sys/timer_create.2

Modified: head/lib/libc/sys/timer_create.2
==============================================================================
--- head/lib/libc/sys/timer_create.2	Wed Oct 26 13:52:24 2011	(r226789)
+++ head/lib/libc/sys/timer_create.2	Wed Oct 26 14:26:10 2011	(r226790)
@@ -151,7 +151,7 @@ memory protection fault.
 .Sh SEE ALSO
 .Xr clock_getres 2 ,
 .Xr timer_delete 2 ,
-.Xr timer_getoverun 2 ,
+.Xr timer_getoverrun 2 ,
 .Xr siginfo 3
 .Sh STANDARDS
 The

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 15:17:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B306E106564A;
	Wed, 26 Oct 2011 15:17:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 990AE8FC19;
	Wed, 26 Oct 2011 15:17:42 +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 p9QFHgZQ055755;
	Wed, 26 Oct 2011 15:17:42 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QFHg9R055753;
	Wed, 26 Oct 2011 15:17:42 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110261517.p9QFHg9R055753@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 26 Oct 2011 15:17:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226793 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 15:17:42 -0000

Author: jhb
Date: Wed Oct 26 15:17:42 2011
New Revision: 226793
URL: http://svn.freebsd.org/changeset/base/226793

Log:
  - Fixup filenames in a few more places where they are used.
  - Some whitespace fixes.

Modified:
  head/sys/kern/subr_witness.c

Modified: head/sys/kern/subr_witness.c
==============================================================================
--- head/sys/kern/subr_witness.c	Wed Oct 26 15:01:04 2011	(r226792)
+++ head/sys/kern/subr_witness.c	Wed Oct 26 15:17:42 2011	(r226793)
@@ -719,6 +719,18 @@ static int witness_cold = 1;
  */
 static int witness_spin_warn = 0;
 
+/* Trim useless garbage from filenames. */
+static const char *
+fixup_filename(const char *file)
+{
+
+	if (file == NULL)
+		return (NULL);
+	while (strncmp(file, "../", 3) == 0)
+		file += 3;
+	return (file);
+}
+
 /*
  * The WITNESS-enabled diagnostic code.  Note that the witness code does
  * assume that the early boot is single-threaded at least until after this
@@ -924,7 +936,7 @@ witness_ddb_display_descendants(int(*prn
  	}
  	w->w_displayed = 1;
 	if (w->w_file != NULL && w->w_line != 0)
-		prnt(" -- last acquired @ %s:%d\n", w->w_file,
+		prnt(" -- last acquired @ %s:%d\n", fixup_filename(w->w_file),
 		    w->w_line);
 	else
 		prnt(" -- never acquired\n");
@@ -990,18 +1002,6 @@ witness_ddb_display(int(*prnt)(const cha
 }
 #endif /* DDB */
 
-/* Trim useless garbage from filenames. */
-static const char *
-fixup_filename(const char *file)
-{
-
-	if (file == NULL)
-		return (NULL);
-	while (strncmp(file, "../", 3) == 0)
-		file += 3;
-	return (file);
-}
-
 int
 witness_defineorder(struct lock_object *lock1, struct lock_object *lock2)
 {
@@ -1167,12 +1167,12 @@ witness_checkorder(struct lock_object *l
 			    "acquiring duplicate lock of same type: \"%s\"\n", 
 			    w->w_name);
 			printf(" 1st %s @ %s:%d\n", plock->li_lock->lo_name,
-			       fixup_filename(plock->li_file), plock->li_line);
+			    fixup_filename(plock->li_file), plock->li_line);
 			printf(" 2nd %s @ %s:%d\n", lock->lo_name,
 			    fixup_filename(file), line);
 			witness_debugger(1);
-		    } else
-			    mtx_unlock_spin(&w_mtx);
+		} else
+			mtx_unlock_spin(&w_mtx);
 		return;
 	}
 	mtx_assert(&w_mtx, MA_OWNED);
@@ -1483,7 +1483,8 @@ witness_downgrade(struct lock_object *lo
 		if ((instance->li_flags & LI_RECURSEMASK) != 0)
 			panic("downgrade of recursed lock (%s) %s r=%d @ %s:%d",
 			    class->lc_name, lock->lo_name,
-			    instance->li_flags & LI_RECURSEMASK, file, line);
+			    instance->li_flags & LI_RECURSEMASK,
+			    fixup_filename(file), line);
 	}
 	instance->li_flags &= ~LI_EXCLUSIVE;
 }
@@ -1533,8 +1534,7 @@ found:
 	if ((instance->li_flags & LI_EXCLUSIVE) != 0 && witness_watch > 0 &&
 	    (flags & LOP_EXCLUSIVE) == 0) {
 		printf("shared unlock of (%s) %s @ %s:%d\n", class->lc_name,
-		    lock->lo_name,
-		    fixup_filename(file), line);
+		    lock->lo_name, fixup_filename(file), line);
 		printf("while exclusively locked from %s:%d\n",
 		    fixup_filename(instance->li_file), instance->li_line);
 		panic("excl->ushare");
@@ -2090,8 +2090,7 @@ witness_list_lock(struct lock_instance *
 		prnt(" (%s)", lock->lo_witness->w_name);
 	prnt(" r = %d (%p) locked @ %s:%d\n",
 	    instance->li_flags & LI_RECURSEMASK, lock,
-	    fixup_filename(instance->li_file),
-	    instance->li_line);
+	    fixup_filename(instance->li_file), instance->li_line);
 }
 
 #ifdef DDB

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 15:36:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 67726106566B;
	Wed, 26 Oct 2011 15:36:49 +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 4D8C38FC17;
	Wed, 26 Oct 2011 15:36:49 +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 p9QFansl056460;
	Wed, 26 Oct 2011 15:36:49 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QFanEX056458;
	Wed, 26 Oct 2011 15:36:49 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201110261536.p9QFanEX056458@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 26 Oct 2011 15:36:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226796 - stable/9/sys/contrib/pf/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 15:36:49 -0000

Author: bz
Date: Wed Oct 26 15:36:48 2011
New Revision: 226796
URL: http://svn.freebsd.org/changeset/base/226796

Log:
  MFC r226527:
  
    Fix indentation in a loop and a tiny maze of #ifdefs for just the
    __FreeBSD__ parts that had it wrong.
  
  MFC r226530:
  
    Fix a bug when NPFSYNC > 0 that on FreeBSD we would always return
    and never remove state.
  
    This fixes the problem some people are seeing that state is removed when pf
    is loaded as a module but not in situations when compiled into the kernel.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/contrib/pf/net/pf.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/contrib/pf/net/pf.c
==============================================================================
--- stable/9/sys/contrib/pf/net/pf.c	Wed Oct 26 15:22:13 2011	(r226795)
+++ stable/9/sys/contrib/pf/net/pf.c	Wed Oct 26 15:36:48 2011	(r226796)
@@ -1342,42 +1342,42 @@ pf_purge_thread(void *v)
 		tsleep(pf_purge_thread, PWAIT, "pftm", 1 * hz);
 
 #ifdef __FreeBSD__
-	sx_slock(&V_pf_consistency_lock);
-	PF_LOCK();
-	locked = 0;
-
-	if (V_pf_end_threads) {
-		PF_UNLOCK();
-		sx_sunlock(&V_pf_consistency_lock);
-		sx_xlock(&V_pf_consistency_lock);
+		sx_slock(&V_pf_consistency_lock);
 		PF_LOCK();
+		locked = 0;
+
+		if (V_pf_end_threads) {
+			PF_UNLOCK();
+			sx_sunlock(&V_pf_consistency_lock);
+			sx_xlock(&V_pf_consistency_lock);
+			PF_LOCK();
 
-		pf_purge_expired_states(V_pf_status.states, 1);
-		pf_purge_expired_fragments();
-		pf_purge_expired_src_nodes(1);
-		V_pf_end_threads++;
+			pf_purge_expired_states(V_pf_status.states, 1);
+			pf_purge_expired_fragments();
+			pf_purge_expired_src_nodes(1);
+			V_pf_end_threads++;
 
-		sx_xunlock(&V_pf_consistency_lock);
-		PF_UNLOCK();
-		wakeup(pf_purge_thread);
-		kproc_exit(0);
-	}
+			sx_xunlock(&V_pf_consistency_lock);
+			PF_UNLOCK();
+			wakeup(pf_purge_thread);
+			kproc_exit(0);
+		}
 #endif
 		s = splsoftnet();
 
 		/* process a fraction of the state table every second */
 #ifdef __FreeBSD__
-	if (!pf_purge_expired_states(1 + (V_pf_status.states /
-	    V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) {
-		PF_UNLOCK();
-		sx_sunlock(&V_pf_consistency_lock);
-		sx_xlock(&V_pf_consistency_lock);
-		PF_LOCK();
-		locked = 1;
+		if (!pf_purge_expired_states(1 + (V_pf_status.states /
+		    V_pf_default_rule.timeout[PFTM_INTERVAL]), 0)) {
+			PF_UNLOCK();
+			sx_sunlock(&V_pf_consistency_lock);
+			sx_xlock(&V_pf_consistency_lock);
+			PF_LOCK();
+			locked = 1;
 
-		pf_purge_expired_states(1 + (V_pf_status.states /
-		    V_pf_default_rule.timeout[PFTM_INTERVAL]), 1);
-	}
+			pf_purge_expired_states(1 + (V_pf_status.states /
+			    V_pf_default_rule.timeout[PFTM_INTERVAL]), 1);
+		}
 #else
 		pf_purge_expired_states(1 + (pf_status.states
 		    / pf_default_rule.timeout[PFTM_INTERVAL]));
@@ -1626,8 +1626,8 @@ pf_free_state(struct pf_state *cur)
 
 #if NPFSYNC > 0
 #ifdef __FreeBSD__
-	if (pfsync_state_in_use_ptr != NULL)
-		pfsync_state_in_use_ptr(cur);
+	if (pfsync_state_in_use_ptr != NULL &&
+		pfsync_state_in_use_ptr(cur))
 #else
 	if (pfsync_state_in_use(cur))
 #endif

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 16:09:05 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86F0B1065673;
	Wed, 26 Oct 2011 16:09:05 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D7698FC15;
	Wed, 26 Oct 2011 16:09:05 +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 p9QG95Ks057544;
	Wed, 26 Oct 2011 16:09:05 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QG95Kt057541;
	Wed, 26 Oct 2011 16:09:05 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110261609.p9QG95Kt057541@svn.freebsd.org>
From: Adrian Chadd 
Date: Wed, 26 Oct 2011 16:09:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226798 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 16:09:05 -0000

Author: adrian
Date: Wed Oct 26 16:09:05 2011
New Revision: 226798
URL: http://svn.freebsd.org/changeset/base/226798

Log:
  As a prelude to bringing over the 11n work, include some extra statistics fields.

Modified:
  head/sys/dev/ath/if_ath_sysctl.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- head/sys/dev/ath/if_ath_sysctl.c	Wed Oct 26 15:52:03 2011	(r226797)
+++ head/sys/dev/ath/if_ath_sysctl.c	Wed Oct 26 16:09:05 2011	(r226798)
@@ -729,6 +729,23 @@ ath_sysctl_stats_attach(struct ath_softc
 	    &sc->sc_stats.ast_tx_timerexpired, 0, "TX exceeded TX_TIMER register");
 	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_desccfgerr", CTLFLAG_RD,
 	    &sc->sc_stats.ast_tx_desccfgerr, 0, "TX Descriptor Cfg Error");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swretries", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_swretries, 0, "TX software retry count");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_swretrymax", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_swretrymax, 0, "TX software retry max reached");
+
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_data_underrun", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_data_underrun, 0, "");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_delim_underrun", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_delim_underrun, 0, "");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_aggrfail", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_aggrfail, 0,
+	    "Number of aggregate TX failures (whole frame)");
+
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_intr", CTLFLAG_RD,
+	    &sc->sc_stats.ast_rx_intr, 0, "RX interrupts");
+	SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_intr", CTLFLAG_RD,
+	    &sc->sc_stats.ast_tx_intr, 0, "TX interrupts");
 
 	/* Attach the RX phy error array */
 	ath_sysctl_stats_attach_rxphyerr(sc, child);

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h	Wed Oct 26 15:52:03 2011	(r226797)
+++ head/sys/dev/ath/if_athioctl.h	Wed Oct 26 16:09:05 2011	(r226798)
@@ -134,7 +134,16 @@ struct ath_stats {
 	u_int32_t	ast_tx_xtxop;	/* tx exceeded TXOP */
 	u_int32_t	ast_tx_timerexpired;	/* tx exceeded TX_TIMER */
 	u_int32_t	ast_tx_desccfgerr;	/* tx desc cfg error */
-	u_int32_t	ast_pad[13];
+	u_int32_t	ast_tx_swretries;	/* software TX retries */
+	u_int32_t	ast_tx_swretrymax;	/* software TX retry max limit reach */
+	u_int32_t	ast_tx_data_underrun;
+	u_int32_t	ast_tx_delim_underrun;
+	u_int32_t	ast_tx_aggrfail;		/* aggregate TX failed in its entirety */
+	u_int32_t	ast_tx_getnobuf;
+	u_int32_t	ast_tx_getbusybuf;
+	u_int32_t	ast_tx_intr;
+	u_int32_t	ast_rx_intr;
+	u_int32_t	ast_pad[4];
 };
 
 #define	SIOCGATHSTATS	_IOWR('i', 137, struct ifreq)

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 16:11:49 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB64D106566C;
	Wed, 26 Oct 2011 16:11:49 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BB1228FC0A;
	Wed, 26 Oct 2011 16:11:49 +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 p9QGBnKQ057674;
	Wed, 26 Oct 2011 16:11:49 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QGBnvI057672;
	Wed, 26 Oct 2011 16:11:49 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110261611.p9QGBnvI057672@svn.freebsd.org>
From: Adrian Chadd 
Date: Wed, 26 Oct 2011 16:11:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226799 - head/tools/tools/ath/athstats
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 16:11:49 -0000

Author: adrian
Date: Wed Oct 26 16:11:49 2011
New Revision: 226799
URL: http://svn.freebsd.org/changeset/base/226799

Log:
  Bring over the new aggregate statistics from the 11n branch.
  
  Some of these values are currently updated by the driver (the 11n
  RX related statistics) so they are immediately useful.

Modified:
  head/tools/tools/ath/athstats/athstats.c

Modified: head/tools/tools/ath/athstats/athstats.c
==============================================================================
--- head/tools/tools/ath/athstats/athstats.c	Wed Oct 26 16:09:05 2011	(r226798)
+++ head/tools/tools/ath/athstats/athstats.c	Wed Oct 26 16:11:49 2011	(r226799)
@@ -49,18 +49,10 @@
 #include 
 #include 
 
-/* Use the system net80211 headers, rather than the kernel tree */
-/*
- * XXX this means that if you build a separate net80211 stack
- * XXX with your kernel and don't install the new/changed headers,
- * XXX this tool may break.
- * XXX -adrian
- */
-#include 
-#include 
-
 #include "ah.h"
 #include "ah_desc.h"
+#include "net80211/ieee80211_ioctl.h"
+#include "net80211/ieee80211_radiotap.h"
 #include "if_athioctl.h"
 
 #include "athstats.h"
@@ -256,8 +248,46 @@ static const struct fmt athstats[] = {
 	{ 5,	"txrawfail",	"txrawfail",	"raw tx failed 'cuz interface/hw down" },
 #define	S_RX_TOOBIG	AFTER(S_TX_RAW_FAIL)
 	{ 5,	"rx2big",	"rx2big",	"rx failed 'cuz frame too large"  },
+#define	S_RX_AGG	AFTER(S_RX_TOOBIG)
+	{ 5,	"rxagg",	"rxagg",	"A-MPDU sub-frames received" },
+#define	S_RX_HALFGI	AFTER(S_RX_AGG)
+	{ 5,	"rxhalfgi",	"rxhgi",	"Half-GI frames received" },
+#define	S_RX_2040	AFTER(S_RX_HALFGI)
+	{ 6,	"rx2040",	"rx2040",	"40MHz frames received" },
+#define	S_RX_PRE_CRC_ERR	AFTER(S_RX_2040)
+	{ 11,	"rxprecrcerr",	"rxprecrcerr",	"CRC errors for non-last A-MPDU subframes" },
+#define	S_RX_POST_CRC_ERR	AFTER(S_RX_PRE_CRC_ERR)
+	{ 12,	"rxpostcrcerr",	"rxpostcrcerr",	"CRC errors for last subframe in an A-MPDU" },
+#define	S_RX_DECRYPT_BUSY_ERR	AFTER(S_RX_POST_CRC_ERR)
+	{ 10,	"rxdescbusy",	"rxdescbusy",	"Decryption engine busy" },
+#define	S_RX_HI_CHAIN	AFTER(S_RX_DECRYPT_BUSY_ERR)
+	{ 4,	"rxhi",	"rxhi",	"Frames received with RX chain in high power mode" },
+#define	S_TX_HTPROTECT	AFTER(S_RX_HI_CHAIN)
+	{ 7,	"txhtprot",	"txhtprot",	"Frames transmitted with HT Protection" },
+#define	S_RX_QEND	AFTER(S_TX_HTPROTECT)
+	{ 7,	"rxquend",	"rxquend",	"Hit end of RX descriptor queue" },
+#define	S_TX_TIMEOUT	AFTER(S_RX_QEND)
+	{ 4,	"txtimeout",	"TXTX",	"TX Timeout" },
+#define	S_TX_CSTIMEOUT	AFTER(S_TX_TIMEOUT)
+	{ 4,	"csttimeout",	"CSTX",	"Carrier Sense Timeout" },
+#define	S_TX_XTXOP_ERR	AFTER(S_TX_CSTIMEOUT)
+	{ 5,	"xtxoperr",	"TXOPX",	"TXOP exceed" },
+#define	S_TX_TIMEREXPIRED_ERR	AFTER(S_TX_XTXOP_ERR)
+	{ 7,	"texperr",	"texperr",	"TX Timer expired" },
+#define	S_TX_DESCCFG_ERR	AFTER(S_TX_TIMEREXPIRED_ERR)
+	{ 10,	"desccfgerr",	"desccfgerr",	"TX descriptor error" },
+#define	S_TX_SWRETRIES	AFTER(S_TX_DESCCFG_ERR)
+	{ 9,	"txswretry",	"txswretry",	"Number of frames retransmitted in software" },
+#define	S_TX_SWRETRIES_MAX	AFTER(S_TX_SWRETRIES)
+	{ 7,	"txswmax",	"txswmax",	"Number of frames exceeding software retry" },
+#define	S_TX_DATA_UNDERRUN	AFTER(S_TX_SWRETRIES_MAX)
+	{ 5,	"txdataunderrun",	"TXDAU",	"A-MPDU TX FIFO data underrun" },
+#define	S_TX_DELIM_UNDERRUN	AFTER(S_TX_DATA_UNDERRUN)
+	{ 5,	"txdelimunderrun",	"TXDEU",	"A-MPDU TX Delimiter underrun" },
+#define	S_TX_AGGR_FAIL		AFTER(S_TX_DELIM_UNDERRUN)
+	{ 10,	"txaggrfail",	"txaggrfail",	"A-MPDU TX attempt failed" },
 #ifndef __linux__
-#define	S_CABQ_XMIT	AFTER(S_RX_TOOBIG)
+#define	S_CABQ_XMIT	AFTER(S_TX_AGGR_FAIL)
 	{ 5,	"cabxmit",	"cabxmit",	"cabq frames transmitted" },
 #define	S_CABQ_BUSY	AFTER(S_CABQ_XMIT)
 	{ 5,	"cabqbusy",	"cabqbusy",	"cabq xmit overflowed beacon interval" },
@@ -269,7 +299,7 @@ static const struct fmt athstats[] = {
 	{ 5,	"rxbusdma",	"rxbusdma",	"rx setup failed for dma resrcs" },
 #define	S_FF_TXOK	AFTER(S_RX_BUSDMA)
 #else
-#define	S_FF_TXOK	AFTER(S_RX_PHY_UNDERRUN)
+#define	S_FF_TXOK	AFTER(S_TX_AGGR_FAIL)
 #endif
 	{ 5,	"fftxok",	"fftxok",	"fast frames xmit successfully" },
 #define	S_FF_TXERR	AFTER(S_FF_TXOK)
@@ -384,12 +414,16 @@ static const struct fmt athstats[] = {
 	{ 4,	"asignal",	"asig",	"signal of last ack (dBm)" },
 #define	S_RX_SIGNAL	AFTER(S_TX_SIGNAL)
 	{ 4,	"signal",	"sig",	"avg recv signal (dBm)" },
+
 };
 #define	S_PHY_MIN	S_RX_PHY_UNDERRUN
 #define	S_PHY_MAX	S_RX_PHY_CCK_RESTART
 #define	S_LAST		S_ANT_TX0
 #define	S_MAX	S_ANT_RX7+1
 
+/*
+ * XXX fold this into the external HAL definitions! -adrian
+ */
 struct _athstats {
 	struct ath_stats ath;
 #ifdef ATH_SUPPORT_ANI
@@ -723,6 +757,25 @@ ath_get_curstat(struct statfoo *sf, int 
 		snprintf(b, bs, "%d",
 			wf->cur.ath.ast_rx_rssi + wf->cur.ath.ast_rx_noise);
 		return 1;
+	case S_RX_AGG:		STAT(rx_agg);
+	case S_RX_HALFGI:	STAT(rx_halfgi);
+	case S_RX_2040:		STAT(rx_2040);
+	case S_RX_PRE_CRC_ERR:	STAT(rx_pre_crc_err);
+	case S_RX_POST_CRC_ERR:	STAT(rx_post_crc_err);
+	case S_RX_DECRYPT_BUSY_ERR:	STAT(rx_decrypt_busy_err);
+	case S_RX_HI_CHAIN:	STAT(rx_hi_rx_chain);
+	case S_TX_HTPROTECT:	STAT(tx_htprotect);
+	case S_RX_QEND:		STAT(rx_hitqueueend);
+	case S_TX_TIMEOUT:	STAT(tx_timeout);
+	case S_TX_CSTIMEOUT:	STAT(tx_cst);
+	case S_TX_XTXOP_ERR:	STAT(tx_xtxop);
+	case S_TX_TIMEREXPIRED_ERR:	STAT(tx_timerexpired);
+	case S_TX_DESCCFG_ERR:	STAT(tx_desccfgerr);
+	case S_TX_SWRETRIES:	STAT(tx_swretries);
+	case S_TX_SWRETRIES_MAX:	STAT(tx_swretrymax);
+	case S_TX_DATA_UNDERRUN:	STAT(tx_data_underrun);
+	case S_TX_DELIM_UNDERRUN:	STAT(tx_delim_underrun);
+	case S_TX_AGGR_FAIL:		STAT(tx_aggrfail);
 	}
 	b[0] = '\0';
 	return 0;
@@ -943,7 +996,27 @@ ath_get_totstat(struct statfoo *sf, int 
 		snprintf(b, bs, "%d",
 			wf->total.ath.ast_rx_rssi + wf->total.ath.ast_rx_noise);
 		return 1;
+	case S_RX_AGG:		STAT(rx_agg);
+	case S_RX_HALFGI:	STAT(rx_halfgi);
+	case S_RX_2040:		STAT(rx_2040);
+	case S_RX_PRE_CRC_ERR:	STAT(rx_pre_crc_err);
+	case S_RX_POST_CRC_ERR:	STAT(rx_post_crc_err);
+	case S_RX_DECRYPT_BUSY_ERR:	STAT(rx_decrypt_busy_err);
+	case S_RX_HI_CHAIN:	STAT(rx_hi_rx_chain);
+	case S_TX_HTPROTECT:	STAT(tx_htprotect);
+	case S_RX_QEND:		STAT(rx_hitqueueend);
+	case S_TX_TIMEOUT:	STAT(tx_timeout);
+	case S_TX_CSTIMEOUT:	STAT(tx_cst);
+	case S_TX_XTXOP_ERR:	STAT(tx_xtxop);
+	case S_TX_TIMEREXPIRED_ERR:	STAT(tx_timerexpired);
+	case S_TX_DESCCFG_ERR:	STAT(tx_desccfgerr);
+	case S_TX_SWRETRIES:	STAT(tx_swretries);
+	case S_TX_SWRETRIES_MAX:	STAT(tx_swretrymax);
+	case S_TX_DATA_UNDERRUN:	STAT(tx_data_underrun);
+	case S_TX_DELIM_UNDERRUN:	STAT(tx_delim_underrun);
+	case S_TX_AGGR_FAIL:		STAT(tx_aggrfail);
 	}
+
 	b[0] = '\0';
 	return 0;
 #undef RXANT

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 17:04:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A08F2106564A;
	Wed, 26 Oct 2011 17:04:26 +0000 (UTC)
	(envelope-from rodrigc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8E55C8FC13;
	Wed, 26 Oct 2011 17:04:26 +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 p9QH4Q8O059361;
	Wed, 26 Oct 2011 17:04:26 GMT (envelope-from rodrigc@svn.freebsd.org)
Received: (from rodrigc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QH4QKU059354;
	Wed, 26 Oct 2011 17:04:26 GMT (envelope-from rodrigc@svn.freebsd.org)
Message-Id: <201110261704.p9QH4QKU059354@svn.freebsd.org>
From: Craig Rodrigues 
Date: Wed, 26 Oct 2011 17:04:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226800 - in stable/9: sbin/atacontrol sys/dev/ata
	usr.sbin/burncd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 17:04:26 -0000

Author: rodrigc
Date: Wed Oct 26 17:04:26 2011
New Revision: 226800
URL: http://svn.freebsd.org/changeset/base/226800

Log:
  Add a "kern.features.ata_cam" sysctl in the kernel when the ATA_CAM kernel
  option is defined.  This sysctl can be queried by feature_present(3).
  
  Query for this feature in /sbin/atacontrol and /usr/sbin/burncd.
  If these utilities detect that ATA_CAM is enabled, then these utilities
  will error out.  These utilities are compatible with the old ATA
  driver, but are incomptible with the new ATA_CAM driver.  By erroring out,
  we give end-users an idea as to what remedies to use, and reduce the need for them
  to file PR's.  For atacontrol, camcontrol must be used instead,
  and for burncd, alternative utilties from the ports collection must be used
  such as sysutils/cdrtools.
  
  In future, maybe someone can re-write burncd to work with ATA_CAM,
  but at least for now, we give a somewhat useful error message to end users.
  
  PR:		160979
  Reviewed by:	jh, Arnaud Lacombe 
  Approved by:	re (kib)
  Reported by:	Joe Barbish 

Modified:
  stable/9/sbin/atacontrol/atacontrol.8
  stable/9/sbin/atacontrol/atacontrol.c
  stable/9/sys/dev/ata/ata-all.c
  stable/9/usr.sbin/burncd/burncd.8
  stable/9/usr.sbin/burncd/burncd.c
Directory Properties:
  stable/9/sbin/atacontrol/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/usr.sbin/burncd/   (props changed)

Modified: stable/9/sbin/atacontrol/atacontrol.8
==============================================================================
--- stable/9/sbin/atacontrol/atacontrol.8	Wed Oct 26 16:11:49 2011	(r226799)
+++ stable/9/sbin/atacontrol/atacontrol.8	Wed Oct 26 17:04:26 2011	(r226800)
@@ -25,12 +25,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 21, 2009
+.Dd October 9, 2011
 .Dt ATACONTROL 8
 .Os
 .Sh NAME
 .Nm atacontrol
 .Nd ATA device driver control program
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Aq Ar command
@@ -361,11 +368,17 @@ or syslog logging on it as the disk will
 up all the time.
 .Sh SEE ALSO
 .Xr ata 4
+.Xr cam 4
+.Xr camcontrol 8
 .Sh HISTORY
 The
 .Nm
 utility first appeared in
 .Fx 4.6 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 .An -nosplit
 The
@@ -377,3 +390,16 @@ utility was written by
 This manual page was written by
 .An S\(/oren Schmidt
 .Aq sos@FreeBSD.org .
+.Sh NOTES
+The
+.Nm
+utility was deprecated in
+.Fx 9.0 .
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr camcontrol 8
+must be used instead.

Modified: stable/9/sbin/atacontrol/atacontrol.c
==============================================================================
--- stable/9/sbin/atacontrol/atacontrol.c	Wed Oct 26 16:11:49 2011	(r226799)
+++ stable/9/sbin/atacontrol/atacontrol.c	Wed Oct 26 17:04:26 2011	(r226800)
@@ -378,6 +378,11 @@ main(int argc, char **argv)
 {
 	int fd, mode, channel, array;
 
+	if (feature_present("ata_cam")) {
+		errx(1, "\nATA_CAM option is enabled in kernel.\n"
+		    "Please use camcontrol instead.");
+	}
+
 	if (argc < 2)
 		usage();
 

Modified: stable/9/sys/dev/ata/ata-all.c
==============================================================================
--- stable/9/sys/dev/ata/ata-all.c	Wed Oct 26 16:11:49 2011	(r226799)
+++ stable/9/sys/dev/ata/ata-all.c	Wed Oct 26 17:04:26 2011	(r226800)
@@ -120,6 +120,9 @@ SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLA
 TUNABLE_INT("hw.ata.setmax", &ata_setmax);
 SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0,
 	   "ATA disk set max native address");
+#ifdef ATA_CAM
+FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver");
+#endif
 
 /*
  * newbus device interface related functions

Modified: stable/9/usr.sbin/burncd/burncd.8
==============================================================================
--- stable/9/usr.sbin/burncd/burncd.8	Wed Oct 26 16:11:49 2011	(r226799)
+++ stable/9/usr.sbin/burncd/burncd.8	Wed Oct 26 17:04:26 2011	(r226800)
@@ -27,12 +27,19 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 21, 2009
+.Dd October 9, 2011
 .Dt BURNCD 8
 .Os
 .Sh NAME
 .Nm burncd
 .Nd control the ATAPI CD-R/RW driver
+.Pp
+This utility was
+.Em deprecated
+in
+.Fx 9.0 .
+See
+.Sx NOTES .
 .Sh SYNOPSIS
 .Nm
 .Op Fl deFlmnpqtv
@@ -211,6 +218,10 @@ The
 .Nm
 utility appeared in
 .Fx 4.0 .
+.Pp
+.Nm
+was deprecated in
+.Fx 9.0 .
 .Sh AUTHORS
 The
 .Nm
@@ -220,3 +231,19 @@ Denmark
 .Aq sos@FreeBSD.org .
 .Sh BUGS
 Probably, please report when found.
+.Sh NOTES
+When
+.Bd -ragged -offset indent
+.Cd "options ATA_CAM"
+.Ed
+.Pp
+is compiled into the kernel, then
+.Xr cdrecord 1 ,
+available in the
+.Fx
+Ports Collection as part of the
+.Pa sysutils/cdrtools
+port, must be used instead.
+Refer to:
+.Pp
+http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD

Modified: stable/9/usr.sbin/burncd/burncd.c
==============================================================================
--- stable/9/usr.sbin/burncd/burncd.c	Wed Oct 26 16:11:49 2011	(r226799)
+++ stable/9/usr.sbin/burncd/burncd.c	Wed Oct 26 17:04:26 2011	(r226800)
@@ -82,6 +82,13 @@ main(int argc, char **argv)
 	int block_size = 0, block_type = 0, cdopen = 0, dvdrw = 0;
 	const char *dev, *env_speed;
 
+	if (feature_present("ata_cam")) {
+		errx(1, "\nATA_CAM option is enabled in kernel.\n"
+		    "Install the sysutils/cdrtools port and use cdrecord instead.\n\n"
+		    "Please refer to:\n"
+		    "http://www.freebsd.org/doc/handbook/creating-cds.html#CDRECORD");
+	}
+
 	if ((dev = getenv("CDROM")) == NULL)
 		dev = "/dev/acd0";
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 17:09:10 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 58A651065674;
	Wed, 26 Oct 2011 17:09:10 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 46ACC8FC16;
	Wed, 26 Oct 2011 17:09:10 +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 p9QH9AJQ059557;
	Wed, 26 Oct 2011 17:09:10 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QH9AKo059551;
	Wed, 26 Oct 2011 17:09:10 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110261709.p9QH9AKo059551@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Wed, 26 Oct 2011 17:09:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226801 - stable/9/sys/contrib/pf/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 17:09:10 -0000

Author: glebius
Date: Wed Oct 26 17:09:09 2011
New Revision: 226801
URL: http://svn.freebsd.org/changeset/base/226801

Log:
  Sync pf(4) and pfsync(4) with head, merging lots of important bugfixes
  required for normal operation of pfsync(4). Revisions merged:
  
    r226531 | bz | 2011-10-19 13:34:40 +0400 (ср, 19 окт 2011) | 4 lines
  
    Fix an obvious locking bug where we would lock again rather than unlock.
  
    r226532 | bz | 2011-10-19 14:04:24 +0400 (ср, 19 окт 2011) | 12 lines
  
    Pseudo interfaces should go at SI_SUB_PSEUDO.  However at least
    pfsync also depends on pf to be initialized already so pf goes at
    FIRST and the interfaces go at ANY.
    Then the (VNET_)SYSINIT startups for pf stays at SI_SUB_PROTO_BEGIN
    and for pfsync we move to the later SI_SUB_PROTO_IF.
  
    This is not ideal either but at least an order that should work for
    the moment and can be re-fined with the VIMAGE merge, once this will
    actually work with more than one network stack.
  
    r226533 | bz | 2011-10-19 14:08:58 +0400 (ср, 19 окт 2011) | 4 lines
  
    In the non-FreeBSD case we do not expect PF_LOCK and friends to do anything.
  
    r226535 | bz | 2011-10-19 14:16:42 +0400 (ср, 19 окт 2011) | 5 lines
  
    Adjust the PF_ASSERT() macro to what we usually use in the network stack:
    PF_LOCK_ASSERT() and PF_UNLOCK_ASSERT().
  
    r226536 | bz | 2011-10-19 15:04:49 +0400 (ср, 19 окт 2011) | 8 lines
  
    De-virtualize the pf_task_mtx lock.  At the current state of pf locking
    and virtualization it is not helpful but complicates things.
  
    Current state of art is to not virtualize these kinds of locks -
    inp_group/hash/info/.. are all not virtualized either.
  
    r226544 | bz | 2011-10-19 17:13:56 +0400 (ср, 19 окт 2011) | 12 lines
  
    Fix recursive pf locking leading to panics.  Splatter PF_LOCK_ASSERT()s
    to document where we are expecting to be called with a lock held to
    more easily catch unnoticed code paths.
    This does not neccessarily improve locking in pfsync, it just tries
    to avoid the panics reported.
  
    PR:		kern/159390, kern/158873
    Submitted by:	pluknet (at least something that partly resembles
    		my patch ignoring other cleanup, which I only saw
    		too late on the 2nd PR)
  
    r226609 | glebius | 2011-10-21 15:11:18 +0400 (пт, 21 окт 2011) | 4 lines
  
    In FreeBSD ip_output() expects ip_len and ip_off in host byte order
  
    PR:		kern/159029
  
    r226623 | glebius | 2011-10-22 02:28:15 +0400 (сб, 22 окт 2011) | 5 lines
  
    Fix a race: we should update sc_len before dropping the pf lock, otherwise a
    number of packets can be queued on sc, while we are in ip_output(), and then
    we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to
    writing beyond our mbuf cluster.
  
    r226655 | glebius | 2011-10-23 14:05:25 +0400 (вс, 23 окт 2011) | 5 lines
  
    Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old and
    deprecated flag from historical mbuf(9) allocator.
  
    This is style only change.
  
    r226656 | glebius | 2011-10-23 14:13:20 +0400 (вс, 23 окт 2011) | 5 lines
  
    Absense of M_WAITOK in malloc flags for UMA doesn't
    equals presense of M_NOWAIT. Specify M_NOWAIT explicitly.
  
    This fixes sleeping with PF_LOCK().
  
    r226660 | glebius | 2011-10-23 18:59:54 +0400 (вс, 23 окт 2011) | 22 lines
  
    Fix from r226623 is not sufficient to close all races in pfsync(4).
  
    The root of problem is re-locking at the end of pfsync_sendout().
    Several functions are calling pfsync_sendout() holding pointers
    to pf data on stack, and these functions expect this data to be
    consistent.
  
    To fix this, the following approach was taken:
  
    - The pfsync_sendout() doesn't call ip_output() directly, but
      enqueues the mbuf on sc->sc_ifp's interfaces queue, that
      is currently unused. Then pfsync netisr is scheduled. PF_LOCK
      isn't dropped in pfsync_sendout().
    - The netisr runs through queue and ip_output()s packets
      on it.
  
    Apart from fixing race, this also decouples stack, fixing
    potential issues, that may happen, when sending pfsync(4)
    packets on input path.
  
    Reviewed by:	eri (a quick review)
  
    r226661 | glebius | 2011-10-23 19:08:18 +0400 (вс, 23 окт 2011) | 13 lines
  
    - Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). Instead
      of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail()
      was scheduled.
      This lead to instant 100% state leak after first bulk update
      request.
    - After above fix, it appeared that pfsync_bulk_update() lacks
      locking. To fix this, sc_bulk_tmo callout was converted to an
      mtx one. Eventually, all pf/pfsync callouts should be converted
      to mtx version, since it isn't possible to stop or drain a
      non-mtx callout without risk of race.
    - Add comment that callout_stop() in pfsync_clone_destroy() lacks
      locking. Since pfsync0 can't be destroyed (yet), let it be here.
  
    r226662 | glebius | 2011-10-23 19:10:15 +0400 (вс, 23 окт 2011) | 2 lines
  
    Fix indentation, no code changed.
  
    r226663 | glebius | 2011-10-23 19:15:17 +0400 (вс, 23 окт 2011) | 4 lines
  
    Merge several fixes to bulk update processing from OpenBSD. Merged
    revisions: 1.148, 1.149, 1.150. This makes number of states on
    master/slave to be of a sane value.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/contrib/pf/net/if_pflog.c
  stable/9/sys/contrib/pf/net/if_pfsync.c
  stable/9/sys/contrib/pf/net/pf_ioctl.c
  stable/9/sys/contrib/pf/net/pf_table.c
  stable/9/sys/contrib/pf/net/pfvar.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/contrib/pf/net/if_pflog.c
==============================================================================
--- stable/9/sys/contrib/pf/net/if_pflog.c	Wed Oct 26 17:04:26 2011	(r226800)
+++ stable/9/sys/contrib/pf/net/if_pflog.c	Wed Oct 26 17:09:09 2011	(r226801)
@@ -429,7 +429,7 @@ static moduledata_t pflog_mod = { "pflog
 
 #define PFLOG_MODVER 1
 
-DECLARE_MODULE(pflog, pflog_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
+DECLARE_MODULE(pflog, pflog_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
 MODULE_VERSION(pflog, PFLOG_MODVER);
 MODULE_DEPEND(pflog, pf, PF_MODVER, PF_MODVER, PF_MODVER);
 #endif /* __FreeBSD__ */

Modified: stable/9/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- stable/9/sys/contrib/pf/net/if_pfsync.c	Wed Oct 26 17:04:26 2011	(r226800)
+++ stable/9/sys/contrib/pf/net/if_pfsync.c	Wed Oct 26 17:09:09 2011	(r226801)
@@ -493,7 +493,7 @@ pfsync_clone_create(struct if_clone *ifc
 	ifp->if_mtu = 1500; /* XXX */
 #ifdef __FreeBSD__
 	callout_init(&sc->sc_tmo, CALLOUT_MPSAFE);
-	callout_init(&sc->sc_bulk_tmo, CALLOUT_MPSAFE);
+	callout_init_mtx(&sc->sc_bulk_tmo, &pf_task_mtx, 0);
 	callout_init(&sc->sc_bulkfail_tmo, CALLOUT_MPSAFE);
 #else
 	ifp->if_hardmtu = MCLBYTES; /* XXX */
@@ -540,7 +540,7 @@ pfsync_clone_destroy(struct ifnet *ifp)
 #ifdef __FreeBSD__
 	EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag);
 #endif
-	timeout_del(&sc->sc_bulk_tmo);
+	timeout_del(&sc->sc_bulk_tmo);	/* XXX: need PF_LOCK() before */
 	timeout_del(&sc->sc_tmo);
 #if NCARP > 0
 #ifdef notyet
@@ -714,6 +714,8 @@ pfsync_state_import(struct pfsync_state 
 	int pool_flags;
 	int error;
 
+	PF_LOCK_ASSERT();
+
 #ifdef __FreeBSD__
 	if (sp->creatorid == 0 && V_pf_status.debug >= PF_DEBUG_MISC) {
 #else
@@ -760,7 +762,7 @@ pfsync_state_import(struct pfsync_state 
 	if (flags & PFSYNC_SI_IOCTL)
 		pool_flags = PR_WAITOK | PR_ZERO;
 	else
-		pool_flags = PR_ZERO;
+		pool_flags = PR_NOWAIT | PR_ZERO;
 
 	if ((st = pool_get(&V_pf_state_pl, pool_flags)) == NULL)
 		goto cleanup;
@@ -854,7 +856,11 @@ pfsync_state_import(struct pfsync_state 
 		CLR(st->state_flags, PFSTATE_NOSYNC);
 		if (ISSET(st->state_flags, PFSTATE_ACK)) {
 			pfsync_q_ins(st, PFSYNC_S_IACK);
+#ifdef __FreeBSD__
+			pfsync_sendout();
+#else
 			schednetisr(NETISR_PFSYNC);
+#endif
 		}
 	}
 	CLR(st->state_flags, PFSTATE_ACK);
@@ -1310,7 +1316,11 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st
 			V_pfsyncstats.pfsyncs_stale++;
 
 			pfsync_update_state(st);
+#ifdef __FreeBSD__
+			pfsync_sendout();
+#else
 			schednetisr(NETISR_PFSYNC);
+#endif
 			continue;
 		}
 		pfsync_alloc_scrub_memory(&sp->dst, &st->dst);
@@ -1416,7 +1426,11 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, 
 			V_pfsyncstats.pfsyncs_stale++;
 
 			pfsync_update_state(st);
+#ifdef __FreeBSD__
+			pfsync_sendout();
+#else
 			schednetisr(NETISR_PFSYNC);
+#endif
 			continue;
 		}
 		pfsync_alloc_scrub_memory(&up->dst, &st->dst);
@@ -1469,7 +1483,9 @@ pfsync_in_ureq(struct pfsync_pkt *pkt, s
 			if (ISSET(st->state_flags, PFSTATE_NOSYNC))
 				continue;
 
+			PF_LOCK();
 			pfsync_update_state_req(st);
+			PF_UNLOCK();
 		}
 	}
 
@@ -1558,7 +1574,7 @@ pfsync_in_del_c(struct pfsync_pkt *pkt, 
 		pf_unlink_state(st);
 	}
 #ifdef __FreeBSD__
-	PF_LOCK();
+	PF_UNLOCK();
 #endif
 	splx(s);
 
@@ -1955,7 +1971,11 @@ pfsyncioctl(struct ifnet *ifp, u_long cm
 		ip->ip_hl = sizeof(sc->sc_template) >> 2;
 		ip->ip_tos = IPTOS_LOWDELAY;
 		/* len and id are set later */
+#ifdef __FreeBSD__
+		ip->ip_off = IP_DF;
+#else
 		ip->ip_off = htons(IP_DF);
+#endif
 		ip->ip_ttl = PFSYNC_DFLTTL;
 		ip->ip_p = IPPROTO_PFSYNC;
 		ip->ip_src.s_addr = INADDR_ANY;
@@ -1986,8 +2006,8 @@ pfsyncioctl(struct ifnet *ifp, u_long cm
 #endif
 				printf("pfsync: requesting bulk update\n");
 #ifdef __FreeBSD__
-				callout_reset(&sc->sc_bulkfail_tmo, 5 * hz,
-				    pfsync_bulk_fail, V_pfsyncif);
+			callout_reset(&sc->sc_bulkfail_tmo, 5 * hz,
+			    pfsync_bulk_fail, V_pfsyncif);
 #else
 			timeout_add_sec(&sc->sc_bulkfail_tmo, 5);
 #endif
@@ -2138,12 +2158,13 @@ pfsync_sendout(void)
 #endif
 #ifdef __FreeBSD__
 	size_t pktlen;
+	int dummy_error;
 #endif
 	int offset;
 	int q, count = 0;
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_NET);
 #endif
@@ -2207,7 +2228,11 @@ pfsync_sendout(void)
 	bcopy(&sc->sc_template, ip, sizeof(*ip));
 	offset = sizeof(*ip);
 
+#ifdef __FreeBSD__
+	ip->ip_len = m->m_pkthdr.len;
+#else
 	ip->ip_len = htons(m->m_pkthdr.len);
+#endif
 	ip->ip_id = htons(ip_randomid());
 
 	/* build the pfsync header */
@@ -2337,35 +2362,22 @@ pfsync_sendout(void)
 #ifdef __FreeBSD__
 	sc->sc_ifp->if_opackets++;
 	sc->sc_ifp->if_obytes += m->m_pkthdr.len;
+	sc->sc_len = PFSYNC_MINPKT;
+
+	IFQ_ENQUEUE(&sc->sc_ifp->if_snd, m, dummy_error);
+	schednetisr(NETISR_PFSYNC);
 #else
 	sc->sc_if.if_opackets++;
 	sc->sc_if.if_obytes += m->m_pkthdr.len;
-#endif
 
-#ifdef __FreeBSD__
-	PF_UNLOCK();
-#endif
 	if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL) == 0)
-#ifdef __FreeBSD__
-	{
-		PF_LOCK();
-#endif
-		V_pfsyncstats.pfsyncs_opackets++;
-#ifdef __FreeBSD__
-	}
-#endif
+		pfsyncstats.pfsyncs_opackets++;
 	else
-#ifdef __FreeBSD__
-	{
-		PF_LOCK();
-#endif
-		V_pfsyncstats.pfsyncs_oerrors++;
-#ifdef __FreeBSD__
-	}
-#endif
+		pfsyncstats.pfsyncs_oerrors++;
 
 	/* start again */
 	sc->sc_len = PFSYNC_MINPKT;
+#endif
 }
 
 void
@@ -2378,7 +2390,7 @@ pfsync_insert_state(struct pf_state *st)
 #endif
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2412,7 +2424,11 @@ pfsync_insert_state(struct pf_state *st)
 	pfsync_q_ins(st, PFSYNC_S_INS);
 
 	if (ISSET(st->state_flags, PFSTATE_ACK))
+#ifdef __FreeBSD__
+		pfsync_sendout();
+#else
 		schednetisr(NETISR_PFSYNC);
+#endif
 	else
 		st->sync_updates = 0;
 }
@@ -2430,7 +2446,7 @@ pfsync_defer(struct pf_state *st, struct
 	struct pfsync_deferral *pd;
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2477,7 +2493,7 @@ pfsync_undefer(struct pfsync_deferral *p
 	int s;
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2560,7 +2576,7 @@ pfsync_update_state(struct pf_state *st)
 	int sync = 0;
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2609,7 +2625,11 @@ pfsync_update_state(struct pf_state *st)
 
 	if (sync || (time_second - st->pfsync_time) < 2) {
 		pfsync_upds++;
+#ifdef __FreeBSD__
+		pfsync_sendout();
+#else
 		schednetisr(NETISR_PFSYNC);
+#endif
 	}
 }
 
@@ -2625,6 +2645,8 @@ pfsync_request_update(u_int32_t creatori
 	size_t nlen = sizeof(struct pfsync_upd_req);
 	int s;
 
+	PF_LOCK_ASSERT();
+
 	/*
 	 * this code does nothing to prevent multiple update requests for the
 	 * same state being generated.
@@ -2658,7 +2680,11 @@ pfsync_request_update(u_int32_t creatori
 	TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry);
 	sc->sc_len += nlen;
 
+#ifdef __FreeBSD__
+	pfsync_sendout();
+#else
 	schednetisr(NETISR_PFSYNC);
+#endif
 }
 
 void
@@ -2670,6 +2696,8 @@ pfsync_update_state_req(struct pf_state 
 	struct pfsync_softc *sc = pfsyncif;
 #endif
 
+	PF_LOCK_ASSERT();
+
 	if (sc == NULL)
 		panic("pfsync_update_state_req: nonexistant instance");
 
@@ -2685,7 +2713,11 @@ pfsync_update_state_req(struct pf_state 
 		pfsync_q_del(st);
 	case PFSYNC_S_NONE:
 		pfsync_q_ins(st, PFSYNC_S_UPD);
+#ifdef __FreeBSD__
+		pfsync_sendout();
+#else
 		schednetisr(NETISR_PFSYNC);
+#endif
 		return;
 
 	case PFSYNC_S_INS:
@@ -2710,7 +2742,7 @@ pfsync_delete_state(struct pf_state *st)
 #endif
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2771,7 +2803,7 @@ pfsync_clear_states(u_int32_t creatorid,
 #endif
 
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #else
 	splassert(IPL_SOFTNET);
 #endif
@@ -2801,6 +2833,8 @@ pfsync_q_ins(struct pf_state *st, int q)
 	size_t nlen = pfsync_qs[q].len;
 	int s;
 
+	PF_LOCK_ASSERT();
+
 #ifdef __FreeBSD__
 	KASSERT(st->sync_state == PFSYNC_S_NONE,
 		("%s: st->sync_state == PFSYNC_S_NONE", __FUNCTION__));
@@ -2825,13 +2859,7 @@ pfsync_q_ins(struct pf_state *st, int q)
 	if (sc->sc_len + nlen > sc->sc_if.if_mtu) {
 #endif
 		s = splnet();
-#ifdef __FreeBSD__
-		PF_LOCK();
-#endif
 		pfsync_sendout();
-#ifdef __FreeBSD__
-		PF_UNLOCK();
-#endif
 		splx(s);
 
 		nlen = sizeof(struct pfsync_subheader) + pfsync_qs[q].len;
@@ -2888,7 +2916,9 @@ pfsync_update_tdb(struct tdb *t, int out
 
 		if (sc->sc_len + nlen > sc->sc_if.if_mtu) {
 			s = splnet();
+			PF_LOCK();
 			pfsync_sendout();
+			PF_UNLOCK();
 			splx(s);
 
 			nlen = sizeof(struct pfsync_subheader) +
@@ -2974,25 +3004,37 @@ pfsync_bulk_start(void)
 	struct pfsync_softc *sc = pfsyncif;
 #endif
 
-	sc->sc_ureq_received = time_uptime;
-
-	if (sc->sc_bulk_next == NULL)
 #ifdef __FreeBSD__
-		sc->sc_bulk_next = TAILQ_FIRST(&V_state_list);
+	if (V_pf_status.debug >= PF_DEBUG_MISC)
 #else
-		sc->sc_bulk_next = TAILQ_FIRST(&state_list);
+	if (pf_status.debug >= PF_DEBUG_MISC)
 #endif
-	sc->sc_bulk_last = sc->sc_bulk_next;
+		printf("pfsync: received bulk update request\n");
 
 #ifdef __FreeBSD__
-	if (V_pf_status.debug >= PF_DEBUG_MISC)
+	PF_LOCK();
+	if (TAILQ_EMPTY(&V_state_list))
 #else
-	if (pf_status.debug >= PF_DEBUG_MISC)
+	if (TAILQ_EMPTY(&state_list))
 #endif
-		printf("pfsync: received bulk update request\n");
+		pfsync_bulk_status(PFSYNC_BUS_END);
+	else {
+		sc->sc_ureq_received = time_uptime;
+		if (sc->sc_bulk_next == NULL)
+#ifdef __FreeBSD__
+			sc->sc_bulk_next = TAILQ_FIRST(&V_state_list);
+#else
+			sc->sc_bulk_next = TAILQ_FIRST(&state_list);
+#endif
+			sc->sc_bulk_last = sc->sc_bulk_next;
 
-	pfsync_bulk_status(PFSYNC_BUS_START);
-	pfsync_bulk_update(sc);
+			pfsync_bulk_status(PFSYNC_BUS_START);
+			callout_reset(&sc->sc_bulk_tmo, 1,
+			    pfsync_bulk_update, sc);
+	}
+#ifdef __FreeBSD__
+	PF_UNLOCK();
+#endif
 }
 
 void
@@ -3003,12 +3045,13 @@ pfsync_bulk_update(void *arg)
 	int i = 0;
 	int s;
 
+	PF_LOCK_ASSERT();
+
 	s = splsoftnet();
 #ifdef __FreeBSD__
 	CURVNET_SET(sc->sc_ifp->if_vnet);
-	PF_LOCK();
 #endif
-	do {
+	for (;;) {
 		if (st->sync_state == PFSYNC_S_NONE &&
 		    st->timeout < PFTM_MAX &&
 		    st->pfsync_time <= sc->sc_ureq_received) {
@@ -3024,26 +3067,33 @@ pfsync_bulk_update(void *arg)
 			st = TAILQ_FIRST(&state_list);
 #endif
 
-		if (i > 0 && TAILQ_EMPTY(&sc->sc_qs[PFSYNC_S_UPD])) {
+		if (st == sc->sc_bulk_last) {
+			/* we're done */
+			sc->sc_bulk_next = NULL;
+			sc->sc_bulk_last = NULL;
+			pfsync_bulk_status(PFSYNC_BUS_END);
+			break;
+		}
+
+#ifdef __FreeBSD__
+		if (i > 1 && (sc->sc_ifp->if_mtu - sc->sc_len) <
+#else
+		if (i > 1 && (sc->sc_if.if_mtu - sc->sc_len) <
+#endif
+		    sizeof(struct pfsync_state)) {
+			/* we've filled a packet */
 			sc->sc_bulk_next = st;
 #ifdef __FreeBSD__
 			callout_reset(&sc->sc_bulk_tmo, 1,
-			    pfsync_bulk_fail, sc);
+			    pfsync_bulk_update, sc);
 #else
 			timeout_add(&sc->sc_bulk_tmo, 1);
 #endif
-			goto out;
+			break;
 		}
-	} while (st != sc->sc_bulk_last);
-
-	/* we're done */
-	sc->sc_bulk_next = NULL;
-	sc->sc_bulk_last = NULL;
-	pfsync_bulk_status(PFSYNC_BUS_END);
+	}
 
-out:
 #ifdef __FreeBSD__
-	PF_UNLOCK();
 	CURVNET_RESTORE();
 #endif
 	splx(s);
@@ -3063,6 +3113,8 @@ pfsync_bulk_status(u_int8_t status)
 	struct pfsync_softc *sc = pfsyncif;
 #endif
 
+	PF_LOCK_ASSERT();
+
 	bzero(&r, sizeof(r));
 
 	r.subh.action = PFSYNC_ACT_BUS;
@@ -3096,7 +3148,9 @@ pfsync_bulk_fail(void *arg)
 #else
 		timeout_add_sec(&sc->sc_bulkfail_tmo, 5);
 #endif
+		PF_LOCK();
 		pfsync_request_update(0, 0);
+		PF_UNLOCK();
 	} else {
 		/* Pretend like the transfer was ok */
 		sc->sc_ureq_sent = 0;
@@ -3139,19 +3193,15 @@ pfsync_send_plus(void *plus, size_t plus
 #endif
 	int s;
 
+	PF_LOCK_ASSERT();
+
 #ifdef __FreeBSD__
 	if (sc->sc_len + pluslen > sc->sc_ifp->if_mtu) {
 #else
 	if (sc->sc_len + pluslen > sc->sc_if.if_mtu) {
 #endif
 		s = splnet();
-#ifdef __FreeBSD__
-		PF_LOCK();
-#endif
 		pfsync_sendout();
-#ifdef __FreeBSD__
-		PF_UNLOCK();
-#endif
 		splx(s);
 	}
 
@@ -3159,13 +3209,7 @@ pfsync_send_plus(void *plus, size_t plus
 	sc->sc_len += (sc->sc_pluslen = pluslen);
 
 	s = splnet();
-#ifdef __FreeBSD__
-	PF_LOCK();
-#endif
 	pfsync_sendout();
-#ifdef __FreeBSD__
-	PF_UNLOCK();
-#endif
 	splx(s);
 }
 
@@ -3200,13 +3244,12 @@ pfsync_state_in_use(struct pf_state *st)
 	if (sc == NULL)
 		return (0);
 
-	if (st->sync_state != PFSYNC_S_NONE)
+	if (st->sync_state != PFSYNC_S_NONE ||
+	    st == sc->sc_bulk_next ||
+	    st == sc->sc_bulk_last)
 		return (1);
 
-	if (sc->sc_bulk_next == NULL && sc->sc_bulk_last == NULL)
-		return (0);
-
-	return (1);
+	return (0);
 }
 
 u_int pfsync_ints;
@@ -3245,37 +3288,38 @@ pfsync_timeout(void *arg)
 void
 #ifdef __FreeBSD__
 pfsyncintr(void *arg)
+{
+	struct pfsync_softc *sc = arg;
+	struct mbuf *m;
+
+	CURVNET_SET(sc->sc_ifp->if_vnet);
+	pfsync_ints++;
+
+	for (;;) {
+		IF_DEQUEUE(&sc->sc_ifp->if_snd, m);
+		if (m == 0)
+			break;
+
+		if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL)
+		    == 0)
+			V_pfsyncstats.pfsyncs_opackets++;
+		else
+			V_pfsyncstats.pfsyncs_oerrors++;
+	}
+	CURVNET_RESTORE();
+}
 #else
 pfsyncintr(void)
-#endif
 {
-#ifdef __FreeBSD__
-	struct pfsync_softc *sc = arg;
-#endif
 	int s;
 
-#ifdef __FreeBSD__
-	if (sc == NULL)
-		return;
-
-	CURVNET_SET(sc->sc_ifp->if_vnet);
-#endif
 	pfsync_ints++;
 
 	s = splnet();
-#ifdef __FreeBSD__
-	PF_LOCK();
-#endif
 	pfsync_sendout();
-#ifdef __FreeBSD__
-	PF_UNLOCK();
-#endif
 	splx(s);
-
-#ifdef __FreeBSD__
-	CURVNET_RESTORE();
-#endif
 }
+#endif
 
 int
 pfsync_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
@@ -3380,7 +3424,7 @@ vnet_pfsync_uninit(const void *unused)
 }
 
 /* Define startup order. */
-#define	PFSYNC_SYSINIT_ORDER	SI_SUB_PROTO_BEGIN
+#define	PFSYNC_SYSINIT_ORDER	SI_SUB_PROTO_IF
 #define	PFSYNC_MODEVENT_ORDER	(SI_ORDER_FIRST) /* On boot slot in here. */
 #define	PFSYNC_VNET_ORDER	(PFSYNC_MODEVENT_ORDER + 2) /* Later still. */
 
@@ -3430,7 +3474,7 @@ static moduledata_t pfsync_mod = {
 
 #define PFSYNC_MODVER 1
 
-DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY);
+DECLARE_MODULE(pfsync, pfsync_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
 MODULE_VERSION(pfsync, PFSYNC_MODVER);
 MODULE_DEPEND(pfsync, pf, PF_MODVER, PF_MODVER, PF_MODVER);
 #endif /* __FreeBSD__ */

Modified: stable/9/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- stable/9/sys/contrib/pf/net/pf_ioctl.c	Wed Oct 26 17:04:26 2011	(r226800)
+++ stable/9/sys/contrib/pf/net/pf_ioctl.c	Wed Oct 26 17:09:09 2011	(r226801)
@@ -266,7 +266,7 @@ static struct cdevsw pf_cdevsw = {
 static volatile VNET_DEFINE(int, pf_pfil_hooked);
 #define V_pf_pfil_hooked	VNET(pf_pfil_hooked)
 VNET_DEFINE(int,		pf_end_threads);
-VNET_DEFINE(struct mtx,		pf_task_mtx);
+struct mtx			pf_task_mtx;
 
 /* pfsync */
 pfsync_state_import_t 		*pfsync_state_import_ptr = NULL;
@@ -287,18 +287,18 @@ SYSCTL_VNET_INT(_debug, OID_AUTO, pfugid
 	&VNET_NAME(debug_pfugidhack), 0,
 	"Enable/disable pf user/group rules mpsafe hack");
 
-void
+static void
 init_pf_mutex(void)
 {
 
-	mtx_init(&V_pf_task_mtx, "pf task mtx", NULL, MTX_DEF);
+	mtx_init(&pf_task_mtx, "pf task mtx", NULL, MTX_DEF);
 }
 
-void
+static void
 destroy_pf_mutex(void)
 {
 
-	mtx_destroy(&V_pf_task_mtx);
+	mtx_destroy(&pf_task_mtx);
 }
 void
 init_zone_var(void)
@@ -4259,7 +4259,7 @@ hook_pf(void)
 	struct pfil_head *pfh_inet6;
 #endif
 
-	PF_ASSERT(MA_NOTOWNED);
+	PF_UNLOCK_ASSERT();
 
 	if (V_pf_pfil_hooked)
 		return (0); 
@@ -4300,7 +4300,7 @@ dehook_pf(void)
 	struct pfil_head *pfh_inet6;
 #endif
 
-	PF_ASSERT(MA_NOTOWNED);
+	PF_UNLOCK_ASSERT();
 
 	if (V_pf_pfil_hooked == 0)
 		return (0);
@@ -4381,11 +4381,8 @@ pf_load(void)
 
 	init_zone_var();
 	sx_init(&V_pf_consistency_lock, "pf_statetbl_lock");
-	init_pf_mutex();
-	if (pfattach() < 0) {
-		destroy_pf_mutex();
+	if (pfattach() < 0)
 		return (ENOMEM);
-	}
 
 	return (0);
 }
@@ -4413,14 +4410,13 @@ pf_unload(void)
 	V_pf_end_threads = 1;
 	while (V_pf_end_threads < 2) {
 		wakeup_one(pf_purge_thread);
-		msleep(pf_purge_thread, &V_pf_task_mtx, 0, "pftmo", hz);
+		msleep(pf_purge_thread, &pf_task_mtx, 0, "pftmo", hz);
 	}
 	pfi_cleanup();
 	pf_osfp_flush();
 	pf_osfp_cleanup();
 	cleanup_pf_zone();
 	PF_UNLOCK();
-	destroy_pf_mutex();
 	sx_destroy(&V_pf_consistency_lock);
 	return error;
 }
@@ -4432,10 +4428,12 @@ pf_modevent(module_t mod, int type, void
 
 	switch(type) {
 	case MOD_LOAD:
+		init_pf_mutex();
 		pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME);
 		break;
 	case MOD_UNLOAD:
 		destroy_dev(pf_dev);
+		destroy_pf_mutex();
 		break;
 	default:
 		error = EINVAL;
@@ -4450,6 +4448,6 @@ static moduledata_t pf_mod = {
 	0
 };
 
-DECLARE_MODULE(pf, pf_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_FIRST);
+DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST);
 MODULE_VERSION(pf, PF_MODVER);
 #endif /* __FreeBSD__ */

Modified: stable/9/sys/contrib/pf/net/pf_table.c
==============================================================================
--- stable/9/sys/contrib/pf/net/pf_table.c	Wed Oct 26 17:04:26 2011	(r226800)
+++ stable/9/sys/contrib/pf/net/pf_table.c	Wed Oct 26 17:09:09 2011	(r226801)
@@ -906,7 +906,7 @@ pfr_lookup_addr(struct pfr_ktable *kt, s
 		pfr_prepare_network(&mask, ad->pfra_af, ad->pfra_net);
 		s = splsoftnet(); /* rn_lookup makes use of globals */
 #ifdef __FreeBSD__
-		PF_ASSERT(MA_OWNED);
+		PF_LOCK_ASSERT();
 #endif
 		ke = (struct pfr_kentry *)rn_lookup(&sa, &mask, head);
 		splx(s);
@@ -1127,7 +1127,7 @@ pfr_route_kentry(struct pfr_ktable *kt, 
 
 	s = splsoftnet();
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #endif
 	if (KENTRY_NETWORK(ke)) {
 		pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net);
@@ -1166,7 +1166,7 @@ pfr_unroute_kentry(struct pfr_ktable *kt
 
 	s = splsoftnet();
 #ifdef __FreeBSD__
-	PF_ASSERT(MA_OWNED);
+	PF_LOCK_ASSERT();
 #endif
 	if (KENTRY_NETWORK(ke)) {
 		pfr_prepare_network(&mask, ke->pfrke_af, ke->pfrke_net);

Modified: stable/9/sys/contrib/pf/net/pfvar.h
==============================================================================
--- stable/9/sys/contrib/pf/net/pfvar.h	Wed Oct 26 17:04:26 2011	(r226800)
+++ stable/9/sys/contrib/pf/net/pfvar.h	Wed Oct 26 17:09:09 2011	(r226801)
@@ -222,7 +222,7 @@ struct pfi_dynaddr {
 #define	PF_NAME		"pf"
 
 #define	PR_NOWAIT	M_NOWAIT
-#define	PR_WAITOK	M_WAIT
+#define	PR_WAITOK	M_WAITOK
 #define	PR_ZERO		M_ZERO
 #define	pool_get(p, f)	uma_zalloc(*(p), (f))
 #define	pool_put(p, o)	uma_zfree(*(p), (o))
@@ -237,33 +237,25 @@ struct pfi_dynaddr {
 		uma_zdestroy(var)
 
 #ifdef __FreeBSD__
-VNET_DECLARE(struct mtx,	 pf_task_mtx);
-#define	V_pf_task_mtx		 VNET(pf_task_mtx)
-
-#define	PF_ASSERT(h)	mtx_assert(&V_pf_task_mtx, (h))
-
-#define	PF_LOCK()	do {				\
-	PF_ASSERT(MA_NOTOWNED);				\
-	mtx_lock(&V_pf_task_mtx);			\
-} while(0)
-#define	PF_UNLOCK()	do {				\
-	PF_ASSERT(MA_OWNED);				\
-	mtx_unlock(&V_pf_task_mtx);			\
-} while(0)
-#else
 extern struct mtx pf_task_mtx;
 
-#define	PF_ASSERT(h)	mtx_assert(&pf_task_mtx, (h))
+#define	PF_LOCK_ASSERT()	mtx_assert(&pf_task_mtx, MA_OWNED)
+#define	PF_UNLOCK_ASSERT()	mtx_assert(&pf_task_mtx, MA_NOTOWNED)
 
 #define	PF_LOCK()	do {				\
-	PF_ASSERT(MA_NOTOWNED);				\
+	PF_UNLOCK_ASSERT();				\
 	mtx_lock(&pf_task_mtx);				\
 } while(0)
 #define	PF_UNLOCK()	do {				\
-	PF_ASSERT(MA_OWNED);				\
+	PF_LOCK_ASSERT();				\
 	mtx_unlock(&pf_task_mtx);			\
 } while(0)
-#endif
+#else
+#define	PF_LOCK_ASSERT()
+#define	PF_UNLOCK_ASSERT()
+#define	PF_LOCK()
+#define	PF_UNLOCK()
+#endif /* __FreeBSD__ */
 
 #define	PF_COPYIN(uaddr, kaddr, len, r)		do {	\
 	PF_UNLOCK();					\
@@ -277,9 +269,6 @@ extern struct mtx pf_task_mtx;
 	PF_LOCK();					\
 } while(0)
 
-extern void init_pf_mutex(void);
-extern void destroy_pf_mutex(void);
-
 #define	PF_MODVER	1
 #define	PFLOG_MODVER	1
 #define	PFSYNC_MODVER	1

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 17:26:38 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8272D106564A;
	Wed, 26 Oct 2011 17:26:38 +0000 (UTC) (envelope-from rmh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 72F248FC08;
	Wed, 26 Oct 2011 17:26:38 +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 p9QHQcak060139;
	Wed, 26 Oct 2011 17:26:38 GMT (envelope-from rmh@svn.freebsd.org)
Received: (from rmh@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QHQcrK060137;
	Wed, 26 Oct 2011 17:26:38 GMT (envelope-from rmh@svn.freebsd.org)
Message-Id: <201110261726.p9QHQcrK060137@svn.freebsd.org>
From: Robert Millan 
Date: Wed, 26 Oct 2011 17:26:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226802 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 17:26:38 -0000

Author: rmh
Date: Wed Oct 26 17:26:38 2011
New Revision: 226802
URL: http://svn.freebsd.org/changeset/base/226802

Log:
  Revert r226665 untill the issues with this change have been resolved.
  
  Approved by:	kib (mentor)

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Wed Oct 26 17:09:09 2011	(r226801)
+++ head/sys/conf/kern.mk	Wed Oct 26 17:26:38 2011	(r226802)
@@ -1,21 +1,11 @@
 # $FreeBSD$
 
-.if ${CC:T:Mclang} != "clang"
-FREEBSD_GCC!=	${CC} --version | grep FreeBSD || true
-.endif
-
 #
 # Warning flags for compiling the kernel and components of the kernel:
 #
-.if defined(FREEBSD_GCC) && ${FREEBSD_GCC}
-# FreeBSD extensions, not available in upstream GCC
-format_extensions=	-fformat-extensions
-no_align_long_strings=	-mno-align-long-strings
-.endif
-
 CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
 		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-		-Wundef -Wno-pointer-sign ${format_extensions} \
+		-Wundef -Wno-pointer-sign -fformat-extensions \
 		-Wmissing-include-dirs -fdiagnostics-show-option
 #
 # The following flags are next up for working on:
@@ -42,7 +32,7 @@ CWARNFLAGS?=	-Wall -Wredundant-decls -Wn
 #
 .if ${MACHINE_CPUARCH} == "i386"
 .if ${CC:T:Mclang} != "clang"
-CFLAGS+=	${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse
+CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
 .else
 CFLAGS+=	-mno-aes -mno-avx
 .endif

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 17:43:27 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACB7F106564A;
	Wed, 26 Oct 2011 17:43:27 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 932B08FC17;
	Wed, 26 Oct 2011 17:43:27 +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 p9QHhRsf060678;
	Wed, 26 Oct 2011 17:43:27 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QHhRVi060673;
	Wed, 26 Oct 2011 17:43:27 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110261743.p9QHhRVi060673@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Wed, 26 Oct 2011 17:43:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226803 - in head/sys/dev/usb: . controller
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 17:43:27 -0000

Author: hselasky
Date: Wed Oct 26 17:43:27 2011
New Revision: 226803
URL: http://svn.freebsd.org/changeset/base/226803

Log:
  Fix suspend and resume of FULL and HIGH speed USB devices
  in the generic XHCI driver. There appears to be some minor
  logic missing for this feature to work.
  
  MFC after:	3 days

Modified:
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/controller/xhcireg.h
  head/sys/dev/usb/usb.h
  head/sys/dev/usb/usb_hub.c

Modified: head/sys/dev/usb/controller/xhci.c
==============================================================================
--- head/sys/dev/usb/controller/xhci.c	Wed Oct 26 17:26:38 2011	(r226802)
+++ head/sys/dev/usb/controller/xhci.c	Wed Oct 26 17:43:27 2011	(r226803)
@@ -3048,7 +3048,9 @@ xhci_roothub_exec(struct usb_device *ude
 		}
 		port = XHCI_PORTSC(index);
 
-		v = XREAD4(sc, oper, port) & ~XHCI_PS_CLEAR;
+		v = XREAD4(sc, oper, port);
+		i = XHCI_PS_PLS_GET(v);
+		v &= ~XHCI_PS_CLEAR;
 
 		switch (value) {
 		case UHF_C_BH_PORT_RESET:
@@ -3082,6 +3084,17 @@ xhci_roothub_exec(struct usb_device *ude
 			XWRITE4(sc, oper, port, v & ~XHCI_PS_PIC_SET(3));
 			break;
 		case UHF_PORT_SUSPEND:
+
+			/* U3 -> U15 */
+			if (i == 3) {
+				XWRITE4(sc, oper, port, v |
+				    XHCI_PS_PLS_SET(0xF) | XHCI_PS_LWS);
+			}
+
+			/* wait 20ms for resume sequence to complete */
+			usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50);
+
+			/* U0 */
 			XWRITE4(sc, oper, port, v |
 			    XHCI_PS_PLS_SET(0) | XHCI_PS_LWS);
 			break;

Modified: head/sys/dev/usb/controller/xhcireg.h
==============================================================================
--- head/sys/dev/usb/controller/xhcireg.h	Wed Oct 26 17:26:38 2011	(r226802)
+++ head/sys/dev/usb/controller/xhcireg.h	Wed Oct 26 17:43:27 2011	(r226803)
@@ -133,7 +133,7 @@
 #define	XHCI_PS_WOE		0x08000000	/* RW - wake on over-current enable */
 #define	XHCI_PS_DR		0x40000000	/* RO - device removable */
 #define	XHCI_PS_WPR		0x80000000U	/* RW - warm port reset */
-#define	XHCI_PS_CLEAR		0x80FF00F7U	/* command bits */
+#define	XHCI_PS_CLEAR		0x80FF01FFU	/* command bits */
 
 #define	XHCI_PORTPMSC(n)	(0x3F4 + (0x10 * (n)))	/* XHCI status and control */
 #define	XHCI_PM3_U1TO_GET(x)	(((x) >> 0) & 0xFF)	/* RW - U1 timeout */

Modified: head/sys/dev/usb/usb.h
==============================================================================
--- head/sys/dev/usb/usb.h	Wed Oct 26 17:26:38 2011	(r226802)
+++ head/sys/dev/usb/usb.h	Wed Oct 26 17:43:27 2011	(r226803)
@@ -686,6 +686,7 @@ struct usb_port_status {
 #define	UPS_PORT_LS_HOT_RST	0x09
 #define	UPS_PORT_LS_COMP_MODE	0x0A
 #define	UPS_PORT_LS_LOOPBACK	0x0B
+#define	UPS_PORT_LS_RESUME	0x0F
 #define	UPS_PORT_POWER			0x0100
 #define	UPS_LOW_SPEED			0x0200
 #define	UPS_HIGH_SPEED			0x0400

Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c	Wed Oct 26 17:26:38 2011	(r226802)
+++ head/sys/dev/usb/usb_hub.c	Wed Oct 26 17:43:27 2011	(r226803)
@@ -611,6 +611,7 @@ uhub_suspend_resume_port(struct uhub_sof
 		switch (UPS_PORT_LINK_STATE_GET(sc->sc_st.port_status)) {
 		case UPS_PORT_LS_U0:
 		case UPS_PORT_LS_U1:
+		case UPS_PORT_LS_RESUME:
 			is_suspend = 0;
 			break;
 		default:

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 18:05:46 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF866106566C;
	Wed, 26 Oct 2011 18:05:46 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9FD448FC12;
	Wed, 26 Oct 2011 18:05:46 +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 p9QI5kn3061436;
	Wed, 26 Oct 2011 18:05:46 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QI5kLV061434;
	Wed, 26 Oct 2011 18:05:46 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110261805.p9QI5kLV061434@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 18:05:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226804 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 18:05:46 -0000

Author: yongari
Date: Wed Oct 26 18:05:46 2011
New Revision: 226804
URL: http://svn.freebsd.org/changeset/base/226804

Log:
  Make CPMU handle GPHY power down control on controllers that have
  CPMU capability.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 17:43:27 2011	(r226803)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 18:05:46 2011	(r226804)
@@ -3446,7 +3446,8 @@ bge_reset(struct bge_softc *sc)
 	 * Set GPHY Power Down Override to leave GPHY
 	 * powered up in D0 uninitialized.
 	 */
-	if (BGE_IS_5705_PLUS(sc))
+	if (BGE_IS_5705_PLUS(sc) &&
+	    (sc->bge_flags & BGE_FLAG_CPMU_PRESENT) == 0)
 		reset |= BGE_MISCCFG_GPHY_PD_OVERRIDE;
 
 	/* Issue global reset */

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 18:19:51 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4EDDF106566C;
	Wed, 26 Oct 2011 18:19:51 +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 3F1178FC13;
	Wed, 26 Oct 2011 18:19:51 +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 p9QIJpo2061945;
	Wed, 26 Oct 2011 18:19:51 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QIJpun061943;
	Wed, 26 Oct 2011 18:19:51 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110261819.p9QIJpun061943@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 18:19:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226805 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 18:19:51 -0000

Author: yongari
Date: Wed Oct 26 18:19:50 2011
New Revision: 226805
URL: http://svn.freebsd.org/changeset/base/226805

Log:
  It is known that all Broadcom controllers have 4GB boundary DMA
  bug.  Apply workaround to all controllers.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 18:05:46 2011	(r226804)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 18:19:50 2011	(r226805)
@@ -2918,15 +2918,13 @@ bge_attach(device_t dev)
 		sc->bge_mi_mode |= BGE_MIMODE_AUTOPOLL;
 
 	/*
-	 * All controllers that are not 5755 or higher have 4GB
-	 * boundary DMA bug.
+	 * All Broadcom controllers have 4GB boundary DMA bug.
 	 * Whenever an address crosses a multiple of the 4GB boundary
 	 * (including 4GB, 8Gb, 12Gb, etc.) and makes the transition
 	 * from 0xX_FFFF_FFFF to 0x(X+1)_0000_0000 an internal DMA
 	 * state machine will lockup and cause the device to hang.
 	 */
-	if (BGE_IS_5755_PLUS(sc) == 0)
-		sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
+	sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
 
 	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 18:27:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0B9D9106566B;
	Wed, 26 Oct 2011 18:27:02 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EFE3A8FC15;
	Wed, 26 Oct 2011 18:27:01 +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 p9QIR1f9062198;
	Wed, 26 Oct 2011 18:27:01 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QIR1dN062196;
	Wed, 26 Oct 2011 18:27:01 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110261827.p9QIR1dN062196@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 18:27:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226806 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 18:27:02 -0000

Author: yongari
Date: Wed Oct 26 18:27:01 2011
New Revision: 226806
URL: http://svn.freebsd.org/changeset/base/226806

Log:
  Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
  Apply workaround to these controllers.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 18:19:50 2011	(r226805)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 18:27:01 2011	(r226806)
@@ -2828,7 +2828,6 @@ bge_attach(device_t dev)
 	switch (sc->bge_asicrev) {
 	case BGE_ASICREV_BCM5717:
 	case BGE_ASICREV_BCM5719:
-		sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
 	case BGE_ASICREV_BCM57765:
 		sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS |
 		    BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO |
@@ -2863,8 +2862,6 @@ bge_attach(device_t dev)
 	case BGE_ASICREV_BCM5752:
 	case BGE_ASICREV_BCM5906:
 		sc->bge_flags |= BGE_FLAG_575X_PLUS;
-		if (sc->bge_asicrev == BGE_ASICREV_BCM5906)
-			sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
 		/* FALLTHROUGH */
 	case BGE_ASICREV_BCM5705:
 		sc->bge_flags |= BGE_FLAG_5705_PLUS;
@@ -2926,6 +2923,10 @@ bge_attach(device_t dev)
 	 */
 	sc->bge_flags |= BGE_FLAG_4G_BNDRY_BUG;
 
+	/* BCM5755 or higher and BCM5906 have short DMA bug. */
+	if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
+		sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
+
 	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
 		if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 18:28:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1233)
	id A2A291065731; Wed, 26 Oct 2011 18:28:54 +0000 (UTC)
Date: Wed, 26 Oct 2011 18:28:54 +0000
From: Alexander Best 
To: Robert Millan 
Message-ID: <20111026182854.GA73322@freebsd.org>
References: <201110231627.p9NGR47P046269@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201110231627.p9NGR47P046269@svn.freebsd.org>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226665 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 18:28:54 -0000

On Sun Oct 23 11, Robert Millan wrote:
> Author: rmh
> Date: Sun Oct 23 16:27:03 2011
> New Revision: 226665
> URL: http://svn.freebsd.org/changeset/base/226665
> 
> Log:
>   Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only
>   used with FreeBSD GCC.

any reason -f* flags were added to CWARNFLAGS in the first place? they aren't
really warnings, are they, so adding them to CFLAGS makes more sense imo.

how about:

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index a0a595f..91560e0 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -3,10 +3,9 @@
 #
 # Warning flags for compiling the kernel and components of the kernel:
 #
-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-               -Wundef -Wno-pointer-sign -fformat-extensions \
-               -Wmissing-include-dirs -fdiagnostics-show-option
+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes\
+               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
+               -Wundef -Wno-pointer-sign -Wmissing-include-dirs
 #
 # The following flags are next up for working on:
 #      -Wextra
@@ -83,7 +82,7 @@ CFLAGS+=      -mno-sse
 .else
 CFLAGS+=       -mno-aes -mno-avx
 .endif
-CFLAGS+=       -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+CFLAGS+=       -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float\
                -fno-asynchronous-unwind-tables
 INLINE_LIMIT?= 8000
 .endif
@@ -120,11 +119,19 @@ INLINE_LIMIT?=    8000
 CFLAGS+=       -ffreestanding
 
 #
+# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to
+# enable some diagnostics, which make it easier to pinpoint tinderbox failures.
+# Clang already has these diagnostics enabled by default.
+#
+CFLAGS+=       -fformat-extensions -fdiagnostics-show-option
+
+#
 # GCC SSP support
 #

this also gets rid of some cases where double spaces occur during compilation.
that's just eye candy though.

cheers.
alex

>   
>   Approved by:	kib (mentor)
> 
> Modified:
>   head/sys/conf/kern.mk
> 
> Modified: head/sys/conf/kern.mk
> ==============================================================================
> --- head/sys/conf/kern.mk	Sun Oct 23 16:04:07 2011	(r226664)
> +++ head/sys/conf/kern.mk	Sun Oct 23 16:27:03 2011	(r226665)
> @@ -1,11 +1,21 @@
>  # $FreeBSD$
>  
> +.if ${CC:T:Mclang} != "clang"
> +FREEBSD_GCC!=	${CC} --version | grep FreeBSD || true
> +.endif
> +
>  #
>  # Warning flags for compiling the kernel and components of the kernel:
>  #
> +.if ${FREEBSD_GCC}
> +# FreeBSD extensions, not available in upstream GCC
> +format_extensions=	-fformat-extensions
> +no_align_long_strings=	-mno-align-long-strings
> +.endif
> +
>  CWARNFLAGS?=	-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
>  		-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
> -		-Wundef -Wno-pointer-sign -fformat-extensions \
> +		-Wundef -Wno-pointer-sign ${format_extensions} \
>  		-Wmissing-include-dirs -fdiagnostics-show-option
>  #
>  # The following flags are next up for working on:
> @@ -32,7 +42,7 @@ CWARNFLAGS?=	-Wall -Wredundant-decls -Wn
>  #
>  .if ${MACHINE_CPUARCH} == "i386"
>  .if ${CC:T:Mclang} != "clang"
> -CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
> +CFLAGS+=	${no_align_long_strings} -mpreferred-stack-boundary=2 -mno-sse
>  .else
>  CFLAGS+=	-mno-aes -mno-avx
>  .endif

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 18:37:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F27BE106568B;
	Wed, 26 Oct 2011 18:37:02 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C97308FC20;
	Wed, 26 Oct 2011 18:37:02 +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 p9QIb2DH062537;
	Wed, 26 Oct 2011 18:37:02 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QIb2EZ062534;
	Wed, 26 Oct 2011 18:37:02 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110261837.p9QIb2EZ062534@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 18:37:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226807 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 18:37:03 -0000

Author: yongari
Date: Wed Oct 26 18:37:02 2011
New Revision: 226807
URL: http://svn.freebsd.org/changeset/base/226807

Log:
  BCM5719 cannot handle DMA requests for DMA segments that have
  larger than 4KB in size.  However the maximum DMA segment size
  created in DMA tag is 4KB, so we wouldn't encounter the issue here.
  Just record this issue such that let developers not to create a DMA
  segment that is larger than 4KB for BCM5719. It's possible to split
  a DMA segment into multiple smaller ones in run time but I believe
  it's not worth to implement that.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 18:27:01 2011	(r226806)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 18:37:02 2011	(r226807)
@@ -2927,6 +2927,15 @@ bge_attach(device_t dev)
 	if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
 		sc->bge_flags |= BGE_FLAG_SHORT_DMA_BUG;
 
+	/*
+	 * BCM5719 cannot handle DMA requests for DMA segments that
+	 * have larger than 4KB in size.  However the maximum DMA
+	 * segment size created in DMA tag is 4KB for TSO, so we
+	 * wouldn't encounter the issue here.
+	 */
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5719)
+		sc->bge_flags |= BGE_FLAG_4K_RDMA_BUG;
+
 	misccfg = CSR_READ_4(sc, BGE_MISC_CFG) & BGE_MISCCFG_BOARD_ID;
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5705) {
 		if (misccfg == BGE_MISCCFG_BOARD_ID_5788 ||

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct 26 18:27:01 2011	(r226806)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct 26 18:37:02 2011	(r226807)
@@ -2797,6 +2797,7 @@ struct bge_softc {
 #define	BGE_FLAG_4G_BNDRY_BUG	0x02000000
 #define	BGE_FLAG_RX_ALIGNBUG	0x04000000
 #define	BGE_FLAG_SHORT_DMA_BUG	0x08000000
+#define	BGE_FLAG_4K_RDMA_BUG	0x10000000
 	uint32_t		bge_phy_flags;
 #define	BGE_PHY_NO_WIRESPEED	0x00000001
 #define	BGE_PHY_ADC_BUG		0x00000002

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 19:07:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 769971065670;
	Wed, 26 Oct 2011 19:07:36 +0000 (UTC)
	(envelope-from cognet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 66D148FC16;
	Wed, 26 Oct 2011 19:07:36 +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 p9QJ7agB063478;
	Wed, 26 Oct 2011 19:07:36 GMT (envelope-from cognet@svn.freebsd.org)
Received: (from cognet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QJ7aOa063476;
	Wed, 26 Oct 2011 19:07:36 GMT (envelope-from cognet@svn.freebsd.org)
Message-Id: <201110261907.p9QJ7aOa063476@svn.freebsd.org>
From: Olivier Houchard 
Date: Wed, 26 Oct 2011 19:07:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226808 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 19:07:36 -0000

Author: cognet
Date: Wed Oct 26 19:07:36 2011
New Revision: 226808
URL: http://svn.freebsd.org/changeset/base/226808

Log:
  Add libkern/ucmpdi2.c

Modified:
  head/sys/conf/files.arm

Modified: head/sys/conf/files.arm
==============================================================================
--- head/sys/conf/files.arm	Wed Oct 26 18:37:02 2011	(r226807)
+++ head/sys/conf/files.arm	Wed Oct 26 19:07:36 2011	(r226808)
@@ -71,6 +71,7 @@ libkern/lshrdi3.c		standard
 libkern/memchr.c		optional	fdt
 libkern/moddi3.c		standard
 libkern/qdivrem.c		standard
+libkern/ucmpdi2.c		standard
 libkern/udivdi3.c		standard
 libkern/umoddi3.c		standard
 #XXX: We can't use these versions, as strcmp.c is included conf/files

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 19:45:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4213C1065670;
	Wed, 26 Oct 2011 19:45:21 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 283C78FC08;
	Wed, 26 Oct 2011 19:45:21 +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 p9QJjLAI064698;
	Wed, 26 Oct 2011 19:45:21 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QJjKq6064692;
	Wed, 26 Oct 2011 19:45:20 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110261945.p9QJjKq6064692@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 26 Oct 2011 19:45:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226809 - in stable/9/sys: amd64/conf i386/conf
	ia64/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 19:45:21 -0000

Author: kensmith
Date: Wed Oct 26 19:45:20 2011
New Revision: 226809
URL: http://svn.freebsd.org/changeset/base/226809

Log:
  MFC r226510,r226547:
  Comment out sbp(4) because it appears to cause boot failure on some
  systems.  Add comment explaining why sbp(4) is commented out.
  
  It was a mistake on my part to omit powerpc's GENERIC for r226510.
  But when I noticed the mistake I checked with the powerpc maintainer
  to see if I should correct the mistake Marcel said he'd prefer it be
  left as-is.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/amd64/conf/GENERIC
==============================================================================
--- stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 19:07:36 2011	(r226808)
+++ stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
@@ -320,7 +320,8 @@ device		zyd		# ZyDAS zd1211/zd1211b wire
 
 # FireWire support
 device		firewire	# FireWire bus code
-device		sbp		# SCSI over FireWire (Requires scbus and da)
+# sbp(4) works for some systems but causes boot failure on others
+#device		sbp		# SCSI over FireWire (Requires scbus and da)
 device		fwe		# Ethernet over FireWire (non-standard!)
 device		fwip		# IP over FireWire (RFC 2734,3146)
 device		dcons		# Dumb console driver

Modified: stable/9/sys/i386/conf/GENERIC
==============================================================================
--- stable/9/sys/i386/conf/GENERIC	Wed Oct 26 19:07:36 2011	(r226808)
+++ stable/9/sys/i386/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
@@ -333,7 +333,8 @@ device		zyd		# ZyDAS zd1211/zd1211b wire
 
 # FireWire support
 device		firewire	# FireWire bus code
-device		sbp		# SCSI over FireWire (Requires scbus and da)
+# sbp(4) works for some systems but causes boot failure on others
+#device		sbp		# SCSI over FireWire (Requires scbus and da)
 device		fwe		# Ethernet over FireWire (non-standard!)
 device		fwip		# IP over FireWire (RFC 2734,3146)
 device		dcons		# Dumb console driver

Modified: stable/9/sys/ia64/conf/GENERIC
==============================================================================
--- stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 19:07:36 2011	(r226808)
+++ stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
@@ -166,7 +166,8 @@ device		uvscom		# USB serial support for
 
 # FireWire support
 device		fwip		# IP over FireWire (RFC 2734,3146)
-device		sbp		# SCSI over FireWire (need scbus & da)
+# sbp(4) works for some systems but causes boot failure on others
+#device		sbp		# SCSI over FireWire (need scbus & da)
 
 # Various (pseudo) devices
 device		ether		# Ethernet support

Modified: stable/9/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 19:07:36 2011	(r226808)
+++ stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
@@ -161,6 +161,7 @@ device		kue		# Kawasaki LSI USB Ethernet
 
 # FireWire support
 device		firewire	# FireWire bus code
+# sbp(4) works for some systems but causes boot failure on others
 device		sbp		# SCSI over FireWire (Requires scbus and da)
 device		fwe		# Ethernet over FireWire (non-standard!)
 

Modified: stable/9/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 19:07:36 2011	(r226808)
+++ stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
@@ -250,7 +250,8 @@ device		zyd		# ZyDAS zd1211/zd1211b wire
 
 # FireWire support
 device		firewire	# FireWire bus code
-device		sbp		# SCSI over FireWire (Requires scbus and da)
+# sbp(4) works for some systems but causes boot failure on others
+#device		sbp		# SCSI over FireWire (Requires scbus and da)
 device		fwe		# Ethernet over FireWire (non-standard!)
 device		fwip		# IP over FireWire (RFC 2734,3146)
 device		dcons		# Dumb console driver

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 19:59:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6B80A106566B;
	Wed, 26 Oct 2011 19:59:07 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5A0ED8FC14;
	Wed, 26 Oct 2011 19:59:07 +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 p9QJx7gl065197;
	Wed, 26 Oct 2011 19:59:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QJx7ci065190;
	Wed, 26 Oct 2011 19:59:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110261959.p9QJx7ci065190@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 26 Oct 2011 19:59:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226810 - in stable/9/sys: amd64/conf i386/conf
	ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 19:59:07 -0000

Author: kensmith
Date: Wed Oct 26 19:59:06 2011
New Revision: 226810
URL: http://svn.freebsd.org/changeset/base/226810

Log:
  I forgot we now leave KDB and KDB_TRACE options in stable kernel config
  files to help provide stack traces during a panic.
  
  Submitted by:	Sergey Kandaurov 
  Approved by:	re (implicit)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/pc98/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC

Modified: stable/9/sys/amd64/conf/GENERIC
==============================================================================
--- stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -64,6 +64,8 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
+options		KDB			# Kernel debugger related code
+options		KDB_TRACE		# Print a stack trace for a panic
 
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/i386/conf/GENERIC
==============================================================================
--- stable/9/sys/i386/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/i386/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -64,6 +64,8 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
+options		KDB			# Kernel debugger related code
+options		KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/ia64/conf/GENERIC
==============================================================================
--- stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -59,6 +59,8 @@ options 	UFS_ACL		# Support for access c
 options 	UFS_DIRHASH	# Hash-based directory lookup scheme
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
 options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
+options		KDB		# Kernel debugger related code
+options		KDB_TRACE	# Print a stack trace for a panic
 
 # Various "busses"
 device		firewire	# FireWire bus code

Modified: stable/9/sys/pc98/conf/GENERIC
==============================================================================
--- stable/9/sys/pc98/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/pc98/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -65,6 +65,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
+options		KDB			# Kernel debugger related code
+options		KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 #options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -66,6 +66,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
+options		KDB			# Kernel debugger related code
+options		KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next line is needed
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 19:45:20 2011	(r226809)
+++ stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 19:59:06 2011	(r226810)
@@ -62,6 +62,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
+options		KDB			# Kernel debugger related code
+options		KDB_TRACE		# Print a stack trace for a panic
 
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 20:01:43 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E5E4C106564A;
	Wed, 26 Oct 2011 20:01:43 +0000 (UTC)
	(envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D4E8B8FC12;
	Wed, 26 Oct 2011 20:01:43 +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 p9QK1hqe065363;
	Wed, 26 Oct 2011 20:01:43 GMT
	(envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QK1h19065361;
	Wed, 26 Oct 2011 20:01:43 GMT
	(envelope-from cperciva@svn.freebsd.org)
Message-Id: <201110262001.p9QK1h19065361@svn.freebsd.org>
From: Colin Percival 
Date: Wed, 26 Oct 2011 20:01:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226811 - stable/9/usr.sbin/freebsd-update
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 20:01:44 -0000

Author: cperciva
Date: Wed Oct 26 20:01:43 2011
New Revision: 226811
URL: http://svn.freebsd.org/changeset/base/226811

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.
  
  Approved by:	re (kib)

Modified:
  stable/9/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/9/usr.sbin/freebsd-update/   (props changed)

Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/9/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 19:59:06 2011	(r226810)
+++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:01:43 2011	(r226811)
@@ -1200,7 +1200,7 @@ fetch_metadata_sanity () {
 	# Some aliases to save space later: ${P} is a character which can
 	# appear in a path; ${M} is the four numeric metadata fields; and
 	# ${H} is a sha256 hash.
-	P="[-+./:=_[[:alnum:]]"
+	P="[-+./:=%@_[[:alnum:]]"
 	M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
 	H="[0-9a-f]{64}"
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 20:06:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11BA9106564A;
	Wed, 26 Oct 2011 20:06:28 +0000 (UTC)
	(envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 00D9E8FC15;
	Wed, 26 Oct 2011 20:06:28 +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 p9QK6RCr065534;
	Wed, 26 Oct 2011 20:06:27 GMT
	(envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QK6RkZ065532;
	Wed, 26 Oct 2011 20:06:27 GMT
	(envelope-from cperciva@svn.freebsd.org)
Message-Id: <201110262006.p9QK6RkZ065532@svn.freebsd.org>
From: Colin Percival 
Date: Wed, 26 Oct 2011 20:06: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: r226812 - stable/8/usr.sbin/freebsd-update
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 20:06:28 -0000

Author: cperciva
Date: Wed Oct 26 20:06:27 2011
New Revision: 226812
URL: http://svn.freebsd.org/changeset/base/226812

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.  (In particular,
  this will simplify upgrading from 8.3-RELEASE to 9.x.)

Modified:
  stable/8/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/8/usr.sbin/freebsd-update/   (props changed)

Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/8/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:01:43 2011	(r226811)
+++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:06:27 2011	(r226812)
@@ -1185,7 +1185,7 @@ fetch_metadata_sanity () {
 	# Some aliases to save space later: ${P} is a character which can
 	# appear in a path; ${M} is the four numeric metadata fields; and
 	# ${H} is a sha256 hash.
-	P="[-+./:=_[[:alnum:]]"
+	P="[-+./:=%@_[[:alnum:]]"
 	M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
 	H="[0-9a-f]{64}"
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 20:07:59 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 40728106566B;
	Wed, 26 Oct 2011 20:07:59 +0000 (UTC)
	(envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F9E28FC08;
	Wed, 26 Oct 2011 20:07: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 p9QK7xd4065617;
	Wed, 26 Oct 2011 20:07:59 GMT
	(envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QK7xer065615;
	Wed, 26 Oct 2011 20:07:59 GMT
	(envelope-from cperciva@svn.freebsd.org)
Message-Id: <201110262007.p9QK7xer065615@svn.freebsd.org>
From: Colin Percival 
Date: Wed, 26 Oct 2011 20:07: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: r226813 - stable/7/usr.sbin/freebsd-update
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 20:07:59 -0000

Author: cperciva
Date: Wed Oct 26 20:07:58 2011
New Revision: 226813
URL: http://svn.freebsd.org/changeset/base/226813

Log:
  MFC r226650: Make freebsd-update work with FreeBSD 9.0.  (In the unlikely
  event that a 7.5-RELEASE happens, this should simplify upgrading from that
  to 9.x.)

Modified:
  stable/7/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/7/usr.sbin/freebsd-update/   (props changed)

Modified: stable/7/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/7/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:06:27 2011	(r226812)
+++ stable/7/usr.sbin/freebsd-update/freebsd-update.sh	Wed Oct 26 20:07:58 2011	(r226813)
@@ -1110,7 +1110,7 @@ fetch_metadata_sanity () {
 	# Some aliases to save space later: ${P} is a character which can
 	# appear in a path; ${M} is the four numeric metadata fields; and
 	# ${H} is a sha256 hash.
-	P="[-+./:=_[[:alnum:]]"
+	P="[-+./:=%@_[[:alnum:]]"
 	M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+"
 	H="[0-9a-f]{64}"
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 20:15:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DF66106564A;
	Wed, 26 Oct 2011 20:15:30 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailA.acsu.buffalo.edu (localmail.buffalo.edu
	[128.205.5.196])
	by mx1.freebsd.org (Postfix) with ESMTP id DF3948FC12;
	Wed, 26 Oct 2011 20:15:29 +0000 (UTC)
Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id 79362F3BA;
	Wed, 26 Oct 2011 16:05:43 -0400 (EDT)
Received: from localmailA.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailA.acsu.buffalo.edu (Postfix) with ESMTP id D46BDF62E;
	Wed, 26 Oct 2011 16:05:42 -0400 (EDT)
Received: from smtp1.acsu.buffalo.edu (smtp1.acsu.buffalo.edu [128.205.5.253])
	by localmailA.acsu.buffalo.edu (Prefixe) with ESMTP id CA406F3BA;
	Wed, 26 Oct 2011 16:05:42 -0400 (EDT)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(Authenticated sender: kensmith@buffalo.edu)
	by smtp1.acsu.buffalo.edu (Postfix) with ESMTPSA id B6E7D462B0;
	Wed, 26 Oct 2011 16:05:42 -0400 (EDT)
From: Ken Smith 
To: Sergey Kandaurov 
In-Reply-To: 
References: <201110152123.p9FLN5Ht031202@svn.freebsd.org>
	
	<1318862413.55691.12.camel@bauer.cse.buffalo.edu>
	
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-gVj8WlcTKdXe0vnKnn/z"
Date: Wed, 26 Oct 2011 16:05:40 -0400
Message-ID: <1319659540.37575.22.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 
X-PM-EL-Spam-Prob: : 8%
Cc: svn-src-stable@freebsd.org, Adrian Chadd ,
	src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 20:15:30 -0000


--=-gVj8WlcTKdXe0vnKnn/z
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
> kernels (added in r214326, I guess they are needed for printing a stack
> trace on panic). Were these options removed intentionally in this commit?=
=20

Depends on what you mean by intentionally.  I forgot about the panic
stack trace thing.  So KDB and KDB_TRACE sitting in the section of
stuff that's normally removed didn't trigger a warning bell as I was
doing r226405.

I've fixed stable/9.  And I'll adjust head shortly to try and avoid
having this happen again for 10.0 by moving them out of the chunk of
stuff that's supposed to be removed...

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodor Geisel  |

--=-gVj8WlcTKdXe0vnKnn/z
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk6oaBQACgkQ/G14VSmup/YVeACdF4u7LRtTMQS/xF0HWGVQlu1Q
MmAAnjP5InC8i1r4qsvI3JCfW1AzJG00
=o569
-----END PGP SIGNATURE-----

--=-gVj8WlcTKdXe0vnKnn/z--


From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 20:55:49 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EC286106566C;
	Wed, 26 Oct 2011 20:55:49 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail14.syd.optusnet.com.au (mail14.syd.optusnet.com.au
	[211.29.132.195])
	by mx1.freebsd.org (Postfix) with ESMTP id 887F48FC08;
	Wed, 26 Oct 2011 20:55:49 +0000 (UTC)
Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au
	(c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191])
	by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	p9QKtkwf005521
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 27 Oct 2011 07:55:47 +1100
Date: Thu, 27 Oct 2011 07:55:46 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Alexander Best 
In-Reply-To: <20111026182854.GA73322@freebsd.org>
Message-ID: <20111027071802.T3703@besplex.bde.org>
References: <201110231627.p9NGR47P046269@svn.freebsd.org>
	<20111026182854.GA73322@freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Robert Millan 
Subject: Re: svn commit: r226665 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 20:55:50 -0000

On Wed, 26 Oct 2011, Alexander Best wrote:

> On Sun Oct 23 11, Robert Millan wrote:
>> Log:
>>   Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are only
>>   used with FreeBSD GCC.
>
> any reason -f* flags were added to CWARNFLAGS in the first place? they aren't
> really warnings, are they, so adding them to CFLAGS makes more sense imo.

-fformat-extensions is added to CWARNFLAGS because it is a modifier
to -Wformat.  It was originally (in bsd.kern.mk 1.10) placed immediately
after -Wformat in CWARNFLAGS, and was added in the same commit as
-Wformat (since -Wformat could not be added before -fformat-extensions
was developed to allow it to be added without breaking kernel builds).
This is partially explained in the commit message.  This was obfuscated
(in bsd.kern.mk 1.14) by removing -Wformat.  1.13 had made -Wformat
redundant by adding -Wall.  This is not explained in the commit message.

> diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
> index a0a595f..91560e0 100644
> --- a/sys/conf/kern.mk
> +++ b/sys/conf/kern.mk
> @@ -3,10 +3,9 @@
> #
> # Warning flags for compiling the kernel and components of the kernel:
> #
> -CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
> -               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
> -               -Wundef -Wno-pointer-sign -fformat-extensions \
> -               -Wmissing-include-dirs -fdiagnostics-show-option
> +CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes\
> +               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
> +               -Wundef -Wno-pointer-sign -Wmissing-include-dirs

Neither of these should be moved, except within CWARNFLAGS.

For -fformat-extensions, see above.

-fdiagnostics-show option is even more closely related with warning flags
and even better documented in its commit message, as you should know since
you submitted it :-).  Actually, the commit message seems to tie it
more closely with warning flags than it actually is -- it says that
"it will report which -W* flag was responsible for triggering a certain
warning", while gcc(1) says that it is for reporting of general diagnostics.

-Wformat and -fformat-extensions were originally at the end of CWARNFLAGS.
-fformat-extensions wasn't moved to be with -Wall when that was added.
Keeping it at the end is reasonable.  But it shouldn't be in the middle
of random -W flags like it now is.  All of the -W options are unfortunately
unsorted by adding them to the end of the unsorted list.  Some old versions
even added -std=c99 to the end.  Since -std has nothing to do with warning
flags, that was nonsense and has been fixed.

-fdiagnostics-show-option controls all the warning flags, so it would be
better placed at the beginning.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 21:05:45 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A309106566B;
	Wed, 26 Oct 2011 21:05:45 +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 59A808FC14;
	Wed, 26 Oct 2011 21:05:45 +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 p9QL5jZX067433;
	Wed, 26 Oct 2011 21:05:45 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QL5jWb067428;
	Wed, 26 Oct 2011 21:05:45 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110262105.p9QL5jWb067428@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 21:05:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226814 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 21:05:45 -0000

Author: yongari
Date: Wed Oct 26 21:05:45 2011
New Revision: 226814
URL: http://svn.freebsd.org/changeset/base/226814

Log:
  Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
  The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
  interface definition where it defines general communications region
  which is active when firmware is loaded and running.  This region
  was used in communication between the host and processor internal
  to the Tigon chip.
  Broadcom data sheet also defines the region as 'Software Gencomm'
  in NetXtreme memory map but lacks detailed description of its
  interface so it was hard to know which ones are used for which
  interface.
  This change shall slightly enhance readability.
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 20:07:58 2011	(r226813)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 21:05:45 2011	(r226814)
@@ -1309,7 +1309,7 @@ bge_sig_pre_reset(struct bge_softc *sc, 
 	 * Some chips don't like this so only do this if ASF is enabled
 	 */
 	if (sc->bge_asf_mode)
-		bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
+		bge_writemem_ind(sc, BGE_SRAM_FW_MB, BGE_SRAM_FW_MB_MAGIC);
 
 	if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
 		switch (type) {
@@ -1362,7 +1362,7 @@ bge_stop_fw(struct bge_softc *sc)
 	int i;
 
 	if (sc->bge_asf_mode) {
-		bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW, BGE_FW_PAUSE);
+		bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE);
 		CSR_WRITE_4(sc, BGE_CPU_EVENT,
 		    CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
 
@@ -3081,9 +3081,9 @@ bge_attach(device_t dev)
 	}
 
 	sc->bge_asf_mode = 0;
-	if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG)
-	    == BGE_MAGIC_NUMBER)) {
-		if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG)
+	if (bge_allow_asf && (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) ==
+	    BGE_SRAM_DATA_SIG_MAGIC)) {
+		if (bge_readmem_ind(sc, BGE_SRAM_DATA_CFG)
 		    & BGE_HWCFG_ASF) {
 			sc->bge_asf_mode |= ASF_ENABLE;
 			sc->bge_asf_mode |= ASF_STACKUP;
@@ -3197,8 +3197,8 @@ bge_attach(device_t dev)
 	 * by its PCI subsystem ID, as we do below for the SysKonnect
 	 * SK-9D41.
 	 */
-	if (bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_SIG) == BGE_MAGIC_NUMBER)
-		hwcfg = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM_NICCFG);
+	if (bge_readmem_ind(sc, BGE_SRAM_DATA_SIG) == BGE_SRAM_DATA_SIG_MAGIC)
+		hwcfg = bge_readmem_ind(sc, BGE_SRAM_DATA_CFG);
 	else if ((sc->bge_flags & BGE_FLAG_EADDR) &&
 	    (sc->bge_asicrev != BGE_ASICREV_BCM5906)) {
 		if (bge_read_eeprom(sc, (caddr_t)&hwcfg, BGE_EE_HWCFG_OFFSET,
@@ -3433,9 +3433,9 @@ bge_reset(struct bge_softc *sc)
 	/*
 	 * Write the magic number to SRAM at offset 0xB50.
 	 * When firmware finishes its initialization it will
-	 * write ~BGE_MAGIC_NUMBER to the same location.
+	 * write ~BGE_SRAM_FW_MB_MAGIC to the same location.
 	 */
-	bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM, BGE_MAGIC_NUMBER);
+	bge_writemem_ind(sc, BGE_SRAM_FW_MB, BGE_SRAM_FW_MB_MAGIC);
 
 	reset = BGE_MISCCFG_RESET_CORE_CLOCKS | BGE_32BITTIME_66MHZ;
 
@@ -3560,8 +3560,8 @@ bge_reset(struct bge_softc *sc)
 		 */
 		for (i = 0; i < BGE_TIMEOUT; i++) {
 			DELAY(10);
-			val = bge_readmem_ind(sc, BGE_SOFTWARE_GENCOMM);
-			if (val == ~BGE_MAGIC_NUMBER)
+			val = bge_readmem_ind(sc, BGE_SRAM_FW_MB);
+			if (val == ~BGE_SRAM_FW_MB_MAGIC)
 				break;
 		}
 
@@ -4100,10 +4100,10 @@ bge_asf_driver_up(struct bge_softc *sc)
 			sc->bge_asf_count --;
 		else {
 			sc->bge_asf_count = 2;
-			bge_writemem_ind(sc, BGE_SOFTWARE_GENCOMM_FW,
+			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
 			    BGE_FW_DRV_ALIVE);
-			bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_LEN, 4);
-			bge_writemem_ind(sc, BGE_SOFTWARE_GENNCOMM_FW_DATA, 3);
+			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
+			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
 			CSR_WRITE_4(sc, BGE_CPU_EVENT,
 			    CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
 		}

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct 26 20:07:58 2011	(r226813)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct 26 21:05:45 2011	(r226814)
@@ -71,12 +71,12 @@
 #define	BGE_STATS_BLOCK_END		0x00000AFF
 #define	BGE_STATUS_BLOCK		0x00000B00
 #define	BGE_STATUS_BLOCK_END		0x00000B4F
-#define	BGE_SOFTWARE_GENCOMM		0x00000B50
-#define	BGE_SOFTWARE_GENCOMM_SIG	0x00000B54
-#define	BGE_SOFTWARE_GENCOMM_NICCFG	0x00000B58
-#define	BGE_SOFTWARE_GENCOMM_FW		0x00000B78
-#define	BGE_SOFTWARE_GENNCOMM_FW_LEN	0x00000B7C
-#define	BGE_SOFTWARE_GENNCOMM_FW_DATA	0x00000B80
+#define	BGE_SRAM_FW_MB			0x00000B50
+#define	BGE_SRAM_DATA_SIG		0x00000B54
+#define	BGE_SRAM_DATA_CFG		0x00000B58
+#define	BGE_SRAM_FW_CMD_MB		0x00000B78
+#define	BGE_SRAM_FW_CMD_LEN_MB		0x00000B7C
+#define	BGE_SRAM_FW_CMD_DATA_MB		0x00000B80
 #define	BGE_SOFTWARE_GENCOMM_END	0x00000FFF
 #define	BGE_UNMAPPED			0x00001000
 #define	BGE_UNMAPPED_END		0x00001FFF
@@ -87,6 +87,7 @@
 #define	BGE_SEND_RING_1_TO_4_END	0x00005FFF
 
 /* Firmware interface */
+#define	BGE_SRAM_DATA_SIG_MAGIC		0x4B657654	/* 'KevT' */
 #define	BGE_FW_DRV_ALIVE		0x00000001
 #define	BGE_FW_PAUSE			0x00000002
 
@@ -2052,10 +2053,10 @@
  * This magic number is written to the firmware mailbox at 0xb50
  * before a software reset is issued.  After the internal firmware
  * has completed its initialization it will write the opposite of
- * this value, ~BGE_MAGIC_NUMBER, to the same location, allowing the
- * driver to synchronize with the firmware.
+ * this value, ~BGE_SRAM_FW_MB_MAGIC, to the same location,
+ * allowing the driver to synchronize with the firmware.
  */
-#define	BGE_MAGIC_NUMBER                0x4B657654
+#define	BGE_SRAM_FW_MB_MAGIC	0x4B657654
 
 typedef struct {
 	uint32_t		bge_addr_hi;

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 21:11:40 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6A5AC1065676;
	Wed, 26 Oct 2011 21:11:40 +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 5A6978FC14;
	Wed, 26 Oct 2011 21:11:40 +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 p9QLBe28067663;
	Wed, 26 Oct 2011 21:11:40 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QLBelx067660;
	Wed, 26 Oct 2011 21:11:40 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110262111.p9QLBelx067660@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 21:11:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226815 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 21:11:40 -0000

Author: yongari
Date: Wed Oct 26 21:11:40 2011
New Revision: 226815
URL: http://svn.freebsd.org/changeset/base/226815

Log:
  Define MAC address mail box and use it instead of using
  hard-coded value.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 21:05:45 2011	(r226814)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 21:11:40 2011	(r226815)
@@ -5938,11 +5938,11 @@ bge_get_eaddr_mem(struct bge_softc *sc, 
 {
 	uint32_t mac_addr;
 
-	mac_addr = bge_readmem_ind(sc, 0x0c14);
+	mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_HIGH_MB);
 	if ((mac_addr >> 16) == 0x484b) {
 		ether_addr[0] = (uint8_t)(mac_addr >> 8);
 		ether_addr[1] = (uint8_t)mac_addr;
-		mac_addr = bge_readmem_ind(sc, 0x0c18);
+		mac_addr = bge_readmem_ind(sc, BGE_SRAM_MAC_ADDR_LOW_MB);
 		ether_addr[2] = (uint8_t)(mac_addr >> 24);
 		ether_addr[3] = (uint8_t)(mac_addr >> 16);
 		ether_addr[4] = (uint8_t)(mac_addr >> 8);

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct 26 21:05:45 2011	(r226814)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct 26 21:11:40 2011	(r226815)
@@ -77,6 +77,8 @@
 #define	BGE_SRAM_FW_CMD_MB		0x00000B78
 #define	BGE_SRAM_FW_CMD_LEN_MB		0x00000B7C
 #define	BGE_SRAM_FW_CMD_DATA_MB		0x00000B80
+#define	BGE_SRAM_MAC_ADDR_HIGH_MB	0x00000C14
+#define	BGE_SRAM_MAC_ADDR_LOW_MB	0x00000C18
 #define	BGE_SOFTWARE_GENCOMM_END	0x00000FFF
 #define	BGE_UNMAPPED			0x00001000
 #define	BGE_UNMAPPED_END		0x00001FFF

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 21:50:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3ACCF106566B;
	Wed, 26 Oct 2011 21:50:11 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29C978FC16;
	Wed, 26 Oct 2011 21:50: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 p9QLoBHX068893;
	Wed, 26 Oct 2011 21:50:11 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QLoBqg068888;
	Wed, 26 Oct 2011 21:50:11 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201110262150.p9QLoBqg068888@svn.freebsd.org>
From: Alexander Motin 
Date: Wed, 26 Oct 2011 21:50:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226816 - in head: sbin/geom/class/raid sys/geom/raid
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 21:50:11 -0000

Author: mav
Date: Wed Oct 26 21:50:10 2011
New Revision: 226816
URL: http://svn.freebsd.org/changeset/base/226816

Log:
  Clarify disks/volumes above 2TiB support in geom_raid:
   - add support for volumes above 2TiB with Promise metadata format;
   - enforse and document other limitations:
     - Intel and Promise metadata formats do not support disks above 2TiB;
     - NVIDIA metadata format does not support volumes above 2TiB.
  
  Sponsored by:	iXsystems, Inc.
  MFC after:	2 weeks

Modified:
  head/sbin/geom/class/raid/graid.8
  head/sys/geom/raid/md_intel.c
  head/sys/geom/raid/md_nvidia.c
  head/sys/geom/raid/md_promise.c

Modified: head/sbin/geom/class/raid/graid.8
==============================================================================
--- head/sbin/geom/class/raid/graid.8	Wed Oct 26 21:11:40 2011	(r226815)
+++ head/sbin/geom/class/raid/graid.8	Wed Oct 26 21:50:10 2011	(r226816)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2011
+.Dd October 26, 2011
 .Dt GRAID 8
 .Os
 .Sh NAME
@@ -250,6 +250,9 @@ If you started migration using BIOS or i
 complete it there.
 Do not run GEOM RAID class on migrating volumes under pain of possible data
 corruption!
+.Sh 2TiB BARRIERS
+Intel and Promise metadata formats do not support disks above 2TiB.
+NVIDIA metadata format does not support volumes above 2TiB.
 .Sh EXIT STATUS
 Exit status is 0 on success, and non-zero if the command fails.
 .Sh SEE ALSO

Modified: head/sys/geom/raid/md_intel.c
==============================================================================
--- head/sys/geom/raid/md_intel.c	Wed Oct 26 21:11:40 2011	(r226815)
+++ head/sys/geom/raid/md_intel.c	Wed Oct 26 21:50:10 2011	(r226816)
@@ -1172,15 +1172,18 @@ g_raid_md_taste_intel(struct g_raid_md_o
 	g_access(cp, -1, 0, 0);
 	if (meta == NULL) {
 		if (g_raid_aggressive_spare) {
-			if (vendor == 0x8086) {
+			if (vendor != 0x8086) {
+				G_RAID_DEBUG(1,
+				    "Intel vendor mismatch 0x%04x != 0x8086",
+				    vendor);
+			} else if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+				G_RAID_DEBUG(1,
+				    "Intel disk '%s' is too big.", pp->name);
+			} else {
 				G_RAID_DEBUG(1,
 				    "No Intel metadata, forcing spare.");
 				spare = 2;
 				goto search;
-			} else {
-				G_RAID_DEBUG(1,
-				    "Intel vendor mismatch 0x%04x != 0x8086",
-				    vendor);
 			}
 		}
 		return (G_RAID_MD_TASTE_FAIL);
@@ -1194,9 +1197,9 @@ g_raid_md_taste_intel(struct g_raid_md_o
 	}
 	if (meta->disk[disk_pos].sectors !=
 	    (pp->mediasize / pp->sectorsize)) {
-		G_RAID_DEBUG(1, "Intel size mismatch %u != %u",
-		    meta->disk[disk_pos].sectors,
-		    (u_int)(pp->mediasize / pp->sectorsize));
+		G_RAID_DEBUG(1, "Intel size mismatch %ju != %ju",
+		    (off_t)meta->disk[disk_pos].sectors,
+		    (off_t)(pp->mediasize / pp->sectorsize));
 		goto fail1;
 	}
 
@@ -1449,6 +1452,13 @@ g_raid_md_ctl_intel(struct g_raid_md_obj
 			cp->private = disk;
 			g_topology_unlock();
 
+			if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+				gctl_error(req,
+				    "Disk '%s' is too big.", diskname);
+				error = -8;
+				break;
+			}
+
 			error = g_raid_md_get_label(cp,
 			    &pd->pd_disk_meta.serial[0], INTEL_SERIAL_LEN);
 			if (error != 0) {
@@ -1940,6 +1950,14 @@ g_raid_md_ctl_intel(struct g_raid_md_obj
 			pp = cp->provider;
 			g_topology_unlock();
 
+			if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+				gctl_error(req,
+				    "Disk '%s' is too big.", diskname);
+				g_raid_kill_consumer(sc, cp);
+				error = -8;
+				break;
+			}
+
 			/* Read disk serial. */
 			error = g_raid_md_get_label(cp,
 			    &serial[0], INTEL_SERIAL_LEN);

Modified: head/sys/geom/raid/md_nvidia.c
==============================================================================
--- head/sys/geom/raid/md_nvidia.c	Wed Oct 26 21:11:40 2011	(r226815)
+++ head/sys/geom/raid/md_nvidia.c	Wed Oct 26 21:50:10 2011	(r226816)
@@ -1033,7 +1033,7 @@ g_raid_md_ctl_nvidia(struct g_raid_md_ob
 	char arg[16];
 	const char *verb, *volname, *levelname, *diskname;
 	int *nargs, *force;
-	off_t size, sectorsize, strip;
+	off_t size, sectorsize, strip, volsize;
 	intmax_t *sizearg, *striparg;
 	int numdisks, i, len, level, qual, update;
 	int error;
@@ -1182,7 +1182,20 @@ g_raid_md_ctl_nvidia(struct g_raid_md_ob
 			gctl_error(req, "Size too small.");
 			return (-13);
 		}
-		if (size > 0xffffffffffffllu * sectorsize) {
+
+		if (level == G_RAID_VOLUME_RL_RAID0 ||
+		    level == G_RAID_VOLUME_RL_CONCAT ||
+		    level == G_RAID_VOLUME_RL_SINGLE)
+			volsize = size * numdisks;
+		else if (level == G_RAID_VOLUME_RL_RAID1)
+			volsize = size;
+		else if (level == G_RAID_VOLUME_RL_RAID5)
+			volsize = size * (numdisks - 1);
+		else { /* RAID1E */
+			volsize = ((size * numdisks) / strip / 2) *
+			    strip;
+		}
+		if (volsize > 0xffffffffllu * sectorsize) {
 			gctl_error(req, "Size too big.");
 			return (-14);
 		}
@@ -1196,18 +1209,7 @@ g_raid_md_ctl_nvidia(struct g_raid_md_ob
 		vol->v_raid_level_qualifier = G_RAID_VOLUME_RLQ_NONE;
 		vol->v_strip_size = strip;
 		vol->v_disks_count = numdisks;
-		if (level == G_RAID_VOLUME_RL_RAID0 ||
-		    level == G_RAID_VOLUME_RL_CONCAT ||
-		    level == G_RAID_VOLUME_RL_SINGLE)
-			vol->v_mediasize = size * numdisks;
-		else if (level == G_RAID_VOLUME_RL_RAID1)
-			vol->v_mediasize = size;
-		else if (level == G_RAID_VOLUME_RL_RAID5)
-			vol->v_mediasize = size * (numdisks - 1);
-		else { /* RAID1E */
-			vol->v_mediasize = ((size * numdisks) / strip / 2) *
-			    strip;
-		}
+		vol->v_mediasize = volsize;
 		vol->v_sectorsize = sectorsize;
 		g_raid_start_volume(vol);
 

Modified: head/sys/geom/raid/md_promise.c
==============================================================================
--- head/sys/geom/raid/md_promise.c	Wed Oct 26 21:11:40 2011	(r226815)
+++ head/sys/geom/raid/md_promise.c	Wed Oct 26 21:50:10 2011	(r226816)
@@ -121,7 +121,8 @@ struct promise_raid_conf {
 	uint64_t	rebuild_lba64;	/* Per-volume rebuild position. */
 	uint32_t	magic_4;
 	uint32_t	magic_5;
-	uint32_t	filler3[325];
+	uint32_t	total_sectors_high;
+	uint32_t	filler3[324];
 	uint32_t	checksum;
 } __packed;
 
@@ -213,6 +214,7 @@ g_raid_md_promise_print(struct promise_r
 	printf("rebuild_lba64       %ju\n", meta->rebuild_lba64);
 	printf("magic_4             0x%08x\n", meta->magic_4);
 	printf("magic_5             0x%08x\n", meta->magic_5);
+	printf("total_sectors_high  0x%08x\n", meta->total_sectors_high);
 	printf("=================================================\n");
 }
 
@@ -867,6 +869,9 @@ g_raid_md_promise_start(struct g_raid_vo
 	vol->v_strip_size = 512 << meta->stripe_shift; //ZZZ
 	vol->v_disks_count = meta->total_disks;
 	vol->v_mediasize = (off_t)meta->total_sectors * 512; //ZZZ
+	if (meta->total_sectors_high < 256) /* If value looks sane. */
+		vol->v_mediasize |=
+		    ((off_t)meta->total_sectors_high << 32) * 512; //ZZZ
 	vol->v_sectorsize = 512; //ZZZ
 	for (i = 0; i < vol->v_disks_count; i++) {
 		sd = &vol->v_subdisks[i];
@@ -1318,6 +1323,13 @@ g_raid_md_ctl_promise(struct g_raid_md_o
 			cp->private = disk;
 			g_topology_unlock();
 
+			if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+				gctl_error(req,
+				    "Disk '%s' is too big.", diskname);
+				error = -8;
+				break;
+			}
+
 			/* Read kernel dumping information. */
 			disk->d_kd.offset = 0;
 			disk->d_kd.length = OFF_MAX;
@@ -1609,8 +1621,17 @@ g_raid_md_ctl_promise(struct g_raid_md_o
 				error = -4;
 				break;
 			}
+			pp = cp->provider;
 			g_topology_unlock();
 
+			if (pp->mediasize / pp->sectorsize > UINT32_MAX) {
+				gctl_error(req,
+				    "Disk '%s' is too big.", diskname);
+				g_raid_kill_consumer(sc, cp);
+				error = -8;
+				break;
+			}
+
 			pd = malloc(sizeof(*pd), M_MD_PROMISE, M_WAITOK | M_ZERO);
 
 			disk = g_raid_create_disk(sc);
@@ -1716,6 +1737,8 @@ g_raid_md_write_promise(struct g_raid_md
 			meta->array_width /= 2;
 		meta->array_number = vol->v_global_id;
 		meta->total_sectors = vol->v_mediasize / vol->v_sectorsize;
+		meta->total_sectors_high =
+		    (vol->v_mediasize / vol->v_sectorsize) >> 32;
 		meta->cylinders = meta->total_sectors / (255 * 63) - 1;
 		meta->heads = 254;
 		meta->sectors = 63;

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 22:12:31 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 66040106566B;
	Wed, 26 Oct 2011 22:12:31 +0000 (UTC)
	(envelope-from pluknet@gmail.com)
Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com
	[209.85.220.182])
	by mx1.freebsd.org (Postfix) with ESMTP id 8441A8FC0C;
	Wed, 26 Oct 2011 22:12:30 +0000 (UTC)
Received: by vcbfo13 with SMTP id fo13so2913655vcb.13
	for ; Wed, 26 Oct 2011 15:12:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=Wmd6HY02bOPIBey371LrDAQ1NF9HEJiEqV1o8Izq+OM=;
	b=KSzZRlK3FU0n9vGwRoSv1Oxbkd8+XTn4kKYVgw91msGZ8Hq4QyvlomsmfdJz6Xhu+K
	XR/5hkMasX3FySM0ls3YWpxXTzeTRAaORp6ZNoJlvaSVDAOYbzzYGt8whCazIjqPJhSD
	Q6OvJAhgtbDj/0n2gRJph61hp1IrfpPw1Lb3g=
MIME-Version: 1.0
Received: by 10.182.17.103 with SMTP id n7mr5772696obd.68.1319667149484; Wed,
	26 Oct 2011 15:12:29 -0700 (PDT)
Sender: pluknet@gmail.com
Received: by 10.182.160.97 with HTTP; Wed, 26 Oct 2011 15:12:29 -0700 (PDT)
In-Reply-To: <1319659540.37575.22.camel@bauer.cse.buffalo.edu>
References: <201110152123.p9FLN5Ht031202@svn.freebsd.org>
	
	<1318862413.55691.12.camel@bauer.cse.buffalo.edu>
	
	<1319659540.37575.22.camel@bauer.cse.buffalo.edu>
Date: Thu, 27 Oct 2011 02:12:29 +0400
X-Google-Sender-Auth: orHR3Gz_mUsUXoSCKYMO6_wB1Bc
Message-ID: 
From: Sergey Kandaurov 
To: Ken Smith 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, Adrian Chadd ,
	src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults
 lib/libc/stdlib
 sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf sys/powerpc/conf
 sys/sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 22:12:31 -0000

On 27 October 2011 00:05, Ken Smith  wrote:
> On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
>> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
>> kernels (added in r214326, I guess they are needed for printing a stack
>> trace on panic). Were these options removed intentionally in this commit=
?
>
> Depends on what you mean by intentionally. =A0I forgot about the panic
> stack trace thing. =A0So KDB and KDB_TRACE sitting in the section of
> stuff that's normally removed didn't trigger a warning bell as I was
> doing r226405.

Err.. Sorry, should be rather read as "unintentionally" in my email.

> I've fixed stable/9. =A0And I'll adjust head shortly to try and avoid
> having this happen again for 10.0 by moving them out of the chunk of
> stuff that's supposed to be removed...

Thank you very much.

--=20
wbr,
pluknet

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 22:23:01 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 091B4106566C;
	Wed, 26 Oct 2011 22:23:01 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailB.acsu.buffalo.edu (localmailb.acsu.buffalo.edu
	[128.205.5.200])
	by mx1.freebsd.org (Postfix) with ESMTP id C03328FC08;
	Wed, 26 Oct 2011 22:23:00 +0000 (UTC)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id 15CA62FFBA;
	Wed, 26 Oct 2011 18:23:00 -0400 (EDT)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailB.acsu.buffalo.edu (Postfix) with ESMTP id 6461B5E835;
	Wed, 26 Oct 2011 18:22:59 -0400 (EDT)
Received: from smtp3.acsu.buffalo.edu (smtp3.acsu.buffalo.edu [128.205.5.226])
	by localmailB.acsu.buffalo.edu (Prefixe) with ESMTP id 589235E831;
	Wed, 26 Oct 2011 18:22:59 -0400 (EDT)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(Authenticated sender: kensmith@buffalo.edu)
	by smtp3.acsu.buffalo.edu (Postfix) with ESMTPSA id 2FDAD4694D;
	Wed, 26 Oct 2011 18:22:59 -0400 (EDT)
From: Ken Smith 
To: Sergey Kandaurov 
In-Reply-To: 
References: <201110152123.p9FLN5Ht031202@svn.freebsd.org>
	
	<1318862413.55691.12.camel@bauer.cse.buffalo.edu>
	
	<1319659540.37575.22.camel@bauer.cse.buffalo.edu>
	
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-RqOdu87YknNcG/joHoBM"
Date: Wed, 26 Oct 2011 18:22:53 -0400
Message-ID: <1319667773.37575.24.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 
X-PM-EL-Spam-Prob: : 8%
Cc: svn-src-stable@freebsd.org, Adrian Chadd ,
	src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-9@freebsd.org
Subject: Re: svn commit: r226405 - in stable/9: . etc/defaults
 lib/libc/stdlib sys/amd64/conf sys/i386/conf sys/ia64/conf sys/pc98/conf
 sys/powerpc/conf sys/sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 22:23:01 -0000


--=-RqOdu87YknNcG/joHoBM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

On Thu, 2011-10-27 at 02:12 +0400, Sergey Kandaurov wrote:
> On 27 October 2011 00:05, Ken Smith  wrote:
> > On Tue, 2011-10-25 at 23:22 +0400, Sergey Kandaurov wrote:
> >> In 8-STABLE (and 8.2) both KDB and KDB_TRACE present in GENERIC
> >> kernels (added in r214326, I guess they are needed for printing a stac=
k
> >> trace on panic). Were these options removed intentionally in this comm=
it?
> >
> > Depends on what you mean by intentionally.  I forgot about the panic
> > stack trace thing.  So KDB and KDB_TRACE sitting in the section of
> > stuff that's normally removed didn't trigger a warning bell as I was
> > doing r226405.
>=20
> Err.. Sorry, should be rather read as "unintentionally" in my email.

My turn to say sorry.  I should have had a smiley after the first
sentence in my reply.  :-)

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodor Geisel  |

--=-RqOdu87YknNcG/joHoBM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk6oiD0ACgkQ/G14VSmup/YZTQCfVsbCghufHNoPlVPXTuxpP9+i
A3kAn1HjSWXXymyuwEMkq55HLrahPGSw
=4OMG
-----END PGP SIGNATURE-----

--=-RqOdu87YknNcG/joHoBM--


From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 22:28:29 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 079C5106566C;
	Wed, 26 Oct 2011 22:28:29 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2E7E8FC14;
	Wed, 26 Oct 2011 22:28:28 +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 p9QMSSaR070887;
	Wed, 26 Oct 2011 22:28:28 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QMSSto070885;
	Wed, 26 Oct 2011 22:28:28 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110262228.p9QMSSto070885@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 26 Oct 2011 22:28:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226818 - head/sys/ia64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 22:28:29 -0000

Author: kensmith
Date: Wed Oct 26 22:28:28 2011
New Revision: 226818
URL: http://svn.freebsd.org/changeset/base/226818

Log:
  Move the debugging support to its own section.  This matches what is
  in the other architectures' GENERIC and makes removing it at the point
  we're creating a new stable branch a bit easier.
  
  Discussed with:	marcel

Modified:
  head/sys/ia64/conf/GENERIC

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Wed Oct 26 21:54:10 2011	(r226817)
+++ head/sys/ia64/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
@@ -28,17 +28,11 @@ makeoptions	DEBUG=-g	# Build kernel with
 options 	AUDIT		# Security event auditing
 options 	CD9660		# ISO 9660 Filesystem
 options 	COMPAT_FREEBSD7	# Compatible with FreeBSD7
-options 	DDB		# Support DDB
-options 	DEADLKRES	# Enable the deadlock resolver
 options 	FFS		# Berkeley Fast Filesystem
-options 	GDB		# Support remote GDB
 options 	GEOM_LABEL	# Provides labelization
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 options 	INET		# InterNETworking
 options 	INET6		# IPv6 communications protocols
-options 	INVARIANTS	# Enable calls of extra sanity checking
-options 	INVARIANT_SUPPORT # required by INVARIANTS
-options 	KDB		# Enable kernel debugger support
 options 	KTRACE		# ktrace(1) syscall trace support
 options 	MAC		# TrustedBSD MAC Framework
 options 	MD_ROOT		# MD usable as root device
@@ -64,9 +58,17 @@ options 	SYSVSHM		# SYSV-style shared me
 options 	UFS_ACL		# Support for access control lists
 options 	UFS_DIRHASH	# Hash-based directory lookup scheme
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
+options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
+
+# Debugging for use in -current
+options 	KDB		# Enable kernel debugger support
+options 	DDB		# Support DDB
+options 	GDB		# Support remote GDB
+options 	DEADLKRES	# Enable the deadlock resolver
+options 	INVARIANTS	# Enable calls of extra sanity checking
+options 	INVARIANT_SUPPORT # required by INVARIANTS
 options 	WITNESS		# Enable checks to detect deadlocks and cycles
 options 	WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
-options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
 options 	MALLOC_DEBUG_MAXZONES=8	# Separate malloc(9) zones
 
 # Various "busses"

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 23:06:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 11B71106566B;
	Wed, 26 Oct 2011 23:06:00 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0013A8FC15;
	Wed, 26 Oct 2011 23:05: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 p9QN5xPN072094;
	Wed, 26 Oct 2011 23:05:59 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QN5xWL072087;
	Wed, 26 Oct 2011 23:05:59 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110262305.p9QN5xWL072087@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 26 Oct 2011 23:05:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226819 - in stable/9/sys: amd64/conf i386/conf
	ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 23:06:00 -0000

Author: kensmith
Date: Wed Oct 26 23:05:59 2011
New Revision: 226819
URL: http://svn.freebsd.org/changeset/base/226819

Log:
  Fix whitespace nit.  "options", not "options".
  
  Submitted by:	Matthew Fleming 
  Pointy hat:	me
  Approved by:	re (implicit)

Modified:
  stable/9/sys/amd64/conf/GENERIC
  stable/9/sys/i386/conf/GENERIC
  stable/9/sys/ia64/conf/GENERIC
  stable/9/sys/pc98/conf/GENERIC
  stable/9/sys/powerpc/conf/GENERIC
  stable/9/sys/sparc64/conf/GENERIC

Modified: stable/9/sys/amd64/conf/GENERIC
==============================================================================
--- stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/amd64/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -64,8 +64,8 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_FRAME		# Ensure frames are compiled in
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
-options		KDB			# Kernel debugger related code
-options		KDB_TRACE		# Print a stack trace for a panic
+options 	KDB			# Kernel debugger related code
+options 	KDB_TRACE		# Print a stack trace for a panic
 
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/i386/conf/GENERIC
==============================================================================
--- stable/9/sys/i386/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/i386/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -64,8 +64,8 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
-options		KDB			# Kernel debugger related code
-options		KDB_TRACE		# Print a stack trace for a panic
+options 	KDB			# Kernel debugger related code
+options 	KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/ia64/conf/GENERIC
==============================================================================
--- stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/ia64/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -59,8 +59,8 @@ options 	UFS_ACL		# Support for access c
 options 	UFS_DIRHASH	# Hash-based directory lookup scheme
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
 options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
-options		KDB		# Kernel debugger related code
-options		KDB_TRACE	# Print a stack trace for a panic
+options 	KDB		# Kernel debugger related code
+options 	KDB_TRACE	# Print a stack trace for a panic
 
 # Various "busses"
 device		firewire	# FireWire bus code

Modified: stable/9/sys/pc98/conf/GENERIC
==============================================================================
--- stable/9/sys/pc98/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/pc98/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -65,8 +65,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
-options		KDB			# Kernel debugger related code
-options		KDB_TRACE		# Print a stack trace for a panic
+options 	KDB			# Kernel debugger related code
+options 	KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next two lines are needed
 #options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/powerpc/conf/GENERIC
==============================================================================
--- stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/powerpc/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -66,8 +66,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
-options		KDB			# Kernel debugger related code
-options		KDB_TRACE		# Print a stack trace for a panic
+options 	KDB			# Kernel debugger related code
+options 	KDB_TRACE		# Print a stack trace for a panic
 
 # To make an SMP kernel, the next line is needed
 options 	SMP			# Symmetric MultiProcessor Kernel

Modified: stable/9/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 22:28:28 2011	(r226818)
+++ stable/9/sys/sparc64/conf/GENERIC	Wed Oct 26 23:05:59 2011	(r226819)
@@ -62,8 +62,8 @@ options 	HWPMC_HOOKS		# Necessary kernel
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
-options		KDB			# Kernel debugger related code
-options		KDB_TRACE		# Print a stack trace for a panic
+options 	KDB			# Kernel debugger related code
+options 	KDB_TRACE		# Print a stack trace for a panic
 
 # Make an SMP-capable kernel by default
 options 	SMP			# Symmetric MultiProcessor Kernel

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 23:22:32 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AC3ED106566B;
	Wed, 26 Oct 2011 23:22:32 +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 834AE8FC1A;
	Wed, 26 Oct 2011 23:22: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 p9QNMWg3072680;
	Wed, 26 Oct 2011 23:22:32 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QNMWgC072677;
	Wed, 26 Oct 2011 23:22:32 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110262322.p9QNMWgC072677@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 23:22:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226820 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 23:22:32 -0000

Author: yongari
Date: Wed Oct 26 23:22:32 2011
New Revision: 226820
URL: http://svn.freebsd.org/changeset/base/226820

Log:
  Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
  BGE_RX_CPU_EVENT for readability.
  Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 23:05:59 2011	(r226819)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 23:22:32 2011	(r226820)
@@ -1363,11 +1363,11 @@ bge_stop_fw(struct bge_softc *sc)
 
 	if (sc->bge_asf_mode) {
 		bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE);
-		CSR_WRITE_4(sc, BGE_CPU_EVENT,
-		    CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
+		CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
+		    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
 
 		for (i = 0; i < 100; i++ ) {
-			if (!(CSR_READ_4(sc, BGE_CPU_EVENT) & (1 << 14)))
+			if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) & (1 << 14)))
 				break;
 			DELAY(10);
 		}
@@ -4104,8 +4104,8 @@ bge_asf_driver_up(struct bge_softc *sc)
 			    BGE_FW_DRV_ALIVE);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
-			CSR_WRITE_4(sc, BGE_CPU_EVENT,
-			    CSR_READ_4(sc, BGE_CPU_EVENT) | (1 << 14));
+			CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
+			    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
 		}
 	}
 }

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct 26 23:05:59 2011	(r226819)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct 26 23:22:32 2011	(r226820)
@@ -1878,7 +1878,8 @@
 #define	BGE_MODE_CTL			0x6800
 #define	BGE_MISC_CFG			0x6804
 #define	BGE_MISC_LOCAL_CTL		0x6808
-#define	BGE_CPU_EVENT			0x6810
+#define	BGE_RX_CPU_EVENT		0x6810
+#define	BGE_TX_CPU_EVENT		0x6820
 #define	BGE_EE_ADDR			0x6838
 #define	BGE_EE_DATA			0x683C
 #define	BGE_EE_CTL			0x6840

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 23:31:28 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: by hub.freebsd.org (Postfix, from userid 1233)
	id 897D8106566C; Wed, 26 Oct 2011 23:31:28 +0000 (UTC)
Date: Wed, 26 Oct 2011 23:31:28 +0000
From: Alexander Best 
To: Bruce Evans 
Message-ID: <20111026233128.GA8686@freebsd.org>
References: <201110231627.p9NGR47P046269@svn.freebsd.org>
	<20111026182854.GA73322@freebsd.org>
	<20111027071802.T3703@besplex.bde.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20111027071802.T3703@besplex.bde.org>
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Robert Millan 
Subject: Re: svn commit: r226665 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 23:31:28 -0000

On Thu Oct 27 11, Bruce Evans wrote:
> On Wed, 26 Oct 2011, Alexander Best wrote:
> 
> >On Sun Oct 23 11, Robert Millan wrote:
> >>Log:
> >>  Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are 
> >>  only
> >>  used with FreeBSD GCC.
> >
> >any reason -f* flags were added to CWARNFLAGS in the first place? they 
> >aren't
> >really warnings, are they, so adding them to CFLAGS makes more sense imo.
> 
> -fformat-extensions is added to CWARNFLAGS because it is a modifier
> to -Wformat.  It was originally (in bsd.kern.mk 1.10) placed immediately
> after -Wformat in CWARNFLAGS, and was added in the same commit as
> -Wformat (since -Wformat could not be added before -fformat-extensions
> was developed to allow it to be added without breaking kernel builds).
> This is partially explained in the commit message.  This was obfuscated
> (in bsd.kern.mk 1.14) by removing -Wformat.  1.13 had made -Wformat
> redundant by adding -Wall.  This is not explained in the commit message.
> 
> >diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
> >index a0a595f..91560e0 100644
> >--- a/sys/conf/kern.mk
> >+++ b/sys/conf/kern.mk
> >@@ -3,10 +3,9 @@
> >#
> ># Warning flags for compiling the kernel and components of the kernel:
> >#
> >-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs 
> >-Wstrict-prototypes \
> >-               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
> >-               -Wundef -Wno-pointer-sign -fformat-extensions \
> >-               -Wmissing-include-dirs -fdiagnostics-show-option
> >+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs 
> >-Wstrict-prototypes\
> >+               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual\
> >+               -Wundef -Wno-pointer-sign -Wmissing-include-dirs
> 
> Neither of these should be moved, except within CWARNFLAGS.
> 
> For -fformat-extensions, see above.
> 
> -fdiagnostics-show option is even more closely related with warning flags
> and even better documented in its commit message, as you should know since
> you submitted it :-).  Actually, the commit message seems to tie it
> more closely with warning flags than it actually is -- it says that
> "it will report which -W* flag was responsible for triggering a certain
> warning", while gcc(1) says that it is for reporting of general diagnostics.
> 
> -Wformat and -fformat-extensions were originally at the end of CWARNFLAGS.
> -fformat-extensions wasn't moved to be with -Wall when that was added.
> Keeping it at the end is reasonable.  But it shouldn't be in the middle
> of random -W flags like it now is.  All of the -W options are unfortunately
> unsorted by adding them to the end of the unsorted list.  Some old versions
> even added -std=c99 to the end.  Since -std has nothing to do with warning
> flags, that was nonsense and has been fixed.
> 
> -fdiagnostics-show-option controls all the warning flags, so it would be
> better placed at the beginning.

thanks for the detailed explanation. how does the following patch look like,
which basically sorts the CWARNINGSFLAGS alphatically and semantically:

diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index a0a595f..b45be2a 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -1,12 +1,15 @@
 # $FreeBSD$
 
 #
-# Warning flags for compiling the kernel and components of the kernel:
+# Warning flags for compiling the kernel and components of the kernel.
+# Additionally enable FreeBSD kernel-specific printf format specifiers
+# and instruct gcc to enable some diagnostics, which make it easier to
+# pinpoint tinderbox failures.
 #
-CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-               -Wundef -Wno-pointer-sign -fformat-extensions \
-               -Wmissing-include-dirs -fdiagnostics-show-option
+CWARNFLAGS?=   -fdiagnostics-show-option -Wall -Wcast-qual -Winline\
+               -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs\
+               -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wundef\
+               -Wno-pointer-sign -fformat-extensions
 #
 # The following flags are next up for working on:
 #      -Wextra
@@ -83,7 +86,7 @@ CFLAGS+=      -mno-sse
 .else
 CFLAGS+=       -mno-aes -mno-avx
 .endif
-CFLAGS+=       -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+CFLAGS+=       -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float\
                -fno-asynchronous-unwind-tables
 INLINE_LIMIT?= 8000
 .endif

a flag i am unsure about is "-Wno-pointer-sign". one could argue that it should
come right after "-Wpointer-arith", since we use it to back out a certain
warning that is being implied by it. on the other hand one could argue that
it's more intuitive to first enable *all* warnings via -W* flags and then
afterwards set the -Wno* flags. although currently there's only a single -Wno*
flag in CWARNFLAGS, there might be more in the future. that way we would have
all those -Wno* flags in one block.

cheers.
alex

> 
> Bruce

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 26 23:52:03 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E28FF106566B;
	Wed, 26 Oct 2011 23:52:02 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D26E28FC0A;
	Wed, 26 Oct 2011 23:52:02 +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 p9QNq24k073668;
	Wed, 26 Oct 2011 23:52:02 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9QNq23P073665;
	Wed, 26 Oct 2011 23:52:02 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110262352.p9QNq23P073665@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 26 Oct 2011 23:52:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226821 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 26 Oct 2011 23:52:03 -0000

Author: yongari
Date: Wed Oct 26 23:52:02 2011
New Revision: 226821
URL: http://svn.freebsd.org/changeset/base/226821

Log:
  SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
  about the various driver events like load, unload, reset, suspend,
  restart, and ioctl operations.
  Define driver's event rather than using hard-coded values.  We don't
  still send suspend/resume event to firmware.
  
  Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
  has to access firmware mail box to inform current state, using
  BGE_SDI_STATUS register was wrong. The end result was the same as
  BGE_SDI_STATUS is 0x0C04.
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Wed Oct 26 23:22:32 2011	(r226820)
+++ head/sys/dev/bge/if_bge.c	Wed Oct 26 23:52:02 2011	(r226821)
@@ -1314,10 +1314,12 @@ bge_sig_pre_reset(struct bge_softc *sc, 
 	if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
 		switch (type) {
 		case BGE_RESET_START:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x1); /* START */
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_START);
 			break;
 		case BGE_RESET_STOP:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_UNLOAD);
 			break;
 		}
 	}
@@ -1330,11 +1332,13 @@ bge_sig_post_reset(struct bge_softc *sc,
 	if (sc->bge_asf_mode & ASF_NEW_HANDSHAKE) {
 		switch (type) {
 		case BGE_RESET_START:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x80000001);
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_START_DONE);
 			/* START DONE */
 			break;
 		case BGE_RESET_STOP:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x80000002);
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_UNLOAD_DONE);
 			break;
 		}
 	}
@@ -1347,10 +1351,12 @@ bge_sig_legacy(struct bge_softc *sc, int
 	if (sc->bge_asf_mode) {
 		switch (type) {
 		case BGE_RESET_START:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x1); /* START */
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_START);
 			break;
 		case BGE_RESET_STOP:
-			bge_writemem_ind(sc, BGE_SDI_STATUS, 0x2); /* UNLOAD */
+			bge_writemem_ind(sc, BGE_SRAM_FW_DRV_STATE_MB,
+			    BGE_FW_DRV_STATE_UNLOAD);
 			break;
 		}
 	}

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Wed Oct 26 23:22:32 2011	(r226820)
+++ head/sys/dev/bge/if_bgereg.h	Wed Oct 26 23:52:02 2011	(r226821)
@@ -77,6 +77,7 @@
 #define	BGE_SRAM_FW_CMD_MB		0x00000B78
 #define	BGE_SRAM_FW_CMD_LEN_MB		0x00000B7C
 #define	BGE_SRAM_FW_CMD_DATA_MB		0x00000B80
+#define	BGE_SRAM_FW_DRV_STATE_MB	0x00000C04
 #define	BGE_SRAM_MAC_ADDR_HIGH_MB	0x00000C14
 #define	BGE_SRAM_MAC_ADDR_LOW_MB	0x00000C18
 #define	BGE_SOFTWARE_GENCOMM_END	0x00000FFF
@@ -93,6 +94,13 @@
 #define	BGE_FW_DRV_ALIVE		0x00000001
 #define	BGE_FW_PAUSE			0x00000002
 
+#define	BGE_FW_DRV_STATE_START		0x00000001
+#define	BGE_FW_DRV_STATE_START_DONE	0x80000001
+#define	BGE_FW_DRV_STATE_UNLOAD		0x00000002
+#define	BGE_FW_DRV_STATE_UNLOAD_DONE	0x80000002
+#define	BGE_FW_DRV_STATE_WOL		0x00000003
+#define	BGE_FW_DRV_STATE_SUSPEND	0x00000004
+
 /* Mappings for internal memory configuration */
 #define	BGE_STD_RX_RINGS		0x00006000
 #define	BGE_STD_RX_RINGS_END		0x00006FFF

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 02:36:13 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7CC69106567F;
	Thu, 27 Oct 2011 02:36:13 +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 529FA8FC14;
	Thu, 27 Oct 2011 02:36:13 +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 p9R2aD35079466;
	Thu, 27 Oct 2011 02:36:13 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R2aD0u079464;
	Thu, 27 Oct 2011 02:36:13 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110270236.p9R2aD0u079464@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 02:36:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226822 - stable/9/sys/dev/dc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 02:36:13 -0000

Author: yongari
Date: Thu Oct 27 02:36:13 2011
New Revision: 226822
URL: http://svn.freebsd.org/changeset/base/226822

Log:
  MFC r226695-226696:
  r226695:
    Fix a regression introduced in r218832. For TX status check, driver
    should use a TX list DMA tag.
  
  r226696:
    Add missing bus_dmamap_sync() in setup frame transmit.
  
  Approved by:	re (kensmith)

Modified:
  stable/9/sys/dev/dc/if_dc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/dc/if_dc.c
==============================================================================
--- stable/9/sys/dev/dc/if_dc.c	Wed Oct 26 23:52:02 2011	(r226821)
+++ stable/9/sys/dev/dc/if_dc.c	Thu Oct 27 02:36:13 2011	(r226822)
@@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc)
 	sp[41] = DC_SP_MAC(eaddr[2]);
 
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc)
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -2970,7 +2974,7 @@ dc_txeof(struct dc_softc *sc)
 	 * Go through our tx list and free mbufs for those
 	 * frames that have been transmitted.
 	 */
-	bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
 	    BUS_DMASYNC_POSTWRITE);
 	setup = 0;
 	for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 02:52:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 466EB106564A;
	Thu, 27 Oct 2011 02:52:25 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D0FD8FC08;
	Thu, 27 Oct 2011 02:52:25 +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 p9R2qPQ4080176;
	Thu, 27 Oct 2011 02:52:25 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R2qOd8080173;
	Thu, 27 Oct 2011 02:52:24 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110270252.p9R2qOd8080173@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 27 Oct 2011 02:52:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226824 - in head/sys: kern vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 02:52:25 -0000

Author: alc
Date: Thu Oct 27 02:52:24 2011
New Revision: 226824
URL: http://svn.freebsd.org/changeset/base/226824

Log:
  contigmalloc(9) and contigfree(9) are now implemented in terms of other
  more general VM system interfaces.  So, their implementation can now
  reside in kern_malloc.c alongside the other functions that are declared
  in malloc.h.

Modified:
  head/sys/kern/kern_malloc.c
  head/sys/vm/vm_contig.c

Modified: head/sys/kern/kern_malloc.c
==============================================================================
--- head/sys/kern/kern_malloc.c	Thu Oct 27 02:40:43 2011	(r226823)
+++ head/sys/kern/kern_malloc.c	Thu Oct 27 02:52:24 2011	(r226824)
@@ -408,6 +408,43 @@ malloc_type_freed(struct malloc_type *mt
 }
 
 /*
+ *	contigmalloc:
+ *
+ *	Allocate a block of physically contiguous memory.
+ *
+ *	If M_NOWAIT is set, this routine will not block and return NULL if
+ *	the allocation fails.
+ */
+void *
+contigmalloc(unsigned long size, struct malloc_type *type, int flags,
+    vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
+    unsigned long boundary)
+{
+	void *ret;
+
+	ret = (void *)kmem_alloc_contig(kernel_map, size, flags, low, high,
+	    alignment, boundary, VM_MEMATTR_DEFAULT);
+	if (ret != NULL)
+		malloc_type_allocated(type, round_page(size));
+	return (ret);
+}
+
+/*
+ *	contigfree:
+ *
+ *	Free a block of memory allocated by contigmalloc.
+ *
+ *	This routine may not block.
+ */
+void
+contigfree(void *addr, unsigned long size, struct malloc_type *type)
+{
+
+	kmem_free(kernel_map, (vm_offset_t)addr, size);
+	malloc_type_freed(type, round_page(size));
+}
+
+/*
  *	malloc:
  *
  *	Allocate a block of memory.

Modified: head/sys/vm/vm_contig.c
==============================================================================
--- head/sys/vm/vm_contig.c	Thu Oct 27 02:40:43 2011	(r226823)
+++ head/sys/vm/vm_contig.c	Thu Oct 27 02:52:24 2011	(r226824)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -334,25 +333,6 @@ contigmapping(vm_map_t map, vm_size_t si
 	return (addr);
 }
 
-void *
-contigmalloc(
-	unsigned long size,	/* should be size_t here and for malloc() */
-	struct malloc_type *type,
-	int flags,
-	vm_paddr_t low,
-	vm_paddr_t high,
-	unsigned long alignment,
-	unsigned long boundary)
-{
-	void *ret;
-
-	ret = (void *)kmem_alloc_contig(kernel_map, size, flags, low, high,
-	    alignment, boundary, VM_MEMATTR_DEFAULT);
-	if (ret != NULL)
-		malloc_type_allocated(type, round_page(size));
-	return (ret);
-}
-
 vm_offset_t
 kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low,
     vm_paddr_t high, unsigned long alignment, unsigned long boundary,
@@ -382,11 +362,3 @@ retry:
 	}
 	return (ret);
 }
-
-void
-contigfree(void *addr, unsigned long size, struct malloc_type *type)
-{
-
-	kmem_free(kernel_map, (vm_offset_t)addr, size);
-	malloc_type_freed(type, round_page(size));
-}

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 08:44:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 89DE2106564A;
	Thu, 27 Oct 2011 08:44:07 +0000 (UTC)
	(envelope-from trociny@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7967C8FC15;
	Thu, 27 Oct 2011 08:44:07 +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 p9R8i7R9092786;
	Thu, 27 Oct 2011 08:44:07 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R8i7Xc092784;
	Thu, 27 Oct 2011 08:44:07 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201110270844.p9R8i7Xc092784@svn.freebsd.org>
From: Mikolaj Golub 
Date: Thu, 27 Oct 2011 08:44:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226828 - head/contrib/tzcode/stdtime
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 08:44:07 -0000

Author: trociny
Date: Thu Oct 27 08:44:07 2011
New Revision: 226828
URL: http://svn.freebsd.org/changeset/base/226828

Log:
  Fix a memory leak in tzload().
  
  Reported by:	valgrind
  Reviewed by:	kib
  MFC after:	3 days

Modified:
  head/contrib/tzcode/stdtime/localtime.c

Modified: head/contrib/tzcode/stdtime/localtime.c
==============================================================================
--- head/contrib/tzcode/stdtime/localtime.c	Thu Oct 27 07:20:30 2011	(r226827)
+++ head/contrib/tzcode/stdtime/localtime.c	Thu Oct 27 08:44:07 2011	(r226828)
@@ -450,6 +450,7 @@ register const int	doextend;
 			_close(fid);
 			return -1;
 		}
+		free(fullname);
 	}
 	u = malloc(sizeof(*u));
 	if (u == NULL)

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 09:43:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 04233106566B;
	Thu, 27 Oct 2011 09:43:26 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E7FCD8FC12;
	Thu, 27 Oct 2011 09:43:25 +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 p9R9hPca095001;
	Thu, 27 Oct 2011 09:43:25 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R9hPpF094998;
	Thu, 27 Oct 2011 09:43:25 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110270943.p9R9hPpF094998@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 27 Oct 2011 09:43:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226829 - head/sys/netgraph
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 09:43:26 -0000

Author: glebius
Date: Thu Oct 27 09:43:25 2011
New Revision: 226829
URL: http://svn.freebsd.org/changeset/base/226829

Log:
  - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed
    invariants.
  - Reduce tautology in NETGRAPH_DEBUG output.

Modified:
  head/sys/netgraph/netgraph.h
  head/sys/netgraph/ng_base.c

Modified: head/sys/netgraph/netgraph.h
==============================================================================
--- head/sys/netgraph/netgraph.h	Thu Oct 27 08:44:07 2011	(r226828)
+++ head/sys/netgraph/netgraph.h	Thu Oct 27 09:43:25 2011	(r226829)
@@ -57,6 +57,7 @@
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_netgraph.h"
+#include "opt_kdb.h"
 #endif
 
 /* debugging options */
@@ -190,7 +191,7 @@ static __inline void
 _chkhook(hook_p hook, char *file, int line)
 {
 	if (hook->hk_magic != HK_MAGIC) {
-		printf("Accessing freed hook ");
+		printf("Accessing freed ");
 		dumphook(hook, file, line);
 	}
 	hook->lastline = line;
@@ -458,7 +459,7 @@ static __inline void
 _chknode(node_p node, char *file, int line)
 {
 	if (node->nd_magic != ND_MAGIC) {
-		printf("Accessing freed node ");
+		printf("Accessing freed ");
 		dumpnode(node, file, line);
 	}
 	node->lastline = line;

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c	Thu Oct 27 08:44:07 2011	(r226828)
+++ head/sys/netgraph/ng_base.c	Thu Oct 27 09:43:25 2011	(r226829)
@@ -3167,6 +3167,9 @@ dumphook (hook_p hook, char *file, int l
 		hook->lastfile, hook->lastline);
 	if (line) {
 		printf(" problem discovered at file %s, line %d\n", file, line);
+#ifdef KDB
+		kdb_backtrace();
+#endif
 	}
 }
 
@@ -3181,6 +3184,9 @@ dumpnode(node_p node, char *file, int li
 		node->lastfile, node->lastline);
 	if (line) {
 		printf(" problem discovered at file %s, line %d\n", file, line);
+#ifdef KDB
+		kdb_backtrace();
+#endif
 	}
 }
 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 09:45:13 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A0381065672;
	Thu, 27 Oct 2011 09:45:13 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 29F338FC12;
	Thu, 27 Oct 2011 09:45:13 +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 p9R9jDLO095117;
	Thu, 27 Oct 2011 09:45:13 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R9jDrk095115;
	Thu, 27 Oct 2011 09:45:13 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110270945.p9R9jDrk095115@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 27 Oct 2011 09:45:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226830 - head/sys/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 09:45:13 -0000

Author: glebius
Date: Thu Oct 27 09:45:12 2011
New Revision: 226830
URL: http://svn.freebsd.org/changeset/base/226830

Log:
  Add macro IF_DEQUEUE_ALL(ifq, m), that takes the entire mbuf chain off
  the queue. It can be utilized in queue processing to avoid multiple
  locking/unlocking.

Modified:
  head/sys/net/if_var.h

Modified: head/sys/net/if_var.h
==============================================================================
--- head/sys/net/if_var.h	Thu Oct 27 09:43:25 2011	(r226829)
+++ head/sys/net/if_var.h	Thu Oct 27 09:45:12 2011	(r226830)
@@ -321,6 +321,18 @@ void	if_maddr_runlock(struct ifnet *ifp)
 	IF_UNLOCK(ifq); 					\
 } while (0)
 
+#define	_IF_DEQUEUE_ALL(ifq, m) do {				\
+	(m) = (ifq)->ifq_head;					\
+	(ifq)->ifq_head = (ifq)->ifq_tail = NULL;		\
+	(ifq)->ifq_len = 0;					\
+} while (0)
+
+#define	IF_DEQUEUE_ALL(ifq, m) do {				\
+	IF_LOCK(ifq); 						\
+	_IF_DEQUEUE_ALL(ifq, m);				\
+	IF_UNLOCK(ifq); 					\
+} while (0)
+
 #define	_IF_POLL(ifq, m)	((m) = (ifq)->ifq_head)
 #define	IF_POLL(ifq, m)		_IF_POLL(ifq, m)
 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 09:47:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D851D1065691;
	Thu, 27 Oct 2011 09:47:00 +0000 (UTC)
	(envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8B52B8FC20;
	Thu, 27 Oct 2011 09:47:00 +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 p9R9l0nm095219;
	Thu, 27 Oct 2011 09:47:00 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9R9l0XF095217;
	Thu, 27 Oct 2011 09:47:00 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201110270947.p9R9l0XF095217@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Thu, 27 Oct 2011 09:47:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226831 - head/sys/contrib/pf/net
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 09:47:00 -0000

Author: glebius
Date: Thu Oct 27 09:47:00 2011
New Revision: 226831
URL: http://svn.freebsd.org/changeset/base/226831

Log:
  Utilize new IF_DEQUEUE_ALL(ifq, m) macro in pfsyncintr() to reduce
  contention on ifqueue lock.

Modified:
  head/sys/contrib/pf/net/if_pfsync.c

Modified: head/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- head/sys/contrib/pf/net/if_pfsync.c	Thu Oct 27 09:45:12 2011	(r226830)
+++ head/sys/contrib/pf/net/if_pfsync.c	Thu Oct 27 09:47:00 2011	(r226831)
@@ -3290,16 +3290,17 @@ void
 pfsyncintr(void *arg)
 {
 	struct pfsync_softc *sc = arg;
-	struct mbuf *m;
+	struct mbuf *m, *n;
 
 	CURVNET_SET(sc->sc_ifp->if_vnet);
 	pfsync_ints++;
 
-	for (;;) {
-		IF_DEQUEUE(&sc->sc_ifp->if_snd, m);
-		if (m == 0)
-			break;
+	IF_DEQUEUE_ALL(&sc->sc_ifp->if_snd, m);
 
+	for (; m != NULL; m = n) {
+
+		n = m->m_nextpkt;
+		m->m_nextpkt = NULL;
 		if (ip_output(m, NULL, NULL, IP_RAWOUTPUT, &sc->sc_imo, NULL)
 		    == 0)
 			V_pfsyncstats.pfsyncs_opackets++;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 10:21:40 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86CD21065740;
	Thu, 27 Oct 2011 10:21:40 +0000 (UTC)
	(envelope-from kevlo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 750298FC13;
	Thu, 27 Oct 2011 10:21:40 +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 p9RALeuJ001328;
	Thu, 27 Oct 2011 10:21:40 GMT (envelope-from kevlo@svn.freebsd.org)
Received: (from kevlo@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RALe55001321;
	Thu, 27 Oct 2011 10:21:40 GMT (envelope-from kevlo@svn.freebsd.org)
Message-Id: <201110271021.p9RALe55001321@svn.freebsd.org>
From: Kevin Lo 
Date: Thu, 27 Oct 2011 10:21:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226832 - in head/sys/arm: at91 econa xscale/i80321
	xscale/i8134x xscale/ixp425 xscale/pxa
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 10:21:40 -0000

Author: kevlo
Date: Thu Oct 27 10:21:40 2011
New Revision: 226832
URL: http://svn.freebsd.org/changeset/base/226832

Log:
  Check the return value of BUS_SETUP_INTR()
  
  Reviewed by:	imp

Modified:
  head/sys/arm/at91/at91.c
  head/sys/arm/econa/econa.c
  head/sys/arm/xscale/i80321/iq80321.c
  head/sys/arm/xscale/i8134x/i81342.c
  head/sys/arm/xscale/ixp425/ixp425.c
  head/sys/arm/xscale/pxa/pxa_obio.c

Modified: head/sys/arm/at91/at91.c
==============================================================================
--- head/sys/arm/at91/at91.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/at91/at91.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -367,11 +367,15 @@ at91_setup_intr(device_t dev, device_t c
     driver_intr_t *intr, void *arg, void **cookiep)    
 {
 	struct at91_softc *sc = device_get_softc(dev);
+	int error;
 
 	if (rman_get_start(ires) == sc->sc_irq_system && filt == NULL)
 		panic("All system interrupt ISRs must be FILTER");
-	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, 
-	    intr, arg, cookiep);
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
+	    filt, intr, arg, cookiep);
+	if (error)
+		return (error);
+
 	bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IECR,
 	    1 << rman_get_start(ires));
 	return (0);

Modified: head/sys/arm/econa/econa.c
==============================================================================
--- head/sys/arm/econa/econa.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/econa/econa.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -592,12 +592,15 @@ econa_setup_intr(device_t dev, device_t 
     struct resource *ires, int flags, driver_filter_t *filt,
     driver_intr_t *intr, void *arg, void **cookiep)
 {
+	int error;
 
 	if (rman_get_start(ires) == ECONA_IRQ_SYSTEM && filt == NULL)
 		panic("All system interrupt ISRs must be FILTER");
 
-	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt,
-	    intr, arg, cookiep);
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
+	    filt, intr, arg, cookiep);
+	if (error)
+		return (error);
 
 	arm_unmask_irq(rman_get_start(ires));
 

Modified: head/sys/arm/xscale/i80321/iq80321.c
==============================================================================
--- head/sys/arm/xscale/i80321/iq80321.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/xscale/i80321/iq80321.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -354,8 +354,12 @@ iq80321_setup_intr(device_t dev, device_
     struct resource *ires, int flags, driver_filter_t *filt, 
     driver_intr_t *intr, void *arg, void **cookiep)
 {
-	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr, 
-	    arg, cookiep);
+	int error;
+
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
+	    filt, intr, arg, cookiep);
+	if (error)
+		return (error);
 	intr_enabled |= 1 << rman_get_start(ires);
 	i80321_set_intrmask();
 	

Modified: head/sys/arm/xscale/i8134x/i81342.c
==============================================================================
--- head/sys/arm/xscale/i8134x/i81342.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/xscale/i8134x/i81342.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -429,10 +429,12 @@ i81342_setup_intr(device_t dev, device_t
     int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, 
     void **cookiep)
 {
-	
+	int error;
 
-	BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr,
-	    arg, cookiep);
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags,
+	    filt, intr, arg, cookiep);
+	if (error)
+		return (error);
 	arm_unmask_irq(rman_get_start(ires));
 	return (0);
 }

Modified: head/sys/arm/xscale/ixp425/ixp425.c
==============================================================================
--- head/sys/arm/xscale/ixp425/ixp425.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/xscale/ixp425/ixp425.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -639,9 +639,12 @@ ixp425_setup_intr(device_t dev, device_t
     driver_intr_t *intr, void *arg, void **cookiep)    
 {
 	uint32_t mask, mask2;
+	int error;
 
-	BUS_SETUP_INTR(device_get_parent(dev), child, res, flags, filt, intr,
-	     arg, cookiep);
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, res, flags,
+	    filt, intr, arg, cookiep);
+	if (error)
+		return (error);
 
 	get_masks(res, &mask, &mask2);
 	update_masks(intr_enabled | mask, intr_enabled2 | mask2);

Modified: head/sys/arm/xscale/pxa/pxa_obio.c
==============================================================================
--- head/sys/arm/xscale/pxa/pxa_obio.c	Thu Oct 27 09:47:00 2011	(r226831)
+++ head/sys/arm/xscale/pxa/pxa_obio.c	Thu Oct 27 10:21:40 2011	(r226832)
@@ -173,11 +173,14 @@ pxa_setup_intr(device_t dev, device_t ch
     driver_filter_t *filter, driver_intr_t *ithread, void *arg, void **cookiep)
 {
 	struct	obio_softc *sc;
+	int error;
 
 	sc = (struct obio_softc *)device_get_softc(dev);
 
-	BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, filter,
-	    ithread, arg, cookiep);
+	error = BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags,
+	    filter, ithread, arg, cookiep);
+	if (error)
+		return (error);
 	arm_unmask_irq(rman_get_start(irq));
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 10:25:11 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8AA891065679;
	Thu, 27 Oct 2011 10:25:11 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 79F598FC16;
	Thu, 27 Oct 2011 10:25: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 p9RAPBdo001495;
	Thu, 27 Oct 2011 10:25:11 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RAPBZU001492;
	Thu, 27 Oct 2011 10:25:11 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201110271025.p9RAPBZU001492@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Thu, 27 Oct 2011 10:25:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226833 - in head/sys: boot/forth kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 10:25:11 -0000

Author: pluknet
Date: Thu Oct 27 10:25:11 2011
New Revision: 226833
URL: http://svn.freebsd.org/changeset/base/226833

Log:
  Remove the long reprecated ``/stand/sysinstall'' from the init_path.
  
  It can be put back using the INIT_PATH config option or init_path
  loader variable, if still needed (which I doubt).
  
  MFC after:	1 week

Modified:
  head/sys/boot/forth/loader.conf
  head/sys/kern/init_main.c

Modified: head/sys/boot/forth/loader.conf
==============================================================================
--- head/sys/boot/forth/loader.conf	Thu Oct 27 10:21:40 2011	(r226832)
+++ head/sys/boot/forth/loader.conf	Thu Oct 27 10:25:11 2011	(r226833)
@@ -81,7 +81,7 @@ module_path="/boot/modules"	# Set the mo
 #boot_serial=""		# -h: Use serial console
 #boot_single=""		# -s: Start system in single-user mode
 #boot_verbose=""	# -v: Causes extra debugging information to be printed
-#init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall"
+#init_path="/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init"
 			# Sets the list of init candidates
 #init_shell="/bin/sh"	# The shell binary used by init(8).
 #init_script=""		# Initial script to run by init(8) before chrooting.

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Thu Oct 27 10:21:40 2011	(r226832)
+++ head/sys/kern/init_main.c	Thu Oct 27 10:25:11 2011	(r226833)
@@ -641,7 +641,7 @@ static char init_path[MAXPATHLEN] =
 #ifdef	INIT_PATH
     __XSTRING(INIT_PATH);
 #else
-    "/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall";
+    "/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init";
 #endif
 SYSCTL_STRING(_kern, OID_AUTO, init_path, CTLFLAG_RD, init_path, 0,
 	"Path used to search the init process");

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 10:56:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EA056106566B;
	Thu, 27 Oct 2011 10:56:19 +0000 (UTC)
	(envelope-from ndenev@gmail.com)
Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com
	[209.85.161.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 296658FC13;
	Thu, 27 Oct 2011 10:56:18 +0000 (UTC)
Received: by faar19 with SMTP id r19so3496064faa.13
	for ; Thu, 27 Oct 2011 03:56:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=YO1uBiA6HEObCssTJlKQjFs3eCKO8lNgX5AzVGcvQAw=;
	b=lo81KN3TkbvQ8L1Uk1gU6FujS8RtFkcoNMJxAG0ns/FCqGRf1u7rSQSX7GOenl83l+
	xBxU21QEYZBTSyXxOYfeAL17CamR/M5ptqfa6WqIqh9f4edAhuiLtKUUx8folpZZJBJP
	EqK1eRl/w2WtonKyMRqyZGDxj+vOqkY6iU//I=
Received: by 10.223.77.66 with SMTP id f2mr12077492fak.24.1319712977590;
	Thu, 27 Oct 2011 03:56:17 -0700 (PDT)
Received: from imba-brutale.totalterror.net ([93.152.152.135])
	by mx.google.com with ESMTPS id v19sm10333885faa.13.2011.10.27.03.56.14
	(version=TLSv1/SSLv3 cipher=OTHER);
	Thu, 27 Oct 2011 03:56:15 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Nikolay Denev 
In-Reply-To: <201110250406.p9P46UEb077845@svn.freebsd.org>
Date: Thu, 27 Oct 2011 13:56:13 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201110250406.p9P46UEb077845@svn.freebsd.org>
To: Qing Li 
X-Mailer: Apple Mail (2.1251.1)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226713 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 10:56:20 -0000


On Oct 25, 2011, at 7:06 AM, Qing Li wrote:

> Author: qingli
> Date: Tue Oct 25 04:06:29 2011
> New Revision: 226713
> URL: http://svn.freebsd.org/changeset/base/226713
>=20
> Log:
>  Exclude host routes when checking for prefix coverage on multiple
>  interfaces. A host route has a NULL mask so check for that condition.
>  I have also been told by developers who customize the packet output
>  path with direct manipulation of the route entry (or the outgoing
>  interface to be specific). This patch checks for the route mask
>  explicitly to make sure custom code will not panic.
>=20
>  PR:		kern/161805
>  MFC after:	3 days
>=20
> Modified:
>  head/sys/netinet/in.c
>=20

Without this patch my stable/8 routers were crashing just after a few =
minutes.
A few hours after the commit I applied it manually and the machines are =
up since then, thanks!

Regards,
Nikolay



From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 12:26:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9462B106566B;
	Thu, 27 Oct 2011 12:26:16 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7DF3F8FC13;
	Thu, 27 Oct 2011 12:26:16 +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 p9RCQG0J006260;
	Thu, 27 Oct 2011 12:26:16 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RCQGwu006257;
	Thu, 27 Oct 2011 12:26:16 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110271226.p9RCQGwu006257@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 27 Oct 2011 12:26:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226834 - stable/9/usr.bin/csup
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 12:26:16 -0000

Author: kib
Date: Thu Oct 27 12:26:16 2011
New Revision: 226834
URL: http://svn.freebsd.org/changeset/base/226834

Log:
  MFC r225979:
  Update the comment.
  
  MFC r225980:
  Handle the situation where fixups_close() has been called but more fixups
  are still available on the queue.
  
  Approved by:	re (kensmith)

Modified:
  stable/9/usr.bin/csup/fixups.c
  stable/9/usr.bin/csup/updater.c
Directory Properties:
  stable/9/usr.bin/csup/   (props changed)

Modified: stable/9/usr.bin/csup/fixups.c
==============================================================================
--- stable/9/usr.bin/csup/fixups.c	Thu Oct 27 10:25:11 2011	(r226833)
+++ stable/9/usr.bin/csup/fixups.c	Thu Oct 27 12:26:16 2011	(r226834)
@@ -141,7 +141,7 @@ fixups_get(struct fixups *f)
 	fixups_lock(f);
 	while (f->size == 0 && !f->closed)
 		pthread_cond_wait(&f->cond, &f->lock);
-	if (f->closed) {
+	if (f->closed && f->size == 0) {
 		fixups_unlock(f);
 		return (NULL);
 	}

Modified: stable/9/usr.bin/csup/updater.c
==============================================================================
--- stable/9/usr.bin/csup/updater.c	Thu Oct 27 10:25:11 2011	(r226833)
+++ stable/9/usr.bin/csup/updater.c	Thu Oct 27 12:26:16 2011	(r226834)
@@ -238,7 +238,7 @@ updater(void *arg)
 
 	/*
 	 * Make sure to close the fixups even in case of an error,
-	 * so that the lister thread doesn't block indefinitely.
+	 * so that the detailer thread doesn't block indefinitely.
 	 */
 	fixups_close(up->config->fixups);
 	if (!error)

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 12:44:07 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 01A83106566B;
	Thu, 27 Oct 2011 12:44:07 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 694A48FC0A;
	Thu, 27 Oct 2011 12:44:06 +0000 (UTC)
Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9RChxp7042730
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 27 Oct 2011 15:43:59 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from alf.home (kostik@localhost [127.0.0.1])
	by alf.home (8.14.5/8.14.5) with ESMTP id p9RChxhI002612;
	Thu, 27 Oct 2011 15:43:59 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by alf.home (8.14.5/8.14.5/Submit) id p9RChxBk002611;
	Thu, 27 Oct 2011 15:43:59 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com
	using -f
Date: Thu, 27 Oct 2011 15:43:59 +0300
From: Kostik Belousov 
To: "Kenneth D. Merry" 
Message-ID: <20111027124359.GQ50300@deviant.kiev.zoral.com.ua>
References: <201110032032.p93KWufB026711@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="gG1IGp5jubzDTXZ7"
Content-Disposition: inline
In-Reply-To: <201110032032.p93KWufB026711@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,
	DNS_FROM_OPENWHOIS autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r225950 - in head: sbin/camcontrol
	share/examples/scsi_target share/misc sys/cam sys/cam/scsi
	sys/dev/ciss sys/dev/firewire sys/dev/iir
	sys/dev/iscsi/initiator sys/dev/isp sys/dev/mly s...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 12:44:07 -0000


--gG1IGp5jubzDTXZ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Oct 03, 2011 at 08:32:56PM +0000, Kenneth D. Merry wrote:
> Author: ken
> Date: Mon Oct  3 20:32:55 2011
> New Revision: 225950
> URL: http://svn.freebsd.org/changeset/base/225950

Before this commit, scsi_extract_sense() was static inline. Since now
it is made not-inlined, the consumers of it that previously not depended
on cam.ko need an explicit MODULE_DEPEND() for cam.

E.g., on HEAD and stable/9, mfi is no longer loadable as module, showing
errors
link_elf_obj: symbol scsi_extract_sense undefined
linker_load_file: Unsupported file type
on load attempt.

--gG1IGp5jubzDTXZ7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk6pUg8ACgkQC3+MBN1Mb4j7fwCfSl14Pj61/38PpQko5rxiJIpg
H8YAoLsqhjYrez19VsxY6ZJlsLvmYSyX
=3Us1
-----END PGP SIGNATURE-----

--gG1IGp5jubzDTXZ7--

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 13:07:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7E14D1065672;
	Thu, 27 Oct 2011 13:07:50 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF67B8FC0C;
	Thu, 27 Oct 2011 13:07:49 +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 p9RD7n9b007735;
	Thu, 27 Oct 2011 13:07:49 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RD7nAx007728;
	Thu, 27 Oct 2011 13:07:49 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <201110271307.p9RD7nAx007728@svn.freebsd.org>
From: Ken Smith 
Date: Thu, 27 Oct 2011 13:07:49 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226835 - in head/sys: amd64/conf i386/conf ia64/conf
	pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 13:07:50 -0000

Author: kensmith
Date: Thu Oct 27 13:07:49 2011
New Revision: 226835
URL: http://svn.freebsd.org/changeset/base/226835

Log:
  Adjust the debugger options slightly.  This should help me do the right
  thing when changing the debugging options as part of head becoming a new
  stable branch.  It may also help people who for one reason or another want
  to run head but don't want it slowed down by the debugging support.
  
  Reviewed by:	kib

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/i386/conf/GENERIC
  head/sys/ia64/conf/GENERIC
  head/sys/pc98/conf/GENERIC
  head/sys/powerpc/conf/GENERIC
  head/sys/sparc64/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/amd64/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -65,8 +65,11 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
+# Debugging support.  Always need this:
 options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB			# Support DDB.
 options 	GDB			# Support remote GDB.
 options 	DEADLKRES		# Enable the deadlock resolver

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/i386/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -65,8 +65,11 @@ options 	MAC			# TrustedBSD MAC Framewor
 #options 	KDTRACE_HOOKS		# Kernel DTrace hooks
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
+# Debugging support.  Always need this:
 options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB			# Support DDB.
 options 	GDB			# Support remote GDB.
 options 	DEADLKRES		# Enable the deadlock resolver

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/ia64/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -60,8 +60,11 @@ options 	UFS_DIRHASH	# Hash-based direct
 options 	UFS_GJOURNAL	# Enable gjournal-based UFS journaling
 options 	_KPOSIX_PRIORITY_SCHEDULING	# Posix P1003_1B RT extensions
 
-# Debugging for use in -current
-options 	KDB		# Enable kernel debugger support
+# Debugging support.  Always need this:
+options 	KDB		# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE	# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB		# Support DDB
 options 	GDB		# Support remote GDB
 options 	DEADLKRES	# Enable the deadlock resolver

Modified: head/sys/pc98/conf/GENERIC
==============================================================================
--- head/sys/pc98/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/pc98/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -66,8 +66,11 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
+# Debugging support.  Always need this:
 options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB			# Support DDB.
 options 	GDB			# Support remote GDB.
 options 	DEADLKRES		# Enable the deadlock resolver

Modified: head/sys/powerpc/conf/GENERIC
==============================================================================
--- head/sys/powerpc/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/powerpc/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -67,8 +67,11 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE     # Include this file in kernel
 
-# Debugging for use in -current
-options 	KDB			#Enable the kernel debugger
+# Debugging support.  Always need this:
+options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB			#Support DDB
 #options 	DEADLKRES		#Enable the deadlock resolver
 options 	INVARIANTS		#Enable calls of extra sanity checking

Modified: head/sys/sparc64/conf/GENERIC
==============================================================================
--- head/sys/sparc64/conf/GENERIC	Thu Oct 27 12:26:16 2011	(r226834)
+++ head/sys/sparc64/conf/GENERIC	Thu Oct 27 13:07:49 2011	(r226835)
@@ -63,8 +63,11 @@ options 	AUDIT			# Security event auditi
 options 	MAC			# TrustedBSD MAC Framework
 options 	INCLUDE_CONFIG_FILE	# Include this file in kernel
 
-# Debugging for use in -current
+# Debugging support.  Always need this:
 options 	KDB			# Enable kernel debugger support.
+# For minimum debugger support (stable branch) use:
+#options 	KDB_TRACE		# Print a stack trace for a panic.
+# For full debugger support use this instead:
 options 	DDB			# Support DDB.
 options 	GDB			# Support remote GDB.
 options 	DEADLKRES		# Enable the deadlock resolver

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 13:14:10 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81238106564A;
	Thu, 27 Oct 2011 13:14:10 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailB.acsu.buffalo.edu (localmailb.acsu.buffalo.edu
	[128.205.5.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 4F2C78FC16;
	Thu, 27 Oct 2011 13:14:10 +0000 (UTC)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id 8E39319C1;
	Thu, 27 Oct 2011 09:14:09 -0400 (EDT)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailB.acsu.buffalo.edu (Postfix) with ESMTP id D911FAD2A;
	Thu, 27 Oct 2011 09:14:08 -0400 (EDT)
Received: from smtp3.acsu.buffalo.edu (smtp3.acsu.buffalo.edu [128.205.5.226])
	by localmailB.acsu.buffalo.edu (Prefixe) with ESMTP id D0210175D;
	Thu, 27 Oct 2011 09:14:08 -0400 (EDT)
Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76])
	(Authenticated sender: kensmith@buffalo.edu)
	by smtp3.acsu.buffalo.edu (Postfix) with ESMTPSA id 7E0EA46119;
	Thu, 27 Oct 2011 09:14:08 -0400 (EDT)
From: Ken Smith 
To: src-committers@freebsd.org
In-Reply-To: <201110271307.p9RD7nAx007728@svn.freebsd.org>
References: <201110271307.p9RD7nAx007728@svn.freebsd.org>
Content-Type: multipart/signed; micalg="pgp-sha1";
	protocol="application/pgp-signature";
	boundary="=-CqB1XKMCJoKYHUW51wwP"
Date: Thu, 27 Oct 2011 09:14:07 -0400
Message-ID: <1319721247.41652.16.camel@bauer.cse.buffalo.edu>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 
X-PM-EL-Spam-Prob: : 8%
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject: Re: svn commit: r226835 - in head/sys: amd64/conf i386/conf
 ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 13:14:10 -0000


--=-CqB1XKMCJoKYHUW51wwP
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

On Thu, 2011-10-27 at 13:07 +0000, Ken Smith wrote:
> Author: kensmith
> Date: Thu Oct 27 13:07:49 2011
> New Revision: 226835
> URL: http://svn.freebsd.org/changeset/base/226835
>=20
> Log:
>   Adjust the debugger options slightly.  This should help me do the right
>   thing when changing the debugging options as part of head becoming a ne=
w
>   stable branch.  It may also help people who for one reason or another w=
ant
>   to run head but don't want it slowed down by the debugging support.
>  =20
>   Reviewed by:	kib
>=20
> Modified:
>   head/sys/amd64/conf/GENERIC
>   head/sys/i386/conf/GENERIC
>   head/sys/ia64/conf/GENERIC
>   head/sys/pc98/conf/GENERIC
>   head/sys/powerpc/conf/GENERIC
>   head/sys/sparc64/conf/GENERIC

In response to one of my commits done to the ia64 GENERIC I received
some feedback giving a long list of issues (style, formatting, seemingly
gratuitous differences, annoyances, etc.) with the whole set of GENERIC
config files.  If anyone knows a reason I should NOT act on the list
to bring all the GENERIC's into style compliance and whatnot let me
know.  If nobody screams I'll do what I can to fix them up in head
some time after 9.0 is finished.

Thanks...

--=20
                                                Ken Smith
- From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodor Geisel  |

--=-CqB1XKMCJoKYHUW51wwP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk6pWR8ACgkQ/G14VSmup/apAQCcDrEkgslkhwtNKrGk6XIQy5MN
oiMAmgPrH65sAjudMIOSDfPM8SfnU67M
=9nm1
-----END PGP SIGNATURE-----

--=-CqB1XKMCJoKYHUW51wwP--


From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 13:17:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A17DF106567A;
	Thu, 27 Oct 2011 13:17:42 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 916988FC22;
	Thu, 27 Oct 2011 13:17:42 +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 p9RDHg7r008139;
	Thu, 27 Oct 2011 13:17:42 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RDHgDT008137;
	Thu, 27 Oct 2011 13:17:42 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201110271317.p9RDHgDT008137@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Thu, 27 Oct 2011 13:17:42 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226836 - head/lib/libc/gen
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 13:17:42 -0000

Author: pluknet
Date: Thu Oct 27 13:17:42 2011
New Revision: 226836
URL: http://svn.freebsd.org/changeset/base/226836

Log:
  Fix the manual section number for a cross-reference to open(2) and sort it.
  
  Reviewed by:	ed
  MFC after:	3 days

Modified:
  head/lib/libc/gen/getutxent.3

Modified: head/lib/libc/gen/getutxent.3
==============================================================================
--- head/lib/libc/gen/getutxent.3	Thu Oct 27 13:07:49 2011	(r226835)
+++ head/lib/libc/gen/getutxent.3	Thu Oct 27 13:17:42 2011	(r226836)
@@ -386,10 +386,10 @@ Otherwise, -1 is returned and the global
 is set to indicate the error.
 .Sh ERRORS
 In addition to the error conditions described in
+.Xr open 2 ,
 .Xr fdopen 3 ,
 .Xr fopen 3 ,
 .Xr fseek 3 ,
-.Xr open 3 ,
 the
 .Fn pututxline
 function can generate the following errors:

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 14:07:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 956701065677;
	Thu, 27 Oct 2011 14:07:57 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 849508FC12;
	Thu, 27 Oct 2011 14:07:57 +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 p9RE7vAb009964;
	Thu, 27 Oct 2011 14:07:57 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RE7vvE009962;
	Thu, 27 Oct 2011 14:07:57 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271407.p9RE7vvE009962@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 14:07:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226837 - head/sys/crypto/aesni
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 14:07:57 -0000

Author: pjd
Date: Thu Oct 27 14:07:57 2011
New Revision: 226837
URL: http://svn.freebsd.org/changeset/base/226837

Log:
  Improve AES-NI performance for AES-XTS:
  - Operate on uint64_t types when doing XORing, etc. instead of uint8_t.
  - Don't bzero() temporary block for every AES block. Do it once for entire
    data block.
  - AES-NI is available only on little endian architectures. Simplify code
    that takes block number from IV.
  
  Benchmarks:
  
  Memory-backed md(4) device, software AES-XTS, 4kB sector:
  
  	# dd if=/dev/md0.eli bs=1m
  	59.61MB/s
  
  Memory-backed md(4) device, old AES-NI AES-XTS, 4kB sector:
  
  	# dd if=/dev/md0.eli bs=1m
  	97.29MB/s
  
  Memory-backed md(4) device, new AES-NI AES-XTS, 4kB sector:
  
  	# dd if=/dev/md0.eli bs=1m
  	221.26MB/s
  
  127% performance improvement between old and new code.
  
  Harddisk, raw speed:
  
  	# dd if=/dev/ada0 bs=1m
  	137.63MB/s
  
  Harddisk, software AES-XTS, 4kB sector:
  
  	# dd if=/dev/ada0.eli bs=1m
  	47.83MB/s (34% of raw disk speed)
  
  Harddisk, old AES-NI AES-XTS, 4kB sector:
  
  	# dd if=/dev/ada0.eli bs=1m
  	68.33MB/s (49% of raw disk speed)
  
  Harddisk, new AES-NI AES-XTS, 4kB sector:
  
  	# dd if=/dev/ada0.eli bs=1m
  	108.35MB/s (78% of raw disk speed)
  
  58% performance improvement between old and new code.
  
  As a side-note, GELI with AES-NI using AES-CBC can achive native disk speed.
  
  MFC after:	3 days

Modified:
  head/sys/crypto/aesni/aesni_wrap.c

Modified: head/sys/crypto/aesni/aesni_wrap.c
==============================================================================
--- head/sys/crypto/aesni/aesni_wrap.c	Thu Oct 27 13:17:42 2011	(r226836)
+++ head/sys/crypto/aesni/aesni_wrap.c	Thu Oct 27 14:07:57 2011	(r226837)
@@ -87,33 +87,33 @@ aesni_decrypt_ecb(int rounds, const void
 #define	AES_XTS_ALPHA		0x87	/* GF(2^128) generator polynomial */
 
 static void
-aesni_crypt_xts_block(int rounds, const void *key_schedule, uint8_t *tweak,
-    const uint8_t *from, uint8_t *to, int do_encrypt)
+aesni_crypt_xts_block(int rounds, const void *key_schedule, uint64_t *tweak,
+    const uint64_t *from, uint64_t *to, uint64_t *block, int do_encrypt)
 {
-	uint8_t block[AES_XTS_BLOCKSIZE];
-	u_int i, carry_in, carry_out;
+	int carry;
 
-	for (i = 0; i < AES_XTS_BLOCKSIZE; i++)
-		block[i] = from[i] ^ tweak[i];
+	block[0] = from[0] ^ tweak[0];
+	block[1] = from[1] ^ tweak[1];
 
 	if (do_encrypt)
-		aesni_enc(rounds - 1, key_schedule, block, to, NULL);
+		aesni_enc(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL);
 	else
-		aesni_dec(rounds - 1, key_schedule, block, to, NULL);
+		aesni_dec(rounds - 1, key_schedule, (uint8_t *)block, (uint8_t *)to, NULL);
 
-	for (i = 0; i < AES_XTS_BLOCKSIZE; i++)
-		to[i] ^= tweak[i];
+	to[0] ^= tweak[0];
+	to[1] ^= tweak[1];
 
 	/* Exponentiate tweak. */
-	carry_in = 0;
-	for (i = 0; i < AES_XTS_BLOCKSIZE; i++) {
-		carry_out = tweak[i] & 0x80;
-		tweak[i] = (tweak[i] << 1) | (carry_in ? 1 : 0);
-		carry_in = carry_out;
-	}
-	if (carry_in)
-		tweak[0] ^= AES_XTS_ALPHA;
-	bzero(block, sizeof(block));
+	carry = ((tweak[0] & 0x8000000000000000ULL) > 0);
+	tweak[0] <<= 1;
+	if (tweak[1] & 0x8000000000000000ULL) {
+		uint8_t *twk = (uint8_t *)tweak;
+
+		twk[0] ^= AES_XTS_ALPHA;
+	}
+	tweak[1] <<= 1;
+	if (carry)
+		tweak[1] |= 1;
 }
 
 static void
@@ -121,32 +121,33 @@ aesni_crypt_xts(int rounds, const void *
     const void *tweak_schedule, size_t len, const uint8_t *from, uint8_t *to,
     const uint8_t iv[AES_BLOCK_LEN], int do_encrypt)
 {
+	uint64_t block[AES_XTS_BLOCKSIZE / 8];
 	uint8_t tweak[AES_XTS_BLOCKSIZE];
-	uint64_t blocknum;
 	size_t i;
 
 	/*
 	 * Prepare tweak as E_k2(IV). IV is specified as LE representation
 	 * of a 64-bit block number which we allow to be passed in directly.
 	 */
-	bcopy(iv, &blocknum, AES_XTS_IVSIZE);
-	for (i = 0; i < AES_XTS_IVSIZE; i++) {
-		tweak[i] = blocknum & 0xff;
-		blocknum >>= 8;
-	}
+#if BYTE_ORDER == LITTLE_ENDIAN
+	bcopy(iv, tweak, AES_XTS_IVSIZE);
 	/* Last 64 bits of IV are always zero. */
 	bzero(tweak + AES_XTS_IVSIZE, AES_XTS_IVSIZE);
+#else
+#error Only LITTLE_ENDIAN architectures are supported.
+#endif
 	aesni_enc(rounds - 1, tweak_schedule, tweak, tweak, NULL);
 
 	len /= AES_XTS_BLOCKSIZE;
 	for (i = 0; i < len; i++) {
-		aesni_crypt_xts_block(rounds, data_schedule, tweak, from, to,
-		    do_encrypt);
+		aesni_crypt_xts_block(rounds, data_schedule, (uint64_t *)tweak,
+		    (const uint64_t *)from, (uint64_t *)to, block, do_encrypt);
 		from += AES_XTS_BLOCKSIZE;
 		to += AES_XTS_BLOCKSIZE;
 	}
 
 	bzero(tweak, sizeof(tweak));
+	bzero(block, sizeof(block));
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 14:11:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B3C4C1065676;
	Thu, 27 Oct 2011 14:11:19 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A2EEA8FC16;
	Thu, 27 Oct 2011 14: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 p9REBJcG010137;
	Thu, 27 Oct 2011 14:11:19 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9REBJQQ010134;
	Thu, 27 Oct 2011 14:11:19 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201110271411.p9REBJQQ010134@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 27 Oct 2011 14:11: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: r226838 - stable/8/contrib/csup
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 14:11:19 -0000

Author: kib
Date: Thu Oct 27 14:11:19 2011
New Revision: 226838
URL: http://svn.freebsd.org/changeset/base/226838

Log:
  MFC r225979:
  Update the comment.
  
  MFC r225980:
  Handle the situation where fixups_close() has been called but more fixups
  are still available on the queue.

Modified:
  stable/8/contrib/csup/fixups.c
  stable/8/contrib/csup/updater.c
Directory Properties:
  stable/8/contrib/csup/   (props changed)

Modified: stable/8/contrib/csup/fixups.c
==============================================================================
--- stable/8/contrib/csup/fixups.c	Thu Oct 27 14:07:57 2011	(r226837)
+++ stable/8/contrib/csup/fixups.c	Thu Oct 27 14:11:19 2011	(r226838)
@@ -141,7 +141,7 @@ fixups_get(struct fixups *f)
 	fixups_lock(f);
 	while (f->size == 0 && !f->closed)
 		pthread_cond_wait(&f->cond, &f->lock);
-	if (f->closed) {
+	if (f->closed && f->size == 0) {
 		fixups_unlock(f);
 		return (NULL);
 	}

Modified: stable/8/contrib/csup/updater.c
==============================================================================
--- stable/8/contrib/csup/updater.c	Thu Oct 27 14:07:57 2011	(r226837)
+++ stable/8/contrib/csup/updater.c	Thu Oct 27 14:11:19 2011	(r226838)
@@ -238,7 +238,7 @@ updater(void *arg)
 
 	/*
 	 * Make sure to close the fixups even in case of an error,
-	 * so that the lister thread doesn't block indefinitely.
+	 * so that the detailer thread doesn't block indefinitely.
 	 */
 	fixups_close(up->config->fixups);
 	if (!error)

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 14:15:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ABAEB106564A;
	Thu, 27 Oct 2011 14:15:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B9188FC08;
	Thu, 27 Oct 2011 14:15:26 +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 p9REFQkP010307;
	Thu, 27 Oct 2011 14:15:26 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9REFQd0010305;
	Thu, 27 Oct 2011 14:15:26 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271415.p9REFQd0010305@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 14:15:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226839 - head/sys/crypto/aesni
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 14:15:26 -0000

Author: pjd
Date: Thu Oct 27 14:15:26 2011
New Revision: 226839
URL: http://svn.freebsd.org/changeset/base/226839

Log:
  Update Copyright.
  
  MFC after:	3 days

Modified:
  head/sys/crypto/aesni/aesni_wrap.c

Modified: head/sys/crypto/aesni/aesni_wrap.c
==============================================================================
--- head/sys/crypto/aesni/aesni_wrap.c	Thu Oct 27 14:11:19 2011	(r226838)
+++ head/sys/crypto/aesni/aesni_wrap.c	Thu Oct 27 14:15:26 2011	(r226839)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2010 Konstantin Belousov 
- * Copyright (c) 2010 Pawel Jakub Dawidek 
+ * Copyright (c) 2010-2011 Pawel Jakub Dawidek 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:12:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F536106566B;
	Thu, 27 Oct 2011 16:12:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 449038FC0A;
	Thu, 27 Oct 2011 16:12:26 +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 p9RGCQ9M014226;
	Thu, 27 Oct 2011 16:12:26 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGCQab014223;
	Thu, 27 Oct 2011 16:12:26 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271612.p9RGCQab014223@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 16:12:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226840 - head/sys/geom/eli
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:12:26 -0000

Author: pjd
Date: Thu Oct 27 16:12:25 2011
New Revision: 226840
URL: http://svn.freebsd.org/changeset/base/226840

Log:
  Before this change when GELI detected hardware crypto acceleration it will
  start only one worker thread. For software crypto it will start by default
  N worker threads where N is the number of available CPUs.
  
  This is not optimal if hardware crypto is AES-NI, which uses CPU for AES
  calculations.
  
  Change that to always start one worker thread for every available CPU.
  Number of worker threads per GELI provider can be easly reduced with
  kern.geom.eli.threads sysctl/tunable and even for software crypto it
  should be reduced when using more providers.
  
  While here, when number of threads exceeds number of CPUs avilable don't
  reduce this number, assume the user knows what he is doing.
  
  Reported by:	Yuri Karaban 
  MFC after:	3 days

Modified:
  head/sys/geom/eli/g_eli.c
  head/sys/geom/eli/g_eli.h

Modified: head/sys/geom/eli/g_eli.c
==============================================================================
--- head/sys/geom/eli/g_eli.c	Thu Oct 27 14:15:26 2011	(r226839)
+++ head/sys/geom/eli/g_eli.c	Thu Oct 27 16:12:25 2011	(r226840)
@@ -443,16 +443,15 @@ g_eli_worker(void *arg)
 	sc = wr->w_softc;
 #ifdef SMP
 	/* Before sched_bind() to a CPU, wait for all CPUs to go on-line. */
-	if (mp_ncpus > 1 && sc->sc_crypto == G_ELI_CRYPTO_SW &&
-	    g_eli_threads == 0) {
+	if (sc->sc_cpubind) {
 		while (!smp_started)
 			tsleep(wr, 0, "geli:smp", hz / 4);
 	}
 #endif
 	thread_lock(curthread);
 	sched_prio(curthread, PUSER);
-	if (sc->sc_crypto == G_ELI_CRYPTO_SW && g_eli_threads == 0)
-		sched_bind(curthread, wr->w_number);
+	if (sc->sc_cpubind)
+		sched_bind(curthread, wr->w_number % mp_ncpus);
 	thread_unlock(curthread);
 
 	G_ELI_DEBUG(1, "Thread %s started.", curthread->td_proc->p_comm);
@@ -813,11 +812,7 @@ g_eli_create(struct gctl_req *req, struc
 	threads = g_eli_threads;
 	if (threads == 0)
 		threads = mp_ncpus;
-	else if (threads > mp_ncpus) {
-		/* There is really no need for too many worker threads. */
-		threads = mp_ncpus;
-		G_ELI_DEBUG(0, "Reducing number of threads to %u.", threads);
-	}
+	sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus);
 	for (i = 0; i < threads; i++) {
 		if (g_eli_cpu_is_disabled(i)) {
 			G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.",
@@ -857,9 +852,6 @@ g_eli_create(struct gctl_req *req, struc
 			goto failed;
 		}
 		LIST_INSERT_HEAD(&sc->sc_workers, wr, w_next);
-		/* If we have hardware support, one thread is enough. */
-		if (sc->sc_crypto == G_ELI_CRYPTO_HW)
-			break;
 	}
 
 	/*

Modified: head/sys/geom/eli/g_eli.h
==============================================================================
--- head/sys/geom/eli/g_eli.h	Thu Oct 27 14:15:26 2011	(r226839)
+++ head/sys/geom/eli/g_eli.h	Thu Oct 27 16:12:25 2011	(r226840)
@@ -192,6 +192,7 @@ struct g_eli_softc {
 	size_t		 sc_sectorsize;
 	u_int		 sc_bytes_per_sector;
 	u_int		 sc_data_per_sector;
+	boolean_t	 sc_cpubind;
 
 	/* Only for software cryptography. */
 	struct bio_queue_head sc_queue;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:20:29 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 890BD106564A;
	Thu, 27 Oct 2011 16:20:29 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 78E7E8FC19;
	Thu, 27 Oct 2011 16:20:29 +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 p9RGKTHK014546;
	Thu, 27 Oct 2011 16:20:29 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGKTa4014544;
	Thu, 27 Oct 2011 16:20:29 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110271620.p9RGKTa4014544@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 27 Oct 2011 16:20:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226841 - head/usr.bin/getent
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:20:29 -0000

Author: ed
Date: Thu Oct 27 16:20:29 2011
New Revision: 226841
URL: http://svn.freebsd.org/changeset/base/226841

Log:
  Print INIT_PROCESS and LOGIN_PROCESS entries as well.
  
  Even though our implementation of utmpx never emits these types of
  records, they are part of POSIX. Do print them when they show up in the
  database files.
  
  While there, also print the type number of unsupported records.

Modified:
  head/usr.bin/getent/getent.c

Modified: head/usr.bin/getent/getent.c
==============================================================================
--- head/usr.bin/getent/getent.c	Thu Oct 27 16:12:25 2011	(r226840)
+++ head/usr.bin/getent/getent.c	Thu Oct 27 16:20:29 2011	(r226841)
@@ -600,13 +600,24 @@ utmpxprint(const struct utmpx *ut)
 		printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
 		    ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host);
 		break;
+	case INIT_PROCESS:
+		printf("init process: id=\"");
+		UTMPXPRINTID;
+		printf("\" pid=\"%d\"\n", ut->ut_pid);
+		break;
+	case LOGIN_PROCESS:
+		printf("login process: id=\"");
+		UTMPXPRINTID;
+		printf("\" pid=\"%d\" user=\"%s\" line=\"%s\" host=\"%s\"\n",
+		    ut->ut_pid, ut->ut_user, ut->ut_line, ut->ut_host);
+		break;
 	case DEAD_PROCESS:
 		printf("dead process: id=\"");
 		UTMPXPRINTID;
 		printf("\" pid=\"%d\"\n", ut->ut_pid);
 		break;
 	default:
-		printf("unknown record type\n");
+		printf("unknown record type %hu\n", ut->ut_type);
 		break;
 	}
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:22:18 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 455B8106564A;
	Thu, 27 Oct 2011 16:22:18 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3521A8FC0A;
	Thu, 27 Oct 2011 16:22: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 p9RGMILw014658;
	Thu, 27 Oct 2011 16:22:18 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGMIUQ014656;
	Thu, 27 Oct 2011 16:22:18 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271622.p9RGMIUQ014656@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 16:22:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226842 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:22:18 -0000

Author: pjd
Date: Thu Oct 27 16:22:17 2011
New Revision: 226842
URL: http://svn.freebsd.org/changeset/base/226842

Log:
  Correct comments.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Thu Oct 27 16:20:29 2011	(r226841)
+++ head/sbin/hastd/secondary.c	Thu Oct 27 16:22:17 2011	(r226842)
@@ -280,13 +280,13 @@ init_remote(struct hast_resource *res, s
 		nv_free(nvout);
 		exit(EX_CONFIG);
 	} else if (
-	    /* Is primary is out-of-date? */
+	    /* Is primary out-of-date? */
 	    (res->hr_secondary_localcnt > res->hr_primary_remotecnt &&
 	     res->hr_secondary_remotecnt == res->hr_primary_localcnt) ||
-	    /* Nodes are more or less in sync? */
+	    /* Are the nodes more or less in sync? */
 	    (res->hr_secondary_localcnt == res->hr_primary_remotecnt &&
 	     res->hr_secondary_remotecnt == res->hr_primary_localcnt) ||
-	    /* Is secondary is out-of-date? */
+	    /* Is secondary out-of-date? */
 	    (res->hr_secondary_localcnt == res->hr_primary_remotecnt &&
 	     res->hr_secondary_remotecnt < res->hr_primary_localcnt)) {
 		/*

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:39:17 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ACF201065672;
	Thu, 27 Oct 2011 16:39:17 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B20B8FC1B;
	Thu, 27 Oct 2011 16:39:17 +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 p9RGdHBU015333;
	Thu, 27 Oct 2011 16:39:17 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGdH4C015325;
	Thu, 27 Oct 2011 16:39:17 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110271639.p9RGdH4C015325@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 27 Oct 2011 16:39:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226843 - in head/sys: amd64/amd64 dev/xen/balloon
	i386/i386 i386/xen kern vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:39:17 -0000

Author: alc
Date: Thu Oct 27 16:39:17 2011
New Revision: 226843
URL: http://svn.freebsd.org/changeset/base/226843

Log:
  Eliminate vestiges of page coloring in VM_ALLOC_NOOBJ calls to
  vm_page_alloc().  While I'm here, for the sake of consistency, always
  specify the allocation class, such as VM_ALLOC_NORMAL, as the first of
  the flags.

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/amd64/amd64/uma_machdep.c
  head/sys/dev/xen/balloon/balloon.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/xen/pmap.c
  head/sys/kern/vfs_bio.c
  head/sys/vm/vm_kern.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/amd64/amd64/pmap.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -1635,7 +1635,6 @@ int
 pmap_pinit(pmap_t pmap)
 {
 	vm_page_t pml4pg;
-	static vm_pindex_t color;
 	int i;
 
 	PMAP_LOCK_INIT(pmap);
@@ -1643,8 +1642,8 @@ pmap_pinit(pmap_t pmap)
 	/*
 	 * allocate the page directory page
 	 */
-	while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ |
-	    VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL)
+	while ((pml4pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL |
+	    VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL)
 		VM_WAIT;
 
 	pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg));
@@ -2188,7 +2187,6 @@ get_pv_entry(pmap_t pmap, int try)
 {
 	static const struct timeval printinterval = { 60, 0 };
 	static struct timeval lastprint;
-	static vm_pindex_t colour;
 	struct vpgqueues *pq;
 	int bit, field;
 	pv_entry_t pv;
@@ -2228,7 +2226,7 @@ retry:
 		}
 	}
 	/* No free items, allocate another chunk */
-	m = vm_page_alloc(NULL, colour, (pq == &vm_page_queues[PQ_ACTIVE] ?
+	m = vm_page_alloc(NULL, 0, (pq == &vm_page_queues[PQ_ACTIVE] ?
 	    VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) | VM_ALLOC_NOOBJ |
 	    VM_ALLOC_WIRED);
 	if (m == NULL) {
@@ -2255,7 +2253,6 @@ retry:
 	}
 	PV_STAT(pc_chunk_count++);
 	PV_STAT(pc_chunk_allocs++);
-	colour++;
 	dump_add_page(m->phys_addr);
 	pc = (void *)PHYS_TO_DMAP(m->phys_addr);
 	pc->pc_pmap = pmap;

Modified: head/sys/amd64/amd64/uma_machdep.c
==============================================================================
--- head/sys/amd64/amd64/uma_machdep.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/amd64/amd64/uma_machdep.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 void *
 uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait)
 {
-	static vm_pindex_t colour;
 	vm_page_t m;
 	vm_paddr_t pa;
 	void *va;
@@ -50,13 +49,13 @@ uma_small_alloc(uma_zone_t zone, int byt
 
 	*flags = UMA_SLAB_PRIV;
 	if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT)
-		pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_WIRED;
+		pflags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED;
 	else
-		pflags = VM_ALLOC_SYSTEM | VM_ALLOC_WIRED;
+		pflags = VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED;
 	if (wait & M_ZERO)
 		pflags |= VM_ALLOC_ZERO;
 	for (;;) {
-		m = vm_page_alloc(NULL, colour++, pflags | VM_ALLOC_NOOBJ);
+		m = vm_page_alloc(NULL, 0, pflags);
 		if (m == NULL) {
 			if (wait & M_NOWAIT)
 				return (NULL);

Modified: head/sys/dev/xen/balloon/balloon.c
==============================================================================
--- head/sys/dev/xen/balloon/balloon.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/dev/xen/balloon/balloon.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -298,8 +298,7 @@ decrease_reservation(unsigned long nr_pa
 		nr_pages = ARRAY_SIZE(frame_list);
 
 	for (i = 0; i < nr_pages; i++) {
-		int color = 0;
-		if ((page = vm_page_alloc(NULL, color++, 
+		if ((page = vm_page_alloc(NULL, 0, 
 			    VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | 
 			    VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) {
 			nr_pages = i;

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/i386/i386/pmap.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -1720,7 +1720,6 @@ pmap_pinit(pmap_t pmap)
 {
 	vm_page_t m, ptdpg[NPGPTD];
 	vm_paddr_t pa;
-	static int color;
 	int i;
 
 	PMAP_LOCK_INIT(pmap);
@@ -1754,9 +1753,8 @@ pmap_pinit(pmap_t pmap)
 	 * allocate the page directory page(s)
 	 */
 	for (i = 0; i < NPGPTD;) {
-		m = vm_page_alloc(NULL, color++,
-		    VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
-		    VM_ALLOC_ZERO);
+		m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ |
+		    VM_ALLOC_WIRED | VM_ALLOC_ZERO);
 		if (m == NULL)
 			VM_WAIT;
 		else {
@@ -2274,7 +2272,6 @@ get_pv_entry(pmap_t pmap, int try)
 {
 	static const struct timeval printinterval = { 60, 0 };
 	static struct timeval lastprint;
-	static vm_pindex_t colour;
 	struct vpgqueues *pq;
 	int bit, field;
 	pv_entry_t pv;
@@ -2320,7 +2317,7 @@ retry:
 	 * queues lock.  If "pv_vafree" is currently non-empty, it will
 	 * remain non-empty until pmap_ptelist_alloc() completes.
 	 */
-	if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq ==
+	if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq ==
 	    &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) |
 	    VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) {
 		if (try) {
@@ -2346,7 +2343,6 @@ retry:
 	}
 	PV_STAT(pc_chunk_count++);
 	PV_STAT(pc_chunk_allocs++);
-	colour++;
 	pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree);
 	pmap_qenter((vm_offset_t)pc, &m, 1);
 	pc->pc_pmap = pmap;

Modified: head/sys/i386/xen/pmap.c
==============================================================================
--- head/sys/i386/xen/pmap.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/i386/xen/pmap.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -1475,7 +1475,6 @@ pmap_pinit(pmap_t pmap)
 {
 	vm_page_t m, ptdpg[NPGPTD + 1];
 	int npgptd = NPGPTD + 1;
-	static int color;
 	int i;
 
 #ifdef HAMFISTED_LOCKING
@@ -1507,9 +1506,8 @@ pmap_pinit(pmap_t pmap)
 	 * allocate the page directory page(s)
 	 */
 	for (i = 0; i < npgptd;) {
-		m = vm_page_alloc(NULL, color++,
-		    VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
-		    VM_ALLOC_ZERO);
+		m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ |
+		    VM_ALLOC_WIRED | VM_ALLOC_ZERO);
 		if (m == NULL)
 			VM_WAIT;
 		else {
@@ -2103,7 +2101,6 @@ get_pv_entry(pmap_t pmap, int try)
 {
 	static const struct timeval printinterval = { 60, 0 };
 	static struct timeval lastprint;
-	static vm_pindex_t colour;
 	struct vpgqueues *pq;
 	int bit, field;
 	pv_entry_t pv;
@@ -2149,7 +2146,7 @@ retry:
 	 * queues lock.  If "pv_vafree" is currently non-empty, it will
 	 * remain non-empty until pmap_ptelist_alloc() completes.
 	 */
-	if (pv_vafree == 0 || (m = vm_page_alloc(NULL, colour, (pq ==
+	if (pv_vafree == 0 || (m = vm_page_alloc(NULL, 0, (pq ==
 	    &vm_page_queues[PQ_ACTIVE] ? VM_ALLOC_SYSTEM : VM_ALLOC_NORMAL) |
 	    VM_ALLOC_NOOBJ | VM_ALLOC_WIRED)) == NULL) {
 		if (try) {
@@ -2175,7 +2172,6 @@ retry:
 	}
 	PV_STAT(pc_chunk_count++);
 	PV_STAT(pc_chunk_allocs++);
-	colour++;
 	pc = (struct pv_chunk *)pmap_ptelist_alloc(&pv_vafree);
 	pmap_qenter((vm_offset_t)pc, &m, 1);
 	if ((m->flags & PG_ZERO) == 0)

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/kern/vfs_bio.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -3760,10 +3760,9 @@ tryagain:
 		 * could interfere with paging I/O, no matter which
 		 * process we are.
 		 */
-		p = vm_page_alloc(NULL, pg >> PAGE_SHIFT, VM_ALLOC_NOOBJ |
-		    VM_ALLOC_SYSTEM | VM_ALLOC_WIRED |
-		    VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT));
-		if (!p) {
+		p = vm_page_alloc(NULL, 0, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ |
+		    VM_ALLOC_WIRED | VM_ALLOC_COUNT((to - pg) >> PAGE_SHIFT));
+		if (p == NULL) {
 			VM_WAIT;
 			goto tryagain;
 		}

Modified: head/sys/vm/vm_kern.c
==============================================================================
--- head/sys/vm/vm_kern.c	Thu Oct 27 16:22:17 2011	(r226842)
+++ head/sys/vm/vm_kern.c	Thu Oct 27 16:39:17 2011	(r226843)
@@ -543,7 +543,7 @@ kmem_init_zero_region(void)
 	 * zeros, while not using much more physical resources.
 	 */
 	addr = kmem_alloc_nofault(kernel_map, ZERO_REGION_SIZE);
-	m = vm_page_alloc(NULL, OFF_TO_IDX(addr - VM_MIN_KERNEL_ADDRESS),
+	m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL |
 	    VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | VM_ALLOC_ZERO);
 	if ((m->flags & PG_ZERO) == 0)
 		pmap_zero_page(m);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:47:09 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B83211065673;
	Thu, 27 Oct 2011 16:47:09 +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 8DCBC8FC0A;
	Thu, 27 Oct 2011 16:47:09 +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 p9RGl9Kk015641;
	Thu, 27 Oct 2011 16:47:09 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGl9uS015639;
	Thu, 27 Oct 2011 16:47:09 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110271647.p9RGl9uS015639@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 16:47:09 +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: r226844 - stable/8/sys/dev/dc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:47:09 -0000

Author: yongari
Date: Thu Oct 27 16:47:09 2011
New Revision: 226844
URL: http://svn.freebsd.org/changeset/base/226844

Log:
  MFC r226695-226696:
  r226695:
    Fix a regression introduced in r218832. For TX status check, driver
    should use a TX list DMA tag.
  
  r226696:
    Add missing bus_dmamap_sync() in setup frame transmit.

Modified:
  stable/8/sys/dev/dc/if_dc.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)

Modified: stable/8/sys/dev/dc/if_dc.c
==============================================================================
--- stable/8/sys/dev/dc/if_dc.c	Thu Oct 27 16:39:17 2011	(r226843)
+++ stable/8/sys/dev/dc/if_dc.c	Thu Oct 27 16:47:09 2011	(r226844)
@@ -1136,6 +1136,8 @@ dc_setfilt_21143(struct dc_softc *sc)
 	sp[41] = DC_SP_MAC(eaddr[2]);
 
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -1342,6 +1344,8 @@ dc_setfilt_xircom(struct dc_softc *sc)
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -2970,7 +2974,7 @@ dc_txeof(struct dc_softc *sc)
 	 * Go through our tx list and free mbufs for those
 	 * frames that have been transmitted.
 	 */
-	bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
 	    BUS_DMASYNC_POSTWRITE);
 	setup = 0;
 	for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 16:48:20 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E364106567C;
	Thu, 27 Oct 2011 16:48:20 +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 D7CE58FC08;
	Thu, 27 Oct 2011 16:48: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 p9RGmJc4015720;
	Thu, 27 Oct 2011 16:48:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RGmJ1q015718;
	Thu, 27 Oct 2011 16:48:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110271648.p9RGmJ1q015718@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 16:48: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: r226845 - stable/7/sys/dev/dc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 16:48:20 -0000

Author: yongari
Date: Thu Oct 27 16:48:19 2011
New Revision: 226845
URL: http://svn.freebsd.org/changeset/base/226845

Log:
  MFC r226695-226696:
  r226695:
    Fix a regression introduced in r218832. For TX status check, driver
    should use a TX list DMA tag.
  
  r226696:
    Add missing bus_dmamap_sync() in setup frame transmit.

Modified:
  stable/7/sys/dev/dc/if_dc.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/dc/if_dc.c
==============================================================================
--- stable/7/sys/dev/dc/if_dc.c	Thu Oct 27 16:47:09 2011	(r226844)
+++ stable/7/sys/dev/dc/if_dc.c	Thu Oct 27 16:48:19 2011	(r226845)
@@ -1137,6 +1137,8 @@ dc_setfilt_21143(struct dc_softc *sc)
 	sp[41] = DC_SP_MAC(eaddr[2]);
 
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -1343,6 +1345,8 @@ dc_setfilt_xircom(struct dc_softc *sc)
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_TX_ON);
 	DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_RX_ON);
 	sframe->dc_status = htole32(DC_TXSTAT_OWN);
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_PREREAD |
+	    BUS_DMASYNC_PREWRITE);
 	bus_dmamap_sync(sc->dc_stag, sc->dc_smap, BUS_DMASYNC_PREWRITE);
 	CSR_WRITE_4(sc, DC_TXSTART, 0xFFFFFFFF);
 
@@ -2971,7 +2975,7 @@ dc_txeof(struct dc_softc *sc)
 	 * Go through our tx list and free mbufs for those
 	 * frames that have been transmitted.
 	 */
-	bus_dmamap_sync(sc->dc_rx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
+	bus_dmamap_sync(sc->dc_tx_ltag, sc->dc_tx_lmap, BUS_DMASYNC_POSTREAD |
 	    BUS_DMASYNC_POSTWRITE);
 	setup = 0;
 	for (idx = sc->dc_cdata.dc_tx_cons; idx != sc->dc_cdata.dc_tx_prod;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 17:05:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 34277106566C;
	Thu, 27 Oct 2011 17:05:19 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A9188FC17;
	Thu, 27 Oct 2011 17:05: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 p9RH5Ilv016357;
	Thu, 27 Oct 2011 17:05:18 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RH5IH8016354;
	Thu, 27 Oct 2011 17:05:18 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110271705.p9RH5IH8016354@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 27 Oct 2011 17:05:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226846 - head/lib/libc/gen
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 17:05:19 -0000

Author: ed
Date: Thu Oct 27 17:05:18 2011
New Revision: 226846
URL: http://svn.freebsd.org/changeset/base/226846

Log:
  Make our utmpx more like System V.
  
  When booting the system, truncate the utx.active file, but do write the
  BOOT_TIME record into it afterwards. This allows one to obtain the boot
  time of the system as follows:
  
  	struct utmpx u1 = { .ut_type = BOOT_TIME }, *u2;
  
  	setutxent();
  	u2 = getutxid(&u1);
  
  Now, the boot time is stored in u2->ut_tv, just like on Linux and other
  systems.
  
  We don't open the utx.active file with O_EXLOCK. It's rather unlikely
  that other applications use this database at the same time and I want to
  prevent the possibility of deadlocks in init(8).
  
  Discussed with:	pluknet

Modified:
  head/lib/libc/gen/getutxent.3
  head/lib/libc/gen/pututxline.c

Modified: head/lib/libc/gen/getutxent.3
==============================================================================
--- head/lib/libc/gen/getutxent.3	Thu Oct 27 16:48:19 2011	(r226845)
+++ head/lib/libc/gen/getutxent.3	Thu Oct 27 17:05:18 2011	(r226846)
@@ -301,7 +301,6 @@ The value of
 determines which databases are modified.
 .Pp
 Entries of type
-.Dv BOOT_TIME ,
 .Dv SHUTDOWN_TIME ,
 .Dv OLD_TIME
 and
@@ -335,7 +334,7 @@ In addition, entries of type
 .Dv BOOT_TIME
 and
 .Dv SHUTDOWN_TIME
-will cause all entries in
+will cause all existing entries in
 .Pa /var/run/utx.active
 to be discarded.
 .Pp

Modified: head/lib/libc/gen/pututxline.c
==============================================================================
--- head/lib/libc/gen/pututxline.c	Thu Oct 27 16:48:19 2011	(r226845)
+++ head/lib/libc/gen/pututxline.c	Thu Oct 27 17:05:18 2011	(r226846)
@@ -86,6 +86,9 @@ utx_active_add(const struct futx *fu)
 		return (-1);
 	while (fread(&fe, sizeof(fe), 1, fp) == 1) {
 		switch (fe.fu_type) {
+		case BOOT_TIME:
+			/* Leave these intact. */
+			break;
 		case USER_PROCESS:
 		case INIT_PROCESS:
 		case LOGIN_PROCESS:
@@ -171,6 +174,19 @@ utx_active_remove(struct futx *fu)
 }
 
 static void
+utx_active_init(const struct futx *fu)
+{
+	int fd;
+
+	/* Initialize utx.active with a single BOOT_TIME record. */
+	fd = _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644);
+	if (fd < 0)
+		return;
+	_write(fd, fu, sizeof(*fu));
+	_close(fd);
+}
+
+static void
 utx_active_purge(void)
 {
 
@@ -277,9 +293,11 @@ pututxline(const struct utmpx *utmpx)
 
 	switch (fu.fu_type) {
 	case BOOT_TIME:
+		utx_active_init(&fu);
+		utx_lastlogin_upgrade();
+		break;
 	case SHUTDOWN_TIME:
 		utx_active_purge();
-		utx_lastlogin_upgrade();
 		break;
 	case OLD_TIME:
 	case NEW_TIME:

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 17:21:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 121D51065672;
	Thu, 27 Oct 2011 17:21:42 +0000 (UTC) (envelope-from ed@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DD58D8FC21;
	Thu, 27 Oct 2011 17:21:41 +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 p9RHLfk9016950;
	Thu, 27 Oct 2011 17:21:41 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RHLfZb016948;
	Thu, 27 Oct 2011 17:21:41 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201110271721.p9RHLfZb016948@svn.freebsd.org>
From: Ed Schouten 
Date: Thu, 27 Oct 2011 17:21:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226847 - head/lib/libc/gen
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 17:21:42 -0000

Author: ed
Date: Thu Oct 27 17:21:41 2011
New Revision: 226847
URL: http://svn.freebsd.org/changeset/base/226847

Log:
  Don't forget to kick the man page date.

Modified:
  head/lib/libc/gen/getutxent.3

Modified: head/lib/libc/gen/getutxent.3
==============================================================================
--- head/lib/libc/gen/getutxent.3	Thu Oct 27 17:05:18 2011	(r226846)
+++ head/lib/libc/gen/getutxent.3	Thu Oct 27 17:21:41 2011	(r226847)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 19, 2011
+.Dd October 27, 2011
 .Dt GETUTXENT 3
 .Os
 .Sh NAME

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 17:29:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CEAB5106566B;
	Thu, 27 Oct 2011 17:29:19 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BEC8E8FC15;
	Thu, 27 Oct 2011 17:29: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 p9RHTJK8017231;
	Thu, 27 Oct 2011 17:29:19 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RHTJUL017229;
	Thu, 27 Oct 2011 17:29:19 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110271729.p9RHTJUL017229@svn.freebsd.org>
From: Alan Cox 
Date: Thu, 27 Oct 2011 17:29:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226848 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 17:29:19 -0000

Author: alc
Date: Thu Oct 27 17:29:19 2011
New Revision: 226848
URL: http://svn.freebsd.org/changeset/base/226848

Log:
  Tidy up the comment at the head of vm_page_alloc, and mention that the
  returned page has the flag VPO_BUSY set.

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Thu Oct 27 17:21:41 2011	(r226847)
+++ head/sys/vm/vm_page.c	Thu Oct 27 17:29:19 2011	(r226848)
@@ -1286,8 +1286,9 @@ vm_page_cache_transfer(vm_object_t orig_
 /*
  *	vm_page_alloc:
  *
- *	Allocate and return a memory cell associated
- *	with this VM object/offset pair.
+ *	Allocate and return a page that is associated with the specified
+ *	object and offset pair.  By default, this page has the flag VPO_BUSY
+ *	set.
  *
  *	The caller must always specify an allocation class.
  *
@@ -1297,13 +1298,14 @@ vm_page_cache_transfer(vm_object_t orig_
  *	VM_ALLOC_INTERRUPT	interrupt time request
  *
  *	optional allocation flags:
- *	VM_ALLOC_ZERO		prefer a zeroed page
- *	VM_ALLOC_WIRED		wire the allocated page
- *	VM_ALLOC_NOOBJ		page is not associated with a vm object
- *	VM_ALLOC_NOBUSY		do not set the page busy
  *	VM_ALLOC_IFCACHED	return page only if it is cached
  *	VM_ALLOC_IFNOTCACHED	return NULL, do not reactivate if the page
  *				is cached
+ *	VM_ALLOC_NOBUSY		do not set the flag VPO_BUSY on the page
+ *	VM_ALLOC_NOOBJ		page is not associated with an object and
+ *				should not have the flag VPO_BUSY set
+ *	VM_ALLOC_WIRED		wire the allocated page
+ *	VM_ALLOC_ZERO		prefer a zeroed page
  *
  *	This routine may not sleep.
  */

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 17:43:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC278106566C;
	Thu, 27 Oct 2011 17:43:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AC1798FC1E;
	Thu, 27 Oct 2011 17:43:36 +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 p9RHhacZ017751;
	Thu, 27 Oct 2011 17:43:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RHhab9017749;
	Thu, 27 Oct 2011 17:43:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110271743.p9RHhab9017749@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 27 Oct 2011 17:43:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226849 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 17:43:36 -0000

Author: jhb
Date: Thu Oct 27 17:43:36 2011
New Revision: 226849
URL: http://svn.freebsd.org/changeset/base/226849

Log:
  Whitespace fix.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Oct 27 17:29:19 2011	(r226848)
+++ head/sys/kern/vfs_subr.c	Thu Oct 27 17:43:36 2011	(r226849)
@@ -1255,7 +1255,7 @@ vinvalbuf(struct vnode *vp, int flags, i
  *
  */
 static int
-flushbuflist( struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
+flushbuflist(struct bufv *bufv, int flags, struct bufobj *bo, int slpflag,
     int slptimeo)
 {
 	struct buf *bp, *nbp;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 17:44:51 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99CE01065670;
	Thu, 27 Oct 2011 17:44:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 89D0A8FC1D;
	Thu, 27 Oct 2011 17:44:51 +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 p9RHipZ7017838;
	Thu, 27 Oct 2011 17:44:51 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RHipAu017836;
	Thu, 27 Oct 2011 17:44:51 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201110271744.p9RHipAu017836@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 27 Oct 2011 17:44:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226850 - head/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 17:44:51 -0000

Author: jhb
Date: Thu Oct 27 17:44:51 2011
New Revision: 226850
URL: http://svn.freebsd.org/changeset/base/226850

Log:
  Sort function prototypes.

Modified:
  head/sys/sys/fcntl.h

Modified: head/sys/sys/fcntl.h
==============================================================================
--- head/sys/sys/fcntl.h	Thu Oct 27 17:43:36 2011	(r226849)
+++ head/sys/sys/fcntl.h	Thu Oct 27 17:44:51 2011	(r226850)
@@ -286,15 +286,15 @@ __BEGIN_DECLS
 int	open(const char *, int, ...);
 int	creat(const char *, mode_t);
 int	fcntl(int, int, ...);
+#if __BSD_VISIBLE
+int	flock(int, int);
+#endif
 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
 int	openat(int, const char *, int, ...);
 #endif
 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
 int	posix_fallocate(int, off_t, off_t);
 #endif
-#if __BSD_VISIBLE
-int	flock(int, int);
-#endif
 __END_DECLS
 #endif
 

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 18:45:02 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E92941065674;
	Thu, 27 Oct 2011 18:45:01 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D49E38FC0C;
	Thu, 27 Oct 2011 18:45:01 +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 p9RIj1Sb019919;
	Thu, 27 Oct 2011 18:45:01 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RIj1lJ019918;
	Thu, 27 Oct 2011 18:45:01 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271845.p9RIj1lJ019918@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 18:45:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226851 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 18:45:02 -0000

Author: pjd
Date: Thu Oct 27 18:45:01 2011
New Revision: 226851
URL: http://svn.freebsd.org/changeset/base/226851

Log:
  Delay resuid generation until first connection to secondary, not until first
  write. This way on first connection we will synchronize only the extents that
  were modified during the lifetime of primary node, not entire GEOM provider.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 17:44:51 2011	(r226850)
+++ head/sbin/hastd/primary.c	Thu Oct 27 18:45:01 2011	(r226851)
@@ -1159,13 +1159,10 @@ ggate_recv_thread(void *arg)
 			break;
 		case BIO_WRITE:
 			res->hr_stat_write++;
-			if (res->hr_resuid == 0) {
-				/*
-				 * This is first write, initialize localcnt and
-				 * resuid.
-				 */
+			if (res->hr_resuid == 0 &&
+			    res->hr_primary_localcnt == 0) {
+				/* This is first write. */
 				res->hr_primary_localcnt = 1;
-				(void)init_resuid(res);
 			}
 			for (;;) {
 				mtx_lock(&range_lock);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 18:49:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5FEB81065676;
	Thu, 27 Oct 2011 18:49:16 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4FBDC8FC08;
	Thu, 27 Oct 2011 18:49:16 +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 p9RInG4e020086;
	Thu, 27 Oct 2011 18:49:16 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RInGwA020084;
	Thu, 27 Oct 2011 18:49:16 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110271849.p9RInGwA020084@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 18:49:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226852 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 18:49:16 -0000

Author: pjd
Date: Thu Oct 27 18:49:16 2011
New Revision: 226852
URL: http://svn.freebsd.org/changeset/base/226852

Log:
  Monor cleanups.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 18:45:01 2011	(r226851)
+++ head/sbin/hastd/primary.c	Thu Oct 27 18:49:16 2011	(r226852)
@@ -1453,9 +1453,6 @@ remote_send_thread(void *arg)
 			/* Move failed request immediately to the done queue. */
 			goto done_queue;
 		}
-		pjdlog_debug(2,
-		    "remote_send: (%p) Moving request to the recv queue.",
-		    hio);
 		/*
 		 * Protect connection from disappearing.
 		 */
@@ -1470,6 +1467,9 @@ remote_send_thread(void *arg)
 		 * in different order we can get reply before we move request
 		 * to recv queue.
 		 */
+		pjdlog_debug(2,
+		    "remote_send: (%p) Moving request to the recv queue.",
+		    hio);
 		mtx_lock(&hio_recv_list_lock[ncomp]);
 		wakeup = TAILQ_EMPTY(&hio_recv_list[ncomp]);
 		TAILQ_INSERT_TAIL(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
@@ -1489,7 +1489,8 @@ remote_send_thread(void *arg)
 			 * it immediately to the done queue.
 			 */
 			mtx_lock(&hio_recv_list_lock[ncomp]);
-			TAILQ_REMOVE(&hio_recv_list[ncomp], hio, hio_next[ncomp]);
+			TAILQ_REMOVE(&hio_recv_list[ncomp], hio,
+			    hio_next[ncomp]);
 			mtx_unlock(&hio_recv_list_lock[ncomp]);
 			goto done_queue;
 		}
@@ -1599,16 +1600,16 @@ remote_recv_thread(void *arg)
 			nv_free(nv);
 			continue;
 		}
+		ggio = &hio->hio_ggio;
 		error = nv_get_int16(nv, "error");
 		if (error != 0) {
 			/* Request failed on remote side. */
 			hio->hio_errors[ncomp] = error;
-			reqlog(LOG_WARNING, 0, &hio->hio_ggio,
+			reqlog(LOG_WARNING, 0, ggio,
 			    "Remote request failed (%s): ", strerror(error));
 			nv_free(nv);
 			goto done_queue;
 		}
-		ggio = &hio->hio_ggio;
 		switch (ggio->gctl_cmd) {
 		case BIO_READ:
 			rw_rlock(&hio_remote_lock[ncomp]);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 19:18:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C651A1065675;
	Thu, 27 Oct 2011 19:18:54 +0000 (UTC)
	(envelope-from gabor@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B58658FC15;
	Thu, 27 Oct 2011 19:18:54 +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 p9RJIsU6021122;
	Thu, 27 Oct 2011 19:18:54 GMT (envelope-from gabor@svn.freebsd.org)
Received: (from gabor@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RJIsQ8021120;
	Thu, 27 Oct 2011 19:18:54 GMT (envelope-from gabor@svn.freebsd.org)
Message-Id: <201110271918.p9RJIsQ8021120@svn.freebsd.org>
From: Gabor Kovesdan 
Date: Thu, 27 Oct 2011 19:18:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226853 - stable/9/usr.bin/grep
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 19:18:54 -0000

Author: gabor
Date: Thu Oct 27 19:18:54 2011
New Revision: 226853
URL: http://svn.freebsd.org/changeset/base/226853

Log:
  MFC r226664:
  - Install BSD grep properly, based on the value of WITH_BSD_GREP
  
  Approved by:	re (kib)

Modified:
  stable/9/usr.bin/grep/Makefile
Directory Properties:
  stable/9/usr.bin/grep/   (props changed)

Modified: stable/9/usr.bin/grep/Makefile
==============================================================================
--- stable/9/usr.bin/grep/Makefile	Thu Oct 27 18:49:16 2011	(r226852)
+++ stable/9/usr.bin/grep/Makefile	Thu Oct 27 19:18:54 2011	(r226853)
@@ -53,12 +53,14 @@ DPADD=	${LIBZ} ${LIBLZMA}
 LDADD+=	-lbz2
 DPADD+=	${LIBBZ2}
 
+.if ${MK_BSD_GREP} == "yes"
 LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \
 	${BINDIR}/grep ${BINDIR}/bzegrep \
 	${BINDIR}/grep ${BINDIR}/bzfgrep
 MLINKS+= grep.1 bzgrep.1 \
 	 grep.1 bzegrep.1 \
 	 grep.1 bzfgrep.1
+.endif
 .else
 CFLAGS+= -DWITHOUT_BZIP2
 .endif

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:01:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49CDF106566B;
	Thu, 27 Oct 2011 20:01:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3916B8FC08;
	Thu, 27 Oct 2011 20:01:24 +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 p9RK1ONn022680;
	Thu, 27 Oct 2011 20:01:24 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RK1Og3022678;
	Thu, 27 Oct 2011 20:01:24 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272001.p9RK1Og3022678@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:01:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226854 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:01:24 -0000

Author: pjd
Date: Thu Oct 27 20:01:23 2011
New Revision: 226854
URL: http://svn.freebsd.org/changeset/base/226854

Log:
  - Eliminate the need for hio_nv.
  - Introduce hio_clear() function for clearing hio before returning it
    onto free queue.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Thu Oct 27 19:18:54 2011	(r226853)
+++ head/sbin/hastd/secondary.c	Thu Oct 27 20:01:23 2011	(r226854)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 struct hio {
 	uint64_t	 hio_seq;
 	int		 hio_error;
-	struct nv	*hio_nv;
 	void		*hio_data;
 	uint8_t		 hio_cmd;
 	uint64_t	 hio_offset;
@@ -126,6 +125,17 @@ static void *send_thread(void *arg);
 	TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next);		\
 	mtx_unlock(&hio_##name##_list_lock);				\
 } while (0)
+ 
+static void
+hio_clear(struct hio *hio)
+{
+
+	hio->hio_seq = 0;
+	hio->hio_error = 0;
+	hio->hio_cmd = HIO_UNDEF;
+	hio->hio_offset = 0;
+	hio->hio_length = 0;
+}
 
 static void
 init_environment(void)
@@ -156,13 +166,13 @@ init_environment(void)
 			    "Unable to allocate memory (%zu bytes) for hio request.",
 			    sizeof(*hio));
 		}
-		hio->hio_error = 0;
 		hio->hio_data = malloc(MAXPHYS);
 		if (hio->hio_data == NULL) {
 			pjdlog_exitx(EX_TEMPFAIL,
 			    "Unable to allocate memory (%zu bytes) for gctl_data.",
 			    (size_t)MAXPHYS);
 		}
+		hio_clear(hio);
 		TAILQ_INSERT_HEAD(&hio_free_list, hio, hio_next);
 	}
 }
@@ -268,6 +278,7 @@ init_remote(struct hast_resource *res, s
 	} else if (res->hr_resuid != resuid) {
 		char errmsg[256];
 
+		free(map);
 		(void)snprintf(errmsg, sizeof(errmsg),
 		    "Resource unique ID mismatch (primary=%ju, secondary=%ju).",
 		    (uintmax_t)resuid, (uintmax_t)res->hr_resuid);
@@ -315,11 +326,17 @@ init_remote(struct hast_resource *res, s
 		/*
 		 * Not good, we have split-brain condition.
 		 */
+		free(map);
 		pjdlog_error("Split-brain detected, exiting.");
 		nv_add_string(nvout, "Split-brain condition!", "errmsg");
-		free(map);
-		map = NULL;
-		mapsize = 0;
+		if (hast_proto_send(res, res->hr_remotein, nvout, NULL, 0) < 0) {
+			pjdlog_exit(EX_TEMPFAIL, "Unable to send response to %s",
+			    res->hr_remoteaddr);
+		}
+		nv_free(nvout);
+		/* Exit on split-brain. */
+		event_send(res, EVENT_SPLITBRAIN);
+		exit(EX_CONFIG);
 	} else /* if (res->hr_secondary_localcnt < res->hr_primary_remotecnt ||
 	    res->hr_primary_localcnt < res->hr_secondary_remotecnt) */ {
 		/*
@@ -358,12 +375,6 @@ init_remote(struct hast_resource *res, s
 	if (proto_recv(res->hr_remotein, NULL, 0) == -1)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
 #endif
-	if (res->hr_secondary_localcnt > res->hr_primary_remotecnt &&
-	     res->hr_primary_localcnt > res->hr_secondary_remotecnt) {
-		/* Exit on split-brain. */
-		event_send(res, EVENT_SPLITBRAIN);
-		exit(EX_CONFIG);
-	}
 }
 
 void
@@ -508,15 +519,23 @@ reqlog(int loglevel, int debuglevel, int
 }
 
 static int
-requnpack(struct hast_resource *res, struct hio *hio)
+requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv)
 {
 
-	hio->hio_cmd = nv_get_uint8(hio->hio_nv, "cmd");
+	hio->hio_cmd = nv_get_uint8(nv, "cmd");
 	if (hio->hio_cmd == 0) {
 		pjdlog_error("Header contains no 'cmd' field.");
 		hio->hio_error = EINVAL;
 		goto end;
 	}
+	if (hio->hio_cmd != HIO_KEEPALIVE) {
+		hio->hio_seq = nv_get_uint64(nv, "seq");
+		if (hio->hio_seq == 0) {
+			pjdlog_error("Header contains no 'seq' field.");
+			hio->hio_error = EINVAL;
+			goto end;
+		}
+	}
 	switch (hio->hio_cmd) {
 	case HIO_FLUSH:
 	case HIO_KEEPALIVE:
@@ -524,14 +543,14 @@ requnpack(struct hast_resource *res, str
 	case HIO_READ:
 	case HIO_WRITE:
 	case HIO_DELETE:
-		hio->hio_offset = nv_get_uint64(hio->hio_nv, "offset");
-		if (nv_error(hio->hio_nv) != 0) {
+		hio->hio_offset = nv_get_uint64(nv, "offset");
+		if (nv_error(nv) != 0) {
 			pjdlog_error("Header is missing 'offset' field.");
 			hio->hio_error = EINVAL;
 			goto end;
 		}
-		hio->hio_length = nv_get_uint64(hio->hio_nv, "length");
-		if (nv_error(hio->hio_nv) != 0) {
+		hio->hio_length = nv_get_uint64(nv, "length");
+		if (nv_error(nv) != 0) {
 			pjdlog_error("Header is missing 'length' field.");
 			hio->hio_error = EINVAL;
 			goto end;
@@ -600,16 +619,18 @@ recv_thread(void *arg)
 {
 	struct hast_resource *res = arg;
 	struct hio *hio;
+	struct nv *nv;
 
 	for (;;) {
 		pjdlog_debug(2, "recv: Taking free request.");
 		QUEUE_TAKE(free, hio);
 		pjdlog_debug(2, "recv: (%p) Got request.", hio);
-		if (hast_proto_recv_hdr(res->hr_remotein, &hio->hio_nv) < 0) {
+		if (hast_proto_recv_hdr(res->hr_remotein, &nv) < 0) {
 			secondary_exit(EX_TEMPFAIL,
 			    "Unable to receive request header");
 		}
-		if (requnpack(res, hio) != 0) {
+		if (requnpack(res, hio, nv) != 0) {
+			nv_free(nv);
 			pjdlog_debug(2,
 			    "recv: (%p) Moving request to the send queue.",
 			    hio);
@@ -629,23 +650,30 @@ recv_thread(void *arg)
 		case HIO_FLUSH:
 			res->hr_stat_flush++;
 			break;
+		case HIO_KEEPALIVE:
+			break;
+		default:
+			PJDLOG_ABORT("Unexpected command (cmd=%hhu).",
+			    hio->hio_cmd);
 		}
 		reqlog(LOG_DEBUG, 2, -1, hio,
 		    "recv: (%p) Got request header: ", hio);
 		if (hio->hio_cmd == HIO_KEEPALIVE) {
+			nv_free(nv);
 			pjdlog_debug(2,
 			    "recv: (%p) Moving request to the free queue.",
 			    hio);
-			nv_free(hio->hio_nv);
+			hio_clear(hio);
 			QUEUE_INSERT(free, hio);
 			continue;
 		} else if (hio->hio_cmd == HIO_WRITE) {
-			if (hast_proto_recv_data(res, res->hr_remotein,
-			    hio->hio_nv, hio->hio_data, MAXPHYS) < 0) {
+			if (hast_proto_recv_data(res, res->hr_remotein, nv,
+			    hio->hio_data, MAXPHYS) < 0) {
 				secondary_exit(EX_TEMPFAIL,
 				    "Unable to receive request data");
 			}
 		}
+		nv_free(nv);
 		pjdlog_debug(2, "recv: (%p) Moving request to the disk queue.",
 		    hio);
 		QUEUE_INSERT(disk, hio);
@@ -752,6 +780,9 @@ disk_thread(void *arg)
 				hio->hio_error = 0;
 			}
 			break;
+		default:
+			PJDLOG_ABORT("Unexpected command (cmd=%hhu).",
+			    hio->hio_cmd);
 		}
 		if (logerror && hio->hio_error != 0) {
 			reqlog(LOG_ERR, 0, hio->hio_error, hio,
@@ -783,7 +814,7 @@ send_thread(void *arg)
 		reqlog(LOG_DEBUG, 2, -1, hio, "send: (%p) Got request: ", hio);
 		nvout = nv_alloc();
 		/* Copy sequence number. */
-		nv_add_uint64(nvout, nv_get_uint64(hio->hio_nv, "seq"), "seq");
+		nv_add_uint64(nvout, hio->hio_seq, "seq");
 		switch (hio->hio_cmd) {
 		case HIO_READ:
 			if (hio->hio_error == 0) {
@@ -814,8 +845,7 @@ send_thread(void *arg)
 		nv_free(nvout);
 		pjdlog_debug(2, "send: (%p) Moving request to the free queue.",
 		    hio);
-		nv_free(hio->hio_nv);
-		hio->hio_error = 0;
+		hio_clear(hio);
 		QUEUE_INSERT(free, hio);
 	}
 	/* NOTREACHED */

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:10:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81172106564A;
	Thu, 27 Oct 2011 20:10:21 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 713FB8FC0C;
	Thu, 27 Oct 2011 20:10:21 +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 p9RKALPV023062;
	Thu, 27 Oct 2011 20:10:21 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKALhH023060;
	Thu, 27 Oct 2011 20:10:21 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272010.p9RKALhH023060@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:10:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226855 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:10:21 -0000

Author: pjd
Date: Thu Oct 27 20:10:21 2011
New Revision: 226855
URL: http://svn.freebsd.org/changeset/base/226855

Log:
  Improve comment so it doesn't suggest race is possible, but that we handle
  the race.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 20:01:23 2011	(r226854)
+++ head/sbin/hastd/primary.c	Thu Oct 27 20:10:21 2011	(r226855)
@@ -1021,7 +1021,7 @@ remote_close(struct hast_resource *res, 
 
 	rw_wlock(&hio_remote_lock[ncomp]);
 	/*
-	 * A race is possible between dropping rlock and acquiring wlock -
+	 * Check for a race between dropping rlock and acquiring wlock -
 	 * another thread can close connection in-between.
 	 */
 	if (!ISCONNECTED(res, ncomp)) {

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:13:39 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8F028106564A;
	Thu, 27 Oct 2011 20:13:39 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7F48B8FC0A;
	Thu, 27 Oct 2011 20:13:39 +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 p9RKDdkA023248;
	Thu, 27 Oct 2011 20:13:39 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKDdP3023246;
	Thu, 27 Oct 2011 20:13:39 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272013.p9RKDdP3023246@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:13:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226856 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:13:39 -0000

Author: pjd
Date: Thu Oct 27 20:13:39 2011
New Revision: 226856
URL: http://svn.freebsd.org/changeset/base/226856

Log:
  Reduce indentation.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 20:10:21 2011	(r226855)
+++ head/sbin/hastd/primary.c	Thu Oct 27 20:13:39 2011	(r226856)
@@ -1319,18 +1319,18 @@ local_send_thread(void *arg)
 			}
 			break;
 		}
-		if (refcount_release(&hio->hio_countdown)) {
-			if (ISSYNCREQ(hio)) {
-				mtx_lock(&sync_lock);
-				SYNCREQDONE(hio);
-				mtx_unlock(&sync_lock);
-				cv_signal(&sync_cond);
-			} else {
-				pjdlog_debug(2,
-				    "local_send: (%p) Moving request to the done queue.",
-				    hio);
-				QUEUE_INSERT2(hio, done);
-			}
+		if (!refcount_release(&hio->hio_countdown))
+			continue;
+		if (ISSYNCREQ(hio)) {
+			mtx_lock(&sync_lock);
+			SYNCREQDONE(hio);
+			mtx_unlock(&sync_lock);
+			cv_signal(&sync_cond);
+		} else {
+			pjdlog_debug(2,
+			    "local_send: (%p) Moving request to the done queue.",
+			    hio);
+			QUEUE_INSERT2(hio, done);
 		}
 	}
 	/* NOTREACHED */
@@ -1640,18 +1640,18 @@ remote_recv_thread(void *arg)
 		hio->hio_errors[ncomp] = 0;
 		nv_free(nv);
 done_queue:
-		if (refcount_release(&hio->hio_countdown)) {
-			if (ISSYNCREQ(hio)) {
-				mtx_lock(&sync_lock);
-				SYNCREQDONE(hio);
-				mtx_unlock(&sync_lock);
-				cv_signal(&sync_cond);
-			} else {
-				pjdlog_debug(2,
-				    "remote_recv: (%p) Moving request to the done queue.",
-				    hio);
-				QUEUE_INSERT2(hio, done);
-			}
+		if (!refcount_release(&hio->hio_countdown))
+			continue;
+		if (ISSYNCREQ(hio)) {
+			mtx_lock(&sync_lock);
+			SYNCREQDONE(hio);
+			mtx_unlock(&sync_lock);
+			cv_signal(&sync_cond);
+		} else {
+			pjdlog_debug(2,
+			    "remote_recv: (%p) Moving request to the done queue.",
+			    hio);
+			QUEUE_INSERT2(hio, done);
 		}
 	}
 	/* NOTREACHED */

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:15:37 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C6A36106566B;
	Thu, 27 Oct 2011 20:15:37 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B6FA08FC0A;
	Thu, 27 Oct 2011 20:15:37 +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 p9RKFbPl023353;
	Thu, 27 Oct 2011 20:15:37 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKFbJ1023351;
	Thu, 27 Oct 2011 20:15:37 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272015.p9RKFbJ1023351@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:15:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226857 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:15:37 -0000

Author: pjd
Date: Thu Oct 27 20:15:37 2011
New Revision: 226857
URL: http://svn.freebsd.org/changeset/base/226857

Log:
  Minor cleanups.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 20:13:39 2011	(r226856)
+++ head/sbin/hastd/primary.c	Thu Oct 27 20:15:37 2011	(r226857)
@@ -1556,6 +1556,7 @@ remote_recv_thread(void *arg)
 			    &hio_recv_list_lock[ncomp]);
 		}
 		mtx_unlock(&hio_recv_list_lock[ncomp]);
+
 		rw_rlock(&hio_remote_lock[ncomp]);
 		if (!ISCONNECTED(res, ncomp)) {
 			rw_unlock(&hio_remote_lock[ncomp]);
@@ -1963,7 +1964,7 @@ sync_thread(void *arg __unused)
 		}
 		mtx_unlock(&metadata_lock);
 
-		pjdlog_debug(2, "sync: (%p) Moving request to the send queues.",
+		pjdlog_debug(2, "sync: (%p) Moving request to the send queue.",
 		    hio);
 		refcount_init(&hio->hio_countdown, 1);
 		QUEUE_INSERT1(hio, send, ncomp);

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:23:03 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CF8841065670;
	Thu, 27 Oct 2011 20:23:03 +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 BECD68FC08;
	Thu, 27 Oct 2011 20:23:03 +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 p9RKN3qf023661;
	Thu, 27 Oct 2011 20:23:03 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKN3ad023659;
	Thu, 27 Oct 2011 20:23:03 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201110272023.p9RKN3ad023659@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Thu, 27 Oct 2011 20:23:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226858 - stable/9/usr.sbin/boot0cfg
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:23:03 -0000

Author: ae
Date: Thu Oct 27 20:23:03 2011
New Revision: 226858
URL: http://svn.freebsd.org/changeset/base/226858

Log:
  MFC r226714:
    Fix argument name. This fixes EINVAL when boot0cfg uses GEOM_PART'
    control interface.
  
  Approved by:	re (kib)

Modified:
  stable/9/usr.sbin/boot0cfg/boot0cfg.c
Directory Properties:
  stable/9/usr.sbin/boot0cfg/   (props changed)

Modified: stable/9/usr.sbin/boot0cfg/boot0cfg.c
==============================================================================
--- stable/9/usr.sbin/boot0cfg/boot0cfg.c	Thu Oct 27 20:15:37 2011	(r226857)
+++ stable/9/usr.sbin/boot0cfg/boot0cfg.c	Thu Oct 27 20:23:03 2011	(r226858)
@@ -378,7 +378,7 @@ write_mbr(const char *fname, int flags, 
     }
     grq = gctl_get_handle();
     gctl_ro_param(grq, "class", -1, "PART");
-    gctl_ro_param(grq, "geom", -1, pname);
+    gctl_ro_param(grq, "arg0", -1, pname);
     gctl_ro_param(grq, "verb", -1, "bootcode");
     gctl_ro_param(grq, "bootcode", mbr_size, mbr);
     gctl_ro_param(grq, "flags", -1, "C");

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:32:57 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E6D0106564A;
	Thu, 27 Oct 2011 20:32:57 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8DCA28FC0A;
	Thu, 27 Oct 2011 20:32:57 +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 p9RKWvAd024011;
	Thu, 27 Oct 2011 20:32:57 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKWvwl024007;
	Thu, 27 Oct 2011 20:32:57 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272032.p9RKWvwl024007@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:32:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226859 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:32:57 -0000

Author: pjd
Date: Thu Oct 27 20:32:57 2011
New Revision: 226859
URL: http://svn.freebsd.org/changeset/base/226859

Log:
  Implement 'async' mode for HAST.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/hast.conf.5
  head/sbin/hastd/parse.y
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/hast.conf.5
==============================================================================
--- head/sbin/hastd/hast.conf.5	Thu Oct 27 20:23:03 2011	(r226858)
+++ head/sbin/hastd/hast.conf.5	Thu Oct 27 20:32:57 2011	(r226859)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 20, 2011
+.Dd October 27, 2011
 .Dt HAST.CONF 5
 .Os
 .Sh NAME
@@ -224,9 +224,6 @@ completes.
 This is the fastest and the most dangerous replication mode.
 This mode should be used when replicating to a distant node where
 latency is too high for other modes.
-The
-.Ic async
-replication mode is currently not implemented.
 .El
 .It Ic checksum Aq algorithm
 .Pp

Modified: head/sbin/hastd/parse.y
==============================================================================
--- head/sbin/hastd/parse.y	Thu Oct 27 20:23:03 2011	(r226858)
+++ head/sbin/hastd/parse.y	Thu Oct 27 20:32:57 2011	(r226859)
@@ -301,11 +301,9 @@ yy_config_parse(const char *config, bool
 			 */
 			curres->hr_replication = depth0_replication;
 		}
-		if (curres->hr_replication == HAST_REPLICATION_MEMSYNC ||
-		    curres->hr_replication == HAST_REPLICATION_ASYNC) {
+		if (curres->hr_replication == HAST_REPLICATION_MEMSYNC) {
 			pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".",
-			    curres->hr_replication == HAST_REPLICATION_MEMSYNC ?
-			    "memsync" : "async", "fullsync");
+			    "memsync", "fullsync");
 			curres->hr_replication = HAST_REPLICATION_FULLSYNC;
 		}
 		if (curres->hr_checksum == -1) {

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Thu Oct 27 20:23:03 2011	(r226858)
+++ head/sbin/hastd/primary.c	Thu Oct 27 20:32:57 2011	(r226859)
@@ -89,6 +89,15 @@ struct hio {
 	 * Structure used to communicate with GEOM Gate class.
 	 */
 	struct g_gate_ctl_io	 hio_ggio;
+	/*
+	 * Request was already confirmed to GEOM Gate.
+	 */
+	bool			 hio_done;
+	/*
+	 * Remember replication from the time the request was initiated,
+	 * so we won't get confused when replication changes on reload.
+	 */
+	int			 hio_replication;
 	TAILQ_ENTRY(hio)	*hio_next;
 };
 #define	hio_free_next	hio_next[0]
@@ -1056,6 +1065,42 @@ remote_close(struct hast_resource *res, 
 }
 
 /*
+ * Acknowledge write completion to the kernel, but don't update activemap yet.
+ */
+static void
+write_complete(struct hast_resource *res, struct hio *hio)
+{
+	struct g_gate_ctl_io *ggio;
+	unsigned int ncomp;
+
+	PJDLOG_ASSERT(!hio->hio_done);
+
+	ggio = &hio->hio_ggio;
+	PJDLOG_ASSERT(ggio->gctl_cmd == BIO_WRITE);
+
+	/*
+	 * Bump local count if this is first write after
+	 * connection failure with remote node.
+	 */
+	ncomp = 1;
+	rw_rlock(&hio_remote_lock[ncomp]);
+	if (!ISCONNECTED(res, ncomp)) {
+		mtx_lock(&metadata_lock);
+		if (res->hr_primary_localcnt == res->hr_secondary_remotecnt) {
+			res->hr_primary_localcnt++;
+			pjdlog_debug(1, "Increasing localcnt to %ju.",
+			    (uintmax_t)res->hr_primary_localcnt);
+			(void)metadata_write(res);
+		}
+		mtx_unlock(&metadata_lock);
+	}
+	rw_unlock(&hio_remote_lock[ncomp]);
+	if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) < 0)
+		primary_exit(EX_OSERR, "G_GATE_CMD_DONE failed");
+	hio->hio_done = true;
+}
+
+/*
  * Thread receives ggate I/O requests from the kernel and passes them to
  * appropriate threads:
  * WRITE - always goes to both local_send and remote_send threads
@@ -1075,8 +1120,6 @@ ggate_recv_thread(void *arg)
 	unsigned int ii, ncomp, ncomps;
 	int error;
 
-	ncomps = HAST_NCOMPONENTS;
-
 	for (;;) {
 		pjdlog_debug(2, "ggate_recv: Taking free request.");
 		QUEUE_TAKE2(hio, free);
@@ -1085,6 +1128,8 @@ ggate_recv_thread(void *arg)
 		ggio->gctl_unit = res->hr_ggateunit;
 		ggio->gctl_length = MAXPHYS;
 		ggio->gctl_error = 0;
+		hio->hio_done = false;
+		hio->hio_replication = res->hr_replication;
 		pjdlog_debug(2,
 		    "ggate_recv: (%p) Waiting for request from the kernel.",
 		    hio);
@@ -1117,11 +1162,16 @@ ggate_recv_thread(void *arg)
 			primary_exitx(EX_OSERR, "G_GATE_CMD_START failed: %s.",
 			    strerror(error));
 		}
+
+		ncomp = 0;
+		ncomps = HAST_NCOMPONENTS;
+
 		for (ii = 0; ii < ncomps; ii++)
 			hio->hio_errors[ii] = EINVAL;
 		reqlog(LOG_DEBUG, 2, ggio,
 		    "ggate_recv: (%p) Request received from the kernel: ",
 		    hio);
+
 		/*
 		 * Inform all components about new write request.
 		 * For read request prefer local component unless the given
@@ -1130,10 +1180,7 @@ ggate_recv_thread(void *arg)
 		switch (ggio->gctl_cmd) {
 		case BIO_READ:
 			res->hr_stat_read++;
-			pjdlog_debug(2,
-			    "ggate_recv: (%p) Moving request to the send queue.",
-			    hio);
-			refcount_init(&hio->hio_countdown, 1);
+			ncomps = 1;
 			mtx_lock(&metadata_lock);
 			if (res->hr_syncsrc == HAST_SYNCSRC_UNDEF ||
 			    res->hr_syncsrc == HAST_SYNCSRC_PRIMARY) {
@@ -1155,7 +1202,6 @@ ggate_recv_thread(void *arg)
 				ncomp = 1;
 			}
 			mtx_unlock(&metadata_lock);
-			QUEUE_INSERT1(hio, send, ncomp);
 			break;
 		case BIO_WRITE:
 			res->hr_stat_write++;
@@ -1198,25 +1244,19 @@ ggate_recv_thread(void *arg)
 				(void)hast_activemap_flush(res);
 			}
 			mtx_unlock(&res->hr_amp_lock);
-			/* FALLTHROUGH */
+			break;
 		case BIO_DELETE:
+			res->hr_stat_delete++;
+			break;
 		case BIO_FLUSH:
-			switch (ggio->gctl_cmd) {
-			case BIO_DELETE:
-				res->hr_stat_delete++;
-				break;
-			case BIO_FLUSH:
-				res->hr_stat_flush++;
-				break;
-			}
-			pjdlog_debug(2,
-			    "ggate_recv: (%p) Moving request to the send queue.",
-			    hio);
-			refcount_init(&hio->hio_countdown, ncomps);
-			for (ii = 0; ii < ncomps; ii++)
-				QUEUE_INSERT1(hio, send, ii);
+			res->hr_stat_flush++;
 			break;
 		}
+		pjdlog_debug(2,
+		    "ggate_recv: (%p) Moving request to the send queues.", hio);
+		refcount_init(&hio->hio_countdown, ncomps);
+		for (ii = ncomp; ii < ncomps; ii++)
+			QUEUE_INSERT1(hio, send, ii);
 	}
 	/* NOTREACHED */
 	return (NULL);
@@ -1285,6 +1325,11 @@ local_send_thread(void *arg)
 				    ret, (intmax_t)ggio->gctl_length);
 			} else {
 				hio->hio_errors[ncomp] = 0;
+				if (hio->hio_replication ==
+				    HAST_REPLICATION_ASYNC) {
+					ggio->gctl_error = 0;
+					write_complete(res, hio);
+				}
 			}
 			break;
 		case BIO_DELETE:
@@ -1668,7 +1713,7 @@ ggate_send_thread(void *arg)
 	struct hast_resource *res = arg;
 	struct g_gate_ctl_io *ggio;
 	struct hio *hio;
-	unsigned int ii, ncomp, ncomps;
+	unsigned int ii, ncomps;
 
 	ncomps = HAST_NCOMPONENTS;
 
@@ -1718,28 +1763,14 @@ ggate_send_thread(void *arg)
 			if (range_sync_wait)
 				cv_signal(&range_sync_cond);
 			mtx_unlock(&range_lock);
-			/*
-			 * Bump local count if this is first write after
-			 * connection failure with remote node.
-			 */
-			ncomp = 1;
-			rw_rlock(&hio_remote_lock[ncomp]);
-			if (!ISCONNECTED(res, ncomp)) {
-				mtx_lock(&metadata_lock);
-				if (res->hr_primary_localcnt ==
-				    res->hr_secondary_remotecnt) {
-					res->hr_primary_localcnt++;
-					pjdlog_debug(1,
-					    "Increasing localcnt to %ju.",
-					    (uintmax_t)res->hr_primary_localcnt);
-					(void)metadata_write(res);
-				}
-				mtx_unlock(&metadata_lock);
+			if (!hio->hio_done)
+				write_complete(res, hio);
+		} else {
+			if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) < 0) {
+				primary_exit(EX_OSERR,
+				    "G_GATE_CMD_DONE failed");
 			}
-			rw_unlock(&hio_remote_lock[ncomp]);
 		}
-		if (ioctl(res->hr_ggatefd, G_GATE_CMD_DONE, ggio) < 0)
-			primary_exit(EX_OSERR, "G_GATE_CMD_DONE failed");
 		pjdlog_debug(2,
 		    "ggate_send: (%p) Moving request to the free queue.", hio);
 		QUEUE_INSERT2(hio, free);
@@ -1892,6 +1923,8 @@ sync_thread(void *arg __unused)
 		ggio->gctl_offset = offset;
 		ggio->gctl_length = length;
 		ggio->gctl_error = 0;
+		hio->hio_done = false;
+		hio->hio_replication = res->hr_replication;
 		for (ii = 0; ii < ncomps; ii++)
 			hio->hio_errors[ii] = EINVAL;
 		reqlog(LOG_DEBUG, 2, ggio, "sync: (%p) Sending sync request: ",
@@ -2080,8 +2113,7 @@ primary_config_reload(struct hast_resour
 	 * Don't bother if we need to reconnect.
 	 */
 	if ((modified & MODIFIED_TIMEOUT) != 0 &&
-	    (modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR |
-	    MODIFIED_REPLICATION)) == 0) {
+	    (modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR)) == 0) {
 		for (ii = 0; ii < ncomps; ii++) {
 			if (!ISREMOTE(ii))
 				continue;
@@ -2103,8 +2135,7 @@ primary_config_reload(struct hast_resour
 			}
 		}
 	}
-	if ((modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR |
-	    MODIFIED_REPLICATION)) != 0) {
+	if ((modified & (MODIFIED_REMOTEADDR | MODIFIED_SOURCEADDR)) != 0) {
 		for (ii = 0; ii < ncomps; ii++) {
 			if (!ISREMOTE(ii))
 				continue;

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:35:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 81ABC106566C;
	Thu, 27 Oct 2011 20:35:21 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 720738FC16;
	Thu, 27 Oct 2011 20:35:21 +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 p9RKZLX3024142;
	Thu, 27 Oct 2011 20:35:21 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKZLh3024140;
	Thu, 27 Oct 2011 20:35:21 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201110272035.p9RKZLh3024140@svn.freebsd.org>
From: Gavin Atkinson 
Date: Thu, 27 Oct 2011 20:35:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226860 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:35:21 -0000

Author: gavin
Date: Thu Oct 27 20:35:21 2011
New Revision: 226860
URL: http://svn.freebsd.org/changeset/base/226860

Log:
  Update the example rules in devfs.conf to reflect the changes since ATA_CAM.
  While here, add another example rule, as many applications these days
  expect to find /dev/dvd instead.
  
  MFC after:	3 days

Modified:
  head/etc/devfs.conf

Modified: head/etc/devfs.conf
==============================================================================
--- head/etc/devfs.conf	Thu Oct 27 20:32:57 2011	(r226859)
+++ head/etc/devfs.conf	Thu Oct 27 20:35:21 2011	(r226860)
@@ -35,7 +35,8 @@
 #link	ttyv0	vga
 
 # Commonly used by many ports
-#link	acd0	cdrom
+#link	cd0	cdrom
+#link	cd0	dvd
 
 # Allow a user in the wheel group to query the smb0 device
 #perm	smb0	0660

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:35:26 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3F9D11065672
	for ; Thu, 27 Oct 2011 20:35:26 +0000 (UTC)
	(envelope-from ronald-freebsd8@klop.yi.org)
Received: from smtp-out1.tiscali.nl (smtp-out1.tiscali.nl [195.241.79.176])
	by mx1.freebsd.org (Postfix) with ESMTP id C960B8FC1A
	for ; Thu, 27 Oct 2011 20:35:25 +0000 (UTC)
Received: from [212.182.167.131] (helo=sjakie.klop.ws)
	by smtp-out1.tiscali.nl with esmtp (Exim)
	(envelope-from )
	id 1RJWfc-00048u-Mb; Thu, 27 Oct 2011 22:35:24 +0200
Received: from 212-182-167-131.ip.telfort.nl (localhost [127.0.0.1])
	by sjakie.klop.ws (Postfix) with ESMTP id EB7F793CF;
	Thu, 27 Oct 2011 22:35:16 +0200 (CEST)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org, "Hiroki Sato" 
References: <201110260211.p9Q2BStn027230@svn.freebsd.org>
Date: Thu, 27 Oct 2011 22:35:15 +0200
MIME-Version: 1.0
From: "Ronald Klop" 
Message-ID: 
In-Reply-To: <201110260211.p9Q2BStn027230@svn.freebsd.org>
User-Agent: Opera Mail/11.52 (FreeBSD)
Content-Transfer-Encoding: quoted-printable
Cc: 
Subject: Re: svn commit: r226775 - in head: etc sbin/devd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:35:26 -0000

Hi,

I like this. Do you have plans the commit it on stable/9?

Ronald.

On Wed, 26 Oct 2011 04:11:28 +0200, Hiroki Sato  wrote:

> Author: hrs
> Date: Wed Oct 26 02:11:28 2011
> New Revision: 226775
> URL: http://svn.freebsd.org/changeset/base/226775
>
> Log:
>   - Add support for a "!" character in regex matching in devd(8).  It =20
> inverts
>     the logic (true/false) of the matching.
>  - Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the defau=
lt
>     devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is =20
> attached.
>  Reviewed by:	imp
>
> Modified:
>   head/etc/devd.conf
>   head/sbin/devd/devd.cc
>   head/sbin/devd/devd.conf.5
>   head/sbin/devd/devd.hh
>
> Modified: head/etc/devd.conf
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/etc/devd.conf	Wed Oct 26 01:58:36 2011	(r226774)
> +++ head/etc/devd.conf	Wed Oct 26 02:11:28 2011	(r226775)
> @@ -38,6 +38,7 @@ options {
>  #
>  notify 0 {
>  	match "system"		"IFNET";
> +	match "subsystem"	"!usbus[0-9]+";
>  	match "type"		"ATTACH";
>  	action "/etc/pccard_ether $subsystem start";
>  };
>
> Modified: head/sbin/devd/devd.cc
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sbin/devd/devd.cc	Wed Oct 26 01:58:36 2011	(r226774)
> +++ head/sbin/devd/devd.cc	Wed Oct 26 02:11:28 2011	(r226775)
> @@ -251,7 +251,14 @@ match::match(config &c, const char *var,
>  	: _var(var)
>  {
>  	_re =3D "^";
> -	_re.append(c.expand_string(string(re)));
> +	if (!c.expand_string(string(re)).empty() &&
> +	    c.expand_string(string(re)).at(0) =3D=3D '!') {
> +		_re.append(c.expand_string(string(re)).substr(1));
> +		_inv =3D 1;
> +	} else {
> +		_re.append(c.expand_string(string(re)));
> +		_inv =3D 0;
> +	}
>  	_re.append("$");
>  	regcomp(&_regex, _re.c_str(), REG_EXTENDED | REG_NOSUB | REG_ICASE);
>  }
> @@ -268,10 +275,13 @@ match::do_match(config &c)
>  	bool retval;
> 	if (Dflag)
> -		fprintf(stderr, "Testing %s=3D%s against %s\n", _var.c_str(),
> -		    value.c_str(), _re.c_str());
> +		fprintf(stderr, "Testing %s=3D%s against %s, invert=3D%d\n",
> +		    _var.c_str(), value.c_str(), _re.c_str(), _inv);
> 	retval =3D (regexec(&_regex, value.c_str(), 0, NULL, 0) =3D=3D 0);
> +	if (_inv =3D=3D 1)
> +		retval =3D (retval =3D=3D 0) ? 1 : 0;
> +
>  	return retval;
>  }
>
> Modified: head/sbin/devd/devd.conf.5
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sbin/devd/devd.conf.5	Wed Oct 26 01:58:36 2011	(r226774)
> +++ head/sbin/devd/devd.conf.5	Wed Oct 26 02:11:28 2011	(r226775)
> @@ -41,7 +41,7 @@
>  .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANC=
E =20
> OF THIS
>  .\" SOFTWARE.
>  .\"
> -.Dd March 8, 2009
> +.Dd October 25, 2011
>  .Dt DEVD.CONF 5
>  .Os
>  .Sh NAME
> @@ -121,6 +121,10 @@ Creates a regular expression and assigns
>  .Ar regexp-name .
>  The variable is available throughout the rest of
>  the configuration file.
> +If the string begins with
> +.Ql \&! ,
> +it matches if the regular expression formed by the rest of the string
> +does not match.
>  All regular expressions have an implicit
>  .Ql ^$
>  around them.
>
> Modified: head/sbin/devd/devd.hh
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sbin/devd/devd.hh	Wed Oct 26 01:58:36 2011	(r226774)
> +++ head/sbin/devd/devd.hh	Wed Oct 26 02:11:28 2011	(r226775)
> @@ -92,6 +92,7 @@ public:
>  private:
>  	std::string _var;
>  	std::string _re;
> +	bool _inv;
>  	regex_t _regex;
>  };
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:36:35 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B404A106566B;
	Thu, 27 Oct 2011 20:36:35 +0000 (UTC) (envelope-from pjd@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A471A8FC1D;
	Thu, 27 Oct 2011 20:36:35 +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 p9RKaZgT024219;
	Thu, 27 Oct 2011 20:36:35 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKaZx5024217;
	Thu, 27 Oct 2011 20:36:35 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <201110272036.p9RKaZx5024217@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Thu, 27 Oct 2011 20:36:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226861 - head/sbin/hastd
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:36:35 -0000

Author: pjd
Date: Thu Oct 27 20:36:35 2011
New Revision: 226861
URL: http://svn.freebsd.org/changeset/base/226861

Log:
  Remove redundant space.
  
  MFC after:	3 days

Modified:
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Thu Oct 27 20:35:21 2011	(r226860)
+++ head/sbin/hastd/secondary.c	Thu Oct 27 20:36:35 2011	(r226861)
@@ -125,7 +125,7 @@ static void *send_thread(void *arg);
 	TAILQ_REMOVE(&hio_##name##_list, (hio), hio_next);		\
 	mtx_unlock(&hio_##name##_list_lock);				\
 } while (0)
- 
+
 static void
 hio_clear(struct hio *hio)
 {

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:36:45 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35])
	by hub.freebsd.org (Postfix) with ESMTP id C6A821065670;
	Thu, 27 Oct 2011 20:36:45 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org
	[IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id 3501C2012E0;
	Thu, 27 Oct 2011 20:35:43 +0000 (UTC)
Message-ID: <4EA9C09F.20706@FreeBSD.org>
Date: Thu, 27 Oct 2011 13:35:43 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
	rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1
MIME-Version: 1.0
To: Ken Smith 
References: <201110271307.p9RD7nAx007728@svn.freebsd.org>
In-Reply-To: <201110271307.p9RD7nAx007728@svn.freebsd.org>
X-Enigmail-Version: undefined
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226835 - in head/sys: amd64/conf i386/conf
 ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:36:45 -0000

On 10/27/2011 06:07, Ken Smith wrote:
>   Adjust the debugger options slightly.  This should help me do the right
>   thing when changing the debugging options as part of head becoming a new
>   stable branch.  It may also help people who for one reason or another want
>   to run head but don't want it slowed down by the debugging support.

This is great stuff, and I think it will be very helpful to our users.
Thanks for taking this on.


Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:39:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 03199106566C;
	Thu, 27 Oct 2011 20:39:21 +0000 (UTC)
	(envelope-from gavin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E7B278FC08;
	Thu, 27 Oct 2011 20:39:20 +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 p9RKdKTn024343;
	Thu, 27 Oct 2011 20:39:20 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKdKsO024341;
	Thu, 27 Oct 2011 20:39:20 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201110272039.p9RKdKsO024341@svn.freebsd.org>
From: Gavin Atkinson 
Date: Thu, 27 Oct 2011 20:39:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226862 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:39:21 -0000

Author: gavin
Date: Thu Oct 27 20:39:20 2011
New Revision: 226862
URL: http://svn.freebsd.org/changeset/base/226862

Log:
  Remove example for linking /dev/vga to /dev/ttyv0, this hasn't been
  required since X version 4.3.0.
  
  PR:		conf/161847
  Submitted by:	eadler
  MFC after:	2 weeks

Modified:
  head/etc/devfs.conf

Modified: head/etc/devfs.conf
==============================================================================
--- head/etc/devfs.conf	Thu Oct 27 20:36:35 2011	(r226861)
+++ head/etc/devfs.conf	Thu Oct 27 20:39:20 2011	(r226862)
@@ -31,9 +31,6 @@
 #
 # Examples:
 
-# Historically X depended on this, but version 4.3.0 doesn't seem to anymore
-#link	ttyv0	vga
-
 # Commonly used by many ports
 #link	cd0	cdrom
 #link	cd0	dvd

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:44:28 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C05D51065670;
	Thu, 27 Oct 2011 20:44:28 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B0BFE8FC13;
	Thu, 27 Oct 2011 20:44:28 +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 p9RKiSTN024561;
	Thu, 27 Oct 2011 20:44:28 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKiSmf024559;
	Thu, 27 Oct 2011 20:44:28 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201110272044.p9RKiSmf024559@svn.freebsd.org>
From: Doug Barton 
Date: Thu, 27 Oct 2011 20:44:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226863 - head/sys/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:44:28 -0000

Author: dougb
Date: Thu Oct 27 20:44:28 2011
New Revision: 226863
URL: http://svn.freebsd.org/changeset/base/226863

Log:
  Fix svnversion for svn 1.7.x by not looking for .svn in ${SYSDIR} (since
  it no longer exists). Instead, run svnversion if we can find the binary
  and test that the output looks like a version string.
  
  Reviewed by:	discussion on -current@
  Tested by:	rodrigc for non-svn case (thanks!)

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==============================================================================
--- head/sys/conf/newvers.sh	Thu Oct 27 20:39:20 2011	(r226862)
+++ head/sys/conf/newvers.sh	Thu Oct 27 20:44:28 2011	(r226863)
@@ -88,7 +88,7 @@ v=`cat version` u=${USER:-root} d=`pwd` 
 i=`${MAKE:-make} -V KERN_IDENT`
 
 for dir in /bin /usr/bin /usr/local/bin; do
-	if [ -d "${SYSDIR}/.svn" -a -x "${dir}/svnversion" ] ; then
+	if [ -x "${dir}/svnversion" ] ; then
 		svnversion=${dir}/svnversion
 		break
 	fi
@@ -99,8 +99,12 @@ for dir in /bin /usr/bin /usr/local/bin;
 done
 
 if [ -n "$svnversion" ] ; then
-    echo "$svnversion"
-	svn=" r`cd ${SYSDIR} && $svnversion`"
+	echo "$svnversion"
+	svn=`cd ${SYSDIR} && $svnversion`
+	case "$svn" in
+	[0-9]*)	svn=" r${svn}" ;;
+	*)	unset svn ;;
+	esac
 fi
 
 if [ -n "$git_cmd" ] ; then

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:54:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6029D106564A;
	Thu, 27 Oct 2011 20:54:54 +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 36E0D8FC14;
	Thu, 27 Oct 2011 20:54:54 +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 p9RKss8B024986;
	Thu, 27 Oct 2011 20:54:54 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RKssaX024983;
	Thu, 27 Oct 2011 20:54:54 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110272054.p9RKssaX024983@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 20:54:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226864 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:54:54 -0000

Author: yongari
Date: Thu Oct 27 20:54:53 2011
New Revision: 226864
URL: http://svn.freebsd.org/changeset/base/226864

Log:
  Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
  Also add more firmware commands(not used yet).
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Thu Oct 27 20:44:28 2011	(r226863)
+++ head/sys/dev/bge/if_bge.c	Thu Oct 27 20:54:53 2011	(r226864)
@@ -1368,7 +1368,7 @@ bge_stop_fw(struct bge_softc *sc)
 	int i;
 
 	if (sc->bge_asf_mode) {
-		bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_PAUSE);
+		bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_CMD_PAUSE);
 		CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
 		    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
 
@@ -4107,7 +4107,7 @@ bge_asf_driver_up(struct bge_softc *sc)
 		else {
 			sc->bge_asf_count = 2;
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
-			    BGE_FW_DRV_ALIVE);
+			    BGE_FW_CMD_DRV_ALIVE);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
 			CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Thu Oct 27 20:44:28 2011	(r226863)
+++ head/sys/dev/bge/if_bgereg.h	Thu Oct 27 20:54:53 2011	(r226864)
@@ -91,8 +91,14 @@
 
 /* Firmware interface */
 #define	BGE_SRAM_DATA_SIG_MAGIC		0x4B657654	/* 'KevT' */
-#define	BGE_FW_DRV_ALIVE		0x00000001
-#define	BGE_FW_PAUSE			0x00000002
+
+#define	BGE_FW_CMD_DRV_ALIVE		0x00000001
+#define	BGE_FW_CMD_PAUSE		0x00000002
+#define	BGE_FW_CMD_IPV4_ADDR_CHANGE	0x00000003
+#define	BGE_FW_CMD_IPV6_ADDR_CHANGE	0x00000004
+#define	BGE_FW_CMD_LINK_UPDATE		0x0000000C
+#define	BGE_FW_CMD_DRV_ALIVE2		0x0000000D
+#define	BGE_FW_CMD_DRV_ALIVE3		0x0000000E
 
 #define	BGE_FW_DRV_STATE_START		0x00000001
 #define	BGE_FW_DRV_STATE_START_DONE	0x80000001

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 20:56:24 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1233)
	id ACD1B1065674; Thu, 27 Oct 2011 20:56:24 +0000 (UTC)
Date: Thu, 27 Oct 2011 20:56:24 +0000
From: Alexander Best 
To: Gavin Atkinson 
Message-ID: <20111027205624.GA71935@freebsd.org>
References: <201110272035.p9RKZLh3024140@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201110272035.p9RKZLh3024140@svn.freebsd.org>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226860 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 20:56:24 -0000

On Thu Oct 27 11, Gavin Atkinson wrote:
> Author: gavin
> Date: Thu Oct 27 20:35:21 2011
> New Revision: 226860
> URL: http://svn.freebsd.org/changeset/base/226860
> 
> Log:
>   Update the example rules in devfs.conf to reflect the changes since ATA_CAM.
>   While here, add another example rule, as many applications these days
>   expect to find /dev/dvd instead.

http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028406.html

;)

>   
>   MFC after:	3 days
> 
> Modified:
>   head/etc/devfs.conf
> 
> Modified: head/etc/devfs.conf
> ==============================================================================
> --- head/etc/devfs.conf	Thu Oct 27 20:32:57 2011	(r226859)
> +++ head/etc/devfs.conf	Thu Oct 27 20:35:21 2011	(r226860)
> @@ -35,7 +35,8 @@
>  #link	ttyv0	vga
>  
>  # Commonly used by many ports
> -#link	acd0	cdrom
> +#link	cd0	cdrom
> +#link	cd0	dvd
>  
>  # Allow a user in the wheel group to query the smb0 device
>  #perm	smb0	0660

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 21:10:52 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C6626106566C;
	Thu, 27 Oct 2011 21:10:52 +0000 (UTC)
	(envelope-from yanegomi@gmail.com)
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by mx1.freebsd.org (Postfix) with ESMTP id A75958FC08;
	Thu, 27 Oct 2011 21:10:51 +0000 (UTC)
Received: by bkbzs2 with SMTP id zs2so333992bkb.13
	for ; Thu, 27 Oct 2011 14:10:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	bh=mQJxPjYY0j7sDMokydQz5AVSnawBPmJ4GhdqIiT5ewI=;
	b=fnPeSQaT3ppzMoXVj9GLYS440lx20WSJzGR85fLVqdDWPdBJB0nAlnkh3IlRbTkY7e
	GRx7M/4jb+D9GJtgtaPm5/Gd1XXnh8y9unfCqrnQucPcOlPmEr7mMfwCim50WqaHTvfT
	X2IrkL4bp7sybCrj/pMdcXBi84ZHMsHtKgEvQ=
MIME-Version: 1.0
Received: by 10.182.7.10 with SMTP id f10mr6820426oba.56.1319749850223; Thu,
	27 Oct 2011 14:10:50 -0700 (PDT)
Received: by 10.182.122.33 with HTTP; Thu, 27 Oct 2011 14:10:50 -0700 (PDT)
In-Reply-To: <20111027205624.GA71935@freebsd.org>
References: <201110272035.p9RKZLh3024140@svn.freebsd.org>
	<20111027205624.GA71935@freebsd.org>
Date: Thu, 27 Oct 2011 14:10:50 -0700
Message-ID: 
From: Garrett Cooper 
To: Alexander Best 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	Gavin Atkinson , src-committers@freebsd.org
Subject: Re: svn commit: r226860 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 21:10:52 -0000

On Thu, Oct 27, 2011 at 1:56 PM, Alexander Best  wrote=
:
> On Thu Oct 27 11, Gavin Atkinson wrote:
>> Author: gavin
>> Date: Thu Oct 27 20:35:21 2011
>> New Revision: 226860
>> URL: http://svn.freebsd.org/changeset/base/226860
>>
>> Log:
>> =A0 Update the example rules in devfs.conf to reflect the changes since =
ATA_CAM.
>> =A0 While here, add another example rule, as many applications these day=
s
>> =A0 expect to find /dev/dvd instead.
>
> http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028406.ht=
ml

Great minds think alike :D.
-Garrett

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 21:25:42 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 69E40106564A;
	Thu, 27 Oct 2011 21:25:42 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 59E428FC12;
	Thu, 27 Oct 2011 21:25:42 +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 p9RLPfU8026165;
	Thu, 27 Oct 2011 21:25:41 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RLPfQb026162;
	Thu, 27 Oct 2011 21:25:41 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201110272125.p9RLPfQb026162@svn.freebsd.org>
From: Xin LI 
Date: Thu, 27 Oct 2011 21:25:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226865 - in head/etc: defaults periodic/daily
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 21:25:42 -0000

Author: delphij
Date: Thu Oct 27 21:25:41 2011
New Revision: 226865
URL: http://svn.freebsd.org/changeset/base/226865

Log:
  Increase default scrub threshold from 30 days to 5 weeks.  Using
  whole weeks makes it easier to predicate when the scrub would
  happen.
  
  MFC after:	1 week

Modified:
  head/etc/defaults/periodic.conf
  head/etc/periodic/daily/800.scrub-zfs

Modified: head/etc/defaults/periodic.conf
==============================================================================
--- head/etc/defaults/periodic.conf	Thu Oct 27 20:54:53 2011	(r226864)
+++ head/etc/defaults/periodic.conf	Thu Oct 27 21:25:41 2011	(r226865)
@@ -150,8 +150,8 @@ daily_submit_queuerun="YES"				# Also su
 # 800.scrub-zfs
 daily_scrub_zfs_enable="NO"
 daily_scrub_zfs_pools=""			# empty string selects all pools
-daily_scrub_zfs_default_threshold="30"		# days between scrubs
-#daily_scrub_zfs_${poolname}_threshold="30"	# pool specific threshold
+daily_scrub_zfs_default_threshold="35"		# days between scrubs
+#daily_scrub_zfs_${poolname}_threshold="35"	# pool specific threshold
 
 # 999.local
 daily_local="/etc/daily.local"				# Local scripts

Modified: head/etc/periodic/daily/800.scrub-zfs
==============================================================================
--- head/etc/periodic/daily/800.scrub-zfs	Thu Oct 27 20:54:53 2011	(r226864)
+++ head/etc/periodic/daily/800.scrub-zfs	Thu Oct 27 21:25:41 2011	(r226865)
@@ -15,7 +15,7 @@ then
     source_periodic_confs
 fi
 
-: ${daily_scrub_zfs_default_threshold=30}
+: ${daily_scrub_zfs_default_threshold=35}
 
 case "$daily_scrub_zfs_enable" in
     [Yy][Ee][Ss])

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 21:27:37 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C1268106566B;
	Thu, 27 Oct 2011 21:27:37 +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 97C9D8FC0A;
	Thu, 27 Oct 2011 21:27:37 +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 p9RLRbOq026263;
	Thu, 27 Oct 2011 21:27:37 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RLRbXv026260;
	Thu, 27 Oct 2011 21:27:37 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110272127.p9RLRbXv026260@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 21:27:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226866 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 21:27:37 -0000

Author: yongari
Date: Thu Oct 27 21:27:37 2011
New Revision: 226866
URL: http://svn.freebsd.org/changeset/base/226866

Log:
  Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
  This bit(SW event 7 in publicly available data sheet) is used to
  make RX CPU handle a firmware command and the bit is automatically
  cleared after RX CPU completed the command.
  Generally firmware command takes the following steps.
   1. Write BGE_SRAM_FW_CMD_MB with a command.
   2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes.
   3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data.
   4. Generate BGE_RX_CPU_EVENT and let firmware handle the command.
   5. Wait for the ACK of the firmware command.
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Thu Oct 27 21:25:41 2011	(r226865)
+++ head/sys/dev/bge/if_bge.c	Thu Oct 27 21:27:37 2011	(r226866)
@@ -1370,10 +1370,11 @@ bge_stop_fw(struct bge_softc *sc)
 	if (sc->bge_asf_mode) {
 		bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB, BGE_FW_CMD_PAUSE);
 		CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
-		    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
+		    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | BGE_RX_CPU_DRV_EVENT);
 
 		for (i = 0; i < 100; i++ ) {
-			if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) & (1 << 14)))
+			if (!(CSR_READ_4(sc, BGE_RX_CPU_EVENT) &
+			    BGE_RX_CPU_DRV_EVENT))
 				break;
 			DELAY(10);
 		}
@@ -4111,7 +4112,8 @@ bge_asf_driver_up(struct bge_softc *sc)
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
 			CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
-			    CSR_READ_4(sc, BGE_RX_CPU_EVENT) | (1 << 14));
+			    CSR_READ_4(sc, BGE_RX_CPU_EVENT) |
+			    BGE_RX_CPU_DRV_EVENT);
 		}
 	}
 }

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Thu Oct 27 21:25:41 2011	(r226865)
+++ head/sys/dev/bge/if_bgereg.h	Thu Oct 27 21:27:37 2011	(r226866)
@@ -1901,6 +1901,8 @@
 #define	BGE_EE_DELAY			0x6848
 #define	BGE_FASTBOOT_PC			0x6894
 
+#define	BGE_RX_CPU_DRV_EVENT		0x00004000
+
 /*
  * NVRAM Control registers
  */

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 21:49:16 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A6565106566C;
	Thu, 27 Oct 2011 21:49:16 +0000 (UTC)
	(envelope-from delphij@delphij.net)
Received: from anubis.delphij.net (anubis.delphij.net
	[IPv6:2001:470:1:117::25])
	by mx1.freebsd.org (Postfix) with ESMTP id 88BAE8FC15;
	Thu, 27 Oct 2011 21:49:16 +0000 (UTC)
Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65])
	(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
	(No client certificate requested)
	by anubis.delphij.net (Postfix) with ESMTPSA id F3C08D0C1;
	Thu, 27 Oct 2011 14:49:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis;
	t=1319752156; bh=4xnPmqzY44Jer3m1aebkjtP8LOpx4hbkbjAYrU3JZWg=;
	h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject:
	References:In-Reply-To:Content-Type:Content-Transfer-Encoding;
	b=prIvd1yN614VllojqpQoxlg62kYVjwcAwwMiOkY+DjxW8+oJzhPSN6Y7JoWzXCml5
	UPIYuS9pvKWXrMET1dH5xDS6Lx6aLj8R+BgtD1XhEW8hTsCsNqW1Q+koRBJXASNAjO
	OmfsVspMr6dK+fxsi4fR2OTf3jDNNjBu6L4PQwhg=
Message-ID: <4EA9D1DB.30202@delphij.net>
Date: Thu, 27 Oct 2011 14:49:15 -0700
From: Xin LI 
Organization: The FreeBSD Project
MIME-Version: 1.0
To: Eitan Adler 
References: <201110161430.p9GEUTFj066335@svn.freebsd.org>
In-Reply-To: <201110161430.p9GEUTFj066335@svn.freebsd.org>
OpenPGP: id=3FCA37C1;
	url=http://www.delphij.net/delphij.asc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226436 - in head: . gnu/usr.bin/binutils/objcopy
 gnu/usr.bin/binutils/strip lib/libc/gen lib/libelf lib/libipsec lib/libpmc
 lib/msun/man libexec/rtld-elf/amd64 libexec/rtld-elf/i386 sb...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: d@delphij.net
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 21:49:16 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 10/16/11 07:30, Eitan Adler wrote:
[...]
> head/secure/lib/libcrypto/man/engine.3 
> head/secure/usr.bin/openssl/man/ca.1 
> head/secure/usr.bin/openssl/man/dgst.1
[...]

These files are automatically generated from crypto/openssl/doc, would
you please also submit it to upstream so we don't have to patch them
again in the future?

> head/sys/ofed/drivers/infiniband/ulp/sdp/Kconfig

This is from Linux InfiniBand driver and does not have anything to do
with FreeBSD so we should probably just remove it.

Thanks for the work by the way!

Cheers,
- -- 
Xin LI 	https://www.delphij.net/
FreeBSD - The Power to Serve!		Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iQEcBAEBCAAGBQJOqdHaAAoJEATO+BI/yjfBTh0H/REaYYWhCKS9ayZPBLIhUcWS
RW55d38d5UAFZgrcIRVLacz8uryfFyX4KF9jUz1+U82wguocqatfoMR/nyaPczz/
5K20Gih+IpuYsqsOPK2NyTjNp5UP1Najjh7PP+ORVHEIF9ZA9omf0XTKlkiVq0Mz
GqlJyp5VpavG+jmBA1SfZnayfX/DxATAzqSgxG/FObrDuhi65hh7Yu1WVkeMwU13
hnIvYXBs+l3KVoxzzz/MeYoFow2HfbbDa1QFyLCdiG51I+5yHkmLbDblRO/1b4MK
fM/v4h93U6Z/H+Nb9Pm5Df1wgOJeMWIiM7t5jj/MZppOPeSSyANRZgdJv2MwplA=
=nCDy
-----END PGP SIGNATURE-----

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 22:10:52 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 924BB106564A;
	Thu, 27 Oct 2011 22:10:52 +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 828958FC1B;
	Thu, 27 Oct 2011 22:10:52 +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 p9RMAq1u027810;
	Thu, 27 Oct 2011 22:10:52 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RMAqtB027807;
	Thu, 27 Oct 2011 22:10:52 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110272210.p9RMAqtB027807@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Thu, 27 Oct 2011 22:10:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226867 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 22:10:52 -0000

Author: yongari
Date: Thu Oct 27 22:10:52 2011
New Revision: 226867
URL: http://svn.freebsd.org/changeset/base/226867

Log:
  Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
  bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
  seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
  data contains timeout value in seconds until the next
  BGE_FW_CMD_DRV_ALIVE command.
  Broadcom recommends driver set the value 3 times longer than the
  interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
  3 seconds so probably we have to increase it in future and use
  different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).
  
  No functional changes.

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Thu Oct 27 21:27:37 2011	(r226866)
+++ head/sys/dev/bge/if_bge.c	Thu Oct 27 22:10:52 2011	(r226867)
@@ -4110,7 +4110,8 @@ bge_asf_driver_up(struct bge_softc *sc)
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_MB,
 			    BGE_FW_CMD_DRV_ALIVE);
 			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_LEN_MB, 4);
-			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB, 3);
+			bge_writemem_ind(sc, BGE_SRAM_FW_CMD_DATA_MB,
+			    BGE_FW_HB_TIMEOUT_SEC);
 			CSR_WRITE_4(sc, BGE_RX_CPU_EVENT,
 			    CSR_READ_4(sc, BGE_RX_CPU_EVENT) |
 			    BGE_RX_CPU_DRV_EVENT);

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Thu Oct 27 21:27:37 2011	(r226866)
+++ head/sys/dev/bge/if_bgereg.h	Thu Oct 27 22:10:52 2011	(r226867)
@@ -100,6 +100,8 @@
 #define	BGE_FW_CMD_DRV_ALIVE2		0x0000000D
 #define	BGE_FW_CMD_DRV_ALIVE3		0x0000000E
 
+#define	BGE_FW_HB_TIMEOUT_SEC		3
+
 #define	BGE_FW_DRV_STATE_START		0x00000001
 #define	BGE_FW_DRV_STATE_START_DONE	0x80000001
 #define	BGE_FW_DRV_STATE_UNLOAD		0x00000002

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 22:38:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 23ED71065745;
	Thu, 27 Oct 2011 22:38:00 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF2228FC08;
	Thu, 27 Oct 2011 22:37: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 p9RMbxQb028817;
	Thu, 27 Oct 2011 22:37:59 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RMbxW9028815;
	Thu, 27 Oct 2011 22:37:59 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201110272237.p9RMbxW9028815@svn.freebsd.org>
From: Michael Tuexen 
Date: Thu, 27 Oct 2011 22:37:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226868 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 22:38:00 -0000

Author: tuexen
Date: Thu Oct 27 22:37:59 2011
New Revision: 226868
URL: http://svn.freebsd.org/changeset/base/226868

Log:
  Send out control chunks which have no specific destination.
  
  MFC after: 3 days.

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Thu Oct 27 22:10:52 2011	(r226867)
+++ head/sys/netinet/sctp_output.c	Thu Oct 27 22:37:59 2011	(r226868)
@@ -8003,12 +8003,20 @@ again_one_more_time:
 			if (chk->rec.chunk_id.id != SCTP_ASCONF) {
 				continue;
 			}
-			if (chk->whoTo != net) {
-				/*
-				 * No, not sent to the network we are
-				 * looking at
-				 */
-				break;
+			if (chk->whoTo == NULL) {
+				if (asoc->alternate == NULL) {
+					if (asoc->primary_destination != net) {
+						break;
+					}
+				} else {
+					if (asoc->alternate != net) {
+						break;
+					}
+				}
+			} else {
+				if (chk->whoTo != net) {
+					break;
+				}
 			}
 			if (chk->data == NULL) {
 				break;
@@ -8092,6 +8100,10 @@ again_one_more_time:
 				 */
 				no_data_chunks = 1;
 				chk->sent = SCTP_DATAGRAM_SENT;
+				if (chk->whoTo == NULL) {
+					chk->whoTo = net;
+					atomic_add_int(&net->ref_count, 1);
+				}
 				chk->snd_count++;
 				if (mtu == 0) {
 					/*
@@ -8198,12 +8210,20 @@ again_one_more_time:
 					goto skip_net_check;
 				}
 			}
-			if (chk->whoTo != net) {
-				/*
-				 * No, not sent to the network we are
-				 * looking at
-				 */
-				continue;
+			if (chk->whoTo == NULL) {
+				if (asoc->alternate == NULL) {
+					if (asoc->primary_destination != net) {
+						continue;
+					}
+				} else {
+					if (asoc->alternate != net) {
+						continue;
+					}
+				}
+			} else {
+				if (chk->whoTo != net) {
+					continue;
+				}
 			}
 	skip_net_check:
 			if (chk->data == NULL) {
@@ -8332,6 +8352,10 @@ again_one_more_time:
 						SCTP_STAT_INCR(sctps_sendecne);
 					}
 					chk->sent = SCTP_DATAGRAM_SENT;
+					if (chk->whoTo == NULL) {
+						chk->whoTo = net;
+						atomic_add_int(&net->ref_count, 1);
+					}
 					chk->snd_count++;
 				}
 				if (mtu == 0) {

From owner-svn-src-all@FreeBSD.ORG  Thu Oct 27 22:38:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D08501065679;
	Thu, 27 Oct 2011 22:38:48 +0000 (UTC)
	(envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C109B8FC19;
	Thu, 27 Oct 2011 22:38:48 +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 p9RMcm38028879;
	Thu, 27 Oct 2011 22:38:48 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9RMcmO5028877;
	Thu, 27 Oct 2011 22:38:48 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201110272238.p9RMcmO5028877@svn.freebsd.org>
From: Michael Tuexen 
Date: Thu, 27 Oct 2011 22:38:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226869 - head/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 27 Oct 2011 22:38:48 -0000

Author: tuexen
Date: Thu Oct 27 22:38:48 2011
New Revision: 226869
URL: http://svn.freebsd.org/changeset/base/226869

Log:
  When add a new remote address using sctp_add_remote_addr(),
  return the correct net if requested.
  
  MFC after: 3 days.

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c	Thu Oct 27 22:37:59 2011	(r226868)
+++ head/sys/netinet/sctp_pcb.c	Thu Oct 27 22:38:48 2011	(r226869)
@@ -4138,6 +4138,9 @@ sctp_add_remote_addr(struct sctp_tcb *st
 #ifdef INVARIANTS
 	net->flowidset = 1;
 #endif
+	if (netp) {
+		*netp = net;
+	}
 	netfirst = TAILQ_FIRST(&stcb->asoc.nets);
 	if (net->ro.ro_rt == NULL) {
 		/* Since we have no route put it at the back */
@@ -4209,9 +4212,6 @@ sctp_add_remote_addr(struct sctp_tcb *st
 		TAILQ_INSERT_HEAD(&stcb->asoc.nets,
 		    stcb->asoc.primary_destination, sctp_next);
 	}
-	if (netp) {
-		*netp = net;
-	}
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 00:40:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A25A31065672;
	Fri, 28 Oct 2011 00:40:19 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 922958FC15;
	Fri, 28 Oct 2011 00:40: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 p9S0eJmL033264;
	Fri, 28 Oct 2011 00:40:19 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S0eJlV033261;
	Fri, 28 Oct 2011 00:40:19 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110280040.p9S0eJlV033261@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 28 Oct 2011 00:40:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226870 - head/sys/dev/mii
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 00:40:19 -0000

Author: yongari
Date: Fri Oct 28 00:40:19 2011
New Revision: 226870
URL: http://svn.freebsd.org/changeset/base/226870

Log:
  Recognize BCM5720C PHY.

Modified:
  head/sys/dev/mii/brgphy.c
  head/sys/dev/mii/miidevs

Modified: head/sys/dev/mii/brgphy.c
==============================================================================
--- head/sys/dev/mii/brgphy.c	Thu Oct 27 22:38:48 2011	(r226869)
+++ head/sys/dev/mii/brgphy.c	Fri Oct 28 00:40:19 2011	(r226870)
@@ -141,6 +141,7 @@ static const struct mii_phydesc brgphys[
 	MII_PHY_DESC(BROADCOM2, BCM5784),
 	MII_PHY_DESC(BROADCOM3, BCM5717C),
 	MII_PHY_DESC(BROADCOM3, BCM5719C),
+	MII_PHY_DESC(BROADCOM3, BCM5720C),
 	MII_PHY_DESC(BROADCOM3, BCM57765),
 	MII_PHY_DESC(xxBROADCOM_ALT1, BCM5906),
 	MII_PHY_END

Modified: head/sys/dev/mii/miidevs
==============================================================================
--- head/sys/dev/mii/miidevs	Thu Oct 27 22:38:48 2011	(r226869)
+++ head/sys/dev/mii/miidevs	Fri Oct 28 00:40:19 2011	(r226870)
@@ -179,6 +179,7 @@ model BROADCOM2 BCM5709S	0x003f BCM5709S
 model BROADCOM3 BCM5717C	0x0020 BCM5717C 1000BASE-T media interface
 model BROADCOM3 BCM5719C	0x0022 BCM5719C 1000BASE-T media interface
 model BROADCOM3 BCM57765	0x0024 BCM57765 1000BASE-T media interface
+model BROADCOM3 BCM5720C	0x0036 BCM5720C 1000BASE-T media interface
 model xxBROADCOM_ALT1 BCM5906	0x0004 BCM5906 10/100baseTX media interface
 
 /* Cicada Semiconductor PHYs (now owned by Vitesse?) */

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 01:04:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6D1591065670;
	Fri, 28 Oct 2011 01:04:41 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5BE858FC12;
	Fri, 28 Oct 2011 01:04:41 +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 p9S14fa0034141;
	Fri, 28 Oct 2011 01:04:41 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S14f0b034138;
	Fri, 28 Oct 2011 01:04:41 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110280104.p9S14f0b034138@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 28 Oct 2011 01:04:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226871 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 01:04:41 -0000

Author: yongari
Date: Fri Oct 28 01:04:40 2011
New Revision: 226871
URL: http://svn.freebsd.org/changeset/base/226871

Log:
  Add initial BCM5720 support.
  Many thanks to Broadcom for continuing support of FreeBSD.
  
  Submitted by:	Geans Pin at Broadcom (initial version)
  H/W donated by:	Broadcom

Modified:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Fri Oct 28 00:40:19 2011	(r226870)
+++ head/sys/dev/bge/if_bge.c	Fri Oct 28 01:04:40 2011	(r226871)
@@ -301,6 +301,7 @@ static const struct bge_revision {
 	{ BGE_CHIPID_BCM5717_A0,	"BCM5717 A0" },
 	{ BGE_CHIPID_BCM5717_B0,	"BCM5717 B0" },
 	{ BGE_CHIPID_BCM5719_A0,	"BCM5719 A0" },
+	{ BGE_CHIPID_BCM5720_A0,	"BCM5720 A0" },
 	{ BGE_CHIPID_BCM5755_A0,	"BCM5755 A0" },
 	{ BGE_CHIPID_BCM5755_A1,	"BCM5755 A1" },
 	{ BGE_CHIPID_BCM5755_A2,	"BCM5755 A2" },
@@ -349,6 +350,7 @@ static const struct bge_revision const b
 	{ BGE_ASICREV_BCM57780,		"unknown BCM57780" },
 	{ BGE_ASICREV_BCM5717,		"unknown BCM5717" },
 	{ BGE_ASICREV_BCM5719,		"unknown BCM5719" },
+	{ BGE_ASICREV_BCM5720,		"unknown BCM5720" },
 
 	{ 0, NULL }
 };
@@ -437,6 +439,7 @@ static int bge_init_tx_ring(struct bge_s
 
 static int bge_chipinit(struct bge_softc *);
 static int bge_blockinit(struct bge_softc *);
+static uint32_t bge_dma_swap_options(struct bge_softc *);
 
 static int bge_has_eaddr(struct bge_softc *);
 static uint32_t bge_readmem_ind(struct bge_softc *, int);
@@ -1381,13 +1384,31 @@ bge_stop_fw(struct bge_softc *sc)
 	}
 }
 
+static uint32_t
+bge_dma_swap_options(struct bge_softc *sc)
+{
+	uint32_t dma_options;
+
+	dma_options = BGE_MODECTL_WORDSWAP_NONFRAME |
+	    BGE_MODECTL_BYTESWAP_DATA | BGE_MODECTL_WORDSWAP_DATA;
+#if BYTE_ORDER == BIG_ENDIAN
+	dma_options |= BGE_MODECTL_BYTESWAP_NONFRAME;
+#endif
+	if ((sc)->bge_asicrev == BGE_ASICREV_BCM5720)
+		dma_options |= BGE_MODECTL_BYTESWAP_B2HRX_DATA |
+		    BGE_MODECTL_WORDSWAP_B2HRX_DATA | BGE_MODECTL_B2HRX_ENABLE |
+		    BGE_MODECTL_HTX2B_ENABLE;
+
+	return (dma_options);
+}
+
 /*
  * Do endian, PCI and DMA initialization.
  */
 static int
 bge_chipinit(struct bge_softc *sc)
 {
-	uint32_t dma_rw_ctl, misc_ctl;
+	uint32_t dma_rw_ctl, misc_ctl, mode_ctl;
 	uint16_t val;
 	int i;
 
@@ -1505,9 +1526,8 @@ bge_chipinit(struct bge_softc *sc)
 	/*
 	 * Set up general mode register.
 	 */
-	CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
-	    BGE_MODECTL_MAC_ATTN_INTR | BGE_MODECTL_HOST_SEND_BDS |
-	    BGE_MODECTL_TX_NO_PHDR_CSUM);
+	mode_ctl = bge_dma_swap_options(sc) | BGE_MODECTL_MAC_ATTN_INTR |
+	    BGE_MODECTL_HOST_SEND_BDS | BGE_MODECTL_TX_NO_PHDR_CSUM;
 
 	/*
 	 * BCM5701 B5 have a bug causing data corruption when using
@@ -1517,13 +1537,15 @@ bge_chipinit(struct bge_softc *sc)
 	 */
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5701 &&
 	    sc->bge_chipid == BGE_CHIPID_BCM5701_B5)
-		BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_FORCE_PCI32);
+		mode_ctl |= BGE_MODECTL_FORCE_PCI32;
 
 	/*
 	 * Tell the firmware the driver is running
 	 */
 	if (sc->bge_asf_mode & ASF_STACKUP)
-		BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP);
+		mode_ctl |= BGE_MODECTL_STACKUP;
+
+	CSR_WRITE_4(sc, BGE_MODE_CTL, mode_ctl);
 
 	/*
 	 * Disable memory write invalidate.  Apparently it is not supported
@@ -1583,8 +1605,7 @@ bge_blockinit(struct bge_softc *sc)
 	}
 
 	/* Configure mbuf pool watermarks */
-	if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-	    sc->bge_asicrev == BGE_ASICREV_BCM57765) {
+	if (BGE_IS_5717_PLUS(sc)) {
 		CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_READDMA_LOWAT, 0x0);
 		if (sc->bge_ifp->if_mtu > ETHERMTU) {
 			CSR_WRITE_4(sc, BGE_BMAN_MBUFPOOL_MACRX_LOWAT, 0x7e);
@@ -1719,7 +1740,8 @@ bge_blockinit(struct bge_softc *sc)
 		    BGE_RCB_MAXLEN_FLAGS(BGE_MAX_FRAMELEN, 0);
 	}
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-	    sc->bge_asicrev == BGE_ASICREV_BCM5719)
+	    sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5720)
 		rcb->bge_nicaddr = BGE_STD_RX_RINGS_5717;
 	else
 		rcb->bge_nicaddr = BGE_STD_RX_RINGS;
@@ -1752,7 +1774,8 @@ bge_blockinit(struct bge_softc *sc)
 		rcb->bge_maxlen_flags = BGE_RCB_MAXLEN_FLAGS(0,
 		    BGE_RCB_FLAG_USE_EXT_RX_BD | BGE_RCB_FLAG_RING_DISABLED);
 		if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-		    sc->bge_asicrev == BGE_ASICREV_BCM5719)
+		    sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+		    sc->bge_asicrev == BGE_ASICREV_BCM5720)
 			rcb->bge_nicaddr = BGE_JUMBO_RX_RINGS_5717;
 		else
 			rcb->bge_nicaddr = BGE_JUMBO_RX_RINGS;
@@ -1841,7 +1864,8 @@ bge_blockinit(struct bge_softc *sc)
 	RCB_WRITE_4(sc, vrcb, bge_hostaddr.bge_addr_hi, taddr.bge_addr_hi);
 	RCB_WRITE_4(sc, vrcb, bge_hostaddr.bge_addr_lo, taddr.bge_addr_lo);
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-	    sc->bge_asicrev == BGE_ASICREV_BCM5719)
+	    sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5720)
 		RCB_WRITE_4(sc, vrcb, bge_nicaddr, BGE_SEND_RING_5717);
 	else
 		RCB_WRITE_4(sc, vrcb, bge_nicaddr,
@@ -1855,7 +1879,8 @@ bge_blockinit(struct bge_softc *sc)
 	 * return ring control blocks, located in NIC memory.
 	 */
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-	    sc->bge_asicrev == BGE_ASICREV_BCM5719) {
+	    sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5720) {
 		/* Should be 17, use 16 until we get an SRAM map. */
 		limit = 16;
 	} else if (!BGE_IS_5705_PLUS(sc))
@@ -1899,7 +1924,11 @@ bge_blockinit(struct bge_softc *sc)
 	    BGE_TX_BACKOFF_SEED_MASK);
 
 	/* Set inter-packet gap */
-	CSR_WRITE_4(sc, BGE_TX_LENGTHS, 0x2620);
+	val = 0x2620;
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5720)
+		val |= CSR_READ_4(sc, BGE_TX_LENGTHS) &
+		    (BGE_TXLEN_JMB_FRM_LEN_MSK | BGE_TXLEN_CNT_DN_VAL_MSK);
+	CSR_WRITE_4(sc, BGE_TX_LENGTHS, val);
 
 	/*
 	 * Specify which ring to use for packets that don't match
@@ -2054,6 +2083,11 @@ bge_blockinit(struct bge_softc *sc)
 		    sc->bge_asicrev == BGE_ASICREV_BCM57780)
 			val |= BGE_RDMAMODE_TSO6_ENABLE;
 	}
+
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5720)
+		val |= CSR_READ_4(sc, BGE_RDMA_MODE) &
+			BGE_RDMAMODE_H2BNC_VLAN_DET;
+
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5761 ||
 	    sc->bge_asicrev == BGE_ASICREV_BCM5784 ||
 	    sc->bge_asicrev == BGE_ASICREV_BCM5785 ||
@@ -2064,7 +2098,8 @@ bge_blockinit(struct bge_softc *sc)
 		 * Adjust tx margin to prevent TX data corruption and
 		 * fix internal FIFO overflow.
 		 */
-		if (sc->bge_asicrev == BGE_ASICREV_BCM5719) {
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+		    sc->bge_asicrev == BGE_ASICREV_BCM5720) {
 			dmactl &= ~(BGE_RDMA_RSRVCTRL_FIFO_LWM_MASK |
 			    BGE_RDMA_RSRVCTRL_FIFO_HWM_MASK |
 			    BGE_RDMA_RSRVCTRL_TXMRGN_MASK);
@@ -2081,7 +2116,8 @@ bge_blockinit(struct bge_softc *sc)
 		    BGE_RDMA_RSRVCTRL_FIFO_OFLW_FIX);
 	}
 
-	if (sc->bge_asicrev == BGE_ASICREV_BCM5719) {
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5720) {
 		CSR_WRITE_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL,
 		    CSR_READ_4(sc, BGE_RDMA_LSO_CRPTEN_CTRL) |
 		    BGE_RDMA_LSO_CRPTEN_CTRL_BLEN_BD_4K |
@@ -2240,6 +2276,7 @@ bge_probe(device_t dev)
 				case BCOM_DEVICEID_BCM5717:
 				case BCOM_DEVICEID_BCM5718:
 				case BCOM_DEVICEID_BCM5719:
+				case BCOM_DEVICEID_BCM5720:
 					id = pci_read_config(dev,
 					    BGE_PCI_GEN2_PRODID_ASICREV, 4);
 					break;
@@ -2764,6 +2801,7 @@ bge_attach(device_t dev)
 		case BCOM_DEVICEID_BCM5717:
 		case BCOM_DEVICEID_BCM5718:
 		case BCOM_DEVICEID_BCM5719:
+		case BCOM_DEVICEID_BCM5720:
 			sc->bge_chipid = pci_read_config(dev,
 			    BGE_PCI_GEN2_PRODID_ASICREV, 4);
 			break;
@@ -2795,12 +2833,14 @@ bge_attach(device_t dev)
 	  * BCM5704  |   1   |   X   |   1   |   X   |
 	  * BCM5717  |   1   |   8   |   2   |   9   |
 	  * BCM5719  |   1   |   8   |   2   |   9   |
+	  * BCM5720  |   1   |   8   |   2   |   9   |
 	  *
 	  * Other addresses may respond but they are not
 	  * IEEE compliant PHYs and should be ignored.
 	  */
 	if (sc->bge_asicrev == BGE_ASICREV_BCM5717 ||
-	    sc->bge_asicrev == BGE_ASICREV_BCM5719) {
+	    sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+	    sc->bge_asicrev == BGE_ASICREV_BCM5720) {
 		f = pci_get_function(dev);
 		if (sc->bge_chipid == BGE_CHIPID_BCM5717_A0) {
 			if (CSR_READ_4(sc, BGE_SGDIG_STS) &
@@ -2835,6 +2875,7 @@ bge_attach(device_t dev)
 	switch (sc->bge_asicrev) {
 	case BGE_ASICREV_BCM5717:
 	case BGE_ASICREV_BCM5719:
+	case BGE_ASICREV_BCM5720:
 	case BGE_ASICREV_BCM57765:
 		sc->bge_flags |= BGE_FLAG_5717_PLUS | BGE_FLAG_5755_PLUS |
 		    BGE_FLAG_575X_PLUS | BGE_FLAG_5705_PLUS | BGE_FLAG_JUMBO |
@@ -2890,6 +2931,7 @@ bge_attach(device_t dev)
 	    sc->bge_asicrev != BGE_ASICREV_BCM5906 &&
 	    sc->bge_asicrev != BGE_ASICREV_BCM5717 &&
 	    sc->bge_asicrev != BGE_ASICREV_BCM5719 &&
+	    sc->bge_asicrev != BGE_ASICREV_BCM5720 &&
 	    sc->bge_asicrev != BGE_ASICREV_BCM5785 &&
 	    sc->bge_asicrev != BGE_ASICREV_BCM57765 &&
 	    sc->bge_asicrev != BGE_ASICREV_BCM57780) {
@@ -3010,7 +3052,8 @@ bge_attach(device_t dev)
 		 */
 		sc->bge_flags |= BGE_FLAG_PCIE;
 		sc->bge_expcap = reg;
-		if (sc->bge_asicrev == BGE_ASICREV_BCM5719)
+		if (sc->bge_asicrev == BGE_ASICREV_BCM5719 ||
+		    sc->bge_asicrev == BGE_ASICREV_BCM5720)
 			pci_set_max_read_req(dev, 2048);
 		else if (pci_get_max_read_req(dev) != 4096)
 			pci_set_max_read_req(dev, 4096);
@@ -3596,8 +3639,7 @@ bge_reset(struct bge_softc *sc)
 	}
 
 	/* Fix up byte swapping. */
-	CSR_WRITE_4(sc, BGE_MODE_CTL, BGE_DMA_SWAP_OPTIONS |
-	    BGE_MODECTL_BYTESWAP_DATA);
+	CSR_WRITE_4(sc, BGE_MODE_CTL, bge_dma_swap_options(sc));
 
 	/* Tell the ASF firmware we are up */
 	if (sc->bge_asf_mode & ASF_STACKUP)
@@ -3628,6 +3670,10 @@ bge_reset(struct bge_softc *sc)
 	}
 	DELAY(10000);
 
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5720)
+		BGE_CLRBIT(sc, BGE_CPMU_CLCK_ORIDE,
+		    CPMU_CLCK_ORIDE_MAC_ORIDE_EN);
+
 	return (0);
 }
 
@@ -4842,6 +4888,11 @@ bge_init_locked(struct bge_softc *sc)
 	mode = CSR_READ_4(sc, BGE_TX_MODE);
 	if (BGE_IS_5755_PLUS(sc) || sc->bge_asicrev == BGE_ASICREV_BCM5906)
 		mode |= BGE_TXMODE_MBUF_LOCKUP_FIX;
+	if (sc->bge_asicrev == BGE_ASICREV_BCM5720) {
+		mode &= ~(BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE);
+		mode |= CSR_READ_4(sc, BGE_TX_MODE) &
+		    (BGE_TXMODE_JMB_FRM_LEN | BGE_TXMODE_CNT_DN_MODE);
+	}
 	/* Turn on transmitter. */
 	CSR_WRITE_4(sc, BGE_TX_MODE, mode | BGE_TXMODE_ENABLE);
 

Modified: head/sys/dev/bge/if_bgereg.h
==============================================================================
--- head/sys/dev/bge/if_bgereg.h	Fri Oct 28 00:40:19 2011	(r226870)
+++ head/sys/dev/bge/if_bgereg.h	Fri Oct 28 01:04:40 2011	(r226871)
@@ -258,15 +258,6 @@
 #define	BGE_PCIMISCCTL_ASICREV_SHIFT	16
 
 #define	BGE_HIF_SWAP_OPTIONS	(BGE_PCIMISCCTL_ENDIAN_WORDSWAP)
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define	BGE_DMA_SWAP_OPTIONS \
-	BGE_MODECTL_WORDSWAP_NONFRAME| \
-	BGE_MODECTL_BYTESWAP_DATA|BGE_MODECTL_WORDSWAP_DATA
-#else
-#define	BGE_DMA_SWAP_OPTIONS \
-	BGE_MODECTL_WORDSWAP_NONFRAME|BGE_MODECTL_BYTESWAP_NONFRAME| \
-	BGE_MODECTL_BYTESWAP_DATA|BGE_MODECTL_WORDSWAP_DATA
-#endif
 
 #define	BGE_INIT \
 	(BGE_HIF_SWAP_OPTIONS|BGE_PCIMISCCTL_CLEAR_INTA| \
@@ -339,6 +330,7 @@
 #define	BGE_CHIPID_BCM5717_A0		0x05717000
 #define	BGE_CHIPID_BCM5717_B0		0x05717100
 #define	BGE_CHIPID_BCM5719_A0		0x05719000
+#define	BGE_CHIPID_BCM5720_A0		0x05720000
 #define	BGE_CHIPID_BCM57765_A0		0x57785000
 #define	BGE_CHIPID_BCM57765_B0		0x57785100
 
@@ -363,6 +355,7 @@
 /* BGE_PCI_PRODID_ASICREV ASIC rev. identifiers. */
 #define	BGE_ASICREV_BCM5717		0x5717
 #define	BGE_ASICREV_BCM5719		0x5719
+#define	BGE_ASICREV_BCM5720		0x5720
 #define	BGE_ASICREV_BCM5761		0x5761
 #define	BGE_ASICREV_BCM5784		0x5784
 #define	BGE_ASICREV_BCM5785		0x5785
@@ -807,6 +800,8 @@
 #define	BGE_TXMODE_BIGBACKOFF_ENABLE	0x00000020
 #define	BGE_TXMODE_LONGPAUSE_ENABLE	0x00000040
 #define	BGE_TXMODE_MBUF_LOCKUP_FIX	0x00000100
+#define	BGE_TXMODE_JMB_FRM_LEN		0x00400000
+#define	BGE_TXMODE_CNT_DN_MODE		0x00800000
 
 /* Transmit MAC status register */
 #define	BGE_TXSTAT_RX_XOFFED		0x00000001
@@ -820,6 +815,8 @@
 #define	BGE_TXLEN_SLOTTIME		0x000000FF
 #define	BGE_TXLEN_IPG			0x00000F00
 #define	BGE_TXLEN_CRS			0x00003000
+#define	BGE_TXLEN_JMB_FRM_LEN_MSK	0x00FF0000
+#define	BGE_TXLEN_CNT_DN_VAL_MSK	0xFF000000
 
 /* Receive MAC mode register */
 #define	BGE_RXMODE_RESET		0x00000001
@@ -1277,6 +1274,7 @@
 #define	BGE_CPMU_LSPD_1000MB_CLK	0x360C
 #define	BGE_CPMU_LNK_AWARE_PWRMD	0x3610
 #define	BGE_CPMU_HST_ACC		0x361C
+#define	BGE_CPMU_CLCK_ORIDE		0x3624
 #define	BGE_CPMU_CLCK_STAT		0x3630
 #define	BGE_CPMU_MUTEX_REQ		0x365C
 #define	BGE_CPMU_MUTEX_GNT		0x3660
@@ -1304,6 +1302,9 @@
 #define	BGE_CPMU_HST_ACC_MACCLK_MASK	0x001F0000
 #define	BGE_CPMU_HST_ACC_MACCLK_6_25	0x00130000
 
+/* Clock Speed Override Policy register */
+#define	CPMU_CLCK_ORIDE_MAC_ORIDE_EN	0x80000000
+
 /* CPMU Clock Status register */
 #define	BGE_CPMU_CLCK_STAT_MAC_CLCK_MASK	0x001F0000
 #define	BGE_CPMU_CLCK_STAT_MAC_CLCK_62_5	0x00000000
@@ -1551,6 +1552,7 @@
 #define	BGE_RDMAMODE_MULT_DMA_RD_DIS	0x01000000
 #define	BGE_RDMAMODE_TSO4_ENABLE	0x08000000
 #define	BGE_RDMAMODE_TSO6_ENABLE	0x10000000
+#define	BGE_RDMAMODE_H2BNC_VLAN_DET	0x20000000
 
 /* Read DMA status register */
 #define	BGE_RDMASTAT_PCI_TGT_ABRT_ATTN	0x00000004
@@ -1961,14 +1963,18 @@
 #define	BGE_MODECTL_WORDSWAP_NONFRAME	0x00000004
 #define	BGE_MODECTL_BYTESWAP_DATA	0x00000010
 #define	BGE_MODECTL_WORDSWAP_DATA	0x00000020
+#define	BGE_MODECTL_BYTESWAP_B2HRX_DATA	0x00000040
+#define	BGE_MODECTL_WORDSWAP_B2HRX_DATA	0x00000080
 #define	BGE_MODECTL_NO_FRAME_CRACKING	0x00000200
 #define	BGE_MODECTL_NO_RX_CRC		0x00000400
 #define	BGE_MODECTL_RX_BADFRAMES	0x00000800
 #define	BGE_MODECTL_NO_TX_INTR		0x00002000
 #define	BGE_MODECTL_NO_RX_INTR		0x00004000
 #define	BGE_MODECTL_FORCE_PCI32		0x00008000
+#define	BGE_MODECTL_B2HRX_ENABLE	0x00008000
 #define	BGE_MODECTL_STACKUP		0x00010000
 #define	BGE_MODECTL_HOST_SEND_BDS	0x00020000
+#define	BGE_MODECTL_HTX2B_ENABLE	0x00040000
 #define	BGE_MODECTL_TX_NO_PHDR_CSUM	0x00100000
 #define	BGE_MODECTL_RX_NO_PHDR_CSUM	0x00800000
 #define	BGE_MODECTL_TX_ATTN_INTR	0x01000000
@@ -2298,7 +2304,8 @@ struct bge_status_block {
 #define	BCOM_DEVICEID_BCM5717		0x1655
 #define	BCOM_DEVICEID_BCM5718		0x1656
 #define	BCOM_DEVICEID_BCM5719		0x1657
-#define	BCOM_DEVICEID_BCM5720		0x1658
+#define	BCOM_DEVICEID_BCM5720_PP	0x1658	/* Not released to public. */
+#define	BCOM_DEVICEID_BCM5720		0x165F
 #define	BCOM_DEVICEID_BCM5721		0x1659
 #define	BCOM_DEVICEID_BCM5722		0x165A
 #define	BCOM_DEVICEID_BCM5723		0x165B

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 01:10:59 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C7DBB106564A;
	Fri, 28 Oct 2011 01:10:59 +0000 (UTC)
	(envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E3F98FC0A;
	Fri, 28 Oct 2011 01:10: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 p9S1Ax6K034388;
	Fri, 28 Oct 2011 01:10:59 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S1Axs1034386;
	Fri, 28 Oct 2011 01:10:59 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201110280110.p9S1Axs1034386@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Fri, 28 Oct 2011 01:10:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226872 - head/sys/dev/bge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 01:10:59 -0000

Author: yongari
Date: Fri Oct 28 01:10:59 2011
New Revision: 226872
URL: http://svn.freebsd.org/changeset/base/226872

Log:
  Disable updating InputDiscards counter for BCM5717, BCM5718,
  BCM5719 A0 and BCM5720 A0 and add comment why driver does not try
  to read it.

Modified:
  head/sys/dev/bge/if_bge.c

Modified: head/sys/dev/bge/if_bge.c
==============================================================================
--- head/sys/dev/bge/if_bge.c	Fri Oct 28 01:04:40 2011	(r226871)
+++ head/sys/dev/bge/if_bge.c	Fri Oct 28 01:10:59 2011	(r226872)
@@ -4291,8 +4291,30 @@ bge_stats_update_regs(struct bge_softc *
 	    CSR_READ_4(sc, BGE_RXLP_LOCSTAT_DMA_HPWRQ_FULL);
 	stats->NoMoreRxBDs +=
 	    CSR_READ_4(sc, BGE_RXLP_LOCSTAT_OUT_OF_BDS);
-	stats->InputDiscards +=
-	    CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS);
+	/*
+	 * XXX
+	 * Unlike other controllers, BGE_RXLP_LOCSTAT_IFIN_DROPS
+	 * counter of BCM5717, BCM5718, BCM5719 A0 and BCM5720 A0
+	 * includes number of unwanted multicast frames.  This comes
+	 * from silicon bug and known workaround to get rough(not
+	 * exact) counter is to enable interrupt on MBUF low water
+	 * attention.  This can be accomplished by setting
+	 * BGE_HCCMODE_ATTN bit of BGE_HCC_MODE,
+	 * BGE_BMANMODE_LOMBUF_ATTN bit of BGE_BMAN_MODE and
+	 * BGE_MODECTL_FLOWCTL_ATTN_INTR bit of BGE_MODE_CTL.
+	 * However that change would generate more interrupts and
+	 * there are still possibilities of losing multiple frames
+	 * during BGE_MODECTL_FLOWCTL_ATTN_INTR interrupt handling.
+	 * Given that the workaround still would not get correct
+	 * counter I don't think it's worth to implement it.  So
+	 * ignore reading the counter on controllers that have the
+	 * silicon bug.
+	 */
+	if (sc->bge_asicrev != BGE_ASICREV_BCM5717 &&
+	    sc->bge_chipid != BGE_CHIPID_BCM5719_A0 &&
+	    sc->bge_chipid != BGE_CHIPID_BCM5720_A0)
+		stats->InputDiscards +=
+		    CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_DROPS);
 	stats->InputErrors +=
 	    CSR_READ_4(sc, BGE_RXLP_LOCSTAT_IFIN_ERRORS);
 	stats->RecvThresholdHit +=

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 02:09:20 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D77D106564A;
	Fri, 28 Oct 2011 02:09:20 +0000 (UTC)
	(envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4])
	by mx1.freebsd.org (Postfix) with ESMTP id D885D8FC0C;
	Fri, 28 Oct 2011 02:09:19 +0000 (UTC)
Received: from sa-nc-common-207.static.jnpr.net (natint3.juniper.net
	[66.129.224.36]) (authenticated bits=0)
	by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p9S29995010533
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Thu, 27 Oct 2011 19:09:17 -0700 (PDT)
	(envelope-from marcel@xcllnt.net)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Marcel Moolenaar 
In-Reply-To: <1319721247.41652.16.camel@bauer.cse.buffalo.edu>
Date: Thu, 27 Oct 2011 19:09:09 -0700
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201110271307.p9RD7nAx007728@svn.freebsd.org>
	<1319721247.41652.16.camel@bauer.cse.buffalo.edu>
To: Ken Smith 
X-Mailer: Apple Mail (2.1251.1)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r226835 - in head/sys: amd64/conf i386/conf
	ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 02:09:20 -0000


On Oct 27, 2011, at 6:14 AM, Ken Smith wrote:
> 
> In response to one of my commits done to the ia64 GENERIC I received
> some feedback giving a long list of issues (style, formatting, seemingly
> gratuitous differences, annoyances, etc.) with the whole set of GENERIC
> config files.  If anyone knows a reason I should NOT act on the list
> to bring all the GENERIC's into style compliance and whatnot let me
> know.  If nobody screams I'll do what I can to fix them up in head
> some time after 9.0 is finished.

If you're doing this in response to a private email, I very much
object if this is done without a review. I would really hate to
see a lot of churn on the stable branch after RC1 for no reason.

FYI,

-- 
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 02:35:32 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 86AC1106566B;
	Fri, 28 Oct 2011 02:35:32 +0000 (UTC)
	(envelope-from kensmith@buffalo.edu)
Received: from localmailB.acsu.buffalo.edu (localmailb.acsu.buffalo.edu
	[128.205.5.200])
	by mx1.freebsd.org (Postfix) with ESMTP id 53B7E8FC08;
	Fri, 28 Oct 2011 02:35:31 +0000 (UTC)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localhost (Postfix) with SMTP id 975285DB0;
	Thu, 27 Oct 2011 22:35:25 -0400 (EDT)
Received: from localmailB.acsu.buffalo.edu (localhost [127.0.0.1])
	by localmailB.acsu.buffalo.edu (Postfix) with ESMTP id 20B695E8ED;
	Thu, 27 Oct 2011 22:35:24 -0400 (EDT)
Received: from smtp3.acsu.buffalo.edu (smtp3.acsu.buffalo.edu [128.205.5.226])
	by localmailB.acsu.buffalo.edu (Prefixe) with ESMTP id 192395E8CF;
	Thu, 27 Oct 2011 22:35:24 -0400 (EDT)
Received: from ken-smiths-macbook-pro.local
	(cpe-72-231-248-9.buffalo.res.rr.com [72.231.248.9])
	(Authenticated sender: kensmith@buffalo.edu)
	by smtp3.acsu.buffalo.edu (Postfix) with ESMTPSA id BA4AE468B3;
	Thu, 27 Oct 2011 22:35:21 -0400 (EDT)
Message-ID: <4EAA14E6.5070007@buffalo.edu>
Date: Thu, 27 Oct 2011 22:35:18 -0400
From: Ken Smith 
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7;
	rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Marcel Moolenaar 
References: <201110271307.p9RD7nAx007728@svn.freebsd.org>
	<1319721247.41652.16.camel@bauer.cse.buffalo.edu>
	
In-Reply-To: 
X-Enigmail-Version: 1.3.2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-PM-EL-Spam-Prob: XX: 28%
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r226835 - in head/sys: amd64/conf i386/conf
 ia64/conf pc98/conf powerpc/conf sparc64/conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 02:35:32 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/27/11 10:09 PM, Marcel Moolenaar wrote:
> 
> On Oct 27, 2011, at 6:14 AM, Ken Smith wrote:
>> 
>> In response to one of my commits done to the ia64 GENERIC I
>> received some feedback giving a long list of issues (style,
>> formatting, seemingly gratuitous differences, annoyances, etc.)
>> with the whole set of GENERIC config files.  If anyone knows a
>> reason I should NOT act on the list to bring all the GENERIC's
>> into style compliance and whatnot let me know.  If nobody screams
>> I'll do what I can to fix them up in head some time after 9.0 is
>> finished.
> 
> If you're doing this in response to a private email, I very much 
> object if this is done without a review. I would really hate to see
> a lot of churn on the stable branch after RC1 for no reason.
> 
> FYI,
> 

It is in response to private email.  I would not do the commit without
getting review from at least the primary architecture maintainers and,
assuming it winds up being acceptable to the reviewers, I have no
intention of MFCing it.

- -- 
						Ken Smith
- - From there to here, from here to      |       kensmith@buffalo.edu
  there, funny things are everywhere.   |
                      - Theodor Geisel  |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6qFOYACgkQ/G14VSmup/bqcgCgmf6hcDujuGu/6ux75pIkkjly
gd0AnjzQt++xzFf5WsIKqKhhKIeKod5e
=hcFB
-----END PGP SIGNATURE-----

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 03:58:33 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 917FD106564A;
	Fri, 28 Oct 2011 03:58:33 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 80AB58FC12;
	Fri, 28 Oct 2011 03:58:33 +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 p9S3wXsO040657;
	Fri, 28 Oct 2011 03:58:33 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S3wXYm040655;
	Fri, 28 Oct 2011 03:58:33 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110280358.p9S3wXYm040655@svn.freebsd.org>
From: Qing Li 
Date: Fri, 28 Oct 2011 03:58:33 +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: r226877 - stable/8/sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 03:58:33 -0000

Author: qingli
Date: Fri Oct 28 03:58:33 2011
New Revision: 226877
URL: http://svn.freebsd.org/changeset/base/226877

Log:
  MFC 226713
  
  Exclude host routes when checking for prefix coverage on multiple
  interfaces. A host route has a NULL mask so check for that condition.
  I have also been told by developers who customize the packet output
  path with direct manipulation of the route entry (or the outgoing
  interface to be specific). This patch checks for the route mask
  explicitly to make sure custom code will not panic.
  
  PR:		kern/161805

Modified:
  stable/8/sys/netinet/in.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)

Modified: stable/8/sys/netinet/in.c
==============================================================================
--- stable/8/sys/netinet/in.c	Fri Oct 28 03:42:41 2011	(r226876)
+++ stable/8/sys/netinet/in.c	Fri Oct 28 03:58:33 2011	(r226877)
@@ -1449,12 +1449,21 @@ in_lltable_rtcheck(struct ifnet *ifp, u_
 	 * on one interface and the corresponding outgoing packet leaves
 	 * another interface.
 	 */
-	if (rt->rt_ifp != ifp) {
+	if (!(rt->rt_flags & RTF_HOST) && rt->rt_ifp != ifp) {
 		const char *sa, *mask, *addr, *lim;
 		int len;
 
-		sa = (const char *)rt_key(rt);
 		mask = (const char *)rt_mask(rt);
+		/*
+		 * Just being extra cautious to avoid some custom
+		 * code getting into trouble.
+		 */
+		if (mask == NULL) {
+			RTFREE_LOCKED(rt);
+			return (EINVAL);
+		}
+
+		sa = (const char *)rt_key(rt);
 		addr = (const char *)l3addr;
 		len = ((const struct sockaddr_in *)l3addr)->sin_len;
 		lim = addr + len;

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 04:04:22 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 29F951065675;
	Fri, 28 Oct 2011 04:04:22 +0000 (UTC)
	(envelope-from qingli@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 194C48FC0C;
	Fri, 28 Oct 2011 04:04:22 +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 p9S44Ljl040932;
	Fri, 28 Oct 2011 04:04:21 GMT (envelope-from qingli@svn.freebsd.org)
Received: (from qingli@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S44L19040930;
	Fri, 28 Oct 2011 04:04:21 GMT (envelope-from qingli@svn.freebsd.org)
Message-Id: <201110280404.p9S44L19040930@svn.freebsd.org>
From: Qing Li 
Date: Fri, 28 Oct 2011 04:04:21 +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: r226878 - stable/8/sys/netinet6
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 04:04:22 -0000

Author: qingli
Date: Fri Oct 28 04:04:21 2011
New Revision: 226878
URL: http://svn.freebsd.org/changeset/base/226878

Log:
  MFC 226451
  
  The IPv6 code was influx at the time of r196865 due to the L2/L3
  separation rewrite changes. r196865 was committed to fix a scope
  violation problem in the following test scenario:
  
    box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast
    box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64
  
    box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64
  
    em0 and re0 are on the same link.
  
    box-2# ping6 2001:db8:1::
    PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::
  
  the ICMPv6 response should have a source address of em1, which
  is 2001:db8:2::1, not the link-local address of em0.
  
  That code is no longer necessary and breaks the IPv6-Ready logo
  testing, so revert it now.
  
  Reviewed by:	hrs

Modified:
  stable/8/sys/netinet6/icmp6.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)

Modified: stable/8/sys/netinet6/icmp6.c
==============================================================================
--- stable/8/sys/netinet6/icmp6.c	Fri Oct 28 03:58:33 2011	(r226877)
+++ stable/8/sys/netinet6/icmp6.c	Fri Oct 28 04:04:21 2011	(r226878)
@@ -2161,10 +2161,6 @@ icmp6_reflect(struct mbuf *m, size_t off
 		}
 	}
 
-	if ((srcp != NULL) && 
-	    (in6_addrscope(srcp) != in6_addrscope(&ip6->ip6_src)))
-		srcp = NULL;
-
 	if (srcp == NULL) {
 		int e;
 		struct sockaddr_in6 sin6;

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 06:03:39 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0268D106564A;
	Fri, 28 Oct 2011 06:03:39 +0000 (UTC) (envelope-from rea@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E6CDF8FC0A;
	Fri, 28 Oct 2011 06:03:38 +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 p9S63cK7045253;
	Fri, 28 Oct 2011 06:03:38 GMT (envelope-from rea@svn.freebsd.org)
Received: (from rea@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9S63cVj045250;
	Fri, 28 Oct 2011 06:03:38 GMT (envelope-from rea@svn.freebsd.org)
Message-Id: <201110280603.p9S63cVj045250@svn.freebsd.org>
From: Eygene Ryabinkin 
Date: Fri, 28 Oct 2011 06:03:38 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226879 - head/etc/rc.d
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 06:03:39 -0000

Author: rea (ports committer)
Date: Fri Oct 28 06:03:38 2011
New Revision: 226879
URL: http://svn.freebsd.org/changeset/base/226879

Log:
  Fix handling of rc_force in /etc/rc.d/dhclient
  
  Variable 'rc_force' is accessible only at the time of rc_run_command,
  so it can't be examined from the script's main code.
  
  Spotted by:	hrs
  Reviewed by:	hrs, des
  Approved by:	des
  MFC after:	2 weeks

Modified:
  head/etc/rc.d/dhclient

Modified: head/etc/rc.d/dhclient
==============================================================================
--- head/etc/rc.d/dhclient	Fri Oct 28 04:04:21 2011	(r226878)
+++ head/etc/rc.d/dhclient	Fri Oct 28 06:03:38 2011	(r226879)
@@ -15,9 +15,21 @@ name="dhclient"
 rcvar=
 pidfile="/var/run/${name}.${ifn}.pid"
 start_precmd="dhclient_prestart"
+stop_precmd="dhclient_pre_check"
+
+# rc_force check can only be done at the run_rc_command
+# time, so we're testing it in the pre* hooks.
+dhclient_pre_check()
+{
+	if [ -z "${rc_force}" ] && ! dhcpif $ifn; then
+		err 1 "'$ifn' is not a DHCP-enabled interface"
+	fi
+}
 
 dhclient_prestart()
 {
+	dhclient_pre_check
+
 	# Interface-specific flags (see rc.subr for $flags setting)
 	specific=$(get_if_var $ifn dhclient_flags_IF)
 	if [ -z "$flags" -a -n "$specific" ]; then
@@ -38,11 +50,8 @@ load_rc_config network
 if [ -z $ifn ] ; then
 	# only complain if a command was specified but no interface
 	if [ -n "$1" ] ; then
-		echo 1>&2 "$0: no interface specified"
-		return 1
+		err 1 "$0: no interface specified"
 	fi
-elif [ -z "${rc_force}" ] && ! dhcpif $ifn; then
-	return 1
 fi
 
 run_rc_command "$1"

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 11:45:25 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 567F8106564A;
	Fri, 28 Oct 2011 11:45:25 +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 467FC8FC18;
	Fri, 28 Oct 2011 11:45:25 +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 p9SBjPoR059148;
	Fri, 28 Oct 2011 11:45:25 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SBjPsJ059146;
	Fri, 28 Oct 2011 11:45:25 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201110281145.p9SBjPsJ059146@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Fri, 28 Oct 2011 11:45:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226880 - head/sys/geom/part
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 11:45:25 -0000

Author: ae
Date: Fri Oct 28 11:45:24 2011
New Revision: 226880
URL: http://svn.freebsd.org/changeset/base/226880

Log:
  Our geom withering function could take some time before geom with its
  providers and consumers will be destroyed.  Before take some actions
  with a geom, check that it is not destroyed at the moment.
  
  Tested by:	nwhitehorn
  MFC after:	1 week

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Fri Oct 28 06:03:38 2011	(r226879)
+++ head/sys/geom/part/g_part.c	Fri Oct 28 11:45:24 2011	(r226880)
@@ -451,6 +451,10 @@ g_part_parm_geom(struct gctl_req *req, c
 		gctl_error(req, "%d %s '%s'", EINVAL, name, gname);
 		return (EINVAL);
 	}
+	if ((gp->flags & G_GEOM_WITHER) != 0) {
+		gctl_error(req, "%d %s", ENXIO, gname);
+		return (ENXIO);
+	}
 	*v = gp;
 	return (0);
 }

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 12:47:37 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D39B2106564A;
	Fri, 28 Oct 2011 12:47:37 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B9D5C8FC08;
	Fri, 28 Oct 2011 12:47:37 +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 p9SClba5061057;
	Fri, 28 Oct 2011 12:47:37 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SClb9u061054;
	Fri, 28 Oct 2011 12:47:37 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201110281247.p9SClb9u061054@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Fri, 28 Oct 2011 12:47:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226881 - head/usr.bin/who
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 12:47:38 -0000

Author: pluknet
Date: Fri Oct 28 12:47:37 2011
New Revision: 226881
URL: http://svn.freebsd.org/changeset/base/226881

Log:
  Add the XSI option -b to show date of the last reboot.
  
  That required to increase the LINE field to fit the output of -b.
  While here, change the row() function to take a const argument.
  
  In collaboration with:	ed

Modified:
  head/usr.bin/who/who.1
  head/usr.bin/who/who.c

Modified: head/usr.bin/who/who.1
==============================================================================
--- head/usr.bin/who/who.1	Fri Oct 28 11:45:24 2011	(r226880)
+++ head/usr.bin/who/who.1	Fri Oct 28 12:47:37 2011	(r226881)
@@ -28,7 +28,7 @@
 .\"     @(#)who.1	8.2 (Berkeley) 12/30/93
 .\" $FreeBSD$
 .\"
-.Dd May 8, 2002
+.Dd Oct 28, 2011
 .Dt WHO 1
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd display who is on the system
 .Sh SYNOPSIS
 .Nm
-.Op Fl HmqsTu
+.Op Fl bHmqsTu
 .Op Cm am I
 .Op Ar file
 .Sh DESCRIPTION
@@ -48,6 +48,8 @@ remote hostname if not local.
 .Pp
 The options are as follows:
 .Bl -tag -width indent
+.It Fl b
+Write the time and date of the last system reboot.
 .It Fl H
 Write column headings above the output.
 .It Fl m

Modified: head/usr.bin/who/who.c
==============================================================================
--- head/usr.bin/who/who.c	Fri Oct 28 11:45:24 2011	(r226880)
+++ head/usr.bin/who/who.c	Fri Oct 28 12:47:37 2011	(r226881)
@@ -48,14 +48,16 @@ __FBSDID("$FreeBSD$");
 #include 
 
 static void	heading(void);
+static void	boottime(void);
 static void	process_utmp(void);
 static void	quick(void);
-static void	row(struct utmpx *);
+static void	row(const struct utmpx *);
 static int	ttywidth(void);
 static void	usage(void);
 static void	whoami(void);
 
 static int	Hflag;			/* Write column headings */
+static int	bflag;			/* Show date of the last reboot */
 static int	mflag;			/* Show info about current terminal */
 static int	qflag;			/* "Quick" mode */
 static int	sflag;			/* Show name, line, time */
@@ -69,7 +71,7 @@ main(int argc, char *argv[])
 
 	setlocale(LC_TIME, "");
 
-	while ((ch = getopt(argc, argv, "HTmqsu")) != -1) {
+	while ((ch = getopt(argc, argv, "HTbmqsu")) != -1) {
 		switch (ch) {
 		case 'H':		/* Write column headings */
 			Hflag = 1;
@@ -77,6 +79,9 @@ main(int argc, char *argv[])
 		case 'T':		/* Show terminal state */
 			Tflag = 1;
 			break;
+		case 'b':		/* Show date of the last reboot */
+			bflag = 1;
+			break;
 		case 'm':		/* Show info about current terminal */
 			mflag = 1;
 			break;
@@ -121,6 +126,8 @@ main(int argc, char *argv[])
 			heading();
 		if (mflag)
 			whoami();
+		else if (bflag)
+			boottime();
 		else
 			process_utmp();
 	}
@@ -134,7 +141,7 @@ static void
 usage(void)
 {
 
-	fprintf(stderr, "usage: who [-HmqsTu] [am I] [file]\n");
+	fprintf(stderr, "usage: who [-bHmqsTu] [am I] [file]\n");
 	exit(1);
 }
 
@@ -145,14 +152,14 @@ heading(void)
 	printf("%-16s ", "NAME");
 	if (Tflag)
 		printf("S ");
-	printf("%-8s %-12s ", "LINE", "TIME");
+	printf("%-12s %-12s ", "LINE", "TIME");
 	if (uflag)
 		printf("IDLE  ");
 	printf("%-16s\n", "FROM");
 }
 
 static void
-row(struct utmpx *ut)
+row(const struct utmpx *ut)
 {
 	char buf[80], tty[PATH_MAX];
 	struct stat sb;
@@ -178,7 +185,10 @@ row(struct utmpx *ut)
 	printf("%-16s ", ut->ut_user);
 	if (Tflag)
 		printf("%c ", state);
-	printf("%-8s ", ut->ut_line);
+	if (ut->ut_type == BOOT_TIME)
+		printf("%-12s ", "system boot");
+	else
+		printf("%-12s ", ut->ut_line);
 	t = ut->ut_tv.tv_sec;
 	tm = localtime(&t);
 	strftime(buf, sizeof(buf), d_first ? "%e %b %R" : "%b %e %R", tm);
@@ -225,6 +235,17 @@ process_utmp(void)
 }
 
 static void
+boottime(void)
+{
+	struct utmpx u1, *u2;
+
+	u1.ut_type = BOOT_TIME;
+	if ((u2 = getutxid(&u1)) == NULL)
+		return;
+	row(u2);
+}
+
+static void
 quick(void)
 {
 	struct utmpx *utx;

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 15:22:52 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 49E28106564A;
	Fri, 28 Oct 2011 15:22:52 +0000 (UTC)
	(envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3A3658FC08;
	Fri, 28 Oct 2011 15:22:52 +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 p9SFMqkp066226;
	Fri, 28 Oct 2011 15:22:52 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SFMqWn066224;
	Fri, 28 Oct 2011 15:22:52 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201110281522.p9SFMqWn066224@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Fri, 28 Oct 2011 15:22:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226882 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 15:22:52 -0000

Author: pluknet
Date: Fri Oct 28 15:22:51 2011
New Revision: 226882
URL: http://svn.freebsd.org/changeset/base/226882

Log:
  Fix arguments list for proc:::signal-discard DTrace probe.
  
  Reported by:	Anton Yuzhaninov 
  MFC after:	1 week

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==============================================================================
--- head/sys/kern/kern_sig.c	Fri Oct 28 12:47:37 2011	(r226881)
+++ head/sys/kern/kern_sig.c	Fri Oct 28 15:22:51 2011	(r226882)
@@ -2058,7 +2058,7 @@ tdsendsignal(struct proc *p, struct thre
 	 */
 	mtx_lock(&ps->ps_mtx);
 	if (SIGISMEMBER(ps->ps_sigignore, sig)) {
-		SDT_PROBE(proc, kernel, , signal_discard, ps, td, sig, 0, 0 );
+		SDT_PROBE(proc, kernel, , signal_discard, td, p, sig, 0, 0 );
 
 		mtx_unlock(&ps->ps_mtx);
 		if (ksi && (ksi->ksi_flags & KSI_INS))

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 15:44:10 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1039C106564A;
	Fri, 28 Oct 2011 15:44:10 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 008568FC12;
	Fri, 28 Oct 2011 15:44:10 +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 p9SFi9MF066995;
	Fri, 28 Oct 2011 15:44:09 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SFi9wm066993;
	Fri, 28 Oct 2011 15:44:09 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110281544.p9SFi9wm066993@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 28 Oct 2011 15:44:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226884 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 15:44:10 -0000

Author: adrian
Date: Fri Oct 28 15:44:09 2011
New Revision: 226884
URL: http://svn.freebsd.org/changeset/base/226884

Log:
  When punting frames to the RX tap, free the mbufs since we've tampered with
  their length.
  
  Without this, an error frame mbuf would:
  
  * have its size adjusted;
  * thrown at the radiotap code;
  * then since it's never consumed, the rxbuf/mbuf is then re-added to the
    RX descriptor list with the small size;
  * .. and the hardware ends up (sometimes) only DMA'ing part of a frame into
    the small buffer, chaining RX frames together (setting the more flag).
  
  I discovered this particular issue when doing some promiscuous radiotap
  testing; I found that I'd occasionally get rs_more set in RX descriptors
  w/ the first frame length being very small (sub-100 bytes.) The driver
  handles 2-descriptor RX frames (but not more), so this still worked; it
  was just odd.
  
  This is suboptimal and may benefit from being replaced with caching
  the m_pkthdr_len and m_len fields, then restoring them after completion.

Modified:
  head/sys/dev/ath/if_ath.c

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Fri Oct 28 15:38:11 2011	(r226883)
+++ head/sys/dev/ath/if_ath.c	Fri Oct 28 15:44:09 2011	(r226884)
@@ -3624,8 +3624,10 @@ rx_error:
 				/* NB: bpf needs the mbuf length setup */
 				len = rs->rs_datalen;
 				m->m_pkthdr.len = m->m_len = len;
+				bf->bf_m = NULL;
 				ath_rx_tap(ifp, m, rs, tsf, nf);
 				ieee80211_radiotap_rx_all(ic, m);
+				m_freem(m);
 			}
 			/* XXX pass MIC errors up for s/w reclaculation */
 			goto rx_next;

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 15:47:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCE6E106574B;
	Fri, 28 Oct 2011 15:47:14 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BD3FE8FC0A;
	Fri, 28 Oct 2011 15:47:14 +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 p9SFlEwV067129;
	Fri, 28 Oct 2011 15:47:14 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SFlEk7067127;
	Fri, 28 Oct 2011 15:47:14 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110281547.p9SFlEk7067127@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 28 Oct 2011 15:47:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226885 - head/sys/net80211
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 15:47:14 -0000

Author: adrian
Date: Fri Oct 28 15:47:14 2011
New Revision: 226885
URL: http://svn.freebsd.org/changeset/base/226885

Log:
  Include the tid when printing out crypto replay errors.
  
  I found this useful when trying to debug the AR9160 STA RX filter issue -
  I'd get crypto reply errors but it wasn't entirely clear which TID it
  was for.

Modified:
  head/sys/net80211/ieee80211_freebsd.c

Modified: head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- head/sys/net80211/ieee80211_freebsd.c	Fri Oct 28 15:44:09 2011	(r226884)
+++ head/sys/net80211/ieee80211_freebsd.c	Fri Oct 28 15:47:14 2011	(r226885)
@@ -571,8 +571,8 @@ ieee80211_notify_replay_failure(struct i
 	struct ifnet *ifp = vap->iv_ifp;
 
 	IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr2,
-	    "%s replay detected ",
-	    k->wk_cipher->ic_name, (intmax_t) rsc,
+	    "%s replay detected tid %d ",
+	    tid, k->wk_cipher->ic_name, (intmax_t) rsc,
 	    (intmax_t) k->wk_keyrsc[tid],
 	    k->wk_keyix, k->wk_rxkeyix);
 

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 17:53:35 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 865F3106566C;
	Fri, 28 Oct 2011 17:53:35 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 767968FC0A;
	Fri, 28 Oct 2011 17:53:35 +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 p9SHrZWs071298;
	Fri, 28 Oct 2011 17:53:35 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SHrZ1E071295;
	Fri, 28 Oct 2011 17:53:35 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201110281753.p9SHrZ1E071295@svn.freebsd.org>
From: Xin LI 
Date: Fri, 28 Oct 2011 17:53:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226887 - head/sys/dev/tws
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 17:53:35 -0000

Author: delphij
Date: Fri Oct 28 17:53:34 2011
New Revision: 226887
URL: http://svn.freebsd.org/changeset/base/226887

Log:
  Don't expose a constant array into global namespace.
  
  Reported by:	Ruslan Yakovlev  via yongari
  MFC after:	3 days

Modified:
  head/sys/dev/tws/tws_services.c
  head/sys/dev/tws/tws_services.h

Modified: head/sys/dev/tws/tws_services.c
==============================================================================
--- head/sys/dev/tws/tws_services.c	Fri Oct 28 17:38:27 2011	(r226886)
+++ head/sys/dev/tws/tws_services.c	Fri Oct 28 17:53:34 2011	(r226887)
@@ -53,7 +53,7 @@ struct tws_sense *tws_find_sense_from_mf
 
 
 
-struct error_desc array[] = {
+static struct error_desc array[] = {
     { "Cannot add sysctl tree node", 0x2000, ERROR,
        "%s: (0x%02X: 0x%04X): %s:\n", "ERROR" },
     { "Register window not available", 0x2001, ERROR,

Modified: head/sys/dev/tws/tws_services.h
==============================================================================
--- head/sys/dev/tws/tws_services.h	Fri Oct 28 17:38:27 2011	(r226886)
+++ head/sys/dev/tws/tws_services.h	Fri Oct 28 17:53:34 2011	(r226887)
@@ -114,7 +114,6 @@ struct error_desc {
     char *error_str;
 };
 
-extern struct error_desc array[];
 /* ----------- q services ------------- */
 
 #define TWS_FREE_Q        0

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 20:00:31 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 217191065670;
	Fri, 28 Oct 2011 20:00:31 +0000 (UTC) (envelope-from rmh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EBB658FC0A;
	Fri, 28 Oct 2011 20:00:30 +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 p9SK0UHQ075596;
	Fri, 28 Oct 2011 20:00:30 GMT (envelope-from rmh@svn.freebsd.org)
Received: (from rmh@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SK0Uqr075594;
	Fri, 28 Oct 2011 20:00:30 GMT (envelope-from rmh@svn.freebsd.org)
Message-Id: <201110282000.p9SK0Uqr075594@svn.freebsd.org>
From: Robert Millan 
Date: Fri, 28 Oct 2011 20:00:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226888 - head/sys/dev/syscons
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 20:00:31 -0000

Author: rmh
Date: Fri Oct 28 20:00:30 2011
New Revision: 226888
URL: http://svn.freebsd.org/changeset/base/226888

Log:
  Add a few improvements to utf-8 -> cp436 console map
  (mostly with Catalan characters in mind, but it probably
  benefits other languages).
  
  The new mappings are as follows:
  
  ▮ -> █
  ÀÈÍÏÓÒÚ -> AEIIOOU
  ŀ / Ŀ -> l / L
  
  Reviewed by:	ed
  Approved by:	kib (mentor)

Modified:
  head/sys/dev/syscons/scterm-teken.c

Modified: head/sys/dev/syscons/scterm-teken.c
==============================================================================
--- head/sys/dev/syscons/scterm-teken.c	Fri Oct 28 17:53:34 2011	(r226887)
+++ head/sys/dev/syscons/scterm-teken.c	Fri Oct 28 20:00:30 2011	(r226888)
@@ -424,10 +424,18 @@ static const struct unicp437 cp437table[
 	{ 0x00b6, 0x14, 0x00 }, { 0x00b7, 0xfa, 0x00 },
 	{ 0x00ba, 0xa7, 0x00 }, { 0x00bb, 0xaf, 0x00 },
 	{ 0x00bc, 0xac, 0x00 }, { 0x00bd, 0xab, 0x00 },
-	{ 0x00bf, 0xa8, 0x00 }, { 0x00c4, 0x8e, 0x01 },
-	{ 0x00c6, 0x92, 0x00 }, { 0x00c7, 0x80, 0x00 },
-	{ 0x00c9, 0x90, 0x00 }, { 0x00d1, 0xa5, 0x00 },
-	{ 0x00d6, 0x99, 0x00 }, { 0x00dc, 0x9a, 0x00 },
+	{ 0x00bf, 0xa8, 0x00 }, { 0x00c0, 0x41, 0x00 },
+	{ 0x00c1, 0x41, 0x00 }, { 0x00c2, 0x41, 0x00 },
+	{ 0x00c4, 0x8e, 0x01 }, { 0x00c6, 0x92, 0x00 }, 
+	{ 0x00c7, 0x80, 0x00 }, { 0x00c8, 0x45, 0x00 },
+	{ 0x00c9, 0x90, 0x00 }, { 0x00ca, 0x45, 0x00 },
+	{ 0x00cb, 0x45, 0x00 }, { 0x00cc, 0x49, 0x00 },
+	{ 0x00cd, 0x49, 0x00 }, { 0x00ce, 0x49, 0x00 },
+	{ 0x00cf, 0x49, 0x00 }, { 0x00d1, 0xa5, 0x00 },
+	{ 0x00d2, 0x4f, 0x00 }, { 0x00d3, 0x4f, 0x00 },
+	{ 0x00d4, 0x4f, 0x00 }, { 0x00d6, 0x99, 0x00 }, 
+	{ 0x00d9, 0x55, 0x00 }, { 0x00da, 0x55, 0x00 },
+	{ 0x00db, 0x55, 0x00 }, { 0x00dc, 0x9a, 0x00 },
 	{ 0x00df, 0xe1, 0x00 }, { 0x00e0, 0x85, 0x00 },
 	{ 0x00e1, 0xa0, 0x00 }, { 0x00e2, 0x83, 0x00 },
 	{ 0x00e4, 0x84, 0x00 }, { 0x00e5, 0x86, 0x00 },
@@ -442,6 +450,7 @@ static const struct unicp437 cp437table[
 	{ 0x00f8, 0xed, 0x00 }, { 0x00f9, 0x97, 0x00 },
 	{ 0x00fa, 0xa3, 0x00 }, { 0x00fb, 0x96, 0x00 },
 	{ 0x00fc, 0x81, 0x00 }, { 0x00ff, 0x98, 0x00 },
+	{ 0x013f, 0x4c, 0x00 }, { 0x0140, 0x6c, 0x00 },
 	{ 0x0192, 0x9f, 0x00 }, { 0x0393, 0xe2, 0x00 },
 	{ 0x0398, 0xe9, 0x00 }, { 0x03a3, 0xe4, 0x00 },
 	{ 0x03a6, 0xe8, 0x00 }, { 0x03a9, 0xea, 0x00 },
@@ -490,7 +499,8 @@ static const struct unicp437 cp437table[
 	{ 0x2584, 0xdc, 0x00 }, { 0x2588, 0xdb, 0x00 },
 	{ 0x258c, 0xdd, 0x00 }, { 0x2590, 0xde, 0x00 },
 	{ 0x2591, 0xb0, 0x02 }, { 0x25a0, 0xfe, 0x00 },
-	{ 0x25ac, 0x16, 0x00 }, { 0x25b2, 0x1e, 0x00 },
+	{ 0x25ac, 0x16, 0x00 }, 
+	{ 0x25ae, 0xdb, 0x00 }, { 0x25b2, 0x1e, 0x00 },
 	{ 0x25ba, 0x10, 0x00 }, { 0x25bc, 0x1f, 0x00 },
 	{ 0x25c4, 0x11, 0x00 }, { 0x25cb, 0x09, 0x00 },
 	{ 0x25d8, 0x08, 0x00 }, { 0x25d9, 0x0a, 0x00 },

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 20:28:13 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85748106564A;
	Fri, 28 Oct 2011 20:28:13 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 754D48FC0C;
	Fri, 28 Oct 2011 20:28:13 +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 p9SKSDMr076510;
	Fri, 28 Oct 2011 20:28:13 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SKSDdO076508;
	Fri, 28 Oct 2011 20:28:13 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201110282028.p9SKSDdO076508@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Fri, 28 Oct 2011 20:28:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226889 - head/usr.bin/sed
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 20:28:13 -0000

Author: ache
Date: Fri Oct 28 20:28:13 2011
New Revision: 226889
URL: http://svn.freebsd.org/changeset/base/226889

Log:
  Update '}' description to reflect reality (and POSIX)
  
  PR:             96236
  Submitted by:   "Andreas Kohn" 
  MFC after:      7 days

Modified:
  head/usr.bin/sed/sed.1

Modified: head/usr.bin/sed/sed.1
==============================================================================
--- head/usr.bin/sed/sed.1	Fri Oct 28 20:00:30 2011	(r226888)
+++ head/usr.bin/sed/sed.1	Fri Oct 28 20:28:13 2011	(r226889)
@@ -343,7 +343,7 @@ can be preceded by white space and can b
 The function can be preceded by white space.
 The terminating
 .Dq }
-must be preceded by a newline or optional white space.
+must be preceded by a newline and optional white space.
 .Pp
 .Bl -tag -width "XXXXXX" -compact
 .It [2addr] function-list

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 21:08:41 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2FA53106566C;
	Fri, 28 Oct 2011 21:08:41 +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 18B168FC1C;
	Fri, 28 Oct 2011 21:08:41 +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 p9SL8emZ077945;
	Fri, 28 Oct 2011 21:08:40 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SL8eRJ077928;
	Fri, 28 Oct 2011 21:08:40 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201110282108.p9SL8eRJ077928@svn.freebsd.org>
From: Dimitry Andric 
Date: Fri, 28 Oct 2011 21:08:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226890 - in stable/9: . contrib/llvm/include/llvm
	contrib/llvm/include/llvm-c contrib/llvm/include/llvm-c/Transforms
	contrib/llvm/include/llvm/ADT
	contrib/llvm/include/llvm/Analysis co...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 21:08:41 -0000

Author: dim
Date: Fri Oct 28 21:08:39 2011
New Revision: 226890
URL: http://svn.freebsd.org/changeset/base/226890

Log:
  MFC r226633:
  
  Upgrade our copy of llvm/clang to r142614, from upstream's release_30
  branch.  This brings us very close to the 3.0 release, which is expected
  November 16, 2011.
  
  Approved by:	re (kib)

Added:
  stable/9/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h
  stable/9/contrib/llvm/include/llvm/ADT/TinyPtrVector.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h
  stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h
  stable/9/contrib/llvm/include/llvm/Analysis/LoopIterator.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Analysis/LoopIterator.h
  stable/9/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/CodeGen/LexicalScopes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
  stable/9/contrib/llvm/include/llvm/DebugInfo/
     - copied from r226633, head/contrib/llvm/include/llvm/DebugInfo/
  stable/9/contrib/llvm/include/llvm/MC/MCAsmBackend.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCAsmBackend.h
  stable/9/contrib/llvm/include/llvm/MC/MCAtom.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCAtom.h
  stable/9/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h
  stable/9/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCInstrAnalysis.h
  stable/9/contrib/llvm/include/llvm/MC/MCModule.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCModule.h
  stable/9/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h
  stable/9/contrib/llvm/include/llvm/MC/MCTargetAsmLexer.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCTargetAsmLexer.h
  stable/9/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h
  stable/9/contrib/llvm/include/llvm/MC/MachineLocation.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/MC/MachineLocation.h
  stable/9/contrib/llvm/include/llvm/Object/Archive.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Object/Archive.h
  stable/9/contrib/llvm/include/llvm/Object/MachO.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Object/MachO.h
  stable/9/contrib/llvm/include/llvm/Support/BlockFrequency.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/BlockFrequency.h
  stable/9/contrib/llvm/include/llvm/Support/Capacity.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/Capacity.h
  stable/9/contrib/llvm/include/llvm/Support/CodeGen.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/CodeGen.h
  stable/9/contrib/llvm/include/llvm/Support/DataExtractor.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/DataExtractor.h
  stable/9/contrib/llvm/include/llvm/Support/GCOV.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/GCOV.h
  stable/9/contrib/llvm/include/llvm/Support/TargetRegistry.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/TargetRegistry.h
  stable/9/contrib/llvm/include/llvm/Support/TargetSelect.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Support/TargetSelect.h
  stable/9/contrib/llvm/include/llvm/TableGen/
     - copied from r226633, head/contrib/llvm/include/llvm/TableGen/
  stable/9/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h
     - copied unchanged from r226633, head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h
  stable/9/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp
  stable/9/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp
  stable/9/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp
  stable/9/contrib/llvm/lib/CodeGen/LexicalScopes.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveRangeCalc.h
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h
  stable/9/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
  stable/9/contrib/llvm/lib/DebugInfo/
     - copied from r226633, head/contrib/llvm/lib/DebugInfo/
  stable/9/contrib/llvm/lib/MC/MCAsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCAsmBackend.cpp
  stable/9/contrib/llvm/lib/MC/MCAtom.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCAtom.cpp
  stable/9/contrib/llvm/lib/MC/MCCodeGenInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCCodeGenInfo.cpp
  stable/9/contrib/llvm/lib/MC/MCInstrAnalysis.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCInstrAnalysis.cpp
  stable/9/contrib/llvm/lib/MC/MCModule.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCModule.cpp
  stable/9/contrib/llvm/lib/MC/MCObjectFileInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp
  stable/9/contrib/llvm/lib/MC/MCTargetAsmLexer.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/MC/MCTargetAsmLexer.cpp
  stable/9/contrib/llvm/lib/Object/Archive.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Object/Archive.cpp
  stable/9/contrib/llvm/lib/Support/BlockFrequency.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Support/BlockFrequency.cpp
  stable/9/contrib/llvm/lib/Support/DataExtractor.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Support/DataExtractor.cpp
  stable/9/contrib/llvm/lib/TableGen/
     - copied from r226633, head/contrib/llvm/lib/TableGen/
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeBaseInfo.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MipsJITInfo.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsRelocations.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/Mips/MipsRelocations.h
  stable/9/contrib/llvm/lib/Target/PTX/InstPrinter/
     - copied from r226633, head/contrib/llvm/lib/Target/PTX/InstPrinter/
  stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXBaseInfo.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXFPRoundingModePass.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXFPRoundingModePass.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXInstrLoadStore.td
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXInstrLoadStore.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXMCInstLower.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXMCInstLower.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXParamManager.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXParamManager.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXParamManager.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXRegAlloc.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXRegAlloc.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PTX/PTXSelectionDAGInfo.h
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCBaseInfo.h
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
  stable/9/contrib/llvm/lib/VMCore/GCOV.cpp
     - copied unchanged from r226633, head/contrib/llvm/lib/VMCore/GCOV.cpp
  stable/9/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/SelectorLocationsKind.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/AST/SelectorLocationsKind.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/AST/VTTBuilder.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Basic/LLVM.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticConsumer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticConsumer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Lex/ModuleLoader.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/MultiInitializer.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Sema/MultiInitializer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Sema/SemaFixItUtils.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Weak.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Sema/Weak.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Serialization/ContinuousRangeMap.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/Module.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/Serialization/ModuleManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ClangCheckers.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/ClangCheckers.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerOptInfo.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerRegistry.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/ARCMigrate/PlistReporter.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/ARCMigrate/TransAPIUses.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/SelectorLocationsKind.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/AST/SelectorLocationsKind.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/AST/VTTBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Analysis/ProgramPoint.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Analysis/ThreadSafety.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.h
  stable/9/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Headers/stdalign.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Headers/stdalign.h
  stable/9/contrib/llvm/tools/clang/lib/Sema/MultiInitializer.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Sema/MultiInitializer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Sema/SemaFixItUtils.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h
  stable/9/contrib/llvm/tools/clang/lib/Serialization/Module.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Checker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
     - copied unchanged from r226633, head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp
  stable/9/contrib/llvm/tools/clang/utils/
     - copied from r226633, head/contrib/llvm/tools/clang/utils/
  stable/9/lib/clang/include/ARMGenDisassemblerTables.inc
     - copied unchanged from r226633, head/lib/clang/include/ARMGenDisassemblerTables.inc
  stable/9/lib/clang/include/clang/Parse/
     - copied from r226633, head/lib/clang/include/clang/Parse/
  stable/9/lib/clang/libllvmtablegen/
     - copied from r226633, head/lib/clang/libllvmtablegen/
  stable/9/usr.bin/clang/clang-tblgen/
     - copied from r226633, head/usr.bin/clang/clang-tblgen/
Deleted:
  stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequency.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequency.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineLocation.h
  stable/9/contrib/llvm/include/llvm/CompilerDriver/
  stable/9/contrib/llvm/include/llvm/Support/PassManagerBuilder.h
  stable/9/contrib/llvm/include/llvm/Target/TargetAsmBackend.h
  stable/9/contrib/llvm/include/llvm/Target/TargetAsmInfo.h
  stable/9/contrib/llvm/include/llvm/Target/TargetAsmLexer.h
  stable/9/contrib/llvm/include/llvm/Target/TargetAsmParser.h
  stable/9/contrib/llvm/include/llvm/Target/TargetRegistry.h
  stable/9/contrib/llvm/include/llvm/Target/TargetSelect.h
  stable/9/contrib/llvm/lib/Analysis/BlockFrequency.cpp
  stable/9/contrib/llvm/lib/CodeGen/LowerSubregs.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineBlockFrequency.cpp
  stable/9/contrib/llvm/lib/CompilerDriver/
  stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
  stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/Makefile
  stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
  stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Makefile
  stable/9/contrib/llvm/lib/MC/MCParser/TargetAsmParser.cpp
  stable/9/contrib/llvm/lib/MC/TargetAsmBackend.cpp
  stable/9/contrib/llvm/lib/Object/CMakeLists.txt
  stable/9/contrib/llvm/lib/Object/Makefile
  stable/9/contrib/llvm/lib/Target/ARM/ARMAddressingModes.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInfo.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMFixupKinds.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMMCExpr.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMMCExpr.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMMachObjectWriter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.h
  stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h
  stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h
  stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/ARM/NEONMoveFix.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/Alpha/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/Makefile
  stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/Makefile
  stable/9/contrib/llvm/lib/Target/MBlaze/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MBlaze/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/PTX/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/PTX/PTXCallingConv.td
  stable/9/contrib/llvm/lib/Target/PTX/TargetInfo/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/PTX/TargetInfo/Makefile
  stable/9/contrib/llvm/lib/Target/PTX/generate-register-td.py
  stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCFixupKinds.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCMCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCPredicates.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCPredicates.h
  stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/TargetAsmInfo.cpp
  stable/9/contrib/llvm/lib/Target/TargetAsmLexer.cpp
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/Makefile
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Target/X86/SSEDomainFix.cpp
  stable/9/contrib/llvm/lib/Target/X86/Utils/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/X86/Utils/Makefile
  stable/9/contrib/llvm/lib/Target/X86/X86AsmBackend.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86FixupKinds.h
  stable/9/contrib/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86MachObjectWriter.cpp
  stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt
  stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/Makefile
  stable/9/contrib/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/TailDuplication.cpp
  stable/9/contrib/llvm/tools/clang/include/clang/Config/
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ChainedDiagnosticClient.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/VerifyDiagnosticsClient.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTSerializationListener.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerProvider.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathDiagnosticClients.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/GRState.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/GRStateTrait.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/CMakeLists.txt
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Makefile
  stable/9/contrib/llvm/tools/clang/lib/Frontend/VerifyDiagnosticsClient.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/CMakeLists.txt
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckerProvider.h
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Makefile
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicStore.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CMakeLists.txt
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CXXExprEngine.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/FlatStore.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/GRState.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Makefile
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CMakeLists.txt
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/Makefile
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Makefile
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/README.txt
  stable/9/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.h
  stable/9/contrib/llvm/utils/TableGen/ClangAttrEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/ClangAttrEmitter.h
  stable/9/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/ClangDiagnosticsEmitter.h
  stable/9/contrib/llvm/utils/TableGen/ClangSACheckersEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/ClangSACheckersEmitter.h
  stable/9/contrib/llvm/utils/TableGen/Error.cpp
  stable/9/contrib/llvm/utils/TableGen/Error.h
  stable/9/contrib/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/LLVMCConfigurationEmitter.h
  stable/9/contrib/llvm/utils/TableGen/NeonEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/NeonEmitter.h
  stable/9/contrib/llvm/utils/TableGen/OptParserEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/OptParserEmitter.h
  stable/9/contrib/llvm/utils/TableGen/Record.cpp
  stable/9/contrib/llvm/utils/TableGen/Record.h
  stable/9/contrib/llvm/utils/TableGen/TGLexer.cpp
  stable/9/contrib/llvm/utils/TableGen/TGLexer.h
  stable/9/contrib/llvm/utils/TableGen/TGParser.cpp
  stable/9/contrib/llvm/utils/TableGen/TGParser.h
  stable/9/contrib/llvm/utils/TableGen/TableGenBackend.cpp
  stable/9/contrib/llvm/utils/TableGen/TableGenBackend.h
  stable/9/lib/clang/include/ARMGenDecoderTables.inc
Modified:
  stable/9/Makefile.inc1   (contents, props changed)
  stable/9/contrib/llvm/include/llvm-c/Core.h
  stable/9/contrib/llvm/include/llvm-c/Disassembler.h
  stable/9/contrib/llvm/include/llvm-c/Object.h
  stable/9/contrib/llvm/include/llvm-c/Target.h
  stable/9/contrib/llvm/include/llvm-c/Transforms/IPO.h
  stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h
  stable/9/contrib/llvm/include/llvm/ADT/APInt.h
  stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h
  stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h
  stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h
  stable/9/contrib/llvm/include/llvm/ADT/DenseSet.h
  stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h
  stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h
  stable/9/contrib/llvm/include/llvm/ADT/IntervalMap.h
  stable/9/contrib/llvm/include/llvm/ADT/PointerUnion.h
  stable/9/contrib/llvm/include/llvm/ADT/PostOrderIterator.h
  stable/9/contrib/llvm/include/llvm/ADT/SCCIterator.h
  stable/9/contrib/llvm/include/llvm/ADT/STLExtras.h
  stable/9/contrib/llvm/include/llvm/ADT/SmallVector.h
  stable/9/contrib/llvm/include/llvm/ADT/Statistic.h
  stable/9/contrib/llvm/include/llvm/ADT/StringExtras.h
  stable/9/contrib/llvm/include/llvm/ADT/Triple.h
  stable/9/contrib/llvm/include/llvm/ADT/Twine.h
  stable/9/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h
  stable/9/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h
  stable/9/contrib/llvm/include/llvm/Analysis/BlockFrequencyImpl.h
  stable/9/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h
  stable/9/contrib/llvm/include/llvm/Analysis/CodeMetrics.h
  stable/9/contrib/llvm/include/llvm/Analysis/ConstantFolding.h
  stable/9/contrib/llvm/include/llvm/Analysis/DIBuilder.h
  stable/9/contrib/llvm/include/llvm/Analysis/DebugInfo.h
  stable/9/contrib/llvm/include/llvm/Analysis/FindUsedTypes.h
  stable/9/contrib/llvm/include/llvm/Analysis/IVUsers.h
  stable/9/contrib/llvm/include/llvm/Analysis/InlineCost.h
  stable/9/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h
  stable/9/contrib/llvm/include/llvm/Analysis/LoopInfo.h
  stable/9/contrib/llvm/include/llvm/Analysis/LoopPass.h
  stable/9/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h
  stable/9/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h
  stable/9/contrib/llvm/include/llvm/Analysis/RegionPass.h
  stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
  stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
  stable/9/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
  stable/9/contrib/llvm/include/llvm/Argument.h
  stable/9/contrib/llvm/include/llvm/Attributes.h
  stable/9/contrib/llvm/include/llvm/AutoUpgrade.h
  stable/9/contrib/llvm/include/llvm/BasicBlock.h
  stable/9/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/Analysis.h
  stable/9/contrib/llvm/include/llvm/CodeGen/CalcSpillWeights.h
  stable/9/contrib/llvm/include/llvm/CodeGen/FastISel.h
  stable/9/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
  stable/9/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/LiveInterval.h
  stable/9/contrib/llvm/include/llvm/CodeGen/LiveStackAnalysis.h
  stable/9/contrib/llvm/include/llvm/CodeGen/LiveVariables.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineConstantPool.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineInstr.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineOperand.h
  stable/9/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h
  stable/9/contrib/llvm/include/llvm/CodeGen/Passes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h
  stable/9/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h
  stable/9/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
  stable/9/contrib/llvm/include/llvm/CodeGen/ValueTypes.h
  stable/9/contrib/llvm/include/llvm/Constant.h
  stable/9/contrib/llvm/include/llvm/Constants.h
  stable/9/contrib/llvm/include/llvm/DerivedTypes.h
  stable/9/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
  stable/9/contrib/llvm/include/llvm/Function.h
  stable/9/contrib/llvm/include/llvm/GlobalAlias.h
  stable/9/contrib/llvm/include/llvm/GlobalValue.h
  stable/9/contrib/llvm/include/llvm/GlobalVariable.h
  stable/9/contrib/llvm/include/llvm/InitializePasses.h
  stable/9/contrib/llvm/include/llvm/InlineAsm.h
  stable/9/contrib/llvm/include/llvm/InstrTypes.h
  stable/9/contrib/llvm/include/llvm/Instruction.def
  stable/9/contrib/llvm/include/llvm/Instruction.h
  stable/9/contrib/llvm/include/llvm/Instructions.h
  stable/9/contrib/llvm/include/llvm/IntrinsicInst.h
  stable/9/contrib/llvm/include/llvm/Intrinsics.h
  stable/9/contrib/llvm/include/llvm/Intrinsics.td
  stable/9/contrib/llvm/include/llvm/IntrinsicsXCore.td
  stable/9/contrib/llvm/include/llvm/LinkAllPasses.h
  stable/9/contrib/llvm/include/llvm/Linker.h
  stable/9/contrib/llvm/include/llvm/MC/EDInstInfo.h
  stable/9/contrib/llvm/include/llvm/MC/MCAsmInfo.h
  stable/9/contrib/llvm/include/llvm/MC/MCAsmInfoDarwin.h
  stable/9/contrib/llvm/include/llvm/MC/MCAssembler.h
  stable/9/contrib/llvm/include/llvm/MC/MCContext.h
  stable/9/contrib/llvm/include/llvm/MC/MCDirectives.h
  stable/9/contrib/llvm/include/llvm/MC/MCDisassembler.h
  stable/9/contrib/llvm/include/llvm/MC/MCDwarf.h
  stable/9/contrib/llvm/include/llvm/MC/MCInst.h
  stable/9/contrib/llvm/include/llvm/MC/MCInstPrinter.h
  stable/9/contrib/llvm/include/llvm/MC/MCInstrDesc.h
  stable/9/contrib/llvm/include/llvm/MC/MCObjectStreamer.h
  stable/9/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h
  stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h
  stable/9/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h
  stable/9/contrib/llvm/include/llvm/MC/MCRegisterInfo.h
  stable/9/contrib/llvm/include/llvm/MC/MCStreamer.h
  stable/9/contrib/llvm/include/llvm/MC/MCValue.h
  stable/9/contrib/llvm/include/llvm/Module.h
  stable/9/contrib/llvm/include/llvm/Object/COFF.h
  stable/9/contrib/llvm/include/llvm/Object/MachOFormat.h
  stable/9/contrib/llvm/include/llvm/Object/MachOObject.h
  stable/9/contrib/llvm/include/llvm/Object/ObjectFile.h
  stable/9/contrib/llvm/include/llvm/OperandTraits.h
  stable/9/contrib/llvm/include/llvm/Operator.h
  stable/9/contrib/llvm/include/llvm/PassManagers.h
  stable/9/contrib/llvm/include/llvm/Support/BranchProbability.h
  stable/9/contrib/llvm/include/llvm/Support/CallSite.h
  stable/9/contrib/llvm/include/llvm/Support/CommandLine.h
  stable/9/contrib/llvm/include/llvm/Support/ConstantFolder.h
  stable/9/contrib/llvm/include/llvm/Support/DataTypes.h.in
  stable/9/contrib/llvm/include/llvm/Support/Dwarf.h
  stable/9/contrib/llvm/include/llvm/Support/DynamicLibrary.h
  stable/9/contrib/llvm/include/llvm/Support/ELF.h
  stable/9/contrib/llvm/include/llvm/Support/FileSystem.h
  stable/9/contrib/llvm/include/llvm/Support/Format.h
  stable/9/contrib/llvm/include/llvm/Support/GetElementPtrTypeIterator.h
  stable/9/contrib/llvm/include/llvm/Support/IRBuilder.h
  stable/9/contrib/llvm/include/llvm/Support/InstVisitor.h
  stable/9/contrib/llvm/include/llvm/Support/MachO.h
  stable/9/contrib/llvm/include/llvm/Support/MemoryBuffer.h
  stable/9/contrib/llvm/include/llvm/Support/NoFolder.h
  stable/9/contrib/llvm/include/llvm/Support/PathV1.h
  stable/9/contrib/llvm/include/llvm/Support/PathV2.h
  stable/9/contrib/llvm/include/llvm/Support/Process.h
  stable/9/contrib/llvm/include/llvm/Support/SMLoc.h
  stable/9/contrib/llvm/include/llvm/Support/SourceMgr.h
  stable/9/contrib/llvm/include/llvm/Support/TargetFolder.h
  stable/9/contrib/llvm/include/llvm/Support/TypeBuilder.h
  stable/9/contrib/llvm/include/llvm/Target/Target.td
  stable/9/contrib/llvm/include/llvm/Target/TargetData.h
  stable/9/contrib/llvm/include/llvm/Target/TargetFrameLowering.h
  stable/9/contrib/llvm/include/llvm/Target/TargetInstrInfo.h
  stable/9/contrib/llvm/include/llvm/Target/TargetIntrinsicInfo.h
  stable/9/contrib/llvm/include/llvm/Target/TargetLowering.h
  stable/9/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h
  stable/9/contrib/llvm/include/llvm/Target/TargetMachine.h
  stable/9/contrib/llvm/include/llvm/Target/TargetOptions.h
  stable/9/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h
  stable/9/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td
  stable/9/contrib/llvm/include/llvm/Transforms/IPO.h
  stable/9/contrib/llvm/include/llvm/Transforms/Scalar.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/AddrModeMatcher.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/FunctionUtils.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h
  stable/9/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h
  stable/9/contrib/llvm/include/llvm/Type.h
  stable/9/contrib/llvm/include/llvm/User.h
  stable/9/contrib/llvm/include/llvm/Value.h
  stable/9/contrib/llvm/lib/Analysis/AliasAnalysis.cpp
  stable/9/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
  stable/9/contrib/llvm/lib/Analysis/AliasSetTracker.cpp
  stable/9/contrib/llvm/lib/Analysis/Analysis.cpp
  stable/9/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp
  stable/9/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp
  stable/9/contrib/llvm/lib/Analysis/ConstantFolding.cpp
  stable/9/contrib/llvm/lib/Analysis/DIBuilder.cpp
  stable/9/contrib/llvm/lib/Analysis/DbgInfoPrinter.cpp
  stable/9/contrib/llvm/lib/Analysis/DebugInfo.cpp
  stable/9/contrib/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
  stable/9/contrib/llvm/lib/Analysis/IPA/FindUsedTypes.cpp
  stable/9/contrib/llvm/lib/Analysis/IVUsers.cpp
  stable/9/contrib/llvm/lib/Analysis/InlineCost.cpp
  stable/9/contrib/llvm/lib/Analysis/InstructionSimplify.cpp
  stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp
  stable/9/contrib/llvm/lib/Analysis/Lint.cpp
  stable/9/contrib/llvm/lib/Analysis/Loads.cpp
  stable/9/contrib/llvm/lib/Analysis/LoopDependenceAnalysis.cpp
  stable/9/contrib/llvm/lib/Analysis/LoopInfo.cpp
  stable/9/contrib/llvm/lib/Analysis/LoopPass.cpp
  stable/9/contrib/llvm/lib/Analysis/MemDepPrinter.cpp
  stable/9/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp
  stable/9/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
  stable/9/contrib/llvm/lib/Analysis/PHITransAddr.cpp
  stable/9/contrib/llvm/lib/Analysis/PathNumbering.cpp
  stable/9/contrib/llvm/lib/Analysis/RegionPass.cpp
  stable/9/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
  stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
  stable/9/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp
  stable/9/contrib/llvm/lib/Analysis/ValueTracking.cpp
  stable/9/contrib/llvm/lib/AsmParser/LLLexer.cpp
  stable/9/contrib/llvm/lib/AsmParser/LLParser.cpp
  stable/9/contrib/llvm/lib/AsmParser/LLParser.h
  stable/9/contrib/llvm/lib/AsmParser/LLToken.h
  stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  stable/9/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.h
  stable/9/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
  stable/9/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h
  stable/9/contrib/llvm/lib/CodeGen/Analysis.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
  stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
  stable/9/contrib/llvm/lib/CodeGen/BranchFolding.cpp
  stable/9/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp
  stable/9/contrib/llvm/lib/CodeGen/CodeGen.cpp
  stable/9/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp
  stable/9/contrib/llvm/lib/CodeGen/ELFCodeEmitter.cpp
  stable/9/contrib/llvm/lib/CodeGen/ELFCodeEmitter.h
  stable/9/contrib/llvm/lib/CodeGen/ELFWriter.cpp
  stable/9/contrib/llvm/lib/CodeGen/IfConversion.cpp
  stable/9/contrib/llvm/lib/CodeGen/InlineSpiller.cpp
  stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.cpp
  stable/9/contrib/llvm/lib/CodeGen/InterferenceCache.h
  stable/9/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp
  stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveInterval.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveIntervalUnion.h
  stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveRangeEdit.h
  stable/9/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp
  stable/9/contrib/llvm/lib/CodeGen/LiveVariables.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineCSE.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineFunction.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineInstr.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineLICM.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineSink.cpp
  stable/9/contrib/llvm/lib/CodeGen/MachineVerifier.cpp
  stable/9/contrib/llvm/lib/CodeGen/PHIElimination.cpp
  stable/9/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp
  stable/9/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp
  stable/9/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegAllocLinearScan.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegisterClassInfo.h
  stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp
  stable/9/contrib/llvm/lib/CodeGen/RegisterCoalescer.h
  stable/9/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp
  stable/9/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp
  stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
  stable/9/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.h
  stable/9/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  stable/9/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp
  stable/9/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp
  stable/9/contrib/llvm/lib/CodeGen/SpillPlacement.cpp
  stable/9/contrib/llvm/lib/CodeGen/SpillPlacement.h
  stable/9/contrib/llvm/lib/CodeGen/SplitKit.cpp
  stable/9/contrib/llvm/lib/CodeGen/SplitKit.h
  stable/9/contrib/llvm/lib/CodeGen/Splitter.cpp
  stable/9/contrib/llvm/lib/CodeGen/StackProtector.cpp
  stable/9/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp
  stable/9/contrib/llvm/lib/CodeGen/TailDuplication.cpp
  stable/9/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
  stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  stable/9/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
  stable/9/contrib/llvm/lib/CodeGen/VirtRegMap.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/Intercept.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITDwarfEmitter.h
  stable/9/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/Intercept.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp
  stable/9/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
  stable/9/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp
  stable/9/contrib/llvm/lib/Linker/LinkModules.cpp
  stable/9/contrib/llvm/lib/Linker/Linker.cpp
  stable/9/contrib/llvm/lib/MC/ELFObjectWriter.cpp
  stable/9/contrib/llvm/lib/MC/ELFObjectWriter.h
  stable/9/contrib/llvm/lib/MC/MCAsmInfo.cpp
  stable/9/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp
  stable/9/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp
  stable/9/contrib/llvm/lib/MC/MCAsmStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCAssembler.cpp
  stable/9/contrib/llvm/lib/MC/MCContext.cpp
  stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp
  stable/9/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h
  stable/9/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.cpp
  stable/9/contrib/llvm/lib/MC/MCDisassembler/EDDisassembler.h
  stable/9/contrib/llvm/lib/MC/MCDisassembler/EDInst.h
  stable/9/contrib/llvm/lib/MC/MCDisassembler/EDToken.cpp
  stable/9/contrib/llvm/lib/MC/MCDisassembler/EDToken.h
  stable/9/contrib/llvm/lib/MC/MCDwarf.cpp
  stable/9/contrib/llvm/lib/MC/MCELF.cpp
  stable/9/contrib/llvm/lib/MC/MCELFStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCELFStreamer.h
  stable/9/contrib/llvm/lib/MC/MCExpr.cpp
  stable/9/contrib/llvm/lib/MC/MCInstPrinter.cpp
  stable/9/contrib/llvm/lib/MC/MCLoggingStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCMachOStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCNullStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCObjectStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp
  stable/9/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp
  stable/9/contrib/llvm/lib/MC/MCPureStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCStreamer.cpp
  stable/9/contrib/llvm/lib/MC/MCWin64EH.cpp
  stable/9/contrib/llvm/lib/MC/MachObjectWriter.cpp
  stable/9/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp
  stable/9/contrib/llvm/lib/MC/WinCOFFStreamer.cpp
  stable/9/contrib/llvm/lib/Object/Binary.cpp
  stable/9/contrib/llvm/lib/Object/COFFObjectFile.cpp
  stable/9/contrib/llvm/lib/Object/ELFObjectFile.cpp
  stable/9/contrib/llvm/lib/Object/MachOObject.cpp
  stable/9/contrib/llvm/lib/Object/MachOObjectFile.cpp
  stable/9/contrib/llvm/lib/Object/Object.cpp
  stable/9/contrib/llvm/lib/Object/ObjectFile.cpp
  stable/9/contrib/llvm/lib/Support/APFloat.cpp
  stable/9/contrib/llvm/lib/Support/APInt.cpp
  stable/9/contrib/llvm/lib/Support/Atomic.cpp
  stable/9/contrib/llvm/lib/Support/BranchProbability.cpp
  stable/9/contrib/llvm/lib/Support/CommandLine.cpp
  stable/9/contrib/llvm/lib/Support/ConstantRange.cpp
  stable/9/contrib/llvm/lib/Support/CrashRecoveryContext.cpp
  stable/9/contrib/llvm/lib/Support/Disassembler.cpp
  stable/9/contrib/llvm/lib/Support/Dwarf.cpp
  stable/9/contrib/llvm/lib/Support/DynamicLibrary.cpp
  stable/9/contrib/llvm/lib/Support/FoldingSet.cpp
  stable/9/contrib/llvm/lib/Support/Host.cpp
  stable/9/contrib/llvm/lib/Support/IncludeFile.cpp
  stable/9/contrib/llvm/lib/Support/Memory.cpp
  stable/9/contrib/llvm/lib/Support/MemoryBuffer.cpp
  stable/9/contrib/llvm/lib/Support/MemoryObject.cpp
  stable/9/contrib/llvm/lib/Support/Mutex.cpp
  stable/9/contrib/llvm/lib/Support/Path.cpp
  stable/9/contrib/llvm/lib/Support/PathV2.cpp
  stable/9/contrib/llvm/lib/Support/PrettyStackTrace.cpp
  stable/9/contrib/llvm/lib/Support/RWMutex.cpp
  stable/9/contrib/llvm/lib/Support/SearchForAddressOfSpecialSymbol.cpp
  stable/9/contrib/llvm/lib/Support/StringExtras.cpp
  stable/9/contrib/llvm/lib/Support/StringRef.cpp
  stable/9/contrib/llvm/lib/Support/TargetRegistry.cpp
  stable/9/contrib/llvm/lib/Support/ThreadLocal.cpp
  stable/9/contrib/llvm/lib/Support/Threading.cpp
  stable/9/contrib/llvm/lib/Support/Triple.cpp
  stable/9/contrib/llvm/lib/Support/Twine.cpp
  stable/9/contrib/llvm/lib/Support/Unix/Host.inc
  stable/9/contrib/llvm/lib/Support/Unix/Path.inc
  stable/9/contrib/llvm/lib/Support/Unix/PathV2.inc
  stable/9/contrib/llvm/lib/Support/Unix/Process.inc
  stable/9/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc
  stable/9/contrib/llvm/lib/Support/Windows/Memory.inc
  stable/9/contrib/llvm/lib/Support/Windows/PathV2.inc
  stable/9/contrib/llvm/lib/Support/Windows/Process.inc
  stable/9/contrib/llvm/lib/Support/Windows/RWMutex.inc
  stable/9/contrib/llvm/lib/Support/Windows/Signals.inc
  stable/9/contrib/llvm/lib/Support/Windows/Windows.h
  stable/9/contrib/llvm/lib/Support/raw_ostream.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARM.h
  stable/9/contrib/llvm/lib/Target/ARM/ARM.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMGlobalMerge.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td
  stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMSubtarget.h
  stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h
  stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmLexer.cpp
  stable/9/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
  stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.h
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.td
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/AlphaTargetMachine.h
  stable/9/contrib/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/Alpha/TargetInfo/AlphaTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinFrameLowering.h
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.h
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinIntrinsicInfo.h
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/BlackfinTargetMachine.h
  stable/9/contrib/llvm/lib/Target/Blackfin/MCTargetDesc/BlackfinMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/Blackfin/TargetInfo/BlackfinTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/CBackend/CBackend.cpp
  stable/9/contrib/llvm/lib/Target/CBackend/CTargetMachine.h
  stable/9/contrib/llvm/lib/Target/CBackend/TargetInfo/CBackendTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/MCTargetDesc/SPUMCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUFrameLowering.h
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.td
  stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.h
  stable/9/contrib/llvm/lib/Target/CellSPU/TargetInfo/CellSPUTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp
  stable/9/contrib/llvm/lib/Target/CppBackend/CPPTargetMachine.h
  stable/9/contrib/llvm/lib/Target/CppBackend/TargetInfo/CppBackendTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmLexer.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/AsmParser/MBlazeAsmParser.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/Disassembler/MBlazeDisassembler.h
  stable/9/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlaze.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.td
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeIntrinsicInfo.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.h
  stable/9/contrib/llvm/lib/Target/MBlaze/MBlazeTargetObjectFile.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/MBlaze/MCTargetDesc/MBlazeMCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/MBlaze/TargetInfo/MBlazeTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h
  stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430AsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h
  stable/9/contrib/llvm/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/Mangler.cpp
  stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/Mips/Mips.h
  stable/9/contrib/llvm/lib/Target/Mips/Mips.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsCallingConv.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsISelLowering.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsMCSymbolRefExpr.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td
  stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsSubtarget.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h
  stable/9/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp
  stable/9/contrib/llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/PTX/MCTargetDesc/PTXMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTX.h
  stable/9/contrib/llvm/lib/Target/PTX/PTX.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXISelLowering.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXInstrFormats.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXInstrInfo.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXIntrinsicInstrInfo.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXMCAsmStreamer.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXMFInfoExtract.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXMachineFunctionInfo.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXRegisterInfo.td
  stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXSubtarget.h
  stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/PTX/PTXTargetMachine.h
  stable/9/contrib/llvm/lib/Target/PTX/TargetInfo/PTXTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPC.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPC.td
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h
  stable/9/contrib/llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h
  stable/9/contrib/llvm/lib/Target/Sparc/TargetInfo/SparcTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h
  stable/9/contrib/llvm/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/Target.cpp
  stable/9/contrib/llvm/lib/Target/TargetData.cpp
  stable/9/contrib/llvm/lib/Target/TargetFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp
  stable/9/contrib/llvm/lib/Target/TargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/TargetRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp
  stable/9/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
  stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp
  stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h
  stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
  stable/9/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
  stable/9/contrib/llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
  stable/9/contrib/llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp
  stable/9/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h
  stable/9/contrib/llvm/lib/Target/X86/X86.h
  stable/9/contrib/llvm/lib/Target/X86/X86.td
  stable/9/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86ELFWriterInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86FastISel.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86FrameLowering.h
  stable/9/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86ISelLowering.h
  stable/9/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrCompiler.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrExtension.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrFormats.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.h
  stable/9/contrib/llvm/lib/Target/X86/X86InstrInfo.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrSSE.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrSystem.td
  stable/9/contrib/llvm/lib/Target/X86/X86InstrVMX.td
  stable/9/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h
  stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.h
  stable/9/contrib/llvm/lib/Target/X86/X86RegisterInfo.td
  stable/9/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86Subtarget.h
  stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86TargetMachine.h
  stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp
  stable/9/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h
  stable/9/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp
  stable/9/contrib/llvm/lib/Target/XCore/TargetInfo/XCoreTargetInfo.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h
  stable/9/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h
  stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h
  stable/9/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td
  stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h
  stable/9/contrib/llvm/lib/Target/XCore/XCoreSubtarget.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp
  stable/9/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h
  stable/9/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/IPO.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/Inliner.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp
  stable/9/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  stable/9/contrib/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
  stable/9/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  stable/9/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp
  stable/9/contrib/llvm/lib/Transforms/Instrumentation/PathProfiling.cpp
  stable/9/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/GVN.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LICM.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/LowerAtomic.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
  stable/9/contrib/llvm/lib/Transforms/Scalar/Sink.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/Local.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/SSAUpdater.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  stable/9/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp
  stable/9/contrib/llvm/lib/VMCore/AsmWriter.cpp
  stable/9/contrib/llvm/lib/VMCore/Attributes.cpp
  stable/9/contrib/llvm/lib/VMCore/AutoUpgrade.cpp
  stable/9/contrib/llvm/lib/VMCore/BasicBlock.cpp
  stable/9/contrib/llvm/lib/VMCore/ConstantFold.cpp
  stable/9/contrib/llvm/lib/VMCore/ConstantFold.h
  stable/9/contrib/llvm/lib/VMCore/Constants.cpp
  stable/9/contrib/llvm/lib/VMCore/ConstantsContext.h
  stable/9/contrib/llvm/lib/VMCore/Core.cpp
  stable/9/contrib/llvm/lib/VMCore/DebugLoc.cpp
  stable/9/contrib/llvm/lib/VMCore/Function.cpp
  stable/9/contrib/llvm/lib/VMCore/Globals.cpp
  stable/9/contrib/llvm/lib/VMCore/IRBuilder.cpp
  stable/9/contrib/llvm/lib/VMCore/InlineAsm.cpp
  stable/9/contrib/llvm/lib/VMCore/Instruction.cpp
  stable/9/contrib/llvm/lib/VMCore/Instructions.cpp
  stable/9/contrib/llvm/lib/VMCore/LLVMContextImpl.h
  stable/9/contrib/llvm/lib/VMCore/Module.cpp
  stable/9/contrib/llvm/lib/VMCore/PassManager.cpp
  stable/9/contrib/llvm/lib/VMCore/PassRegistry.cpp
  stable/9/contrib/llvm/lib/VMCore/Type.cpp
  stable/9/contrib/llvm/lib/VMCore/Value.cpp
  stable/9/contrib/llvm/lib/VMCore/ValueTypes.cpp
  stable/9/contrib/llvm/lib/VMCore/Verifier.cpp
  stable/9/contrib/llvm/tools/clang/include/clang-c/Index.h
  stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMT.h
  stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h
  stable/9/contrib/llvm/tools/clang/include/clang/ARCMigrate/FileRemapper.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/APValue.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Attr.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/CXXInheritance.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Decl.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclContextInternals.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Expr.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Mangle.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/NestedNameSpecifier.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/ParentMap.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Stmt.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/StmtVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/Type.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def
  stable/9/contrib/llvm/tools/clang/include/clang/AST/TypeVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/LiveVariables.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ReachableCode.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/CFG.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/DomainSpecific/CocoaConventions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowSolver.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Support/BlkExprDeclBitVector.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGStmtVisitor.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Attr.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DelayedCleanupPool.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/MacroBuilder.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensions.def
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/PrettyStackTrace.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/SourceManagerInternals.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def
  stable/9/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h
  stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h
  stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h
  stable/9/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Action.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Arg.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Driver.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/DriverDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Job.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Option.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Tool.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Types.def
  stable/9/contrib/llvm/tools/clang/include/clang/Driver/Util.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Analyses.def
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CommandLineSourceLoc.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandard.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/LogDiagnosticPrinter.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/PreprocessorOptions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticBuffer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h
  stable/9/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h
  stable/9/contrib/llvm/tools/clang/include/clang/Index/ASTLocation.h
  stable/9/contrib/llvm/tools/clang/include/clang/Index/CallGraph.h
  stable/9/contrib/llvm/tools/clang/include/clang/Index/Entity.h
  stable/9/contrib/llvm/tools/clang/include/clang/Index/Handlers.h
  stable/9/contrib/llvm/tools/clang/include/clang/Index/TranslationUnit.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/CodeCompletionHandler.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/LexDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/PTHManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessingRecord.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/PreprocessorLexer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/Token.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/TokenConcatenation.h
  stable/9/contrib/llvm/tools/clang/include/clang/Lex/TokenLexer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Parse/ParseAST.h
  stable/9/contrib/llvm/tools/clang/include/clang/Parse/ParseDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Parse/Parser.h
  stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h
  stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FixItRewriter.h
  stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h
  stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h
  stable/9/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriters.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/AnalysisBasedWarnings.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/CXXFieldCollector.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/DelayedDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Designator.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/IdentifierResolver.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Overload.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/PrettyDeclStackTrace.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Scope.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Sema.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/SemaDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/Template.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h
  stable/9/contrib/llvm/tools/clang/include/clang/Sema/TypoCorrection.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTDeserializationListener.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h
  stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ChainedIncludesSource.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngineBuilders.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h
  stable/9/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Frontend/FrontendActions.h
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMTActions.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/FileRemapper.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Internals.h
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransARCAssign.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransAutoreleasePool.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransBlockObjCVariable.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransRetainReleaseDealloc.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnbridgedCasts.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransUnusedInitDelegate.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransZeroOutPropsInDealloc.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/TransformActions.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.cpp
  stable/9/contrib/llvm/tools/clang/lib/ARCMigrate/Transforms.h
  stable/9/contrib/llvm/tools/clang/lib/AST/APValue.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/Decl.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/DumpXML.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/Expr.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/InheritViz.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumCXXABI.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/Mangle.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/Stmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/StmtDumper.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/Type.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp
  stable/9/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/CFGReachabilityAnalysis.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/CFGStmtMap.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/CocoaConventions.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/ReachableCode.cpp
  stable/9/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/SourceLocation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp
  stable/9/contrib/llvm/tools/clang/lib/Basic/VersionTuple.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGException.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
  stable/9/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h
  stable/9/contrib/llvm/tools/clang/lib/Driver/Action.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Driver.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/HostInfo.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Job.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Option.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Phases.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h
  stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
  stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.h
  stable/9/contrib/llvm/tools/clang/lib/Driver/Types.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/LangStandards.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/LogDiagnosticPrinter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticBuffer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp
  stable/9/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Headers/avxintrin.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/float.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/mm_malloc.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/tgmath.h
  stable/9/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h
  stable/9/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Index/CallGraph.cpp
  stable/9/contrib/llvm/tools/clang/lib/Index/Entity.cpp
  stable/9/contrib/llvm/tools/clang/lib/Index/EntityImpl.h
  stable/9/contrib/llvm/tools/clang/lib/Index/GlobalSelector.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/MacroArgs.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/MacroArgs.h
  stable/9/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PPCaching.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PTHLexer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessingRecord.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/PreprocessorLexer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/ScratchBuffer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/TokenConcatenation.cpp
  stable/9/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/Parser.cpp
  stable/9/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/DeltaTree.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/FixItRewriter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/FrontendActions.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLPrint.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/RewriteTest.cpp
  stable/9/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/DelayedDiagnostic.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/Sema.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp
  stable/9/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ChainedIncludesSource.cpp
  stable/9/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AdjustedReturnValueChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AttrNonNullChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastSizeChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CastToStructChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCInstMethSignature.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckSizeofPointer.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DebugCheckers.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DivZeroChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/FixedAddressChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IteratorsChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSAutoreleasePoolChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/OSAtomicChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCAtSyncChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerSubChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ReturnUndefChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedArraySubscriptChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefinedAssignmentChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AggExprVisitor.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BlockCounter.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Environment.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ObjCMessage.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.h
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/Store.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/TextPathDiagnostics.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.h
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
  stable/9/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/FrontendActions.cpp
  stable/9/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp
  stable/9/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp
  stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp
  stable/9/contrib/llvm/utils/TableGen/ARMDecoderEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/ARMDecoderEmitter.h
  stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/AsmMatcherEmitter.h
  stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/AsmWriterEmitter.h
  stable/9/contrib/llvm/utils/TableGen/AsmWriterInst.cpp
  stable/9/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/CallingConvEmitter.h
  stable/9/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp
  stable/9/contrib/llvm/utils/TableGen/CodeEmitterGen.h
  stable/9/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
  stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp
  stable/9/contrib/llvm/utils/TableGen/CodeGenInstruction.h
  stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp
  stable/9/contrib/llvm/utils/TableGen/CodeGenRegisters.h
  stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.cpp
  stable/9/contrib/llvm/utils/TableGen/CodeGenTarget.h
  stable/9/contrib/llvm/utils/TableGen/DAGISelEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/DAGISelEmitter.h
  stable/9/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp
  stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp
  stable/9/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/DisassemblerEmitter.h
  stable/9/contrib/llvm/utils/TableGen/EDEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/EDEmitter.h
  stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/FastISelEmitter.h
  stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.h
  stable/9/contrib/llvm/utils/TableGen/InstrEnumEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/InstrEnumEmitter.h
  stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/InstrInfoEmitter.h
  stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/IntrinsicEmitter.h
  stable/9/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/PseudoLoweringEmitter.h
  stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/RegisterInfoEmitter.h
  stable/9/contrib/llvm/utils/TableGen/SetTheory.cpp
  stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp
  stable/9/contrib/llvm/utils/TableGen/SubtargetEmitter.h
  stable/9/contrib/llvm/utils/TableGen/TableGen.cpp
  stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp
  stable/9/contrib/llvm/utils/TableGen/X86DisassemblerTables.h
  stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp
  stable/9/contrib/llvm/utils/TableGen/X86RecognizableInstr.h
  stable/9/lib/clang/Makefile
  stable/9/lib/clang/clang.build.mk
  stable/9/lib/clang/include/clang/Basic/Version.inc
  stable/9/lib/clang/include/llvm/Config/config.h
  stable/9/lib/clang/include/llvm/Config/llvm-config.h
  stable/9/lib/clang/libclanganalysis/Makefile
  stable/9/lib/clang/libclangarcmigrate/Makefile
  stable/9/lib/clang/libclangast/Makefile
  stable/9/lib/clang/libclangbasic/Makefile
  stable/9/lib/clang/libclangcodegen/Makefile
  stable/9/lib/clang/libclangfrontend/Makefile
  stable/9/lib/clang/libclangparse/Makefile
  stable/9/lib/clang/libclangsema/Makefile
  stable/9/lib/clang/libclangserialization/Makefile
  stable/9/lib/clang/libclangstaticanalyzercheckers/Makefile
  stable/9/lib/clang/libclangstaticanalyzercore/Makefile
  stable/9/lib/clang/libllvmarmcodegen/Makefile
  stable/9/lib/clang/libllvmarmdesc/Makefile
  stable/9/lib/clang/libllvmarmdisassembler/Makefile
  stable/9/lib/clang/libllvmcodegen/Makefile
  stable/9/lib/clang/libllvmipo/Makefile
  stable/9/lib/clang/libllvmmc/Makefile
  stable/9/lib/clang/libllvmmcparser/Makefile
  stable/9/lib/clang/libllvmmipscodegen/Makefile
  stable/9/lib/clang/libllvmmipsdesc/Makefile
  stable/9/lib/clang/libllvmpowerpccodegen/Makefile
  stable/9/lib/clang/libllvmpowerpcdesc/Makefile
  stable/9/lib/clang/libllvmscalaropts/Makefile
  stable/9/lib/clang/libllvmtarget/Makefile
  stable/9/lib/clang/libllvmtransformutils/Makefile
  stable/9/lib/clang/libllvmx86codegen/Makefile
  stable/9/lib/clang/libllvmx86desc/Makefile
  stable/9/lib/clang/libllvmx86disassembler/Makefile
  stable/9/usr.bin/clang/Makefile
  stable/9/usr.bin/clang/clang/clang.1
  stable/9/usr.bin/clang/tblgen/Makefile
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)
  stable/9/lib/clang/   (props changed)
  stable/9/usr.bin/clang/   (props changed)

Modified: stable/9/Makefile.inc1
==============================================================================
--- stable/9/Makefile.inc1	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/Makefile.inc1	Fri Oct 28 21:08:39 2011	(r226890)
@@ -1030,7 +1030,9 @@ _crunchgen=	usr.sbin/crunch/crunchgen
 .if ${MK_CLANG} != "no"
 _clang_tblgen= \
 	lib/clang/libllvmsupport \
-	usr.bin/clang/tblgen
+	lib/clang/libllvmtablegen \
+	usr.bin/clang/tblgen \
+	usr.bin/clang/clang-tblgen
 .endif
 
 .if ${MK_CDDL} != "no" && \

Modified: stable/9/contrib/llvm/include/llvm-c/Core.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Core.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Core.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -115,7 +115,10 @@ typedef enum {
     LLVMNoImplicitFloatAttribute = 1<<23,
     LLVMNakedAttribute      = 1<<24,
     LLVMInlineHintAttribute = 1<<25,
-    LLVMStackAlignment = 7<<26
+    LLVMStackAlignment = 7<<26,
+    LLVMReturnsTwice = 1 << 29,
+    LLVMUWTable = 1 << 30,
+    LLVMNonLazyBind = 1 << 31
 } LLVMAttribute;
 
 typedef enum {
@@ -125,7 +128,7 @@ typedef enum {
   LLVMSwitch         = 3,
   LLVMIndirectBr     = 4,
   LLVMInvoke         = 5,
-  LLVMUnwind         = 6,
+  /* removed 6 due to API changes */
   LLVMUnreachable    = 7,
 
   /* Standard Binary Operators */
@@ -176,14 +179,26 @@ typedef enum {
   LLVMPHI            = 44,
   LLVMCall           = 45,
   LLVMSelect         = 46,
-  /* UserOp1 */
-  /* UserOp2 */
+  LLVMUserOp1        = 47,
+  LLVMUserOp2        = 48,
   LLVMVAArg          = 49,
   LLVMExtractElement = 50,
   LLVMInsertElement  = 51,
   LLVMShuffleVector  = 52,
   LLVMExtractValue   = 53,
-  LLVMInsertValue    = 54
+  LLVMInsertValue    = 54,
+
+  /* Atomic operators */
+  LLVMFence          = 55,
+  LLVMAtomicCmpXchg  = 56,
+  LLVMAtomicRMW      = 57,
+
+  /* Exception Handling Operators */
+  LLVMResume         = 58,
+  LLVMLandingPad     = 59,
+  LLVMUnwind         = 60
+
+
 } LLVMOpcode;
 
 typedef enum {
@@ -274,6 +289,11 @@ typedef enum {
   LLVMRealPredicateTrue   /**< Always true (always folded) */
 } LLVMRealPredicate;
 
+typedef enum {
+  LLVMLandingPadCatch,    /**< A catch clause   */
+  LLVMLandingPadFilter    /**< A filter clause  */
+} LLVMLandingPadClauseTy;
+
 void LLVMInitializeCore(LLVMPassRegistryRef R);
 
 
@@ -340,6 +360,7 @@ LLVMContextRef LLVMGetModuleContext(LLVM
 
 /** See llvm::LLVMTypeKind::getTypeID. */
 LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty);
+LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty);
 
 /** See llvm::LLVMType::getContext. */
 LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty);
@@ -388,6 +409,7 @@ LLVMTypeRef LLVMStructTypeInContext(LLVM
 LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount,
                            LLVMBool Packed);
 LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name);
+const char *LLVMGetStructName(LLVMTypeRef Ty);
 void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes,
                        unsigned ElementCount, LLVMBool Packed);
 
@@ -427,8 +449,11 @@ LLVMTypeRef LLVMX86MMXType(void);
   macro(Argument)                           \
   macro(BasicBlock)                         \
   macro(InlineAsm)                          \
+  macro(MDNode)                             \
+  macro(MDString)                           \
   macro(User)                               \
     macro(Constant)                         \
+      macro(BlockAddress)                   \
       macro(ConstantAggregateZero)          \
       macro(ConstantArray)                  \
       macro(ConstantExpr)                   \
@@ -448,29 +473,32 @@ LLVMTypeRef LLVMX86MMXType(void);
         macro(IntrinsicInst)                \
           macro(DbgInfoIntrinsic)           \
             macro(DbgDeclareInst)           \
+          macro(EHExceptionInst)            \
           macro(EHSelectorInst)             \
           macro(MemIntrinsic)               \
             macro(MemCpyInst)               \
             macro(MemMoveInst)              \
             macro(MemSetInst)               \
       macro(CmpInst)                        \
-      macro(FCmpInst)                       \
-      macro(ICmpInst)                       \
+        macro(FCmpInst)                     \
+        macro(ICmpInst)                     \
       macro(ExtractElementInst)             \
       macro(GetElementPtrInst)              \
       macro(InsertElementInst)              \
       macro(InsertValueInst)                \
+      macro(LandingPadInst)                 \
       macro(PHINode)                        \
       macro(SelectInst)                     \
       macro(ShuffleVectorInst)              \
       macro(StoreInst)                      \
       macro(TerminatorInst)                 \
         macro(BranchInst)                   \
+        macro(IndirectBrInst)               \
         macro(InvokeInst)                   \
         macro(ReturnInst)                   \
         macro(SwitchInst)                   \
         macro(UnreachableInst)              \
-        macro(UnwindInst)                   \
+        macro(ResumeInst)                   \
     macro(UnaryInstruction)                 \
       macro(AllocaInst)                     \
       macro(CastInst)                       \
@@ -533,6 +561,11 @@ LLVMValueRef LLVMMDString(const char *St
 LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals,
                                  unsigned Count);
 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count);
+const char  *LLVMGetMDString(LLVMValueRef V, unsigned* Len);
+int LLVMGetMDNodeNumOperands(LLVMValueRef V);
+LLVMValueRef *LLVMGetMDNodeOperand(LLVMValueRef V, unsigned i);
+unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char* name);
+void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char* name, LLVMValueRef *Dest);
 
 /* Operations on scalar constants */
 LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
@@ -728,6 +761,7 @@ LLVMValueRef LLVMBasicBlockAsValue(LLVMB
 LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val);
 LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val);
 LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB);
+LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB);
 unsigned LLVMCountBasicBlocks(LLVMValueRef Fn);
 void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks);
 LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn);
@@ -747,16 +781,21 @@ LLVMBasicBlockRef LLVMAppendBasicBlock(L
 LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB,
                                        const char *Name);
 void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB);
+void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB);
 
 void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos);
 void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos);
 
-/* Operations on instructions */
-LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst);
 LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB);
 LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB);
+
+/* Operations on instructions */
+LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst);
 LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst);
 LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst);
+void LLVMInstructionEraseFromParent(LLVMValueRef Inst);
+LLVMOpcode   LLVMGetInstructionOpcode(LLVMValueRef Inst);
+LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst);
 
 /* Operations on call sites */
 void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
@@ -771,6 +810,9 @@ void LLVMSetInstrParamAlignment(LLVMValu
 LLVMBool LLVMIsTailCall(LLVMValueRef CallInst);
 void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall);
 
+/* Operations on switch instructions (only) */
+LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr);
+
 /* Operations on phi nodes */
 void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues,
                      LLVMBasicBlockRef *IncomingBlocks, unsigned Count);
@@ -818,7 +860,10 @@ LLVMValueRef LLVMBuildInvoke(LLVMBuilder
                              LLVMValueRef *Args, unsigned NumArgs,
                              LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
                              const char *Name);
-LLVMValueRef LLVMBuildUnwind(LLVMBuilderRef);
+LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
+                                 LLVMValueRef PersFn, unsigned NumClauses,
+                                 const char *Name);
+LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn);
 LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);
 
 /* Add a case to the switch instruction */
@@ -828,6 +873,12 @@ void LLVMAddCase(LLVMValueRef Switch, LL
 /* Add a destination to the indirectbr instruction */
 void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest);
 
+/* Add a catch or filter clause to the landingpad instruction */
+void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal);
+
+/* Set the 'cleanup' flag in the landingpad instruction */
+void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val);
+
 /* Arithmetic */
 LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS,
                           const char *Name);
@@ -1136,7 +1187,7 @@ namespace llvm {
     return reinterpret_cast(Tys);
   }
   
-  inline LLVMTypeRef *wrap(const Type **Tys) {
+  inline LLVMTypeRef *wrap(Type **Tys) {
     return reinterpret_cast(const_cast(Tys));
   }
   

Modified: stable/9/contrib/llvm/include/llvm-c/Disassembler.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Disassembler.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Disassembler.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -66,7 +66,7 @@ typedef int (*LLVMOpInfoCallback)(void *
  */
 struct LLVMOpInfoSymbol1 {
   uint64_t Present;  /* 1 if this symbol is present */
-  char *Name;        /* symbol name if not NULL */
+  const char *Name;  /* symbol name if not NULL */
   uint64_t Value;    /* symbol value if name is NULL */
 };
 
@@ -93,11 +93,35 @@ struct LLVMOpInfo1 {
  * disassembler for things like adding a comment for a PC plus a constant
  * offset load instruction to use a symbol name instead of a load address value.
  * It is passed the block information is saved when the disassembler context is
- * created and a value of a symbol to look up.  If no symbol is found NULL is
- * returned.
+ * created and the ReferenceValue to look up as a symbol.  If no symbol is found
+ * for the ReferenceValue NULL is returned.  The ReferenceType of the
+ * instruction is passed indirectly as is the PC of the instruction in
+ * ReferencePC.  If the output reference can be determined its type is returned
+ * indirectly in ReferenceType along with ReferenceName if any, or that is set
+ * to NULL.
  */
 typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo,
-                                                uint64_t SymbolValue);
+                                                uint64_t ReferenceValue,
+						uint64_t *ReferenceType,
+						uint64_t ReferencePC,
+						const char **ReferenceName);
+/**
+ * The reference types on input and output.
+ */
+/* No input reference type or no output reference type. */
+#define LLVMDisassembler_ReferenceType_InOut_None 0
+
+/* The input reference is from a branch instruction. */
+#define LLVMDisassembler_ReferenceType_In_Branch 1
+/* The input reference is from a PC relative load instruction. */
+#define LLVMDisassembler_ReferenceType_In_PCrel_Load 2
+
+/* The output reference is to as symbol stub. */
+#define LLVMDisassembler_ReferenceType_Out_SymbolStub 1
+/* The output reference is to a symbol address in a literal pool. */
+#define LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr 2
+/* The output reference is to a cstring address in a literal pool. */
+#define LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr 3
 
 #ifdef __cplusplus
 extern "C" {

Modified: stable/9/contrib/llvm/include/llvm-c/Object.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Object.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Object.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -59,14 +59,14 @@ namespace llvm {
       return reinterpret_cast(const_cast(OF));
     }
 
-    inline ObjectFile::section_iterator *unwrap(LLVMSectionIteratorRef SI) {
-      return reinterpret_cast(SI);
+    inline section_iterator *unwrap(LLVMSectionIteratorRef SI) {
+      return reinterpret_cast(SI);
     }
 
     inline LLVMSectionIteratorRef
-    wrap(const ObjectFile::section_iterator *SI) {
+    wrap(const section_iterator *SI) {
       return reinterpret_cast
-        (const_cast(SI));
+        (const_cast(SI));
     }
   }
 }

Modified: stable/9/contrib/llvm/include/llvm-c/Target.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Target.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Target.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -29,6 +29,7 @@ extern "C" {
 enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian };
 
 typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
+typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef;
 typedef struct LLVMStructLayout *LLVMStructLayoutRef;
 
 /* Declare all of the target-initialization functions that are available. */
@@ -42,7 +43,7 @@ typedef struct LLVMStructLayout *LLVMStr
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
 
 #define LLVM_TARGET(TargetName) \
-  void LLVMInitialize##TargetName##MCAsmInfo(void);
+  void LLVMInitialize##TargetName##TargetMC(void);
 #include "llvm/Config/Targets.def"
 #undef LLVM_TARGET  /* Explicit undef to make SWIG happier */
   
@@ -72,7 +73,7 @@ static inline LLVMBool LLVMInitializeNat
 #ifdef LLVM_NATIVE_TARGET
   LLVM_NATIVE_TARGETINFO();
   LLVM_NATIVE_TARGET();
-  LLVM_NATIVE_MCASMINFO();
+  LLVM_NATIVE_TARGETMC();
   return 0;
 #else
   return 1;
@@ -90,6 +91,11 @@ LLVMTargetDataRef LLVMCreateTargetData(c
     See the method llvm::PassManagerBase::add. */
 void LLVMAddTargetData(LLVMTargetDataRef, LLVMPassManagerRef);
 
+/** Adds target library information to a pass manager. This does not take
+    ownership of the target library info.
+    See the method llvm::PassManagerBase::add. */
+void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef, LLVMPassManagerRef);
+
 /** Converts target data to a target layout string. The string must be disposed
     with LLVMDisposeMessage.
     See the constructor llvm::TargetData::TargetData. */
@@ -157,6 +163,7 @@ void LLVMDisposeTargetData(LLVMTargetDat
 
 namespace llvm {
   class TargetData;
+  class TargetLibraryInfo;
 
   inline TargetData *unwrap(LLVMTargetDataRef P) {
     return reinterpret_cast(P);
@@ -165,6 +172,15 @@ namespace llvm {
   inline LLVMTargetDataRef wrap(const TargetData *P) {
     return reinterpret_cast(const_cast(P));
   }
+
+  inline TargetLibraryInfo *unwrap(LLVMTargetLibraryInfoRef P) {
+    return reinterpret_cast(P);
+  }
+
+  inline LLVMTargetLibraryInfoRef wrap(const TargetLibraryInfo *P) {
+    TargetLibraryInfo *X = const_cast(P);
+    return reinterpret_cast(X);
+  }
 }
 
 #endif /* defined(__cplusplus) */

Modified: stable/9/contrib/llvm/include/llvm-c/Transforms/IPO.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Transforms/IPO.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Transforms/IPO.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -36,6 +36,9 @@ void LLVMAddFunctionAttrsPass(LLVMPassMa
 /** See llvm::createFunctionInliningPass function. */
 void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM);
 
+/** See llvm::createAlwaysInlinerPass function. */
+void LLVMAddAlwaysInlinerPass(LLVMPassManagerRef PM);
+
 /** See llvm::createGlobalDCEPass function. */
 void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM);
 
@@ -45,9 +48,6 @@ void LLVMAddGlobalOptimizerPass(LLVMPass
 /** See llvm::createIPConstantPropagationPass function. */
 void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM);
 
-/** See llvm::createLowerSetJmpPass function. */
-void LLVMAddLowerSetJmpPass(LLVMPassManagerRef PM);
-
 /** See llvm::createPruneEHPass function. */
 void LLVMAddPruneEHPass(LLVMPassManagerRef PM);
 
@@ -57,9 +57,6 @@ void LLVMAddIPSCCPPass(LLVMPassManagerRe
 /** See llvm::createInternalizePass function. */
 void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain);
 
-// FIXME: Remove in LLVM 3.0.
-void LLVMAddRaiseAllocationsPass(LLVMPassManagerRef PM);
-
 /** See llvm::createStripDeadPrototypesPass function. */
 void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM);
 

Copied: stable/9/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h (from r226633, head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/9/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h	Fri Oct 28 21:08:39 2011	(r226890, copy of r226633, head/contrib/llvm/include/llvm-c/Transforms/PassManagerBuilder.h)
@@ -0,0 +1,90 @@
+/*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\
+|*                                                                            *|
+|*                     The LLVM Compiler Infrastructure                       *|
+|*                                                                            *|
+|* This file is distributed under the University of Illinois Open Source      *|
+|* License. See LICENSE.TXT for details.                                      *|
+|*                                                                            *|
+|*===----------------------------------------------------------------------===*|
+|*                                                                            *|
+|* This header declares the C interface to the PassManagerBuilder class.      *|
+|*                                                                            *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_C_PASSMANAGERBUILDER
+#define LLVM_C_PASSMANAGERBUILDER
+
+#include "llvm-c/Core.h"
+
+typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef;
+
+#ifdef __cplusplus
+#include "llvm/Transforms/IPO/PassManagerBuilder.h"
+extern "C" {
+#endif
+
+/** See llvm::PassManagerBuilder. */
+LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void);
+void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB);
+
+/** See llvm::PassManagerBuilder::OptLevel. */
+void
+LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB,
+                                  unsigned OptLevel);
+
+/** See llvm::PassManagerBuilder::SizeLevel. */
+void
+LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB,
+                                   unsigned SizeLevel);
+
+/** See llvm::PassManagerBuilder::DisableUnitAtATime. */
+void
+LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB,
+                                            LLVMBool Value);
+
+/** See llvm::PassManagerBuilder::DisableUnrollLoops. */
+void
+LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB,
+                                            LLVMBool Value);
+
+/** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */
+void
+LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB,
+                                                 LLVMBool Value);
+
+/** See llvm::PassManagerBuilder::Inliner. */
+void
+LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB,
+                                              unsigned Threshold);
+
+/** See llvm::PassManagerBuilder::populateFunctionPassManager. */
+void
+LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB,
+                                                  LLVMPassManagerRef PM);
+
+/** See llvm::PassManagerBuilder::populateModulePassManager. */
+void
+LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB,
+                                                LLVMPassManagerRef PM);
+
+/** See llvm::PassManagerBuilder::populateLTOPassManager. */
+void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB,
+                                                  LLVMPassManagerRef PM,
+                                                  bool Internalize,
+                                                  bool RunInliner);
+
+#ifdef __cplusplus
+}
+
+namespace llvm {
+  inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
+    return reinterpret_cast(P);
+  }
+
+  inline LLVMPassManagerBuilderRef wrap(PassManagerBuilder *P) {
+    return reinterpret_cast(P);
+  }
+}
+#endif
+
+#endif

Modified: stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm-c/Transforms/Scalar.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -107,6 +107,9 @@ void LLVMAddCorrelatedValuePropagationPa
 /** See llvm::createEarlyCSEPass function */
 void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM);
 
+/** See llvm::createLowerExpectIntrinsicPass function */
+void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM);
+
 /** See llvm::createTypeBasedAliasAnalysisPass function */
 void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM);
 

Modified: stable/9/contrib/llvm/include/llvm/ADT/APInt.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/APInt.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/APInt.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -15,6 +15,7 @@
 #ifndef LLVM_APINT_H
 #define LLVM_APINT_H
 
+#include "llvm/ADT/ArrayRef.h"
 #include "llvm/Support/MathExtras.h"
 #include 
 #include 
@@ -160,7 +161,7 @@ class APInt {
   /// not assume that the string is well-formed and (2) grows the
   /// result to hold the input.
   ///
-  /// @param radix 2, 8, 10, or 16
+  /// @param radix 2, 8, 10, 16, or 36
   /// @brief Convert a char array into an APInt
   void fromString(unsigned numBits, StringRef str, uint8_t radix);
 
@@ -176,6 +177,9 @@ class APInt {
   /// out-of-line slow case for inline constructor
   void initSlowCase(unsigned numBits, uint64_t val, bool isSigned);
 
+  /// shared code between two array constructors
+  void initFromArray(ArrayRef array);
+
   /// out-of-line slow case for inline copy constructor
   void initSlowCase(const APInt& that);
 
@@ -230,19 +234,26 @@ public:
     clearUnusedBits();
   }
 
-  /// Note that numWords can be smaller or larger than the corresponding bit
-  /// width but any extraneous bits will be dropped.
+  /// Note that bigVal.size() can be smaller or larger than the corresponding
+  /// bit width but any extraneous bits will be dropped.
   /// @param numBits the bit width of the constructed APInt
-  /// @param numWords the number of words in bigVal
   /// @param bigVal a sequence of words to form the initial value of the APInt
   /// @brief Construct an APInt of numBits width, initialized as bigVal[].
+  APInt(unsigned numBits, ArrayRef bigVal);
+  /// Equivalent to APInt(numBits, ArrayRef(bigVal, numWords)), but
+  /// deprecated because this constructor is prone to ambiguity with the
+  /// APInt(unsigned, uint64_t, bool) constructor.
+  ///
+  /// If this overload is ever deleted, care should be taken to prevent calls
+  /// from being incorrectly captured by the APInt(unsigned, uint64_t, bool)
+  /// constructor.
   APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]);
 
   /// This constructor interprets the string \arg str in the given radix. The
   /// interpretation stops when the first character that is not suitable for the
   /// radix is encountered, or the end of the string. Acceptable radix values
-  /// are 2, 8, 10 and 16. It is an error for the value implied by the string to
-  /// require more bits than numBits.
+  /// are 2, 8, 10, 16, and 36. It is an error for the value implied by the 
+  /// string to require more bits than numBits.
   ///
   /// @param numBits the bit width of the constructed APInt
   /// @param str the string to be interpreted
@@ -342,7 +353,8 @@ public:
 
     if (isSingleWord())
       return isUIntN(N, VAL);
-    return APInt(N, getNumWords(), pVal).zext(getBitWidth()) == (*this);
+    return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth())
+      == (*this);
   }
 
   /// @brief Check if this APInt has an N-bits signed integer value.
@@ -1245,13 +1257,13 @@ public:
                 bool formatAsCLiteral = false) const;
 
   /// Considers the APInt to be unsigned and converts it into a string in the
-  /// radix given. The radix can be 2, 8, 10 or 16.
+  /// radix given. The radix can be 2, 8, 10 16, or 36.
   void toStringUnsigned(SmallVectorImpl &Str, unsigned Radix = 10) const {
     toString(Str, Radix, false, false);
   }
 
   /// Considers the APInt to be signed and converts it into a string in the
-  /// radix given. The radix can be 2, 8, 10 or 16.
+  /// radix given. The radix can be 2, 8, 10, 16, or 36.
   void toStringSigned(SmallVectorImpl &Str, unsigned Radix = 10) const {
     toString(Str, Radix, true, false);
   }

Modified: stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/ArrayRef.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -147,7 +147,53 @@ namespace llvm {
     
     /// @}
   };
-  
+
+  /// @name ArrayRef Convenience constructors
+  /// @{
+
+  /// Construct an ArrayRef from a single element.
+  template
+  ArrayRef makeArrayRef(const T &OneElt) {
+    return OneElt;
+  }
+
+  /// Construct an ArrayRef from a pointer and length.
+  template
+  ArrayRef makeArrayRef(const T *data, size_t length) {
+    return ArrayRef(data, length);
+  }
+
+  /// Construct an ArrayRef from a range.
+  template
+  ArrayRef makeArrayRef(const T *begin, const T *end) {
+    return ArrayRef(begin, end);
+  }
+
+  /// Construct an ArrayRef from a SmallVector.
+  template 
+  ArrayRef makeArrayRef(const SmallVectorImpl &Vec) {
+    return Vec;
+  }
+
+  /// Construct an ArrayRef from a SmallVector.
+  template 
+  ArrayRef makeArrayRef(const SmallVector &Vec) {
+    return Vec;
+  }
+
+  /// Construct an ArrayRef from a std::vector.
+  template
+  ArrayRef makeArrayRef(const std::vector &Vec) {
+    return Vec;
+  }
+
+  /// Construct an ArrayRef from a C array.
+  template
+  ArrayRef makeArrayRef(const T (&Arr)[N]) {
+    return ArrayRef(Arr);
+  }
+
+  /// @}
   /// @name ArrayRef Comparison Operators
   /// @{
 

Modified: stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/DenseMap.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -540,6 +540,12 @@ private:
       ++Ptr;
   }
 };
+  
+template
+static inline size_t
+capacity_in_bytes(const DenseMap &X) {
+  return X.getMemorySize();
+}
 
 } // end namespace llvm
 

Modified: stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/DenseMapInfo.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -51,7 +51,7 @@ struct DenseMapInfo {
 template<> struct DenseMapInfo {
   static inline char getEmptyKey() { return ~0; }
   static inline char getTombstoneKey() { return ~0 - 1; }
-  static unsigned getHashValue(const char& Val) { return Val * 37; }
+  static unsigned getHashValue(const char& Val) { return Val * 37U; }
   static bool isEqual(const char &LHS, const char &RHS) {
     return LHS == RHS;
   }
@@ -61,7 +61,7 @@ template<> struct DenseMapInfo {
 template<> struct DenseMapInfo {
   static inline unsigned getEmptyKey() { return ~0; }
   static inline unsigned getTombstoneKey() { return ~0U - 1; }
-  static unsigned getHashValue(const unsigned& Val) { return Val * 37; }
+  static unsigned getHashValue(const unsigned& Val) { return Val * 37U; }
   static bool isEqual(const unsigned& LHS, const unsigned& RHS) {
     return LHS == RHS;
   }
@@ -96,7 +96,7 @@ template<> struct DenseMapInfo struct DenseMapInfo {
   static inline int getEmptyKey() { return 0x7fffffff; }
   static inline int getTombstoneKey() { return -0x7fffffff - 1; }
-  static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37); }
+  static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37U); }
   static bool isEqual(const int& LHS, const int& RHS) {
     return LHS == RHS;
   }
@@ -109,7 +109,7 @@ template<> struct DenseMapInfo {
   }
   static inline long getTombstoneKey() { return getEmptyKey() - 1L; }
   static unsigned getHashValue(const long& Val) {
-    return (unsigned)(Val * 37L);
+    return (unsigned)(Val * 37UL);
   }
   static bool isEqual(const long& LHS, const long& RHS) {
     return LHS == RHS;
@@ -121,7 +121,7 @@ template<> struct DenseMapInfo > {
   }
   static inline Pair getTombstoneKey() {
     return std::make_pair(FirstInfo::getTombstoneKey(),
-                            SecondInfo::getEmptyKey());
+                          SecondInfo::getTombstoneKey());
   }
   static unsigned getHashValue(const Pair& PairVal) {
     uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32
@@ -158,7 +158,7 @@ struct DenseMapInfo > {
     return (unsigned)key;
   }
   static bool isEqual(const Pair &LHS, const Pair &RHS) {
-    return FirstInfo::isEqual(LHS.first, RHS.first) && 
+    return FirstInfo::isEqual(LHS.first, RHS.first) &&
            SecondInfo::isEqual(LHS.second, RHS.second);
   }
 };

Modified: stable/9/contrib/llvm/include/llvm/ADT/DenseSet.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/DenseSet.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/DenseSet.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -28,7 +28,7 @@ class DenseSet {
   MapTy TheMap;
 public:
   DenseSet(const DenseSet &Other) : TheMap(Other.TheMap) {}
-  explicit DenseSet(unsigned NumInitBuckets = 64) : TheMap(NumInitBuckets) {}
+  explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {}
 
   bool empty() const { return TheMap.empty(); }
   unsigned size() const { return TheMap.size(); }

Modified: stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/ImmutableMap.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -117,6 +117,10 @@ public:
       return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T);
     }
 
+    typename TreeTy::Factory *getTreeFactory() const {
+      return const_cast(&F);
+    }
+
   private:
     Factory(const Factory& RHS); // DO NOT IMPLEMENT
     void operator=(const Factory& RHS); // DO NOT IMPLEMENT
@@ -256,6 +260,159 @@ public:
   }
 };
 
+// NOTE: This will possibly become the new implementation of ImmutableMap some day.
+template  >
+class ImmutableMapRef {
+public:
+  typedef typename ValInfo::value_type      value_type;
+  typedef typename ValInfo::value_type_ref  value_type_ref;
+  typedef typename ValInfo::key_type        key_type;
+  typedef typename ValInfo::key_type_ref    key_type_ref;
+  typedef typename ValInfo::data_type       data_type;
+  typedef typename ValInfo::data_type_ref   data_type_ref;
+  typedef ImutAVLTree              TreeTy;
+  typedef typename TreeTy::Factory          FactoryTy;
+  
+protected:
+  TreeTy *Root;
+  FactoryTy *Factory;
+  
+public:
+  /// Constructs a map from a pointer to a tree root.  In general one
+  /// should use a Factory object to create maps instead of directly
+  /// invoking the constructor, but there are cases where make this
+  /// constructor public is useful.
+  explicit ImmutableMapRef(const TreeTy* R, FactoryTy *F) 
+    : Root(const_cast(R)),
+      Factory(F) {
+    if (Root) { Root->retain(); }
+  }
+  
+  ImmutableMapRef(const ImmutableMapRef &X)
+    : Root(X.Root),
+      Factory(X.Factory) {
+    if (Root) { Root->retain(); }
+  }
+
+  ImmutableMapRef &operator=(const ImmutableMapRef &X) {
+    if (Root != X.Root) {
+      if (X.Root)
+        X.Root->retain();
+      
+      if (Root)
+        Root->release();
+      
+      Root = X.Root;
+      Factory = X.Factory;
+    }
+    return *this;
+  }
+
+  ~ImmutableMapRef() {
+    if (Root)
+      Root->release();
+  }
+  
+  static inline ImmutableMapRef getEmptyMap(FactoryTy *F) {
+    return ImmutableMapRef(0, F);
+  }
+
+  ImmutableMapRef add(key_type_ref K, data_type_ref D) {
+    TreeTy *NewT = Factory->add(Root, std::pair(K, D));
+    return ImmutableMapRef(NewT, Factory);
+  }
+
+  ImmutableMapRef remove(key_type_ref K) {
+    TreeTy *NewT = Factory->remove(Root, K);
+    return ImmutableMapRef(NewT, Factory);
+  }
+  
+  bool contains(key_type_ref K) const {
+    return Root ? Root->contains(K) : false;
+  }
+  
+  ImmutableMap asImmutableMap() const {
+    return ImmutableMap(Factory->getCanonicalTree(Root));
+  }
+  
+  bool operator==(const ImmutableMapRef &RHS) const {
+    return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
+  }
+  
+  bool operator!=(const ImmutableMapRef &RHS) const {
+    return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
+  }
+    
+  bool isEmpty() const { return !Root; }
+    
+  //===--------------------------------------------------===//
+  // For testing.
+  //===--------------------------------------------------===//
+  
+  void verify() const { if (Root) Root->verify(); }
+  
+  //===--------------------------------------------------===//
+  // Iterators.
+  //===--------------------------------------------------===//
+  
+  class iterator {
+    typename TreeTy::iterator itr;
+    
+    iterator() {}
+    iterator(TreeTy* t) : itr(t) {}
+    friend class ImmutableMapRef;
+    
+  public:
+    value_type_ref operator*() const { return itr->getValue(); }
+    value_type*    operator->() const { return &itr->getValue(); }
+    
+    key_type_ref getKey() const { return itr->getValue().first; }
+    data_type_ref getData() const { return itr->getValue().second; }
+    
+    
+    iterator& operator++() { ++itr; return *this; }
+    iterator  operator++(int) { iterator tmp(*this); ++itr; return tmp; }
+    iterator& operator--() { --itr; return *this; }
+    iterator  operator--(int) { iterator tmp(*this); --itr; return tmp; }
+    bool operator==(const iterator& RHS) const { return RHS.itr == itr; }
+    bool operator!=(const iterator& RHS) const { return RHS.itr != itr; }
+  };
+  
+  iterator begin() const { return iterator(Root); }
+  iterator end() const { return iterator(); }
+  
+  data_type* lookup(key_type_ref K) const {
+    if (Root) {
+      TreeTy* T = Root->find(K);
+      if (T) return &T->getValue().second;
+    }
+    
+    return 0;
+  }
+  
+  /// getMaxElement - Returns the  pair in the ImmutableMap for
+  ///  which key is the highest in the ordering of keys in the map.  This
+  ///  method returns NULL if the map is empty.
+  value_type* getMaxElement() const {
+    return Root ? &(Root->getMaxElement()->getValue()) : 0;
+  }
+  
+  //===--------------------------------------------------===//
+  // Utility methods.
+  //===--------------------------------------------------===//
+  
+  unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
+  
+  static inline void Profile(FoldingSetNodeID& ID, const ImmutableMapRef &M) {
+    ID.AddPointer(M.Root);
+  }
+  
+  inline void Profile(FoldingSetNodeID& ID) const {
+    return Profile(ID, *this);
+  }
+};
+  
 } // end namespace llvm
 
 #endif

Modified: stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h
==============================================================================
--- stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h	Fri Oct 28 20:28:13 2011	(r226889)
+++ stable/9/contrib/llvm/include/llvm/ADT/ImmutableSet.h	Fri Oct 28 21:08:39 2011	(r226890)
@@ -997,6 +997,10 @@ public:
 
     BumpPtrAllocator& getAllocator() { return F.getAllocator(); }
 
+    typename TreeTy::Factory *getTreeFactory() const {
+      return const_cast(&F);
+    }
+    
   private:
     Factory(const Factory& RHS); // DO NOT IMPLEMENT
     void operator=(const Factory& RHS); // DO NOT IMPLEMENT
@@ -1021,6 +1025,10 @@ public:
     if (Root) { Root->retain(); }
     return Root;
   }
+  
+  TreeTy *getRootWithoutRetain() const {
+    return Root;
+  }
 
   /// isEmpty - Return true if the set contains no elements.
   bool isEmpty() const { return !Root; }
@@ -1078,6 +1086,132 @@ public:
 
   void validateTree() const { if (Root) Root->validateTree(); }
 };
+  
+// NOTE: This may some day replace the current ImmutableSet.
+template  >
+class ImmutableSetRef {
+public:
+  typedef typename ValInfo::value_type      value_type;
+  typedef typename ValInfo::value_type_ref  value_type_ref;
+  typedef ImutAVLTree TreeTy;
+  typedef typename TreeTy::Factory          FactoryTy;
+  
+private:
+  TreeTy *Root;
+  FactoryTy *Factory;
+  
+public:
+  /// Constructs a set from a pointer to a tree root.  In general one
+  /// should use a Factory object to create sets instead of directly
+  /// invoking the constructor, but there are cases where make this
+  /// constructor public is useful.
+  explicit ImmutableSetRef(TreeTy* R, FactoryTy *F)
+    : Root(R),
+      Factory(F) {
+    if (Root) { Root->retain(); }
+  }
+  ImmutableSetRef(const ImmutableSetRef &X)
+    : Root(X.Root),
+      Factory(X.Factory) {
+    if (Root) { Root->retain(); }
+  }
+  ImmutableSetRef &operator=(const ImmutableSetRef &X) {
+    if (Root != X.Root) {
+      if (X.Root) { X.Root->retain(); }
+      if (Root) { Root->release(); }
+      Root = X.Root;
+      Factory = X.Factory;
+    }
+    return *this;
+  }
+  ~ImmutableSetRef() {
+    if (Root) { Root->release(); }
+  }
+  
+  static inline ImmutableSetRef getEmptySet(FactoryTy *F) {
+    return ImmutableSetRef(0, F);
+  }
+  
+  ImmutableSetRef add(value_type_ref V) {
+    return ImmutableSetRef(Factory->add(Root, V), Factory);
+  }
+  
+  ImmutableSetRef remove(value_type_ref V) {
+    return ImmutableSetRef(Factory->remove(Root, V), Factory);
+  }
+    
+  /// Returns true if the set contains the specified value.
+  bool contains(value_type_ref V) const {
+    return Root ? Root->contains(V) : false;
+  }
+  
+  ImmutableSet asImmutableSet(bool canonicalize = true) const {
+    return ImmutableSet(canonicalize ?
+                              Factory->getCanonicalTree(Root) : Root);

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

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 22:36:15 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CB288106564A;
	Fri, 28 Oct 2011 22:36:15 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BB0578FC08;
	Fri, 28 Oct 2011 22:36:15 +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 p9SMaFWf080905;
	Fri, 28 Oct 2011 22:36:15 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SMaFDQ080902;
	Fri, 28 Oct 2011 22:36:15 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <201110282236.p9SMaFDQ080902@svn.freebsd.org>
From: Alan Cox 
Date: Fri, 28 Oct 2011 22:36:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226891 - head/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 22:36:15 -0000

Author: alc
Date: Fri Oct 28 22:36:15 2011
New Revision: 226891
URL: http://svn.freebsd.org/changeset/base/226891

Log:
  Use "u_long" instead of "unsigned long".

Modified:
  head/sys/vm/vm_contig.c
  head/sys/vm/vm_extern.h

Modified: head/sys/vm/vm_contig.c
==============================================================================
--- head/sys/vm/vm_contig.c	Fri Oct 28 21:08:39 2011	(r226890)
+++ head/sys/vm/vm_contig.c	Fri Oct 28 22:36:15 2011	(r226891)
@@ -335,12 +335,11 @@ contigmapping(vm_map_t map, vm_size_t si
 
 vm_offset_t
 kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low,
-    vm_paddr_t high, unsigned long alignment, unsigned long boundary,
-    vm_memattr_t memattr)
+    vm_paddr_t high, u_long alignment, u_long boundary, vm_memattr_t memattr)
 {
 	vm_offset_t ret;
 	vm_page_t pages;
-	unsigned long npgs;
+	u_long npgs;
 	int tries;
 
 	size = round_page(size);

Modified: head/sys/vm/vm_extern.h
==============================================================================
--- head/sys/vm/vm_extern.h	Fri Oct 28 21:08:39 2011	(r226890)
+++ head/sys/vm/vm_extern.h	Fri Oct 28 22:36:15 2011	(r226891)
@@ -44,8 +44,8 @@ vm_offset_t kmem_alloc(vm_map_t, vm_size
 vm_offset_t kmem_alloc_attr(vm_map_t map, vm_size_t size, int flags,
     vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr);
 vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags,
-    vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
-    unsigned long boundary, vm_memattr_t memattr);
+    vm_paddr_t low, vm_paddr_t high, u_long alignment, u_long boundary,
+    vm_memattr_t memattr);
 vm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t);
 vm_offset_t kmem_alloc_nofault_space(vm_map_t, vm_size_t, int);
 vm_offset_t kmem_alloc_wait(vm_map_t, vm_size_t);

From owner-svn-src-all@FreeBSD.ORG  Fri Oct 28 23:02:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A26FD106564A;
	Fri, 28 Oct 2011 23:02:21 +0000 (UTC)
	(envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 920BD8FC0C;
	Fri, 28 Oct 2011 23:02:21 +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 p9SN2LGu081788;
	Fri, 28 Oct 2011 23:02:21 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9SN2L5T081787;
	Fri, 28 Oct 2011 23:02:21 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201110282302.p9SN2L5T081787@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Fri, 28 Oct 2011 23:02:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226892 - head/tools/regression/bin/sh/builtins
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 28 Oct 2011 23:02:21 -0000

Author: jilles
Date: Fri Oct 28 23:02:21 2011
New Revision: 226892
URL: http://svn.freebsd.org/changeset/base/226892

Log:
  sh: Add test for exit status of for loop without items.
  
  POSIX says the exit status of a for loop without any items shall be 0. There
  are no exceptions if the exit status of the previous command was not 0 or if
  the item list contains a command substitution with non-zero exit status.

Added:
  head/tools/regression/bin/sh/builtins/for1.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/for1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/for1.0	Fri Oct 28 23:02:21 2011	(r226892)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+false
+for i in `false`; do exit 3; done

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 00:40:38 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35])
	by hub.freebsd.org (Postfix) with ESMTP id 2FABE1065675;
	Sat, 29 Oct 2011 00:40:38 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org
	[IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id 18AA7177920;
	Sat, 29 Oct 2011 00:40:36 +0000 (UTC)
Message-ID: <4EAB4B83.3040801@FreeBSD.org>
Date: Fri, 28 Oct 2011 17:40:35 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
	rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1
MIME-Version: 1.0
To: "Andrey A. Chernov" 
References: <201110282028.p9SKSDdO076508@svn.freebsd.org>
In-Reply-To: <201110282028.p9SKSDdO076508@svn.freebsd.org>
X-Enigmail-Version: undefined
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r226889 - head/usr.bin/sed
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 00:40:38 -0000

On 10/28/2011 13:28, Andrey A. Chernov wrote:
> Author: ache
> Date: Fri Oct 28 20:28:13 2011
> New Revision: 226889
> URL: http://svn.freebsd.org/changeset/base/226889
> 
> Log:
>   Update '}' description to reflect reality (and POSIX)
>   
>   PR:             96236
>   Submitted by:   "Andreas Kohn" 
>   MFC after:      7 days
> 
> Modified:
>   head/usr.bin/sed/sed.1
> 
> Modified: head/usr.bin/sed/sed.1
> ==============================================================================
> --- head/usr.bin/sed/sed.1	Fri Oct 28 20:00:30 2011	(r226888)
> +++ head/usr.bin/sed/sed.1	Fri Oct 28 20:28:13 2011	(r226889)
> @@ -343,7 +343,7 @@ can be preceded by white space and can b
>  The function can be preceded by white space.
>  The terminating
>  .Dq }
> -must be preceded by a newline or optional white space.
> +must be preceded by a newline and optional white space.

Thanks for looking at this, but I'm not sure that this is an
improvement. "... must ... and optional ..." is very hard to parse. It
looks like what is meant is something like this:

must be preceded by a newline, and may also be preceded by white space.

Does that sound right? Also, if you're going to refer to POSIX it's nice
to actually quote the chapter and verse. That would have made it easier
for me to figure out what's going on here, for example. :)


hth,

Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/


From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 01:26:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 98ABB106566B;
	Sat, 29 Oct 2011 01:26:36 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EE798FC0C;
	Sat, 29 Oct 2011 01:26:36 +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 p9T1QaIh087064;
	Sat, 29 Oct 2011 01:26:36 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T1Qaoi087060;
	Sat, 29 Oct 2011 01:26:36 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110290126.p9T1Qaoi087060@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 29 Oct 2011 01:26:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226893 - in head/sys: amd64/amd64 i386/i386 kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 01:26:36 -0000

Author: marcel
Date: Sat Oct 29 01:26:36 2011
New Revision: 226893
URL: http://svn.freebsd.org/changeset/base/226893

Log:
  Define systrace_probe_func in subr_syscall.c where it's used, instead
  of defining it in MD code. This eliminates porting to other architectures.

Modified:
  head/sys/amd64/amd64/trap.c
  head/sys/i386/i386/trap.c
  head/sys/kern/subr_syscall.c

Modified: head/sys/amd64/amd64/trap.c
==============================================================================
--- head/sys/amd64/amd64/trap.c	Fri Oct 28 23:02:21 2011	(r226892)
+++ head/sys/amd64/amd64/trap.c	Sat Oct 29 01:26:36 2011	(r226893)
@@ -104,13 +104,6 @@ dtrace_trap_func_t	dtrace_trap_func;
 dtrace_doubletrap_func_t	dtrace_doubletrap_func;
 
 /*
- * This is a hook which is initialised by the systrace module
- * when it is loaded. This keeps the DTrace syscall provider
- * implementation opaque. 
- */
-systrace_probe_func_t	systrace_probe_func;
-
-/*
  * These hooks are necessary for the pid, usdt and fasttrap providers.
  */
 dtrace_fasttrap_probe_ptr_t	dtrace_fasttrap_probe_ptr;

Modified: head/sys/i386/i386/trap.c
==============================================================================
--- head/sys/i386/i386/trap.c	Fri Oct 28 23:02:21 2011	(r226892)
+++ head/sys/i386/i386/trap.c	Sat Oct 29 01:26:36 2011	(r226893)
@@ -113,13 +113,6 @@ dtrace_trap_func_t	dtrace_trap_func;
 dtrace_doubletrap_func_t	dtrace_doubletrap_func;
 
 /*
- * This is a hook which is initialised by the systrace module
- * when it is loaded. This keeps the DTrace syscall provider
- * implementation opaque. 
- */
-systrace_probe_func_t	systrace_probe_func;
-
-/*
  * These hooks are necessary for the pid, usdt and fasttrap providers.
  */
 dtrace_fasttrap_probe_ptr_t	dtrace_fasttrap_probe_ptr;

Modified: head/sys/kern/subr_syscall.c
==============================================================================
--- head/sys/kern/subr_syscall.c	Fri Oct 28 23:02:21 2011	(r226892)
+++ head/sys/kern/subr_syscall.c	Sat Oct 29 01:26:36 2011	(r226893)
@@ -52,6 +52,15 @@ __FBSDID("$FreeBSD$");
 #endif
 #include 
 
+#ifdef KDTRACE_HOOKS
+/*
+ * This is a hook which is initialised by the systrace module
+ * when it is loaded. This keeps the DTrace syscall provider
+ * implementation opaque.
+ */
+systrace_probe_func_t systrace_probe_func;
+#endif
+
 static inline int
 syscallenter(struct thread *td, struct syscall_args *sa)
 {

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 05:48:25 2011
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E764D106566C;
	Sat, 29 Oct 2011 05:48:25 +0000 (UTC) (envelope-from ache@vniz.net)
Received: from vniz.net (vniz.net [194.87.13.69])
	by mx1.freebsd.org (Postfix) with ESMTP id 66F288FC13;
	Sat, 29 Oct 2011 05:48:21 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by vniz.net (8.14.5/8.14.5) with ESMTP id p9T5mJel016084;
	Sat, 29 Oct 2011 09:48:20 +0400 (MSK) (envelope-from ache@vniz.net)
Received: (from ache@localhost)
	by localhost (8.14.5/8.14.5/Submit) id p9T5mJBY016082;
	Sat, 29 Oct 2011 09:48:19 +0400 (MSK) (envelope-from ache)
Date: Sat, 29 Oct 2011 09:48:18 +0400
From: Andrey Chernov 
To: Doug Barton 
Message-ID: <20111029054816.GA15960@vniz.net>
Mail-Followup-To: Andrey Chernov ,
	Doug Barton , src-committers@FreeBSD.ORG,
	svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
References: <201110282028.p9SKSDdO076508@svn.freebsd.org>
	<4EAB4B83.3040801@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4EAB4B83.3040801@FreeBSD.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG
Subject: Re: svn commit: r226889 - head/usr.bin/sed
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 05:48:26 -0000

On Fri, Oct 28, 2011 at 05:40:35PM -0700, Doug Barton wrote:
> > ==============================================================================
> > --- head/usr.bin/sed/sed.1	Fri Oct 28 20:00:30 2011	(r226888)
> > +++ head/usr.bin/sed/sed.1	Fri Oct 28 20:28:13 2011	(r226889)
> > @@ -343,7 +343,7 @@ can be preceded by white space and can b
> >  The function can be preceded by white space.
> >  The terminating
> >  .Dq }
> > -must be preceded by a newline or optional white space.
> > +must be preceded by a newline and optional white space.
> 
> Thanks for looking at this, but I'm not sure that this is an
> improvement. "... must ... and optional ..." is very hard to parse. It
> looks like what is meant is something like this:
> 
> must be preceded by a newline, and may also be preceded by white space.
> 
> Does that sound right? Also, if you're going to refer to POSIX it's nice
> to actually quote the chapter and verse. That would have made it easier
> for me to figure out what's going on here, for example. :)

"The  shall be preceded by a  and can be preceded or 
followed by  characters."

-- 
http://ache.vniz.net/

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 06:13:45 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2FDDC106566B;
	Sat, 29 Oct 2011 06:13:45 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F3A08FC0A;
	Sat, 29 Oct 2011 06:13:45 +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 p9T6DjkX097083;
	Sat, 29 Oct 2011 06:13:45 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6DiZK097081;
	Sat, 29 Oct 2011 06:13:44 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201110290613.p9T6DiZK097081@svn.freebsd.org>
From: Attilio Rao 
Date: Sat, 29 Oct 2011 06:13:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226894 - stable/9/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 06:13:45 -0000

Author: attilio
Date: Sat Oct 29 06:13:44 2011
New Revision: 226894
URL: http://svn.freebsd.org/changeset/base/226894

Log:
  Include a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching
  correct utilization.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/vm/vm_phys.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/vm/vm_phys.c
==============================================================================
--- stable/9/sys/vm/vm_phys.c	Sat Oct 29 01:26:36 2011	(r226893)
+++ stable/9/sys/vm/vm_phys.c	Sat Oct 29 06:13:44 2011	(r226894)
@@ -33,6 +33,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
+#include "opt_vm.h"
 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 06:13:48 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 079A8106564A;
	Sat, 29 Oct 2011 06:13:48 +0000 (UTC)
	(envelope-from ache@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EC0958FC08;
	Sat, 29 Oct 2011 06:13:47 +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 p9T6Dlr5097119;
	Sat, 29 Oct 2011 06:13:47 GMT (envelope-from ache@svn.freebsd.org)
Received: (from ache@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6Dlre097117;
	Sat, 29 Oct 2011 06:13:47 GMT (envelope-from ache@svn.freebsd.org)
Message-Id: <201110290613.p9T6Dlre097117@svn.freebsd.org>
From: "Andrey A. Chernov" 
Date: Sat, 29 Oct 2011 06:13:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226895 - head/usr.bin/sed
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 06:13:48 -0000

Author: ache
Date: Sat Oct 29 06:13:47 2011
New Revision: 226895
URL: http://svn.freebsd.org/changeset/base/226895

Log:
  Reword '}' description to sound more clear.
  
  Submitted by:   dougb
  MFC after:      7 days

Modified:
  head/usr.bin/sed/sed.1

Modified: head/usr.bin/sed/sed.1
==============================================================================
--- head/usr.bin/sed/sed.1	Sat Oct 29 06:13:44 2011	(r226894)
+++ head/usr.bin/sed/sed.1	Sat Oct 29 06:13:47 2011	(r226895)
@@ -343,7 +343,7 @@ can be preceded by white space and can b
 The function can be preceded by white space.
 The terminating
 .Dq }
-must be preceded by a newline and optional white space.
+must be preceded by a newline, and may also be preceded by white space.
 .Pp
 .Bl -tag -width "XXXXXX" -compact
 .It [2addr] function-list

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 06:26:50 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5A68E106564A;
	Sat, 29 Oct 2011 06:26:50 +0000 (UTC)
	(envelope-from scottl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A7E48FC1A;
	Sat, 29 Oct 2011 06:26:50 +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 p9T6Qo7D097570;
	Sat, 29 Oct 2011 06:26:50 GMT (envelope-from scottl@svn.freebsd.org)
Received: (from scottl@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6QoKC097568;
	Sat, 29 Oct 2011 06:26:50 GMT (envelope-from scottl@svn.freebsd.org)
Message-Id: <201110290626.p9T6QoKC097568@svn.freebsd.org>
From: Scott Long 
Date: Sat, 29 Oct 2011 06:26:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226896 - head/sys/dev/mfi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 06:26:50 -0000

Author: scottl
Date: Sat Oct 29 06:26:49 2011
New Revision: 226896
URL: http://svn.freebsd.org/changeset/base/226896

Log:
  Fix an implicit dependency between the MFI driver and CAM that had grown due
  to an API change in CAM.  It's once again possible to link a static kernel
  with 'mfi' without requiring 'scbus' as well.  Ditto for KLD loading.
  
  Submitted by:	kib
  Reviewed by:	ken
  MFC after:	3 days

Modified:
  head/sys/dev/mfi/mfivar.h

Modified: head/sys/dev/mfi/mfivar.h
==============================================================================
--- head/sys/dev/mfi/mfivar.h	Sat Oct 29 06:13:47 2011	(r226895)
+++ head/sys/dev/mfi/mfivar.h	Sat Oct 29 06:26:49 2011	(r226896)
@@ -352,12 +352,29 @@ mfi_dequeue_bio(struct mfi_softc *sc)
 	return (bp);
 }
 
+/*
+ * This is from the original scsi_extract_sense() in CAM.  It's copied
+ * here because CAM now uses a non-inline version that follows more complex
+ * additions to the SPC spec, and we don't want to force a dependency on
+ * the CAM module for such a trivial action.
+ */
+static __inline void
+mfi_extract_sense(struct scsi_sense_data_fixed *sense,
+    int *error_code, int *sense_key, int *asc, int *ascq)
+{
+
+	*error_code = sense->error_code & SSD_ERRCODE;
+	*sense_key = sense->flags & SSD_KEY;
+	*asc = (sense->extra_len >= 5) ? sense->add_sense_code : 0;
+	*ascq = (sense->extra_len >= 6) ? sense->add_sense_code_qual : 0;
+}
+
 static __inline void
 mfi_print_sense(struct mfi_softc *sc, void *sense)
 {
 	int error, key, asc, ascq;
 
-	scsi_extract_sense((struct scsi_sense_data *)sense,
+	mfi_extract_sense((struct scsi_sense_data_fixed *)sense,
 	    &error, &key, &asc, &ascq);
 	device_printf(sc->mfi_dev, "sense error %d, sense_key %d, "
 	    "asc %d, ascq %d\n", error, key, asc, ascq);

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 06:28:19 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 45BAD106564A;
	Sat, 29 Oct 2011 06:28:19 +0000 (UTC)
	(envelope-from attilio@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3545E8FC19;
	Sat, 29 Oct 2011 06:28: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 p9T6SJqs097650;
	Sat, 29 Oct 2011 06:28:19 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6SJOO097648;
	Sat, 29 Oct 2011 06:28:19 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201110290628.p9T6SJOO097648@svn.freebsd.org>
From: Attilio Rao 
Date: Sat, 29 Oct 2011 06:28: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: r226897 - stable/8/sys/vm
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 06:28:19 -0000

Author: attilio
Date: Sat Oct 29 06:28:18 2011
New Revision: 226897
URL: http://svn.freebsd.org/changeset/base/226897

Log:
  MFC r226642:
  Include a missing opt_vm.h which doesn't let VM_NRESERVLEVEL switching
  correct utilization.

Modified:
  stable/8/sys/vm/vm_phys.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)

Modified: stable/8/sys/vm/vm_phys.c
==============================================================================
--- stable/8/sys/vm/vm_phys.c	Sat Oct 29 06:26:49 2011	(r226896)
+++ stable/8/sys/vm/vm_phys.c	Sat Oct 29 06:28:18 2011	(r226897)
@@ -33,6 +33,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
+#include "opt_vm.h"
 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 06:33:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B7D5F106564A;
	Sat, 29 Oct 2011 06:33:14 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9E2278FC13;
	Sat, 29 Oct 2011 06:33:14 +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 p9T6XEnH097905;
	Sat, 29 Oct 2011 06:33:14 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T6XCK1097903;
	Sat, 29 Oct 2011 06:33:12 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201110290633.p9T6XCK1097903@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 29 Oct 2011 06:33:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226898 - head/games/fortune/datfiles
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 06:33:14 -0000

Author: dougb
Date: Sat Oct 29 06:33:12 2011
New Revision: 226898
URL: http://svn.freebsd.org/changeset/base/226898

Log:
  Fix the text and attribution of the poem "Youth" by Samuel Ullman.
  
  Our copy was a bastardization of the "older" (probably original?) and
  shorter version of the poem; and the "newer" version that is better
  known, and arguably more popular. Standardize on the latter.
  
  Cf. http://www.bartleby.com/73/2099.html

Modified:
  head/games/fortune/datfiles/fortunes

Modified: head/games/fortune/datfiles/fortunes
==============================================================================
--- head/games/fortune/datfiles/fortunes	Sat Oct 29 06:28:18 2011	(r226897)
+++ head/games/fortune/datfiles/fortunes	Sat Oct 29 06:33:12 2011	(r226898)
@@ -4942,25 +4942,37 @@ cats on the dinette table, etc.
 	"That stop him?"
 	"No, but it sure slowed him up."
 %
-	Youth is not a time of life, it is a state of mind; it is a temper of
-the will, a quality of the imagination, a vigor of the emotions, a predominance
-of courage over timidity, of the appetite for adventure over love of ease.
-	Nobody grows old by merely living a number of years; people grow
-old only by deserting their ideals.  Years wrinkle the skin, but to give up
-enthusiasm wrinkles the soul.  Worry, doubt, self-distrust, fear, and despair
--- these are the long, long years that bow the head and turn the growing spirit
-back to dust.
-	Whether seventy or sixteen, there is in every being's heart the love
-of wonder, the sweet amazement at the stars and the starlike things and
-thoughts, the undaunted challenge of events, the unfailing childlike appetite
-for what next, and the joy and the game of life.
-	You are as young as your faith, as old as your doubt; as young as your
-self-confidence, as old as your fear, as young as your hope, as old as your
-despair.
-	So long as your heart receives messages of beauty, cheer, courage,
-grandeur and power from the earth, from man, and from the Infinite, so long
-you are young.
-		-- Samuel Ullman
+	Youth is not a time of life--it is a state of mind. It is not a
+matter of red cheeks, red lips and supple knees. It is a temper of the
+will; a quality of the imagination; a vigor of the emotions; it is a
+freshness of the deep springs of life.  Youth means a tempermental
+predominance of courage over timidity, of the appetite for adventure
+over a life of ease.  This often exists in a man of fifty, more than in
+a boy of twenty.  Nobody grows old by merely living a number of years;
+people grow old by deserting their ideals.
+
+	Years may wrinkle the skin, but to give up enthusiasm wrinkles
+the soul.  Worry, doubt, self-distrust, fear and despair--these are the
+long, long years that bow the head and turn the growing spirit back to
+dust.
+
+	Whether seventy or sixteen, there is in every being’s heart a
+love of wonder; the sweet amazement at the stars and starlike things and
+thoughts; the undaunted challenge of events, the unfailing childlike
+appetite for what comes next, and the joy in the game of life.
+
+	You are as young as your faith, as old as your doubt; as young
+as your self-confidence, as old as your fear, as young as your hope, as
+old as your despair.
+
+	In the central place of your heart there is a wireless station.
+So long as it receives messages of beauty, hope, cheer, grandeur,
+courage, and power from the earth, from men and from the Infinite--so
+long are you young.  When the wires are all down and the central places
+of your heart are covered with the snows of pessimism and the ice of
+cynicism, then are you grown old, indeed!
+		-- Samuel Ullman, "Youth" (1934), as published in
+		   The Silver Treasury, Prose and Verse for Every Mood
 %
 " "
 		-- Charlie Chaplin

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 07:17:47 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DCD4B1065672;
	Sat, 29 Oct 2011 07:17:47 +0000 (UTC)
	(envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id CCEB38FC0A;
	Sat, 29 Oct 2011 07:17:47 +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 p9T7Hl5q099431;
	Sat, 29 Oct 2011 07:17:47 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9T7HlAO099429;
	Sat, 29 Oct 2011 07:17:47 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201110290717.p9T7HlAO099429@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 29 Oct 2011 07:17:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226900 - head/sys/dev/ath
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 07:17:48 -0000

Author: adrian
Date: Sat Oct 29 07:17:47 2011
New Revision: 226900
URL: http://svn.freebsd.org/changeset/base/226900

Log:
  Add some new ath(4) debugging bits, from my if_ath_tx 11n TX branch.

Modified:
  head/sys/dev/ath/if_ath_debug.h

Modified: head/sys/dev/ath/if_ath_debug.h
==============================================================================
--- head/sys/dev/ath/if_ath_debug.h	Sat Oct 29 06:55:57 2011	(r226899)
+++ head/sys/dev/ath/if_ath_debug.h	Sat Oct 29 07:17:47 2011	(r226900)
@@ -57,6 +57,11 @@ enum { 
 	ATH_DEBUG_TDMA		= 0x00800000,	/* TDMA processing */
 	ATH_DEBUG_TDMA_TIMER	= 0x01000000,	/* TDMA timer processing */
 	ATH_DEBUG_REGDOMAIN	= 0x02000000,	/* regulatory processing */
+	ATH_DEBUG_SW_TX		= 0x04000000,	/* per-packet software TX */
+	ATH_DEBUG_SW_TX_BAW	= 0x08000000,	/* BAW handling */
+	ATH_DEBUG_SW_TX_CTRL	= 0x10000000,	/* queue control */
+	ATH_DEBUG_SW_TX_AGGR	= 0x20000000,	/* aggregate TX */
+	ATH_DEBUG_SW_TX_RETRIES	= 0x40000000,	/* software TX retries */
 	ATH_DEBUG_FATAL		= 0x80000000,	/* fatal errors */
 	ATH_DEBUG_ANY		= 0xffffffff
 };

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 12:32:14 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 556EF106564A;
	Sat, 29 Oct 2011 12:32:14 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B8408FC08;
	Sat, 29 Oct 2011 12:32:14 +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 p9TCWEHw016702;
	Sat, 29 Oct 2011 12:32:14 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TCWEEL016699;
	Sat, 29 Oct 2011 12:32:14 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110291232.p9TCWEEL016699@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Sat, 29 Oct 2011 12:32:14 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226903 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 12:32:14 -0000

Author: hselasky
Date: Sat Oct 29 12:32:13 2011
New Revision: 226903
URL: http://svn.freebsd.org/changeset/base/226903

Log:
  Improve USB mass storage quirk auto detection.
  
  MFC after:	3 days

Modified:
  head/sys/dev/usb/usb_device.c
  head/sys/dev/usb/usb_msctest.c

Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c	Sat Oct 29 08:11:18 2011	(r226902)
+++ head/sys/dev/usb/usb_device.c	Sat Oct 29 12:32:13 2011	(r226903)
@@ -1851,7 +1851,8 @@ repeat_set_config:
 		}
 	}
 	if (set_config_failed == 0 && config_index == 0 &&
-	    usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0) {
+	    usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0 &&
+	    usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0) {
 
 		/*
 		 * Try to figure out if there are any MSC quirks we

Modified: head/sys/dev/usb/usb_msctest.c
==============================================================================
--- head/sys/dev/usb/usb_msctest.c	Sat Oct 29 08:11:18 2011	(r226902)
+++ head/sys/dev/usb/usb_msctest.c	Sat Oct 29 12:32:13 2011	(r226903)
@@ -603,6 +603,29 @@ usb_iface_is_cdrom(struct usb_device *ud
 	return (is_cdrom);
 }
 
+static uint8_t
+usb_msc_get_max_lun(struct usb_device *udev, uint8_t iface_index)
+{
+	struct usb_device_request req;
+	usb_error_t err;
+	uint8_t buf = 0;
+
+
+	/* The Get Max Lun command is a class-specific request. */
+	req.bmRequestType = UT_READ_CLASS_INTERFACE;
+	req.bRequest = 0xFE;		/* GET_MAX_LUN */
+	USETW(req.wValue, 0);
+	req.wIndex[0] = iface_index;
+	req.wIndex[1] = 0;
+	USETW(req.wLength, 1);
+
+	err = usbd_do_request(udev, NULL, &req, &buf);
+	if (err)
+		buf = 0;
+
+	return (buf);
+}
+
 usb_error_t
 usb_msc_auto_quirk(struct usb_device *udev, uint8_t iface_index)
 {
@@ -622,6 +645,11 @@ usb_msc_auto_quirk(struct usb_device *ud
 	 */
 	usb_pause_mtx(NULL, hz);
 
+	if (usb_msc_get_max_lun(udev, iface_index) == 0) {
+		DPRINTF("Device has only got one LUN.\n");
+		usbd_add_dynamic_quirk(udev, UQ_MSC_NO_GETMAXLUN);
+	}
+
 	is_no_direct = 1;
 	for (timeout = 4; timeout; timeout--) {
 		err = bbb_command_start(sc, DIR_IN, 0, sc->buffer,

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 12:39:06 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BCE2106564A;
	Sat, 29 Oct 2011 12:39:06 +0000 (UTC)
	(envelope-from hselasky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 30F4F8FC12;
	Sat, 29 Oct 2011 12:39:06 +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 p9TCd6JR016959;
	Sat, 29 Oct 2011 12:39:06 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TCd6pR016954;
	Sat, 29 Oct 2011 12:39:06 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201110291239.p9TCd6pR016954@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Sat, 29 Oct 2011 12:39:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226904 - in stable/9/sys/dev/usb: . controller
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 12:39:06 -0000

Author: hselasky
Date: Sat Oct 29 12:39:05 2011
New Revision: 226904
URL: http://svn.freebsd.org/changeset/base/226904

Log:
  MFC r226803:
  Fix suspend and resume of non-super-speed USB devices
  in the generic XHCI driver. There appears to be some minor
  logic missing for this feature to work.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/usb/controller/xhci.c
  stable/9/sys/dev/usb/controller/xhcireg.h
  stable/9/sys/dev/usb/usb.h
  stable/9/sys/dev/usb/usb_hub.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/9/sys/dev/usb/controller/xhci.c	Sat Oct 29 12:32:13 2011	(r226903)
+++ stable/9/sys/dev/usb/controller/xhci.c	Sat Oct 29 12:39:05 2011	(r226904)
@@ -3048,7 +3048,9 @@ xhci_roothub_exec(struct usb_device *ude
 		}
 		port = XHCI_PORTSC(index);
 
-		v = XREAD4(sc, oper, port) & ~XHCI_PS_CLEAR;
+		v = XREAD4(sc, oper, port);
+		i = XHCI_PS_PLS_GET(v);
+		v &= ~XHCI_PS_CLEAR;
 
 		switch (value) {
 		case UHF_C_BH_PORT_RESET:
@@ -3082,6 +3084,17 @@ xhci_roothub_exec(struct usb_device *ude
 			XWRITE4(sc, oper, port, v & ~XHCI_PS_PIC_SET(3));
 			break;
 		case UHF_PORT_SUSPEND:
+
+			/* U3 -> U15 */
+			if (i == 3) {
+				XWRITE4(sc, oper, port, v |
+				    XHCI_PS_PLS_SET(0xF) | XHCI_PS_LWS);
+			}
+
+			/* wait 20ms for resume sequence to complete */
+			usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50);
+
+			/* U0 */
 			XWRITE4(sc, oper, port, v |
 			    XHCI_PS_PLS_SET(0) | XHCI_PS_LWS);
 			break;

Modified: stable/9/sys/dev/usb/controller/xhcireg.h
==============================================================================
--- stable/9/sys/dev/usb/controller/xhcireg.h	Sat Oct 29 12:32:13 2011	(r226903)
+++ stable/9/sys/dev/usb/controller/xhcireg.h	Sat Oct 29 12:39:05 2011	(r226904)
@@ -133,7 +133,7 @@
 #define	XHCI_PS_WOE		0x08000000	/* RW - wake on over-current enable */
 #define	XHCI_PS_DR		0x40000000	/* RO - device removable */
 #define	XHCI_PS_WPR		0x80000000U	/* RW - warm port reset */
-#define	XHCI_PS_CLEAR		0x80FF00F7U	/* command bits */
+#define	XHCI_PS_CLEAR		0x80FF01FFU	/* command bits */
 
 #define	XHCI_PORTPMSC(n)	(0x3F4 + (0x10 * (n)))	/* XHCI status and control */
 #define	XHCI_PM3_U1TO_GET(x)	(((x) >> 0) & 0xFF)	/* RW - U1 timeout */

Modified: stable/9/sys/dev/usb/usb.h
==============================================================================
--- stable/9/sys/dev/usb/usb.h	Sat Oct 29 12:32:13 2011	(r226903)
+++ stable/9/sys/dev/usb/usb.h	Sat Oct 29 12:39:05 2011	(r226904)
@@ -686,6 +686,7 @@ struct usb_port_status {
 #define	UPS_PORT_LS_HOT_RST	0x09
 #define	UPS_PORT_LS_COMP_MODE	0x0A
 #define	UPS_PORT_LS_LOOPBACK	0x0B
+#define	UPS_PORT_LS_RESUME	0x0F
 #define	UPS_PORT_POWER			0x0100
 #define	UPS_LOW_SPEED			0x0200
 #define	UPS_HIGH_SPEED			0x0400

Modified: stable/9/sys/dev/usb/usb_hub.c
==============================================================================
--- stable/9/sys/dev/usb/usb_hub.c	Sat Oct 29 12:32:13 2011	(r226903)
+++ stable/9/sys/dev/usb/usb_hub.c	Sat Oct 29 12:39:05 2011	(r226904)
@@ -611,6 +611,7 @@ uhub_suspend_resume_port(struct uhub_sof
 		switch (UPS_PORT_LINK_STATE_GET(sc->sc_st.port_status)) {
 		case UPS_PORT_LS_U0:
 		case UPS_PORT_LS_U1:
+		case UPS_PORT_LS_RESUME:
 			is_suspend = 0;
 			break;
 		default:

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 16:38:04 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D96291065672;
	Sat, 29 Oct 2011 16:38:04 +0000 (UTC)
	(envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AEFDC8FC14;
	Sat, 29 Oct 2011 16:38:04 +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 p9TGc4f0024539;
	Sat, 29 Oct 2011 16:38:04 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TGc4ps024537;
	Sat, 29 Oct 2011 16:38:04 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201110291638.p9TGc4ps024537@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 29 Oct 2011 16:38:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226906 - stable/9/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 16:38:05 -0000

Author: marcel
Date: Sat Oct 29 16:38:04 2011
New Revision: 226906
URL: http://svn.freebsd.org/changeset/base/226906

Log:
  MFC r226673:
  Don't terminate the interactive root mount prompt on mount failure.
  This restores the previous behaviour. While here, match '?' and '.'
  inputs exactly and improve the error message.
  
  Requested by: avg@
  Derived from a patch by: Arnaud Lacombe 
  Approved by: re (kib@)

Modified:
  stable/9/sys/kern/vfs_mountroot.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/kern/vfs_mountroot.c
==============================================================================
--- stable/9/sys/kern/vfs_mountroot.c	Sat Oct 29 13:50:15 2011	(r226905)
+++ stable/9/sys/kern/vfs_mountroot.c	Sat Oct 29 16:38:04 2011	(r226906)
@@ -483,26 +483,27 @@ parse_dir_ask(char **conf)
 	printf("  .               Yield 1 second (for background tasks)\n");
 	printf("      Abort manual input\n");
 
- again:
-	printf("\nmountroot> ");
-	gets(name, sizeof(name), GETS_ECHO);
-	if (name[0] == '\0')
-		return (0);
-	if (name[0] == '?') {
-		printf("\nList of GEOM managed disk devices:\n  ");
-		g_dev_print();
-		goto again;
-	}
-	if (name[0] == '.') {
-		pause("rmask", hz);
-		goto again;
-	}
-	mnt = name;
-	error = parse_mount(&mnt);
-	if (error == -1) {
-		printf("Invalid specification.\n");
-		goto again;
-	}
+	do {
+		error = EINVAL;
+		printf("\nmountroot> ");
+		gets(name, sizeof(name), GETS_ECHO);
+		if (name[0] == '\0')
+			break;
+		if (name[0] == '?' && name[1] == '\0') {
+			printf("\nList of GEOM managed disk devices:\n  ");
+			g_dev_print();
+			continue;
+		}
+		if (name[0] == '.' && name[1] == '\0') {
+			pause("rmask", hz);
+			continue;
+		}
+		mnt = name;
+		error = parse_mount(&mnt);
+		if (error == -1)
+			printf("Invalid file system specification.\n");
+	} while (error != 0);
+
 	return (error);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 17:29:00 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 504F9106566C;
	Sat, 29 Oct 2011 17:29:00 +0000 (UTC) (envelope-from jmg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 407F68FC0C;
	Sat, 29 Oct 2011 17:29:00 +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 p9THT0tk026127;
	Sat, 29 Oct 2011 17:29:00 GMT (envelope-from jmg@svn.freebsd.org)
Received: (from jmg@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9THT091026125;
	Sat, 29 Oct 2011 17:29:00 GMT (envelope-from jmg@svn.freebsd.org)
Message-Id: <201110291729.p9THT091026125@svn.freebsd.org>
From: John-Mark Gurney 
Date: Sat, 29 Oct 2011 17:29:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226907 - head/sbin/fdisk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 17:29:00 -0000

Author: jmg
Date: Sat Oct 29 17:28:59 2011
New Revision: 226907
URL: http://svn.freebsd.org/changeset/base/226907

Log:
  error if /boot/mbr is empty...  This can happen on a system like arm
  that doesn't have a /boot/mbr, and you touch it to get past the previous
  error message...
  
  MFC after:	1 week

Modified:
  head/sbin/fdisk/fdisk.c

Modified: head/sbin/fdisk/fdisk.c
==============================================================================
--- head/sbin/fdisk/fdisk.c	Sat Oct 29 16:38:04 2011	(r226906)
+++ head/sbin/fdisk/fdisk.c	Sat Oct 29 17:28:59 2011	(r226907)
@@ -513,6 +513,8 @@ init_boot(void)
 	if ((fdesc = open(fname, O_RDONLY)) == -1 ||
 	    fstat(fdesc, &sb) == -1)
 		err(1, "%s", fname);
+	if (sb.st_size == 0)
+		errx(1, "%s is empty, must not be.", fname);
 	if ((mboot.bootinst_size = sb.st_size) % secsize != 0)
 		errx(1, "%s: length must be a multiple of sector size", fname);
 	if (mboot.bootinst != NULL)

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 17:30:58 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2BFAA106564A;
	Sat, 29 Oct 2011 17:30:58 +0000 (UTC) (envelope-from jmg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C38B8FC0A;
	Sat, 29 Oct 2011 17:30:58 +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 p9THUvWu026229;
	Sat, 29 Oct 2011 17:30:58 GMT (envelope-from jmg@svn.freebsd.org)
Received: (from jmg@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9THUvK1026227;
	Sat, 29 Oct 2011 17:30:57 GMT (envelope-from jmg@svn.freebsd.org)
Message-Id: <201110291730.p9THUvK1026227@svn.freebsd.org>
From: John-Mark Gurney 
Date: Sat, 29 Oct 2011 17:30:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226908 - head/sbin/fdisk
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 17:30:58 -0000

Author: jmg
Date: Sat Oct 29 17:30:57 2011
New Revision: 226908
URL: http://svn.freebsd.org/changeset/base/226908

Log:
  remove trailing whitespace...
  
  MFC after:	1 week

Modified:
  head/sbin/fdisk/fdisk.c

Modified: head/sbin/fdisk/fdisk.c
==============================================================================
--- head/sbin/fdisk/fdisk.c	Sat Oct 29 17:28:59 2011	(r226907)
+++ head/sbin/fdisk/fdisk.c	Sat Oct 29 17:30:57 2011	(r226908)
@@ -487,7 +487,7 @@ print_part(const struct dos_partition *p
 	    get_type(partp->dp_typ));
 	printf("    start %lu, size %lu (%ju Meg), flag %x%s\n",
 		(u_long)partp->dp_start,
-		(u_long)partp->dp_size, 
+		(u_long)partp->dp_size,
 		(uintmax_t)part_mb,
 		partp->dp_flag,
 		partp->dp_flag == ACTIVE ? " (active)" : "");
@@ -892,7 +892,7 @@ write_s0()
 		dos_partition_enc(&mboot.bootinst[DOSPARTOFF + i * DOSPARTSIZE],
 		    &mboot.parts[i]);
 	le16enc(&mboot.bootinst[DOSMAGICOFFSET], DOSMAGIC);
-	for(sector = 0; sector < mboot.bootinst_size / secsize; sector++) 
+	for(sector = 0; sector < mboot.bootinst_size / secsize; sector++)
 		if (write_disk(sector,
 			       &mboot.bootinst[sector * secsize]) == -1) {
 			warn("can't write fdisk partition table");
@@ -1113,7 +1113,7 @@ str2sectors(const char *str)
 		return NO_DISK_SECTORS;
 	}
 
-	if (*end == 'K') 
+	if (*end == 'K')
 		val *= 1024UL / secsize;
 	else if (*end == 'M')
 		val *= 1024UL * 1024UL / secsize;

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 18:16:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 10C39106566B;
	Sat, 29 Oct 2011 18:16:30 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DB2C68FC12;
	Sat, 29 Oct 2011 18:16:29 +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 p9TIGTDi027725;
	Sat, 29 Oct 2011 18:16:29 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TIGTdi027723;
	Sat, 29 Oct 2011 18:16:29 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201110291816.p9TIGTdi027723@svn.freebsd.org>
From: Doug Barton 
Date: Sat, 29 Oct 2011 18:16:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226909 - head/usr.bin/calendar/calendars
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 18:16:30 -0000

Author: dougb
Date: Sat Oct 29 18:16:29 2011
New Revision: 226909
URL: http://svn.freebsd.org/changeset/base/226909

Log:
  Add a reminder about quarterly status report due dates
  
  Reviewed by:	danger

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- head/usr.bin/calendar/calendars/calendar.freebsd	Sat Oct 29 17:30:57 2011	(r226908)
+++ head/usr.bin/calendar/calendars/calendar.freebsd	Sat Oct 29 18:16:29 2011	(r226909)
@@ -109,6 +109,7 @@
 03/28	Sean C. Farley  born in Indianapolis, Indiana, United States, 1970
 03/29	Thierry Thomas  born in Luxeuil les Bains, France, 1961
 03/30	Po-Chuan Hsieh  born in Taipei, Taiwan, Republic of China, 1978
+03/31	First quarter status reports are due on 04/15
 04/01	Matthew Jacob  born in San Francisco, California, United States, 1958
 04/01	Bill Fenner  born in Bellefonte, Pennsylvania, United States, 1971
 04/01	Peter Edwards  born in Dublin, Ireland, 1973
@@ -199,6 +200,7 @@
 06/29	Daniel Harris  born in Lubbock, Texas, United States, 1985
 06/29	Andrew Pantyukhin  born in Moscow, Russian Federation, 1985
 06/30	Guido van Rooij  born in Best, Noord-Brabant, the Netherlands, 1965
+06/30	Second quarter status reports are due on 07/15
 07/01	Matthew Dillon  born in San Francisco, California, United States, 1966
 07/02	Mark Christopher Ovens  born in Preston, Lancashire, United Kingdom, 1958
 07/02	Vasil Venelinov Dimov  born in Shumen, Bulgaria, 1982
@@ -282,6 +284,7 @@
 09/28	Alex Dupre  born in Milano, Italy, 1980
 09/29	Matthew Hunt  born in Johnstown, Pennsylvania, United States, 1976
 09/30	Hiten M. Pandya  born in Dar-es-Salaam, Tanzania, East Africa, 1986
+09/30	Third quarter status reports are due on 10/15
 10/02	Beat Gaetzi  born in Zurich, Switzerland, 1980
 10/05	Hiroki Sato  born in Yamagata, Japan, 1977
 10/05	Chris Costello  born in Houston, Texas, United States, 1985
@@ -341,5 +344,6 @@
 12/28	Ade Lovett  born in London, England, 1969
 12/28	Marius Strobl  born in Cham, Bavaria, Germany, 1978
 12/31	Edwin Groothuis  born in Geldrop, the Netherlands, 1970
+12/31	Fourth quarter status reports are due on 01/15
 
 #endif /* !_calendar_freebsd_ */

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 22:06:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20C7E1065670;
	Sat, 29 Oct 2011 22:06:54 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0EB148FC0A;
	Sat, 29 Oct 2011 22:06:54 +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 p9TM6rvb034783;
	Sat, 29 Oct 2011 22:06:53 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TM6rWa034778;
	Sat, 29 Oct 2011 22:06:53 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292206.p9TM6rWa034778@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 22:06:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226910 - in stable/9/sys/dev: aac asr hptiop mfi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 22:06:54 -0000

Author: marius
Date: Sat Oct 29 22:06:53 2011
New Revision: 226910
URL: http://svn.freebsd.org/changeset/base/226910

Log:
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/aac/aac_cam.c
  stable/9/sys/dev/asr/asr.c
  stable/9/sys/dev/hptiop/hptiop.c
  stable/9/sys/dev/mfi/mfi_cam.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/9/sys/dev/aac/aac_cam.c	Sat Oct 29 18:16:29 2011	(r226909)
+++ stable/9/sys/dev/aac/aac_cam.c	Sat Oct 29 22:06:53 2011	(r226910)
@@ -532,6 +532,7 @@ aac_cam_complete(struct aac_command *cm)
 	union	ccb *ccb;
 	struct 	aac_srb_response *srbr;
 	struct	aac_softc *sc;
+	int	sense_returned;
 
 	sc = cm->cm_sc;
 	fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
@@ -556,16 +557,17 @@ aac_cam_complete(struct aac_command *cm)
 
 			/* Take care of autosense */
 			if (srbr->sense_len) {
-				int sense_len, scsi_sense_len;
-
-				scsi_sense_len = sizeof(struct scsi_sense_data);
-				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len >
-				    scsi_sense_len) ? scsi_sense_len :
-				    srbr->sense_len;
+				sense_returned = srbr->sense_len;
+				if (sense_returned < ccb->csio.sense_len)
+					ccb->csio.sense_resid =
+					   ccb->csio.sense_len -
+					   sense_returned;
+					else
+					    ccb->csio.sense_resid = 0;
+				bzero(&ccb->csio.sense_data,
+				    sizeof(struct scsi_sense_data));
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,
-				    srbr->sense_len);
-				ccb->csio.sense_len = sense_len;
+				    min(ccb->csio.sense_len, sense_returned));
 				ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 				// scsi_sense_print(&ccb->csio);
 			}

Modified: stable/9/sys/dev/asr/asr.c
==============================================================================
--- stable/9/sys/dev/asr/asr.c	Sat Oct 29 18:16:29 2011	(r226909)
+++ stable/9/sys/dev/asr/asr.c	Sat Oct 29 22:06:53 2011	(r226910)
@@ -3071,6 +3071,14 @@ asr_intr(Asr_softc_t *sc)
 				 && (size > ccb->csio.sense_len)) {
 					size = ccb->csio.sense_len;
 				}
+				if (size < ccb->csio.sense_len) {
+					ccb->csio.sense_resid =
+					    ccb->csio.sense_len - size;
+				} else {
+					ccb->csio.sense_resid = 0;
+				}
+				bzero(&(ccb->csio.sense_data),
+				    sizeof(ccb->csio.sense_data));
 				bcopy(Reply->SenseData,
 				      &(ccb->csio.sense_data), size);
 			}
@@ -3566,6 +3574,12 @@ ASR_queue_i(Asr_softc_t	*sc, PI2O_MESSAG
 		if (size > sizeof(ccb->csio.sense_data)) {
 			size = sizeof(ccb->csio.sense_data);
 		}
+		if (size < ccb->csio.sense_len) {
+			ccb->csio.sense_resid = ccb->csio.sense_len - size;
+		} else {
+			ccb->csio.sense_resid = 0;
+		}
+		bzero(&(ccb->csio.sense_data), sizeof(ccb->csio.sense_data));
 		bcopy(&(ccb->csio.sense_data), Reply_Ptr->SenseData, size);
 		I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(
 		    Reply_Ptr, size);

Modified: stable/9/sys/dev/hptiop/hptiop.c
==============================================================================
--- stable/9/sys/dev/hptiop/hptiop.c	Sat Oct 29 18:16:29 2011	(r226909)
+++ stable/9/sys/dev/hptiop/hptiop.c	Sat Oct 29 22:06:53 2011	(r226910)
@@ -424,6 +424,13 @@ srb_complete:
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (dxfer < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    dxfer;
+			else
+				ccb->csio.sense_resid = 0;
 			if (srb->srb_flag & HPT_SRB_FLAG_HIGH_MEM_ACESS) {/*iop*/
 				bus_space_read_region_1(hba->bar0t, hba->bar0h,
 					index + offsetof(struct hpt_iop_request_scsi_command,
@@ -573,6 +580,13 @@ static void hptiop_request_callback_mv(s
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (req->dataxfer_length < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    req->dataxfer_length;
+			else
+				ccb->csio.sense_resid = 0;
 			memcpy(&ccb->csio.sense_data, &req->sg_list, 
 				MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data)));
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;

Modified: stable/9/sys/dev/mfi/mfi_cam.c
==============================================================================
--- stable/9/sys/dev/mfi/mfi_cam.c	Sat Oct 29 18:16:29 2011	(r226909)
+++ stable/9/sys/dev/mfi/mfi_cam.c	Sat Oct 29 22:06:53 2011	(r226910)
@@ -354,7 +354,13 @@ mfip_done(struct mfi_command *cm)
 
 		ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
 		csio->scsi_status = pt->header.scsi_status;
-		sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data));
+		if (pt->header.sense_len < csio->sense_len)
+			csio->sense_resid = csio->sense_len -
+			    pt->header.sense_len;
+		else
+			csio->sense_resid = 0;
+		sense_len = min(pt->header.sense_len,
+		    sizeof(struct scsi_sense_data));
 		bzero(&csio->sense_data, sizeof(struct scsi_sense_data));
 		bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:27:32 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 857B1106564A;
	Sat, 29 Oct 2011 23:27:32 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A56C8FC0C;
	Sat, 29 Oct 2011 23:27: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 p9TNRWtC037419;
	Sat, 29 Oct 2011 23:27:32 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNRWRX037416;
	Sat, 29 Oct 2011 23:27:32 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292327.p9TNRWRX037416@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:27: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: r226911 - in stable/8/sys/dev: esp sym
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:27:32 -0000

Author: marius
Date: Sat Oct 29 23:27:32 2011
New Revision: 226911
URL: http://svn.freebsd.org/changeset/base/226911

Log:
  MFC: r226095
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  stable/8/sys/dev/esp/ncr53c9x.c
  stable/8/sys/dev/sym/sym_hipd.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)

Modified: stable/8/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 22:06:53 2011	(r226910)
+++ stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:27:32 2011	(r226911)
@@ -1367,7 +1367,8 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->byte2 = ccb->ccb_h.target_lun << SCSI_CMD_LUN_SHIFT;
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
-	ecb->daddr = (char *)&ecb->ccb->csio.sense_data;
+	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
+	ecb->daddr = (char *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1397,7 +1398,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	union ccb *ccb = ecb->ccb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	int lun;
+	int lun, sense_returned;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1426,6 +1427,13 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR |
 			    CAM_AUTOSNS_VALID;
+			sense_returned = sizeof(ccb->csio.sense_data) -
+			    ecb->dleft;
+			if (sense_returned < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    sense_returned;
+			else
+				ccb->csio.sense_resid = 0;
 		} else if (ecb->stat == SCSI_STATUS_CHECK_COND) {
 			if ((ecb->flags & ECB_SENSE) != 0)
 				ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;

Modified: stable/8/sys/dev/sym/sym_hipd.c
==============================================================================
--- stable/8/sys/dev/sym/sym_hipd.c	Sat Oct 29 22:06:53 2011	(r226910)
+++ stable/8/sys/dev/sym/sym_hipd.c	Sat Oct 29 23:27:32 2011	(r226911)
@@ -7154,7 +7154,7 @@ static void sym_complete_error (hcb_p np
 {
 	struct ccb_scsiio *csio;
 	u_int cam_status;
-	int i;
+	int i, sense_returned;
 
 	SYM_LOCK_ASSERT(MA_OWNED);
 
@@ -7214,11 +7214,15 @@ static void sym_complete_error (hcb_p np
 			 *  Bounce back the sense data to user and
 			 *  fix the residual.
 			 */
-			bzero(&csio->sense_data, csio->sense_len);
+			bzero(&csio->sense_data, sizeof(csio->sense_data));
+			sense_returned = SYM_SNS_BBUF_LEN - csio->sense_resid;
+			if (sense_returned < csio->sense_len)
+				csio->sense_resid = csio->sense_len -
+				    sense_returned;
+			else
+				csio->sense_resid = 0;
 			bcopy(cp->sns_bbuf, &csio->sense_data,
-			      MIN(csio->sense_len, SYM_SNS_BBUF_LEN));
-			csio->sense_resid += csio->sense_len;
-			csio->sense_resid -= SYM_SNS_BBUF_LEN;
+			    MIN(csio->sense_len, sense_returned));
 #if 0
 			/*
 			 *  If the device reports a UNIT ATTENTION condition

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:27:36 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 79E951065670;
	Sat, 29 Oct 2011 23:27:36 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EF168FC15;
	Sat, 29 Oct 2011 23:27:36 +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 p9TNRaw7037458;
	Sat, 29 Oct 2011 23:27:36 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNRa4D037455;
	Sat, 29 Oct 2011 23:27:36 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292327.p9TNRa4D037455@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:27:36 +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: r226912 - in stable/7/sys/dev: esp sym
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:27:36 -0000

Author: marius
Date: Sat Oct 29 23:27:36 2011
New Revision: 226912
URL: http://svn.freebsd.org/changeset/base/226912

Log:
  MFC: r226095
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  stable/7/sys/dev/esp/ncr53c9x.c
  stable/7/sys/dev/sym/sym_hipd.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/esp/ncr53c9x.c
==============================================================================
--- stable/7/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:27:32 2011	(r226911)
+++ stable/7/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:27:36 2011	(r226912)
@@ -1367,7 +1367,8 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->byte2 = ccb->ccb_h.target_lun << SCSI_CMD_LUN_SHIFT;
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
-	ecb->daddr = (char *)&ecb->ccb->csio.sense_data;
+	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
+	ecb->daddr = (char *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1397,7 +1398,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	union ccb *ccb = ecb->ccb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	int lun;
+	int lun, sense_returned;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1426,6 +1427,13 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR |
 			    CAM_AUTOSNS_VALID;
+			sense_returned = sizeof(ccb->csio.sense_data) -
+			    ecb->dleft;
+			if (sense_returned < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    sense_returned;
+			else
+				ccb->csio.sense_resid = 0;
 		} else if (ecb->stat == SCSI_STATUS_CHECK_COND) {
 			if ((ecb->flags & ECB_SENSE) != 0)
 				ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;

Modified: stable/7/sys/dev/sym/sym_hipd.c
==============================================================================
--- stable/7/sys/dev/sym/sym_hipd.c	Sat Oct 29 23:27:32 2011	(r226911)
+++ stable/7/sys/dev/sym/sym_hipd.c	Sat Oct 29 23:27:36 2011	(r226912)
@@ -7154,7 +7154,7 @@ static void sym_complete_error (hcb_p np
 {
 	struct ccb_scsiio *csio;
 	u_int cam_status;
-	int i;
+	int i, sense_returned;
 
 	SYM_LOCK_ASSERT(MA_OWNED);
 
@@ -7214,11 +7214,15 @@ static void sym_complete_error (hcb_p np
 			 *  Bounce back the sense data to user and
 			 *  fix the residual.
 			 */
-			bzero(&csio->sense_data, csio->sense_len);
+			bzero(&csio->sense_data, sizeof(csio->sense_data));
+			sense_returned = SYM_SNS_BBUF_LEN - csio->sense_resid;
+			if (sense_returned < csio->sense_len)
+				csio->sense_resid = csio->sense_len -
+				    sense_returned;
+			else
+				csio->sense_resid = 0;
 			bcopy(cp->sns_bbuf, &csio->sense_data,
-			      MIN(csio->sense_len, SYM_SNS_BBUF_LEN));
-			csio->sense_resid += csio->sense_len;
-			csio->sense_resid -= SYM_SNS_BBUF_LEN;
+			    MIN(csio->sense_len, sense_returned));
 #if 0
 			/*
 			 *  If the device reports a UNIT ATTENTION condition

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:44:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5F928106566B;
	Sat, 29 Oct 2011 23:44:30 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CE468FC08;
	Sat, 29 Oct 2011 23:44:30 +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 p9TNiUc1038103;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNiUfu038092;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292344.p9TNiUfu038092@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:44: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: r226913 - stable/8/sys/dev/aac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:44:30 -0000

Author: marius
Date: Sat Oct 29 23:44:29 2011
New Revision: 226913
URL: http://svn.freebsd.org/changeset/base/226913

Log:
  MFC: r206534
  
  Whitespace cleanup, in advance of next sync with Adaptec's driver.  No
  functional change.

Modified:
  stable/8/sys/dev/aac/aac.c
  stable/8/sys/dev/aac/aac_cam.c
  stable/8/sys/dev/aac/aac_debug.c
  stable/8/sys/dev/aac/aac_disk.c
  stable/8/sys/dev/aac/aac_pci.c
  stable/8/sys/dev/aac/aacreg.h
  stable/8/sys/dev/aac/aacvar.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)

Modified: stable/8/sys/dev/aac/aac.c
==============================================================================
--- stable/8/sys/dev/aac/aac.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -2004,7 +2004,7 @@ aac_setup_intr(struct aac_softc *sc)
 	}
 	if (sc->flags & AAC_FLAGS_NEW_COMM) {
 		if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
-				   INTR_MPSAFE|INTR_TYPE_BIO, NULL, 
+				   INTR_MPSAFE|INTR_TYPE_BIO, NULL,
 				   aac_new_intr, sc, &sc->aac_intr)) {
 			device_printf(sc->aac_dev, "can't set up interrupt\n");
 			return (EINVAL);

Modified: stable/8/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -443,7 +443,7 @@ aac_cam_action(struct cam_sim *sim, unio
 			    srb->cdb_len);
 
 		/* Set command */
-		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? 
+		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ?
 			ScsiPortCommandU64 : ScsiPortCommand;
 
 		/* Map the s/g list. XXX 32bit addresses only! */
@@ -560,7 +560,7 @@ aac_cam_complete(struct aac_command *cm)
 
 				scsi_sense_len = sizeof(struct scsi_sense_data);
 				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len > 
+				sense_len = (srbr->sense_len >
 				    scsi_sense_len) ? scsi_sense_len :
 				    srbr->sense_len;
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,

Modified: stable/8/sys/dev/aac/aac_debug.c
==============================================================================
--- stable/8/sys/dev/aac/aac_debug.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_debug.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -62,62 +62,62 @@ aac_print_queues(struct aac_softc *sc)
 	device_printf(sc->aac_dev, "FIB queue header at %p  queues at %p\n",
 	    &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0],
 	    &sc->aac_queues->qt_HostNormCmdQueue[0]);
-	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n",
 	    sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max);
-	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n",
 	    sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max);
-	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n",
 	    sc->aac_qstat[AACQ_READY].q_length,
 	    sc->aac_qstat[AACQ_READY].q_max);
-	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n",
 	    sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max);
 }
 
@@ -225,8 +225,8 @@ aac_print_fib(struct aac_softc *sc, stru
 
 		if (br->Command == VM_CtBlockRead) {
 			device_printf(sc->aac_dev,
-				      "  BlockRead: container %d  0x%x/%d\n", 
-				      br->ContainerId, br->BlockNumber, 
+				      "  BlockRead: container %d  0x%x/%d\n",
+				      br->ContainerId, br->BlockNumber,
 				      br->ByteCount);
 			sg = &br->SgMap;
 		}
@@ -234,7 +234,7 @@ aac_print_fib(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev,
 				      "  BlockWrite: container %d  0x%x/%d "
 				      "(%s)\n", bw->ContainerId,
-				      bw->BlockNumber, bw->ByteCount, 
+				      bw->BlockNumber, bw->ByteCount,
 				      bw->Stable == CSTABLE ? "stable" :
 				      "unstable");
 			sg = &bw->SgMap;
@@ -267,7 +267,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber);
 		switch(aif->data.EN.type) {
 		case AifEnGeneric:		/* Generic notification */
-			device_printf(sc->aac_dev, "(Generic) %.*s\n", 
+			device_printf(sc->aac_dev, "(Generic) %.*s\n",
 				  (int)sizeof(aif->data.EN.data.EG),
 				  aif->data.EN.data.EG.text);
 			break;
@@ -281,21 +281,21 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifEnContainerChange:	/* Adapter specific container
 						 * configuration change */
 			device_printf(sc->aac_dev, "(ContainerChange) "
-				      "container %d,%d\n", 
-				      aif->data.EN.data.ECC.container[0], 
+				      "container %d,%d\n",
+				      aif->data.EN.data.ECC.container[0],
 				      aif->data.EN.data.ECC.container[1]);
 			break;
 		case AifEnDeviceFailure:	/* SCSI device failed */
 			device_printf(sc->aac_dev, "(DeviceFailure) "
-				      "handle %d\n", 
+				      "handle %d\n",
 				      aif->data.EN.data.EDF.deviceHandle);
 			break;
 		case AifEnMirrorFailover:	/* Mirror failover started */
 			device_printf(sc->aac_dev, "(MirrorFailover) "
 				      "container %d failed, "
 				      "migrating from slice %d to %d\n",
-				      aif->data.EN.data.EMF.container, 
-				      aif->data.EN.data.EMF.failedSlice, 
+				      aif->data.EN.data.EMF.container,
+				      aif->data.EN.data.EMF.failedSlice,
 				      aif->data.EN.data.EMF.creatingSlice);
 			break;
 		case AifEnContainerEvent:	/* Significant container
@@ -325,7 +325,7 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(EnclosureManagement) "
 				      "EMPID %d unit %d "
 				      "event %d\n", aif->data.EN.data.EEE.empID,
-				      aif->data.EN.data.EEE.unitID, 
+				      aif->data.EN.data.EEE.unitID,
 				      aif->data.EN.data.EEE.eventType);
 			break;
 		case AifEnBatteryEvent:		/* Significant NV battery
@@ -348,14 +348,14 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n");
 			break;
 		case AifEnClusterEvent:		/* Some cluster event */
-			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", 
+			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n",
 				      aif->data.EN.data.ECLE.eventType);
 			break;
 		case AifEnDiskSetEvent:		/* A disk set event occured. */
 			device_printf(sc->aac_dev, "(DiskSetEvent) event %d "
 				      "diskset %jd creator %jd\n",
-				      aif->data.EN.data.EDS.eventType, 
-				      (intmax_t)aif->data.EN.data.EDS.DsNum, 
+				      aif->data.EN.data.EDS.eventType,
+				      (intmax_t)aif->data.EN.data.EDS.DsNum,
 				      (intmax_t)aif->data.EN.data.EDS.CreatorId);
 			break;
 		case AifDenMorphComplete: 	/* A morph operation
@@ -392,7 +392,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		}		
 	
 		device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n",
-			      aif->seqNumber, status, 
+			      aif->seqNumber, status,
 			      aif->data.PR[0].currentTick,
 			      aif->data.PR[0].finalTick);
 		switch(aif->data.PR[0].jd.type) {
@@ -418,12 +418,12 @@ aac_print_aif(struct aac_softc *sc, stru
 			break;
 		case AifJobCtrZero:		/* Container clear operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerZero) container %d\n", 
+				      "(ContainerZero) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCopy:		/* Container copy operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerCopy) container %d to %d\n", 
+				      "(ContainerCopy) container %d to %d\n",
 				      aif->data.PR[0].jd.client.container.src,
 				      aif->data.PR[0].jd.client.container.dst);
 			break;
@@ -456,12 +456,12 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrScrubRaid5:	/* Container Scrub Raid5
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerScrubRaid5) container %d\n", 
+				      "(ContainerScrubRaid5) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrMorph:		/* Container morph operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerMorph) container %d\n", 
+				      "(ContainerMorph) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;
@@ -476,13 +476,13 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrRebuildMirror:	/* Container Rebuild Mirror
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerRebuildMirror) container " 
+				      "(ContainerRebuildMirror) container "
 				      "%d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCrazyCache:	/* crazy cache */
 			device_printf(sc->aac_dev,
-				      "(ContainerCrazyCache) container %d\n", 
+				      "(ContainerCrazyCache) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;

Modified: stable/8/sys/dev/aac/aac_disk.c
==============================================================================
--- stable/8/sys/dev/aac/aac_disk.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_disk.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -87,7 +87,7 @@ DRIVER_MODULE(aacd, aac, aac_disk_driver
 /*
  * Handle open from generic layer.
  *
- * This is called by the diskslice code on first open in order to get the 
+ * This is called by the diskslice code on first open in order to get the
  * basic device geometry paramters.
  */
 static int

Modified: stable/8/sys/dev/aac/aac_pci.c
==============================================================================
--- stable/8/sys/dev/aac/aac_pci.c	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aac_pci.c	Sat Oct 29 23:44:29 2011	(r226913)
@@ -353,7 +353,7 @@ aac_pci_attach(device_t dev)
 	/* assume failure is 'not configured' */
 	error = ENXIO;
 
-	/* 
+	/*
 	 * Verify that the adapter is correctly set up in PCI space.
 	 */
 	command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
@@ -401,7 +401,7 @@ aac_pci_attach(device_t dev)
 
 	/*
 	 * Allocate the parent bus DMA tag appropriate for our PCI interface.
-	 * 
+	 *
 	 * Note that some of these controllers are 64-bit capable.
 	 */
 	if (bus_dma_tag_create(NULL, 			/* parent */
@@ -419,7 +419,7 @@ aac_pci_attach(device_t dev)
 		goto out;
 	}
 
-	/* 
+	/*
 	 * Detect the hardware interface version, set up the bus interface
 	 * indirection.
 	 */

Modified: stable/8/sys/dev/aac/aacreg.h
==============================================================================
--- stable/8/sys/dev/aac/aacreg.h	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aacreg.h	Sat Oct 29 23:44:29 2011	(r226913)
@@ -220,20 +220,20 @@ typedef enum {
 	IsAdapterPaused =		704,
 	SendHostTime =			705,
 	RequestSupplementAdapterInfo =	706,	/* Supp. Info for set in UCC
-						 * use only if supported 
+						 * use only if supported
 						 * (RequestAdapterInfo first) */
 	LastMiscCommand =		707,
-  
-	OnLineDiagnostic =		800,      
-	FduAdapterTest =		801, 
+
+	OnLineDiagnostic =		800,
+	FduAdapterTest =		801,
 	RequestCompatibilityId =	802,
 	AdapterEnvironmentInfo =	803,	/* temp. sensors */
 	NvsramEventLog =		900,
 	ResetNvsramEventLogPointers =	901,
 	EnableEventLog =		902,
 	DisableEventLog =		903,
-	EncryptedKeyTransportFIB=	904,    
-	KeyableFeaturesFIB=		905     
+	EncryptedKeyTransportFIB=	904,
+	KeyableFeaturesFIB=		905
 } AAC_FibCommands;
 
 /*
@@ -283,7 +283,7 @@ typedef enum {
 #define AAC_ERROR_FIB_DEALLOCATION_FAILED	0x08
 
 /*
- * Adapter Init Structure: this is passed to the adapter with the 
+ * Adapter Init Structure: this is passed to the adapter with the
  * AAC_MONKER_INITSTRUCT command to point it at our control structures.
  */
 struct aac_adapter_init {
@@ -331,14 +331,14 @@ typedef enum {
 	CT_MORPH,
 	CT_PASSTHRU,
 	CT_RAID4,
-	CT_RAID10,                  /* stripe of mirror */
-	CT_RAID00,                  /* stripe of stripe */
-	CT_VOLUME_OF_MIRRORS,       /* volume of mirror */
-	CT_PSEUDO_RAID3,            /* really raid4 */
-	CT_RAID50,		    /* stripe of raid5 */
-	CT_RAID5D,		    /* raid5 distributed hot-sparing */
+	CT_RAID10,		/* stripe of mirror */
+	CT_RAID00,		/* stripe of stripe */
+	CT_VOLUME_OF_MIRRORS,	/* volume of mirror */
+	CT_PSEUDO_RAID3,	/* really raid4 */
+	CT_RAID50,		/* stripe of raid5 */
+	CT_RAID5D,		/* raid5 distributed hot-sparing */
 	CT_RAID5D0,
-	CT_RAID1E,		    /* extended raid1 mirroring */
+	CT_RAID1E,		/* extended raid1 mirroring */
 	CT_RAID6,
 	CT_RAID60,
 } AAC_FSAVolType;
@@ -347,23 +347,23 @@ typedef enum {
  * Host-addressable object types
  */
 typedef enum {
-	FT_REG = 1,     /* regular file */
-	FT_DIR,         /* directory */
-	FT_BLK,         /* "block" device - reserved */
-	FT_CHR,         /* "character special" device - reserved */
-	FT_LNK,         /* symbolic link */
-	FT_SOCK,        /* socket */
-	FT_FIFO,        /* fifo */
-	FT_FILESYS,     /* ADAPTEC's "FSA"(tm) filesystem */
-	FT_DRIVE,       /* physical disk - addressable in scsi by b/t/l */
-	FT_SLICE,       /* virtual disk - raw volume - slice */
-	FT_PARTITION,   /* FSA partition - carved out of a slice - building
+	FT_REG = 1,	/* regular file */
+	FT_DIR,		/* directory */
+	FT_BLK,		/* "block" device - reserved */
+	FT_CHR,		/* "character special" device - reserved */
+	FT_LNK,		/* symbolic link */
+	FT_SOCK,	/* socket */
+	FT_FIFO,	/* fifo */
+	FT_FILESYS,	/* ADAPTEC's "FSA"(tm) filesystem */
+	FT_DRIVE,	/* physical disk - addressable in scsi by b/t/l */
+	FT_SLICE,	/* virtual disk - raw volume - slice */
+	FT_PARTITION,	/* FSA partition - carved out of a slice - building
 			 * block for containers */
-	FT_VOLUME,      /* Container - Volume Set */
-	FT_STRIPE,      /* Container - Stripe Set */
-	FT_MIRROR,      /* Container - Mirror Set */
-	FT_RAID5,       /* Container - Raid 5 Set */
-	FT_DATABASE     /* Storage object with "foreign" content manager */
+	FT_VOLUME,	/* Container - Volume Set */
+	FT_STRIPE,	/* Container - Stripe Set */
+	FT_MIRROR,	/* Container - Mirror Set */
+	FT_RAID5,	/* Container - Raid 5 Set */
+	FT_DATABASE	/* Storage object with "foreign" content manager */
 } AAC_FType;
 
 /*
@@ -469,7 +469,7 @@ typedef enum {
 	CPU_MIPS,
 	CPU_XSCALE,
 	CPU__last
-} AAC_CpuType;  
+} AAC_CpuType;
 
 typedef enum {
 	CPUI960_JX = 1,
@@ -546,7 +546,7 @@ typedef enum {
  * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT
  */
 typedef enum
-{ 
+{
 	PLATFORM_BAT_REQ_PRESENT = 1,	/* BATTERY REQUIRED AND PRESENT */
 	PLATFORM_BAT_REQ_NOTPRESENT,	/* BATTERY REQUIRED AND NOT PRESENT */
 	PLATFORM_BAT_OPT_PRESENT,	/* BATTERY OPTIONAL AND PRESENT */
@@ -554,9 +554,9 @@ typedef enum
 	PLATFORM_BAT_NOT_SUPPORTED	/* BATTERY NOT SUPPORTED */
 } AAC_BatteryPlatform;
 
-/* 
+/*
  * options supported by this board
- * there has to be a one to one mapping of these defines and the ones in 
+ * there has to be a one to one mapping of these defines and the ones in
  * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT
  */
 #define AAC_SUPPORTED_SNAPSHOT		0x01
@@ -579,24 +579,24 @@ typedef enum
 #define AAC_SUPPORTED_64BIT_ARRAYSIZE	0x40000
 #define AAC_SUPPORTED_HEAT_SENSOR	0x80000
 
-/* 
+/*
  * Structure used to respond to a RequestAdapterInfo fib.
  */
 struct aac_adapter_info {
-	AAC_Platform		PlatformBase;    /* adapter type */
+	AAC_Platform		PlatformBase;	 /* adapter type */
 	AAC_CpuType		CpuArchitecture; /* adapter CPU type */
-	AAC_CpuSubType		CpuVariant;      /* adapter CPU subtype */
-	u_int32_t		ClockSpeed;      /* adapter CPU clockspeed */
-	u_int32_t		ExecutionMem;    /* adapter Execution Memory
+	AAC_CpuSubType		CpuVariant;	 /* adapter CPU subtype */
+	u_int32_t		ClockSpeed;	 /* adapter CPU clockspeed */
+	u_int32_t		ExecutionMem;	 /* adapter Execution Memory
 						  * size */
-	u_int32_t		BufferMem;       /* adapter Data Memory */
-	u_int32_t		TotalMem;        /* adapter Total Memory */
+	u_int32_t		BufferMem;	 /* adapter Data Memory */
+	u_int32_t		TotalMem;	 /* adapter Total Memory */
 	struct FsaRevision	KernelRevision;  /* adapter Kernel Software
 						  * Revision */
 	struct FsaRevision	MonitorRevision; /* adapter Monitor/Diagnostic
 						  * Software Revision */
 	struct FsaRevision	HardwareRevision;/* TBD */
-	struct FsaRevision	BIOSRevision;    /* adapter BIOS Revision */
+	struct FsaRevision	BIOSRevision;	 /* adapter BIOS Revision */
 	u_int32_t		ClusteringEnabled;
 	u_int32_t		ClusterChannelMask;
 	u_int64_t		SerialNumber;
@@ -606,7 +606,7 @@ struct aac_adapter_info {
 	AAC_OemFlavor	OemVariant;
 } __packed;
 
-/* 
+/*
  * Structure used to respond to a RequestSupplementAdapterInfo fib.
  */
 struct vpd_info {
@@ -694,7 +694,7 @@ struct aac_supplement_adapter_info {
 #define AAC_KERNEL_PANIC	0x00000100
 
 /*
- * Data types relating to control and monitoring of the NVRAM/WriteCache 
+ * Data types relating to control and monitoring of the NVRAM/WriteCache
  * subsystem.
  */
 
@@ -869,7 +869,7 @@ typedef enum {
 	AifEnGeneric = 1,		/* Generic notification */
 	AifEnTaskComplete,		/* Task has completed */
 	AifEnConfigChange,		/* Adapter config change occurred */
-	AifEnContainerChange,		/* Adapter specific container 
+	AifEnContainerChange,		/* Adapter specific container
 					 * configuration change */
 	AifEnDeviceFailure,		/* SCSI device failed */
 	AifEnMirrorFailover,		/* Mirror failover started */
@@ -883,7 +883,7 @@ typedef enum {
 	AifEnBatteryEvent,		/* Significant NV battery event */
 	AifEnAddContainer,		/* A new container was created. */
 	AifEnDeleteContainer,		/* A container was deleted. */
-	AifEnSMARTEvent, 	       	/* SMART Event */
+	AifEnSMARTEvent,		/* SMART Event */
 	AifEnBatteryNeedsRecond,	/* The battery needs reconditioning */
 	AifEnClusterEvent,		/* Some cluster event */
 	AifEnDiskSetEvent,		/* A disk set event occured. */
@@ -985,7 +985,7 @@ struct aac_AifEventNotify {
 /*
  * Adapter Initiated FIB command structures. Start with the adapter
  * initiated FIBs that really come from the adapter, and get responded
- * to by the host. 
+ * to by the host.
  */
 #define AAC_AIF_REPORT_MAX_SIZE 64
 
@@ -1140,7 +1140,7 @@ typedef enum _VM_COMMANDS {
 	VM_CtHostRead64,
 	VM_CtHostWrite64,
 	VM_DrvErrTblLog,	/* drive error table/log type of command */
-	VM_NameServe64		 
+	VM_NameServe64
 } AAC_VMCommand;
 
 /*
@@ -1546,7 +1546,7 @@ enum {
 /*
  * The adapter can request the host print a message by setting the
  * DB_PRINTF flag in DOORBELL0.  The driver responds by collecting the
- * message from the printf buffer, clearing the DB_PRINTF flag in 
+ * message from the printf buffer, clearing the DB_PRINTF flag in
  * DOORBELL0 and setting it in DOORBELL1.
  * (ODBR and IDBR respectively for the i960Rx adapters)
  */

Modified: stable/8/sys/dev/aac/aacvar.h
==============================================================================
--- stable/8/sys/dev/aac/aacvar.h	Sat Oct 29 23:27:36 2011	(r226912)
+++ stable/8/sys/dev/aac/aacvar.h	Sat Oct 29 23:44:29 2011	(r226913)
@@ -56,7 +56,7 @@
  */
 
 /*
- * The firmware interface allows for a 16-bit s/g list length.  We limit 
+ * The firmware interface allows for a 16-bit s/g list length.  We limit
  * ourselves to a reasonable maximum and ensure alignment.
  */
 #define AAC_MAXSGENTRIES	64	/* max S/G entries, limit 65535 */		
@@ -78,7 +78,7 @@
 #define AAC_PRINTF_BUFSIZE	256
 
 /*
- * We wait this many seconds for the adapter to come ready if it is still 
+ * We wait this many seconds for the adapter to come ready if it is still
  * booting
  */
 #define AAC_BOOT_TIMEOUT	(3 * 60)
@@ -128,7 +128,7 @@ struct aac_sim
 /*
  * Per-disk structure
  */
-struct aac_disk 
+struct aac_disk
 {
 	device_t			ad_dev;
 	struct aac_softc		*ad_controller;
@@ -218,7 +218,7 @@ struct aac_common {
 				AAC_QUEUE_ALIGN];
 
 	/* buffer for text messages from the controller */
-	char		       	ac_printf[AAC_PRINTF_BUFSIZE];
+	char			ac_printf[AAC_PRINTF_BUFSIZE];
 	
 	/* fib for synchronous commands */
 	struct aac_fib		ac_sync_fib;
@@ -227,7 +227,7 @@ struct aac_common {
 /*
  * Interface operations
  */
-struct aac_interface 
+struct aac_interface
 {
 	int	(*aif_get_fwstatus)(struct aac_softc *sc);
 	void	(*aif_qnotify)(struct aac_softc *sc, int qbit);
@@ -302,7 +302,7 @@ struct aac_fib_context {
 /*
  * Per-controller structure.
  */
-struct aac_softc 
+struct aac_softc
 {
 	/* bus connections */
 	device_t		aac_dev;
@@ -348,7 +348,7 @@ struct aac_softc 
 	struct aac_command	*aac_commands;
 
 	/* command management */
-	TAILQ_HEAD(,aac_command) aac_free;	/* command structures 
+	TAILQ_HEAD(,aac_command) aac_free;	/* command structures
 						 * available for reuse */
 	TAILQ_HEAD(,aac_command) aac_ready;	/* commands on hold for
 						 * controller resources */
@@ -416,7 +416,7 @@ struct aac_softc 
 
 	struct callout	aac_daemontime;		/* clock daemon callout */
 
-	u_int32_t	aac_max_fibs;           /* max. FIB count */
+	u_int32_t	aac_max_fibs;		/* max. FIB count */
 	u_int32_t	aac_max_fibs_alloc;		/* max. alloc. per alloc_commands() */
 	u_int32_t	aac_max_fib_size;		/* max. FIB size */
 	u_int32_t	aac_sg_tablesize;		/* max. sg count from host */
@@ -450,7 +450,7 @@ extern void		aac_free(struct aac_softc *
 extern int		aac_attach(struct aac_softc *sc);
 extern int		aac_detach(device_t dev);
 extern int		aac_shutdown(device_t dev);
-extern int		aac_suspend(device_t dev); 
+extern int		aac_suspend(device_t dev);
 extern int		aac_resume(device_t dev);
 extern void		aac_new_intr(void *arg);
 extern int		aac_filter(void *arg);
@@ -564,7 +564,7 @@ aac_dequeue_ ## name (struct aac_softc *
 	if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) {		\
 		if ((cm->cm_flags & AAC_ON_ ## index) == 0) {		\
 			printf("command %p not in queue, flags = %#x, "	\
-		       	       "bit = %#x\n", cm, cm->cm_flags,		\
+			       "bit = %#x\n", cm, cm->cm_flags,		\
 			       AAC_ON_ ## index);			\
 			panic("command not in queue");			\
 		}							\

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:44:30 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8C3FD1065676;
	Sat, 29 Oct 2011 23:44:30 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 798F38FC0A;
	Sat, 29 Oct 2011 23:44:30 +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 p9TNiUDw038115;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNiU1T038107;
	Sat, 29 Oct 2011 23:44:30 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292344.p9TNiU1T038107@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:44:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226914 - stable/7/sys/dev/aac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:44:30 -0000

Author: marius
Date: Sat Oct 29 23:44:30 2011
New Revision: 226914
URL: http://svn.freebsd.org/changeset/base/226914

Log:
  MFC: r206534
  
  Whitespace cleanup, in advance of next sync with Adaptec's driver.  No
  functional change.

Modified:
  stable/7/sys/dev/aac/aac.c
  stable/7/sys/dev/aac/aac_cam.c
  stable/7/sys/dev/aac/aac_debug.c
  stable/7/sys/dev/aac/aac_disk.c
  stable/7/sys/dev/aac/aac_pci.c
  stable/7/sys/dev/aac/aacreg.h
  stable/7/sys/dev/aac/aacvar.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/aac/aac.c
==============================================================================
--- stable/7/sys/dev/aac/aac.c	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aac.c	Sat Oct 29 23:44:30 2011	(r226914)
@@ -1997,7 +1997,7 @@ aac_setup_intr(struct aac_softc *sc)
 	}
 	if (sc->flags & AAC_FLAGS_NEW_COMM) {
 		if (bus_setup_intr(sc->aac_dev, sc->aac_irq,
-				   INTR_MPSAFE|INTR_TYPE_BIO, NULL, 
+				   INTR_MPSAFE|INTR_TYPE_BIO, NULL,
 				   aac_new_intr, sc, &sc->aac_intr)) {
 			device_printf(sc->aac_dev, "can't set up interrupt\n");
 			return (EINVAL);

Modified: stable/7/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/7/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:30 2011	(r226914)
@@ -395,7 +395,7 @@ aac_cam_action(struct cam_sim *sim, unio
 			    srb->cdb_len);
 
 		/* Set command */
-		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? 
+		fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ?
 			ScsiPortCommandU64 : ScsiPortCommand;
 
 		/* Map the s/g list. XXX 32bit addresses only! */
@@ -512,7 +512,7 @@ aac_cam_complete(struct aac_command *cm)
 
 				scsi_sense_len = sizeof(struct scsi_sense_data);
 				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len > 
+				sense_len = (srbr->sense_len >
 				    scsi_sense_len) ? scsi_sense_len :
 				    srbr->sense_len;
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,

Modified: stable/7/sys/dev/aac/aac_debug.c
==============================================================================
--- stable/7/sys/dev/aac/aac_debug.c	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aac_debug.c	Sat Oct 29 23:44:30 2011	(r226914)
@@ -62,62 +62,62 @@ aac_print_queues(struct aac_softc *sc)
 	device_printf(sc->aac_dev, "FIB queue header at %p  queues at %p\n",
 	    &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0],
 	    &sc->aac_queues->qt_HostNormCmdQueue[0]);
-	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_CMD  %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][
-				      AAC_CONSUMER_INDEX], 
+				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_CMD_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_HOST_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_NORM_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", 
+	device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n",
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_PRODUCER_INDEX],
 	    sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][
 				      AAC_CONSUMER_INDEX],
 	    AAC_ADAP_HIGH_RESP_ENTRIES);
-	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_FREE      %d/%d\n",
 	    sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max);
-	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BIO       %d/%d\n",
 	    sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max);
-	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_READY     %d/%d\n",
 	    sc->aac_qstat[AACQ_READY].q_length,
 	    sc->aac_qstat[AACQ_READY].q_max);
-	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n", 
+	device_printf(sc->aac_dev, "AACQ_BUSY      %d/%d\n",
 	    sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max);
 }
 
@@ -225,8 +225,8 @@ aac_print_fib(struct aac_softc *sc, stru
 
 		if (br->Command == VM_CtBlockRead) {
 			device_printf(sc->aac_dev,
-				      "  BlockRead: container %d  0x%x/%d\n", 
-				      br->ContainerId, br->BlockNumber, 
+				      "  BlockRead: container %d  0x%x/%d\n",
+				      br->ContainerId, br->BlockNumber,
 				      br->ByteCount);
 			sg = &br->SgMap;
 		}
@@ -234,7 +234,7 @@ aac_print_fib(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev,
 				      "  BlockWrite: container %d  0x%x/%d "
 				      "(%s)\n", bw->ContainerId,
-				      bw->BlockNumber, bw->ByteCount, 
+				      bw->BlockNumber, bw->ByteCount,
 				      bw->Stable == CSTABLE ? "stable" :
 				      "unstable");
 			sg = &bw->SgMap;
@@ -267,7 +267,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber);
 		switch(aif->data.EN.type) {
 		case AifEnGeneric:		/* Generic notification */
-			device_printf(sc->aac_dev, "(Generic) %.*s\n", 
+			device_printf(sc->aac_dev, "(Generic) %.*s\n",
 				  (int)sizeof(aif->data.EN.data.EG),
 				  aif->data.EN.data.EG.text);
 			break;
@@ -281,21 +281,21 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifEnContainerChange:	/* Adapter specific container
 						 * configuration change */
 			device_printf(sc->aac_dev, "(ContainerChange) "
-				      "container %d,%d\n", 
-				      aif->data.EN.data.ECC.container[0], 
+				      "container %d,%d\n",
+				      aif->data.EN.data.ECC.container[0],
 				      aif->data.EN.data.ECC.container[1]);
 			break;
 		case AifEnDeviceFailure:	/* SCSI device failed */
 			device_printf(sc->aac_dev, "(DeviceFailure) "
-				      "handle %d\n", 
+				      "handle %d\n",
 				      aif->data.EN.data.EDF.deviceHandle);
 			break;
 		case AifEnMirrorFailover:	/* Mirror failover started */
 			device_printf(sc->aac_dev, "(MirrorFailover) "
 				      "container %d failed, "
 				      "migrating from slice %d to %d\n",
-				      aif->data.EN.data.EMF.container, 
-				      aif->data.EN.data.EMF.failedSlice, 
+				      aif->data.EN.data.EMF.container,
+				      aif->data.EN.data.EMF.failedSlice,
 				      aif->data.EN.data.EMF.creatingSlice);
 			break;
 		case AifEnContainerEvent:	/* Significant container
@@ -325,7 +325,7 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(EnclosureManagement) "
 				      "EMPID %d unit %d "
 				      "event %d\n", aif->data.EN.data.EEE.empID,
-				      aif->data.EN.data.EEE.unitID, 
+				      aif->data.EN.data.EEE.unitID,
 				      aif->data.EN.data.EEE.eventType);
 			break;
 		case AifEnBatteryEvent:		/* Significant NV battery
@@ -348,14 +348,14 @@ aac_print_aif(struct aac_softc *sc, stru
 			device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n");
 			break;
 		case AifEnClusterEvent:		/* Some cluster event */
-			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", 
+			device_printf(sc->aac_dev, "(ClusterEvent) event %d\n",
 				      aif->data.EN.data.ECLE.eventType);
 			break;
 		case AifEnDiskSetEvent:		/* A disk set event occured. */
 			device_printf(sc->aac_dev, "(DiskSetEvent) event %d "
 				      "diskset %jd creator %jd\n",
-				      aif->data.EN.data.EDS.eventType, 
-				      (intmax_t)aif->data.EN.data.EDS.DsNum, 
+				      aif->data.EN.data.EDS.eventType,
+				      (intmax_t)aif->data.EN.data.EDS.DsNum,
 				      (intmax_t)aif->data.EN.data.EDS.CreatorId);
 			break;
 		case AifDenMorphComplete: 	/* A morph operation
@@ -392,7 +392,7 @@ aac_print_aif(struct aac_softc *sc, stru
 		}		
 	
 		device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n",
-			      aif->seqNumber, status, 
+			      aif->seqNumber, status,
 			      aif->data.PR[0].currentTick,
 			      aif->data.PR[0].finalTick);
 		switch(aif->data.PR[0].jd.type) {
@@ -418,12 +418,12 @@ aac_print_aif(struct aac_softc *sc, stru
 			break;
 		case AifJobCtrZero:		/* Container clear operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerZero) container %d\n", 
+				      "(ContainerZero) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCopy:		/* Container copy operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerCopy) container %d to %d\n", 
+				      "(ContainerCopy) container %d to %d\n",
 				      aif->data.PR[0].jd.client.container.src,
 				      aif->data.PR[0].jd.client.container.dst);
 			break;
@@ -456,12 +456,12 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrScrubRaid5:	/* Container Scrub Raid5
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerScrubRaid5) container %d\n", 
+				      "(ContainerScrubRaid5) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrMorph:		/* Container morph operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerMorph) container %d\n", 
+				      "(ContainerMorph) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;
@@ -476,13 +476,13 @@ aac_print_aif(struct aac_softc *sc, stru
 		case AifJobCtrRebuildMirror:	/* Container Rebuild Mirror
 						 * operation */
 			device_printf(sc->aac_dev,
-				      "(ContainerRebuildMirror) container " 
+				      "(ContainerRebuildMirror) container "
 				      "%d\n",
 				      aif->data.PR[0].jd.client.container.src);
 			break;
 		case AifJobCtrCrazyCache:	/* crazy cache */
 			device_printf(sc->aac_dev,
-				      "(ContainerCrazyCache) container %d\n", 
+				      "(ContainerCrazyCache) container %d\n",
 				      aif->data.PR[0].jd.client.container.src);
 				      /* XXX two containers? */
 			break;

Modified: stable/7/sys/dev/aac/aac_disk.c
==============================================================================
--- stable/7/sys/dev/aac/aac_disk.c	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aac_disk.c	Sat Oct 29 23:44:30 2011	(r226914)
@@ -87,7 +87,7 @@ DRIVER_MODULE(aacd, aac, aac_disk_driver
 /*
  * Handle open from generic layer.
  *
- * This is called by the diskslice code on first open in order to get the 
+ * This is called by the diskslice code on first open in order to get the
  * basic device geometry paramters.
  */
 static int

Modified: stable/7/sys/dev/aac/aac_pci.c
==============================================================================
--- stable/7/sys/dev/aac/aac_pci.c	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aac_pci.c	Sat Oct 29 23:44:30 2011	(r226914)
@@ -353,7 +353,7 @@ aac_pci_attach(device_t dev)
 	/* assume failure is 'not configured' */
 	error = ENXIO;
 
-	/* 
+	/*
 	 * Verify that the adapter is correctly set up in PCI space.
 	 */
 	command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2);
@@ -401,7 +401,7 @@ aac_pci_attach(device_t dev)
 
 	/*
 	 * Allocate the parent bus DMA tag appropriate for our PCI interface.
-	 * 
+	 *
 	 * Note that some of these controllers are 64-bit capable.
 	 */
 	if (bus_dma_tag_create(NULL, 			/* parent */
@@ -419,7 +419,7 @@ aac_pci_attach(device_t dev)
 		goto out;
 	}
 
-	/* 
+	/*
 	 * Detect the hardware interface version, set up the bus interface
 	 * indirection.
 	 */

Modified: stable/7/sys/dev/aac/aacreg.h
==============================================================================
--- stable/7/sys/dev/aac/aacreg.h	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aacreg.h	Sat Oct 29 23:44:30 2011	(r226914)
@@ -220,20 +220,20 @@ typedef enum {
 	IsAdapterPaused =		704,
 	SendHostTime =			705,
 	RequestSupplementAdapterInfo =	706,	/* Supp. Info for set in UCC
-						 * use only if supported 
+						 * use only if supported
 						 * (RequestAdapterInfo first) */
 	LastMiscCommand =		707,
-  
-	OnLineDiagnostic =		800,      
-	FduAdapterTest =		801, 
+
+	OnLineDiagnostic =		800,
+	FduAdapterTest =		801,
 	RequestCompatibilityId =	802,
 	AdapterEnvironmentInfo =	803,	/* temp. sensors */
 	NvsramEventLog =		900,
 	ResetNvsramEventLogPointers =	901,
 	EnableEventLog =		902,
 	DisableEventLog =		903,
-	EncryptedKeyTransportFIB=	904,    
-	KeyableFeaturesFIB=		905     
+	EncryptedKeyTransportFIB=	904,
+	KeyableFeaturesFIB=		905
 } AAC_FibCommands;
 
 /*
@@ -283,7 +283,7 @@ typedef enum {
 #define AAC_ERROR_FIB_DEALLOCATION_FAILED	0x08
 
 /*
- * Adapter Init Structure: this is passed to the adapter with the 
+ * Adapter Init Structure: this is passed to the adapter with the
  * AAC_MONKER_INITSTRUCT command to point it at our control structures.
  */
 struct aac_adapter_init {
@@ -329,14 +329,14 @@ typedef enum {
 	CT_MORPH,
 	CT_PASSTHRU,
 	CT_RAID4,
-	CT_RAID10,                  /* stripe of mirror */
-	CT_RAID00,                  /* stripe of stripe */
-	CT_VOLUME_OF_MIRRORS,       /* volume of mirror */
-	CT_PSEUDO_RAID3,            /* really raid4 */
-	CT_RAID50,		    /* stripe of raid5 */
-	CT_RAID5D,		    /* raid5 distributed hot-sparing */
+	CT_RAID10,		/* stripe of mirror */
+	CT_RAID00,		/* stripe of stripe */
+	CT_VOLUME_OF_MIRRORS,	/* volume of mirror */
+	CT_PSEUDO_RAID3,	/* really raid4 */
+	CT_RAID50,		/* stripe of raid5 */
+	CT_RAID5D,		/* raid5 distributed hot-sparing */
 	CT_RAID5D0,
-	CT_RAID1E,		    /* extended raid1 mirroring */
+	CT_RAID1E,		/* extended raid1 mirroring */
 	CT_RAID6,
 	CT_RAID60,
 } AAC_FSAVolType;
@@ -345,23 +345,23 @@ typedef enum {
  * Host-addressable object types
  */
 typedef enum {
-	FT_REG = 1,     /* regular file */
-	FT_DIR,         /* directory */
-	FT_BLK,         /* "block" device - reserved */
-	FT_CHR,         /* "character special" device - reserved */
-	FT_LNK,         /* symbolic link */
-	FT_SOCK,        /* socket */
-	FT_FIFO,        /* fifo */
-	FT_FILESYS,     /* ADAPTEC's "FSA"(tm) filesystem */
-	FT_DRIVE,       /* physical disk - addressable in scsi by b/t/l */
-	FT_SLICE,       /* virtual disk - raw volume - slice */
-	FT_PARTITION,   /* FSA partition - carved out of a slice - building
+	FT_REG = 1,	/* regular file */
+	FT_DIR,		/* directory */
+	FT_BLK,		/* "block" device - reserved */
+	FT_CHR,		/* "character special" device - reserved */
+	FT_LNK,		/* symbolic link */
+	FT_SOCK,	/* socket */
+	FT_FIFO,	/* fifo */
+	FT_FILESYS,	/* ADAPTEC's "FSA"(tm) filesystem */
+	FT_DRIVE,	/* physical disk - addressable in scsi by b/t/l */
+	FT_SLICE,	/* virtual disk - raw volume - slice */
+	FT_PARTITION,	/* FSA partition - carved out of a slice - building
 			 * block for containers */
-	FT_VOLUME,      /* Container - Volume Set */
-	FT_STRIPE,      /* Container - Stripe Set */
-	FT_MIRROR,      /* Container - Mirror Set */
-	FT_RAID5,       /* Container - Raid 5 Set */
-	FT_DATABASE     /* Storage object with "foreign" content manager */
+	FT_VOLUME,	/* Container - Volume Set */
+	FT_STRIPE,	/* Container - Stripe Set */
+	FT_MIRROR,	/* Container - Mirror Set */
+	FT_RAID5,	/* Container - Raid 5 Set */
+	FT_DATABASE	/* Storage object with "foreign" content manager */
 } AAC_FType;
 
 /*
@@ -467,7 +467,7 @@ typedef enum {
 	CPU_MIPS,
 	CPU_XSCALE,
 	CPU__last
-} AAC_CpuType;  
+} AAC_CpuType;
 
 typedef enum {
 	CPUI960_JX = 1,
@@ -544,7 +544,7 @@ typedef enum {
  * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT
  */
 typedef enum
-{ 
+{
 	PLATFORM_BAT_REQ_PRESENT = 1,	/* BATTERY REQUIRED AND PRESENT */
 	PLATFORM_BAT_REQ_NOTPRESENT,	/* BATTERY REQUIRED AND NOT PRESENT */
 	PLATFORM_BAT_OPT_PRESENT,	/* BATTERY OPTIONAL AND PRESENT */
@@ -552,9 +552,9 @@ typedef enum
 	PLATFORM_BAT_NOT_SUPPORTED	/* BATTERY NOT SUPPORTED */
 } AAC_BatteryPlatform;
 
-/* 
+/*
  * options supported by this board
- * there has to be a one to one mapping of these defines and the ones in 
+ * there has to be a one to one mapping of these defines and the ones in
  * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT
  */
 #define AAC_SUPPORTED_SNAPSHOT		0x01
@@ -577,24 +577,24 @@ typedef enum
 #define AAC_SUPPORTED_64BIT_ARRAYSIZE	0x40000
 #define AAC_SUPPORTED_HEAT_SENSOR	0x80000
 
-/* 
+/*
  * Structure used to respond to a RequestAdapterInfo fib.
  */
 struct aac_adapter_info {
-	AAC_Platform		PlatformBase;    /* adapter type */
+	AAC_Platform		PlatformBase;	 /* adapter type */
 	AAC_CpuType		CpuArchitecture; /* adapter CPU type */
-	AAC_CpuSubType		CpuVariant;      /* adapter CPU subtype */
-	u_int32_t		ClockSpeed;      /* adapter CPU clockspeed */
-	u_int32_t		ExecutionMem;    /* adapter Execution Memory
+	AAC_CpuSubType		CpuVariant;	 /* adapter CPU subtype */
+	u_int32_t		ClockSpeed;	 /* adapter CPU clockspeed */
+	u_int32_t		ExecutionMem;	 /* adapter Execution Memory
 						  * size */
-	u_int32_t		BufferMem;       /* adapter Data Memory */
-	u_int32_t		TotalMem;        /* adapter Total Memory */
+	u_int32_t		BufferMem;	 /* adapter Data Memory */
+	u_int32_t		TotalMem;	 /* adapter Total Memory */
 	struct FsaRevision	KernelRevision;  /* adapter Kernel Software
 						  * Revision */
 	struct FsaRevision	MonitorRevision; /* adapter Monitor/Diagnostic
 						  * Software Revision */
 	struct FsaRevision	HardwareRevision;/* TBD */
-	struct FsaRevision	BIOSRevision;    /* adapter BIOS Revision */
+	struct FsaRevision	BIOSRevision;	 /* adapter BIOS Revision */
 	u_int32_t		ClusteringEnabled;
 	u_int32_t		ClusterChannelMask;
 	u_int64_t		SerialNumber;
@@ -604,7 +604,7 @@ struct aac_adapter_info {
 	AAC_OemFlavor	OemVariant;
 } __packed;
 
-/* 
+/*
  * Structure used to respond to a RequestSupplementAdapterInfo fib.
  */
 struct vpd_info {
@@ -692,7 +692,7 @@ struct aac_supplement_adapter_info {
 #define AAC_KERNEL_PANIC	0x00000100
 
 /*
- * Data types relating to control and monitoring of the NVRAM/WriteCache 
+ * Data types relating to control and monitoring of the NVRAM/WriteCache
  * subsystem.
  */
 
@@ -867,7 +867,7 @@ typedef enum {
 	AifEnGeneric = 1,		/* Generic notification */
 	AifEnTaskComplete,		/* Task has completed */
 	AifEnConfigChange,		/* Adapter config change occurred */
-	AifEnContainerChange,		/* Adapter specific container 
+	AifEnContainerChange,		/* Adapter specific container
 					 * configuration change */
 	AifEnDeviceFailure,		/* SCSI device failed */
 	AifEnMirrorFailover,		/* Mirror failover started */
@@ -881,7 +881,7 @@ typedef enum {
 	AifEnBatteryEvent,		/* Significant NV battery event */
 	AifEnAddContainer,		/* A new container was created. */
 	AifEnDeleteContainer,		/* A container was deleted. */
-	AifEnSMARTEvent, 	       	/* SMART Event */
+	AifEnSMARTEvent,		/* SMART Event */
 	AifEnBatteryNeedsRecond,	/* The battery needs reconditioning */
 	AifEnClusterEvent,		/* Some cluster event */
 	AifEnDiskSetEvent,		/* A disk set event occured. */
@@ -967,7 +967,7 @@ struct aac_AifEventNotify {
 /*
  * Adapter Initiated FIB command structures. Start with the adapter
  * initiated FIBs that really come from the adapter, and get responded
- * to by the host. 
+ * to by the host.
  */
 #define AAC_AIF_REPORT_MAX_SIZE 64
 
@@ -1120,7 +1120,7 @@ typedef enum _VM_COMMANDS {
 	VM_CtHostRead64,
 	VM_CtHostWrite64,
 	VM_DrvErrTblLog,	/* drive error table/log type of command */
-	VM_NameServe64		 
+	VM_NameServe64
 } AAC_VMCommand;
 
 /*
@@ -1526,7 +1526,7 @@ enum {
 /*
  * The adapter can request the host print a message by setting the
  * DB_PRINTF flag in DOORBELL0.  The driver responds by collecting the
- * message from the printf buffer, clearing the DB_PRINTF flag in 
+ * message from the printf buffer, clearing the DB_PRINTF flag in
  * DOORBELL0 and setting it in DOORBELL1.
  * (ODBR and IDBR respectively for the i960Rx adapters)
  */

Modified: stable/7/sys/dev/aac/aacvar.h
==============================================================================
--- stable/7/sys/dev/aac/aacvar.h	Sat Oct 29 23:44:29 2011	(r226913)
+++ stable/7/sys/dev/aac/aacvar.h	Sat Oct 29 23:44:30 2011	(r226914)
@@ -56,7 +56,7 @@
  */
 
 /*
- * The firmware interface allows for a 16-bit s/g list length.  We limit 
+ * The firmware interface allows for a 16-bit s/g list length.  We limit
  * ourselves to a reasonable maximum and ensure alignment.
  */
 #define AAC_MAXSGENTRIES	64	/* max S/G entries, limit 65535 */		
@@ -78,7 +78,7 @@
 #define AAC_PRINTF_BUFSIZE	256
 
 /*
- * We wait this many seconds for the adapter to come ready if it is still 
+ * We wait this many seconds for the adapter to come ready if it is still
  * booting
  */
 #define AAC_BOOT_TIMEOUT	(3 * 60)
@@ -126,7 +126,7 @@ struct aac_sim
 /*
  * Per-disk structure
  */
-struct aac_disk 
+struct aac_disk
 {
 	device_t			ad_dev;
 	struct aac_softc		*ad_controller;
@@ -216,7 +216,7 @@ struct aac_common {
 				AAC_QUEUE_ALIGN];
 
 	/* buffer for text messages from the controller */
-	char		       	ac_printf[AAC_PRINTF_BUFSIZE];
+	char			ac_printf[AAC_PRINTF_BUFSIZE];
 	
 	/* fib for synchronous commands */
 	struct aac_fib		ac_sync_fib;
@@ -225,7 +225,7 @@ struct aac_common {
 /*
  * Interface operations
  */
-struct aac_interface 
+struct aac_interface
 {
 	int	(*aif_get_fwstatus)(struct aac_softc *sc);
 	void	(*aif_qnotify)(struct aac_softc *sc, int qbit);
@@ -300,7 +300,7 @@ struct aac_fib_context {
 /*
  * Per-controller structure.
  */
-struct aac_softc 
+struct aac_softc
 {
 	/* bus connections */
 	device_t		aac_dev;
@@ -347,7 +347,7 @@ struct aac_softc 
 	struct aac_command	*aac_commands;
 
 	/* command management */
-	TAILQ_HEAD(,aac_command) aac_free;	/* command structures 
+	TAILQ_HEAD(,aac_command) aac_free;	/* command structures
 						 * available for reuse */
 	TAILQ_HEAD(,aac_command) aac_ready;	/* commands on hold for
 						 * controller resources */
@@ -416,7 +416,7 @@ struct aac_softc 
 
 	struct callout	aac_daemontime;		/* clock daemon callout */
 
-	u_int32_t	aac_max_fibs;           /* max. FIB count */
+	u_int32_t	aac_max_fibs;		/* max. FIB count */
 	u_int32_t	aac_max_fibs_alloc;		/* max. alloc. per alloc_commands() */
 	u_int32_t	aac_max_fib_size;		/* max. FIB size */
 	u_int32_t	aac_sg_tablesize;		/* max. sg count from host */
@@ -447,7 +447,7 @@ extern void		aac_free(struct aac_softc *
 extern int		aac_attach(struct aac_softc *sc);
 extern int		aac_detach(device_t dev);
 extern int		aac_shutdown(device_t dev);
-extern int		aac_suspend(device_t dev); 
+extern int		aac_suspend(device_t dev);
 extern int		aac_resume(device_t dev);
 extern void		aac_new_intr(void *arg);
 extern int		aac_fast_intr(void *arg);
@@ -561,7 +561,7 @@ aac_dequeue_ ## name (struct aac_softc *
 	if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) {		\
 		if ((cm->cm_flags & AAC_ON_ ## index) == 0) {		\
 			printf("command %p not in queue, flags = %#x, "	\
-		       	       "bit = %#x\n", cm, cm->cm_flags,		\
+			       "bit = %#x\n", cm, cm->cm_flags,		\
 			       AAC_ON_ ## index);			\
 			panic("command not in queue");			\
 		}							\

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:51:21 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A095A106566B;
	Sat, 29 Oct 2011 23:51:21 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8E5348FC19;
	Sat, 29 Oct 2011 23:51:21 +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 p9TNpLFX038399;
	Sat, 29 Oct 2011 23:51:21 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNpLG6038394;
	Sat, 29 Oct 2011 23:51:21 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292351.p9TNpLG6038394@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:51:21 +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: r226915 - in stable/8/sys/dev: aac asr hptiop mfi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:51:21 -0000

Author: marius
Date: Sat Oct 29 23:51:21 2011
New Revision: 226915
URL: http://svn.freebsd.org/changeset/base/226915

Log:
  MFC: r226350
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  stable/8/sys/dev/aac/aac_cam.c
  stable/8/sys/dev/asr/asr.c
  stable/8/sys/dev/hptiop/hptiop.c
  stable/8/sys/dev/mfi/mfi_cam.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)

Modified: stable/8/sys/dev/aac/aac_cam.c
==============================================================================
--- stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/aac/aac_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -532,6 +532,7 @@ aac_cam_complete(struct aac_command *cm)
 	union	ccb *ccb;
 	struct 	aac_srb_response *srbr;
 	struct	aac_softc *sc;
+	int	sense_returned;
 
 	sc = cm->cm_sc;
 	fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
@@ -556,16 +557,17 @@ aac_cam_complete(struct aac_command *cm)
 
 			/* Take care of autosense */
 			if (srbr->sense_len) {
-				int sense_len, scsi_sense_len;
-
-				scsi_sense_len = sizeof(struct scsi_sense_data);
-				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len >
-				    scsi_sense_len) ? scsi_sense_len :
-				    srbr->sense_len;
+				sense_returned = srbr->sense_len;
+				if (sense_returned < ccb->csio.sense_len)
+					ccb->csio.sense_resid =
+					   ccb->csio.sense_len -
+					   sense_returned;
+					else
+					    ccb->csio.sense_resid = 0;
+				bzero(&ccb->csio.sense_data,
+				    sizeof(struct scsi_sense_data));
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,
-				    srbr->sense_len);
-				ccb->csio.sense_len = sense_len;
+				    min(ccb->csio.sense_len, sense_returned));
 				ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 				// scsi_sense_print(&ccb->csio);
 			}

Modified: stable/8/sys/dev/asr/asr.c
==============================================================================
--- stable/8/sys/dev/asr/asr.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/asr/asr.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -3071,6 +3071,14 @@ asr_intr(Asr_softc_t *sc)
 				 && (size > ccb->csio.sense_len)) {
 					size = ccb->csio.sense_len;
 				}
+				if (size < ccb->csio.sense_len) {
+					ccb->csio.sense_resid =
+					    ccb->csio.sense_len - size;
+				} else {
+					ccb->csio.sense_resid = 0;
+				}
+				bzero(&(ccb->csio.sense_data),
+				    sizeof(ccb->csio.sense_data));
 				bcopy(Reply->SenseData,
 				      &(ccb->csio.sense_data), size);
 			}
@@ -3566,6 +3574,12 @@ ASR_queue_i(Asr_softc_t	*sc, PI2O_MESSAG
 		if (size > sizeof(ccb->csio.sense_data)) {
 			size = sizeof(ccb->csio.sense_data);
 		}
+		if (size < ccb->csio.sense_len) {
+			ccb->csio.sense_resid = ccb->csio.sense_len - size;
+		} else {
+			ccb->csio.sense_resid = 0;
+		}
+		bzero(&(ccb->csio.sense_data), sizeof(ccb->csio.sense_data));
 		bcopy(&(ccb->csio.sense_data), Reply_Ptr->SenseData, size);
 		I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(
 		    Reply_Ptr, size);

Modified: stable/8/sys/dev/hptiop/hptiop.c
==============================================================================
--- stable/8/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -424,6 +424,13 @@ srb_complete:
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (dxfer < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    dxfer;
+			else
+				ccb->csio.sense_resid = 0;
 			if (srb->srb_flag & HPT_SRB_FLAG_HIGH_MEM_ACESS) {/*iop*/
 				bus_space_read_region_1(hba->bar0t, hba->bar0h,
 					index + offsetof(struct hpt_iop_request_scsi_command,
@@ -573,6 +580,13 @@ static void hptiop_request_callback_mv(s
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (req->dataxfer_length < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    req->dataxfer_length;
+			else
+				ccb->csio.sense_resid = 0;
 			memcpy(&ccb->csio.sense_data, &req->sg_list, 
 				MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data)));
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;

Modified: stable/8/sys/dev/mfi/mfi_cam.c
==============================================================================
--- stable/8/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:44:30 2011	(r226914)
+++ stable/8/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
@@ -357,7 +357,13 @@ mfip_done(struct mfi_command *cm)
 
 		ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
 		csio->scsi_status = pt->header.scsi_status;
-		sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data));
+		if (pt->header.sense_len < csio->sense_len)
+			csio->sense_resid = csio->sense_len -
+			    pt->header.sense_len;
+		else
+			csio->sense_resid = 0;
+		sense_len = min(pt->header.sense_len,
+		    sizeof(struct scsi_sense_data));
 		bzero(&csio->sense_data, sizeof(struct scsi_sense_data));
 		bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:51:23 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A2152106564A;
	Sat, 29 Oct 2011 23:51:23 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 900218FC1A;
	Sat, 29 Oct 2011 23:51:23 +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 p9TNpNkk038433;
	Sat, 29 Oct 2011 23:51:23 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNpN40038428;
	Sat, 29 Oct 2011 23:51:23 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292351.p9TNpN40038428@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:51:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226916 - in stable/7/sys/dev: aac asr hptiop mfi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:51:23 -0000

Author: marius
Date: Sat Oct 29 23:51:23 2011
New Revision: 226916
URL: http://svn.freebsd.org/changeset/base/226916

Log:
  MFC: r226350
  
  Merge from r225950:
  
  Set the sense residual properly.
  
  Reviewed by:	ken

Modified:
  stable/7/sys/dev/aac/aac_cam.c
  stable/7/sys/dev/asr/asr.c
  stable/7/sys/dev/hptiop/hptiop.c
  stable/7/sys/dev/mfi/mfi_cam.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/aac/aac_cam.c
==============================================================================
--- stable/7/sys/dev/aac/aac_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
+++ stable/7/sys/dev/aac/aac_cam.c	Sat Oct 29 23:51:23 2011	(r226916)
@@ -484,6 +484,7 @@ aac_cam_complete(struct aac_command *cm)
 	union	ccb *ccb;
 	struct 	aac_srb_response *srbr;
 	struct	aac_softc *sc;
+	int	sense_returned;
 
 	sc = cm->cm_sc;
 	fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
@@ -508,16 +509,17 @@ aac_cam_complete(struct aac_command *cm)
 
 			/* Take care of autosense */
 			if (srbr->sense_len) {
-				int sense_len, scsi_sense_len;
-
-				scsi_sense_len = sizeof(struct scsi_sense_data);
-				bzero(&ccb->csio.sense_data, scsi_sense_len);
-				sense_len = (srbr->sense_len >
-				    scsi_sense_len) ? scsi_sense_len :
-				    srbr->sense_len;
+				sense_returned = srbr->sense_len;
+				if (sense_returned < ccb->csio.sense_len)
+					ccb->csio.sense_resid =
+					   ccb->csio.sense_len -
+					   sense_returned;
+					else
+					    ccb->csio.sense_resid = 0;
+				bzero(&ccb->csio.sense_data,
+				    sizeof(struct scsi_sense_data));
 				bcopy(&srbr->sense[0], &ccb->csio.sense_data,
-				    srbr->sense_len);
-				ccb->csio.sense_len = sense_len;
+				    min(ccb->csio.sense_len, sense_returned));
 				ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
 				// scsi_sense_print(&ccb->csio);
 			}

Modified: stable/7/sys/dev/asr/asr.c
==============================================================================
--- stable/7/sys/dev/asr/asr.c	Sat Oct 29 23:51:21 2011	(r226915)
+++ stable/7/sys/dev/asr/asr.c	Sat Oct 29 23:51:23 2011	(r226916)
@@ -3074,6 +3074,14 @@ asr_intr(Asr_softc_t *sc)
 				 && (size > ccb->csio.sense_len)) {
 					size = ccb->csio.sense_len;
 				}
+				if (size < ccb->csio.sense_len) {
+					ccb->csio.sense_resid =
+					    ccb->csio.sense_len - size;
+				} else {
+					ccb->csio.sense_resid = 0;
+				}
+				bzero(&(ccb->csio.sense_data),
+				    sizeof(ccb->csio.sense_data));
 				bcopy(Reply->SenseData,
 				      &(ccb->csio.sense_data), size);
 			}
@@ -3569,6 +3577,12 @@ ASR_queue_i(Asr_softc_t	*sc, PI2O_MESSAG
 		if (size > sizeof(ccb->csio.sense_data)) {
 			size = sizeof(ccb->csio.sense_data);
 		}
+		if (size < ccb->csio.sense_len) {
+			ccb->csio.sense_resid = ccb->csio.sense_len - size;
+		} else {
+			ccb->csio.sense_resid = 0;
+		}
+		bzero(&(ccb->csio.sense_data), sizeof(ccb->csio.sense_data));
 		bcopy(&(ccb->csio.sense_data), Reply_Ptr->SenseData, size);
 		I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(
 		    Reply_Ptr, size);

Modified: stable/7/sys/dev/hptiop/hptiop.c
==============================================================================
--- stable/7/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:51:21 2011	(r226915)
+++ stable/7/sys/dev/hptiop/hptiop.c	Sat Oct 29 23:51:23 2011	(r226916)
@@ -426,6 +426,13 @@ srb_complete:
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (dxfer < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    dxfer;
+			else
+				ccb->csio.sense_resid = 0;
 			if (srb->srb_flag & HPT_SRB_FLAG_HIGH_MEM_ACESS) {/*iop*/
 				bus_space_read_region_1(hba->bar0t, hba->bar0h,
 					index + offsetof(struct hpt_iop_request_scsi_command,
@@ -575,6 +582,13 @@ static void hptiop_request_callback_mv(s
 			ccb->ccb_h.status = CAM_BUSY;
 			break;
 		case IOP_RESULT_CHECK_CONDITION:
+			memset(&ccb->csio.sense_data, 0,
+			    sizeof(ccb->csio.sense_data));
+			if (req->dataxfer_length < ccb->csio.sense_len)
+				ccb->csio.sense_resid = ccb->csio.sense_len -
+				    req->dataxfer_length;
+			else
+				ccb->csio.sense_resid = 0;
 			memcpy(&ccb->csio.sense_data, &req->sg_list, 
 				MIN(req->dataxfer_length, sizeof(ccb->csio.sense_data)));
 			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;

Modified: stable/7/sys/dev/mfi/mfi_cam.c
==============================================================================
--- stable/7/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:51:21 2011	(r226915)
+++ stable/7/sys/dev/mfi/mfi_cam.c	Sat Oct 29 23:51:23 2011	(r226916)
@@ -357,7 +357,13 @@ mfip_done(struct mfi_command *cm)
 
 		ccbh->status = CAM_SCSI_STATUS_ERROR | CAM_AUTOSNS_VALID;
 		csio->scsi_status = pt->header.scsi_status;
-		sense_len = min(pt->header.sense_len, sizeof(struct scsi_sense_data));
+		if (pt->header.sense_len < csio->sense_len)
+			csio->sense_resid = csio->sense_len -
+			    pt->header.sense_len;
+		else
+			csio->sense_resid = 0;
+		sense_len = min(pt->header.sense_len,
+		    sizeof(struct scsi_sense_data));
 		bzero(&csio->sense_data, sizeof(struct scsi_sense_data));
 		bcopy(&cm->cm_sense->data[0], &csio->sense_data, sense_len);
 		break;

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:53:54 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 42BFF106564A;
	Sat, 29 Oct 2011 23:53:54 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2FC2F8FC12;
	Sat, 29 Oct 2011 23:53:54 +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 p9TNrs2Y038574;
	Sat, 29 Oct 2011 23:53:54 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNrsHK038569;
	Sat, 29 Oct 2011 23:53:54 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292353.p9TNrsHK038569@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:53:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226917 - in stable/9/sys: dev/esp sparc64/sbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:53:54 -0000

Author: marius
Date: Sat Oct 29 23:53:53 2011
New Revision: 226917
URL: http://svn.freebsd.org/changeset/base/226917

Log:
  MFC: r226381
  
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/esp/esp_sbus.c
  stable/9/sys/dev/esp/ncr53c9x.c
  stable/9/sys/dev/esp/ncr53c9xreg.h
  stable/9/sys/dev/esp/ncr53c9xvar.h
  stable/9/sys/sparc64/sbus/lsi64854.c
  stable/9/sys/sparc64/sbus/lsi64854var.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/dev/esp/esp_sbus.c
==============================================================================
--- stable/9/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:51:23 2011	(r226916)
+++ stable/9/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:53 2011	(r226917)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,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 the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int	esp_dma_isintr(struct ncr53c9x_softc *sc);
 static void	esp_dma_reset(struct ncr53c9x_softc *sc);
 static int	esp_dma_intr(struct ncr53c9x_softc *sc);
-static int	esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int	esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
 		    size_t *len, int datain, size_t *dmasize);
 static void	esp_dma_go(struct ncr53c9x_softc *sc);
 static void	esp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int	espattach(struct esp_softc *e
 		    const struct ncr53c9x_glue *gluep);
 static int	espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
 	esp_read_reg,
 	esp_write_reg,
 	esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__read_regnames [] = {
+	const char *r_name;
+	int r_flag;
+} const esp__read_regnames [] = {
 	{ "TCL", 0},			/* 0/00 */
 	{ "TCM", 0},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
 	{ "TCX", 1},			/* f/3c */
 };
 
-static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+	const char *r_name;
+	int r_flag;
+} const esp__write_regnames[] = {
 	{ "TCL", 1},			/* 0/00 */
 	{ "TCM", 1},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
-	u_char v;
+	uint8_t v;
 
 	v = bus_read_1(esc->sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
-	      int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+    int datain, size_t *dmasize)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: stable/9/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/9/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:51:23 2011	(r226916)
+++ stable/9/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:53 2011	(r226917)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -43,13 +43,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 the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -133,7 +126,7 @@ __FBSDID("$FreeBSD$");
 MODULE_DEPEND(esp, cam, 1, 1, 1);
 
 #ifdef NCR53C9X_DEBUG
-static int ncr53c9x_debug =
+int ncr53c9x_debug =
     NCR_SHOWMISC /* | NCR_SHOWPHASE | NCR_SHOWTRAC | NCR_SHOWCMDS */;
 #endif
 
@@ -167,7 +160,7 @@ static void	ncr53c9x_sched(struct ncr53c
 static void	ncr53c9x_select(struct ncr53c9x_softc *sc,
 		    struct ncr53c9x_ecb *ecb);
 static void	ncr53c9x_watch(void *arg);
-static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p,
+static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p,
 		    int len);
 
 static struct ncr53c9x_ecb	*ncr53c9x_get_ecb(struct ncr53c9x_softc *sc);
@@ -187,13 +180,11 @@ static inline int	ncr53c9x_stp2cpb(struc
 		NCR_WRITE_REG((sc), NCR_TCL, (size));			\
 		NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8);		\
 		if ((sc->sc_cfg2 & NCRCFG2_FE) ||			\
-		    (sc->sc_rev == NCR_VARIANT_FAS366)) {		\
+		    (sc->sc_rev == NCR_VARIANT_FAS366))			\
 			NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16);	\
-		}							\
-		if (sc->sc_rev == NCR_VARIANT_FAS366) {			\
+		if (sc->sc_rev == NCR_VARIANT_FAS366)			\
 			NCR_WRITE_REG(sc, NCR_RCH, 0);			\
-		}							\
-} while (0)
+} while (/* CONSTCOND */0)
 
 #ifndef mstohz
 #define	mstohz(ms) \
@@ -551,11 +542,10 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc
 		NCR_WRITE_REG(sc, NCR_AMDCFG4, sc->sc_cfg4);
 
 #if 0
-	device_printf(sc->sc_dev, "ncr53c9x_reset: revision %d\n",
-	    sc->sc_rev);
-	device_printf(sc->sc_dev, "ncr53c9x_reset: cfg1 0x%x, cfg2 0x%x, "
-	    "cfg3 0x%x, ccf 0x%x, timeout 0x%x\n",
-	    sc->sc_cfg1, sc->sc_cfg2, sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
+	device_printf(sc->sc_dev, "%s: revision %d\n", __func__, sc->sc_rev);
+	device_printf(sc->sc_dev, "%s: cfg1 0x%x, cfg2 0x%x, cfg3 0x%x, ccf "
+	    "0x%x, timeout 0x%x\n", __func__, sc->sc_cfg1, sc->sc_cfg2,
+	    sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
 #endif
 }
 
@@ -573,7 +563,8 @@ ncr53c9x_clear(struct ncr53c9x_softc *sc
 	/* Cancel any active commands. */
 	sc->sc_state = NCR_CLEANING;
 	sc->sc_msgify = 0;
-	if ((ecb = sc->sc_nexus) != NULL) {
+	ecb = sc->sc_nexus;
+	if (ecb != NULL) {
 		ecb->ccb->ccb_h.status = result;
 		ncr53c9x_done(sc, ecb);
 	}
@@ -597,7 +588,8 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 
 	/* Cancel outstanding disconnected commands on each LUN. */
 	LIST_FOREACH(li, &sc->sc_tinfo[target].luns, link) {
-		if ((ecb = li->untagged) != NULL) {
+		ecb = li->untagged;
+		if (ecb != NULL) {
 			li->untagged = NULL;
 			/*
 			 * XXX should we terminate a command
@@ -607,12 +599,14 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 			ecb->ccb->ccb_h.status = result;
 			ncr53c9x_done(sc, ecb);
 		}
-		for (i = 0; i < NCR_TAG_DEPTH; i++)
-			if ((ecb = li->queued[i])) {
+		for (i = 0; i < NCR_TAG_DEPTH; i++) {
+			ecb = li->queued[i];
+			if (ecb != NULL) {
 				li->queued[i] = NULL;
 				ecb->ccb->ccb_h.status = result;
 				ncr53c9x_done(sc, ecb);
 			}
+		}
 		li->used = 0;
 	}
 }
@@ -635,7 +629,7 @@ ncr53c9x_init(struct ncr53c9x_softc *sc,
 
 		TAILQ_INIT(&sc->ready_list);
 		sc->sc_nexus = NULL;
-		memset(sc->sc_tinfo, 0, sizeof(sc->sc_tinfo));
+		memset(sc->sc_tinfo, 0, sizeof(*sc->sc_tinfo));
 		for (r = 0; r < sc->sc_ntarg; r++) {
 			LIST_INIT(&sc->sc_tinfo[r].luns);
 		}
@@ -751,7 +745,7 @@ ncr53c9x_stp2cpb(struct ncr53c9x_softc *
 static inline void
 ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
 {
-	u_char cfg3, syncoff, synctp;
+	uint8_t cfg3, syncoff, synctp;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -810,7 +804,7 @@ static void
 ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
 {
 	struct ncr53c9x_tinfo *ti;
-	u_char *cmd;
+	uint8_t *cmd;
 	size_t dmasize;
 	int clen, selatn3, selatns;
 	int lun = ecb->ccb->ccb_h.target_lun;
@@ -818,8 +812,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_select(t%d,l%d,cmd:%x,tag:%x,%x)] ",
-	    target, lun, ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
+	NCR_TRACE(("[%s(t%d,l%d,cmd:%x,tag:%x,%x)] ", __func__, target, lun,
+	    ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
 
 	ti = &sc->sc_tinfo[target];
 	sc->sc_state = NCR_SELECTING;
@@ -838,9 +832,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		NCRCMD(sc, NCRCMD_FLUSH);
 		NCR_WRITE_REG(sc, NCR_SELID, target | NCR_BUSID_HMEXC32 |
 		    NCR_BUSID_HMEENCID);
-	} else {
+	} else
 		NCR_WRITE_REG(sc, NCR_SELID, target);
-	}
 
 	/*
 	 * If we are requesting sense, force a renegotiation if we are
@@ -873,7 +866,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		selatns = 1;
 	}
 
-	cmd = (u_char *)&ecb->cmd.cmd;
+	cmd = (uint8_t *)&ecb->cmd.cmd;
 
 	if (selatn3) {
 		/* We'll use tags with SELATN3. */
@@ -954,7 +947,7 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc *
 	ecb = TAILQ_FIRST(&sc->free_list);
 	if (ecb) {
 		if (ecb->flags != 0)
-			panic("ecb flags not cleared\n");
+			panic("%s: ecb flags not cleared", __func__);
 		TAILQ_REMOVE(&sc->free_list, ecb, free_links);
 		ecb->flags = ECB_ALLOC;
 		bzero(&ecb->ccb, sizeof(struct ncr53c9x_ecb) -
@@ -990,7 +983,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_action %d]", ccb->ccb_h.func_code));
+	NCR_TRACE(("[%s %d]", __func__, ccb->ccb_h.func_code));
 
 	switch (ccb->ccb_h.func_code) {
 	case XPT_RESET_BUS:
@@ -1196,7 +1189,7 @@ ncr53c9x_poll(struct cam_sim *sim)
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_poll] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (NCRDMA_ISINTR(sc))
 		ncr53c9x_intr1(sc);
@@ -1260,10 +1253,10 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_sched] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (sc->sc_state != NCR_IDLE)
-		panic("ncr53c9x_sched: not IDLE (state=%d)", sc->sc_state);
+		panic("%s: not IDLE (state=%d)", __func__, sc->sc_state);
 
 	/*
 	 * Find first ecb in ready queue that is for a target/lunit
@@ -1288,10 +1281,9 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 		li = TINFO_LUN(ti, lun);
 		if (li == NULL) {
 			/* Initialize LUN info and add to list. */
-			if ((li = malloc(sizeof(*li),
-			    M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) {
+			li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT | M_ZERO);
+			if (li == NULL)
 				continue;
-			}
 			li->lun = lun;
 
 			LIST_INSERT_HEAD(&ti->luns, li, link);
@@ -1338,7 +1330,7 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 			ncr53c9x_select(sc, ecb);
 			break;
 		} else {
-			NCR_TRACE(("%d:%d busy\n",
+			NCR_TRACE(("[%s %d:%d busy] \n", __func__,
 			    ecb->ccb->ccb_h.target_id,
 			    ecb->ccb->ccb_h.target_lun));
 		}
@@ -1356,7 +1348,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("requesting sense "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	lun = ccb->ccb_h.target_lun;
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
@@ -1368,7 +1360,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
 	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
-	ecb->daddr = (char *)&ccb->csio.sense_data;
+	ecb->daddr = (uint8_t *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1379,9 +1371,9 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ncr53c9x_dequeue(sc, ecb);
 	li->untagged = ecb;	/* Must be executed first to fix C/A. */
 	li->busy = 2;
-	if (ecb == sc->sc_nexus) {
+	if (ecb == sc->sc_nexus)
 		ncr53c9x_select(sc, ecb);
-	} else {
+	else {
 		TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);
 		ecb->flags |= ECB_READY;
 		if (sc->sc_state == NCR_IDLE)
@@ -1402,7 +1394,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_done(status:%x)] ", ccb->ccb_h.status));
+	NCR_TRACE(("[%s(status:%x)] ", __func__, ccb->ccb_h.status));
 
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
 	lun = ccb->ccb_h.target_lun;
@@ -1457,7 +1449,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		if (ccb->csio.resid != 0)
 			printf("resid=%d ", ccb->csio.resid);
 		if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)
@@ -1510,7 +1502,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	li = TINFO_LUN(ti, lun);
 #ifdef DIAGNOSTIC
 	if (li == NULL || li->lun != lun)
-		panic("ncr53c9x_dequeue: lun %qx for ecb %p does not exist",
+		panic("%s: lun %qx for ecb %p does not exist", __func__,
 		    (long long)lun, ecb);
 #endif
 	if (li->untagged == ecb) {
@@ -1521,9 +1513,9 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 #ifdef DIAGNOSTIC
 		if (li->queued[ecb->tag[1]] != NULL &&
 		    (li->queued[ecb->tag[1]] != ecb))
-			panic("ncr53c9x_dequeue: slot %d for lun %qx has %p "
-			    "instead of ecb %p\n", ecb->tag[1],
-			    (long long)lun, li->queued[ecb->tag[1]], ecb);
+			panic("%s: slot %d for lun %qx has %p instead of ecb "
+			    "%p", __func__, ecb->tag[1], (long long)lun,
+			    li->queued[ecb->tag[1]], ecb);
 #endif
 		li->queued[ecb->tag[1]] = NULL;
 		li->used--;
@@ -1550,7 +1542,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	NCRCMD(sc, NCRCMD_SETATN);					\
 	sc->sc_flags |= NCR_ATN;					\
 	sc->sc_msgpriq |= (m);						\
-} while (0)
+} while (/* CONSTCOND */0)
 
 static void
 ncr53c9x_flushfifo(struct ncr53c9x_softc *sc)
@@ -1558,7 +1550,7 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[flushfifo] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	NCRCMD(sc, NCRCMD_FLUSH);
 
@@ -1570,8 +1562,8 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {
-	u_char *ibuf;
 	int i, n;
+	uint8_t *ibuf;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1586,7 +1578,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 		break;
 
 	default:
-		panic("ncr53c9x_rdfifo: bad flag");
+		panic("%s: bad flag", __func__);
 		/* NOTREACHED */
 	}
 
@@ -1611,10 +1603,9 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 
 			ncr53c9x_flushfifo(sc);
 		}
-	} else {
+	} else
 		for (i = 0; i < n; i++)
 			ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
-	}
 
 	sc->sc_imlen += i;
 
@@ -1622,7 +1613,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 #ifdef NCR53C9X_DEBUG
 	NCR_TRACE(("\n[rdfifo %s (%d):",
 	    (how == NCR_RDFIFO_START) ? "start" : "cont", (int)sc->sc_imlen));
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		for (i = 0; i < sc->sc_imlen; i++)
 			printf(" %02x", sc->sc_imess[i]);
 		printf("]\n");
@@ -1633,7 +1624,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 }
 
 static void
-ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
+ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p, int len)
 {
 	int i;
 
@@ -1641,7 +1632,7 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *s
 
 #ifdef NCR53C9X_DEBUG
 	NCR_MSGS(("[wrfifo(%d):", len));
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		for (i = 0; i < len; i++)
 			printf(" %02x", p[i]);
 		printf("]\n");
@@ -1663,13 +1654,13 @@ ncr53c9x_reselect(struct ncr53c9x_softc 
 	struct ncr53c9x_ecb *ecb = NULL;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char lun, selid, target;
+	uint8_t lun, selid, target;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	if (sc->sc_rev == NCR_VARIANT_FAS366) {
+	if (sc->sc_rev == NCR_VARIANT_FAS366)
 		target = sc->sc_selid;
-	} else {
+	else {
 		/*
 		 * The SCSI chip made a snapshot of the data bus
 		 * while the reselection was being negotiated.
@@ -1751,7 +1742,7 @@ abort:
 #define	MSG_IS2BYTE(m)		(((m) & 0xf0) == 0x20)
 
 static inline int
-__verify_msg_format(u_char *p, int len)
+__verify_msg_format(uint8_t *p, int len)
 {
 
 	if (len == 1 && MSG_IS1BYTE(p[0]))
@@ -1777,12 +1768,12 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc
 	struct ncr53c9x_ecb *ecb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char *pb;
+	uint8_t *pb;
 	int lun, plen;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
+	NCR_TRACE(("[%s(curmsglen:%ld)] ", __func__, (long)sc->sc_imlen));
 
 	if (sc->sc_imlen == 0) {
 		device_printf(sc->sc_dev, "msgin: no msg byte available\n");
@@ -2068,19 +2059,19 @@ gotit:
 			    sc->sc_imess[0]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify,
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify,
 		    sc->sc_imess[0], sc->sc_imess[1]);
 		break;
 
 	case NCR_RESELECTED:
-		if (MSG_ISIDENTIFY(sc->sc_imess[1])) {
+		if (MSG_ISIDENTIFY(sc->sc_imess[1]))
 			sc->sc_msgify = sc->sc_imess[1];
-		} else {
+		else {
 			device_printf(sc->sc_dev, "reselect without IDENTIFY;"
 			    " MSG %x; sending DEVICE RESET\n", sc->sc_imess[1]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
 		break;
 
 	default:
@@ -2124,8 +2115,8 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgout(priq:%x, prevphase:%x)]",
-	    sc->sc_msgpriq, sc->sc_prevphase));
+	NCR_TRACE(("[%s(priq:%x, prevphase:%x)]", __func__, sc->sc_msgpriq,
+	    sc->sc_prevphase));
 
 	/*
 	 * XXX - the NCR_ATN flag is not in sync with the actual ATN
@@ -2138,7 +2129,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase != MESSAGE_OUT_PHASE) {
 		new:
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 			sc->sc_msgoutq = 0;
 			sc->sc_omlen = 0;
 		}
@@ -2146,10 +2139,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase == MESSAGE_OUT_PHASE) {
 			ncr53c9x_sched_msgout(sc->sc_msgoutq);
 			goto new;
-		} else {
+		} else
 			device_printf(sc->sc_dev, "at line %d: unexpected "
 			    "MESSAGE OUT phase\n", __LINE__);
-		}
 	}
 
 	if (sc->sc_omlen == 0) {
@@ -2181,20 +2173,18 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 			break;
 
 		case SEND_IDENTIFY:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] =
 			    MSG_IDENTIFY(ecb->ccb->ccb_h.target_lun, 0);
 			break;
 
 		case SEND_TAG:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] = ecb->tag[0];
 			sc->sc_omess[1] = ecb->tag[1];
@@ -2249,7 +2239,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		NCR_MSGS(("sc_omlen; i++)
 			NCR_MSGS((" %02x", sc->sc_omess[i]));
@@ -2310,7 +2300,7 @@ ncr53c9x_intr1(struct ncr53c9x_softc *sc
 	struct timeval cur, wait;
 	size_t size;
 	int i, nfifo;
-	u_char msg;
+	uint8_t msg;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -2385,7 +2375,7 @@ again:
 				 * while we were trying to select
 				 * another target.
 				 */
-#ifdef DEBUG
+#ifdef NCR53C9X_DEBUG
 				device_printf(sc->sc_dev, "ESP100 work-around "
 				    "activated\n");
 #endif
@@ -2492,7 +2482,9 @@ again:
 		    sc->sc_espintr,sc->sc_espstat,sc->sc_espstep));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * This command must (apparently) be issued within
@@ -2734,7 +2726,7 @@ again:
 				if (sc->sc_state == NCR_IDLE &&
 				    sc->sc_espstep == 0)
 					return;
-				panic("ncr53c9x: no nexus");
+				panic("%s: no nexus", __func__);
 			}
 
 			ti = &sc->sc_tinfo[ecb->ccb->ccb_h.target_id];
@@ -2812,8 +2804,8 @@ again:
 					if (sc->sc_cmdlen == 0)
 						/* Hope for the best... */
 						break;
-				} else if ((NCR_READ_REG(sc, NCR_FFLAG)
-				    & NCRFIFO_FF) == 0) {
+				} else if ((NCR_READ_REG(sc, NCR_FFLAG) &
+				    NCRFIFO_FF) == 0) {
 					/* Hope for the best... */
 					break;
 				}
@@ -2872,7 +2864,7 @@ again:
 			/* "Initiate Command Complete Steps" in progress */
 			sc->sc_flags &= ~NCR_ICCS;
 
-			if (!(sc->sc_espintr & NCRINTR_DONE)) {
+			if ((sc->sc_espintr & NCRINTR_DONE) == 0) {
 				device_printf(sc->sc_dev, "ICCS: "
 				    ": [intr %x, stat %x, step %x]\n",
 				    sc->sc_espintr, sc->sc_espstat,
@@ -2912,9 +2904,8 @@ again:
 	 * Driver is now in state NCR_CONNECTED, i.e. we
 	 * have a current command working the SCSI bus.
 	 */
-	if (sc->sc_state != NCR_CONNECTED || ecb == NULL) {
-		panic("ncr53c9x: no nexus");
-	}
+	if (sc->sc_state != NCR_CONNECTED || ecb == NULL)
+		panic("%s: no nexus", __func__);
 
 	switch (sc->sc_phase) {
 	case MESSAGE_OUT_PHASE:
@@ -2928,7 +2919,7 @@ msgin:
 		NCR_PHASE(("MESSAGE_IN_PHASE "));
 		if ((sc->sc_espintr & NCRINTR_BS) != 0) {
 			if ((sc->sc_rev != NCR_VARIANT_FAS366) ||
-			    !(sc->sc_espstat2 & NCRFAS_STAT2_EMPTY)) {
+			    (sc->sc_espstat2 & NCRFAS_STAT2_EMPTY) == 0) {
 				NCRCMD(sc, NCRCMD_FLUSH);
 			}
 			sc->sc_flags |= NCR_WAITI;
@@ -2945,11 +2936,10 @@ msgin:
 			    (sc->sc_prevphase == sc->sc_phase) ?
 			    NCR_RDFIFO_CONTINUE : NCR_RDFIFO_START);
 			ncr53c9x_msgin(sc);
-		} else {
+		} else
 			device_printf(sc->sc_dev, "MSGIN: weird bits: "
 			    "[intr %x, stat %x, step %x]\n",
 			    sc->sc_espintr, sc->sc_espstat, sc->sc_espstep);
-		}
 		sc->sc_prevphase = MESSAGE_IN_PHASE;
 		goto shortcut;	/* i.e. expect data to be ready */
 
@@ -2966,7 +2956,9 @@ msgin:
 		    ecb->cmd.cmd.opcode, ecb->clen));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1);*/
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * If we have more messages to send, e.g. WDTR or SDTR
@@ -2981,7 +2973,7 @@ msgin:
 			/* Setup DMA transfer for command. */
 			size = ecb->clen;
 			sc->sc_cmdlen = size;
-			sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+			sc->sc_cmdp = (void *)&ecb->cmd.cmd;
 			NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen,
 			    0, &size);
 			/* Program the SCSI counter. */
@@ -2994,7 +2986,8 @@ msgin:
 			NCRCMD(sc, NCRCMD_TRANS | NCRCMD_DMA);
 			NCRDMA_GO(sc);
 		} else {
-			ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
+			ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
+			    ecb->clen);
 			NCRCMD(sc, NCRCMD_TRANS);
 		}
 		sc->sc_prevphase = COMMAND_PHASE;
@@ -3175,7 +3168,7 @@ ncr53c9x_callout(void *arg)
 static void
 ncr53c9x_watch(void *arg)
 {
-	struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
+	struct ncr53c9x_softc *sc = arg;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
 	time_t old;

Modified: stable/9/sys/dev/esp/ncr53c9xreg.h
==============================================================================
--- stable/9/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:51:23 2011	(r226916)
+++ stable/9/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:53 2011	(r226917)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9xreg.h,v 1.14 2005/02/27 00:27:02 perry Exp $	*/
+/*	$NetBSD: ncr53c9xreg.h,v 1.16 2009/09/07 13:31:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
@@ -43,84 +43,84 @@
 #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
 
 #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
-#define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
-#define  NCRCMD_NOP	0x00		/*	No Operation		*/
-#define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
-#define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
-#define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
-#define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
-#define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
-#define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
-#define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
-#define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
-#define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
-#define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
-#define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
-#define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
-#define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
-#define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
-#define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
-#define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
-#define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
-#define  NCRCMD_DISC	0x27		/*	Disconnect		*/
-#define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
-#define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
-#define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
-#define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
-#define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
-#define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
-#define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
-#define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
-#define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
-#define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
-#define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
+#define	 NCRCMD_DMA	0x80		/*	DMA Bit			*/
+#define	 NCRCMD_NOP	0x00		/*	No Operation		*/
+#define	 NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
+#define	 NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
+#define	 NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
+#define	 NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
+#define	 NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
+#define	 NCRCMD_SELATN	0x42		/*	Select with ATN		*/
+#define	 NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
+#define	 NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
+#define	 NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
+#define	 NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
+#define	 NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
+#define	 NCRCMD_SNDMSG	0x20		/*	Send Message		*/
+#define	 NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
+#define	 NCRCMD_SNDDATA	0x22		/*	Send Data		*/
+#define	 NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
+#define	 NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
+#define	 NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
+#define	 NCRCMD_DISC	0x27		/*	Disconnect		*/
+#define	 NCRCMD_RECMSG	0x28		/*	Receive Message		*/
+#define	 NCRCMD_RECCMD	0x29		/*	Receive Command		*/
+#define	 NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
+#define	 NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
+#define	 NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
+#define	 NCRCMD_TRANS	0x10		/*	Transfer Information	*/
+#define	 NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq	*/
+#define	 NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
+#define	 NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
+#define	 NCRCMD_SETATN	0x1a		/*	Set ATN			*/
+#define	 NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
 
 #define	NCR_STAT	0x04		/* RO - Status			*/
-#define  NCRSTAT_INT	0x80		/*	Interrupt		*/
-#define  NCRSTAT_GE	0x40		/*	Gross Error		*/
-#define  NCRSTAT_PE	0x20		/*	Parity Error		*/
-#define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
-#define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
-#define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
+#define	 NCRSTAT_INT	0x80		/*	Interrupt		*/
+#define	 NCRSTAT_GE	0x40		/*	Gross Error		*/
+#define	 NCRSTAT_PE	0x20		/*	Parity Error		*/
+#define	 NCRSTAT_TC	0x10		/*	Terminal Count		*/
+#define	 NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
+#define	 NCRSTAT_PHASE	0x07		/*	Phase bits		*/
 
 #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
-#define  NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
-#define  NCR_BUSID_HMEENCID	0x10 	/*	HME encode reselection ID */
+#define	 NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
+#define	 NCR_BUSID_HMEENCID	0x10	/*	HME encode reselection ID */
 
 #define	NCR_INTR	0x05		/* RO - Interrupt		*/
-#define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
-#define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
-#define  NCRINTR_DIS	0x20		/*	Disconnect		*/
-#define  NCRINTR_BS	0x10		/*	Bus Service		*/
-#define  NCRINTR_FC	0x08		/*	Function Complete	*/
-#define  NCRINTR_RESEL	0x04		/*	Reselected		*/
-#define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
-#define  NCRINTR_SEL	0x01		/*	Selected		*/
+#define	 NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
+#define	 NCRINTR_ILL	0x40		/*	Illegal Command		*/
+#define	 NCRINTR_DIS	0x20		/*	Disconnect		*/
+#define	 NCRINTR_BS	0x10		/*	Bus Service		*/
+#define	 NCRINTR_FC	0x08		/*	Function Complete	*/
+#define	 NCRINTR_RESEL	0x04		/*	Reselected		*/
+#define	 NCRINTR_SELATN	0x02		/*	Select with ATN		*/
+#define	 NCRINTR_SEL	0x01		/*	Selected		*/
 
 #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
 
 #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
-#define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
-#define  NCRSTEP_DONE	0x04		/*	command went out	*/
+#define	 NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
+#define	 NCRSTEP_DONE	0x04		/*	command went out	*/
 
 #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
 					/*	Default 5 (53C9X)	*/
 
 #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
-#define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
-#define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
+#define	 NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
+#define	 NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
 
 #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
 					/*	0 = ASYNC		*/
 					/*	1 - 15 = SYNC bytes	*/
 
 #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
-#define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
-#define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
-#define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
-#define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
-#define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
-#define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
+#define	 NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
+#define	 NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
+#define	 NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
+#define	 NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
+#define	 NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
+#define	 NCRCFG1_BUSID	0x07		/*	Bus ID			*/
 
 #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
 					/*	0 = 35.01 - 40MHz	*/
@@ -136,24 +136,24 @@
 
 #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
 #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
-#define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
-#define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
-#define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
-#define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
-#define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
-#define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
+#define	 NCRCFG2_FE	0x40		/*	Features Enable		*/
+#define	 NCRCFG2_DREQ	0x10		/*	DREQ High Impedance	*/
+#define	 NCRCFG2_SCSI2	0x08		/*	SCSI-2 Enable		*/
+#define	 NCRCFG2_BPA	0x04		/*	Target Bad Parity Abort	*/
+#define	 NCRCFG2_RPE	0x02		/*	Register Parity Error	*/
+#define	 NCRCFG2_DPE	0x01		/*	DMA Parity Error	*/
 
-#define  NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
+#define	 NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
 #define	 NCRCFG2_HME32  0x80		/*	HME 32 extended		*/
 
 /* Config #3 only on 53C9X */
 #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
 #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
-#define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
-#define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
-#define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
-#define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
-#define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
+#define	 NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
+#define	 NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
+#define	 NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
+#define	 NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
+#define	 NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
 
 /*
  * For some unknown reason, the ESP406/FAS408 looks like every
@@ -164,35 +164,35 @@
 
 /* Config #3 different on ESP406/FAS408 */
 #define	NCR_ESPCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
 #define	 NCRESPCFG3_SRESB	0x08	/*	Save Residual Byte	*/
-#define  NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
+#define	 NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
 #define	 NCRESPCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
 #define	 NCRESPCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 also different on NCR53CF9x/FAS100A/FAS216/FAS236 */
 #define	NCR_F9XCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
-#define  NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
-#define  NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
-#define  NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
-#define  NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
+#define	 NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
+#define	 NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
+#define	 NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
+#define	 NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 on FAS366 */
-#define  NCRFASCFG3_OBAUTO    	0x80    /*	auto push odd-byte to DMA */
-#define  NCRFASCFG3_EWIDE     	0x40    /* 	Enable Wide-SCSI     */
-#define  NCRFASCFG3_IDBIT3	0x20	/* 	Bit 3 of HME SCSI-ID */
-#define	 NCRFASCFG3_IDRESCHK	0x10	/* 	ID message checking */
-#define	 NCRFASCFG3_QUENB	0x08	/* 	3-byte msg support */
-#define	 NCRFASCFG3_CDB10	0x04	/* 	group 2 scsi-2 support */
-#define	 NCRFASCFG3_FASTSCSI	0x02	/* 	10 MB/S fast scsi mode */
-#define	 NCRFASCFG3_FASTCLK	0x01	/* 	fast clock mode */
+#define	 NCRFASCFG3_OBAUTO	0x80    /*	auto push odd-byte to DMA */
+#define	 NCRFASCFG3_EWIDE	0x40    /*	Enable Wide-SCSI     */
+#define	 NCRFASCFG3_IDBIT3	0x20	/*	Bit 3 of HME SCSI-ID */
+#define	 NCRFASCFG3_IDRESCHK	0x10	/*	ID message checking */
+#define	 NCRFASCFG3_QUENB	0x08	/*	3-byte msg support */
+#define	 NCRFASCFG3_CDB10	0x04	/*	group 2 scsi-2 support */
+#define	 NCRFASCFG3_FASTSCSI	0x02	/*	10 MB/S fast scsi mode */
+#define	 NCRFASCFG3_FASTCLK	0x01	/*	fast clock mode */
 
 /* Config #4 only on ESP406/FAS408 */
 #define	NCR_CFG4	0x0d		/* RW - Configuration #4	*/
@@ -208,8 +208,8 @@
 */
 

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

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:53:58 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 807131065672;
	Sat, 29 Oct 2011 23:53:58 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D7F68FC13;
	Sat, 29 Oct 2011 23:53:58 +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 p9TNrwmF038644;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNrw9K038631;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292353.p9TNrw9K038631@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:53:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r226918 - in stable/7/sys: dev/esp sparc64/sbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:53:58 -0000

Author: marius
Date: Sat Oct 29 23:53:58 2011
New Revision: 226918
URL: http://svn.freebsd.org/changeset/base/226918

Log:
  MFC: r226381
  
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.

Modified:
  stable/7/sys/dev/esp/esp_sbus.c
  stable/7/sys/dev/esp/ncr53c9x.c
  stable/7/sys/dev/esp/ncr53c9xreg.h
  stable/7/sys/dev/esp/ncr53c9xvar.h
  stable/7/sys/sparc64/sbus/lsi64854.c
  stable/7/sys/sparc64/sbus/lsi64854var.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/esp/esp_sbus.c
==============================================================================
--- stable/7/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:53 2011	(r226917)
+++ stable/7/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:58 2011	(r226918)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,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 the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int	esp_dma_isintr(struct ncr53c9x_softc *sc);
 static void	esp_dma_reset(struct ncr53c9x_softc *sc);
 static int	esp_dma_intr(struct ncr53c9x_softc *sc);
-static int	esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int	esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
 		    size_t *len, int datain, size_t *dmasize);
 static void	esp_dma_go(struct ncr53c9x_softc *sc);
 static void	esp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int	espattach(struct esp_softc *e
 		    const struct ncr53c9x_glue *gluep);
 static int	espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
 	esp_read_reg,
 	esp_write_reg,
 	esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__read_regnames [] = {
+	const char *r_name;
+	int r_flag;
+} const esp__read_regnames [] = {
 	{ "TCL", 0},			/* 0/00 */
 	{ "TCM", 0},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
 	{ "TCX", 1},			/* f/3c */
 };
 
-static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+	const char *r_name;
+	int r_flag;
+} const esp__write_regnames[] = {
 	{ "TCL", 1},			/* 0/00 */
 	{ "TCM", 1},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
-	u_char v;
+	uint8_t v;
 
 	v = bus_read_1(esc->sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
-	      int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+    int datain, size_t *dmasize)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: stable/7/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/7/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:53 2011	(r226917)
+++ stable/7/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:58 2011	(r226918)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -43,13 +43,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 the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -133,7 +126,7 @@ __FBSDID("$FreeBSD$");
 MODULE_DEPEND(esp, cam, 1, 1, 1);
 
 #ifdef NCR53C9X_DEBUG
-static int ncr53c9x_debug =
+int ncr53c9x_debug =
     NCR_SHOWMISC /* | NCR_SHOWPHASE | NCR_SHOWTRAC | NCR_SHOWCMDS */;
 #endif
 
@@ -167,7 +160,7 @@ static void	ncr53c9x_sched(struct ncr53c
 static void	ncr53c9x_select(struct ncr53c9x_softc *sc,
 		    struct ncr53c9x_ecb *ecb);
 static void	ncr53c9x_watch(void *arg);
-static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p,
+static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p,
 		    int len);
 
 static struct ncr53c9x_ecb	*ncr53c9x_get_ecb(struct ncr53c9x_softc *sc);
@@ -187,13 +180,11 @@ static inline int	ncr53c9x_stp2cpb(struc
 		NCR_WRITE_REG((sc), NCR_TCL, (size));			\
 		NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8);		\
 		if ((sc->sc_cfg2 & NCRCFG2_FE) ||			\
-		    (sc->sc_rev == NCR_VARIANT_FAS366)) {		\
+		    (sc->sc_rev == NCR_VARIANT_FAS366))			\
 			NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16);	\
-		}							\
-		if (sc->sc_rev == NCR_VARIANT_FAS366) {			\
+		if (sc->sc_rev == NCR_VARIANT_FAS366)			\
 			NCR_WRITE_REG(sc, NCR_RCH, 0);			\
-		}							\
-} while (0)
+} while (/* CONSTCOND */0)
 
 #ifndef mstohz
 #define	mstohz(ms) \
@@ -551,11 +542,10 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc
 		NCR_WRITE_REG(sc, NCR_AMDCFG4, sc->sc_cfg4);
 
 #if 0
-	device_printf(sc->sc_dev, "ncr53c9x_reset: revision %d\n",
-	    sc->sc_rev);
-	device_printf(sc->sc_dev, "ncr53c9x_reset: cfg1 0x%x, cfg2 0x%x, "
-	    "cfg3 0x%x, ccf 0x%x, timeout 0x%x\n",
-	    sc->sc_cfg1, sc->sc_cfg2, sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
+	device_printf(sc->sc_dev, "%s: revision %d\n", __func__, sc->sc_rev);
+	device_printf(sc->sc_dev, "%s: cfg1 0x%x, cfg2 0x%x, cfg3 0x%x, ccf "
+	    "0x%x, timeout 0x%x\n", __func__, sc->sc_cfg1, sc->sc_cfg2,
+	    sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
 #endif
 }
 
@@ -573,7 +563,8 @@ ncr53c9x_clear(struct ncr53c9x_softc *sc
 	/* Cancel any active commands. */
 	sc->sc_state = NCR_CLEANING;
 	sc->sc_msgify = 0;
-	if ((ecb = sc->sc_nexus) != NULL) {
+	ecb = sc->sc_nexus;
+	if (ecb != NULL) {
 		ecb->ccb->ccb_h.status = result;
 		ncr53c9x_done(sc, ecb);
 	}
@@ -597,7 +588,8 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 
 	/* Cancel outstanding disconnected commands on each LUN. */
 	LIST_FOREACH(li, &sc->sc_tinfo[target].luns, link) {
-		if ((ecb = li->untagged) != NULL) {
+		ecb = li->untagged;
+		if (ecb != NULL) {
 			li->untagged = NULL;
 			/*
 			 * XXX should we terminate a command
@@ -607,12 +599,14 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 			ecb->ccb->ccb_h.status = result;
 			ncr53c9x_done(sc, ecb);
 		}
-		for (i = 0; i < NCR_TAG_DEPTH; i++)
-			if ((ecb = li->queued[i])) {
+		for (i = 0; i < NCR_TAG_DEPTH; i++) {
+			ecb = li->queued[i];
+			if (ecb != NULL) {
 				li->queued[i] = NULL;
 				ecb->ccb->ccb_h.status = result;
 				ncr53c9x_done(sc, ecb);
 			}
+		}
 		li->used = 0;
 	}
 }
@@ -635,7 +629,7 @@ ncr53c9x_init(struct ncr53c9x_softc *sc,
 
 		TAILQ_INIT(&sc->ready_list);
 		sc->sc_nexus = NULL;
-		memset(sc->sc_tinfo, 0, sizeof(sc->sc_tinfo));
+		memset(sc->sc_tinfo, 0, sizeof(*sc->sc_tinfo));
 		for (r = 0; r < sc->sc_ntarg; r++) {
 			LIST_INIT(&sc->sc_tinfo[r].luns);
 		}
@@ -751,7 +745,7 @@ ncr53c9x_stp2cpb(struct ncr53c9x_softc *
 static inline void
 ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
 {
-	u_char cfg3, syncoff, synctp;
+	uint8_t cfg3, syncoff, synctp;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -810,7 +804,7 @@ static void
 ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
 {
 	struct ncr53c9x_tinfo *ti;
-	u_char *cmd;
+	uint8_t *cmd;
 	size_t dmasize;
 	int clen, selatn3, selatns;
 	int lun = ecb->ccb->ccb_h.target_lun;
@@ -818,8 +812,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_select(t%d,l%d,cmd:%x,tag:%x,%x)] ",
-	    target, lun, ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
+	NCR_TRACE(("[%s(t%d,l%d,cmd:%x,tag:%x,%x)] ", __func__, target, lun,
+	    ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
 
 	ti = &sc->sc_tinfo[target];
 	sc->sc_state = NCR_SELECTING;
@@ -838,9 +832,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		NCRCMD(sc, NCRCMD_FLUSH);
 		NCR_WRITE_REG(sc, NCR_SELID, target | NCR_BUSID_HMEXC32 |
 		    NCR_BUSID_HMEENCID);
-	} else {
+	} else
 		NCR_WRITE_REG(sc, NCR_SELID, target);
-	}
 
 	/*
 	 * If we are requesting sense, force a renegotiation if we are
@@ -873,7 +866,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		selatns = 1;
 	}
 
-	cmd = (u_char *)&ecb->cmd.cmd;
+	cmd = (uint8_t *)&ecb->cmd.cmd;
 
 	if (selatn3) {
 		/* We'll use tags with SELATN3. */
@@ -954,7 +947,7 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc *
 	ecb = TAILQ_FIRST(&sc->free_list);
 	if (ecb) {
 		if (ecb->flags != 0)
-			panic("ecb flags not cleared\n");
+			panic("%s: ecb flags not cleared", __func__);
 		TAILQ_REMOVE(&sc->free_list, ecb, free_links);
 		ecb->flags = ECB_ALLOC;
 		bzero(&ecb->ccb, sizeof(struct ncr53c9x_ecb) -
@@ -990,7 +983,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_action %d]", ccb->ccb_h.func_code));
+	NCR_TRACE(("[%s %d]", __func__, ccb->ccb_h.func_code));
 
 	switch (ccb->ccb_h.func_code) {
 	case XPT_RESET_BUS:
@@ -1196,7 +1189,7 @@ ncr53c9x_poll(struct cam_sim *sim)
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_poll] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (NCRDMA_ISINTR(sc))
 		ncr53c9x_intr1(sc);
@@ -1260,10 +1253,10 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_sched] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (sc->sc_state != NCR_IDLE)
-		panic("ncr53c9x_sched: not IDLE (state=%d)", sc->sc_state);
+		panic("%s: not IDLE (state=%d)", __func__, sc->sc_state);
 
 	/*
 	 * Find first ecb in ready queue that is for a target/lunit
@@ -1288,10 +1281,9 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 		li = TINFO_LUN(ti, lun);
 		if (li == NULL) {
 			/* Initialize LUN info and add to list. */
-			if ((li = malloc(sizeof(*li),
-			    M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) {
+			li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT | M_ZERO);
+			if (li == NULL)
 				continue;
-			}
 			li->lun = lun;
 
 			LIST_INSERT_HEAD(&ti->luns, li, link);
@@ -1338,7 +1330,7 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 			ncr53c9x_select(sc, ecb);
 			break;
 		} else {
-			NCR_TRACE(("%d:%d busy\n",
+			NCR_TRACE(("[%s %d:%d busy] \n", __func__,
 			    ecb->ccb->ccb_h.target_id,
 			    ecb->ccb->ccb_h.target_lun));
 		}
@@ -1356,7 +1348,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("requesting sense "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	lun = ccb->ccb_h.target_lun;
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
@@ -1368,7 +1360,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
 	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
-	ecb->daddr = (char *)&ccb->csio.sense_data;
+	ecb->daddr = (uint8_t *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1379,9 +1371,9 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ncr53c9x_dequeue(sc, ecb);
 	li->untagged = ecb;	/* Must be executed first to fix C/A. */
 	li->busy = 2;
-	if (ecb == sc->sc_nexus) {
+	if (ecb == sc->sc_nexus)
 		ncr53c9x_select(sc, ecb);
-	} else {
+	else {
 		TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);
 		ecb->flags |= ECB_READY;
 		if (sc->sc_state == NCR_IDLE)
@@ -1402,7 +1394,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_done(status:%x)] ", ccb->ccb_h.status));
+	NCR_TRACE(("[%s(status:%x)] ", __func__, ccb->ccb_h.status));
 
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
 	lun = ccb->ccb_h.target_lun;
@@ -1457,7 +1449,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		if (ccb->csio.resid != 0)
 			printf("resid=%d ", ccb->csio.resid);
 		if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)
@@ -1510,7 +1502,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	li = TINFO_LUN(ti, lun);
 #ifdef DIAGNOSTIC
 	if (li == NULL || li->lun != lun)
-		panic("ncr53c9x_dequeue: lun %qx for ecb %p does not exist",
+		panic("%s: lun %qx for ecb %p does not exist", __func__,
 		    (long long)lun, ecb);
 #endif
 	if (li->untagged == ecb) {
@@ -1521,9 +1513,9 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 #ifdef DIAGNOSTIC
 		if (li->queued[ecb->tag[1]] != NULL &&
 		    (li->queued[ecb->tag[1]] != ecb))
-			panic("ncr53c9x_dequeue: slot %d for lun %qx has %p "
-			    "instead of ecb %p\n", ecb->tag[1],
-			    (long long)lun, li->queued[ecb->tag[1]], ecb);
+			panic("%s: slot %d for lun %qx has %p instead of ecb "
+			    "%p", __func__, ecb->tag[1], (long long)lun,
+			    li->queued[ecb->tag[1]], ecb);
 #endif
 		li->queued[ecb->tag[1]] = NULL;
 		li->used--;
@@ -1550,7 +1542,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	NCRCMD(sc, NCRCMD_SETATN);					\
 	sc->sc_flags |= NCR_ATN;					\
 	sc->sc_msgpriq |= (m);						\
-} while (0)
+} while (/* CONSTCOND */0)
 
 static void
 ncr53c9x_flushfifo(struct ncr53c9x_softc *sc)
@@ -1558,7 +1550,7 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[flushfifo] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	NCRCMD(sc, NCRCMD_FLUSH);
 
@@ -1570,8 +1562,8 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {
-	u_char *ibuf;
 	int i, n;
+	uint8_t *ibuf;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1586,7 +1578,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 		break;
 
 	default:
-		panic("ncr53c9x_rdfifo: bad flag");
+		panic("%s: bad flag", __func__);
 		/* NOTREACHED */
 	}
 
@@ -1611,10 +1603,9 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 
 			ncr53c9x_flushfifo(sc);
 		}
-	} else {
+	} else
 		for (i = 0; i < n; i++)
 			ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
-	}
 
 	sc->sc_imlen += i;
 
@@ -1622,7 +1613,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 #ifdef NCR53C9X_DEBUG
 	NCR_TRACE(("\n[rdfifo %s (%d):",
 	    (how == NCR_RDFIFO_START) ? "start" : "cont", (int)sc->sc_imlen));
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		for (i = 0; i < sc->sc_imlen; i++)
 			printf(" %02x", sc->sc_imess[i]);
 		printf("]\n");
@@ -1633,7 +1624,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 }
 
 static void
-ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
+ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p, int len)
 {
 	int i;
 
@@ -1641,7 +1632,7 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *s
 
 #ifdef NCR53C9X_DEBUG
 	NCR_MSGS(("[wrfifo(%d):", len));
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		for (i = 0; i < len; i++)
 			printf(" %02x", p[i]);
 		printf("]\n");
@@ -1663,13 +1654,13 @@ ncr53c9x_reselect(struct ncr53c9x_softc 
 	struct ncr53c9x_ecb *ecb = NULL;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char lun, selid, target;
+	uint8_t lun, selid, target;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	if (sc->sc_rev == NCR_VARIANT_FAS366) {
+	if (sc->sc_rev == NCR_VARIANT_FAS366)
 		target = sc->sc_selid;
-	} else {
+	else {
 		/*
 		 * The SCSI chip made a snapshot of the data bus
 		 * while the reselection was being negotiated.
@@ -1751,7 +1742,7 @@ abort:
 #define	MSG_IS2BYTE(m)		(((m) & 0xf0) == 0x20)
 
 static inline int
-__verify_msg_format(u_char *p, int len)
+__verify_msg_format(uint8_t *p, int len)
 {
 
 	if (len == 1 && MSG_IS1BYTE(p[0]))
@@ -1777,12 +1768,12 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc
 	struct ncr53c9x_ecb *ecb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char *pb;
+	uint8_t *pb;
 	int lun, plen;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
+	NCR_TRACE(("[%s(curmsglen:%ld)] ", __func__, (long)sc->sc_imlen));
 
 	if (sc->sc_imlen == 0) {
 		device_printf(sc->sc_dev, "msgin: no msg byte available\n");
@@ -2068,19 +2059,19 @@ gotit:
 			    sc->sc_imess[0]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify,
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify,
 		    sc->sc_imess[0], sc->sc_imess[1]);
 		break;
 
 	case NCR_RESELECTED:
-		if (MSG_ISIDENTIFY(sc->sc_imess[1])) {
+		if (MSG_ISIDENTIFY(sc->sc_imess[1]))
 			sc->sc_msgify = sc->sc_imess[1];
-		} else {
+		else {
 			device_printf(sc->sc_dev, "reselect without IDENTIFY;"
 			    " MSG %x; sending DEVICE RESET\n", sc->sc_imess[1]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
 		break;
 
 	default:
@@ -2124,8 +2115,8 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgout(priq:%x, prevphase:%x)]",
-	    sc->sc_msgpriq, sc->sc_prevphase));
+	NCR_TRACE(("[%s(priq:%x, prevphase:%x)]", __func__, sc->sc_msgpriq,
+	    sc->sc_prevphase));
 
 	/*
 	 * XXX - the NCR_ATN flag is not in sync with the actual ATN
@@ -2138,7 +2129,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase != MESSAGE_OUT_PHASE) {
 		new:
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 			sc->sc_msgoutq = 0;
 			sc->sc_omlen = 0;
 		}
@@ -2146,10 +2139,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase == MESSAGE_OUT_PHASE) {
 			ncr53c9x_sched_msgout(sc->sc_msgoutq);
 			goto new;
-		} else {
+		} else
 			device_printf(sc->sc_dev, "at line %d: unexpected "
 			    "MESSAGE OUT phase\n", __LINE__);
-		}
 	}
 
 	if (sc->sc_omlen == 0) {
@@ -2181,20 +2173,18 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 			break;
 
 		case SEND_IDENTIFY:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] =
 			    MSG_IDENTIFY(ecb->ccb->ccb_h.target_lun, 0);
 			break;
 
 		case SEND_TAG:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] = ecb->tag[0];
 			sc->sc_omess[1] = ecb->tag[1];
@@ -2249,7 +2239,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		NCR_MSGS(("sc_omlen; i++)
 			NCR_MSGS((" %02x", sc->sc_omess[i]));
@@ -2310,7 +2300,7 @@ ncr53c9x_intr1(struct ncr53c9x_softc *sc
 	struct timeval cur, wait;
 	size_t size;
 	int i, nfifo;
-	u_char msg;
+	uint8_t msg;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -2385,7 +2375,7 @@ again:
 				 * while we were trying to select
 				 * another target.
 				 */
-#ifdef DEBUG
+#ifdef NCR53C9X_DEBUG
 				device_printf(sc->sc_dev, "ESP100 work-around "
 				    "activated\n");
 #endif
@@ -2492,7 +2482,9 @@ again:
 		    sc->sc_espintr,sc->sc_espstat,sc->sc_espstep));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * This command must (apparently) be issued within
@@ -2734,7 +2726,7 @@ again:
 				if (sc->sc_state == NCR_IDLE &&
 				    sc->sc_espstep == 0)
 					return;
-				panic("ncr53c9x: no nexus");
+				panic("%s: no nexus", __func__);
 			}
 
 			ti = &sc->sc_tinfo[ecb->ccb->ccb_h.target_id];
@@ -2812,8 +2804,8 @@ again:
 					if (sc->sc_cmdlen == 0)
 						/* Hope for the best... */
 						break;
-				} else if ((NCR_READ_REG(sc, NCR_FFLAG)
-				    & NCRFIFO_FF) == 0) {
+				} else if ((NCR_READ_REG(sc, NCR_FFLAG) &
+				    NCRFIFO_FF) == 0) {
 					/* Hope for the best... */
 					break;
 				}
@@ -2872,7 +2864,7 @@ again:
 			/* "Initiate Command Complete Steps" in progress */
 			sc->sc_flags &= ~NCR_ICCS;
 
-			if (!(sc->sc_espintr & NCRINTR_DONE)) {
+			if ((sc->sc_espintr & NCRINTR_DONE) == 0) {
 				device_printf(sc->sc_dev, "ICCS: "
 				    ": [intr %x, stat %x, step %x]\n",
 				    sc->sc_espintr, sc->sc_espstat,
@@ -2912,9 +2904,8 @@ again:
 	 * Driver is now in state NCR_CONNECTED, i.e. we
 	 * have a current command working the SCSI bus.
 	 */
-	if (sc->sc_state != NCR_CONNECTED || ecb == NULL) {
-		panic("ncr53c9x: no nexus");
-	}
+	if (sc->sc_state != NCR_CONNECTED || ecb == NULL)
+		panic("%s: no nexus", __func__);
 
 	switch (sc->sc_phase) {
 	case MESSAGE_OUT_PHASE:
@@ -2928,7 +2919,7 @@ msgin:
 		NCR_PHASE(("MESSAGE_IN_PHASE "));
 		if ((sc->sc_espintr & NCRINTR_BS) != 0) {
 			if ((sc->sc_rev != NCR_VARIANT_FAS366) ||
-			    !(sc->sc_espstat2 & NCRFAS_STAT2_EMPTY)) {
+			    (sc->sc_espstat2 & NCRFAS_STAT2_EMPTY) == 0) {
 				NCRCMD(sc, NCRCMD_FLUSH);
 			}
 			sc->sc_flags |= NCR_WAITI;
@@ -2945,11 +2936,10 @@ msgin:
 			    (sc->sc_prevphase == sc->sc_phase) ?
 			    NCR_RDFIFO_CONTINUE : NCR_RDFIFO_START);
 			ncr53c9x_msgin(sc);
-		} else {
+		} else
 			device_printf(sc->sc_dev, "MSGIN: weird bits: "
 			    "[intr %x, stat %x, step %x]\n",
 			    sc->sc_espintr, sc->sc_espstat, sc->sc_espstep);
-		}
 		sc->sc_prevphase = MESSAGE_IN_PHASE;
 		goto shortcut;	/* i.e. expect data to be ready */
 
@@ -2966,7 +2956,9 @@ msgin:
 		    ecb->cmd.cmd.opcode, ecb->clen));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1);*/
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * If we have more messages to send, e.g. WDTR or SDTR
@@ -2981,7 +2973,7 @@ msgin:
 			/* Setup DMA transfer for command. */
 			size = ecb->clen;
 			sc->sc_cmdlen = size;
-			sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+			sc->sc_cmdp = (void *)&ecb->cmd.cmd;
 			NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen,
 			    0, &size);
 			/* Program the SCSI counter. */
@@ -2994,7 +2986,8 @@ msgin:
 			NCRCMD(sc, NCRCMD_TRANS | NCRCMD_DMA);
 			NCRDMA_GO(sc);
 		} else {
-			ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
+			ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
+			    ecb->clen);
 			NCRCMD(sc, NCRCMD_TRANS);
 		}
 		sc->sc_prevphase = COMMAND_PHASE;
@@ -3175,7 +3168,7 @@ ncr53c9x_callout(void *arg)
 static void
 ncr53c9x_watch(void *arg)
 {
-	struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
+	struct ncr53c9x_softc *sc = arg;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
 	time_t old;

Modified: stable/7/sys/dev/esp/ncr53c9xreg.h
==============================================================================
--- stable/7/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:53 2011	(r226917)
+++ stable/7/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:58 2011	(r226918)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9xreg.h,v 1.14 2005/02/27 00:27:02 perry Exp $	*/
+/*	$NetBSD: ncr53c9xreg.h,v 1.16 2009/09/07 13:31:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
@@ -43,84 +43,84 @@
 #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
 
 #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
-#define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
-#define  NCRCMD_NOP	0x00		/*	No Operation		*/
-#define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
-#define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
-#define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
-#define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
-#define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
-#define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
-#define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
-#define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
-#define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
-#define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
-#define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
-#define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
-#define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
-#define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
-#define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
-#define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
-#define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
-#define  NCRCMD_DISC	0x27		/*	Disconnect		*/
-#define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
-#define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
-#define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
-#define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
-#define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
-#define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
-#define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
-#define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
-#define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
-#define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
-#define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
+#define	 NCRCMD_DMA	0x80		/*	DMA Bit			*/
+#define	 NCRCMD_NOP	0x00		/*	No Operation		*/
+#define	 NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
+#define	 NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
+#define	 NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
+#define	 NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
+#define	 NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
+#define	 NCRCMD_SELATN	0x42		/*	Select with ATN		*/
+#define	 NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
+#define	 NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
+#define	 NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
+#define	 NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
+#define	 NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
+#define	 NCRCMD_SNDMSG	0x20		/*	Send Message		*/
+#define	 NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
+#define	 NCRCMD_SNDDATA	0x22		/*	Send Data		*/
+#define	 NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
+#define	 NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
+#define	 NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
+#define	 NCRCMD_DISC	0x27		/*	Disconnect		*/
+#define	 NCRCMD_RECMSG	0x28		/*	Receive Message		*/
+#define	 NCRCMD_RECCMD	0x29		/*	Receive Command		*/
+#define	 NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
+#define	 NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
+#define	 NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
+#define	 NCRCMD_TRANS	0x10		/*	Transfer Information	*/
+#define	 NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq	*/
+#define	 NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
+#define	 NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
+#define	 NCRCMD_SETATN	0x1a		/*	Set ATN			*/
+#define	 NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
 
 #define	NCR_STAT	0x04		/* RO - Status			*/
-#define  NCRSTAT_INT	0x80		/*	Interrupt		*/
-#define  NCRSTAT_GE	0x40		/*	Gross Error		*/
-#define  NCRSTAT_PE	0x20		/*	Parity Error		*/
-#define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
-#define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
-#define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
+#define	 NCRSTAT_INT	0x80		/*	Interrupt		*/
+#define	 NCRSTAT_GE	0x40		/*	Gross Error		*/
+#define	 NCRSTAT_PE	0x20		/*	Parity Error		*/
+#define	 NCRSTAT_TC	0x10		/*	Terminal Count		*/
+#define	 NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
+#define	 NCRSTAT_PHASE	0x07		/*	Phase bits		*/
 
 #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
-#define  NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
-#define  NCR_BUSID_HMEENCID	0x10 	/*	HME encode reselection ID */
+#define	 NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
+#define	 NCR_BUSID_HMEENCID	0x10	/*	HME encode reselection ID */
 
 #define	NCR_INTR	0x05		/* RO - Interrupt		*/
-#define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
-#define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
-#define  NCRINTR_DIS	0x20		/*	Disconnect		*/
-#define  NCRINTR_BS	0x10		/*	Bus Service		*/
-#define  NCRINTR_FC	0x08		/*	Function Complete	*/
-#define  NCRINTR_RESEL	0x04		/*	Reselected		*/
-#define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
-#define  NCRINTR_SEL	0x01		/*	Selected		*/
+#define	 NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
+#define	 NCRINTR_ILL	0x40		/*	Illegal Command		*/
+#define	 NCRINTR_DIS	0x20		/*	Disconnect		*/
+#define	 NCRINTR_BS	0x10		/*	Bus Service		*/
+#define	 NCRINTR_FC	0x08		/*	Function Complete	*/
+#define	 NCRINTR_RESEL	0x04		/*	Reselected		*/
+#define	 NCRINTR_SELATN	0x02		/*	Select with ATN		*/
+#define	 NCRINTR_SEL	0x01		/*	Selected		*/
 
 #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
 
 #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
-#define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
-#define  NCRSTEP_DONE	0x04		/*	command went out	*/
+#define	 NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
+#define	 NCRSTEP_DONE	0x04		/*	command went out	*/
 
 #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
 					/*	Default 5 (53C9X)	*/
 
 #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
-#define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
-#define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
+#define	 NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
+#define	 NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
 
 #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
 					/*	0 = ASYNC		*/
 					/*	1 - 15 = SYNC bytes	*/
 
 #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
-#define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
-#define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
-#define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
-#define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
-#define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
-#define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
+#define	 NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
+#define	 NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
+#define	 NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
+#define	 NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
+#define	 NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
+#define	 NCRCFG1_BUSID	0x07		/*	Bus ID			*/
 
 #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
 					/*	0 = 35.01 - 40MHz	*/
@@ -136,24 +136,24 @@
 
 #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
 #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
-#define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
-#define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
-#define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
-#define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
-#define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
-#define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
+#define	 NCRCFG2_FE	0x40		/*	Features Enable		*/
+#define	 NCRCFG2_DREQ	0x10		/*	DREQ High Impedance	*/
+#define	 NCRCFG2_SCSI2	0x08		/*	SCSI-2 Enable		*/
+#define	 NCRCFG2_BPA	0x04		/*	Target Bad Parity Abort	*/
+#define	 NCRCFG2_RPE	0x02		/*	Register Parity Error	*/
+#define	 NCRCFG2_DPE	0x01		/*	DMA Parity Error	*/
 
-#define  NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
+#define	 NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
 #define	 NCRCFG2_HME32  0x80		/*	HME 32 extended		*/
 
 /* Config #3 only on 53C9X */
 #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
 #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
-#define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
-#define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
-#define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
-#define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
-#define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
+#define	 NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
+#define	 NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
+#define	 NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
+#define	 NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
+#define	 NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
 
 /*
  * For some unknown reason, the ESP406/FAS408 looks like every
@@ -164,35 +164,35 @@
 
 /* Config #3 different on ESP406/FAS408 */
 #define	NCR_ESPCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
 #define	 NCRESPCFG3_SRESB	0x08	/*	Save Residual Byte	*/
-#define  NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
+#define	 NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
 #define	 NCRESPCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
 #define	 NCRESPCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 also different on NCR53CF9x/FAS100A/FAS216/FAS236 */
 #define	NCR_F9XCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
-#define  NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
-#define  NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
-#define  NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
-#define  NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
+#define	 NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
+#define	 NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
+#define	 NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
+#define	 NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 on FAS366 */
-#define  NCRFASCFG3_OBAUTO    	0x80    /*	auto push odd-byte to DMA */
-#define  NCRFASCFG3_EWIDE     	0x40    /* 	Enable Wide-SCSI     */
-#define  NCRFASCFG3_IDBIT3	0x20	/* 	Bit 3 of HME SCSI-ID */
-#define	 NCRFASCFG3_IDRESCHK	0x10	/* 	ID message checking */
-#define	 NCRFASCFG3_QUENB	0x08	/* 	3-byte msg support */
-#define	 NCRFASCFG3_CDB10	0x04	/* 	group 2 scsi-2 support */
-#define	 NCRFASCFG3_FASTSCSI	0x02	/* 	10 MB/S fast scsi mode */
-#define	 NCRFASCFG3_FASTCLK	0x01	/* 	fast clock mode */
+#define	 NCRFASCFG3_OBAUTO	0x80    /*	auto push odd-byte to DMA */
+#define	 NCRFASCFG3_EWIDE	0x40    /*	Enable Wide-SCSI     */
+#define	 NCRFASCFG3_IDBIT3	0x20	/*	Bit 3 of HME SCSI-ID */
+#define	 NCRFASCFG3_IDRESCHK	0x10	/*	ID message checking */
+#define	 NCRFASCFG3_QUENB	0x08	/*	3-byte msg support */
+#define	 NCRFASCFG3_CDB10	0x04	/*	group 2 scsi-2 support */
+#define	 NCRFASCFG3_FASTSCSI	0x02	/*	10 MB/S fast scsi mode */
+#define	 NCRFASCFG3_FASTCLK	0x01	/*	fast clock mode */
 
 /* Config #4 only on ESP406/FAS408 */
 #define	NCR_CFG4	0x0d		/* RW - Configuration #4	*/
@@ -208,8 +208,8 @@
 */
 

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

From owner-svn-src-all@FreeBSD.ORG  Sat Oct 29 23:53:58 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B573D1065673;
	Sat, 29 Oct 2011 23:53:58 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A26E88FC14;
	Sat, 29 Oct 2011 23:53:58 +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 p9TNrwnY038653;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9TNrwJC038648;
	Sat, 29 Oct 2011 23:53:58 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201110292353.p9TNrwJC038648@svn.freebsd.org>
From: Marius Strobl 
Date: Sat, 29 Oct 2011 23:53:58 +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: r226919 - in stable/8/sys: dev/esp sparc64/sbus
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 29 Oct 2011 23:53:58 -0000

Author: marius
Date: Sat Oct 29 23:53:58 2011
New Revision: 226919
URL: http://svn.freebsd.org/changeset/base/226919

Log:
  MFC: r226381
  
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.

Modified:
  stable/8/sys/dev/esp/esp_sbus.c
  stable/8/sys/dev/esp/ncr53c9x.c
  stable/8/sys/dev/esp/ncr53c9xreg.h
  stable/8/sys/dev/esp/ncr53c9xvar.h
  stable/8/sys/sparc64/sbus/lsi64854.c
  stable/8/sys/sparc64/sbus/lsi64854var.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)

Modified: stable/8/sys/dev/esp/esp_sbus.c
==============================================================================
--- stable/8/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/esp_sbus.c	Sat Oct 29 23:53:58 2011	(r226919)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $	*/
+/*	$NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,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 the NetBSD
- *	Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t	esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static void	esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int	esp_dma_isintr(struct ncr53c9x_softc *sc);
 static void	esp_dma_reset(struct ncr53c9x_softc *sc);
 static int	esp_dma_intr(struct ncr53c9x_softc *sc);
-static int	esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int	esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
 		    size_t *len, int datain, size_t *dmasize);
 static void	esp_dma_go(struct ncr53c9x_softc *sc);
 static void	esp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int	espattach(struct esp_softc *e
 		    const struct ncr53c9x_glue *gluep);
 static int	espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
 	esp_read_reg,
 	esp_write_reg,
 	esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__read_regnames [] = {
+	const char *r_name;
+	int r_flag;
+} const esp__read_regnames [] = {
 	{ "TCL", 0},			/* 0/00 */
 	{ "TCM", 0},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
 	{ "TCX", 1},			/* f/3c */
 };
 
-static const struct {
-	char *r_name;
-	int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+	const char *r_name;
+	int r_flag;
+} const esp__write_regnames[] = {
 	{ "TCL", 1},			/* 0/00 */
 	{ "TCM", 1},			/* 1/04 */
 	{ "FIFO", 0},			/* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
-	u_char v;
+	uint8_t v;
 
 	v = bus_read_1(esc->sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
-	      int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+    int datain, size_t *dmasize)
 {
 	struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: stable/8/sys/dev/esp/ncr53c9x.c
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/ncr53c9x.c	Sat Oct 29 23:53:58 2011	(r226919)
@@ -26,7 +26,7 @@
  *
  */
 
-/*	$NetBSD: ncr53c9x.c,v 1.125 2007/01/09 12:53:12 itohy Exp $	*/
+/*	$NetBSD: ncr53c9x.c,v 1.143 2011/07/31 18:39:00 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
@@ -43,13 +43,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 the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -133,7 +126,7 @@ __FBSDID("$FreeBSD$");
 MODULE_DEPEND(esp, cam, 1, 1, 1);
 
 #ifdef NCR53C9X_DEBUG
-static int ncr53c9x_debug =
+int ncr53c9x_debug =
     NCR_SHOWMISC /* | NCR_SHOWPHASE | NCR_SHOWTRAC | NCR_SHOWCMDS */;
 #endif
 
@@ -167,7 +160,7 @@ static void	ncr53c9x_sched(struct ncr53c
 static void	ncr53c9x_select(struct ncr53c9x_softc *sc,
 		    struct ncr53c9x_ecb *ecb);
 static void	ncr53c9x_watch(void *arg);
-static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p,
+static void	ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p,
 		    int len);
 
 static struct ncr53c9x_ecb	*ncr53c9x_get_ecb(struct ncr53c9x_softc *sc);
@@ -187,13 +180,11 @@ static inline int	ncr53c9x_stp2cpb(struc
 		NCR_WRITE_REG((sc), NCR_TCL, (size));			\
 		NCR_WRITE_REG((sc), NCR_TCM, (size) >> 8);		\
 		if ((sc->sc_cfg2 & NCRCFG2_FE) ||			\
-		    (sc->sc_rev == NCR_VARIANT_FAS366)) {		\
+		    (sc->sc_rev == NCR_VARIANT_FAS366))			\
 			NCR_WRITE_REG((sc), NCR_TCH, (size) >> 16);	\
-		}							\
-		if (sc->sc_rev == NCR_VARIANT_FAS366) {			\
+		if (sc->sc_rev == NCR_VARIANT_FAS366)			\
 			NCR_WRITE_REG(sc, NCR_RCH, 0);			\
-		}							\
-} while (0)
+} while (/* CONSTCOND */0)
 
 #ifndef mstohz
 #define	mstohz(ms) \
@@ -551,11 +542,10 @@ ncr53c9x_reset(struct ncr53c9x_softc *sc
 		NCR_WRITE_REG(sc, NCR_AMDCFG4, sc->sc_cfg4);
 
 #if 0
-	device_printf(sc->sc_dev, "ncr53c9x_reset: revision %d\n",
-	    sc->sc_rev);
-	device_printf(sc->sc_dev, "ncr53c9x_reset: cfg1 0x%x, cfg2 0x%x, "
-	    "cfg3 0x%x, ccf 0x%x, timeout 0x%x\n",
-	    sc->sc_cfg1, sc->sc_cfg2, sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
+	device_printf(sc->sc_dev, "%s: revision %d\n", __func__, sc->sc_rev);
+	device_printf(sc->sc_dev, "%s: cfg1 0x%x, cfg2 0x%x, cfg3 0x%x, ccf "
+	    "0x%x, timeout 0x%x\n", __func__, sc->sc_cfg1, sc->sc_cfg2,
+	    sc->sc_cfg3, sc->sc_ccf, sc->sc_timeout);
 #endif
 }
 
@@ -573,7 +563,8 @@ ncr53c9x_clear(struct ncr53c9x_softc *sc
 	/* Cancel any active commands. */
 	sc->sc_state = NCR_CLEANING;
 	sc->sc_msgify = 0;
-	if ((ecb = sc->sc_nexus) != NULL) {
+	ecb = sc->sc_nexus;
+	if (ecb != NULL) {
 		ecb->ccb->ccb_h.status = result;
 		ncr53c9x_done(sc, ecb);
 	}
@@ -597,7 +588,8 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 
 	/* Cancel outstanding disconnected commands on each LUN. */
 	LIST_FOREACH(li, &sc->sc_tinfo[target].luns, link) {
-		if ((ecb = li->untagged) != NULL) {
+		ecb = li->untagged;
+		if (ecb != NULL) {
 			li->untagged = NULL;
 			/*
 			 * XXX should we terminate a command
@@ -607,12 +599,14 @@ ncr53c9x_clear_target(struct ncr53c9x_so
 			ecb->ccb->ccb_h.status = result;
 			ncr53c9x_done(sc, ecb);
 		}
-		for (i = 0; i < NCR_TAG_DEPTH; i++)
-			if ((ecb = li->queued[i])) {
+		for (i = 0; i < NCR_TAG_DEPTH; i++) {
+			ecb = li->queued[i];
+			if (ecb != NULL) {
 				li->queued[i] = NULL;
 				ecb->ccb->ccb_h.status = result;
 				ncr53c9x_done(sc, ecb);
 			}
+		}
 		li->used = 0;
 	}
 }
@@ -635,7 +629,7 @@ ncr53c9x_init(struct ncr53c9x_softc *sc,
 
 		TAILQ_INIT(&sc->ready_list);
 		sc->sc_nexus = NULL;
-		memset(sc->sc_tinfo, 0, sizeof(sc->sc_tinfo));
+		memset(sc->sc_tinfo, 0, sizeof(*sc->sc_tinfo));
 		for (r = 0; r < sc->sc_ntarg; r++) {
 			LIST_INIT(&sc->sc_tinfo[r].luns);
 		}
@@ -751,7 +745,7 @@ ncr53c9x_stp2cpb(struct ncr53c9x_softc *
 static inline void
 ncr53c9x_setsync(struct ncr53c9x_softc *sc, struct ncr53c9x_tinfo *ti)
 {
-	u_char cfg3, syncoff, synctp;
+	uint8_t cfg3, syncoff, synctp;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -810,7 +804,7 @@ static void
 ncr53c9x_select(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb)
 {
 	struct ncr53c9x_tinfo *ti;
-	u_char *cmd;
+	uint8_t *cmd;
 	size_t dmasize;
 	int clen, selatn3, selatns;
 	int lun = ecb->ccb->ccb_h.target_lun;
@@ -818,8 +812,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_select(t%d,l%d,cmd:%x,tag:%x,%x)] ",
-	    target, lun, ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
+	NCR_TRACE(("[%s(t%d,l%d,cmd:%x,tag:%x,%x)] ", __func__, target, lun,
+	    ecb->cmd.cmd.opcode, ecb->tag[0], ecb->tag[1]));
 
 	ti = &sc->sc_tinfo[target];
 	sc->sc_state = NCR_SELECTING;
@@ -838,9 +832,8 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		NCRCMD(sc, NCRCMD_FLUSH);
 		NCR_WRITE_REG(sc, NCR_SELID, target | NCR_BUSID_HMEXC32 |
 		    NCR_BUSID_HMEENCID);
-	} else {
+	} else
 		NCR_WRITE_REG(sc, NCR_SELID, target);
-	}
 
 	/*
 	 * If we are requesting sense, force a renegotiation if we are
@@ -873,7 +866,7 @@ ncr53c9x_select(struct ncr53c9x_softc *s
 		selatns = 1;
 	}
 
-	cmd = (u_char *)&ecb->cmd.cmd;
+	cmd = (uint8_t *)&ecb->cmd.cmd;
 
 	if (selatn3) {
 		/* We'll use tags with SELATN3. */
@@ -954,7 +947,7 @@ ncr53c9x_get_ecb(struct ncr53c9x_softc *
 	ecb = TAILQ_FIRST(&sc->free_list);
 	if (ecb) {
 		if (ecb->flags != 0)
-			panic("ecb flags not cleared\n");
+			panic("%s: ecb flags not cleared", __func__);
 		TAILQ_REMOVE(&sc->free_list, ecb, free_links);
 		ecb->flags = ECB_ALLOC;
 		bzero(&ecb->ccb, sizeof(struct ncr53c9x_ecb) -
@@ -990,7 +983,7 @@ ncr53c9x_action(struct cam_sim *sim, uni
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_action %d]", ccb->ccb_h.func_code));
+	NCR_TRACE(("[%s %d]", __func__, ccb->ccb_h.func_code));
 
 	switch (ccb->ccb_h.func_code) {
 	case XPT_RESET_BUS:
@@ -1196,7 +1189,7 @@ ncr53c9x_poll(struct cam_sim *sim)
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_poll] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (NCRDMA_ISINTR(sc))
 		ncr53c9x_intr1(sc);
@@ -1260,10 +1253,10 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_sched] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	if (sc->sc_state != NCR_IDLE)
-		panic("ncr53c9x_sched: not IDLE (state=%d)", sc->sc_state);
+		panic("%s: not IDLE (state=%d)", __func__, sc->sc_state);
 
 	/*
 	 * Find first ecb in ready queue that is for a target/lunit
@@ -1288,10 +1281,9 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 		li = TINFO_LUN(ti, lun);
 		if (li == NULL) {
 			/* Initialize LUN info and add to list. */
-			if ((li = malloc(sizeof(*li),
-			    M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) {
+			li = malloc(sizeof(*li), M_DEVBUF, M_NOWAIT | M_ZERO);
+			if (li == NULL)
 				continue;
-			}
 			li->lun = lun;
 
 			LIST_INSERT_HEAD(&ti->luns, li, link);
@@ -1338,7 +1330,7 @@ ncr53c9x_sched(struct ncr53c9x_softc *sc
 			ncr53c9x_select(sc, ecb);
 			break;
 		} else {
-			NCR_TRACE(("%d:%d busy\n",
+			NCR_TRACE(("[%s %d:%d busy] \n", __func__,
 			    ecb->ccb->ccb_h.target_id,
 			    ecb->ccb->ccb_h.target_lun));
 		}
@@ -1356,7 +1348,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("requesting sense "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	lun = ccb->ccb_h.target_lun;
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
@@ -1368,7 +1360,7 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ss->length = sizeof(struct scsi_sense_data);
 	ecb->clen = sizeof(*ss);
 	memset(&ccb->csio.sense_data, 0, sizeof(ccb->csio.sense_data));
-	ecb->daddr = (char *)&ccb->csio.sense_data;
+	ecb->daddr = (uint8_t *)&ccb->csio.sense_data;
 	ecb->dleft = sizeof(struct scsi_sense_data);
 	ecb->flags |= ECB_SENSE;
 	ecb->timeout = NCR_SENSE_TIMEOUT;
@@ -1379,9 +1371,9 @@ ncr53c9x_sense(struct ncr53c9x_softc *sc
 	ncr53c9x_dequeue(sc, ecb);
 	li->untagged = ecb;	/* Must be executed first to fix C/A. */
 	li->busy = 2;
-	if (ecb == sc->sc_nexus) {
+	if (ecb == sc->sc_nexus)
 		ncr53c9x_select(sc, ecb);
-	} else {
+	else {
 		TAILQ_INSERT_HEAD(&sc->ready_list, ecb, chain);
 		ecb->flags |= ECB_READY;
 		if (sc->sc_state == NCR_IDLE)
@@ -1402,7 +1394,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_done(status:%x)] ", ccb->ccb_h.status));
+	NCR_TRACE(("[%s(status:%x)] ", __func__, ccb->ccb_h.status));
 
 	ti = &sc->sc_tinfo[ccb->ccb_h.target_id];
 	lun = ccb->ccb_h.target_lun;
@@ -1457,7 +1449,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc,
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		if (ccb->csio.resid != 0)
 			printf("resid=%d ", ccb->csio.resid);
 		if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0)
@@ -1510,7 +1502,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	li = TINFO_LUN(ti, lun);
 #ifdef DIAGNOSTIC
 	if (li == NULL || li->lun != lun)
-		panic("ncr53c9x_dequeue: lun %qx for ecb %p does not exist",
+		panic("%s: lun %qx for ecb %p does not exist", __func__,
 		    (long long)lun, ecb);
 #endif
 	if (li->untagged == ecb) {
@@ -1521,9 +1513,9 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 #ifdef DIAGNOSTIC
 		if (li->queued[ecb->tag[1]] != NULL &&
 		    (li->queued[ecb->tag[1]] != ecb))
-			panic("ncr53c9x_dequeue: slot %d for lun %qx has %p "
-			    "instead of ecb %p\n", ecb->tag[1],
-			    (long long)lun, li->queued[ecb->tag[1]], ecb);
+			panic("%s: slot %d for lun %qx has %p instead of ecb "
+			    "%p", __func__, ecb->tag[1], (long long)lun,
+			    li->queued[ecb->tag[1]], ecb);
 #endif
 		li->queued[ecb->tag[1]] = NULL;
 		li->used--;
@@ -1550,7 +1542,7 @@ ncr53c9x_dequeue(struct ncr53c9x_softc *
 	NCRCMD(sc, NCRCMD_SETATN);					\
 	sc->sc_flags |= NCR_ATN;					\
 	sc->sc_msgpriq |= (m);						\
-} while (0)
+} while (/* CONSTCOND */0)
 
 static void
 ncr53c9x_flushfifo(struct ncr53c9x_softc *sc)
@@ -1558,7 +1550,7 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[flushfifo] "));
+	NCR_TRACE(("[%s] ", __func__));
 
 	NCRCMD(sc, NCRCMD_FLUSH);
 
@@ -1570,8 +1562,8 @@ ncr53c9x_flushfifo(struct ncr53c9x_softc
 static int
 ncr53c9x_rdfifo(struct ncr53c9x_softc *sc, int how)
 {
-	u_char *ibuf;
 	int i, n;
+	uint8_t *ibuf;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1586,7 +1578,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 		break;
 
 	default:
-		panic("ncr53c9x_rdfifo: bad flag");
+		panic("%s: bad flag", __func__);
 		/* NOTREACHED */
 	}
 
@@ -1611,10 +1603,9 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 
 			ncr53c9x_flushfifo(sc);
 		}
-	} else {
+	} else
 		for (i = 0; i < n; i++)
 			ibuf[i] = NCR_READ_REG(sc, NCR_FIFO);
-	}
 
 	sc->sc_imlen += i;
 
@@ -1622,7 +1613,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 #ifdef NCR53C9X_DEBUG
 	NCR_TRACE(("\n[rdfifo %s (%d):",
 	    (how == NCR_RDFIFO_START) ? "start" : "cont", (int)sc->sc_imlen));
-	if (ncr53c9x_debug & NCR_SHOWTRAC) {
+	if ((ncr53c9x_debug & NCR_SHOWTRAC) != 0) {
 		for (i = 0; i < sc->sc_imlen; i++)
 			printf(" %02x", sc->sc_imess[i]);
 		printf("]\n");
@@ -1633,7 +1624,7 @@ ncr53c9x_rdfifo(struct ncr53c9x_softc *s
 }
 
 static void
-ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, u_char *p, int len)
+ncr53c9x_wrfifo(struct ncr53c9x_softc *sc, uint8_t *p, int len)
 {
 	int i;
 
@@ -1641,7 +1632,7 @@ ncr53c9x_wrfifo(struct ncr53c9x_softc *s
 
 #ifdef NCR53C9X_DEBUG
 	NCR_MSGS(("[wrfifo(%d):", len));
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		for (i = 0; i < len; i++)
 			printf(" %02x", p[i]);
 		printf("]\n");
@@ -1663,13 +1654,13 @@ ncr53c9x_reselect(struct ncr53c9x_softc 
 	struct ncr53c9x_ecb *ecb = NULL;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char lun, selid, target;
+	uint8_t lun, selid, target;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	if (sc->sc_rev == NCR_VARIANT_FAS366) {
+	if (sc->sc_rev == NCR_VARIANT_FAS366)
 		target = sc->sc_selid;
-	} else {
+	else {
 		/*
 		 * The SCSI chip made a snapshot of the data bus
 		 * while the reselection was being negotiated.
@@ -1751,7 +1742,7 @@ abort:
 #define	MSG_IS2BYTE(m)		(((m) & 0xf0) == 0x20)
 
 static inline int
-__verify_msg_format(u_char *p, int len)
+__verify_msg_format(uint8_t *p, int len)
 {
 
 	if (len == 1 && MSG_IS1BYTE(p[0]))
@@ -1777,12 +1768,12 @@ ncr53c9x_msgin(struct ncr53c9x_softc *sc
 	struct ncr53c9x_ecb *ecb;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
-	u_char *pb;
+	uint8_t *pb;
 	int lun, plen;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgin(curmsglen:%ld)] ", (long)sc->sc_imlen));
+	NCR_TRACE(("[%s(curmsglen:%ld)] ", __func__, (long)sc->sc_imlen));
 
 	if (sc->sc_imlen == 0) {
 		device_printf(sc->sc_dev, "msgin: no msg byte available\n");
@@ -2068,19 +2059,19 @@ gotit:
 			    sc->sc_imess[0]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify,
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify,
 		    sc->sc_imess[0], sc->sc_imess[1]);
 		break;
 
 	case NCR_RESELECTED:
-		if (MSG_ISIDENTIFY(sc->sc_imess[1])) {
+		if (MSG_ISIDENTIFY(sc->sc_imess[1]))
 			sc->sc_msgify = sc->sc_imess[1];
-		} else {
+		else {
 			device_printf(sc->sc_dev, "reselect without IDENTIFY;"
 			    " MSG %x; sending DEVICE RESET\n", sc->sc_imess[1]);
 			goto reset;
 		}
-		(void) ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
+		(void)ncr53c9x_reselect(sc, sc->sc_msgify, 0, 0);
 		break;
 
 	default:
@@ -2124,8 +2115,8 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
-	NCR_TRACE(("[ncr53c9x_msgout(priq:%x, prevphase:%x)]",
-	    sc->sc_msgpriq, sc->sc_prevphase));
+	NCR_TRACE(("[%s(priq:%x, prevphase:%x)]", __func__, sc->sc_msgpriq,
+	    sc->sc_prevphase));
 
 	/*
 	 * XXX - the NCR_ATN flag is not in sync with the actual ATN
@@ -2138,7 +2129,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase != MESSAGE_OUT_PHASE) {
 		new:
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 			sc->sc_msgoutq = 0;
 			sc->sc_omlen = 0;
 		}
@@ -2146,10 +2139,9 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 		if (sc->sc_prevphase == MESSAGE_OUT_PHASE) {
 			ncr53c9x_sched_msgout(sc->sc_msgoutq);
 			goto new;
-		} else {
+		} else
 			device_printf(sc->sc_dev, "at line %d: unexpected "
 			    "MESSAGE OUT phase\n", __LINE__);
-		}
 	}
 
 	if (sc->sc_omlen == 0) {
@@ -2181,20 +2173,18 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 			break;
 
 		case SEND_IDENTIFY:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] =
 			    MSG_IDENTIFY(ecb->ccb->ccb_h.target_lun, 0);
 			break;
 
 		case SEND_TAG:
-			if (sc->sc_state != NCR_CONNECTED) {
+			if (sc->sc_state != NCR_CONNECTED)
 				device_printf(sc->sc_dev, "at line %d: no "
 				    "nexus\n", __LINE__);
-			}
 			ecb = sc->sc_nexus;
 			sc->sc_omess[0] = ecb->tag[0];
 			sc->sc_omess[1] = ecb->tag[1];
@@ -2249,7 +2239,7 @@ ncr53c9x_msgout(struct ncr53c9x_softc *s
 	}
 
 #ifdef NCR53C9X_DEBUG
-	if (ncr53c9x_debug & NCR_SHOWMSGS) {
+	if ((ncr53c9x_debug & NCR_SHOWMSGS) != 0) {
 		NCR_MSGS(("sc_omlen; i++)
 			NCR_MSGS((" %02x", sc->sc_omess[i]));
@@ -2310,7 +2300,7 @@ ncr53c9x_intr1(struct ncr53c9x_softc *sc
 	struct timeval cur, wait;
 	size_t size;
 	int i, nfifo;
-	u_char msg;
+	uint8_t msg;
 
 	NCR_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -2385,7 +2375,7 @@ again:
 				 * while we were trying to select
 				 * another target.
 				 */
-#ifdef DEBUG
+#ifdef NCR53C9X_DEBUG
 				device_printf(sc->sc_dev, "ESP100 work-around "
 				    "activated\n");
 #endif
@@ -2492,7 +2482,9 @@ again:
 		    sc->sc_espintr,sc->sc_espstat,sc->sc_espstep));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1); */
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * This command must (apparently) be issued within
@@ -2734,7 +2726,7 @@ again:
 				if (sc->sc_state == NCR_IDLE &&
 				    sc->sc_espstep == 0)
 					return;
-				panic("ncr53c9x: no nexus");
+				panic("%s: no nexus", __func__);
 			}
 
 			ti = &sc->sc_tinfo[ecb->ccb->ccb_h.target_id];
@@ -2812,8 +2804,8 @@ again:
 					if (sc->sc_cmdlen == 0)
 						/* Hope for the best... */
 						break;
-				} else if ((NCR_READ_REG(sc, NCR_FFLAG)
-				    & NCRFIFO_FF) == 0) {
+				} else if ((NCR_READ_REG(sc, NCR_FFLAG) &
+				    NCRFIFO_FF) == 0) {
 					/* Hope for the best... */
 					break;
 				}
@@ -2872,7 +2864,7 @@ again:
 			/* "Initiate Command Complete Steps" in progress */
 			sc->sc_flags &= ~NCR_ICCS;
 
-			if (!(sc->sc_espintr & NCRINTR_DONE)) {
+			if ((sc->sc_espintr & NCRINTR_DONE) == 0) {
 				device_printf(sc->sc_dev, "ICCS: "
 				    ": [intr %x, stat %x, step %x]\n",
 				    sc->sc_espintr, sc->sc_espstat,
@@ -2912,9 +2904,8 @@ again:
 	 * Driver is now in state NCR_CONNECTED, i.e. we
 	 * have a current command working the SCSI bus.
 	 */
-	if (sc->sc_state != NCR_CONNECTED || ecb == NULL) {
-		panic("ncr53c9x: no nexus");
-	}
+	if (sc->sc_state != NCR_CONNECTED || ecb == NULL)
+		panic("%s: no nexus", __func__);
 
 	switch (sc->sc_phase) {
 	case MESSAGE_OUT_PHASE:
@@ -2928,7 +2919,7 @@ msgin:
 		NCR_PHASE(("MESSAGE_IN_PHASE "));
 		if ((sc->sc_espintr & NCRINTR_BS) != 0) {
 			if ((sc->sc_rev != NCR_VARIANT_FAS366) ||
-			    !(sc->sc_espstat2 & NCRFAS_STAT2_EMPTY)) {
+			    (sc->sc_espstat2 & NCRFAS_STAT2_EMPTY) == 0) {
 				NCRCMD(sc, NCRCMD_FLUSH);
 			}
 			sc->sc_flags |= NCR_WAITI;
@@ -2945,11 +2936,10 @@ msgin:
 			    (sc->sc_prevphase == sc->sc_phase) ?
 			    NCR_RDFIFO_CONTINUE : NCR_RDFIFO_START);
 			ncr53c9x_msgin(sc);
-		} else {
+		} else
 			device_printf(sc->sc_dev, "MSGIN: weird bits: "
 			    "[intr %x, stat %x, step %x]\n",
 			    sc->sc_espintr, sc->sc_espstat, sc->sc_espstep);
-		}
 		sc->sc_prevphase = MESSAGE_IN_PHASE;
 		goto shortcut;	/* i.e. expect data to be ready */
 
@@ -2966,7 +2956,9 @@ msgin:
 		    ecb->cmd.cmd.opcode, ecb->clen));
 		if (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF) {
 			NCRCMD(sc, NCRCMD_FLUSH);
-/*			DELAY(1);*/
+#if 0
+			DELAY(1);
+#endif
 		}
 		/*
 		 * If we have more messages to send, e.g. WDTR or SDTR
@@ -2981,7 +2973,7 @@ msgin:
 			/* Setup DMA transfer for command. */
 			size = ecb->clen;
 			sc->sc_cmdlen = size;
-			sc->sc_cmdp = (caddr_t)&ecb->cmd.cmd;
+			sc->sc_cmdp = (void *)&ecb->cmd.cmd;
 			NCRDMA_SETUP(sc, &sc->sc_cmdp, &sc->sc_cmdlen,
 			    0, &size);
 			/* Program the SCSI counter. */
@@ -2994,7 +2986,8 @@ msgin:
 			NCRCMD(sc, NCRCMD_TRANS | NCRCMD_DMA);
 			NCRDMA_GO(sc);
 		} else {
-			ncr53c9x_wrfifo(sc, (u_char *)&ecb->cmd.cmd, ecb->clen);
+			ncr53c9x_wrfifo(sc, (uint8_t *)&ecb->cmd.cmd,
+			    ecb->clen);
 			NCRCMD(sc, NCRCMD_TRANS);
 		}
 		sc->sc_prevphase = COMMAND_PHASE;
@@ -3175,7 +3168,7 @@ ncr53c9x_callout(void *arg)
 static void
 ncr53c9x_watch(void *arg)
 {
-	struct ncr53c9x_softc *sc = (struct ncr53c9x_softc *)arg;
+	struct ncr53c9x_softc *sc = arg;
 	struct ncr53c9x_linfo *li;
 	struct ncr53c9x_tinfo *ti;
 	time_t old;

Modified: stable/8/sys/dev/esp/ncr53c9xreg.h
==============================================================================
--- stable/8/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:58 2011	(r226918)
+++ stable/8/sys/dev/esp/ncr53c9xreg.h	Sat Oct 29 23:53:58 2011	(r226919)
@@ -1,4 +1,4 @@
-/*	$NetBSD: ncr53c9xreg.h,v 1.14 2005/02/27 00:27:02 perry Exp $	*/
+/*	$NetBSD: ncr53c9xreg.h,v 1.16 2009/09/07 13:31:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994 Peter Galbavy.  All rights reserved.
@@ -43,84 +43,84 @@
 #define	NCR_FIFO	0x02		/* RW - FIFO data		*/
 
 #define	NCR_CMD		0x03		/* RW - Command (2 deep)	*/
-#define  NCRCMD_DMA	0x80		/*	DMA Bit			*/
-#define  NCRCMD_NOP	0x00		/*	No Operation		*/
-#define  NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
-#define  NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
-#define  NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
-#define  NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
-#define  NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
-#define  NCRCMD_SELATN	0x42		/*	Select with ATN		*/
-#define  NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
-#define  NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
-#define  NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
-#define  NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
-#define  NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
-#define  NCRCMD_SNDMSG	0x20		/*	Send Message		*/
-#define  NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
-#define  NCRCMD_SNDDATA	0x22		/*	Send Data		*/
-#define  NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
-#define  NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
-#define  NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
-#define  NCRCMD_DISC	0x27		/*	Disconnect		*/
-#define  NCRCMD_RECMSG	0x28		/*	Receive Message		*/
-#define  NCRCMD_RECCMD	0x29		/*	Receive Command 	*/
-#define  NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
-#define  NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
-#define  NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
-#define  NCRCMD_TRANS	0x10		/*	Transfer Information	*/
-#define  NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq 	*/
-#define  NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
-#define  NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
-#define  NCRCMD_SETATN	0x1a		/*	Set ATN			*/
-#define  NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
+#define	 NCRCMD_DMA	0x80		/*	DMA Bit			*/
+#define	 NCRCMD_NOP	0x00		/*	No Operation		*/
+#define	 NCRCMD_FLUSH	0x01		/*	Flush FIFO		*/
+#define	 NCRCMD_RSTCHIP	0x02		/*	Reset Chip		*/
+#define	 NCRCMD_RSTSCSI	0x03		/*	Reset SCSI Bus		*/
+#define	 NCRCMD_RESEL	0x40		/*	Reselect Sequence	*/
+#define	 NCRCMD_SELNATN	0x41		/*	Select without ATN	*/
+#define	 NCRCMD_SELATN	0x42		/*	Select with ATN		*/
+#define	 NCRCMD_SELATNS	0x43		/*	Select with ATN & Stop	*/
+#define	 NCRCMD_ENSEL	0x44		/*	Enable (Re)Selection	*/
+#define	 NCRCMD_DISSEL	0x45		/*	Disable (Re)Selection	*/
+#define	 NCRCMD_SELATN3	0x46		/*	Select with ATN3	*/
+#define	 NCRCMD_RESEL3	0x47		/*	Reselect3 Sequence	*/
+#define	 NCRCMD_SNDMSG	0x20		/*	Send Message		*/
+#define	 NCRCMD_SNDSTAT	0x21		/*	Send Status		*/
+#define	 NCRCMD_SNDDATA	0x22		/*	Send Data		*/
+#define	 NCRCMD_DISCSEQ	0x23		/*	Disconnect Sequence	*/
+#define	 NCRCMD_TERMSEQ	0x24		/*	Terminate Sequence	*/
+#define	 NCRCMD_TCCS	0x25		/*	Target Command Comp Seq	*/
+#define	 NCRCMD_DISC	0x27		/*	Disconnect		*/
+#define	 NCRCMD_RECMSG	0x28		/*	Receive Message		*/
+#define	 NCRCMD_RECCMD	0x29		/*	Receive Command		*/
+#define	 NCRCMD_RECDATA	0x2a		/*	Receive Data		*/
+#define	 NCRCMD_RECCSEQ	0x2b		/*	Receive Command Sequence*/
+#define	 NCRCMD_ABORT	0x04		/*	Target Abort DMA	*/
+#define	 NCRCMD_TRANS	0x10		/*	Transfer Information	*/
+#define	 NCRCMD_ICCS	0x11		/*	Initiator Cmd Comp Seq	*/
+#define	 NCRCMD_MSGOK	0x12		/*	Message Accepted	*/
+#define	 NCRCMD_TRPAD	0x18		/*	Transfer Pad		*/
+#define	 NCRCMD_SETATN	0x1a		/*	Set ATN			*/
+#define	 NCRCMD_RSTATN	0x1b		/*	Reset ATN		*/
 
 #define	NCR_STAT	0x04		/* RO - Status			*/
-#define  NCRSTAT_INT	0x80		/*	Interrupt		*/
-#define  NCRSTAT_GE	0x40		/*	Gross Error		*/
-#define  NCRSTAT_PE	0x20		/*	Parity Error		*/
-#define  NCRSTAT_TC	0x10		/*	Terminal Count		*/
-#define  NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
-#define  NCRSTAT_PHASE	0x07		/*	Phase bits		*/
+#define	 NCRSTAT_INT	0x80		/*	Interrupt		*/
+#define	 NCRSTAT_GE	0x40		/*	Gross Error		*/
+#define	 NCRSTAT_PE	0x20		/*	Parity Error		*/
+#define	 NCRSTAT_TC	0x10		/*	Terminal Count		*/
+#define	 NCRSTAT_VGC	0x08		/*	Valid Group Code	*/
+#define	 NCRSTAT_PHASE	0x07		/*	Phase bits		*/
 
 #define	NCR_SELID	0x04		/* WO - Select/Reselect Bus ID	*/
-#define  NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
-#define  NCR_BUSID_HMEENCID	0x10 	/*	HME encode reselection ID */
+#define	 NCR_BUSID_HMEXC32	0x40	/*	HME xfer counter is 32bit */
+#define	 NCR_BUSID_HMEENCID	0x10	/*	HME encode reselection ID */
 
 #define	NCR_INTR	0x05		/* RO - Interrupt		*/
-#define  NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
-#define  NCRINTR_ILL	0x40		/*	Illegal Command		*/
-#define  NCRINTR_DIS	0x20		/*	Disconnect		*/
-#define  NCRINTR_BS	0x10		/*	Bus Service		*/
-#define  NCRINTR_FC	0x08		/*	Function Complete	*/
-#define  NCRINTR_RESEL	0x04		/*	Reselected		*/
-#define  NCRINTR_SELATN	0x02		/*	Select with ATN		*/
-#define  NCRINTR_SEL	0x01		/*	Selected		*/
+#define	 NCRINTR_SBR	0x80		/*	SCSI Bus Reset		*/
+#define	 NCRINTR_ILL	0x40		/*	Illegal Command		*/
+#define	 NCRINTR_DIS	0x20		/*	Disconnect		*/
+#define	 NCRINTR_BS	0x10		/*	Bus Service		*/
+#define	 NCRINTR_FC	0x08		/*	Function Complete	*/
+#define	 NCRINTR_RESEL	0x04		/*	Reselected		*/
+#define	 NCRINTR_SELATN	0x02		/*	Select with ATN		*/
+#define	 NCRINTR_SEL	0x01		/*	Selected		*/
 
 #define	NCR_TIMEOUT	0x05		/* WO - Select/Reselect Timeout */
 
 #define	NCR_STEP	0x06		/* RO - Sequence Step		*/
-#define  NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
-#define  NCRSTEP_DONE	0x04		/*	command went out	*/
+#define	 NCRSTEP_MASK	0x07		/*	the last 3 bits		*/
+#define	 NCRSTEP_DONE	0x04		/*	command went out	*/
 
 #define	NCR_SYNCTP	0x06		/* WO - Synch Transfer Period	*/
 					/*	Default 5 (53C9X)	*/
 
 #define	NCR_FFLAG	0x07		/* RO - FIFO Flags		*/
-#define  NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
-#define  NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
+#define	 NCRFIFO_SS	0xe0		/*	Sequence Step (Dup)	*/
+#define	 NCRFIFO_FF	0x1f		/*	Bytes in FIFO		*/
 
 #define	NCR_SYNCOFF	0x07		/* WO - Synch Offset		*/
 					/*	0 = ASYNC		*/
 					/*	1 - 15 = SYNC bytes	*/
 
 #define	NCR_CFG1	0x08		/* RW - Configuration #1	*/
-#define  NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
-#define  NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
-#define  NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
-#define  NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
-#define  NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
-#define  NCRCFG1_BUSID	0x07		/*	Bus ID			*/
+#define	 NCRCFG1_SLOW	0x80		/*	Slow Cable Mode		*/
+#define	 NCRCFG1_SRR	0x40		/*	SCSI Reset Rep Int Dis	*/
+#define	 NCRCFG1_PTEST	0x20		/*	Parity Test Mod		*/
+#define	 NCRCFG1_PARENB	0x10		/*	Enable Parity Check	*/
+#define	 NCRCFG1_CTEST	0x08		/*	Enable Chip Test	*/
+#define	 NCRCFG1_BUSID	0x07		/*	Bus ID			*/
 
 #define	NCR_CCF		0x09		/* WO -	Clock Conversion Factor	*/
 					/*	0 = 35.01 - 40MHz	*/
@@ -136,24 +136,24 @@
 
 #define	NCR_CFG2	0x0b		/* RW - Configuration #2	*/
 #define	 NCRCFG2_RSVD	0xa0		/*	reserved		*/
-#define  NCRCFG2_FE	0x40		/* 	Features Enable		*/
-#define  NCRCFG2_DREQ	0x10		/* 	DREQ High Impedance	*/
-#define  NCRCFG2_SCSI2	0x08		/* 	SCSI-2 Enable		*/
-#define  NCRCFG2_BPA	0x04		/* 	Target Bad Parity Abort	*/
-#define  NCRCFG2_RPE	0x02		/* 	Register Parity Error	*/
-#define  NCRCFG2_DPE	0x01		/* 	DMA Parity Error	*/
+#define	 NCRCFG2_FE	0x40		/*	Features Enable		*/
+#define	 NCRCFG2_DREQ	0x10		/*	DREQ High Impedance	*/
+#define	 NCRCFG2_SCSI2	0x08		/*	SCSI-2 Enable		*/
+#define	 NCRCFG2_BPA	0x04		/*	Target Bad Parity Abort	*/
+#define	 NCRCFG2_RPE	0x02		/*	Register Parity Error	*/
+#define	 NCRCFG2_DPE	0x01		/*	DMA Parity Error	*/
 
-#define  NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
+#define	 NCRCFG2_HMEFE	0x10		/*	HME feature enable	*/
 #define	 NCRCFG2_HME32  0x80		/*	HME 32 extended		*/
 
 /* Config #3 only on 53C9X */
 #define	NCR_CFG3	0x0c		/* RW - Configuration #3	*/
 #define	 NCRCFG3_RSVD	0xe0		/*	reserved		*/
-#define  NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
-#define  NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
-#define  NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
-#define  NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
-#define  NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
+#define	 NCRCFG3_IDM	0x10		/*	ID Message Res Check	*/
+#define	 NCRCFG3_QTE	0x08		/*	Queue Tag Enable	*/
+#define	 NCRCFG3_CDB	0x04		/*	CDB 10-bytes OK		*/
+#define	 NCRCFG3_FSCSI	0x02		/*	Fast SCSI		*/
+#define	 NCRCFG3_FCLK	0x01		/*	Fast Clock (>25MHz)	*/
 
 /*
  * For some unknown reason, the ESP406/FAS408 looks like every
@@ -164,35 +164,35 @@
 
 /* Config #3 different on ESP406/FAS408 */
 #define	NCR_ESPCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRESPCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRESPCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRESPCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRESPCFG3_FSCSI	0x10	/*	Fast SCSI		*/
 #define	 NCRESPCFG3_SRESB	0x08	/*	Save Residual Byte	*/
-#define  NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
+#define	 NCRESPCFG3_FCLK	0x04	/*	Fast Clock (>25MHz)	*/
 #define	 NCRESPCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
 #define	 NCRESPCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 also different on NCR53CF9x/FAS100A/FAS216/FAS236 */
 #define	NCR_F9XCFG3		0x0c	/* RW - Configuration #3	*/
-#define  NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
-#define  NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
-#define  NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
-#define  NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
-#define  NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
-#define  NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
-#define  NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
-#define  NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
+#define	 NCRF9XCFG3_IDM		0x80	/*	ID Message Res Check	*/
+#define	 NCRF9XCFG3_QTE		0x40	/*	Queue Tag Enable	*/
+#define	 NCRF9XCFG3_CDB		0x20	/*	CDB 10-bytes OK		*/
+#define	 NCRF9XCFG3_FSCSI	0x10	/*	Fast SCSI		*/
+#define	 NCRF9XCFG3_FCLK	0x08	/*	Fast Clock (>25MHz)	*/
+#define	 NCRF9XCFG3_SRESB	0x04	/*	Save Residual Byte	*/
+#define	 NCRF9XCFG3_ADMA	0x02	/*	Alternate DMA Mode	*/
+#define	 NCRF9XCFG3_T8M		0x01	/*	Threshold 8 Mode	*/
 
 /* Config #3 on FAS366 */
-#define  NCRFASCFG3_OBAUTO    	0x80    /*	auto push odd-byte to DMA */
-#define  NCRFASCFG3_EWIDE     	0x40    /* 	Enable Wide-SCSI     */
-#define  NCRFASCFG3_IDBIT3	0x20	/* 	Bit 3 of HME SCSI-ID */
-#define	 NCRFASCFG3_IDRESCHK	0x10	/* 	ID message checking */
-#define	 NCRFASCFG3_QUENB	0x08	/* 	3-byte msg support */
-#define	 NCRFASCFG3_CDB10	0x04	/* 	group 2 scsi-2 support */
-#define	 NCRFASCFG3_FASTSCSI	0x02	/* 	10 MB/S fast scsi mode */
-#define	 NCRFASCFG3_FASTCLK	0x01	/* 	fast clock mode */
+#define	 NCRFASCFG3_OBAUTO	0x80    /*	auto push odd-byte to DMA */
+#define	 NCRFASCFG3_EWIDE	0x40    /*	Enable Wide-SCSI     */
+#define	 NCRFASCFG3_IDBIT3	0x20	/*	Bit 3 of HME SCSI-ID */
+#define	 NCRFASCFG3_IDRESCHK	0x10	/*	ID message checking */
+#define	 NCRFASCFG3_QUENB	0x08	/*	3-byte msg support */
+#define	 NCRFASCFG3_CDB10	0x04	/*	group 2 scsi-2 support */
+#define	 NCRFASCFG3_FASTSCSI	0x02	/*	10 MB/S fast scsi mode */
+#define	 NCRFASCFG3_FASTCLK	0x01	/*	fast clock mode */
 
 /* Config #4 only on ESP406/FAS408 */
 #define	NCR_CFG4	0x0d		/* RW - Configuration #4	*/
@@ -208,8 +208,8 @@
 */
 

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