From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 00:06: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 CB900106564A; Sun, 24 Apr 2011 00:06:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B31038FC08; Sun, 24 Apr 2011 00:06: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 p3O06ugx009041; Sun, 24 Apr 2011 00:06:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O06uBT009037; Sun, 24 Apr 2011 00:06:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104240006.p3O06uBT009037@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 00:06: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: r220980 - in head: . usr.sbin/mountd usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 00:06:56 -0000 Author: rmacklem Date: Sun Apr 24 00:06:56 2011 New Revision: 220980 URL: http://svn.freebsd.org/changeset/base/220980 Log: This patch changes the default NFS server to the new one, which was referred to as the experimental server. It also adds a new command line option "-o" to both mountd and nfsd that forces them to use the old/regular NFS server. The "-e" option for these commands is now a no-op, since the new server is the default. I will be committing rc script and man changes soon. Discussed on freebsd-fs@. Modified: head/UPDATING head/usr.sbin/mountd/mountd.c head/usr.sbin/nfsd/nfsd.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Apr 23 23:11:44 2011 (r220979) +++ head/UPDATING Sun Apr 24 00:06:56 2011 (r220980) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110423: + The default NFS server has been changed to the new server, which + was referred to as the experimental server. If you need to switch + back to the old NFS server, you must now put the "-o" option on + both the mountd and nfsd commands. This can be done using the + mountd_flags and nfs_server_flags rc.conf variables until an + update to the rc scripts is committed, which is coming soon. + 20110418: The GNU Objective-C runtime library (libobjc), and other Objective-C related components have been removed from the base system. If you Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Sat Apr 23 23:11:44 2011 (r220979) +++ head/usr.sbin/mountd/mountd.c Sun Apr 24 00:06:56 2011 (r220980) @@ -239,7 +239,7 @@ static int have_v6 = 1; int v4root_phase = 0; char v4root_dirpath[PATH_MAX + 1]; -int run_v4server = 0; +int run_v4server = 1; int has_publicfh = 0; struct pidfh *pfh = NULL; @@ -296,13 +296,13 @@ main(int argc, char **argv) else close(s); - while ((c = getopt(argc, argv, "2deh:lnp:r")) != -1) + while ((c = getopt(argc, argv, "2deh:lnop:r")) != -1) switch (c) { case '2': force_v2 = 1; break; case 'e': - run_v4server = 1; + /* now a no-op, since this is the default */ break; case 'n': resvport_only = 0; @@ -316,6 +316,9 @@ main(int argc, char **argv) case 'l': dolog = 1; break; + case 'o': + run_v4server = 0; + break; case 'p': endptr = NULL; svcport = (in_port_t)strtoul(optarg, &endptr, 10); @@ -350,9 +353,8 @@ main(int argc, char **argv) }; /* - * If the "-e" option was specified OR only the nfsd module is - * found in the server, run "nfsd". - * Otherwise, try and run "nfsserver". + * Unless the "-o" option was specified, try and run "nfsd". + * If "-o" was specified, try and run "nfsserver". */ if (run_v4server > 0) { if (modfind("nfsd") < 0) { @@ -360,8 +362,6 @@ main(int argc, char **argv) if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } - } else if (modfind("nfsserver") < 0 && modfind("nfsd") >= 0) { - run_v4server = 1; } else if (modfind("nfsserver") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Sat Apr 23 23:11:44 2011 (r220979) +++ head/usr.sbin/nfsd/nfsd.c Sun Apr 24 00:06:56 2011 (r220980) @@ -88,7 +88,7 @@ int debug = 0; pid_t children[MAXNFSDCNT]; /* PIDs of children */ int nfsdcnt; /* number of children */ int new_syscall; -int run_v4server = 0; /* Force running of nfsv4 server */ +int run_v4server = 1; /* Force running of nfsv4 server */ int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */ int stablefd = -1; /* Fd for the stable restart file */ int backupfd; /* Fd for the backup stable restart file */ @@ -152,8 +152,8 @@ main(int argc, char **argv) nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = maxsock = 0; bindanyflag = udpflag = connect_type_cnt = bindhostc = 0; -#define GETOPT "ah:n:rdtue" -#define USAGE "[-ardtue] [-n num_servers] [-h bindip]" +#define GETOPT "ah:n:rdtueo" +#define USAGE "[-ardtueo] [-n num_servers] [-h bindip]" while ((ch = getopt(argc, argv, GETOPT)) != -1) switch (ch) { case 'a': @@ -189,7 +189,10 @@ main(int argc, char **argv) udpflag = 1; break; case 'e': - run_v4server = 1; + /* now a no-op, since this is the default */ + break; + case 'o': + run_v4server = 0; break; default: case '?': @@ -216,9 +219,8 @@ main(int argc, char **argv) } /* - * If the "-e" option was specified OR only the nfsd module is - * found in the server, run "nfsd". - * Otherwise, try and run "nfsserver". + * Unless the "-o" option was specified, try and run "nfsd". + * If "-o" was specified, try and run "nfsserver". */ if (run_v4server > 0) { if (modfind("nfsd") < 0) { @@ -226,8 +228,6 @@ main(int argc, char **argv) if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } - } else if (modfind("nfsserver") < 0 && modfind("nfsd") >= 0) { - run_v4server = 1; } else if (modfind("nfsserver") < 0) { /* Not present in kernel, try loading it */ if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 01: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 9B90D106564A; Sun, 24 Apr 2011 01:11:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 791F18FC08; Sun, 24 Apr 2011 01: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 p3O1BSl3010960; Sun, 24 Apr 2011 01:11:28 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O1BSZv010957; Sun, 24 Apr 2011 01:11:28 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104240111.p3O1BSZv010957@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 01: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: r220981 - in head/usr.sbin: mountd nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 01:11:28 -0000 Author: rmacklem Date: Sun Apr 24 01:11:28 2011 New Revision: 220981 URL: http://svn.freebsd.org/changeset/base/220981 Log: Patch the mountd and nfsd man pages to reflect the recent changes done by r220980 to deprecate the -e option and add the -o option. This is a content change for both man pages. Modified: head/usr.sbin/mountd/mountd.8 head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/mountd/mountd.8 ============================================================================== --- head/usr.sbin/mountd/mountd.8 Sun Apr 24 00:06:56 2011 (r220980) +++ head/usr.sbin/mountd/mountd.8 Sun Apr 24 01:11:28 2011 (r220981) @@ -28,7 +28,7 @@ .\" @(#)mountd.8 8.4 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 20, 2007 +.Dd April 23, 2011 .Dt MOUNTD 8 .Os .Sh NAME @@ -38,7 +38,7 @@ mount requests .Sh SYNOPSIS .Nm -.Op Fl 2delnr +.Op Fl 2delnor .Op Fl h Ar bindip .Op Fl p Ar port .Op Ar exportsfile ... @@ -69,17 +69,8 @@ Output debugging information. will not detach from the controlling terminal and will print debugging messages to stderr. .It Fl e -Forces -.Nm -to try and start the experimental server that includes NFSv4 support in it. -If this flag isn't specified, the experimental server will only be started -if it is linked into the kernel and the regular one isn't. -.br -ie. The kernel is built with the following: -.Bd -literal -offset indent -compact -# options NFSSERVER -options NFSD -.Ed +The new NFS server that includes NFSv4 support is now the default, so this +option is now a no-op and should be considered deprecated. .It Fl h Ar bindip Specify specific IP addresses to bind to for TCP and UDP requests. This option may be specified multiple times. @@ -107,6 +98,9 @@ This should only be specified if there a that require it. It will automatically clear the vfs.nfsrv.nfs_privport sysctl flag, which controls if the kernel will accept NFS requests from reserved ports only. +.It Fl o +This flag forces the system to run the old NFS server, which does not +have NFSv4 support in it. .It Fl p Ar port Force .Nm Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Sun Apr 24 00:06:56 2011 (r220980) +++ head/usr.sbin/nfsd/nfsd.8 Sun Apr 24 01:11:28 2011 (r220981) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd April 19, 2011 +.Dd April 23, 2011 .Dt NFSD 8 .Os .Sh NAME @@ -38,7 +38,7 @@ server .Sh SYNOPSIS .Nm -.Op Fl ardute +.Op Fl arduteo .Op Fl n Ar num_servers .Op Fl h Ar bindip .Sh DESCRIPTION @@ -101,17 +101,11 @@ Serve .Tn UDP NFS clients. .It Fl e -Forces -.Nm -to try and start the experimental server that includes NFSv4 support in it. -If this flag isn't specified, the experimental server will only be started -if it is linked into the kernel and the regular one isn't. -.br -ie. The kernel is built with the following: -.Bd -literal -offset indent -compact -# options NFSSERVER -options NFSD -.Ed +The new NFS server that includes NFSv4 support is now the default, so this +option is now a no-op and should be considered deprecated. +.It Fl o +Forces the use of the old NFS server that does not include NFSv4 support +in it. .El .Pp For example, From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 01:44: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 D5A50106566C; Sun, 24 Apr 2011 01:44:22 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 272EE8FC16; Sun, 24 Apr 2011 01:44:21 +0000 (UTC) Received: by wyf23 with SMTP id 23so1366542wyf.13 for ; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.62.74 with SMTP id x52mr1544178wec.45.1303609460458; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.216.181.144 with HTTP; Sat, 23 Apr 2011 18:44:20 -0700 (PDT) In-Reply-To: <201104240006.p3O06uBT009037@svn.freebsd.org> References: <201104240006.p3O06uBT009037@svn.freebsd.org> Date: Sun, 24 Apr 2011 13:44:20 +1200 X-Google-Sender-Auth: p0BE1UJDtEvFoJFYrpEl0T9KhwU Message-ID: From: Andrew Thompson To: Rick Macklem 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: r220980 - in head: . usr.sbin/mountd usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 01:44:22 -0000 On 24 April 2011 12:06, Rick Macklem wrote: > Author: rmacklem > Date: Sun Apr 24 00:06:56 2011 > New Revision: 220980 > URL: http://svn.freebsd.org/changeset/base/220980 > > Log: > =A0This patch changes the default NFS server to the new one, which was > =A0referred to as the experimental server. It also adds a new command > =A0line option "-o" to both mountd and nfsd that forces them to use the > =A0old/regular NFS server. The "-e" option for these commands is now > =A0a no-op, since the new server is the default. I will be committing rc > =A0script and man changes soon. Discussed on freebsd-fs@. Congratulations. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 08:58: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 D5341106564A; Sun, 24 Apr 2011 08:58:58 +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 BFF1B8FC08; Sun, 24 Apr 2011 08:58: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 p3O8wwuG024655; Sun, 24 Apr 2011 08:58:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O8wwqT024628; Sun, 24 Apr 2011 08:58:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104240858.p3O8wwqT024628@svn.freebsd.org> From: Alexander Motin Date: Sun, 24 Apr 2011 08:58: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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 08:58:58 -0000 Author: mav Date: Sun Apr 24 08:58:58 2011 New Revision: 220982 URL: http://svn.freebsd.org/changeset/base/220982 Log: Switch the GENERIC kernels for all architectures to the new CAM-based ATA stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX. Modified: head/UPDATING head/sys/amd64/conf/GENERIC head/sys/arm/conf/AVILA head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CRB head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/EP80219 head/sys/arm/conf/IQ31244 head/sys/arm/conf/TS7800 head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/ia64/conf/GENERIC head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/mips/malta/std.malta head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/sparc64/conf/GENERIC head/sys/sun4v/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Apr 24 01:11:28 2011 (r220981) +++ head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) @@ -22,6 +22,34 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20110424: + The GENERIC kernels for all architectures now default to the new + CAM-based ATA stack. It means that all legacy ATA drivers were + removed and replaced by respective CAM drivers. If you are using + ATA device names in /etc/fstab or other places, make sure to update + them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, + where 'Y's are the sequential numbers for each type in order of + detection, unless configured otherwise with tunables, see cam(4)). + + ataraid(4) functionality is now supported by the RAID GEOM class. + To use it you can load geom_raid kernel module and use graid(8) tool + for management. Instead of /dev/arX device names, use /dev/raid/rX. + + No kernel config options or code have been removed, so if a problem + arises, please report it and optionally revert to the old ATA stack. + In order to do it you can remove from the kernel config: + options ATA_CAM + device ahci + device mvs + device siis + , and instead add back: + device atadisk # ATA disk drives + device ataraid # ATA RAID drives + device atapicd # ATAPI CDROM drives + device atapifd # ATAPI floppy drives + device atapist # ATAPI tape drives + options ATA_STATIC_ID # Static device numbering + 20110423: The default NFS server has been changed to the new server, which was referred to as the experimental server. If you need to switch Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/amd64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -89,14 +89,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -120,13 +118,13 @@ device adw # Advansys wide SCSI adapte device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/AVILA Sun Apr 24 08:58:58 2011 (r220982) @@ -92,8 +92,8 @@ device gpioled device avila_gpio # GPIO pins on J8 device ata -device atadisk # ATA disk drives device avila_ata # Gateworks CF/IDE support +options ATA_CAM device npe # Network Processing Engine device npe_fw @@ -149,8 +149,9 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/CAMBRIA Sun Apr 24 08:58:58 2011 (r220982) @@ -95,8 +95,8 @@ device gpioled device cambria_gpio # GPIO pins on J11 device ata -device atadisk # ATA disk drives device avila_ata # Gateworks CF/IDE support +options ATA_CAM device npe # Network Processing Engine device npe_fw @@ -154,8 +154,9 @@ options USB_EHCI_BIG_ENDIAN_DESC # hand #options USB_DEBUG device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) #device ural #device zyd Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/CRB Sun Apr 24 08:58:58 2011 (r220982) @@ -73,12 +73,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) device "7seg" Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-78XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -81,8 +81,7 @@ device iicbus device ds133x # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-88F5XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -83,8 +83,7 @@ device pass device da # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/DB-88F6XXX Sun Apr 24 08:58:58 2011 (r220982) @@ -80,8 +80,7 @@ device iic device iicbus # SATA -device ata -device atadisk +device mvs # Flattened Device Tree options FDT Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/EP80219 Sun Apr 24 08:58:58 2011 (r220982) @@ -73,12 +73,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # SCSI Controllers @@ -111,4 +111,4 @@ options INCLUDE_CONFIG_FILE # Inclu options VERBOSE_INIT_ARM device bpf -#options ROOTDEVNAME=\"ufs:ad4s1a\" +#options ROOTDEVNAME=\"ufs:ada0s1a\" Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/IQ31244 Sun Apr 24 08:58:58 2011 (r220982) @@ -72,12 +72,12 @@ device uart device pci device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # SCSI Controllers Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/arm/conf/TS7800 Sun Apr 24 08:58:58 2011 (r220982) @@ -71,7 +71,7 @@ device da # SATA device ata -device atadisk +options ATA_CAM # Flattened Device Tree options FDT Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/conf/NOTES Sun Apr 24 08:58:58 2011 (r220982) @@ -1754,9 +1754,9 @@ hint.ata.1.irq="15" # atapifd, atapist, atapicam) and all user-level APIs. # cam(4) drivers and APIs will be connected instead. -options ATA_STATIC_ID +#options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 -#options ATA_CAM +options ATA_CAM # # Standard floppy disk controllers and floppy tapes, supports Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/i386/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -91,14 +91,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahb # EISA AHA1742 family @@ -127,13 +125,13 @@ device ncv # NCR 53C500 device nsp # Workbit Ninja SCSI-3 device stg # TMC 18C30/18C50 -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/i386/conf/XBOX Sun Apr 24 08:58:58 2011 (r220982) @@ -16,7 +16,7 @@ device sc # syscons device fb # no support yet for root device name fetching -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" #options ROOTDEVNAME=\"cd9660:acd0\" options SCHED_4BSD # 4BSD scheduler @@ -51,13 +51,13 @@ device pci # ATA and ATAPI devices device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -options ATA_STATIC_ID # Static device numbering +options ATA_CAM -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) # Pseudo devices. device loop # Network loopback Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/ia64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -73,16 +73,15 @@ options MALLOC_DEBUG_MAXZONES=8 # Separ device firewire # FireWire bus code device miibus # MII bus support (Ethernet) device pci # PCI bus support -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device usb # USB Bus (required for USB) -# ATA and ATAPI devices -device ata # ATA controller -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -device ataraid # ATA RAID drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and AIC7xxx devices @@ -101,11 +100,11 @@ device ips # IBM (Adaptec) ServeRAID device mly # Mylex AcceleRAID/eXtremeRAID device twa # 3ware 9000 series PATA/SATA RAID -# SCSI peripherals +# ATA/SCSI peripherals device cd # CD-ROM, DVD-ROM etc. device ch # Media changer device da # Direct Access (ie disk) -device pass # Passthrough (direct SCSI access) +device pass # Passthrough (direct ATA/SCSI access) device sa # Sequential Access (ie tape) device ses # Environmental Services (and SAF-TE) Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/MALTA Sun Apr 24 08:58:58 2011 (r220982) @@ -53,7 +53,7 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" # Debugging for use in -current Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/MALTA64 Sun Apr 24 08:58:58 2011 (r220982) @@ -53,7 +53,7 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ad0s1a\" +options ROOTDEVNAME=\"ufs:ada0s1a\" # Debugging for use in -current Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/OCTEON1 Sun Apr 24 08:58:58 2011 (r220982) @@ -95,14 +95,12 @@ options SMP # Symmetric MultiProcesso # Bus support. device pci -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # On-board Compact Flash driver. device cf @@ -129,13 +127,13 @@ device adw # Advansys wide SCSI adapte device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60. device bt # Buslogic/Mylex MultiMaster SCSI adapters -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers interfaced to the SCSI subsystem Modified: head/sys/mips/conf/std.SWARM ============================================================================== --- head/sys/mips/conf/std.SWARM Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/conf/std.SWARM Sun Apr 24 08:58:58 2011 (r220982) @@ -52,9 +52,9 @@ device ehci device umass device scbus +device cd device da +device pass device ata -device atadisk -device atapicd -options ATA_STATIC_ID +options ATA_CAM Modified: head/sys/mips/malta/std.malta ============================================================================== --- head/sys/mips/malta/std.malta Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/mips/malta/std.malta Sun Apr 24 08:58:58 2011 (r220982) @@ -5,4 +5,9 @@ cpu CPU_MIPS4KC #options ISA_MIPS32 device pci device ata -device atadisk +options ATA_CAM + +device scbus # SCSI bus (required for ATA/SCSI) +device cd # CD +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/pc98/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -87,13 +87,12 @@ device pci # Floppy drives device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device adv # Advansys SCSI adapters @@ -110,13 +109,13 @@ device ncv # NCR 53C500 device nsp # Workbit Ninja SCSI-3 device stg # TMC 18C30/18C50 -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # keyboard driver Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -86,12 +86,12 @@ device cpufreq device pci device agp -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -103,12 +103,12 @@ device ispfw # Firmware module for Qlo device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # syscons is the default console driver, resembling an SCO console device sc Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/GENERIC64 Sun Apr 24 08:58:58 2011 (r220982) @@ -86,12 +86,12 @@ device cpufreq device pci device agp -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -103,12 +103,12 @@ device ispfw # Firmware module for Qlo device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # syscons is the default console driver, resembling an SCO console device sc Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/powerpc/conf/MPC85XX Sun Apr 24 08:58:58 2011 (r220982) @@ -56,7 +56,7 @@ options WITNESS options WITNESS_SKIPSPIN device ata -device atadisk +options ATA_CAM device bpf device cfi device crypto @@ -72,6 +72,7 @@ device iicbus device loop device md device miibus +device pass device pci device pty device quicc Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/sparc64/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -88,15 +88,12 @@ device fhc # Floppy drives #device fdc -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives -# Do NOT enable ATA_STATIC_ID -- cmd646 controller will be !ata2!, -# and you will not mount an ATA /. -#options ATA_STATIC_ID # Static device numbering +# ATA controllers +device ahci # AHCI-compatible SATA controllers +device ata # Legacy ATA/SATA controllers +options ATA_CAM # Handle legacy controllers with CAM +device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA +device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA # SCSI Controllers device ahc # AHA2940 and onboard AIC7xxx devices @@ -109,13 +106,13 @@ device mpt # LSI-Logic MPT-Fusion device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D device esp # NCR53c9x (FEPS/FAS366) -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) +# ATA/SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # RAID controllers Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Sun Apr 24 01:11:28 2011 (r220981) +++ head/sys/sun4v/conf/GENERIC Sun Apr 24 08:58:58 2011 (r220982) @@ -95,13 +95,7 @@ device pci # ATA and ATAPI devices device ata -#device atadisk # ATA disk drives -device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives -# Do NOT enable ATA_STATIC_ID -- cmd646 controller will be !ata2!, -# and you will not mount an ATA /. -#options ATA_STATIC_ID # Static device numbering +options ATA_CAM # SCSI Controllers #device ahc # AHA2940 and onboard AIC7xxx devices From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:06: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 95A05106567C; Sun, 24 Apr 2011 09:06:14 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 22DB68FC1B; Sun, 24 Apr 2011 09:06:14 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id E3332E6262; Sun, 24 Apr 2011 10:06:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=HEdaPNrKO3JY FIZA5f9azzjzHvU=; b=HxOYkdSRS3jK3LtY/hgH4K8t+ttiMr6y+Ye2fgOl0xcP YK160jRJs2n0DggQcUSNwwiHIpcIzQWTSKRXpJh4D/hn9skgh1+6D3otdDJn7IDm zjUOQrjzeNtQ0G53nOjTgVAdRawNJBG/sI7HOaxO9PJeMvvIsK+VapIq8J0lklE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=n6c9Rz D4GjGpWkFrdfOehv1ZCNR3OxScgGGCr63gDSIbL1U5FLH+58a0mWSDOWHq2zhFLO Hdv8V0r8hYVL+pBIjVLPvhtEJtHnyrMLeMdvM7eExoj5+RUVuT26qZwokwIbwWjM Wy+r7waBufw2R8FovvqSbZWcGMe7XsmeQLiZk= Received: from unknown (188-222-18-231.zone13.bethere.co.uk [188.222.18.231]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 947E5E6261; Sun, 24 Apr 2011 10:06:12 +0100 (BST) Date: Sun, 24 Apr 2011 10:06:11 +0100 From: Bruce Cran To: Alexander Motin Message-ID: <20110424100611.000020eb@unknown> In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 09:06:14 -0000 On Sun, 24 Apr 2011 08:58:58 +0000 (UTC) Alexander Motin wrote: > If you are using ATA > device names in /etc/fstab or other places, make sure to update them > respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > where 'Y's are the sequential numbers for each type in order of > detection, unless configured otherwise with tunables, see cam(4)). People might expect that if ata(4) numbering starts with ad4, ada4 would be created. However on my machines I've seen ad4 get mapped to ada0. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:15: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 821081065677; Sun, 24 Apr 2011 09:15:56 +0000 (UTC) (envelope-from mavbsd@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 A2F8D8FC13; Sun, 24 Apr 2011 09:15:55 +0000 (UTC) Received: by bwz12 with SMTP id 12so1747149bwz.13 for ; Sun, 24 Apr 2011 02:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=XyUvRotJCTOEDIy+Yddq4NIyFiWrwhbjJ/vD4TZ1uB0=; b=MfnNv5perj0IFGsOoCWn3YBLBZjYnl3oKeg/UTKZ9GOhyTrZlR8W6Dd+kSNIUs5IAA CjAzUhwkHw/fNv2ZwBxe5ef5RfIbjGstORmBeBKGSpuZzlhvfUDSK+TTha2+3h5IsFLB Rd+sGb5o+atUScSgNFwC9Qjzs/vHhXHf2Q67s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=TAZb/T905Wo+7zSz9OPvIyp7HxUXbN+TuaTQtQVvz5b745bYKNK5eyg/UgIaDTrgkr MJTxbqhBPy76s2gyNfd04KZvDDUo/Ag/dH30HEcrabl9seKY/5Nvrwwd+Ftd4v5qbPm7 iCo8/bYUKfCUZnobecTeR8YT+o/DNTixrp8sE= Received: by 10.205.33.194 with SMTP id sp2mr2548370bkb.27.1303636554535; Sun, 24 Apr 2011 02:15:54 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id c11sm2646677bkc.2.2011.04.24.02.15.52 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 02:15:53 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB3EA47.5070304@FreeBSD.org> Date: Sun, 24 Apr 2011 12:15:51 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Bruce Cran References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100611.000020eb@unknown> In-Reply-To: <20110424100611.000020eb@unknown> Content-Type: text/plain; charset=ISO-8859-1; 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 09:15:56 -0000 On 24.04.2011 12:06, Bruce Cran wrote: > On Sun, 24 Apr 2011 08:58:58 +0000 (UTC) > Alexander Motin wrote: > >> If you are using ATA >> device names in /etc/fstab or other places, make sure to update them >> respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> where 'Y's are the sequential numbers for each type in order of >> detection, unless configured otherwise with tunables, see cam(4)). > > People might expect that if ata(4) numbering starts with ad4, ada4 > would be created. However on my machines I've seen ad4 get mapped to > ada0. Yes. With sequential I mean from 0 and up. :) What's about 4, I believe not so many people still remember what does it mean, and probably none for whom that reason is important now. :) -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:23: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 B1FC8106566B; Sun, 24 Apr 2011 09:23:08 +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 A0BBA8FC12; Sun, 24 Apr 2011 09:23:08 +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 p3O9N8RM025388; Sun, 24 Apr 2011 09:23:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3O9N8QG025386; Sun, 24 Apr 2011 09:23:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104240923.p3O9N8QG025386@svn.freebsd.org> From: Alexander Motin Date: Sun, 24 Apr 2011 09:23:08 +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: r220983 - 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: Sun, 24 Apr 2011 09:23:08 -0000 Author: mav Date: Sun Apr 24 09:23:08 2011 New Revision: 220983 URL: http://svn.freebsd.org/changeset/base/220983 Log: Explicitly note that device numbers are starting from zero. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. removed and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, - where 'Y's are the sequential numbers for each type in order of - detection, unless configured otherwise with tunables, see cam(4)). + where 'Y's are the sequential numbers starting from zero for each type + in order of detection, unless configured otherwise with tunables, + see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:42: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 76685106566B; Sun, 24 Apr 2011 09:42:41 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6C08FC18; Sun, 24 Apr 2011 09:42:41 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 6032BE6262; Sun, 24 Apr 2011 10:42:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=+aTU7CuFjooM 07NW0oVMyNWyozs=; b=ajp5s8QmXgAaV6p7EBkJPFYGuEqvudlIZ6yOw5koYEmF ySDW13fgVjf02M/qZ6zYi3Za6RnyCQ+m7PBQLKB95NyW4SdbFE7fZ3/mYlHbH1C5 0/Jo60PxhhyJOQVKu8UScl6dQaTLxScyPuimnHJB9d5e41zcdbO647kMiYOOni0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=QgmudG 2g0rHlZ/aVo9gcIMbsOEpzz1gba4TRCs7JNRv827yAURYYGxHMMGA+E/Z89ytOS+ WX/0h/sJMt1JU1CyatBEZb5pjnC+FeFJ64ljiWuD1zbsZrSkOka76ThNCwHOQWxd N6/Bpey9AOCNue2nszD+UNxrB4H33pESCvfac= Received: from unknown (188-222-18-231.zone13.bethere.co.uk [188.222.18.231]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 133C0E61B6; Sun, 24 Apr 2011 10:42:40 +0100 (BST) Date: Sun, 24 Apr 2011 10:42:39 +0100 From: Bruce Cran To: Alexander Motin Message-ID: <20110424104239.000002ad@unknown> In-Reply-To: <4DB3EA47.5070304@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100611.000020eb@unknown> <4DB3EA47.5070304@FreeBSD.org> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 09:42:41 -0000 On Sun, 24 Apr 2011 12:15:51 +0300 Alexander Motin wrote: > On 24.04.2011 12:06, Bruce Cran wrote: > > People might expect that if ata(4) numbering starts with ad4, ada4 > > would be created. However on my machines I've seen ad4 get mapped to > > ada0. > > Yes. With sequential I mean from 0 and up. :) Sorry I didn't read it properly and sent my reply before I noticed you said adX -> adaY, not adX -> adaX. -- Bruce Cran From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 09:57:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1EA41106568A; Sun, 24 Apr 2011 09:57:36 +0000 (UTC) Date: Sun, 24 Apr 2011 09:57:36 +0000 From: Alexander Best To: Alexander Motin Message-ID: <20110424095736.GA92492@freebsd.org> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240923.p3O9N8QG025386@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 09:57:36 -0000 On Sun Apr 24 11, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 09:23:08 2011 > New Revision: 220983 > URL: http://svn.freebsd.org/changeset/base/220983 > > Log: > Explicitly note that device numbers are starting from zero. > > Modified: > head/UPDATING > > Modified: head/UPDATING > ============================================================================== > --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) > +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) > @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. > removed and replaced by respective CAM drivers. If you are using > ATA device names in /etc/fstab or other places, make sure to update > them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > - where 'Y's are the sequential numbers for each type in order of > - detection, unless configured otherwise with tunables, see cam(4)). > + where 'Y's are the sequential numbers starting from zero for each type > + in order of detection, unless configured otherwise with tunables, > + see cam(4)). maybe an extra sentence mentioning the fact that {geom,ufs}-labels and ufsids are preferred over device nodes nowadays would be a good idea? cheers. alex > > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool -- a13x From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:08: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 2749B106566C; Sun, 24 Apr 2011 10:08:00 +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 941AA8FC12; Sun, 24 Apr 2011 10:07:58 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3OA7tLo011164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 Apr 2011 13:07:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3OA7sY6019098; Sun, 24 Apr 2011 13:07:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3OA7shq019097; Sun, 24 Apr 2011 13:07:54 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 24 Apr 2011 13:07:54 +0300 From: Kostik Belousov To: Alexander Motin Message-ID: <20110424100754.GD48734@deviant.kiev.zoral.com.ua> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L4gFVV/CladpyON8" Content-Disposition: inline In-Reply-To: <201104240858.p3O8wwqT024628@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.4 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 10:08:00 -0000 --L4gFVV/CladpyON8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 >=20 > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based A= TA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab= or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). > =20 > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. How many raid implementations, in particular, stripe and mirror ? Is gstripe/gmirror merged, or planned to be merged with geom_raid ? Does it make sense to merge if not yet ? --L4gFVV/CladpyON8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2z9noACgkQC3+MBN1Mb4iW0wCg05hzfgYDUKwSOTKy1InovQDS tBAAnjE4y9zUQWM1biDkscDP11BDGiLo =TuWC -----END PGP SIGNATURE----- --L4gFVV/CladpyON8-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:13: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 5AB0D106564A; Sun, 24 Apr 2011 10:13:22 +0000 (UTC) (envelope-from mavbsd@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 7C6E38FC08; Sun, 24 Apr 2011 10:13:20 +0000 (UTC) Received: by bwz12 with SMTP id 12so1767171bwz.13 for ; Sun, 24 Apr 2011 03:13:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=TBPXIpY7vRzd+WZqjOiSQwcw9/ORWc3mf3KKOpbAy0c=; b=UkaG15UJLoLYNCFAQ2rwgOOY9fliFOL0qaguFe+Hz3CkIqSVzXo4mRDYbrO5cGrWFo TRBDMtGzrirR8dcqTd/IxR6DWzgsGgyY+eNBZZTqMrBuEoBOlWtM09lRI3lkzfol6/Cw C/nwL9X+8W6jxpXdrKI/v8oR0C9nnuiHWtmZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=bNfZUCzL+CGBza1X9j4DJzK3Duo7bqBpT3znSFkbkk/KjazlEYatVL5txaUXWbweIQ 9/oVbCjtxPikkdjhJrt+zIHnSOfDLe3imz8ElrQWK4il30jDXw46sAyuu/XU+cQkpV+D 7RsXaKw+0qT8z2k0evFzSz4OowpW2PR/WA/Ew= Received: by 10.204.19.20 with SMTP id y20mr2396058bka.170.1303639999706; Sun, 24 Apr 2011 03:13:19 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u15sm64546bkf.4.2011.04.24.03.13.18 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 03:13:18 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB3F7BC.8090106@FreeBSD.org> Date: Sun, 24 Apr 2011 13:13:16 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Kostik Belousov References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <20110424100754.GD48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110424100754.GD48734@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-R; 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 10:13:22 -0000 On 24.04.2011 13:07, Kostik Belousov wrote: > On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 08:58:58 2011 >> New Revision: 220982 >> URL: http://svn.freebsd.org/changeset/base/220982 >> >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). >> >> ataraid(4) functionality is now supported by the RAID GEOM class. >> To use it you can load geom_raid kernel module and use graid(8) tool >> for management. Instead of /dev/arX device names, use /dev/raid/rX. > > How many raid implementations, in particular, stripe and mirror ? Same as before: one out, another in. > Is gstripe/gmirror merged, or planned to be merged with geom_raid ? > Does it make sense to merge if not yet ? It is definitely possible, but it is not done yet to not put all eggs in one basket. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:20: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 6B6641065672; Sun, 24 Apr 2011 10:20:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id EC16C8FC08; Sun, 24 Apr 2011 10:20:39 +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 00B2725D386D; Sun, 24 Apr 2011 10:20:38 +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 33F12159D9FE; Sun, 24 Apr 2011 10:20:38 +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 Fo438KGhXj-I; Sun, 24 Apr 2011 10:20:37 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CB01B159D9F0; Sun, 24 Apr 2011 10:20:36 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> Date: Sun, 24 Apr 2011 10:20:35 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> To: Alexander Motin 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 10:20:40 -0000 On Apr 24, 2011, at 8:58 AM, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 >=20 > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based = ATA > stack. It means that all legacy ATA drivers are disabled and replaced = by > respective CAM drivers. If you are using ATA device names in = /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured = otherwise > with tunables, see cam(4)). Are you going to address that on updating magic will make it work within = the next 2-4 weeks? If you will not then thanks for screwing 50% of our users and please = back this out again. > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. >=20 > Modified: > head/UPDATING > head/sys/amd64/conf/GENERIC > head/sys/arm/conf/AVILA > head/sys/arm/conf/CAMBRIA > head/sys/arm/conf/CRB > head/sys/arm/conf/DB-78XXX > head/sys/arm/conf/DB-88F5XXX > head/sys/arm/conf/DB-88F6XXX > head/sys/arm/conf/EP80219 > head/sys/arm/conf/IQ31244 > head/sys/arm/conf/TS7800 > head/sys/conf/NOTES > head/sys/i386/conf/GENERIC > head/sys/i386/conf/XBOX > head/sys/ia64/conf/GENERIC > head/sys/mips/conf/MALTA > head/sys/mips/conf/MALTA64 > head/sys/mips/conf/OCTEON1 > head/sys/mips/conf/std.SWARM > head/sys/mips/malta/std.malta > head/sys/pc98/conf/GENERIC > head/sys/powerpc/conf/GENERIC > head/sys/powerpc/conf/GENERIC64 > head/sys/powerpc/conf/MPC85XX > head/sys/sparc64/conf/GENERIC > head/sys/sun4v/conf/GENERIC --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10: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 8F060106564A; Sun, 24 Apr 2011 10: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 7E66D8FC0C; Sun, 24 Apr 2011 10: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 p3OAfDHM027700; Sun, 24 Apr 2011 10:41:13 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OAfDsN027698; Sun, 24 Apr 2011 10:41:13 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201104241041.p3OAfDsN027698@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 24 Apr 2011 10:41: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: r220984 - 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: Sun, 24 Apr 2011 10:41:13 -0000 Author: pjd Date: Sun Apr 24 10:41:13 2011 New Revision: 220984 URL: http://svn.freebsd.org/changeset/base/220984 Log: One key is expected from providers smaller than or equal to (2^20)*sectorsize bytes. Remove bogus assertion and while here remove another too obvious assertion. Reported by: Fabian Keil MFC after: 2 weeks Modified: head/sys/geom/eli/g_eli_key_cache.c Modified: head/sys/geom/eli/g_eli_key_cache.c ============================================================================== --- head/sys/geom/eli/g_eli_key_cache.c Sun Apr 24 09:23:08 2011 (r220983) +++ head/sys/geom/eli/g_eli_key_cache.c Sun Apr 24 10:41:13 2011 (r220984) @@ -263,12 +263,6 @@ g_eli_key_hold(struct g_eli_softc *sc, o if ((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) != 0) return (sc->sc_ekey); - KASSERT(sc->sc_ekeys_total > 1, ("%s: sc_ekeys_total=%ju", __func__, - (uintmax_t)sc->sc_ekeys_total)); - KASSERT((sc->sc_flags & G_ELI_FLAG_SINGLE_KEY) == 0, - ("%s: SINGLE_KEY flag set, but sc_ekeys_total=%ju", __func__, - (uintmax_t)sc->sc_ekeys_total)); - /* We switch key every 2^G_ELI_KEY_SHIFT blocks. */ keyno = (offset >> G_ELI_KEY_SHIFT) / blocksize; From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:44: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 F328E1065674; Sun, 24 Apr 2011 10:44:15 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by mx1.freebsd.org (Postfix) with ESMTP id CC7778FC13; Sun, 24 Apr 2011 10:44:15 +0000 (UTC) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by coco.macktronics.com (Postfix) with ESMTP id B536D4AC40; Sun, 24 Apr 2011 05:25:00 -0500 (CDT) Date: Sun, 24 Apr 2011 05:25:00 -0500 (CDT) From: Dan Mack To: Alexander Best In-Reply-To: <20110424095736.GA92492@freebsd.org> Message-ID: <20110424051747.S1757@coco.macktronics.com> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 10:44:16 -0000 On Sun, 24 Apr 2011, Alexander Best wrote: > On Sun Apr 24 11, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 09:23:08 2011 >> New Revision: 220983 >> URL: http://svn.freebsd.org/changeset/base/220983 >> >> Log: >> Explicitly note that device numbers are starting from zero. >> >> Modified: >> head/UPDATING >> >> Modified: head/UPDATING >> ============================================================================== >> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >> removed and replaced by respective CAM drivers. If you are using >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > maybe an extra sentence mentioning the fact that {geom,ufs}-labels and ufsids > are preferred over device nodes nowadays would be a good idea? > > cheers. > alex For those of us using a ZFS root pool built out of /dev/gpt/ devices, will these automagically pick up the new names? Dan From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:47: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 381BB106566B; Sun, 24 Apr 2011 10:47:57 +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 1D2698FC13; Sun, 24 Apr 2011 10:47: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 p3OAlvVc027928; Sun, 24 Apr 2011 10:47:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OAluuU027924; Sun, 24 Apr 2011 10:47:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241047.p3OAluuU027924@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 10:47: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: r220985 - in head/sys/ufs: ffs ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 10:47:57 -0000 Author: kib Date: Sun Apr 24 10:47:56 2011 New Revision: 220985 URL: http://svn.freebsd.org/changeset/base/220985 Log: VFS sometimes is unable to inactivate a vnode when vnode use count goes to zero. E.g., the vnode might be only shared-locked at the time of vput() call. Such vnodes are kept in the hash, so they can be found later. If ffs_valloc() allocated an inode that has its vnode cached in hash, and still owing the inactivation, then vget() call from ffs_valloc() clears VI_OWEINACT, and then the vnode is reused for the newly allocated inode. The problem is, the vnode is not reclaimed before it is put to the new use. ffs_valloc() recycles vnode vm object, but this is not enough. In particular, at least v_vflag should be cleared, and several bits of UFS state need to be removed. It is very inconvenient to call vgone() at this point. Instead, move some parts of ufs_reclaim() into helper function ufs_prepare_reclaim(), and call the helper from VOP_RECLAIM and ffs_valloc(). Reviewed by: mckusick Tested by: pho MFC after: 3 weeks Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ufs/ufs_extern.h head/sys/ufs/ufs/ufs_inode.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Apr 24 10:47:56 2011 (r220985) @@ -1012,8 +1012,9 @@ dup_alloc: ip->i_din2->di_birthtime = ts.tv_sec; ip->i_din2->di_birthnsec = ts.tv_nsec; } + ufs_prepare_reclaim(*vpp); ip->i_flag = 0; - vnode_destroy_vobject(*vpp); + (*vpp)->v_vflag = 0; (*vpp)->v_type = VNON; if (fs->fs_magic == FS_UFS2_MAGIC) (*vpp)->v_op = &ffs_vnodeops2; Modified: head/sys/ufs/ufs/ufs_extern.h ============================================================================== --- head/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:47:56 2011 (r220985) @@ -76,6 +76,7 @@ int ufs_inactive(struct vop_inactive_ar int ufs_init(struct vfsconf *); void ufs_itimes(struct vnode *vp); int ufs_lookup(struct vop_cachedlookup_args *); +void ufs_prepare_reclaim(struct vnode *vp); int ufs_readdir(struct vop_readdir_args *); int ufs_reclaim(struct vop_reclaim_args *); void ffs_snapgone(struct inode *); Modified: head/sys/ufs/ufs/ufs_inode.c ============================================================================== --- head/sys/ufs/ufs/ufs_inode.c Sun Apr 24 10:41:13 2011 (r220984) +++ head/sys/ufs/ufs/ufs_inode.c Sun Apr 24 10:47:56 2011 (r220985) @@ -172,6 +172,31 @@ out: return (error); } +void +ufs_prepare_reclaim(struct vnode *vp) +{ + struct inode *ip; +#ifdef QUOTA + int i; +#endif + + ip = VTOI(vp); + + vnode_destroy_vobject(vp); +#ifdef QUOTA + for (i = 0; i < MAXQUOTAS; i++) { + if (ip->i_dquot[i] != NODQUOT) { + dqrele(vp, ip->i_dquot[i]); + ip->i_dquot[i] = NODQUOT; + } + } +#endif +#ifdef UFS_DIRHASH + if (ip->i_dirhash != NULL) + ufsdirhash_free(ip); +#endif +} + /* * Reclaim an inode so that it can be used for other purposes. */ @@ -185,14 +210,9 @@ ufs_reclaim(ap) struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); struct ufsmount *ump = ip->i_ump; -#ifdef QUOTA - int i; -#endif - /* - * Destroy the vm object and flush associated pages. - */ - vnode_destroy_vobject(vp); + ufs_prepare_reclaim(vp); + if (ip->i_flag & IN_LAZYMOD) ip->i_flag |= IN_MODIFIED; UFS_UPDATE(vp, 0); @@ -200,21 +220,7 @@ ufs_reclaim(ap) * Remove the inode from its hash chain. */ vfs_hash_remove(vp); - /* - * Purge old data structures associated with the inode. - */ -#ifdef QUOTA - for (i = 0; i < MAXQUOTAS; i++) { - if (ip->i_dquot[i] != NODQUOT) { - dqrele(vp, ip->i_dquot[i]); - ip->i_dquot[i] = NODQUOT; - } - } -#endif -#ifdef UFS_DIRHASH - if (ip->i_dirhash != NULL) - ufsdirhash_free(ip); -#endif + /* * Lock the clearing of v_data so ffs_lock() can inspect it * prior to obtaining the lock. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10: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 E340A106564A; Sun, 24 Apr 2011 10:48:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BC2808FC08; Sun, 24 Apr 2011 10:48:20 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5E02846B49; Sun, 24 Apr 2011 06:48:20 -0400 (EDT) Date: Sun, 24 Apr 2011 11:48:20 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 10:48:21 -0000 On Sun, 24 Apr 2011, Alexander Motin wrote: > Author: mav > Date: Sun Apr 24 08:58:58 2011 > New Revision: 220982 > URL: http://svn.freebsd.org/changeset/base/220982 > > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based ATA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). > > ataraid(4) functionality is now supported by the RAID GEOM class. > To use it you can load geom_raid kernel module and use graid(8) tool > for management. Instead of /dev/arX device names, use /dev/raid/rX. I'm very pleased to see a continued movement towards the new ATA code; it offers clear benefits to all of our users, and is definitely something we want done for 9.0. Could you say more about the migration strategy for users? I recall that when you proposed throwing this switch, several strategies were discussed (likely in combination to handle both the immediate upgrade stumble issue and a longer-term migration): (1) Teach new ata parts to replicate the old naming convention in 99.9% of cases. Or some suppport module that creates the required symlinks if loaded (and we load it by default in 9.0, phasing it out later with appropriate boot-time warnings for 6-12 months). Obviously, this would be best-effort, but if it takes us from a 40% upgrade failure to a 1% upgrade failure, that's a big deal. (2) Over time, provide a migration to fstab naming storage targets by volume ID / name / serial number, rather than by hardware path. A good long-term strategy but one that requires changes to the installer, upgrade path, etc. (3) Teach freebsd-update/installer/etc to recognise *before* a new kernel is installed whether the current configuration will require hand-holding. (4) Thinking pretty hard about the roll-back path to avoid stumbles when there's a problem following a kernel update. In the past, linking kernel feature updates to /etc or userspace updates has caused significant issues for our users, who reasonably expect to follow our normal "install the kernel, reboot, let it sit for a week" path. What is your plan for implementing some combination of these (or did I miss the commits that brought them in already)? In the past, we've seen upgrade path problems dislodge users, and since then, we've grown an increased assumption of ease-of-upgrade that can be managed automatically by tools like freebsd-update. Breaking the automated upgrade (and roll-back) path would be extremely problematic. Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:49: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 49BBC1065672; Sun, 24 Apr 2011 10:49:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 24D158FC18; Sun, 24 Apr 2011 10:49:19 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D321C46B49; Sun, 24 Apr 2011 06:49:18 -0400 (EDT) Date: Sun, 24 Apr 2011 11:49:18 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Best In-Reply-To: <20110424095736.GA92492@freebsd.org> Message-ID: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 10:49:19 -0000 On Sun, 24 Apr 2011, Alexander Best wrote: >> ============================================================================== >> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >> removed and replaced by respective CAM drivers. If you are using >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > maybe an extra sentence mentioning the fact that {geom,ufs}-labels and > ufsids are preferred over device nodes nowadays would be a good idea? If this is true, that's what our installer needs to do. Does our installer do that? (In general, a reasonable definition of "preferred" is "what the installer does" -- if that's not the case, it's a serious bug.) Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 10:50: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 153A4106564A; Sun, 24 Apr 2011 10:50:04 +0000 (UTC) (envelope-from mavbsd@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 36B458FC0A; Sun, 24 Apr 2011 10:50:02 +0000 (UTC) Received: by bwz12 with SMTP id 12so1779174bwz.13 for ; Sun, 24 Apr 2011 03:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=kIQl2FQwuKxoG0KIY7KMN6soYOpkBBr5HYPPUHaCZTI=; b=TiJ6K3Y6nElS8aAJRMfKJOr81kQNZuHxJ1pGL+yfe3zgW8Fbq5KeekrVEBtBd139+g rPOH7VYzb02xHUvvDjwZ3CK325iu+OpqfH+J+W92MPFO/c7EkNHC7YXtKKWn6HCffVtJ TFfIr0gbUT7/AQOx7PoupTqDDSrCIddaWFmLU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=YNKaKv4K8DGyOX5dM3nxQZx9Txgqsoj9j/pWRz8Ggns9E95yzidoCUePtoMbvISUc7 Dl03A3QeTOHdKht+R3pwJB8QVBC35VwtBrDBsfIDKIkVJ30sKWSMbSsBEZJDz9g5HZr2 HsfTV2xhw5aEozIEXsuFmkxNSixQSDBHTq+2I= Received: by 10.204.20.79 with SMTP id e15mr2507420bkb.147.1303642153130; Sun, 24 Apr 2011 03:49:13 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y22sm2676567bku.20.2011.04.24.03.49.11 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 03:49:12 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB40026.5030405@FreeBSD.org> Date: Sun, 24 Apr 2011 13:49:10 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> In-Reply-To: <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 10:50:04 -0000 On 24.04.2011 13:20, Bjoern A. Zeeb wrote: > On Apr 24, 2011, at 8:58 AM, Alexander Motin wrote: >> Author: mav >> Date: Sun Apr 24 08:58:58 2011 >> New Revision: 220982 >> URL: http://svn.freebsd.org/changeset/base/220982 >> >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). > > > Are you going to address that on updating magic will make it work within the next 2-4 weeks? s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script should fit most. In what place should I put that magic? > If you will not then thanks for screwing 50% of our users and please back this out again. Reverting is not an option. _Constructive_ propositions are welcome. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:00: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 7A596106564A; Sun, 24 Apr 2011 11:00:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 501488FC0C; Sun, 24 Apr 2011 11:00:40 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 04BAF46B49; Sun, 24 Apr 2011 07:00:40 -0400 (EDT) Date: Sun, 24 Apr 2011 12:00:39 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <4DB40026.5030405@FreeBSD.org> Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 11:00:40 -0000 On Sun, 24 Apr 2011, Alexander Motin wrote: >> Are you going to address that on updating magic will make it work within >> the next 2-4 weeks? > > s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script should fit > most. In what place should I put that magic? > >> If you will not then thanks for screwing 50% of our users and please back >> this out again. > > Reverting is not an option. _Constructive_ propositions are welcome. Hi Mav: It is the policy of this project that the release engineering team has final authority over what ships in a release. It is entirely within scope to revert this change for 9.0 if issues with the upgrade path are not addressed. My hope also that this path can be entirely avoided through a rapid addressing of upgrade path issues that have been known (and discussed on the mailing lists extensively) since you posted about the work on the public mailing lists. I agree with Bjoern that it is critical to address these issues in a timely manner -- our users depend on reliable and easy upgrades, and it seems (on face value) that significant work remains to be done to make that possible. Our release is increasingly close, and it's important we keep the tree as stable as possible so that merges of other straggling features can go uneventfully. Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:01: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 9B73C106566B; Sun, 24 Apr 2011 11:01:42 +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 88DC38FC0C; Sun, 24 Apr 2011 11:01: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 p3OB1gOx029251; Sun, 24 Apr 2011 11:01:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OB1gbc029246; Sun, 24 Apr 2011 11:01:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241101.p3OB1gbc029246@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 11:01:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220986 - stable/8/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 11:01:42 -0000 Author: kib Date: Sun Apr 24 11:01:42 2011 New Revision: 220986 URL: http://svn.freebsd.org/changeset/base/220986 Log: Merge the part of r207141 that fixes the locking for ufs_rename() (and r218838 followup). Adopt the SU calls to the stable/8 SU implementation, with the help from Kirk. PR: kern/156545 Reviewed by: mckusick Tested by: pho Modified: stable/8/sys/ufs/ufs/inode.h stable/8/sys/ufs/ufs/ufs_extern.h stable/8/sys/ufs/ufs/ufs_lookup.c stable/8/sys/ufs/ufs/ufs_vnops.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/ufs/ufs/inode.h ============================================================================== --- stable/8/sys/ufs/ufs/inode.h Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/inode.h Sun Apr 24 11:01:42 2011 (r220986) @@ -120,7 +120,7 @@ struct inode { #define IN_CHANGE 0x0002 /* Inode change time update request. */ #define IN_UPDATE 0x0004 /* Modification time update request. */ #define IN_MODIFIED 0x0008 /* Inode has been modified. */ -#define IN_RENAME 0x0010 /* Inode is being renamed. */ +#define IN_NEEDSYNC 0x0010 /* Inode requires fsync. */ #define IN_LAZYMOD 0x0040 /* Modified, but don't write yet. */ #define IN_SPACECOUNTED 0x0080 /* Blocks to be freed in free count. */ #define IN_LAZYACCESS 0x0100 /* Process IN_ACCESS after the Modified: stable/8/sys/ufs/ufs/ufs_extern.h ============================================================================== --- stable/8/sys/ufs/ufs/ufs_extern.h Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_extern.h Sun Apr 24 11:01:42 2011 (r220986) @@ -57,7 +57,7 @@ int ufs_bmap(struct vop_bmap_args *); int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *, struct buf *, int *, int *); int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); -int ufs_checkpath(ino_t, struct inode *, struct ucred *); +int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *); void ufs_dirbad(struct inode *, doff_t, char *); int ufs_dirbadentry(struct vnode *, struct direct *, int); int ufs_dirempty(struct inode *, ino_t, struct ucred *); @@ -66,9 +66,11 @@ int ufs_extwrite(struct vop_write_args void ufs_makedirentry(struct inode *, struct componentname *, struct direct *); int ufs_direnter(struct vnode *, struct vnode *, struct direct *, - struct componentname *, struct buf *); + struct componentname *, struct buf *, int); int ufs_dirremove(struct vnode *, struct inode *, int, int); int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); +int ufs_lookup_ino(struct vnode *, struct vnode **, struct componentname *, + ino_t *); int ufs_getlbns(struct vnode *, ufs2_daddr_t, struct indir *, int *); int ufs_inactive(struct vop_inactive_args *); int ufs_init(struct vfsconf *); Modified: stable/8/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_lookup.c Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_lookup.c Sun Apr 24 11:01:42 2011 (r220986) @@ -76,9 +76,6 @@ SYSCTL_INT(_debug, OID_AUTO, dircheck, C /* true if old FS format...*/ #define OFSFMT(vp) ((vp)->v_mount->mnt_maxsymlinklen <= 0) -static int ufs_lookup_(struct vnode *, struct vnode **, struct componentname *, - ino_t *); - #ifdef QUOTA static int ufs_lookup_upgrade_lock(struct vnode *vp) @@ -214,11 +211,11 @@ ufs_lookup(ap) } */ *ap; { - return (ufs_lookup_(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); + return (ufs_lookup_ino(ap->a_dvp, ap->a_vpp, ap->a_cnp, NULL)); } -static int -ufs_lookup_(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, +int +ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino) { struct inode *dp; /* inode for directory being searched */ @@ -556,6 +553,8 @@ notfound: return (ENOENT); found: + if (dd_ino != NULL) + *dd_ino = ino; if (numdirpasses == 2) nchstats.ncs_pass2++; /* @@ -578,11 +577,6 @@ found: if ((flags & ISLASTCN) && nameiop == LOOKUP) dp->i_diroff = i_offset &~ (DIRBLKSIZ - 1); - if (dd_ino != NULL) { - *dd_ino = ino; - return (0); - } - /* * If deleting, and at end of pathname, return * parameters which can be used to remove file. @@ -590,17 +584,6 @@ found: if (nameiop == DELETE && (flags & ISLASTCN)) { if (flags & LOCKPARENT) ASSERT_VOP_ELOCKED(vdp, __FUNCTION__); - if ((error = VFS_VGET(vdp->v_mount, ino, - LK_EXCLUSIVE, &tdp)) != 0) - return (error); - - error = ufs_delete_denied(vdp, tdp, cred, cnp->cn_thread); - if (error) { - vput(tdp); - return (error); - } - - /* * Return pointer to current entry in dp->i_offset, * and distance past previous entry (if there @@ -617,6 +600,16 @@ found: dp->i_count = 0; else dp->i_count = dp->i_offset - prevoff; + if (dd_ino != NULL) + return (0); + if ((error = VFS_VGET(vdp->v_mount, ino, + LK_EXCLUSIVE, &tdp)) != 0) + return (error); + error = ufs_delete_denied(vdp, tdp, cred, cnp->cn_thread); + if (error) { + vput(tdp); + return (error); + } if (dp->i_number == ino) { VREF(vdp); *vpp = vdp; @@ -648,6 +641,8 @@ found: dp->i_offset = i_offset; if (dp->i_number == ino) return (EISDIR); + if (dd_ino != NULL) + return (0); if ((error = VFS_VGET(vdp->v_mount, ino, LK_EXCLUSIVE, &tdp)) != 0) return (error); @@ -682,6 +677,8 @@ found: cnp->cn_flags |= SAVENAME; return (0); } + if (dd_ino != NULL) + return (0); /* * Step through the translation in the name. We do not `vput' the @@ -713,7 +710,7 @@ found: * to the inode we looked up before vdp lock was * dropped. */ - error = ufs_lookup_(pdp, NULL, cnp, &ino1); + error = ufs_lookup_ino(pdp, NULL, cnp, &ino1); if (error) { vput(tdp); return (error); @@ -865,12 +862,13 @@ ufs_makedirentry(ip, cnp, newdirp) * soft dependency code). */ int -ufs_direnter(dvp, tvp, dirp, cnp, newdirbp) +ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) struct vnode *dvp; struct vnode *tvp; struct direct *dirp; struct componentname *cnp; struct buf *newdirbp; + int isrename; { struct ucred *cr; struct thread *td; @@ -943,22 +941,30 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir blkoff += DIRBLKSIZ; } if (softdep_setup_directory_add(bp, dp, dp->i_offset, - dirp->d_ino, newdirbp, 1) == 0) { - bdwrite(bp); + dirp->d_ino, newdirbp, 1)) + dp->i_flag |= IN_NEEDSYNC; +#ifdef JOURNALED_SOFTUPDATES + if (newdirbp) + bdwrite(newdirbp); +#endif + bdwrite(bp); + if ((dp->i_flag & IN_NEEDSYNC) == 0) return (UFS_UPDATE(dvp, 0)); - } - /* We have just allocated a directory block in an - * indirect block. Rather than tracking when it gets - * claimed by the inode, we simply do a VOP_FSYNC - * now to ensure that it is there (in case the user - * does a future fsync). Note that we have to unlock - * the inode for the entry that we just entered, as - * the VOP_FSYNC may need to lock other inodes which - * can lead to deadlock if we also hold a lock on - * the newly entered node. + /* + * We have just allocated a directory block in an + * indirect block. We must prevent holes in the + * directory created if directory entries are + * written out of order. To accomplish this we + * fsync when we extend a directory into indirects. + * During rename it's not safe to drop the tvp lock + * so sync must be delayed until it is. + * + * This synchronous step could be removed if fsck and + * the kernel were taught to fill in sparse + * directories rather than panic. */ - if ((error = bwrite(bp))) - return (error); + if (isrename) + return (0); if (tvp != NULL) VOP_UNLOCK(tvp, 0); error = VOP_FSYNC(dvp, MNT_WAIT, td); @@ -1099,6 +1105,10 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir (void) softdep_setup_directory_add(bp, dp, dp->i_offset + (caddr_t)ep - dirbuf, dirp->d_ino, newdirbp, 0); +#ifdef JOURNALED_SOFTUPDATES + if (newdirbp != NULL) + bdwrite(newdirbp); +#endif bdwrite(bp); } else { if (DOINGASYNC(dvp)) { @@ -1116,7 +1126,8 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir * lock other inodes which can lead to deadlock if we also hold a * lock on the newly entered node. */ - if (error == 0 && dp->i_endoff && dp->i_endoff < dp->i_size) { + if (isrename == 0 && error == 0 && + dp->i_endoff && dp->i_endoff < dp->i_size) { if (tvp != NULL) VOP_UNLOCK(tvp, 0); #ifdef UFS_DIRHASH @@ -1386,25 +1397,25 @@ ufs_dir_dd_ino(struct vnode *vp, struct /* * Check if source directory is in the path of the target directory. - * Target is supplied locked, source is unlocked. - * The target is always vput before returning. */ int -ufs_checkpath(ino_t source_ino, struct inode *target, struct ucred *cred) +ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, struct ucred *cred, ino_t *wait_ino) { - struct vnode *vp, *vp1; + struct mount *mp; + struct vnode *tvp, *vp, *vp1; int error; ino_t dd_ino; - vp = ITOV(target); - if (target->i_number == source_ino) { - error = EEXIST; - goto out; - } - error = 0; + vp = tvp = ITOV(target); + mp = vp->v_mount; + *wait_ino = 0; + if (target->i_number == source_ino) + return (EEXIST); + if (target->i_number == parent_ino) + return (0); if (target->i_number == ROOTINO) - goto out; - + return (0); + error = 0; for (;;) { error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) @@ -1415,9 +1426,13 @@ ufs_checkpath(ino_t source_ino, struct i } if (dd_ino == ROOTINO) break; - error = vn_vget_ino(vp, dd_ino, LK_EXCLUSIVE, &vp1); - if (error != 0) + if (dd_ino == parent_ino) + break; + error = VFS_VGET(mp, dd_ino, LK_SHARED | LK_NOWAIT, &vp1); + if (error != 0) { + *wait_ino = dd_ino; break; + } /* Recheck that ".." still points to vp1 after relock of vp */ error = ufs_dir_dd_ino(vp, cred, &dd_ino); if (error != 0) { @@ -1429,14 +1444,14 @@ ufs_checkpath(ino_t source_ino, struct i vput(vp1); continue; } - vput(vp); + if (vp != tvp) + vput(vp); vp = vp1; } -out: if (error == ENOTDIR) - printf("checkpath: .. not a directory\n"); - if (vp != NULL) + panic("checkpath: .. not a directory\n"); + if (vp != tvp) vput(vp); return (error); } Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Sun Apr 24 10:47:56 2011 (r220985) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Sun Apr 24 11:01:42 2011 (r220986) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -114,6 +115,8 @@ static vop_close_t ufsfifo_close; static vop_kqfilter_t ufsfifo_kqfilter; static vop_pathconf_t ufsfifo_pathconf; +SYSCTL_NODE(_vfs, OID_AUTO, ufs, CTLFLAG_RD, 0, "UFS filesystem"); + /* * A virgin directory (no blushing please). */ @@ -992,7 +995,7 @@ ufs_link(ap) error = UFS_UPDATE(vp, !(DOINGSOFTDEP(vp) | DOINGASYNC(vp))); if (!error) { ufs_makedirentry(ip, cnp, &newdir); - error = ufs_direnter(tdvp, vp, &newdir, cnp, NULL); + error = ufs_direnter(tdvp, vp, &newdir, cnp, NULL, 0); } if (error) { @@ -1043,7 +1046,7 @@ ufs_whiteout(ap) newdir.d_namlen = cnp->cn_namelen; bcopy(cnp->cn_nameptr, newdir.d_name, (unsigned)cnp->cn_namelen + 1); newdir.d_type = DT_WHT; - error = ufs_direnter(dvp, NULL, &newdir, cnp, NULL); + error = ufs_direnter(dvp, NULL, &newdir, cnp, NULL, 0); break; case DELETE: @@ -1062,6 +1065,11 @@ ufs_whiteout(ap) return (error); } +static volatile int rename_restarts; +SYSCTL_INT(_vfs_ufs, OID_AUTO, rename_restarts, CTLFLAG_RD, + __DEVOLATILE(int *, &rename_restarts), 0, + "Times rename had to restart due to lock contention"); + /* * Rename system call. * rename("foo", "bar"); @@ -1101,111 +1109,185 @@ ufs_rename(ap) struct vnode *tdvp = ap->a_tdvp; struct vnode *fvp = ap->a_fvp; struct vnode *fdvp = ap->a_fdvp; + struct vnode *nvp; struct componentname *tcnp = ap->a_tcnp; struct componentname *fcnp = ap->a_fcnp; struct thread *td = fcnp->cn_thread; - struct inode *ip, *xp, *dp; + struct inode *fip, *tip, *tdp, *fdp; struct direct newdir; - int doingdirectory = 0, oldparent = 0, newparent = 0; + off_t endoff; + int doingdirectory, newparent; int error = 0, ioflag; - ino_t fvp_ino; + struct mount *mp; + ino_t ino; #ifdef INVARIANTS if ((tcnp->cn_flags & HASBUF) == 0 || (fcnp->cn_flags & HASBUF) == 0) panic("ufs_rename: no name"); #endif + endoff = 0; + mp = tdvp->v_mount; + VOP_UNLOCK(tdvp, 0); + if (tvp && tvp != tdvp) + VOP_UNLOCK(tvp, 0); /* * Check for cross-device rename. */ if ((fvp->v_mount != tdvp->v_mount) || (tvp && (fvp->v_mount != tvp->v_mount))) { error = EXDEV; -abortit: - if (tdvp == tvp) - vrele(tdvp); - else - vput(tdvp); - if (tvp) - vput(tvp); - vrele(fdvp); + mp = NULL; + goto releout; + } + error = vfs_busy(mp, 0); + if (error) { + mp = NULL; + goto releout; + } +relock: + /* + * We need to acquire 2 to 4 locks depending on whether tvp is NULL + * and fdvp and tdvp are the same directory. Subsequently we need + * to double-check all paths and in the directory rename case we + * need to verify that we are not creating a directory loop. To + * handle this we acquire all but fdvp using non-blocking + * acquisitions. If we fail to acquire any lock in the path we will + * drop all held locks, acquire the new lock in a blocking fashion, + * and then release it and restart the rename. This acquire/release + * step ensures that we do not spin on a lock waiting for release. + */ + error = vn_lock(fdvp, LK_EXCLUSIVE); + if (error) + goto releout; + if (vn_lock(tdvp, LK_EXCLUSIVE | LK_NOWAIT) != 0) { + VOP_UNLOCK(fdvp, 0); + error = vn_lock(tdvp, LK_EXCLUSIVE); + if (error) + goto releout; + VOP_UNLOCK(tdvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + /* + * Re-resolve fvp to be certain it still exists and fetch the + * correct vnode. + */ + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + goto releout; + } + error = VFS_VGET(mp, ino, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + if (error != EBUSY) + goto releout; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); vrele(fvp); - return (error); + fvp = nvp; + atomic_add_int(&rename_restarts, 1); + goto relock; + } + vrele(fvp); + fvp = nvp; + /* + * Re-resolve tvp and acquire the vnode lock if present. + */ + error = ufs_lookup_ino(tdvp, NULL, tcnp, &ino); + if (error != 0 && error != EJUSTRETURN) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + goto releout; } - + /* + * If tvp disappeared we just carry on. + */ + if (error == EJUSTRETURN && tvp != NULL) { + vrele(tvp); + tvp = NULL; + } + /* + * Get the tvp ino if the lookup succeeded. We may have to restart + * if the non-blocking acquire fails. + */ + if (error == 0) { + nvp = NULL; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE | LK_NOWAIT, &nvp); + if (tvp) + vrele(tvp); + tvp = nvp; + if (error) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(tdvp, 0); + VOP_UNLOCK(fvp, 0); + if (error != EBUSY) + goto releout; + error = VFS_VGET(mp, ino, LK_EXCLUSIVE, &nvp); + if (error != 0) + goto releout; + VOP_UNLOCK(nvp, 0); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + } + fdp = VTOI(fdvp); + fip = VTOI(fvp); + tdp = VTOI(tdvp); + tip = NULL; + if (tvp) + tip = VTOI(tvp); if (tvp && ((VTOI(tvp)->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) || (VTOI(tdvp)->i_flags & APPEND))) { error = EPERM; - goto abortit; + goto unlockout; } - /* * Renaming a file to itself has no effect. The upper layers should - * not call us in that case. Temporarily just warn if they do. + * not call us in that case. However, things could change after + * we drop the locks above. */ if (fvp == tvp) { - printf("ufs_rename: fvp == tvp (can't happen)\n"); error = 0; - goto abortit; + goto unlockout; } - - if ((error = vn_lock(fvp, LK_EXCLUSIVE)) != 0) - goto abortit; - dp = VTOI(fdvp); - ip = VTOI(fvp); - if (ip->i_nlink >= LINK_MAX) { - VOP_UNLOCK(fvp, 0); + doingdirectory = 0; + newparent = 0; + ino = fip->i_number; + if (fip->i_nlink >= LINK_MAX) { error = EMLINK; - goto abortit; + goto unlockout; } - if ((ip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) - || (dp->i_flags & APPEND)) { - VOP_UNLOCK(fvp, 0); + if ((fip->i_flags & (NOUNLINK | IMMUTABLE | APPEND)) + || (fdp->i_flags & APPEND)) { error = EPERM; - goto abortit; + goto unlockout; } - if ((ip->i_mode & IFMT) == IFDIR) { + if ((fip->i_mode & IFMT) == IFDIR) { /* * Avoid ".", "..", and aliases of "." for obvious reasons. */ if ((fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.') || - dp == ip || (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT || - (ip->i_flag & IN_RENAME)) { - VOP_UNLOCK(fvp, 0); + fdp == fip || + (fcnp->cn_flags | tcnp->cn_flags) & ISDOTDOT) { error = EINVAL; - goto abortit; + goto unlockout; } - ip->i_flag |= IN_RENAME; - oldparent = dp->i_number; + if (fdp->i_number != tdp->i_number) + newparent = tdp->i_number; doingdirectory = 1; } - vrele(fdvp); - - /* - * When the target exists, both the directory - * and target vnodes are returned locked. - */ - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); - - /* - * 1) Bump link count while we're moving stuff - * around. If we crash somewhere before - * completing our work, the link count - * may be wrong, but correctable. - */ - ip->i_effnlink++; - ip->i_nlink++; - DIP_SET(ip, i_nlink, ip->i_nlink); - ip->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - if ((error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | - DOINGASYNC(fvp)))) != 0) { - VOP_UNLOCK(fvp, 0); - goto bad; + if ((fvp->v_type == VDIR && fvp->v_mountedhere != NULL) || + (tvp != NULL && tvp->v_type == VDIR && + tvp->v_mountedhere != NULL)) { + error = EXDEV; + goto unlockout; } /* @@ -1214,35 +1296,55 @@ abortit: * directory hierarchy above the target, as this would * orphan everything below the source directory. Also * the user must have write permission in the source so - * as to be able to change "..". We must repeat the call - * to namei, as the parent directory is unlocked by the - * call to checkpath(). - */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); - fvp_ino = ip->i_number; - VOP_UNLOCK(fvp, 0); - if (oldparent != dp->i_number) - newparent = dp->i_number; + * as to be able to change "..". + */ if (doingdirectory && newparent) { - if (error) /* write access check above */ - goto bad; - if (xp != NULL) - vput(tvp); - error = ufs_checkpath(fvp_ino, dp, tcnp->cn_cred); + error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); if (error) - goto out; + goto unlockout; + error = ufs_checkpath(ino, fdp->i_number, tdp, tcnp->cn_cred, + &ino); + /* + * We encountered a lock that we have to wait for. Unlock + * everything else and VGET before restarting. + */ + if (ino) { + VOP_UNLOCK(fdvp, 0); + VOP_UNLOCK(fvp, 0); + VOP_UNLOCK(tdvp, 0); + if (tvp) + VOP_UNLOCK(tvp, 0); + error = VFS_VGET(mp, ino, LK_SHARED, &nvp); + if (error == 0) + vput(nvp); + atomic_add_int(&rename_restarts, 1); + goto relock; + } + if (error) + goto unlockout; if ((tcnp->cn_flags & SAVESTART) == 0) panic("ufs_rename: lost to startdir"); - VREF(tdvp); - error = relookup(tdvp, &tvp, tcnp); - if (error) - goto out; - vrele(tdvp); - dp = VTOI(tdvp); - xp = NULL; - if (tvp) - xp = VTOI(tvp); } + if (fip->i_effnlink == 0 || fdp->i_effnlink == 0 || + tdp->i_effnlink == 0) + panic("Bad effnlink fip %p, fdp %p, tdp %p", fip, fdp, tdp); + + /* + * 1) Bump link count while we're moving stuff + * around. If we crash somewhere before + * completing our work, the link count + * may be wrong, but correctable. + */ + fip->i_effnlink++; + fip->i_nlink++; + DIP_SET(fip, i_nlink, fip->i_nlink); + fip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(fvp)) + softdep_change_linkcnt(fip); + error = UFS_UPDATE(fvp, !(DOINGSOFTDEP(fvp) | DOINGASYNC(fvp))); + if (error) + goto bad; + /* * 2) If target doesn't exist, link the target * to the source and unlink the source. @@ -1250,52 +1352,37 @@ abortit: * entry to reference the source inode and * expunge the original entry's existence. */ - if (xp == NULL) { - if (dp->i_dev != ip->i_dev) + if (tip == NULL) { + if (tdp->i_dev != fip->i_dev) panic("ufs_rename: EXDEV"); - /* - * Account for ".." in new directory. - * When source and destination have the same - * parent we don't fool with the link count. - */ if (doingdirectory && newparent) { - if ((nlink_t)dp->i_nlink >= LINK_MAX) { + /* + * Account for ".." in new directory. + * When source and destination have the same + * parent we don't adjust the link count. The + * actual link modification is completed when + * .. is rewritten below. + */ + if ((nlink_t)tdp->i_nlink >= LINK_MAX) { error = EMLINK; goto bad; } - dp->i_effnlink++; - dp->i_nlink++; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | - DOINGASYNC(tdvp))); - if (error) - goto bad; } - ufs_makedirentry(ip, tcnp, &newdir); - error = ufs_direnter(tdvp, NULL, &newdir, tcnp, NULL); - if (error) { - if (doingdirectory && newparent) { - dp->i_effnlink--; - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; - if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); - (void)UFS_UPDATE(tdvp, 1); - } + ufs_makedirentry(fip, tcnp, &newdir); + error = ufs_direnter(tdvp, NULL, &newdir, tcnp, NULL, 1); + if (error) goto bad; - } - vput(tdvp); + /* Setup tdvp for directory compaction if needed. */ + if (tdp->i_count && tdp->i_endoff && + tdp->i_endoff < tdp->i_size) + endoff = tdp->i_endoff; } else { - if (xp->i_dev != dp->i_dev || xp->i_dev != ip->i_dev) + if (tip->i_dev != tdp->i_dev || tip->i_dev != fip->i_dev) panic("ufs_rename: EXDEV"); /* * Short circuit rename(foo, foo). */ - if (xp->i_number == ip->i_number) + if (tip->i_number == fip->i_number) panic("ufs_rename: same file"); /* * If the parent directory is "sticky", then the caller @@ -1303,7 +1390,7 @@ abortit: * destination of the rename. This implements append-only * directories. */ - if ((dp->i_mode & S_ISTXT) && + if ((tdp->i_mode & S_ISTXT) && VOP_ACCESS(tdvp, VADMIN, tcnp->cn_cred, td) && VOP_ACCESS(tvp, VADMIN, tcnp->cn_cred, td)) { error = EPERM; @@ -1314,9 +1401,9 @@ abortit: * to it. Also, ensure source and target are compatible * (both directories, or both not directories). */ - if ((xp->i_mode&IFMT) == IFDIR) { - if ((xp->i_effnlink > 2) || - !ufs_dirempty(xp, dp->i_number, tcnp->cn_cred)) { + if ((tip->i_mode & IFMT) == IFDIR) { + if ((tip->i_effnlink > 2) || + !ufs_dirempty(tip, tdp->i_number, tcnp->cn_cred)) { error = ENOTEMPTY; goto bad; } @@ -1329,20 +1416,30 @@ abortit: error = EISDIR; goto bad; } - error = ufs_dirrewrite(dp, xp, ip->i_number, - IFTODT(ip->i_mode), - (doingdirectory && newparent) ? newparent : doingdirectory); - if (error) - goto bad; if (doingdirectory) { if (!newparent) { - dp->i_effnlink--; + tdp->i_effnlink--; if (DOINGSOFTDEP(tdvp)) - softdep_change_linkcnt(dp); + softdep_change_linkcnt(tdp); } - xp->i_effnlink--; + tip->i_effnlink--; if (DOINGSOFTDEP(tvp)) - softdep_change_linkcnt(xp); + softdep_change_linkcnt(tip); + } + error = ufs_dirrewrite(tdp, tip, fip->i_number, + IFTODT(fip->i_mode), + (doingdirectory && newparent) ? newparent : doingdirectory); + if (error) { + if (doingdirectory) { + if (!newparent) { + tdp->i_effnlink++; + if (DOINGSOFTDEP(tdvp)) + softdep_change_linkcnt(tdp); + } + tip->i_effnlink++; + if (DOINGSOFTDEP(tvp)) + softdep_change_linkcnt(tip); + } } if (doingdirectory && !DOINGSOFTDEP(tvp)) { /* @@ -1357,115 +1454,107 @@ abortit: * them now. */ if (!newparent) { - dp->i_nlink--; - DIP_SET(dp, i_nlink, dp->i_nlink); - dp->i_flag |= IN_CHANGE; + tdp->i_nlink--; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; } - xp->i_nlink--; - DIP_SET(xp, i_nlink, xp->i_nlink); - xp->i_flag |= IN_CHANGE; + tip->i_nlink--; + DIP_SET(tip, i_nlink, tip->i_nlink); + tip->i_flag |= IN_CHANGE; ioflag = IO_NORMAL; if (!DOINGASYNC(tvp)) ioflag |= IO_SYNC; + /* Don't go to bad here as the new link exists. */ if ((error = UFS_TRUNCATE(tvp, (off_t)0, ioflag, tcnp->cn_cred, tcnp->cn_thread)) != 0) - goto bad; + goto unlockout; } - vput(tdvp); - vput(tvp); - xp = NULL; } /* - * 3) Unlink the source. + * 3) Unlink the source. We have to resolve the path again to + * fixup the directory offset and count for ufs_dirremove. */ - fcnp->cn_flags &= ~MODMASK; - fcnp->cn_flags |= LOCKPARENT | LOCKLEAF; - if ((fcnp->cn_flags & SAVESTART) == 0) - panic("ufs_rename: lost from startdir"); - VREF(fdvp); - error = relookup(fdvp, &fvp, fcnp); - if (error == 0) - vrele(fdvp); - if (fvp != NULL) { - xp = VTOI(fvp); - dp = VTOI(fdvp); - } else { - /* - * From name has disappeared. IN_RENAME is not sufficient - * to protect against directory races due to timing windows, - * so we have to remove the panic. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. - */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - vrele(ap->a_fvp); - return (0); + if (fdvp == tdvp) { + error = ufs_lookup_ino(fdvp, NULL, fcnp, &ino); + if (error) + panic("ufs_rename: from entry went away!"); + if (ino != fip->i_number) + panic("ufs_rename: ino mismatch %d != %d\n", ino, + fip->i_number); } /* - * Ensure that the directory entry still exists and has not - * changed while the new name has been entered. If the source is - * a file then the entry may have been unlinked or renamed. In - * either case there is no further work to be done. If the source - * is a directory then it cannot have been rmdir'ed; the IN_RENAME - * flag ensures that it cannot be moved by another rename or removed - * by a rmdir. - */ - if (xp != ip) { - /* - * From name resolves to a different inode. IN_RENAME is - * not sufficient protection against timing window races - * so we can't panic here. XXX the only real way - * to solve this issue is at a much higher level. By the - * time we hit ufs_rename() it's too late. - */ -#if 0 - if (doingdirectory) - panic("ufs_rename: lost dir entry"); -#endif - } else { + * If the source is a directory with a + * new parent, the link count of the old + * parent directory must be decremented + * and ".." set to point to the new parent. + */ + if (doingdirectory && newparent) { /* - * If the source is a directory with a - * new parent, the link count of the old - * parent directory must be decremented - * and ".." set to point to the new parent. + * If tip exists we simply use its link, otherwise we must + * add a new one. */ - if (doingdirectory && newparent) { - xp->i_offset = mastertemplate.dot_reclen; - ufs_dirrewrite(xp, dp, newparent, DT_DIR, 0); - cache_purge(fdvp); - } - error = ufs_dirremove(fdvp, xp, fcnp->cn_flags, 0); - xp->i_flag &= ~IN_RENAME; - } - if (dp) - vput(fdvp); - if (xp) - vput(fvp); - vrele(ap->a_fvp); + if (tip == NULL) { + tdp->i_effnlink++; + tdp->i_nlink++; + DIP_SET(tdp, i_nlink, tdp->i_nlink); + tdp->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(tdvp)) + softdep_change_linkcnt(tdp); + error = UFS_UPDATE(tdvp, !(DOINGSOFTDEP(tdvp) | + DOINGASYNC(tdvp))); + /* Don't go to bad here as the new link exists. */ + if (error) + goto unlockout; + } + fip->i_offset = mastertemplate.dot_reclen; + ufs_dirrewrite(fip, fdp, newparent, DT_DIR, 0); + cache_purge(fdvp); + } + error = ufs_dirremove(fdvp, fip, fcnp->cn_flags, 0); + +unlockout: + vput(fdvp); + vput(fvp); + if (tvp) + vput(tvp); + /* + * If compaction or fsync was requested do it now that other locks + * are no longer needed. + */ + if (error == 0 && endoff != 0) { +#ifdef UFS_DIRHASH + if (tdp->i_dirhash != NULL) + ufsdirhash_dirtrunc(tdp, endoff); +#endif + UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | IO_SYNC, tcnp->cn_cred, + td); + } + if (error == 0 && tdp->i_flag & IN_NEEDSYNC) + error = VOP_FSYNC(tdvp, MNT_WAIT, td); + vput(tdvp); + if (mp) + vfs_unbusy(mp); return (error); bad: - if (xp) - vput(ITOV(xp)); - vput(ITOV(dp)); -out: - if (doingdirectory) - ip->i_flag &= ~IN_RENAME; - if (vn_lock(fvp, LK_EXCLUSIVE) == 0) { - ip->i_effnlink--; - ip->i_nlink--; - DIP_SET(ip, i_nlink, ip->i_nlink); - ip->i_flag |= IN_CHANGE; - ip->i_flag &= ~IN_RENAME; - if (DOINGSOFTDEP(fvp)) - softdep_change_linkcnt(ip); - vput(fvp); - } else - vrele(fvp); + fip->i_effnlink--; + fip->i_nlink--; + DIP_SET(fip, i_nlink, fip->i_nlink); + fip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(fvp)) + softdep_change_linkcnt(fip); + goto unlockout; + +releout: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:10: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 09A9F106566C; Sun, 24 Apr 2011 11:10:54 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D49708FC0C; Sun, 24 Apr 2011 11:10:53 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 8F2D046B58; Sun, 24 Apr 2011 07:10:53 -0400 (EDT) Date: Sun, 24 Apr 2011 12:10:53 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: Message-ID: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 11:10:54 -0000 On Sun, 24 Apr 2011, Robert Watson wrote: > I agree with Bjoern that it is critical to address these issues in a timely > manner -- our users depend on reliable and easy upgrades, and it seems (on > face value) that significant work remains to be done to make that possible. > Our release is increasingly close, and it's important we keep the tree as > stable as possible so that merges of other straggling features can go > uneventfully. Just to follow up on the point: it's very important that the new ATA driver see as much testing exposure as possible -- that's one reason why paying close attention to the upgrade path. If we knock users off 9-CURRENT due to upgrade problems, then we'll reduce testing for this feature just as much as any others. This is a good reason to resolve the problems as quickly as possible! Robert From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 11:49: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 137CD106568D; Sun, 24 Apr 2011 11:49:19 +0000 (UTC) (envelope-from mavbsd@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 084D18FC1B; Sun, 24 Apr 2011 11:49:17 +0000 (UTC) Received: by bwz12 with SMTP id 12so1798187bwz.13 for ; Sun, 24 Apr 2011 04:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CkDt7KHNLROE+C/0J70nL6Xhhn+hh6cYEgCZ+qPnKDk=; b=vJucIhyXn2pK+sHYS78lYLbKFYiC0SZBlOgyagSNJUBi3rIvQtByN4a3GQYxOmi9IS ffAQ/Ie8PDbFIndReq3smg5chrAAKSgOrveEalmbxw9KpdkgKK/Y1hTBE/ttuhJShP8B Vozss2tWm4ns13hnYS31Wy0RDj/3TXr97L834= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=U/Xu68zQNL8McL7AfY/5iL6wukUW+YWhV+YCKFrj5aSw8unM/h/C5hx0HDnnqJiqRO /ULvvO+CfCdhYI3mL+BEcUdMHoZO4WhnuLZpyYQD5V/jA6flFlHF8eascMbhCLgXZ8YK trwxwgsKr6taNgTB8aIhIvYqfoqTvCXTzaxPU= Received: by 10.204.7.156 with SMTP id d28mr2545076bkd.28.1303645756650; Sun, 24 Apr 2011 04:49:16 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id c11sm2705938bkc.2.2011.04.24.04.49.15 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 04:49:16 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB40E39.5090905@FreeBSD.org> Date: Sun, 24 Apr 2011 14:49:13 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Robert Watson References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 11:49:19 -0000 On 24.04.2011 14:00, Robert Watson wrote: > On Sun, 24 Apr 2011, Alexander Motin wrote: >>> Are you going to address that on updating magic will make it work >>> within the next 2-4 weeks? >> >> s/ad[0-9]+/ada0/ should fit 90%. A bit more sophisticated script >> should fit most. In what place should I put that magic? >> >>> If you will not then thanks for screwing 50% of our users and please >>> back this out again. >> >> Reverting is not an option. _Constructive_ propositions are welcome. > > It is the policy of this project that the release engineering team has > final authority over what ships in a release. It is entirely within > scope to revert this change for 9.0 if issues with the upgrade path are > not addressed. My hope also that this path can be entirely avoided > through a rapid addressing of upgrade path issues that have been known > (and discussed on the mailing lists extensively) since you posted about > the work on the public mailing lists. > > I agree with Bjoern that it is critical to address these issues in a > timely manner -- our users depend on reliable and easy upgrades, and it > seems (on face value) that significant work remains to be done to make > that possible. Our release is increasingly close, and it's important we > keep the tree as stable as possible so that merges of other straggling > features can go uneventfully. I am asking for excuse if my tone was overly strict. It was not my real intention to offend anybody. May be inside I am indeed overreacting a bit on proposition to revert with no alternative things that I have put my heart into, which are broadly accepted by users, which I announced on the list few days ago and got no objections. I am sorry for that. I do worry about possible complications during migration process. And obviously this is not an easy question, as soon as it wasn't solved during so much time. I will gladly accept any help or real ideas people can provide. I just don't like to feel it my own problem. I am not doing it for myself. It would be nice to see some friendly support instead. Thank you. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 12:24: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 8A2EE106564A; Sun, 24 Apr 2011 12:24:38 +0000 (UTC) (envelope-from mavbsd@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 83A398FC17; Sun, 24 Apr 2011 12:24:37 +0000 (UTC) Received: by bwz12 with SMTP id 12so1810146bwz.13 for ; Sun, 24 Apr 2011 05:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=4OH98pWCol5il34UKbSZGSIo6RdFNM1M2w0B410ljKQ=; b=W1nXl4i5F/MOqIZOs+qYSuNp4+EZgmunU9ZG7NX/wpLe7avsg05UcLioaevaBAAe43 FuXeCSz7ZapjYD03lnNjaL8YoQ/TEizE35nTtQxMlVe9Fn/pQLAUwJKLsJpZI34H257T YhDh+NWUuncxHwUwTJUzzwvuUjSi2bg2mqlss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=iK9ZO6ZPFbApnY3Tk3g17I2EGgupKde6FhAMoL4z26GHhO8LegABC4jSE1SwHqS+OR aWdlcYLVDY9s/gQH5NDMPAo6qqXHk066/xqKtByEuMxjzEboOj4sE58T3yc0L+HmHLev 94NMRNrzdgyzJzKZu7I0C38PC8Q+eNt+0P24U= Received: by 10.204.3.146 with SMTP id 18mr2569856bkn.1.1303647875737; Sun, 24 Apr 2011 05:24:35 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id q24sm2713164bks.21.2011.04.24.05.24.34 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 05:24:35 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB41681.9020600@FreeBSD.org> Date: Sun, 24 Apr 2011 15:24:33 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Dan Mack References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> In-Reply-To: <20110424051747.S1757@coco.macktronics.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Best , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 12:24:38 -0000 On 24.04.2011 13:25, Dan Mack wrote: > On Sun, 24 Apr 2011, Alexander Best wrote: >> On Sun Apr 24 11, Alexander Motin wrote: >>> Author: mav >>> Date: Sun Apr 24 09:23:08 2011 >>> New Revision: 220983 >>> URL: http://svn.freebsd.org/changeset/base/220983 >>> >>> Log: >>> Explicitly note that device numbers are starting from zero. >>> >>> Modified: >>> head/UPDATING >>> >>> Modified: head/UPDATING >>> ============================================================================== >>> >>> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >>> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >>> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >>> removed and replaced by respective CAM drivers. If you are using >>> ATA device names in /etc/fstab or other places, make sure to update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for each type >>> + in order of detection, unless configured otherwise with tunables, >>> + see cam(4)). >> >> maybe an extra sentence mentioning the fact that {geom,ufs}-labels and >> ufsids >> are preferred over device nodes nowadays would be a good idea? > > For those of us using a ZFS root pool built out of /dev/gpt/ devices, > will these automagically pick up the new names? You should not notice transition. GPT labels should stay as they were. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 13:18: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 66590106566B; Sun, 24 Apr 2011 13:18:24 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4EB8FC14; Sun, 24 Apr 2011 13:18:23 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 76C2C45EA4; Sun, 24 Apr 2011 15:18:22 +0200 (CEST) Received: from localhost (mail.garage.freebsd.pl [10.0.4.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id AA70B45684; Sun, 24 Apr 2011 15:18:16 +0200 (CEST) Date: Sun, 24 Apr 2011 15:18:04 +0200 From: Pawel Jakub Dawidek To: Dan Mack Message-ID: <20110424131804.GB1872@garage.freebsd.pl> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m51xatjYGsM+13rf" Content-Disposition: inline In-Reply-To: <20110424051747.S1757@coco.macktronics.com> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 13:18:24 -0000 --m51xatjYGsM+13rf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 05:25:00AM -0500, Dan Mack wrote: > For those of us using a ZFS root pool built out of /dev/gpt/ > devices, will these automagically pick up the new names? Even if you use adX devices in your ZFS pool and they will suddenly change to adaY, ZFS should detect this properly and no manual intervention should be needed. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --m51xatjYGsM+13rf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk20IwsACgkQForvXbEpPzQIdACfVFAswjkt/b2G3VVWiWO4n0+1 zR4AmQGp8ZFAu+3hU/SGLjUMJ5KVWZdM =6Fcd -----END PGP SIGNATURE----- --m51xatjYGsM+13rf-- From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 13:22: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 4D4CA106564A; Sun, 24 Apr 2011 13:22:15 +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 3DB038FC0C; Sun, 24 Apr 2011 13:22: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 p3ODMFbN033360; Sun, 24 Apr 2011 13:22:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3ODMFMa033358; Sun, 24 Apr 2011 13:22:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104241322.p3ODMFMa033358@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 24 Apr 2011 13:22: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: r220987 - 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: Sun, 24 Apr 2011 13:22:15 -0000 Author: kib Date: Sun Apr 24 13:22:14 2011 New Revision: 220987 URL: http://svn.freebsd.org/changeset/base/220987 Log: Fix typo. MFC after: 3 days Modified: head/sys/sys/systm.h Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sun Apr 24 11:01:42 2011 (r220986) +++ head/sys/sys/systm.h Sun Apr 24 13:22:14 2011 (r220987) @@ -149,7 +149,7 @@ int nullop(void); int eopnotsupp(void); int ureadc(int, struct uio *); void hashdestroy(void *, struct malloc_type *, u_long); -void *hashinit(int count, struct malloc_type *type, u_long *hashmark); +void *hashinit(int count, struct malloc_type *type, u_long *hashmask); void *hashinit_flags(int count, struct malloc_type *type, u_long *hashmask, int flags); #define HASH_NOWAIT 0x00000001 From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 14:14: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 72F21106566C; Sun, 24 Apr 2011 14:14:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119]) by mx1.freebsd.org (Postfix) with ESMTP id 172A58FC08; Sun, 24 Apr 2011 14:14:06 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 329B75811B; Sun, 24 Apr 2011 09:14:06 -0500 (CDT) X-Virus-Scanned: amavisd-new at icecube.wisc.edu Received: from mail.icecube.wisc.edu ([127.0.0.1]) by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030) with ESMTP id kReVdMAqmRLn; Sun, 24 Apr 2011 09:14:06 -0500 (CDT) Received: from wanderer.tachypleus.net (unknown [76.210.65.155]) by mail.icecube.wisc.edu (Postfix) with ESMTP id 4C21D5811A; Sun, 24 Apr 2011 09:14:05 -0500 (CDT) Message-ID: <4DB4302B.5050501@freebsd.org> Date: Sun, 24 Apr 2011 09:14:03 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9 MIME-Version: 1.0 To: Robert Watson References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 14:14:07 -0000 On 04/24/11 05:49, Robert Watson wrote: > > On Sun, 24 Apr 2011, Alexander Best wrote: > >>> ============================================================================== >>> >>> --- head/UPDATING Sun Apr 24 08:58:58 2011 (r220982) >>> +++ head/UPDATING Sun Apr 24 09:23:08 2011 (r220983) >>> @@ -28,8 +28,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. >>> removed and replaced by respective CAM drivers. If you are using >>> ATA device names in /etc/fstab or other places, make sure to update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for each type >>> + in order of detection, unless configured otherwise with tunables, >>> + see cam(4)). >> >> maybe an extra sentence mentioning the fact that {geom,ufs}-labels and >> ufsids are preferred over device nodes nowadays would be a good idea? > > If this is true, that's what our installer needs to do. Does our > installer do that? > > (In general, a reasonable definition of "preferred" is "what the > installer does" -- if that's not the case, it's a serious bug.) Our installer does not do that. I outlined the reasons in another earlier email, but the summary is that labels seem to be somewhat fragile. Gpart supports a partition-generic labeling interface for three schemes: PC98, GPT, and APM. The installer now supports setting labels on all of these. The appearance of labeled geom providers happens in a different module, glabel, which relies on a totally parallel parse of the partition map. As a result, labeled partitions appearing in /dev works only on GPT volumes, and even then, due to endianness bugs, only on little-endian platforms. Glabel is also not guaranteed available by gpart, and I'm a little dubious that reparses happen at the correct time with 100% reliability. The other, more minor, difficulty, is that it is somewhat difficult to get the labeled provider name from the gpart provider (you have to try to cross-correlate names, and there may be many label providers to choose from for the same partition). If gpart were modified to provide label providers itself based on its generic labeling mechanism, and to provide the name of those providers in its config XML, using labels by default in the installer would be trivial and I would have it in the tree within 5 minutes of getting that commit mail. Unfortunately, I don't have time to do the requisite gpart modifications (which probably aren't that hard) at this time. -Nathan From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 14:50: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 C9AE1106566B; Sun, 24 Apr 2011 14:50:29 +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 7F47D8FC14; Sun, 24 Apr 2011 14:50: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 p3OEoTYa035855; Sun, 24 Apr 2011 14:50:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OEoT7W035852; Sun, 24 Apr 2011 14:50:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241450.p3OEoT7W035852@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 14:50: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: r220988 - 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: Sun, 24 Apr 2011 14:50:29 -0000 Author: adrian Date: Sun Apr 24 14:50:29 2011 New Revision: 220988 URL: http://svn.freebsd.org/changeset/base/220988 Log: Eliminate code duplication between AR5416/AR9160/AR9280 and AR9285. Writing the TX power registers is the same between all of these chips and later NICs (AR9287, AR9271 USB, etc.) so this will reduce code duplication when those NICs are added to the HAL. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 13:22:14 2011 (r220987) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 14:50:29 2011 (r220988) @@ -268,6 +268,8 @@ extern void ar5416WritePdadcValues(struc extern HAL_BOOL ar5416SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset); +extern void ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, + const struct ieee80211_channel *chan, const int16_t ratesArray[]); extern HAL_BOOL ar5416StopTxDma(struct ath_hal *ah, u_int q); extern HAL_BOOL ar5416SetupTxDesc(struct ath_hal *ah, struct ath_desc *ds, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 13:22:14 2011 (r220987) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 14:50:29 2011 (r220988) @@ -795,6 +795,99 @@ ar5416GetChipPowerLimits(struct ath_hal } /************************************************************** + * ar5416WriteTxPowerRateRegisters + * + * Write the TX power rate registers from the raw values given + * in ratesArray[]. + * + * The CCK and HT40 rate registers are only written if needed. + * HT20 and 11g/11a OFDM rate registers are always written. + * + * The values written are raw values which should be written + * to the registers - so it's up to the caller to pre-adjust + * them (eg CCK power offset value, or Merlin TX power offset, + * etc.) + */ +void +ar5416WriteTxPowerRateRegisters(struct ath_hal *ah, + const struct ieee80211_channel *chan, const int16_t ratesArray[]) +{ +#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) + + /* Write the OFDM power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, + POW_SM(ratesArray[rate18mb], 24) + | POW_SM(ratesArray[rate12mb], 16) + | POW_SM(ratesArray[rate9mb], 8) + | POW_SM(ratesArray[rate6mb], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, + POW_SM(ratesArray[rate54mb], 24) + | POW_SM(ratesArray[rate48mb], 16) + | POW_SM(ratesArray[rate36mb], 8) + | POW_SM(ratesArray[rate24mb], 0) + ); + + if (IEEE80211_IS_CHAN_2GHZ(chan)) { + /* Write the CCK power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, + POW_SM(ratesArray[rate2s], 24) + | POW_SM(ratesArray[rate2l], 16) + | POW_SM(ratesArray[rateXr], 8) /* XR target power */ + | POW_SM(ratesArray[rate1l], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, + POW_SM(ratesArray[rate11s], 24) + | POW_SM(ratesArray[rate11l], 16) + | POW_SM(ratesArray[rate5_5s], 8) + | POW_SM(ratesArray[rate5_5l], 0) + ); + HALDEBUG(ah, HAL_DEBUG_RESET, + "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", + __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), + OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); + } + + /* Write the HT20 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, + POW_SM(ratesArray[rateHt20_3], 24) + | POW_SM(ratesArray[rateHt20_2], 16) + | POW_SM(ratesArray[rateHt20_1], 8) + | POW_SM(ratesArray[rateHt20_0], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, + POW_SM(ratesArray[rateHt20_7], 24) + | POW_SM(ratesArray[rateHt20_6], 16) + | POW_SM(ratesArray[rateHt20_5], 8) + | POW_SM(ratesArray[rateHt20_4], 0) + ); + + if (IEEE80211_IS_CHAN_HT40(chan)) { + /* Write the HT40 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, + POW_SM(ratesArray[rateHt40_3], 24) + | POW_SM(ratesArray[rateHt40_2], 16) + | POW_SM(ratesArray[rateHt40_1], 8) + | POW_SM(ratesArray[rateHt40_0], 0) + ); + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, + POW_SM(ratesArray[rateHt40_7], 24) + | POW_SM(ratesArray[rateHt40_6], 16) + | POW_SM(ratesArray[rateHt40_5], 8) + | POW_SM(ratesArray[rateHt40_4], 0) + ); + /* Write the Dup/Ext 40 power per rate set */ + OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, + POW_SM(ratesArray[rateExtOfdm], 24) + | POW_SM(ratesArray[rateExtCck], 16) + | POW_SM(ratesArray[rateDupOfdm], 8) + | POW_SM(ratesArray[rateDupCck], 0) + ); + } +} + + +/************************************************************** * ar5416SetTransmitPower * * Set the transmit power in the baseband for the given @@ -804,7 +897,6 @@ HAL_BOOL ar5416SetTransmitPower(struct ath_hal *ah, const struct ieee80211_channel *chan, uint16_t *rfXpdGain) { -#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) #define N(a) (sizeof (a) / sizeof (a[0])) MODAL_EEP_HEADER *pModal; @@ -943,78 +1035,27 @@ ar5416SetTransmitPower(struct ath_hal *a } } - /* Write the OFDM power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, - POW_SM(ratesArray[rate18mb], 24) - | POW_SM(ratesArray[rate12mb], 16) - | POW_SM(ratesArray[rate9mb], 8) - | POW_SM(ratesArray[rate6mb], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, - POW_SM(ratesArray[rate54mb], 24) - | POW_SM(ratesArray[rate48mb], 16) - | POW_SM(ratesArray[rate36mb], 8) - | POW_SM(ratesArray[rate24mb], 0) - ); - - if (IEEE80211_IS_CHAN_2GHZ(chan)) { - /* Write the CCK power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, - POW_SM(ratesArray[rate2s], 24) - | POW_SM(ratesArray[rate2l], 16) - | POW_SM(ratesArray[rateXr], 8) /* XR target power */ - | POW_SM(ratesArray[rate1l], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, - POW_SM(ratesArray[rate11s], 24) - | POW_SM(ratesArray[rate11l], 16) - | POW_SM(ratesArray[rate5_5s], 8) - | POW_SM(ratesArray[rate5_5l], 0) - ); - HALDEBUG(ah, HAL_DEBUG_RESET, - "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", - __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), - OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); - } - - /* Write the HT20 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, - POW_SM(ratesArray[rateHt20_3], 24) - | POW_SM(ratesArray[rateHt20_2], 16) - | POW_SM(ratesArray[rateHt20_1], 8) - | POW_SM(ratesArray[rateHt20_0], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, - POW_SM(ratesArray[rateHt20_7], 24) - | POW_SM(ratesArray[rateHt20_6], 16) - | POW_SM(ratesArray[rateHt20_5], 8) - | POW_SM(ratesArray[rateHt20_4], 0) - ); - + /* + * Adjust the HT40 power to meet the correct target TX power + * for 40MHz mode, based on TX power curves that are established + * for 20MHz mode. + * + * XXX handle overflow/too high power level? + */ if (IEEE80211_IS_CHAN_HT40(chan)) { - /* Write the HT40 power per rate set */ - /* Correct PAR difference between HT40 and HT20/LEGACY */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, - POW_SM(ratesArray[rateHt40_3] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_2] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_1] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_0] + ht40PowerIncForPdadc, 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, - POW_SM(ratesArray[rateHt40_7] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_6] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_5] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_4] + ht40PowerIncForPdadc, 0) - ); - /* Write the Dup/Ext 40 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, - POW_SM(ratesArray[rateExtOfdm], 24) - | POW_SM(ratesArray[rateExtCck], 16) - | POW_SM(ratesArray[rateDupOfdm], 8) - | POW_SM(ratesArray[rateDupCck], 0) - ); + ratesArray[rateHt40_0] += ht40PowerIncForPdadc; + ratesArray[rateHt40_1] += ht40PowerIncForPdadc; + ratesArray[rateHt40_2] += ht40PowerIncForPdadc; + ratesArray[rateHt40_3] += ht40PowerIncForPdadc; + ratesArray[rateHt40_4] += ht40PowerIncForPdadc; + ratesArray[rateHt40_5] += ht40PowerIncForPdadc; + ratesArray[rateHt40_6] += ht40PowerIncForPdadc; + ratesArray[rateHt40_7] += ht40PowerIncForPdadc; } + /* Write the TX power rate registers */ + ar5416WriteTxPowerRateRegisters(ah, chan, ratesArray); + /* Write the Power subtraction for dynamic chain changing, for per-packet powertx */ OS_REG_WRITE(ah, AR_PHY_POWER_TX_SUB, POW_SM(pModal->pwrDecreaseFor3Chain, 6) From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:28: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 C5360106566C; Sun, 24 Apr 2011 15:28:53 +0000 (UTC) (envelope-from mavbsd@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 8EC4C8FC15; Sun, 24 Apr 2011 15:28:52 +0000 (UTC) Received: by bwz12 with SMTP id 12so1883540bwz.13 for ; Sun, 24 Apr 2011 08:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=3tfzIgQrd2esgkvDlGjboHE+sLMyHNXa+nYSEYccUhM=; b=aLGHIoBSpqes+fY71x31ruqw3QRMJ4/4fA2C+jKceoWw+OxgMvm3Dr6zVxvBbPCsJN LE7OkntXHVW6/LmiBD7pbejasZT79sHUKtQfIdNdBZx6E04Zhi+Fuc+YdxMbmYghc7o7 IbsFURF38iRVe6CqyWY42G7QXV3oWUE8MoSIE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=EUz1tyoyBPylsA+9z2xy3JCyLz5PmLikbdM1n8r2CR5GDSosU4OTUv+D6+iK0BgIAF Jtbg/k5H9VrOCpKIcx4MDvR9RKAraQIIuDBTA0TPqExI38GJti8fxaES4uTNrgn3iqYx X85OBx0soEaQU1nERiqUb39aIqEuT1zG3CFV4= Received: by 10.204.154.219 with SMTP id p27mr2639631bkw.110.1303658931183; Sun, 24 Apr 2011 08:28:51 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w3sm2792693bkt.5.2011.04.24.08.28.49 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 08:28:50 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB441B0.8020906@FreeBSD.org> Date: Sun, 24 Apr 2011 18:28:48 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Robert Watson References: <201104240858.p3O8wwqT024628@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 0.96.0 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, "Bjoern A. Zeeb" Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 15:28:53 -0000 Robert Watson wrote: > I'm very pleased to see a continued movement towards the new ATA code; > it offers clear benefits to all of our users, and is definitely > something we want done for 9.0. > > Could you say more about the migration strategy for users? I recall > that when you proposed throwing this switch, several strategies were > discussed (likely in combination to handle both the immediate upgrade > stumble issue and a longer-term migration): > > (1) Teach new ata parts to replicate the old naming convention in 99.9% of > cases. Or some suppport module that creates the required symlinks if > loaded (and we load it by default in 9.0, phasing it out later with > appropriate boot-time warnings for 6-12 months). Obviously, this > would be > best-effort, but if it takes us from a 40% upgrade failure to a 1% > upgrade > failure, that's a big deal. > > (2) Over time, provide a migration to fstab naming storage targets by > volume > ID / name / serial number, rather than by hardware path. A good > long-term > strategy but one that requires changes to the installer, upgrade path, > etc. > > (3) Teach freebsd-update/installer/etc to recognise *before* a new > kernel is > installed whether the current configuration will require hand-holding. > > (4) Thinking pretty hard about the roll-back path to avoid stumbles when > there's a problem following a kernel update. In the past, linking > kernel > feature updates to /etc or userspace updates has caused significant > issues > for our users, who reasonably expect to follow our normal "install the > kernel, reboot, let it sit for a week" path. > > What is your plan for implementing some combination of these (or did I > miss the commits that brought them in already)? In the past, we've seen > upgrade path problems dislodge users, and since then, we've grown an > increased assumption of ease-of-upgrade that can be managed > automatically by tools like freebsd-update. Breaking the automated > upgrade (and roll-back) path would be extremely problematic. I was hoping to not expand migration process onto another decade. Many users already migrated to the new infrastructure on both STABLE and CURRENT and AFAIK editing fstab was not a major problem for them. Since the last big discussion of this question about year ago we got graid implemented and some other things required to keep previous functionality, that could hold users from migration. Making this commit now I was prepared to spend few weeks on active bug fixing to minimize number of further rollback cases. So at this moment device names change is the last major problem I know. Yes, it was the same year ago, but there was same discussion as the last week about using labels in fstab, that equally ended with nothing. :( What's about creating some kind of symlinks, it could be nice if it worked, but I don't see the way to do it on disk(9) or GEOM layers without breaking device's access counters and as result further random problems. Looking now on these "do or revert" demands to keep old device naming, I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" names. I see it in form of some loader tunable, disabled by default (as it should be on newly installed systems), but that could be set prior to upgrade if user doesn't want to bother with device names at that moment. It should partially hide problem for some time. Will such solution be acceptable? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:48: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 B2BAB106566C; Sun, 24 Apr 2011 15:48: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 A17CA8FC08; Sun, 24 Apr 2011 15:48: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 p3OFm7cw037599; Sun, 24 Apr 2011 15:48:07 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OFm7kr037597; Sun, 24 Apr 2011 15:48:07 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241548.p3OFm7kr037597@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 15:48: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: r220989 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 15:48:08 -0000 Author: adrian Date: Sun Apr 24 15:48:07 2011 New Revision: 220989 URL: http://svn.freebsd.org/changeset/base/220989 Log: Use the refactored ar5416WriteTxPowerRateRegisters() call in the ar9285 code. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sun Apr 24 14:50:29 2011 (r220988) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Sun Apr 24 15:48:07 2011 (r220989) @@ -148,76 +148,27 @@ ar9285SetTransmitPower(struct ath_hal *a ar5416PrintPowerPerRate(ah, ratesArray); #endif - /* Write the OFDM power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE1, - POW_SM(ratesArray[rate18mb], 24) - | POW_SM(ratesArray[rate12mb], 16) - | POW_SM(ratesArray[rate9mb], 8) - | POW_SM(ratesArray[rate6mb], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE2, - POW_SM(ratesArray[rate54mb], 24) - | POW_SM(ratesArray[rate48mb], 16) - | POW_SM(ratesArray[rate36mb], 8) - | POW_SM(ratesArray[rate24mb], 0) - ); - - /* Write the CCK power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE3, - POW_SM(ratesArray[rate2s], 24) - | POW_SM(ratesArray[rate2l], 16) - | POW_SM(ratesArray[rateXr], 8) /* XR target power */ - | POW_SM(ratesArray[rate1l], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE4, - POW_SM(ratesArray[rate11s], 24) - | POW_SM(ratesArray[rate11l], 16) - | POW_SM(ratesArray[rate5_5s], 8) - | POW_SM(ratesArray[rate5_5l], 0) - ); - HALDEBUG(ah, HAL_DEBUG_RESET, - "%s AR_PHY_POWER_TX_RATE3=0x%x AR_PHY_POWER_TX_RATE4=0x%x\n", - __func__, OS_REG_READ(ah,AR_PHY_POWER_TX_RATE3), - OS_REG_READ(ah,AR_PHY_POWER_TX_RATE4)); - - /* Write the HT20 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE5, - POW_SM(ratesArray[rateHt20_3], 24) - | POW_SM(ratesArray[rateHt20_2], 16) - | POW_SM(ratesArray[rateHt20_1], 8) - | POW_SM(ratesArray[rateHt20_0], 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE6, - POW_SM(ratesArray[rateHt20_7], 24) - | POW_SM(ratesArray[rateHt20_6], 16) - | POW_SM(ratesArray[rateHt20_5], 8) - | POW_SM(ratesArray[rateHt20_4], 0) - ); - + /* + * Adjust the HT40 power to meet the correct target TX power + * for 40MHz mode, based on TX power curves that are established + * for 20MHz mode. + * + * XXX handle overflow/too high power level? + */ if (IEEE80211_IS_CHAN_HT40(chan)) { - /* Write the HT40 power per rate set */ - /* Correct PAR difference between HT40 and HT20/LEGACY */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE7, - POW_SM(ratesArray[rateHt40_3] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_2] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_1] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_0] + ht40PowerIncForPdadc, 0) - ); - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE8, - POW_SM(ratesArray[rateHt40_7] + ht40PowerIncForPdadc, 24) - | POW_SM(ratesArray[rateHt40_6] + ht40PowerIncForPdadc, 16) - | POW_SM(ratesArray[rateHt40_5] + ht40PowerIncForPdadc, 8) - | POW_SM(ratesArray[rateHt40_4] + ht40PowerIncForPdadc, 0) - ); - /* Write the Dup/Ext 40 power per rate set */ - OS_REG_WRITE(ah, AR_PHY_POWER_TX_RATE9, - POW_SM(ratesArray[rateExtOfdm], 24) - | POW_SM(ratesArray[rateExtCck], 16) - | POW_SM(ratesArray[rateDupOfdm], 8) - | POW_SM(ratesArray[rateDupCck], 0) - ); + ratesArray[rateHt40_0] += ht40PowerIncForPdadc; + ratesArray[rateHt40_1] += ht40PowerIncForPdadc; + ratesArray[rateHt40_2] += ht40PowerIncForPdadc; + ratesArray[rateHt40_3] += ht40PowerIncForPdadc; + ratesArray[rateHt40_4] += ht40PowerIncForPdadc; + ratesArray[rateHt40_5] += ht40PowerIncForPdadc; + ratesArray[rateHt40_6] += ht40PowerIncForPdadc; + ratesArray[rateHt40_7] += ht40PowerIncForPdadc; } + /* Write the TX power rate registers */ + ar5416WriteTxPowerRateRegisters(ah, chan, ratesArray); + return AH_TRUE; #undef POW_SM #undef N From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 15:53: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 C3AAF106564A; Sun, 24 Apr 2011 15:53:57 +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 A7B148FC19; Sun, 24 Apr 2011 15:53: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 p3OFrv4t037801; Sun, 24 Apr 2011 15:53:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OFrvIi037797; Sun, 24 Apr 2011 15:53:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104241553.p3OFrvIi037797@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Apr 2011 15:53: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: r220990 - 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: Sun, 24 Apr 2011 15:53:58 -0000 Author: adrian Date: Sun Apr 24 15:53:57 2011 New Revision: 220990 URL: http://svn.freebsd.org/changeset/base/220990 Log: Break out the PLL setup into an overridable method. The only method right now is ar5416InitPLL() which handles multiple chipsets; this can now be overridden by newer chipset HAL code. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Sun Apr 24 15:53:57 2011 (r220990) @@ -103,6 +103,10 @@ struct ath_hal_5416 { const struct ieee80211_channel *chan, int16_t *pTxPowerIndexOffset); + /* baseband operations */ + void (*ah_initPLL) (struct ath_hal *ah, + const struct ieee80211_channel *chan); + u_int ah_globaltxtimeout; /* global tx timeout */ u_int ah_gpioMask; int ah_hangs; /* h/w hangs state */ @@ -248,6 +252,8 @@ extern void ar5416EepromSetAddac(struct const struct ieee80211_channel *chan); extern uint16_t ar5416GetMaxEdgePower(uint16_t freq, CAL_CTL_EDGES *pRdEdgesPower, HAL_BOOL is2GHz); +extern void ar5416InitPLL(struct ath_hal *ah, + const struct ieee80211_channel *chan); /* TX power setup related routines in ar5416_reset.c */ extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah, Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sun Apr 24 15:53:57 2011 (r220990) @@ -181,6 +181,9 @@ ar5416InitState(struct ath_hal_5416 *ahp AH5416(ah)->ah_writeIni = ar5416WriteIni; AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate; + /* Internal baseband ops */ + AH5416(ah)->ah_initPLL = ar5416InitPLL; + /* Internal calibration ops */ AH5416(ah)->ah_cal_initcal = ar5416InitCalHardware; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 15:48:07 2011 (r220989) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sun Apr 24 15:53:57 2011 (r220990) @@ -54,7 +54,6 @@ static void ar5416SetDeltaSlope(struct a static HAL_BOOL ar5416SetResetPowerOn(struct ath_hal *ah); static HAL_BOOL ar5416SetReset(struct ath_hal *ah, int type); -static void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan); static HAL_BOOL ar5416SetPowerPerRateTable(struct ath_hal *ah, struct ar5416eeprom *pEepData, const struct ieee80211_channel *chan, int16_t *ratesArray, @@ -513,7 +512,7 @@ ar5416InitBB(struct ath_hal *ah, const s /* Turn on PLL on 5416 */ HALDEBUG(ah, HAL_DEBUG_RESET, "%s %s channel\n", __func__, IEEE80211_IS_CHAN_5GHZ(chan) ? "5GHz" : "2GHz"); - ar5416InitPLL(ah, chan); + AH5416(ah)->ah_initPLL(ah, chan); /* Activate the PHY (includes baseband activate and synthesizer on) */ OS_REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN); @@ -655,7 +654,7 @@ ar5416ChipReset(struct ath_hal *ah, cons if (!ar5416SetPowerMode(ah, HAL_PM_AWAKE, AH_TRUE)) return AH_FALSE; - ar5416InitPLL(ah, chan); + AH5416(ah)->ah_initPLL(ah, chan); /* * Perform warm reset before the mode/PLL/turbo registers @@ -1221,7 +1220,7 @@ ar5416SetReset(struct ath_hal *ah, int t OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS); } - ar5416InitPLL(ah, AH_NULL); + AH5416(ah)->ah_initPLL(ah, AH_NULL); return AH_TRUE; } @@ -1278,7 +1277,7 @@ ar5416UpdateChainMasks(struct ath_hal *a #define IS_5GHZ_FAST_CLOCK_EN(ah, chan) AH_FALSE #endif -static void +void ar5416InitPLL(struct ath_hal *ah, const struct ieee80211_channel *chan) { uint32_t pll; From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:32:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D46CA1065675; Sun, 24 Apr 2011 16:32:58 +0000 (UTC) Date: Sun, 24 Apr 2011 16:32:58 +0000 From: Alexey Dokuchaev To: Alexander Motin Message-ID: <20110424163258.GA32595@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4DB441B0.8020906@FreeBSD.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, "Bjoern A. Zeeb" , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 16:32:58 -0000 On Sun, Apr 24, 2011 at 06:28:48PM +0300, Alexander Motin wrote: > What's about creating some kind of symlinks, it could be nice if it > worked, but I don't see the way to do it on disk(9) or GEOM layers > without breaking device's access counters and as result further random > problems. Speaking on Alexander's side, I'd want to mention that many of our users had been bitten by obscure adX naming during past years (largely due to ATA_STATIC_ID option which was probably useful back in times when there typically was only one IDE controller present in system, but leads to all sorts of weird ad4-6-8's in recent years) had already migrated to glabel or GPT labels, to avoid precisely the issues we're talking about here. ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:34: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 058EC106566B; Sun, 24 Apr 2011 16:34:48 +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 7753F8FC15; Sun, 24 Apr 2011 16:34:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.4/8.14.4) with ESMTP id p3OGJZ1a018933; Sun, 24 Apr 2011 20:19:35 +0400 (MSD) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.4/8.14.4/Submit) id p3OGJYxp018932; Sun, 24 Apr 2011 20:19:34 +0400 (MSD) (envelope-from ache) Date: Sun, 24 Apr 2011 20:19:33 +0400 From: Andrey Chernov To: Alexander Motin Message-ID: <20110424161933.GA18775@vniz.net> Mail-Followup-To: Andrey Chernov , Alexander Motin , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201104240923.p3O9N8QG025386@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240923.p3O9N8QG025386@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: r220983 - 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: Sun, 24 Apr 2011 16:34:48 -0000 On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: > ATA device names in /etc/fstab or other places, make sure to update > them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, > - where 'Y's are the sequential numbers for each type in order of > - detection, unless configured otherwise with tunables, see cam(4)). > + where 'Y's are the sequential numbers starting from zero for each type > + in order of detection, unless configured otherwise with tunables, > + see cam(4)). Is there any way to guess resulting 'Y' numbers _before_ booting new kernel? I have remote machine with console access almost impossible (very hard for me). It seems something like vfs.root.mountfrom="ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." (up to max channels) helps to find root, but what about other mounted disks? -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:38:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D120106570E; Sun, 24 Apr 2011 16:38:12 +0000 (UTC) (envelope-from mavbsd@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 5244D8FC14; Sun, 24 Apr 2011 16:38:10 +0000 (UTC) Received: by bwz12 with SMTP id 12so1912701bwz.13 for ; Sun, 24 Apr 2011 09:38:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=mQ9jtXZaWNdfFS3GnvVUOqcrM8JMxsoRNWgLSuNNJQ4=; b=EtxMusBv3DdupbHcT3lpAbBMmhSDv/1tyDyUA5tlPhpPF2opNd0ZCc73ANb2vVVpy1 9RFRcX3HMYwF5qN8hguzq9rTM9u/mcSgddiZ3FyKgcXAJ6AXEClTevbXETyMPgQyRnpa sg6nU19du34bEv0wFulTBRvFC9ens1qSACl2I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=eXIrC/clZRq7XZvhmyXFdbCfX8T/wekHduHrD+Rge54F/y7EEqQOmmscsiyr4bbh4F wt+CUqI76emE1Q3bTwrQ6LRuvHY/vVtKfQyqRN7uM4jP5U6pOaWqQZBSymr/qB2/sdRT eO1R5QUTU933q/8Fc3oIZYKdONXi8izAZPqHs= Received: by 10.204.74.218 with SMTP id v26mr665216bkj.76.1303663089903; Sun, 24 Apr 2011 09:38:09 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u15sm215732bkf.4.2011.04.24.09.38.08 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 09:38:09 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB451EF.8090301@FreeBSD.org> Date: Sun, 24 Apr 2011 19:38:07 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Andrey Chernov , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> In-Reply-To: <20110424161933.GA18775@vniz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 16:38:12 -0000 On 24.04.2011 19:19, Andrey Chernov wrote: > On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >> ATA device names in /etc/fstab or other places, make sure to update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see cam(4)). >> + where 'Y's are the sequential numbers starting from zero for each type >> + in order of detection, unless configured otherwise with tunables, >> + see cam(4)). > > Is there any way to guess resulting 'Y' numbers _before_ booting new > kernel? I have remote machine with console access almost impossible (very > hard for me). In most cases order of adaX devices should match order of ad devices, so first adX will become ada0, second - ada1, etc. The only exception there should be devices on ATA channels in legacy/ISA emulation mode: ata0 (ad0/ad1) and ata1 (ad2/ad3). Old ATA always allocated these devices first, but new ATA will allocate them as any other in order of their channels registration. That order you can see in dmesg. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:54: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 6F41E106566C; Sun, 24 Apr 2011 16:54:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 441DB8FC08; Sun, 24 Apr 2011 16:54:49 +0000 (UTC) Received: from [192.168.2.112] (host86-147-11-178.range86-147.btcentralplus.com [86.147.11.178]) by cyrus.watson.org (Postfix) with ESMTPSA id E975046B49; Sun, 24 Apr 2011 12:54:47 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20110424163258.GA32595@FreeBSD.org> Date: Sun, 24 Apr 2011 17:54:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <69D8AAE8-253B-4BD1-83E3-F300FCF3316C@FreeBSD.org> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110424163258.GA32595@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, "Bjoern A. Zeeb" , svn-src-all@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 16:54:49 -0000 On 24 Apr 2011, at 17:32, Alexey Dokuchaev wrote: > On Sun, Apr 24, 2011 at 06:28:48PM +0300, Alexander Motin wrote: >> What's about creating some kind of symlinks, it could be nice if it >> worked, but I don't see the way to do it on disk(9) or GEOM layers >> without breaking device's access counters and as result further = random >> problems. >=20 > Speaking on Alexander's side, I'd want to mention that many of our = users > had been bitten by obscure adX naming during past years (largely due = to > ATA_STATIC_ID option which was probably useful back in times when = there > typically was only one IDE controller present in system, but leads to = all > sorts of weird ad4-6-8's in recent years) had already migrated to = glabel > or GPT labels, to avoid precisely the issues we're talking about here. Yes, the argument is not over whether the change should be made, but how = we can get it done in time for 9.0-RELEASE in such a way that it = minimises disruption for our users. Clearly, we need the new AHCI driver = as the default in the release. But if we make upgrading (and rolling = back) significantly harder, that hurts us a lot. Ideally, we would have = shipped the migration parts in 8.2 so that 9.0 was a driver change = event, not a device naming model change event (easing in the = administrative hurdle). Robert= From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 16:57: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 071A6106564A; Sun, 24 Apr 2011 16:57:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CFE8B8FC0C; Sun, 24 Apr 2011 16:57:05 +0000 (UTC) Received: from [192.168.2.112] (host86-147-11-178.range86-147.btcentralplus.com [86.147.11.178]) by cyrus.watson.org (Postfix) with ESMTPSA id 805DD46B38; Sun, 24 Apr 2011 12:57:04 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <4DB40E39.5090905@FreeBSD.org> Date: Sun, 24 Apr 2011 17:57:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <77FE817D-D548-4B79-A64B-C890D94323B9@FreeBSD.org> <4DB40026.5030405@FreeBSD.org> <4DB40E39.5090905@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 16:57:06 -0000 On 24 Apr 2011, at 12:49, Alexander Motin wrote: >>> Reverting is not an option. _Constructive_ propositions are welcome. >>=20 >> It is the policy of this project that the release engineering team = has >> final authority over what ships in a release. It is entirely within >> scope to revert this change for 9.0 if issues with the upgrade path = are >> not addressed. My hope also that this path can be entirely avoided >> through a rapid addressing of upgrade path issues that have been = known >> (and discussed on the mailing lists extensively) since you posted = about >> the work on the public mailing lists. >>=20 >> I agree with Bjoern that it is critical to address these issues in a >> timely manner -- our users depend on reliable and easy upgrades, and = it >> seems (on face value) that significant work remains to be done to = make >> that possible. Our release is increasingly close, and it's important = we >> keep the tree as stable as possible so that merges of other = straggling >> features can go uneventfully. >=20 > I am asking for excuse if my tone was overly strict. It was not my = real intention to offend anybody. May be inside I am indeed overreacting = a bit on proposition to revert with no alternative things that I have = put my heart into, which are broadly accepted by users, which I = announced on the list few days ago and got no objections. I am sorry for = that. >=20 > I do worry about possible complications during migration process. And = obviously this is not an easy question, as soon as it wasn't solved = during so much time. I will gladly accept any help or real ideas people = can provide. I just don't like to feel it my own problem. I am not doing = it for myself. It would be nice to see some friendly support instead. Let's be clear: Bjoern didn't say you should revert it immediately. He = said that the migration path needs to be fixed in the next month (2-4 = weeks). That leaves plenty of time to resolve these issues, which I = think the consensus is should have been resolved before committing the = switch, not after. But given that it's in the tree, let's leave it there = for now to continue to improve our testing exposure, and try to get it = fixed as quickly as possible. Robert= From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 17:34: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 96B67106566B; Sun, 24 Apr 2011 17:34:22 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 4627D8FC0A; Sun, 24 Apr 2011 17:34:20 +0000 (UTC) Received: from [192.168.1.9] (cm-84.215.40.84.getinternet.no [84.215.40.84]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3OHY6eN019475 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 03:04:09 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <20110424161933.GA18775@vniz.net> Date: Sun, 24 Apr 2011 19:34:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> To: Andrey Chernov X-Mailer: Apple Mail (2.1084) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 17:34:22 -0000 On 24/04/2011, at 18:19, Andrey Chernov wrote: > On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >> ATA device names in /etc/fstab or other places, make sure to = update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX = -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see = cam(4)). >> + where 'Y's are the sequential numbers starting from zero for = each type >> + in order of detection, unless configured otherwise with = tunables, >> + see cam(4)). >=20 > Is there any way to guess resulting 'Y' numbers _before_ booting new=20= > kernel? I have remote machine with console access almost impossible = (very=20 > hard for me). >=20 > It seems something like > vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." > (up to max channels) helps to find root, but what about other mounted=20= > disks? The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on = a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. The following shell snippet will generate the UFS ID for a given FS. getfsid() { line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` if [ $? -ne 0 ]; then return 1 fi # dumpfs doesn't print leading 0s eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ = ]/printf %0x $((0x\1 << 32 | 0x\2))/p'` } -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 18:59: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 6956E106564A; Sun, 24 Apr 2011 18:59:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id E1F638FC14; Sun, 24 Apr 2011 18:59:44 +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 A1B4825D3857; Sun, 24 Apr 2011 18:59:43 +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 04772159DB43; Sun, 24 Apr 2011 18:59:43 +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 joRQkvUrB5sn; Sun, 24 Apr 2011 18:59:41 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4ACA0159DB42; Sun, 24 Apr 2011 18:59:41 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4DB441B0.8020906@FreeBSD.org> Date: Sun, 24 Apr 2011 18:59:40 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 18:59:45 -0000 On Apr 24, 2011, at 3:28 PM, Alexander Motin wrote: > I was hoping to not expand migration process onto another decade. Many > users already migrated to the new infrastructure on both STABLE and > CURRENT and AFAIK editing fstab was not a major problem for them. Do not think that based on the hundred replies on the lists in two years, that any of the hundreds of thousands of machines you haven't heard of were migrated. A LOT of people simply run on defaults we provide. > ... So at this moment device names change > is the last major problem I know. Yes, it was the same year ago, but > there was same discussion as the last week about using labels in fstab, > that equally ended with nothing. :( I am sorry if I was too direct with the "fix it the next weeks or backout" earlier today. As I had said on current@ I have migrated machines myself and am testing things where possible and it's a good thing to move to. As I had also said on current@ "we must not screw our users and need transition magic". I think a couple of others just didn't repeat what was said months ago. > What's about creating some kind of symlinks, it could be nice if it > worked, but I don't see the way to do it on disk(9) or GEOM layers > without breaking device's access counters and as result further random > problems. I had been pondering devfs "link"s myself, the problem is that from the rc framework they come too late. If you can add a simple .ko that does it programmatically on 9 that would be great. The problem is that after booting the new kernel you don't know whether people had ATA_STATIC on or not, so we'd have to go with the defaults, that were in 8.x (and an extra tunable to flip the logic maybe)? > Looking now on these "do or revert" demands to keep old device naming, > I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" > names. I see it in form of some loader tunable, disabled by default (as > it should be on newly installed systems), but that could be set prior to > upgrade if user doesn't want to bother with device names at that moment. > It should partially hide problem for some time. It would need to be in and on by default for the lifetime of 9 as it's not in the last 8.x release (which would need it the other way round anyway. MIght it be a good idea to do that as well afterwards providing ada links on the next 8.x release?). The user could disable it after the conversion happened though with a tunable to get rid of the extra /dev/* noise. We could even check for it being on and check fstab and warn/pester the user then that he'll need to migrate (on boot from rc.d, in weekly mails, ...). If we have both information available (old from the kernel transition code) and new we could even provide a script to do it. The reason we might not want to do it automatically is that if the user will decide to boot kernel.old because the new kernel panics after 2 days, she'll be facing the new ada entries in fstab with an 8.x kernel and that would not work either. So it's a decision users need to make eventually themselves during the lifetime of 9.x when upgrading from an older release. > Will such solution be acceptable? I think any solution will be acceptable if it (mostly) works and gets the possible fallout rate (significantly) down and thanks a lot for picking it up now! Bjoern PS: And I think you'll find a lot of testers the next days/weeks on current@ when people update their kernels and forgot to read UPDATING or fail to do the conversion properly.;) -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19:35: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 8AD2C106564A; Sun, 24 Apr 2011 19:35:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78D5C8FC0A; Sun, 24 Apr 2011 19:35: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 p3OJZsnB044477; Sun, 24 Apr 2011 19:35:54 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OJZs8N044475; Sun, 24 Apr 2011 19:35:54 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104241935.p3OJZs8N044475@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 19:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220997 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 19:35:54 -0000 Author: rmacklem Date: Sun Apr 24 19:35:54 2011 New Revision: 220997 URL: http://svn.freebsd.org/changeset/base/220997 Log: MFC: r220507 Add a VOP_UNLOCK() for the directory, when that is not what VOP_LOOKUP() returned. This fixes a bug in the experimental NFS server for the case where VFS_VGET() fails returning EOPNOTSUPP in the ReaddirPlus RPC, forcing the use of VOP_LOOKUP() instead. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.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/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 17:28:27 2011 (r220996) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 19:35:54 2011 (r220997) @@ -1972,9 +1972,13 @@ again: vref(vp); nvp = vp; r = 0; - } else + } else { r = VOP_LOOKUP(vp, &nvp, &cn); + if (vp != nvp) + VOP_UNLOCK(vp, + 0); + } } } if (!r) { From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19: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 D3C651065672; Sun, 24 Apr 2011 19:41:13 +0000 (UTC) (envelope-from mavbsd@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 582BC8FC16; Sun, 24 Apr 2011 19:41:11 +0000 (UTC) Received: by bwz12 with SMTP id 12so1982518bwz.13 for ; Sun, 24 Apr 2011 12:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=yNSOmaQ55AGmGK/96cULsZRPgQJvgfptmP/pBV7oJx0=; b=Ak7GrmSYVfhHYMnT4l0V0j7llD3MWZBTQ0pHntK7Er66RlWUGcs3YdSt3KQzZzGTHy tZ6N1j8ew0/74/mlAW0b2S6q7ubXB7p59CVbdIb/nIUvjQ79Ymw8T+HqAv8oXUoovO16 rwbFoX0Xz5+rYT7axmjiSl+VY2QNm5YopKfy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XhU8bqLSXhJ97lCRTx74eEwlhZDv/3Cbh2mZ0S+BlQeZzACqBcPzytegQSrxBs2s0n ewiclW7V4K2Kpt4/Donrx9snzrO1B1KavIrzvTvCDupEsxxB/4rpIZwT8khqUfFzKU9B I/51Gt9E/kMUID837OsTInlEwmOTbpf74LYkU= Received: by 10.204.19.5 with SMTP id y5mr2839200bka.194.1303674070981; Sun, 24 Apr 2011 12:41:10 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm2893508bkl.1.2011.04.24.12.41.09 (version=SSLv3 cipher=OTHER); Sun, 24 Apr 2011 12:41:10 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB47CD4.9060300@FreeBSD.org> Date: Sun, 24 Apr 2011 22:41:08 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 24 Apr 2011 19:41:13 -0000 On 24.04.2011 21:59, Bjoern A. Zeeb wrote: >> What's about creating some kind of symlinks, it could be nice if it >> worked, but I don't see the way to do it on disk(9) or GEOM layers >> without breaking device's access counters and as result further random >> problems. > > I had been pondering devfs "link"s myself, the problem is that from the rc > framework they come too late. If you can add a simple .ko that does it > programmatically on 9 that would be great. The problem is that after booting > the new kernel you don't know whether people had ATA_STATIC on or not, so > we'd have to go with the defaults, that were in 8.x (and an extra tunable to > flip the logic maybe)? Devfs links won't help users with hardcoded provider names in gmirror, etc -- from GEOM PoV there will be no such providers. Also to create proper mapping that module should have real-time information from CAM about ATA controller details. And looking that it will have to link in real time any derivative providers also (ad4s1a -> ada0s1a) I worry if it is possible at all. Some devfs expert needed here. >> Looking now on these "do or revert" demands to keep old device naming, >> I'll try to make some hacks to CAM and ada(4) driver to mimic old "adX" >> names. I see it in form of some loader tunable, disabled by default (as >> it should be on newly installed systems), but that could be set prior to >> upgrade if user doesn't want to bother with device names at that moment. >> It should partially hide problem for some time. > > It would need to be in and on by default for the lifetime of 9 as it's not > in the last 8.x release (which would need it the other way round anyway. > MIght it be a good idea to do that as well afterwards providing ada links > on the next 8.x release?). I wouldn't like to keep that ugly numbering on by default till the 9.x EoL even for new installations. Also remember about number of people already using new ATA, for whom requirement to disable that tunable may also be uncomfortable. > The user could disable it after the conversion happened though with a tunable > to get rid of the extra /dev/* noise. We could even check for it being on > and check fstab and warn/pester the user then that he'll need to migrate > (on boot from rc.d, in weekly mails, ...). It would be fine if it was just devfs noise, but I have some doubts about it (above). > If we have both information available (old from the kernel transition code) > and new we could even provide a script to do it. > > The reason we might not want to do it automatically is that if the user will > decide to boot kernel.old because the new kernel panics after 2 days, she'll > be facing the new ada entries in fstab with an 8.x kernel and that would not > work either. So it's a decision users need to make eventually themselves > during the lifetime of 9.x when upgrading from an older release. Reasonable. >> Will such solution be acceptable? > > I think any solution will be acceptable if it (mostly) works and gets the > possible fallout rate (significantly) down and thanks a lot for picking it > up now! But that solution should not include setting tunables before upgrading? Can't we teach mergemaster or whatever else to set it depending on whet disks are now present in system? > PS: And I think you'll find a lot of testers the next days/weeks on current@ > when people update their kernels and forgot to read UPDATING or fail to > do the conversion properly.;) I can always say: "read UPDATING" (for log: I am not completely serious here. :)). -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 19:50: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 97869106564A; Sun, 24 Apr 2011 19:50:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854408FC0C; Sun, 24 Apr 2011 19:50: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 p3OJoD7s044930; Sun, 24 Apr 2011 19:50:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OJoDl9044928; Sun, 24 Apr 2011 19:50:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104241950.p3OJoDl9044928@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 19:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220998 - stable/8/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 19:50:13 -0000 Author: rmacklem Date: Sun Apr 24 19:50:13 2011 New Revision: 220998 URL: http://svn.freebsd.org/changeset/base/220998 Log: MFC: r220510 Add support for a backup stable restart file to the nfsd, used for NFSv4 restart. This permits the nfsd to create the stable restart file as required and minimizes the risk of trouble if the file is lost. Modified: stable/8/usr.sbin/nfsd/nfsd.c Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsd.c ============================================================================== --- stable/8/usr.sbin/nfsd/nfsd.c Sun Apr 24 19:35:54 2011 (r220997) +++ stable/8/usr.sbin/nfsd/nfsd.c Sun Apr 24 19:50:13 2011 (r220998) @@ -51,6 +51,9 @@ static const char rcsid[] = #include #include #include +#include +#include +#include #include #include @@ -79,6 +82,7 @@ int debug = 0; #endif #define NFSD_STABLERESTART "/var/db/nfs-stablerestart" +#define NFSD_STABLEBACKUP "/var/db/nfs-stablerestart.bak" #define MAXNFSDCNT 256 #define DEFNFSDCNT 4 pid_t children[MAXNFSDCNT]; /* PIDs of children */ @@ -86,6 +90,8 @@ int nfsdcnt; /* number of children */ int new_syscall; int run_v4server = 0; /* Force running of nfsv4 server */ int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */ +int stablefd = -1; /* Fd for the stable restart file */ +int backupfd; /* Fd for the backup stable restart file */ void cleanup(int); void child_cleanup(int); @@ -98,6 +104,9 @@ int setbindhost(struct addrinfo **ia, co void start_server(int); void unregistration(void); void usage(void); +void open_stable(int *, int *); +void copy_stable(int, int); +void backup_stable(int); /* * Nfs server daemon mostly just a user context for nfssvc() @@ -136,7 +145,7 @@ main(int argc, char **argv) int tcp6sock, ip6flag, tcpflag, tcpsock; int udpflag, ecode, error, s, srvcnt; int bindhostc, bindanyflag, rpcbreg, rpcbregcnt; - int stablefd, nfssvc_addsock; + int nfssvc_addsock; char **bindhost = NULL; pid_t pid; @@ -346,6 +355,7 @@ main(int argc, char **argv) } (void)signal(SIGSYS, nonfs); (void)signal(SIGCHLD, reapchild); + (void)signal(SIGUSR2, backup_stable); openlog("nfsd", LOG_PID, LOG_DAEMON); @@ -355,22 +365,21 @@ main(int argc, char **argv) * regular nfssvc() call to service NFS requests. * (This way the file remains open until the last nfsd is killed * off.) - * Note that this file is not created by this daemon and can - * only be relocated by recompiling the daemon, in order to - * minimize accidentally starting up with the wrong file. - * If should be created as an empty file Read and Write for - * root before the first time you run NFS v4 and should never - * be re-initialized if at all possible. It should live on a + * It and the backup copy will be created as empty files + * the first time this nfsd is started and should never be + * deleted/replaced if at all possible. It should live on a * local, non-volatile storage device that does not do hardware * level write-back caching. (See SCSI doc for more information * on how to prevent write-back caching on SCSI disks.) */ if (run_v4server > 0) { - stablefd = open(NFSD_STABLERESTART, O_RDWR, 0); + open_stable(&stablefd, &backupfd); if (stablefd < 0) { syslog(LOG_ERR, "Can't open %s\n", NFSD_STABLERESTART); exit(1); } + /* This system call will fail for old kernels, but that's ok. */ + nfssvc(NFSSVC_BACKUPSTABLE, NULL); if (nfssvc(NFSSVC_STABLERESTART, (caddr_t)&stablefd) < 0) { syslog(LOG_ERR, "Can't read stable storage file\n"); exit(1); @@ -739,9 +748,9 @@ main(int argc, char **argv) if (select(maxsock + 1, &ready, NULL, NULL, NULL) < 1) { error = errno; - syslog(LOG_ERR, "select failed: %m"); if (error == EINTR) continue; + syslog(LOG_ERR, "select failed: %m"); nfsd_exit(1); } } @@ -973,3 +982,95 @@ start_server(int master) else exit(status); } + +/* + * Open the stable restart file and return the file descriptor for it. + */ +void +open_stable(int *stable_fdp, int *backup_fdp) +{ + int stable_fd, backup_fd = -1, ret; + struct stat st, backup_st; + + /* Open and stat the stable restart file. */ + stable_fd = open(NFSD_STABLERESTART, O_RDWR, 0); + if (stable_fd < 0) + stable_fd = open(NFSD_STABLERESTART, O_RDWR | O_CREAT, 0600); + if (stable_fd >= 0) { + ret = fstat(stable_fd, &st); + if (ret < 0) { + close(stable_fd); + stable_fd = -1; + } + } + + /* Open and stat the backup stable restart file. */ + if (stable_fd >= 0) { + backup_fd = open(NFSD_STABLEBACKUP, O_RDWR, 0); + if (backup_fd < 0) + backup_fd = open(NFSD_STABLEBACKUP, O_RDWR | O_CREAT, + 0600); + if (backup_fd >= 0) { + ret = fstat(backup_fd, &backup_st); + if (ret < 0) { + close(backup_fd); + backup_fd = -1; + } + } + if (backup_fd < 0) { + close(stable_fd); + stable_fd = -1; + } + } + + *stable_fdp = stable_fd; + *backup_fdp = backup_fd; + if (stable_fd < 0) + return; + + /* Sync up the 2 files, as required. */ + if (st.st_size > 0) + copy_stable(stable_fd, backup_fd); + else if (backup_st.st_size > 0) + copy_stable(backup_fd, stable_fd); +} + +/* + * Copy the stable restart file to the backup or vice versa. + */ +void +copy_stable(int from_fd, int to_fd) +{ + int cnt, ret; + static char buf[1024]; + + ret = lseek(from_fd, (off_t)0, SEEK_SET); + if (ret >= 0) + ret = lseek(to_fd, (off_t)0, SEEK_SET); + if (ret >= 0) + ret = ftruncate(to_fd, (off_t)0); + if (ret >= 0) + do { + cnt = read(from_fd, buf, 1024); + if (cnt > 0) + ret = write(to_fd, buf, cnt); + else if (cnt < 0) + ret = cnt; + } while (cnt > 0 && ret >= 0); + if (ret >= 0) + ret = fsync(to_fd); + if (ret < 0) + syslog(LOG_ERR, "stable restart copy failure: %m"); +} + +/* + * Back up the stable restart file when indicated by the kernel. + */ +void +backup_stable(__unused int signo) +{ + + if (stablefd >= 0) + copy_stable(stablefd, backupfd); +} + From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 21:27: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 A3E891065672; Sun, 24 Apr 2011 21:27:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93B6D8FC15; Sun, 24 Apr 2011 21:27: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 p3OLRTDc047812; Sun, 24 Apr 2011 21:27:29 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OLRTTL047810; Sun, 24 Apr 2011 21:27:29 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242127.p3OLRTTL047810@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 21:27: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: r220999 - stable/8/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 21:27:29 -0000 Author: rmacklem Date: Sun Apr 24 21:27:29 2011 New Revision: 220999 URL: http://svn.freebsd.org/changeset/base/220999 Log: MFC: r220519 Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Modified: stable/8/lib/libc/rpc/svc_vc.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/8/lib/libc/rpc/svc_vc.c Sun Apr 24 19:50:13 2011 (r220998) +++ stable/8/lib/libc/rpc/svc_vc.c Sun Apr 24 21:27:29 2011 (r220999) @@ -546,7 +546,7 @@ write_vc(xprtp, buf, len) cd->strm_stat = XPRT_DIED; return (-1); } - if (cd->nonblock && i != cnt) { + if (cd->nonblock) { /* * For non-blocking connections, do not * take more than 2 seconds writing the @@ -560,6 +560,7 @@ write_vc(xprtp, buf, len) return (-1); } } + i = 0; } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 22:12: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 2DA9E106564A; Sun, 24 Apr 2011 22:12:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E14E8FC12; Sun, 24 Apr 2011 22:12: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 p3OMC1IK049167; Sun, 24 Apr 2011 22:12:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3OMC0AK049165; Sun, 24 Apr 2011 22:12:00 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242212.p3OMC0AK049165@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 22:12:00 +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: r221000 - stable/7/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 22:12:01 -0000 Author: rmacklem Date: Sun Apr 24 22:12:00 2011 New Revision: 221000 URL: http://svn.freebsd.org/changeset/base/221000 Log: MFC: r220519 Fix a bug in the userland rpc library, where it would use a negative return value from write to update its position in a buffer. The patch, courtesy of Andrey Simonenko, also simplifies a conditional by removing the "i != cnt" clause, since it is always true at this point in the code. The bug caused problems for mountd, when it generated a large reply to an exports RPC request. Modified: stable/7/lib/libc/rpc/svc_vc.c Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/rpc/svc_vc.c ============================================================================== --- stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 21:27:29 2011 (r220999) +++ stable/7/lib/libc/rpc/svc_vc.c Sun Apr 24 22:12:00 2011 (r221000) @@ -550,7 +550,7 @@ write_vc(xprtp, buf, len) cd->strm_stat = XPRT_DIED; return (-1); } - if (cd->nonblock && i != cnt) { + if (cd->nonblock) { /* * For non-blocking connections, do not * take more than 2 seconds writing the @@ -564,6 +564,7 @@ write_vc(xprtp, buf, len) return (-1); } } + i = 0; } } From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 22:18: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 8BCEC1065672; Sun, 24 Apr 2011 22:18:41 +0000 (UTC) (envelope-from mack@macktronics.com) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by mx1.freebsd.org (Postfix) with ESMTP id 64E278FC14; Sun, 24 Apr 2011 22:18:41 +0000 (UTC) Received: from coco.macktronics.com (coco.macktronics.com [209.181.253.65]) by coco.macktronics.com (Postfix) with ESMTP id 964164AC40; Sun, 24 Apr 2011 17:18:40 -0500 (CDT) Date: Sun, 24 Apr 2011 17:18:40 -0500 (CDT) From: Dan Mack To: Pawel Jakub Dawidek In-Reply-To: <20110424131804.GB1872@garage.freebsd.pl> Message-ID: <20110424171704.L2449@coco.macktronics.com> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424095736.GA92492@freebsd.org> <20110424051747.S1757@coco.macktronics.com> <20110424131804.GB1872@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Alexander Best , Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Sun, 24 Apr 2011 22:18:41 -0000 On Sun, 24 Apr 2011, Pawel Jakub Dawidek wrote: > On Sun, Apr 24, 2011 at 05:25:00AM -0500, Dan Mack wrote: >> For those of us using a ZFS root pool built out of /dev/gpt/ >> devices, will these automagically pick up the new names? > > Even if you use adX devices in your ZFS pool and they will suddenly > change to adaY, ZFS should detect this properly and no manual > intervention should be needed. Yep, confirmed. My boot zroot RAID10 pool previously built from ad4, ad6, ad8, ad10 worked without a hitch with the new enumeration scheme: borg# gpart status Name Status Components ada0p1 OK ada0 ada0p2 OK ada0 ada0p3 OK ada0 ada1p1 OK ada1 ada1p2 OK ada1 ada1p3 OK ada1 ada2p1 OK ada2 ada2p2 OK ada2 ada2p3 OK ada2 ada3p1 OK ada3 ada3p2 OK ada3 ada3p3 OK ada3 borg# zpool status pool: zroot state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gpt/disk0 ONLINE 0 0 0 gpt/disk1 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 gpt/disk2 ONLINE 0 0 0 gpt/disk3 ONLINE 0 0 0 From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 23:04: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 6B88E106564A; Sun, 24 Apr 2011 23:04:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507908FC0A; Sun, 24 Apr 2011 23:04: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 p3ON49J7050833; Sun, 24 Apr 2011 23:04:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3ON49Xf050829; Sun, 24 Apr 2011 23:04:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104242304.p3ON49Xf050829@svn.freebsd.org> From: Rick Macklem Date: Sun, 24 Apr 2011 23:04: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: r221002 - in stable/8/sys/fs: nfs nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 24 Apr 2011 23:04:10 -0000 Author: rmacklem Date: Sun Apr 24 23:04:08 2011 New Revision: 221002 URL: http://svn.freebsd.org/changeset/base/221002 Log: MFC: r220530 Add some cleanup code to the module unload operation for the experimental NFS server, so that it doesn't leak memory when unloaded. However, unloading the NFSv4 server is not recommended, since all NFSv4 state will be lost by the unload and clients will have to recover the state after a server reload/restart as if the server crashed/rebooted. Modified: stable/8/sys/fs/nfs/nfs_var.h stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/fs/nfsserver/nfs_nfsdstate.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/fs/nfs/nfs_var.h ============================================================================== --- stable/8/sys/fs/nfs/nfs_var.h Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfs/nfs_var.h Sun Apr 24 23:04:08 2011 (r221002) @@ -124,6 +124,7 @@ int nfsrv_checkgetattr(struct nfsrv_desc struct nfsvattr *, nfsattrbit_t *, struct ucred *, NFSPROC_T *); int nfsrv_nfsuserdport(u_short, NFSPROC_T *); void nfsrv_nfsuserddelport(void); +void nfsrv_throwawayallstate(NFSPROC_T *); /* nfs_nfsdserv.c */ int nfsrvd_access(struct nfsrv_descript *, int, Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Apr 24 23:04:08 2011 (r221002) @@ -52,6 +52,7 @@ extern int newnfs_numnfsd; extern struct mount nfsv4root_mnt; extern struct nfsrv_stablefirst nfsrv_stablefirst; extern void (*nfsd_call_servertimer)(void); +extern SVCPOOL *nfsrvd_pool; struct vfsoptlist nfsv4root_opt, nfsv4root_newopt; NFSDLOCKMUTEX; struct mtx nfs_cache_mutex; @@ -3122,9 +3123,16 @@ nfsd_modevent(module_t mod, int type, vo nfsd_call_servertimer = NULL; nfsd_call_nfsd = NULL; + /* Clean out all NFSv4 state. */ + nfsrv_throwawayallstate(curthread); + /* Clean the NFS server reply cache */ nfsrvd_cleancache(); + /* Free up the krpc server pool. */ + if (nfsrvd_pool != NULL) + svcpool_destroy(nfsrvd_pool); + /* and get rid of the locks */ mtx_destroy(&nfs_cache_mutex); mtx_destroy(&nfs_v4root_mutex); Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 24 22:28:26 2011 (r221001) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Sun Apr 24 23:04:08 2011 (r221002) @@ -5194,3 +5194,37 @@ nfsrv_unlocklf(struct nfslockfile *lfp) nfsv4_unlock(&lfp->lf_locallock_lck, 0); } +/* + * Clear out all state for the NFSv4 server. + * Must be called by a thread that can sleep when no nfsds are running. + */ +void +nfsrv_throwawayallstate(NFSPROC_T *p) +{ + struct nfsclient *clp, *nclp; + struct nfslockfile *lfp, *nlfp; + int i; + + /* + * For each client, clean out the state and then free the structure. + */ + for (i = 0; i < NFSCLIENTHASHSIZE; i++) { + LIST_FOREACH_SAFE(clp, &nfsclienthash[i], lc_hash, nclp) { + nfsrv_cleanclient(clp, p); + nfsrv_freedeleglist(&clp->lc_deleg); + nfsrv_freedeleglist(&clp->lc_olddeleg); + free(clp, M_NFSDCLIENT); + } + } + + /* + * Also, free up any remaining lock file structures. + */ + for (i = 0; i < NFSLOCKHASHSIZE; i++) { + LIST_FOREACH_SAFE(lfp, &nfslockhash[i], lf_hash, nlfp) { + printf("nfsd unload: fnd a lock file struct\n"); + nfsrv_freenfslockfile(lfp); + } + } +} + From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04: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 05B2F106566B; Mon, 25 Apr 2011 04:33:14 +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 CB6D48FC0C; Mon, 25 Apr 2011 04:33: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 p3P4XDjN060582; Mon, 25 Apr 2011 04:33:13 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4XDnG060580; Mon, 25 Apr 2011 04:33:13 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104250433.p3P4XDnG060580@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 25 Apr 2011 04:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221003 - stable/8/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: Mon, 25 Apr 2011 04:33:14 -0000 Author: ae Date: Mon Apr 25 04:33:13 2011 New Revision: 221003 URL: http://svn.freebsd.org/changeset/base/221003 Log: MFC r220767: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius Modified: stable/8/sys/netgraph/ng_patch.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/netgraph/ng_patch.c ============================================================================== --- stable/8/sys/netgraph/ng_patch.c Sun Apr 24 23:04:08 2011 (r221002) +++ stable/8/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04:33: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 0E105106566B; Mon, 25 Apr 2011 04:33:43 +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 D5DF48FC15; Mon, 25 Apr 2011 04:33: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 p3P4Xg3T060630; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4XgwU060628; Mon, 25 Apr 2011 04:33:42 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104250433.p3P4XgwU060628@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 25 Apr 2011 04:33:42 +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: r221004 - stable/7/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: Mon, 25 Apr 2011 04:33:43 -0000 Author: ae Date: Mon Apr 25 04:33:42 2011 New Revision: 221004 URL: http://svn.freebsd.org/changeset/base/221004 Log: MFC r220767: Use M_WAITOK flag instead M_WAIT for malloc. Suggested by: glebius Modified: stable/7/sys/netgraph/ng_patch.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/netgraph/ng_patch.c ============================================================================== --- stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:13 2011 (r221003) +++ stable/7/sys/netgraph/ng_patch.c Mon Apr 25 04:33:42 2011 (r221004) @@ -165,7 +165,7 @@ ng_patch_constructor(node_p node) { priv_p privdata; - privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAIT | M_ZERO); + privdata = malloc(sizeof(*privdata), M_NETGRAPH, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, privdata); privdata->in = NULL; privdata->out = NULL; @@ -208,7 +208,8 @@ ng_patch_rcvmsg(node_p node, item_p item if (privp->config == NULL) break; NG_MKRESPONSE(resp, msg, - NG_PATCH_CONF_SIZE(privp->config->count), M_WAIT); + NG_PATCH_CONF_SIZE(privp->config->count), + M_WAITOK); bcopy(privp->config, resp->data, NG_PATCH_CONF_SIZE(privp->config->count)); break; @@ -248,10 +249,10 @@ ng_patch_rcvmsg(node_p node, item_p item if (error == 0) { newconf = malloc( NG_PATCH_CONF_SIZE(conf->count), - M_NETGRAPH, M_WAIT); + M_NETGRAPH, M_WAITOK); newval = malloc(conf->count * sizeof(union patch_val), M_NETGRAPH, - M_WAIT); + M_WAITOK); for(i = 0; i < conf->count; i++) { switch (conf->ops[i].length) { case 1: @@ -288,7 +289,7 @@ ng_patch_rcvmsg(node_p node, item_p item /* FALLTHROUGH */ case NGM_PATCH_GET_STATS: NG_MKRESPONSE(resp, msg, sizeof(struct ng_patch_stats), - M_WAIT); + M_WAITOK); bcopy(&(privp->stats), resp->data, sizeof(struct ng_patch_stats)); if (clear == 0) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 04:55: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 4B875106564A; Mon, 25 Apr 2011 04:55:51 +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 38BA38FC12; Mon, 25 Apr 2011 04:55: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 p3P4tp8J061350; Mon, 25 Apr 2011 04:55:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P4tp4f061348; Mon, 25 Apr 2011 04:55:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201104250455.p3P4tp4f061348@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 25 Apr 2011 04:55: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: r221005 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 04:55:51 -0000 Author: glebius Date: Mon Apr 25 04:55:50 2011 New Revision: 221005 URL: http://svn.freebsd.org/changeset/base/221005 Log: When msk_detach() is called from msk_attach(), ifp may be yet not initialized. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Apr 25 04:33:42 2011 (r221004) +++ head/sys/dev/msk/if_msk.c Mon Apr 25 04:55:50 2011 (r221005) @@ -1964,7 +1964,8 @@ msk_detach(device_t dev) /* Can't hold locks while calling detach. */ MSK_IF_UNLOCK(sc_if); callout_drain(&sc_if->msk_tick_ch); - ether_ifdetach(ifp); + if (ifp) + ether_ifdetach(ifp); MSK_IF_LOCK(sc_if); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:00: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 65BBD1065670; Mon, 25 Apr 2011 05:00:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0191A8FC0C; Mon, 25 Apr 2011 05:00:54 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3P4tfRe015983 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 24 Apr 2011 22:55:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> Date: Sun, 24 Apr 2011 22:55:41 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> To: "Daniel O'Connor" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 24 Apr 2011 22:55:45 -0600 (MDT) Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Mon, 25 Apr 2011 05:00:55 -0000 On Apr 24, 2011, at 11:34 AM, Daniel O'Connor wrote: >=20 > On 24/04/2011, at 18:19, Andrey Chernov wrote: >> On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >>> ATA device names in /etc/fstab or other places, make sure to = update >>> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX = -> saY, >>> - where 'Y's are the sequential numbers for each type in order of >>> - detection, unless configured otherwise with tunables, see = cam(4)). >>> + where 'Y's are the sequential numbers starting from zero for = each type >>> + in order of detection, unless configured otherwise with = tunables, >>> + see cam(4)). >>=20 >> Is there any way to guess resulting 'Y' numbers _before_ booting new=20= >> kernel? I have remote machine with console access almost impossible = (very=20 >> hard for me). >>=20 >> It seems something like >> vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." >> (up to max channels) helps to find root, but what about other mounted=20= >> disks? >=20 > The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. I've been running with ufs labels for a couple of years now, since the = first rumblings of this hit the streets. They work great no matter what = the underlying partitioning scheme. The one drawback is that if you = have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... > gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. >=20 > The following shell snippet will generate the UFS ID for a given FS. >=20 > getfsid() { > line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` > if [ $? -ne 0 ]; then > return 1 > fi > # dumpfs doesn't print leading 0s > eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ = ]/printf %0x $((0x\1 << 32 | 0x\2))/p'` > } This is also good. Warner= From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:01:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A536A1065783; Mon, 25 Apr 2011 05:01:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3286E8FC08; Mon, 25 Apr 2011 05:01:06 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3P4xEGC015990 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 24 Apr 2011 22:59:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DB47CD4.9060300@FreeBSD.org> Date: Sun, 24 Apr 2011 22:59:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <54259D19-F41D-460A-9016-5189947A6887@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <4DB47CD4.9060300@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 24 Apr 2011 22:59:15 -0600 (MDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 05:01:12 -0000 Now that the horse is out of the barn, the following might be a little = late (unless we unpull the trigger for a month). But what if we warned that / was on a device name, and not on a 'named' = device. Complain if it was on /dev/da0, but not if it was on = /dev/ufs/fred-root. Users would see this warning and react. Next best thing: make installkernel check for devices on /dev/adX and = refuse to install the kernel if they are (unless REALLY_THIS_IS_RIGHT is = defined :). This won't help the binary upgrader, but will prevent massive = footshooting in the mean time. Warner On Apr 24, 2011, at 1:41 PM, Alexander Motin wrote: > On 24.04.2011 21:59, Bjoern A. Zeeb wrote: >>> What's about creating some kind of symlinks, it could be nice if it >>> worked, but I don't see the way to do it on disk(9) or GEOM layers >>> without breaking device's access counters and as result further = random >>> problems. >>=20 >> I had been pondering devfs "link"s myself, the problem is that from = the rc >> framework they come too late. If you can add a simple .ko that does = it >> programmatically on 9 that would be great. The problem is that after = booting >> the new kernel you don't know whether people had ATA_STATIC on or = not, so >> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >> flip the logic maybe)? >=20 > Devfs links won't help users with hardcoded provider names in gmirror, = etc -- from GEOM PoV there will be no such providers. Also to create = proper mapping that module should have real-time information from CAM = about ATA controller details. And looking that it will have to link in = real time any derivative providers also (ad4s1a -> ada0s1a) I worry if = it is possible at all. Some devfs expert needed here. >=20 >>> Looking now on these "do or revert" demands to keep old device = naming, >>> I'll try to make some hacks to CAM and ada(4) driver to mimic old = "adX" >>> names. I see it in form of some loader tunable, disabled by default = (as >>> it should be on newly installed systems), but that could be set = prior to >>> upgrade if user doesn't want to bother with device names at that = moment. >>> It should partially hide problem for some time. >>=20 >> It would need to be in and on by default for the lifetime of 9 as = it's not >> in the last 8.x release (which would need it the other way round = anyway. >> MIght it be a good idea to do that as well afterwards providing ada = links >> on the next 8.x release?). >=20 > I wouldn't like to keep that ugly numbering on by default till the 9.x = EoL even for new installations. Also remember about number of people = already using new ATA, for whom requirement to disable that tunable may = also be uncomfortable. >=20 >> The user could disable it after the conversion happened though with a = tunable >> to get rid of the extra /dev/* noise. We could even check for it = being on >> and check fstab and warn/pester the user then that he'll need to = migrate >> (on boot from rc.d, in weekly mails, ...). >=20 > It would be fine if it was just devfs noise, but I have some doubts = about it (above). >=20 >> If we have both information available (old from the kernel transition = code) >> and new we could even provide a script to do it. >>=20 >> The reason we might not want to do it automatically is that if the = user will >> decide to boot kernel.old because the new kernel panics after 2 days, = she'll >> be facing the new ada entries in fstab with an 8.x kernel and that = would not >> work either. So it's a decision users need to make eventually = themselves >> during the lifetime of 9.x when upgrading from an older release. >=20 > Reasonable. >=20 >>> Will such solution be acceptable? >>=20 >> I think any solution will be acceptable if it (mostly) works and gets = the >> possible fallout rate (significantly) down and thanks a lot for = picking it >> up now! >=20 > But that solution should not include setting tunables before = upgrading? Can't we teach mergemaster or whatever else to set it = depending on whet disks are now present in system? >=20 >> PS: And I think you'll find a lot of testers the next days/weeks on = current@ >> when people update their kernels and forgot to read UPDATING or fail = to >> do the conversion properly.;) >=20 > I can always say: "read UPDATING" (for log: I am not completely = serious here. :)). >=20 > --=20 > Alexander Motin >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 05:57: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 142E71065675; Mon, 25 Apr 2011 05:57:02 +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 DCB058FC14; Mon, 25 Apr 2011 05:57: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 p3P5v1SN063137; Mon, 25 Apr 2011 05:57:01 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P5v1xP063136; Mon, 25 Apr 2011 05:57:01 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104250557.p3P5v1xP063136@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Apr 2011 05:57: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: r221006 - 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: Mon, 25 Apr 2011 05:57:02 -0000 Author: dougb Date: Mon Apr 25 05:57:01 2011 New Revision: 221006 URL: http://svn.freebsd.org/changeset/base/221006 Log: Add svn:executable property Modified: Directory Properties: head/etc/rc.d/opensm (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:03: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 7FEFD106566B; Mon, 25 Apr 2011 06:03:22 +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 6E4D68FC15; Mon, 25 Apr 2011 06:03: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 p3P63MoW063370; Mon, 25 Apr 2011 06:03:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P63MUe063368; Mon, 25 Apr 2011 06:03:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104250603.p3P63MUe063368@svn.freebsd.org> From: Doug Barton Date: Mon, 25 Apr 2011 06:03: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: r221007 - 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: Mon, 25 Apr 2011 06:03:22 -0000 Author: dougb Date: Mon Apr 25 06:03:22 2011 New Revision: 221007 URL: http://svn.freebsd.org/changeset/base/221007 Log: Create a function for the code from r192246 so that it can be used both times mount is called. Limit the automatic behavior to when AUTO is specified (as it is in etc/defaults/rc.conf) and for everything else take advantage of all of the goodness in checkyesno. Modified: head/etc/rc.d/tmp Modified: head/etc/rc.d/tmp ============================================================================== --- head/etc/rc.d/tmp Mon Apr 25 05:57:01 2011 (r221006) +++ head/etc/rc.d/tmp Mon Apr 25 06:03:22 2011 (r221007) @@ -37,20 +37,20 @@ stop_cmd=':' load_rc_config $name +mount_tmpmfs () +{ + if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then + mount_md ${tmpsize} /tmp "${tmpmfs_flags}" + chmod 01777 /tmp + fi +} + # If we do not have a writable /tmp, create a memory # filesystem for /tmp. If /tmp is a symlink (e.g. to /var/tmp, # then it should already be writable). # case "${tmpmfs}" in -[Yy][Ee][Ss]) - if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp - fi - ;; -[Nn][Oo]) - ;; -*) +[Aa][Uu][Tt][Oo]) if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then rmdir ${_tmpdir} else @@ -59,9 +59,13 @@ case "${tmpmfs}" in echo "dropping into shell, ^D to continue anyway." /bin/sh else - mount_md ${tmpsize} /tmp "${tmpmfs_flags}" - chmod 01777 /tmp + mount_tmpmfs fi fi ;; +*) + if checkyesno tmpmfs; then + mount_tmpmfs + fi + ;; esac From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:36: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 426EE1065670; Mon, 25 Apr 2011 06:36:27 +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 24A738FC16; Mon, 25 Apr 2011 06:36: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 p3P6aRql064400; Mon, 25 Apr 2011 06:36:27 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P6aRuU064397; Mon, 25 Apr 2011 06:36:27 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104250636.p3P6aRuU064397@svn.freebsd.org> From: Sergey Kandaurov Date: Mon, 25 Apr 2011 06:36: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: r221008 - in stable/8: lib/libc/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: Mon, 25 Apr 2011 06:36:27 -0000 Author: pluknet Date: Mon Apr 25 06:36:26 2011 New Revision: 221008 URL: http://svn.freebsd.org/changeset/base/221008 Log: MFC r218989: Remove no more useful sysctl vm.max_proc_mmap, which also fixes mmap(2) overflow seen with over 256GB of physical memory installed. Modified: stable/8/lib/libc/sys/mmap.2 stable/8/sys/vm/vm_mmap.c 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 Mon Apr 25 06:03:22 2011 (r221007) +++ stable/8/lib/libc/sys/mmap.2 Mon Apr 25 06:36:26 2011 (r221008) @@ -329,9 +329,6 @@ was specified and the argument was not available. .Dv MAP_ANON was specified and insufficient memory was available. -The system has reached the per-process mmap limit specified in the -.Va vm.max_proc_mmap -sysctl. .El .Sh SEE ALSO .Xr madvise 2 , Modified: stable/8/sys/vm/vm_mmap.c ============================================================================== --- stable/8/sys/vm/vm_mmap.c Mon Apr 25 06:03:22 2011 (r221007) +++ stable/8/sys/vm/vm_mmap.c Mon Apr 25 06:36:26 2011 (r221008) @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -66,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -80,7 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef HWPMC_HOOKS #include @@ -92,30 +89,6 @@ struct sbrk_args { }; #endif -static int max_proc_mmap; -SYSCTL_INT(_vm, OID_AUTO, max_proc_mmap, CTLFLAG_RW, &max_proc_mmap, 0, - "Maximum number of memory-mapped files per process"); - -/* - * Set the maximum number of vm_map_entry structures per process. Roughly - * speaking vm_map_entry structures are tiny, so allowing them to eat 1/100 - * of our KVM malloc space still results in generous limits. We want a - * default that is good enough to prevent the kernel running out of resources - * if attacked from compromised user account but generous enough such that - * multi-threaded processes are not unduly inconvenienced. - */ -static void vmmapentry_rsrc_init(void *); -SYSINIT(vmmersrc, SI_SUB_KVM_RSRC, SI_ORDER_FIRST, vmmapentry_rsrc_init, - NULL); - -static void -vmmapentry_rsrc_init(dummy) - void *dummy; -{ - max_proc_mmap = vm_kmem_size / sizeof(struct vm_map_entry); - max_proc_mmap /= 100; -} - static int vm_mmap_vnode(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, int *, struct vnode *, vm_ooffset_t *, vm_object_t *); static int vm_mmap_cdev(struct thread *, vm_size_t, vm_prot_t, vm_prot_t *, @@ -375,18 +348,6 @@ mmap(td, uap) handle_type = OBJT_VNODE; } map: - - /* - * Do not allow more then a certain number of vm_map_entry structures - * per process. Scale with the number of rforks sharing the map - * to make the limit reasonable for threads. - */ - if (max_proc_mmap && - vms->vm_map.nentries >= max_proc_mmap * vms->vm_refcnt) { - error = ENOMEM; - goto done; - } - td->td_fpop = fp; error = vm_mmap(&vms->vm_map, &addr, size, prot, maxprot, flags, handle_type, handle, pos); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 06:53: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 7F630106564A; Mon, 25 Apr 2011 06:53:16 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 764998FC16; Mon, 25 Apr 2011 06:53:15 +0000 (UTC) Received: from [192.168.1.9] (cm-84.215.40.84.getinternet.no [84.215.40.84]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3P6qrpw092254 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 16:22:55 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: Date: Mon, 25 Apr 2011 08:52:51 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> To: Warner Losh X-Mailer: Apple Mail (2.1084) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Andrey Chernov , svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - 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: Mon, 25 Apr 2011 06:53:16 -0000 On 25/04/2011, at 6:55, Warner Losh wrote: >> The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. >=20 > I've been running with ufs labels for a couple of years now, since the = first rumblings of this hit the streets. They work great no matter what = the underlying partitioning scheme. The one drawback is that if you = have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... This is why I prefer IDs since they are nominally unique (UFS ones, GPTs = damn well better be :) Although I concede it is rather annoying to work out which is which, or = type them out manually.. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 09:00: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 CC05F106566B; Mon, 25 Apr 2011 09:00:52 +0000 (UTC) (envelope-from ticso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA6BF8FC0A; Mon, 25 Apr 2011 09:00: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 p3P90qeH068664; Mon, 25 Apr 2011 09:00:52 GMT (envelope-from ticso@svn.freebsd.org) Received: (from ticso@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P90qXr068662; Mon, 25 Apr 2011 09:00:52 GMT (envelope-from ticso@svn.freebsd.org) Message-Id: <201104250900.p3P90qXr068662@svn.freebsd.org> From: Bernd Walter Date: Mon, 25 Apr 2011 09:00: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: r221009 - head/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: Mon, 25 Apr 2011 09:00:52 -0000 Author: ticso Date: Mon Apr 25 09:00:52 2011 New Revision: 221009 URL: http://svn.freebsd.org/changeset/base/221009 Log: correct variable type name in comment Modified: head/sys/netinet6/in6.h Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Mon Apr 25 06:36:26 2011 (r221008) +++ head/sys/netinet6/in6.h Mon Apr 25 09:00:52 2011 (r221009) @@ -397,8 +397,8 @@ struct route_in6 { #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 multicast loopback */ -#define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */ -#define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ +#define IPV6_JOIN_GROUP 12 /* ipv6_mreq; join a group membership */ +#define IPV6_LEAVE_GROUP 13 /* ipv6_mreq; leave a group membership */ #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ /* RFC2292 options */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 09:18: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 E6744106566B; Mon, 25 Apr 2011 09:18:05 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4A5F8FC08; Mon, 25 Apr 2011 09:18: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 p3P9I5We069192; Mon, 25 Apr 2011 09:18:05 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3P9I5EY069190; Mon, 25 Apr 2011 09:18:05 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201104250918.p3P9I5EY069190@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Mon, 25 Apr 2011 09:18: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: r221010 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 09:18:06 -0000 Author: des Date: Mon Apr 25 09:18:05 2011 New Revision: 221010 URL: http://svn.freebsd.org/changeset/base/221010 Log: Whitespace nit Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Mon Apr 25 09:00:52 2011 (r221009) +++ head/sys/dev/ichwd/ichwd.c Mon Apr 25 09:18:05 2011 (r221010) @@ -228,8 +228,8 @@ ichwd_sts_reset(struct ichwd_softc *sc) * by writing a 1, not a 0. */ ichwd_write_tco_2(sc, TCO1_STS, TCO_TIMEOUT); - /* - * According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must + /* + * According to Intel's docs, clearing SECOND_TO_STS and BOOT_STS must * be done in two separate operations. */ ichwd_write_tco_2(sc, TCO2_STS, TCO_SECOND_TO_STS); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 10:08: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 03498106566B; Mon, 25 Apr 2011 10:08:35 +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 E5A688FC0A; Mon, 25 Apr 2011 10:08: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 p3PA8YKA070779; Mon, 25 Apr 2011 10:08:34 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PA8Y7E070777; Mon, 25 Apr 2011 10:08:34 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251008.p3PA8Y7E070777@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 10:08: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: r221011 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 10:08:35 -0000 Author: jilles Date: Mon Apr 25 10:08:34 2011 New Revision: 221011 URL: http://svn.freebsd.org/changeset/base/221011 Log: sh: Remove duplicate code resetting uid/gid for set +p/+o privileged. MFC after: 1 week Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Mon Apr 25 09:18:05 2011 (r221010) +++ head/bin/sh/options.c Mon Apr 25 10:08:34 2011 (r221011) @@ -198,13 +198,8 @@ options(int cmdline) minus_o(*argptr, val); if (*argptr) argptr++; - } else { - if (c == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } + } else setoption(c, val); - } } } return; @@ -271,10 +266,6 @@ minus_o(char *name, int val) } else { for (i = 0; i < NOPTS; i++) if (equal(name, optlist[i].name)) { - if (!val && privileged && equal(name, "privileged")) { - (void) setuid(getuid()); - (void) setgid(getgid()); - } setoption(optlist[i].letter, val); return; } @@ -288,6 +279,10 @@ setoption(int flag, int val) { int i; + if (flag == 'p' && !val && privileged) { + (void) setuid(getuid()); + (void) setgid(getgid()); + } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { optlist[i].val = val; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 10:14: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 094EA106564A; Mon, 25 Apr 2011 10:14:30 +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 EBC4C8FC08; Mon, 25 Apr 2011 10:14: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 p3PAEThV070988; Mon, 25 Apr 2011 10:14:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PAETAM070986; Mon, 25 Apr 2011 10:14:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251014.p3PAETAM070986@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 10:14: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: r221012 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 10:14:30 -0000 Author: jilles Date: Mon Apr 25 10:14:29 2011 New Revision: 221012 URL: http://svn.freebsd.org/changeset/base/221012 Log: sh: Check setuid()/setgid() return values. If the -p option is turned off, privileges from a setuid or setgid binary are dropped. Make sure to check if this succeeds. If it fails, this is an error which will cause the shell to abort except in interactive mode or if 'command' was used to make 'set' or an outer 'eval' or '.' non-special. Note that taking advantage of this feature and writing setuid shell scripts seems unwise. MFC after: 1 week Modified: head/bin/sh/options.c Modified: head/bin/sh/options.c ============================================================================== --- head/bin/sh/options.c Mon Apr 25 10:08:34 2011 (r221011) +++ head/bin/sh/options.c Mon Apr 25 10:14:29 2011 (r221012) @@ -280,8 +280,10 @@ setoption(int flag, int val) int i; if (flag == 'p' && !val && privileged) { - (void) setuid(getuid()); - (void) setgid(getgid()); + if (setgid(getgid()) == -1) + error("setgid"); + if (setuid(getuid()) == -1) + error("setuid"); } for (i = 0; i < NOPTS; i++) if (optlist[i].letter == flag) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 12:36: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 C7216106566C; Mon, 25 Apr 2011 12:36:29 +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 B683B8FC14; Mon, 25 Apr 2011 12:36: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 p3PCaTgw076479; Mon, 25 Apr 2011 12:36:29 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PCaTYb076477; Mon, 25 Apr 2011 12:36:29 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251236.p3PCaTYb076477@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 12:36: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: r221013 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 12:36:29 -0000 Author: jilles Date: Mon Apr 25 12:36:29 2011 New Revision: 221013 URL: http://svn.freebsd.org/changeset/base/221013 Log: printf(1): Mention effect of '#' modifier on other conversions. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Mon Apr 25 10:14:29 2011 (r221012) +++ head/usr.bin/printf/printf.1 Mon Apr 25 12:36:29 2011 (r221013) @@ -31,7 +31,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 19, 2010 +.Dd April 25, 2011 .Dt PRINTF 1 .Os .Sh NAME @@ -125,9 +125,9 @@ in the following order: A `#' character specifying that the value should be printed in an ``alternate form''. For -.Cm c , d , +.Cm b , c , d , s and -.Cm s , +.Cm u formats, this option has no effect. For the .Cm o @@ -141,9 +141,9 @@ format, a non-zero result has the string .Pq Li 0X prepended to it. For -.Cm e , E , f , g , +.Cm a , A , e , E , f , F , g and -.Cm G , +.Cm G formats, the result will always contain a decimal point, even if no digits follow the point (normally, a decimal point only appears in the results of those formats if a digit follows the decimal point). From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 13:09: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 058B01065670; Mon, 25 Apr 2011 13:09:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E835F8FC23; Mon, 25 Apr 2011 13:09: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 p3PD9WsM077436; Mon, 25 Apr 2011 13:09:32 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PD9WW8077432; Mon, 25 Apr 2011 13:09:32 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104251309.p3PD9WW8077432@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 13:09: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: r221014 - in head/sys: fs/nfs fs/nfsclient nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 13:09:33 -0000 Author: rmacklem Date: Mon Apr 25 13:09:32 2011 New Revision: 221014 URL: http://svn.freebsd.org/changeset/base/221014 Log: Modify the experimental NFS client so that it uses the same "struct nfs_args" as the regular NFS client. This is needed so that the old mount(2) syscall will work and it makes sharing of the diskless NFS root code easier. Eary in the porting exercise I introduced a new revision of nfs_args, but didn't actually need it, thanks to nmount(2). I re-introduced the NFSMNT_KERB flag, since it does essentially the same thing and the old one would not have been used because it never worked. I also added a few new NFSMNT_xxx flags to sys/nfsclient/nfs_args.h that are used by the experimental NFS client. MFC after: 2 weeks Deleted: head/sys/fs/nfsclient/nfsargs.h Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfsargs.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/fs/nfs/nfsport.h Mon Apr 25 13:09:32 2011 (r221014) @@ -372,7 +372,7 @@ struct ext_nfsstats { #include #include #include -#include +#include #include /* Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 13:09:32 2011 (r221014) @@ -102,8 +102,9 @@ static void nfs_decode_args(struct mount struct nfs_args *argp, const char *, struct ucred *, struct thread *); static int mountnfs(struct nfs_args *, struct mount *, - struct sockaddr *, char *, u_char *, u_char *, u_char *, - struct vnode **, struct ucred *, struct thread *, int); + struct sockaddr *, char *, u_char *, int, u_char *, int, + u_char *, int, struct vnode **, struct ucred *, + struct thread *, int); static void nfs_getnlminfo(struct vnode *, uint8_t *, size_t *, struct sockaddr_storage *, int *, off_t *, struct timeval *); @@ -503,11 +504,21 @@ nfs_mountdiskless(char *path, struct vnode **vpp, struct mount *mp) { struct sockaddr *nam; - int error; + int dirlen, error; + char *dirpath; + /* + * Find the directory path in "path", which also has the server's + * name/ip address in it. + */ + dirpath = strchr(path, ':'); + if (dirpath != NULL) + dirlen = strlen(++dirpath); + else + dirlen = 0; nam = sodupsockaddr((struct sockaddr *)sin, M_WAITOK); - if ((error = mountnfs(args, mp, nam, path, NULL, NULL, NULL, vpp, - td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { + if ((error = mountnfs(args, mp, nam, path, NULL, 0, dirpath, dirlen, + NULL, 0, vpp, td->td_ucred, td, NFS_DEFAULT_NEGNAMETIMEO)) != 0) { printf("nfs_mountroot: mount %s on /: %d\n", path, error); return (error); } @@ -735,14 +746,10 @@ nfs_mount(struct mount *mp) .readahead = NFS_DEFRAHEAD, .wcommitsize = 0, /* was: NQ_DEFLEASE */ .hostname = NULL, - /* args version 4 */ .acregmin = NFS_MINATTRTIMO, .acregmax = NFS_MAXATTRTIMO, .acdirmin = NFS_MINDIRATTRTIMO, .acdirmax = NFS_MAXDIRATTRTIMO, - .dirlen = 0, - .krbnamelen = 0, - .srvkrbnamelen = 0, }; int error = 0, ret, len; struct sockaddr *nam = NULL; @@ -752,6 +759,7 @@ nfs_mount(struct mount *mp) u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100]; char *opt, *name, *secname; int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO; + int dirlen, krbnamelen, srvkrbnamelen; if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) { error = EINVAL; @@ -1008,19 +1016,19 @@ nfs_mount(struct mount *mp) strlcpy(srvkrbname, name, sizeof (srvkrbname)); else snprintf(srvkrbname, sizeof (srvkrbname), "nfs@%s", hst); - args.srvkrbnamelen = strlen(srvkrbname); + srvkrbnamelen = strlen(srvkrbname); if (vfs_getopt(mp->mnt_optnew, "gssname", (void **)&name, NULL) == 0) strlcpy(krbname, name, sizeof (krbname)); else krbname[0] = '\0'; - args.krbnamelen = strlen(krbname); + krbnamelen = strlen(krbname); if (vfs_getopt(mp->mnt_optnew, "dirpath", (void **)&name, NULL) == 0) strlcpy(dirpath, name, sizeof (dirpath)); else dirpath[0] = '\0'; - args.dirlen = strlen(dirpath); + dirlen = strlen(dirpath); if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr, &args.addrlen) == 0) { @@ -1034,8 +1042,9 @@ nfs_mount(struct mount *mp) } args.fh = nfh; - error = mountnfs(&args, mp, nam, hst, krbname, dirpath, srvkrbname, - &vp, td->td_ucred, td, negnametimeo); + error = mountnfs(&args, mp, nam, hst, krbname, krbnamelen, dirpath, + dirlen, srvkrbname, srvkrbnamelen, &vp, td->td_ucred, td, + negnametimeo); out: if (!error) { MNT_ILOCK(mp); @@ -1077,9 +1086,9 @@ nfs_cmount(struct mntarg *ma, void *data */ static int mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, - char *hst, u_char *krbname, u_char *dirpath, u_char *srvkrbname, - struct vnode **vpp, struct ucred *cred, struct thread *td, - int negnametimeo) + char *hst, u_char *krbname, int krbnamelen, u_char *dirpath, int dirlen, + u_char *srvkrbname, int srvkrbnamelen, struct vnode **vpp, + struct ucred *cred, struct thread *td, int negnametimeo) { struct nfsmount *nmp; struct nfsnode *np; @@ -1094,17 +1103,15 @@ mountnfs(struct nfs_args *argp, struct m return (0); } else { MALLOC(nmp, struct nfsmount *, sizeof (struct nfsmount) + - argp->krbnamelen + argp->dirlen + argp->srvkrbnamelen + 2, - M_NEWNFSMNT, M_WAITOK); - bzero((caddr_t)nmp, sizeof (struct nfsmount) + - argp->krbnamelen + argp->dirlen + argp->srvkrbnamelen + 2); + krbnamelen + dirlen + srvkrbnamelen + 2, + M_NEWNFSMNT, M_WAITOK | M_ZERO); TAILQ_INIT(&nmp->nm_bufq); if (clval == 0) clval = (u_int64_t)nfsboottime.tv_sec; nmp->nm_clval = clval++; - nmp->nm_krbnamelen = argp->krbnamelen; - nmp->nm_dirpathlen = argp->dirlen; - nmp->nm_srvkrbnamelen = argp->srvkrbnamelen; + nmp->nm_krbnamelen = krbnamelen; + nmp->nm_dirpathlen = dirlen; + nmp->nm_srvkrbnamelen = srvkrbnamelen; if (td->td_ucred->cr_uid != (uid_t)0) { /* * nm_uid is used to get KerberosV credentials for Modified: head/sys/nfsclient/nfsargs.h ============================================================================== --- head/sys/nfsclient/nfsargs.h Mon Apr 25 12:36:29 2011 (r221013) +++ head/sys/nfsclient/nfsargs.h Mon Apr 25 13:09:32 2011 (r221014) @@ -78,7 +78,7 @@ struct nfs_args { #define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */ /* 0x100 free, was NFSMNT_NQNFS */ #define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */ -/* 0x400 free, was NFSMNT_KERB */ +#define NFSMNT_KERB 0x00000400 /* Use RPCSEC_GSS/Krb5 */ #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ #define NFSMNT_WCOMMITSIZE 0x00001000 /* set max write commit size */ #define NFSMNT_READAHEAD 0x00002000 /* set read ahead */ @@ -93,5 +93,9 @@ struct nfs_args { #define NFSMNT_NOLOCKD 0x00400000 /* Locks are local */ #define NFSMNT_NFSV4 0x00800000 /* Use NFS Version 4 protocol */ #define NFSMNT_HASWRITEVERF 0x01000000 /* NFSv4 Write verifier */ +#define NFSMNT_INTEGRITY 0x02000000 /* Use integrity with RPCSEC_GSS */ +#define NFSMNT_PRIVACY 0x04000000 /* Use privacy with RPCSEC_GSS */ +#define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */ +#define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */ #endif From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 13:45: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 AAF44106566C; Mon, 25 Apr 2011 13:45:50 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4FB8FC1B; Mon, 25 Apr 2011 13:45:49 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6F82E45E93; Mon, 25 Apr 2011 15:45:47 +0200 (CEST) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 54B8B45C9C; Mon, 25 Apr 2011 15:45:42 +0200 (CEST) Date: Mon, 25 Apr 2011 15:45:31 +0200 From: Pawel Jakub Dawidek To: "Bjoern A. Zeeb" Message-ID: <20110425134531.GA4391@garage.freebsd.pl> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, Robert Watson , svn-src-all@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 13:45:50 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: > I had been pondering devfs "link"s myself, the problem is that from the rc > framework they come too late. If you can add a simple .ko that does it > programmatically on 9 that would be great. The problem is that after boo= ting > the new kernel you don't know whether people had ATA_STATIC on or not, so > we'd have to go with the defaults, that were in 8.x (and an extra tunable= to > flip the logic maybe)? We do know that people have ATA_STATIC_ID, because if they don't, this means they have their custom kernel config which doesn't contain ATA_CAM and when they will use it next time they recompile their kernel they will still have /dev/adX entries. Also, as Alexander already noted, because of all the problems with ATA naming over the years and for other reasons too, people often hardcode provider name in various GEOM classes metadata, so symlink won't help. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk21evsACgkQForvXbEpPzSiXgCdFc2yODBwMNTpDw6Gehhyrbbx m+wAoPaAqKa9eaE9cvHbit2UBBzBaeIL =Xifb -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:10: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 D1965106564A; Mon, 25 Apr 2011 14:10:33 +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 C25168FC08; Mon, 25 Apr 2011 14:10: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 p3PEAXRX079288; Mon, 25 Apr 2011 14:10:33 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEAXY9079286; Mon, 25 Apr 2011 14:10:33 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251410.p3PEAXY9079286@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 14:10: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: r221015 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 14:10:33 -0000 Author: attilio Date: Mon Apr 25 14:10:33 2011 New Revision: 221015 URL: http://svn.freebsd.org/changeset/base/221015 Log: Don't assume that SMI are enabled when attaching ichwd and then do correct unwind based on former state. Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.h Modified: head/sys/dev/ichwd/ichwd.h ============================================================================== --- head/sys/dev/ichwd/ichwd.h Mon Apr 25 13:09:32 2011 (r221014) +++ head/sys/dev/ichwd/ichwd.h Mon Apr 25 14:10:33 2011 (r221015) @@ -45,6 +45,7 @@ struct ichwd_softc { int active; unsigned int timeout; + int smi_enabled; int smi_rid; struct resource *smi_res; bus_space_tag_t smi_bst; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:12: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 736C61065676; Mon, 25 Apr 2011 14:12:58 +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 645638FC12; Mon, 25 Apr 2011 14:12: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 p3PECw3Q079425; Mon, 25 Apr 2011 14:12:58 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PECwb4079423; Mon, 25 Apr 2011 14:12:58 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251412.p3PECwb4079423@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 14:12: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: r221016 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 14:12:58 -0000 Author: attilio Date: Mon Apr 25 14:12:58 2011 New Revision: 221016 URL: http://svn.freebsd.org/changeset/base/221016 Log: Add missing bit in r221015. Sponsored by: Sandvine Incorporated Reviewed by: des MFC after: 1 week X-MFC: r221015 Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Mon Apr 25 14:10:33 2011 (r221015) +++ head/sys/dev/ichwd/ichwd.c Mon Apr 25 14:12:58 2011 (r221016) @@ -217,6 +217,15 @@ ichwd_smi_enable(struct ichwd_softc *sc) } /* + * Check if the watchdog SMI triggering is enabled. + */ +static __inline int +ichwd_smi_is_enabled(struct ichwd_softc *sc) +{ + return ((ichwd_read_smi_4(sc, SMI_EN) & SMI_TCO_EN) != 0); +} + +/* * Reset the watchdog status bits. */ static __inline void @@ -534,6 +543,7 @@ ichwd_attach(device_t dev) sc->ev_tag = EVENTHANDLER_REGISTER(watchdog_list, ichwd_event, sc, 0); /* disable the SMI handler */ + sc->smi_enabled = ichwd_smi_is_enabled(sc); ichwd_smi_disable(sc); return (0); @@ -565,7 +575,8 @@ ichwd_detach(device_t dev) ichwd_tmr_disable(sc); /* enable the SMI handler */ - ichwd_smi_enable(sc); + if (sc->smi_enabled != 0) + ichwd_smi_enable(sc); /* deregister event handler */ if (sc->ev_tag != NULL) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:36: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 1DEAD106566B; Mon, 25 Apr 2011 14:36:39 +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 0BD7E8FC0C; Mon, 25 Apr 2011 14:36: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 p3PEacXL080273; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEac3J080271; Mon, 25 Apr 2011 14:36:38 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251436.p3PEac3J080271@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 14:36:38 +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: r221017 - stable/8/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 14:36:39 -0000 Author: jilles Date: Mon Apr 25 14:36:38 2011 New Revision: 221017 URL: http://svn.freebsd.org/changeset/base/221017 Log: MFC r212244: printf(1): Clarify that \OOO produces a byte, different %b escape sequences. Octal escape sequences are expanded to bytes, not characters, and multiple are required for a multibyte character. The valid escape sequences in %b strings are slightly different from the escape sequences in the format string. Modified: stable/8/usr.bin/printf/printf.1 Directory Properties: stable/8/usr.bin/printf/ (props changed) Modified: stable/8/usr.bin/printf/printf.1 ============================================================================== --- stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:12:58 2011 (r221016) +++ stable/8/usr.bin/printf/printf.1 Mon Apr 25 14:36:38 2011 (r221017) @@ -35,7 +35,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd April 14, 2005 +.Dd September 5, 2010 .Dt PRINTF 1 .Os .Sh NAME @@ -109,12 +109,13 @@ Write a character. .It Cm \e\e Write a backslash character. .It Cm \e Ns Ar num -.It Cm \e0 Ns Ar num -Write an 8-bit character whose -.Tn ASCII +Write a byte whose value is the 1-, 2-, or 3-digit octal number .Ar num . +Multibyte characters can be constructed using multiple +.Cm \e Ns Ar num +sequences. .El .Pp Each format specification is introduced by the percent character @@ -289,6 +290,11 @@ As for .Cm s , but interpret character escapes in backslash notation in the string .Ar argument . +The permitted escape sequences are slightly different in that +octal escapes are +.Cm \e0 Ns Ar num +instead of +.Cm \e Ns Ar num . .It Cm \&% Print a `%'; no argument is used. .El From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 14:51: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 5A74A10656D0; Mon, 25 Apr 2011 14:51:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B51C8FC16; Mon, 25 Apr 2011 14:51: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 p3PEp9WT080718; Mon, 25 Apr 2011 14:51:09 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PEp9Hv080716; Mon, 25 Apr 2011 14:51:09 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104251451.p3PEp9Hv080716@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 14:51: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: r221018 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 14:51:09 -0000 Author: rmacklem Date: Mon Apr 25 14:51:08 2011 New Revision: 221018 URL: http://svn.freebsd.org/changeset/base/221018 Log: Fix the experimental NFS client so that it does not bogusly set the f_flags field of "struct statfs". This had the interesting effect of making the NFSv4 mounts "disappear" after r221014, since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 14:36:38 2011 (r221017) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 14:51:08 2011 (r221018) @@ -318,7 +318,6 @@ nfs_statfs(struct mount *mp, struct stat if (gotfsinfo || (nmp->nm_flag & NFSMNT_NFSV4)) nfscl_loadfsinfo(nmp, &fs); nfscl_loadsbinfo(nmp, &sb, sbp); - sbp->f_flags = nmp->nm_flag; sbp->f_iosize = newnfs_iosize(nmp); mtx_unlock(&nmp->nm_mtx); if (sbp != &mp->mnt_stat) { From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:36: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 D184A106566B; Mon, 25 Apr 2011 15:36:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 890A08FC15; Mon, 25 Apr 2011 15:36:52 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PFVUXW021321 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 09:31:32 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> Date: Mon, 25 Apr 2011 09:31:31 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> <34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au> To: "Daniel O'Connor" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 09:31:32 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, Alexander Motin , src-committers@FreeBSD.org, Andrey Chernov , svn-src-all@FreeBSD.org Subject: Re: svn commit: r220983 - 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: Mon, 25 Apr 2011 15:36:52 -0000 On Apr 25, 2011, at 12:52 AM, Daniel O'Connor wrote: >=20 > On 25/04/2011, at 6:55, Warner Losh wrote: >>> The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are = on a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. >>=20 >> I've been running with ufs labels for a couple of years now, since = the first rumblings of this hit the streets. They work great no matter = what the underlying partitioning scheme. The one drawback is that if = you have multiple disks with the same labels, then the first one wins. = Normally not a problem, but when you have it, you need to ensure the = right one is selected. I avoid this problem by prefixing a hostname to = the label... >=20 > This is why I prefer IDs since they are nominally unique (UFS ones, = GPTs damn well better be :) >=20 > Although I concede it is rather annoying to work out which is which, = or type them out manually.. For things like ZFS, UUIDs aren't so bad because it hides them. For things like /etc/fstab, I prefer the named approach. This allows me = to survive a newfs on a partition if I have to without having to hack my = /etc/fstab. I have a large /tmp partition at times, and it gets newfs'd = if there's a bad problem... Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:37: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 A6133106571B; Mon, 25 Apr 2011 15:37:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3108FC19; Mon, 25 Apr 2011 15:37:05 +0000 (UTC) Received: from 63.imp.bsdimp.com (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PFYCxT021338 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 09:34:12 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20110425134531.GA4391@garage.freebsd.pl> Date: Mon, 25 Apr 2011 09:34:12 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> To: Pawel Jakub Dawidek X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 09:34:12 -0600 (MDT) Cc: src-committers@FreeBSD.org, Alexander Motin , "Bjoern A. Zeeb" , Robert Watson , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 15:37:05 -0000 On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: > On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >> I had been pondering devfs "link"s myself, the problem is that from = the rc >> framework they come too late. If you can add a simple .ko that does = it >> programmatically on 9 that would be great. The problem is that after = booting >> the new kernel you don't know whether people had ATA_STATIC on or = not, so >> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >> flip the logic maybe)? >=20 > We do know that people have ATA_STATIC_ID, because if they don't, this > means they have their custom kernel config which doesn't contain = ATA_CAM > and when they will use it next time they recompile their kernel they > will still have /dev/adX entries. >=20 > Also, as Alexander already noted, because of all the problems with ATA > naming over the years and for other reasons too, people often hardcode > provider name in various GEOM classes metadata, so symlink won't help. Do we have a short list of the places to look? A lot of this could be = done with a script that gets run at installworld and boot time to hunt = down the old cases and report them to the user before they upgrade their = kernel (but this would mean backing out the GENERIC change for a while = to give people a chance to upgrade to label-based provisioning... Warner From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 15:51: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 66CF71065678; Mon, 25 Apr 2011 15:51: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 522128FC1E; Mon, 25 Apr 2011 15:51: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 p3PFpn5G082487; Mon, 25 Apr 2011 15:51:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PFpnoS082485; Mon, 25 Apr 2011 15:51:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104251551.p3PFpnoS082485@svn.freebsd.org> From: Adrian Chadd Date: Mon, 25 Apr 2011 15:51: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: r221019 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 15:51:49 -0000 Author: adrian Date: Mon Apr 25 15:51:49 2011 New Revision: 221019 URL: http://svn.freebsd.org/changeset/base/221019 Log: Wrap the MIMO stuff in #ifdef AH_SUPPORT_AR5416, as the channel state doesn't have MIMO stuff in it by default. Modified: head/sys/dev/ath/ath_hal/ah.c Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon Apr 25 14:51:08 2011 (r221018) +++ head/sys/dev/ath/ath_hal/ah.c Mon Apr 25 15:51:49 2011 (r221019) @@ -906,6 +906,7 @@ ath_hal_get_mimo_chan_noise(struct ath_h const struct ieee80211_channel *chan, int16_t *nf_ctl, int16_t *nf_ext) { +#ifdef AH_SUPPORT_AR5416 HAL_CHANNEL_INTERNAL *ichan; int i; @@ -960,6 +961,9 @@ ath_hal_get_mimo_chan_noise(struct ath_h } return 1; } +#else + return 0; +#endif /* AH_SUPPORT_AR5416 */ } /* From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:29: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 D5E7C106566C; Mon, 25 Apr 2011 16:29:34 +0000 (UTC) (envelope-from mavbsd@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 4209A8FC17; Mon, 25 Apr 2011 16:29:33 +0000 (UTC) Received: by bwz12 with SMTP id 12so2707051bwz.13 for ; Mon, 25 Apr 2011 09:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=KDxuBPxlUZI6ADIv/alMArDSHUZ0JDGNTmwhA/OwQZU=; b=drZ+1/GW2ZyVwmE+EMzVELNrf904/XK8ply3efs55tdoeU7OxwM13bv3D4t9T+A2TK 3kl8lt95iW6ZuEelAvGMb4RKGj7smPE8S3yK+Q6syII1D84kImMv1vYssU/fqWT2/EJf +gS42N8oxgT6+e0CnfzDxQURxBCIE///eloK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=sdQ83LOyV4JHq98OSOOdcWBCWrvVRyh9/2et2vgn89TpcrxpaISOlCgdGWKTzBqGSe v11J0w9T4QkVP/zNgyoIZ2SJ7pw4PPVkHGzVoNNWgIC6R65K4oRNMUnCcrB0KdIHQq27 vcHQKgAD4QnyC1dvlmGR5W86A5REn0Dt1zMKU= Received: by 10.204.83.228 with SMTP id g36mr3592600bkl.30.1303748972241; Mon, 25 Apr 2011 09:29:32 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3350045bkl.13.2011.04.25.09.29.30 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 09:29:31 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5A166.9010302@FreeBSD.org> Date: Mon, 25 Apr 2011 19:29:26 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Warner Losh References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> In-Reply-To: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 16:29:35 -0000 Warner Losh wrote: > On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>> I had been pondering devfs "link"s myself, the problem is that from the rc >>> framework they come too late. If you can add a simple .ko that does it >>> programmatically on 9 that would be great. The problem is that after booting >>> the new kernel you don't know whether people had ATA_STATIC on or not, so >>> we'd have to go with the defaults, that were in 8.x (and an extra tunable to >>> flip the logic maybe)? >> We do know that people have ATA_STATIC_ID, because if they don't, this >> means they have their custom kernel config which doesn't contain ATA_CAM >> and when they will use it next time they recompile their kernel they >> will still have /dev/adX entries. >> >> Also, as Alexander already noted, because of all the problems with ATA >> naming over the years and for other reasons too, people often hardcode >> provider name in various GEOM classes metadata, so symlink won't help. > > Do we have a short list of the places to look? Quick man pages grepping shows that at least gmirror, gstripe, graid3, gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. For gmirror and graid3 present status can be obtained by: `gXXX list | egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: `gjournal dump adX | egrep "hcprovider: ad"`. > A lot of this could be done with a script that gets run at installworld and boot time to hunt down the old cases and report them to the user before they upgrade their kernel (but this would mean backing out the GENERIC change for a while to give people a chance to upgrade to label-based provisioning... If I understand idea right, independently of how much we delay it, there will be some people who not updated during that window to get in code detecting it during boot. Hardly many people of target auditory updating their systems each month. Same time some checks indeed could be done in installkernel. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:33: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 462841065672; Mon, 25 Apr 2011 16:33:43 +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 29C978FC12; Mon, 25 Apr 2011 16:33: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 p3PGXhLW083778; Mon, 25 Apr 2011 16:33:43 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGXh6c083776; Mon, 25 Apr 2011 16:33:43 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251633.p3PGXh6c083776@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:33: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: r221020 - 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, 25 Apr 2011 16:33:43 -0000 Author: bz Date: Mon Apr 25 16:33:42 2011 New Revision: 221020 URL: http://svn.freebsd.org/changeset/base/221020 Log: After r220885 compile the various NIC drivers depending on INET unconditionally backing out r193997, so that they are available for IPv6-only setups as well. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 25 15:51:49 2011 (r221019) +++ head/sys/conf/files Mon Apr 25 16:33:42 2011 (r221020) @@ -493,7 +493,7 @@ dev/advansys/adwcam.c optional adw dev/advansys/adwlib.c optional adw dev/advansys/adwmcode.c optional adw dev/ae/if_ae.c optional ae pci -dev/age/if_age.c optional age pci inet +dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/aha/aha.c optional aha @@ -515,8 +515,8 @@ dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci -dev/alc/if_alc.c optional alc pci inet -dev/ale/if_ale.c optional ale pci inet +dev/alc/if_alc.c optional alc pci +dev/ale/if_ale.c optional ale pci dev/amd/amd.c optional amd dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr @@ -973,11 +973,11 @@ dev/ed/if_ed_pccard.c optional ed pccar dev/ed/if_ed_pci.c optional ed pci dev/eisa/eisa_if.m standard dev/eisa/eisaconf.c optional eisa -dev/e1000/if_em.c optional em inet \ +dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_lem.c optional em inet \ +dev/e1000/if_lem.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" -dev/e1000/if_igb.c optional igb inet \ +dev/e1000/if_igb.c optional igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em | igb \ compile-with "${NORMAL_C} -I$S/dev/e1000" @@ -1046,7 +1046,7 @@ dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/mx25l.c optional mx25l -dev/fxp/if_fxp.c optional fxp inet +dev/fxp/if_fxp.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gem/if_gem_sbus.c optional gem sbus @@ -1336,7 +1336,7 @@ dev/ixgbe/ixgbe_82598.c optional ixgbe compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" -dev/jme/if_jme.c optional jme pci inet +dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard @@ -1425,7 +1425,7 @@ dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt -dev/msk/if_msk.c optional msk inet +dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs dev/mvs/mvs_pci.c optional mvs pci @@ -1639,7 +1639,7 @@ dev/siba/siba_bwn.c optional siba_bwn p dev/siba/siba_core.c optional siba_bwn pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci -dev/sk/if_sk.c optional sk pci inet +dev/sk/if_sk.c optional sk pci dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus @@ -1788,7 +1788,7 @@ dev/twa/tw_osl_freebsd.c optional twa \ dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tx/if_tx.c optional tx -dev/txp/if_txp.c optional txp inet +dev/txp/if_txp.c optional txp dev/uart/uart_bus_acpi.c optional uart acpi #dev/uart/uart_bus_cbus.c optional uart cbus dev/uart/uart_bus_ebus.c optional uart ebus From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:36: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 9C4DC106564A; Mon, 25 Apr 2011 16:36:16 +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 8C0F38FC1F; Mon, 25 Apr 2011 16:36: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 p3PGaGSc083885; Mon, 25 Apr 2011 16:36:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGaG8n083883; Mon, 25 Apr 2011 16:36:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251636.p3PGaG8n083883@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:36: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: r221021 - 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: Mon, 25 Apr 2011 16:36:16 -0000 Author: bz Date: Mon Apr 25 16:36:16 2011 New Revision: 221021 URL: http://svn.freebsd.org/changeset/base/221021 Log: Be less strict on includes than in r220746. We need in.h for both INET or INET6 as it holds all the IPPROTO_* definitions needed for the SYSCTL_NODE definitions. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/netinet/in_proto.c Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Mon Apr 25 16:33:42 2011 (r221020) +++ head/sys/netinet/in_proto.c Mon Apr 25 16:36:16 2011 (r221021) @@ -64,8 +64,13 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#endif /* INET */ +#if defined(INET) || defined(INET6) #include +#endif + +#ifdef INET #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:37: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 BB38B106566B; Mon, 25 Apr 2011 16:37:47 +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 AAE888FC19; Mon, 25 Apr 2011 16:37: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 p3PGbls5083961; Mon, 25 Apr 2011 16:37:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PGblqu083959; Mon, 25 Apr 2011 16:37:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201104251637.p3PGblqu083959@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 25 Apr 2011 16:37: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: r221022 - 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: Mon, 25 Apr 2011 16:37:47 -0000 Author: bz Date: Mon Apr 25 16:37:47 2011 New Revision: 221022 URL: http://svn.freebsd.org/changeset/base/221022 Log: We need in.h for both INET and INET6, as according to RFC 3493 it defines struct in6_addr, which is needed by ip6_hdr used in here. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 5 days Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Mon Apr 25 16:36:16 2011 (r221021) +++ head/sys/net80211/ieee80211_output.c Mon Apr 25 16:37:47 2011 (r221022) @@ -57,8 +57,11 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef INET +#if defined(INET) || defined(INET6) #include +#endif + +#ifdef INET #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 16:54: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 694A01065675; Mon, 25 Apr 2011 16:54:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 19E538FC0A; Mon, 25 Apr 2011 16:54:34 +0000 (UTC) Received: from [10.30.101.54] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PGs7Nu022039 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 10:54:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4DB5A166.9010302@FreeBSD.org> Date: Mon, 25 Apr 2011 10:54:02 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 10:54:09 -0600 (MDT) Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 16:54:34 -0000 On Apr 25, 2011, at 10:29 AM, Alexander Motin wrote: > Warner Losh wrote: >> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>> I had been pondering devfs "link"s myself, the problem is that from = the rc >>>> framework they come too late. If you can add a simple .ko that = does it >>>> programmatically on 9 that would be great. The problem is that = after booting >>>> the new kernel you don't know whether people had ATA_STATIC on or = not, so >>>> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >>>> flip the logic maybe)? >>> We do know that people have ATA_STATIC_ID, because if they don't, = this >>> means they have their custom kernel config which doesn't contain = ATA_CAM >>> and when they will use it next time they recompile their kernel they >>> will still have /dev/adX entries. >>>=20 >>> Also, as Alexander already noted, because of all the problems with = ATA >>> naming over the years and for other reasons too, people often = hardcode >>> provider name in various GEOM classes metadata, so symlink won't = help. >>=20 >> Do we have a short list of the places to look?=20 >=20 > Quick man pages grepping shows that at least gmirror, gstripe, graid3, > gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. > For gmirror and graid3 present status can be obtained by: `gXXX list | > egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and = gconcat: > `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: > `gjournal dump adX | egrep "hcprovider: ad"`. That wouldn't be too horrible... >> A lot of this could be done with a script that gets run at = installworld and boot time to hunt down the old cases and report them to = the user before they upgrade their kernel (but this would mean backing = out the GENERIC change for a while to give people a chance to upgrade to = label-based provisioning... >=20 > If I understand idea right, independently of how much we delay it, = there > will be some people who not updated during that window to get in code > detecting it during boot. Hardly many people of target auditory = updating > their systems each month. Same time some checks indeed could be done = in > installkernel. We'd have to delay it at least a month, if not more. However, the time = to have done these checks were 8.1ish rather than 9.0 nearing = code-freezeish. I'd thought there was going to be better compatibility = last year at this time, or I'd have pushed this idea harder in the = community... And yes, I'd envisioned installkernel also doing these checks, just to = be complete and prevent foot-shooting. At this point, it's all we have. = For the 9.0 install, we'll likely need to do a subset of this as people = import their gmirrors created with 8.x... Warner >=20 > --=20 > Alexander Motin >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:13: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 50910106566B; Mon, 25 Apr 2011 17:13:41 +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 3E8D48FC13; Mon, 25 Apr 2011 17:13: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 p3PHDfPL085044; Mon, 25 Apr 2011 17:13:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PHDfYl085039; Mon, 25 Apr 2011 17:13:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201104251713.p3PHDfYl085039@svn.freebsd.org> From: Attilio Rao Date: Mon, 25 Apr 2011 17:13: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: r221023 - 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: Mon, 25 Apr 2011 17:13:41 -0000 Author: attilio Date: Mon Apr 25 17:13:40 2011 New Revision: 221023 URL: http://svn.freebsd.org/changeset/base/221023 Log: Add the possibility to verify MD5 hash of incoming TCP packets. As long as this is a costy function, even when compiled in (along with the option TCP_SIGNATURE), it can be disabled via the net.inet.tcp.signature_verify_input sysctl. Sponsored by: Sandvine Incorporated Reviewed by: emaste, bz MFC after: 2 weeks Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_input.c Mon Apr 25 17:13:40 2011 (r221023) @@ -215,6 +215,12 @@ static void tcp_pulloutofband(struct so struct tcphdr *, struct mbuf *, int); static void tcp_xmit_timer(struct tcpcb *, int); static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *); +static void inline tcp_fields_to_host(struct tcphdr *); +#ifdef TCP_SIGNATURE +static void inline tcp_fields_to_net(struct tcphdr *); +static int inline tcp_signature_verify_input(struct mbuf *, int, int, + int, struct tcpopt *, struct tcphdr *, u_int); +#endif static void inline cc_ack_received(struct tcpcb *tp, struct tcphdr *th, uint16_t type); static void inline cc_conn_init(struct tcpcb *tp); @@ -440,6 +446,40 @@ cc_post_recovery(struct tcpcb *tp, struc tp->t_bytes_acked = 0; } +static inline void +tcp_fields_to_host(struct tcphdr *th) +{ + + th->th_seq = ntohl(th->th_seq); + th->th_ack = ntohl(th->th_ack); + th->th_win = ntohs(th->th_win); + th->th_urp = ntohs(th->th_urp); +} + +#ifdef TCP_SIGNATURE +static inline void +tcp_fields_to_net(struct tcphdr *th) +{ + + th->th_seq = htonl(th->th_seq); + th->th_ack = htonl(th->th_ack); + th->th_win = htons(th->th_win); + th->th_urp = htons(th->th_urp); +} + +static inline int +tcp_signature_verify_input(struct mbuf *m, int off0, int tlen, int optlen, + struct tcpopt *to, struct tcphdr *th, u_int tcpbflag) +{ + int ret; + + tcp_fields_to_net(th); + ret = tcp_signature_verify(m, off0, tlen, optlen, to, th, tcpbflag); + tcp_fields_to_host(th); + return (ret); +} +#endif + /* Neighbor Discovery, Neighbor Unreachability Detection Upper layer hint. */ #ifdef INET6 #define ND6_HINT(tp) \ @@ -519,6 +559,9 @@ tcp_input(struct mbuf *m, int off0) int thflags; int rstreason = 0; /* For badport_bandlim accounting purposes */ uint8_t iptos; +#ifdef TCP_SIGNATURE + uint8_t sig_checked = 0; +#endif #ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; #endif @@ -676,10 +719,7 @@ tcp_input(struct mbuf *m, int off0) /* * Convert TCP protocol specific fields to host format. */ - th->th_seq = ntohl(th->th_seq); - th->th_ack = ntohl(th->th_ack); - th->th_win = ntohs(th->th_win); - th->th_urp = ntohs(th->th_urp); + tcp_fields_to_host(th); /* * Delay dropping TCP, IP headers, IPv6 ext headers, and TCP options. @@ -861,8 +901,24 @@ relocked: } INP_INFO_WLOCK_ASSERT(&V_tcbinfo); +#ifdef TCP_SIGNATURE + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (sig_checked == 0) { + tp = intotcpcb(inp); + if (tp == NULL || tp->t_state == TCPS_CLOSED) { + rstreason = BANDLIM_RST_CLOSEDPORT; + goto dropwithreset; + } + if (!tcp_signature_verify_input(m, off0, tlen, optlen, + &to, th, tp->t_flags)) + goto dropunlock; + sig_checked = 1; + } +#else if (thflags & TH_SYN) tcp_dooptions(&to, optp, optlen, TO_SYN); +#endif /* * NB: tcp_twcheck unlocks the INP and frees the mbuf. */ @@ -1021,6 +1077,26 @@ relocked: tp = intotcpcb(inp); KASSERT(tp->t_state == TCPS_SYN_RECEIVED, ("%s: ", __func__)); +#ifdef TCP_SIGNATURE + if (sig_checked == 0) { + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (!tcp_signature_verify_input(m, off0, tlen, + optlen, &to, th, tp->t_flags)) { + + /* + * In SYN_SENT state if it receives an + * RST, it is allowed for further + * processing. + */ + if ((thflags & TH_RST) == 0 || + (tp->t_state == TCPS_SYN_SENT) == 0) + goto dropunlock; + } + sig_checked = 1; + } +#endif + /* * Process the segment and the data it * contains. tcp_do_segment() consumes @@ -1225,6 +1301,25 @@ relocked: return; } +#ifdef TCP_SIGNATURE + if (sig_checked == 0) { + tcp_dooptions(&to, optp, optlen, + (thflags & TH_SYN) ? TO_SYN : 0); + if (!tcp_signature_verify_input(m, off0, tlen, optlen, &to, + th, tp->t_flags)) { + + /* + * In SYN_SENT state if it receives an RST, it is + * allowed for further processing. + */ + if ((thflags & TH_RST) == 0 || + (tp->t_state == TCPS_SYN_SENT) == 0) + goto dropunlock; + } + sig_checked = 1; + } +#endif + /* * Segment belongs to a connection in SYN_SENT, ESTABLISHED or later * state. tcp_do_segment() always consumes the mbuf chain, unlocks Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_subr.c Mon Apr 25 17:13:40 2011 (r221023) @@ -213,6 +213,12 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sore &tcp_soreceive_stream, 0, "Using soreceive_stream for TCP sockets"); #endif +#ifdef TCP_SIGNATURE +static int tcp_sig_checksigs = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, signature_verify_input, CTLFLAG_RW, + &tcp_sig_checksigs, 0, "Verify RFC2385 digests on inbound traffic"); +#endif + VNET_DEFINE(uma_zone_t, sack_hole_zone); #define V_sack_hole_zone VNET(sack_hole_zone) @@ -1998,6 +2004,66 @@ tcp_signature_compute(struct mbuf *m, in KEY_FREESAV(&sav); return (0); } + +/* + * Verify the TCP-MD5 hash of a TCP segment. (RFC2385) + * + * Parameters: + * m pointer to head of mbuf chain + * len length of TCP segment data, excluding options + * optlen length of TCP segment options + * buf pointer to storage for computed MD5 digest + * direction direction of flow (IPSEC_DIR_INBOUND or OUTBOUND) + * + * Return 1 if successful, otherwise return 0. + */ +int +tcp_signature_verify(struct mbuf *m, int off0, int tlen, int optlen, + struct tcpopt *to, struct tcphdr *th, u_int tcpbflag) +{ + char tmpdigest[TCP_SIGLEN]; + + if (tcp_sig_checksigs == 0) + return (1); + if ((tcpbflag & TF_SIGNATURE) == 0) { + if ((to->to_flags & TOF_SIGNATURE) != 0) { + + /* + * If this socket is not expecting signature but + * the segment contains signature just fail. + */ + TCPSTAT_INC(tcps_sig_err_sigopt); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + + /* Signature is not expected, and not present in segment. */ + return (1); + } + + /* + * If this socket is expecting signature but the segment does not + * contain any just fail. + */ + if ((to->to_flags & TOF_SIGNATURE) == 0) { + TCPSTAT_INC(tcps_sig_err_nosigopt); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + if (tcp_signature_compute(m, off0, tlen, optlen, &tmpdigest[0], + IPSEC_DIR_INBOUND) == -1) { + TCPSTAT_INC(tcps_sig_err_buildsig); + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + + if (bcmp(to->to_signature, &tmpdigest[0], TCP_SIGLEN) != 0) { + TCPSTAT_INC(tcps_sig_rcvbadsig); + return (0); + } + TCPSTAT_INC(tcps_sig_rcvgoodsig); + return (1); +} #endif /* TCP_SIGNATURE */ static int Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_syncache.c Mon Apr 25 17:13:40 2011 (r221023) @@ -1010,7 +1010,8 @@ _syncache_add(struct in_conninfo *inc, s struct syncache_head *sch; struct mbuf *ipopts = NULL; u_int32_t flowtmp; - int win, sb_hiwat, ip_ttl, ip_tos, noopt; + u_int ltflags; + int win, sb_hiwat, ip_ttl, ip_tos; char *s; #ifdef INET6 int autoflowlabel = 0; @@ -1043,7 +1044,7 @@ _syncache_add(struct in_conninfo *inc, s ip_tos = inp->inp_ip_tos; win = sbspace(&so->so_rcv); sb_hiwat = so->so_rcv.sb_hiwat; - noopt = (tp->t_flags & TF_NOOPT); + ltflags = (tp->t_flags & (TF_NOOPT | TF_SIGNATURE)); /* By the time we drop the lock these should no longer be used. */ so = NULL; @@ -1238,14 +1239,14 @@ _syncache_add(struct in_conninfo *inc, s * XXX: Currently we always record the option by default and will * attempt to use it in syncache_respond(). */ - if (to->to_flags & TOF_SIGNATURE) + if (to->to_flags & TOF_SIGNATURE || ltflags & TF_SIGNATURE) sc->sc_flags |= SCF_SIGNATURE; #endif if (to->to_flags & TOF_SACKPERM) sc->sc_flags |= SCF_SACK; if (to->to_flags & TOF_MSS) sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */ - if (noopt) + if (ltflags & TF_NOOPT) sc->sc_flags |= SCF_NOOPT; if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) sc->sc_flags |= SCF_ECN; Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Apr 25 16:37:47 2011 (r221022) +++ head/sys/netinet/tcp_var.h Mon Apr 25 17:13:40 2011 (r221023) @@ -485,6 +485,13 @@ struct tcpstat { u_long tcps_ecn_shs; /* ECN successful handshakes */ u_long tcps_ecn_rcwnd; /* # times ECN reduced the cwnd */ + /* TCP_SIGNATURE related stats */ + u_long tcps_sig_rcvgoodsig; /* Total matching signature received */ + u_long tcps_sig_rcvbadsig; /* Total bad signature received */ + u_long tcps_sig_err_buildsig; /* Mismatching signature received */ + u_long tcps_sig_err_sigopt; /* No signature expected by socket */ + u_long tcps_sig_err_nosigopt; /* No signature provided by segment */ + u_long _pad[12]; /* 6 UTO, 6 TBD */ }; @@ -684,6 +691,8 @@ int tcp_twrespond(struct tcptw *, int); void tcp_setpersist(struct tcpcb *); #ifdef TCP_SIGNATURE int tcp_signature_compute(struct mbuf *, int, int, int, u_char *, u_int); +int tcp_signature_verify(struct mbuf *, int, int, int, struct tcpopt *, + struct tcphdr *, u_int); #endif void tcp_slowtimo(void); struct tcptemp * From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:34: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 6E9711065674; Mon, 25 Apr 2011 17:34:42 +0000 (UTC) (envelope-from mavbsd@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 AF4DF8FC12; Mon, 25 Apr 2011 17:34:40 +0000 (UTC) Received: by bwz12 with SMTP id 12so2785549bwz.13 for ; Mon, 25 Apr 2011 10:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=HYPckpByzpxGvDjb1DzfJzo2eI0tkUI/Y0mhjvY54PY=; b=sGwDZdl+ToJFVEqb6mH5cGtd1rXoVue9V/O/3aP/TAKlhIQANUANn7Qzx7DP3tOose EypvLLTsu6mVgwyxIWIxVZB2KO9QKBpxhZINBQv/Z1bqjW67CtbAixNsKPokhjHVTkzA MRjQFn6fGvFY74LjmJ/6FmcN1wN6LJC24ANBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=uqMEBb5pQRuL/0/amGlkaXquRPwId6k1dJ8+3djW6TkX7FASRXlCc7fGuBW0ET1Gn9 FmJ941d1J7Jvpxe1KztLmxScM/hejo2Tl2VGwqJBUgxsBnapfJ/G3mCLDtTO4msUVHbT jbOrf8ZOeAXVm/ya8HBkKsqJ2jvlaypRQ/tFQ= Received: by 10.204.19.65 with SMTP id z1mr3449988bka.202.1303752879669; Mon, 25 Apr 2011 10:34:39 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3382935bkl.1.2011.04.25.10.34.37 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 10:34:39 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5B0A9.4030805@FreeBSD.org> Date: Mon, 25 Apr 2011 20:34:33 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Warner Losh References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> In-Reply-To: <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 17:34:42 -0000 Warner Losh wrote: > On Apr 25, 2011, at 10:29 AM, Alexander Motin wrote: >> Warner Losh wrote: >>> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>>> I had been pondering devfs "link"s myself, the problem is that from the rc >>>>> framework they come too late. If you can add a simple .ko that does it >>>>> programmatically on 9 that would be great. The problem is that after booting >>>>> the new kernel you don't know whether people had ATA_STATIC on or not, so >>>>> we'd have to go with the defaults, that were in 8.x (and an extra tunable to >>>>> flip the logic maybe)? >>>> We do know that people have ATA_STATIC_ID, because if they don't, this >>>> means they have their custom kernel config which doesn't contain ATA_CAM >>>> and when they will use it next time they recompile their kernel they >>>> will still have /dev/adX entries. >>>> >>>> Also, as Alexander already noted, because of all the problems with ATA >>>> naming over the years and for other reasons too, people often hardcode >>>> provider name in various GEOM classes metadata, so symlink won't help. >>> Do we have a short list of the places to look? >> Quick man pages grepping shows that at least gmirror, gstripe, graid3, >> gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. >> For gmirror and graid3 present status can be obtained by: `gXXX list | >> egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: >> `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: >> `gjournal dump adX | egrep "hcprovider: ad"`. > > That wouldn't be too horrible... > >>> A lot of this could be done with a script that gets run at installworld and boot time to hunt down the old cases and report them to the user before they upgrade their kernel (but this would mean backing out the GENERIC change for a while to give people a chance to upgrade to label-based provisioning... >> If I understand idea right, independently of how much we delay it, there >> will be some people who not updated during that window to get in code >> detecting it during boot. Hardly many people of target auditory updating >> their systems each month. Same time some checks indeed could be done in >> installkernel. > > We'd have to delay it at least a month, if not more. However, the time to have done these checks were 8.1ish rather than 9.0 nearing code-freezeish. I'd thought there was going to be better compatibility last year at this time, or I'd have pushed this idea harder in the community... > > And yes, I'd envisioned installkernel also doing these checks, just to be complete and prevent foot-shooting. At this point, it's all we have. For the 9.0 install, we'll likely need to do a subset of this as people import their gmirrors created with 8.x... I've thought about the process of fixing hardcoded provider names there, and it is absolutely not trivial. If we take the "symlinking" way (patch is already posted to current@), I think it will be much easier for everybody, and especially users, if I hack all mentioned above GEOM classes to ignore adX/adaY difference in provider names. And it should perfectly fit into remaining time window. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 17:49: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 D0C43106566B; Mon, 25 Apr 2011 17:49:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A159B8FC0A; Mon, 25 Apr 2011 17:49:37 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3923C46B06; Mon, 25 Apr 2011 13:49:37 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B1D158A027; Mon, 25 Apr 2011 13:49:36 -0400 (EDT) From: John Baldwin To: Alexander Motin Date: Mon, 25 Apr 2011 13:23:36 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB47CD4.9060300@FreeBSD.org> In-Reply-To: <4DB47CD4.9060300@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104251323.36510.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 25 Apr 2011 13:49:36 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 17:49:37 -0000 On Sunday, April 24, 2011 3:41:08 pm Alexander Motin wrote: > On 24.04.2011 21:59, Bjoern A. Zeeb wrote: > >> What's about creating some kind of symlinks, it could be nice if it > >> worked, but I don't see the way to do it on disk(9) or GEOM layers > >> without breaking device's access counters and as result further random > >> problems. > > > > I had been pondering devfs "link"s myself, the problem is that from the rc > > framework they come too late. If you can add a simple .ko that does it > > programmatically on 9 that would be great. The problem is that after booting > > the new kernel you don't know whether people had ATA_STATIC on or not, so > > we'd have to go with the defaults, that were in 8.x (and an extra tunable to > > flip the logic maybe)? > > Devfs links won't help users with hardcoded provider names in gmirror, > etc -- from GEOM PoV there will be no such providers. Also to create > proper mapping that module should have real-time information from CAM > about ATA controller details. And looking that it will have to link in > real time any derivative providers also (ad4s1a -> ada0s1a) I worry if > it is possible at all. Some devfs expert needed here. I think the biggest goal is to make /etc/fstab migration easiest. I wonder if you could leverage the device cloning callback in devfs to create symlinks on the fly as name lookups were done (so if mount tries to use /dev/ad4 from /etc/fstab the symlink would be created on the fly). This would allow you to handle arbitrary suffixes (i.e. just make sure it matches 'adX(.*)' and generate 'adaY\1' as the link target) without having to modify any of gpart, etc. to create a forest of symlinks. The only possible issue with this is that the devfs cloning eventhandler wants you to return a dev_t, not a symlink. That might still work fine (you might have to do a namei() lookup to find the adaX.* devfs entry), but then you would not get /dev/adX.* entries listed in /dev when you did an ls. Instead, trying to open those old names would just transparently "work". You could maybe print a message on the console warning that you were remapping an old name to a new one. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 18: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 8B27A106566B; Mon, 25 Apr 2011 18:15:45 +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 793AF8FC15; Mon, 25 Apr 2011 18: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 p3PIFjT8086927; Mon, 25 Apr 2011 18:15:45 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PIFj0s086925; Mon, 25 Apr 2011 18:15:45 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201104251815.p3PIFj0s086925@svn.freebsd.org> From: Olivier Houchard Date: Mon, 25 Apr 2011 18: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: r221025 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 18:15:45 -0000 Author: cognet Date: Mon Apr 25 18:15:45 2011 New Revision: 221025 URL: http://svn.freebsd.org/changeset/base/221025 Log: Typo fix Modified: head/sys/arm/at91/at91_wdt.c Modified: head/sys/arm/at91/at91_wdt.c ============================================================================== --- head/sys/arm/at91/at91_wdt.c Mon Apr 25 17:34:10 2011 (r221024) +++ head/sys/arm/at91/at91_wdt.c Mon Apr 25 18:15:45 2011 (r221025) @@ -102,7 +102,7 @@ wdt_watchdog(void *argp, u_int cmd, int else if (interval > 0) sc->cmd = interval | WD_ACTIVE; - /* We cannot turn of our watchdog so if user + /* We cannot turn off our watchdog so if user * fails to turn us on go to passive mode. */ if ((sc->cmd & WD_ACTIVE) == 0) sc->cmd = WD_PASSIVE; From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 18:35: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 4830E106566B; Mon, 25 Apr 2011 18:35:47 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id A1AB98FC08; Mon, 25 Apr 2011 18:35:46 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3PIZkeF007091; Mon, 25 Apr 2011 11:35:46 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3PIZkr5007090; Mon, 25 Apr 2011 11:35:46 -0700 (PDT) (envelope-from obrien) Date: Mon, 25 Apr 2011 11:35:46 -0700 From: "David O'Brien" To: Alexander Motin Message-ID: <20110425183546.GA6188@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? X-Mutt-References: <201104240858.p3O8wwqT024628@svn.freebsd.org> X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages 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, 25 Apr 2011 18:35:47 -0000 On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: > Log: > Switch the GENERIC kernels for all architectures to the new CAM-based ATA > stack. It means that all legacy ATA drivers are disabled and replaced by > respective CAM drivers. If you are using ATA device names in /etc/fstab or > other places, make sure to update them respectively (adX -> adaY, > acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential > numbers for each type in order of detection, unless configured otherwise > with tunables, see cam(4)). I apologize if I missed a past discussion... but wasn't CAM designed so that all disk-like things would be 'da' (direct access) irregardless of underling protocol (SCSI/SAS/PATA/SATA)? "afdX -> daY" above helps suggest this. Wasn't that the reason we moved from 'sd' to 'da'? At least this was the impression on freebsd-current@ back when we when thru this in 1999 (e.g., <36EFF7C2.41C67EA6@whistle.com>, <4714.920569143@verdi.nethelp.no>, <29382.921672594@verdi.nethelp.no>, <199903172035.PAA07013@khavrinen.lcs.mit.edu>). Now ATA-CAM is the default, why aren't disks devices named by the established CAM names? If we're not going to call CAM controlled ATA disks "da", then why not keep the existing "ad" and "ar" given "ad" stood for "ATA-Disk" and "ATA-RAID" -- you're still calling the subsystem "ata". Otherwise, we can just recycle email from 1999 where folks didn't see much value in the sd->da change. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:15: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 A01A81065675; Mon, 25 Apr 2011 19:15:58 +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 8D9D78FC13; Mon, 25 Apr 2011 19:15: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 p3PJFwJ7088706; Mon, 25 Apr 2011 19:15:58 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PJFwZ7088704; Mon, 25 Apr 2011 19:15:58 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104251915.p3PJFwZ7088704@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 19:15: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: r221026 - head/usr.bin/printf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 19:15:58 -0000 Author: jilles Date: Mon Apr 25 19:15:58 2011 New Revision: 221026 URL: http://svn.freebsd.org/changeset/base/221026 Log: printf(1): Move non-bugs from the BUGS section to a new section CAVEATS. Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Mon Apr 25 18:15:45 2011 (r221025) +++ head/usr.bin/printf/printf.1 Mon Apr 25 19:15:58 2011 (r221026) @@ -337,6 +337,16 @@ command appeared in It is modeled after the standard library function, .Xr printf 3 . +.Sh CAVEATS +.Tn ANSI +hexadecimal character constants were deliberately not provided. +.Pp +Trying to print a dash ("-") as the first character causes +.Nm +to interpret the dash as a program argument. +.Nm -- +must be used before +.Ar format . .Sh BUGS Since the floating point numbers are translated from .Tn ASCII @@ -348,9 +358,6 @@ The .Cm L modifier may produce additional precision, depending on the hardware platform.) .Pp -.Tn ANSI -hexadecimal character constants were deliberately not provided. -.Pp The escape sequence \e000 is the string terminator. When present in the argument for the .Cm b @@ -360,10 +367,3 @@ Multibyte characters are not recognized a problem if .Ql % can appear inside a multibyte character). -.Pp -Trying to print a dash ("-") as the first character causes -.Nm -to interpet the dash as a program argument. -.Nm -- -must be used before -.Ar format . From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:16: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 E0F951065670; Mon, 25 Apr 2011 19:16:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 43E818FC14; Mon, 25 Apr 2011 19:16:37 +0000 (UTC) Received: by pwj8 with SMTP id 8so1752716pwj.13 for ; Mon, 25 Apr 2011 12:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:references:in-reply-to:mime-version :content-transfer-encoding:content-type:message-id:cc:x-mailer:from :subject:date:to; bh=14eX7lr2Gjz4DDYr6VnS3uFqoxq4CXGGfgn/VDAAdFc=; b=dvustF1/4GcYxAekDjWxDHE02MJFia6qG7nKgcvzmWPciln5iWg7pGn+iTfjSq1F4Q aS//eF4FN8lK5YeVaqZ0W6T3sxQVXwj+cct2eLYB5cR3oXisCpJVvcIu8qKUV66JaqPG FzHaZm8j7DhEe3PODSB03Oc8vLZZ1AdxkT6bc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; b=UCqT4Vk75C9whk7CvAegepdIRycUT5WpriIi6zGTLBlZ4u61/LR3RZcv2JVtAIyMOS GhdzfDzKDPWa12CgHAB3svpFw//UlX49iOTO2Ll7061PSdr13r5YRDF03yi3mR6iXLOJ 5t3ORb0sOthBmLOIZXjGUUc+T3ED+wlyH2768= Received: by 10.142.151.4 with SMTP id y4mr2927244wfd.133.1303758996950; Mon, 25 Apr 2011 12:16:36 -0700 (PDT) Received: from [10.64.171.124] ([166.205.143.68]) by mx.google.com with ESMTPS id w14sm7257579wfh.8.2011.04.25.12.16.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Apr 2011 12:16:35 -0700 (PDT) References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> In-Reply-To: <4DB5A166.9010302@FreeBSD.org> Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> X-Mailer: iPhone Mail (8C148) From: Garrett Cooper Date: Mon, 25 Apr 2011 12:16:22 -0700 To: Alexander Motin Cc: "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , "svn-src-all@FreeBSD.org" , "Bjoern A. Zeeb" , Robert Watson , "svn-src-head@FreeBSD.org" , Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 19:16:38 -0000 On Apr 25, 2011, at 9:29 AM, Alexander Motin wrote: > Warner Losh wrote: >> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>> I had been pondering devfs "link"s myself, the problem is that from the= rc >>>> framework they come too late. If you can add a simple .ko that does it= >>>> programmatically on 9 that would be great. The problem is that after b= ooting >>>> the new kernel you don't know whether people had ATA_STATIC on or not, s= o >>>> we'd have to go with the defaults, that were in 8.x (and an extra tunab= le to >>>> flip the logic maybe)? >>> We do know that people have ATA_STATIC_ID, because if they don't, this >>> means they have their custom kernel config which doesn't contain ATA_CAM= >>> and when they will use it next time they recompile their kernel they >>> will still have /dev/adX entries. >>>=20 >>> Also, as Alexander already noted, because of all the problems with ATA >>> naming over the years and for other reasons too, people often hardcode >>> provider name in various GEOM classes metadata, so symlink won't help. >>=20 >> Do we have a short list of the places to look?=20 >=20 > Quick man pages grepping shows that at least gmirror, gstripe, graid3, > gjournal, gvirstor, gconcat, gshsec support provider names hardcoding. > For gmirror and graid3 present status can be obtained by: `gXXX list | > egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and gconcat: > `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: > `gjournal dump adX | egrep "hcprovider: ad"`. >=20 >> A lot of this could be done with a script that gets run at installworld a= nd boot time to hunt down the old cases and report them to the user before t= hey upgrade their kernel (but this would mean backing out the GENERIC change= for a while to give people a chance to upgrade to label-based provisioning.= .. >=20 > If I understand idea right, independently of how much we delay it, there > will be some people who not updated during that window to get in code > detecting it during boot. Hardly many people of target auditory updating > their systems each month. Same time some checks indeed could be done in > installkernel. For people like me who install multiple kernels and boot them at will, espec= ially when there are other features under a large degree of development, thi= s kind of action isn't acceptable because it shoots you in the foot when mov= ing between the different kernels. I'd prefer having an UPDATING note with all of the affected areas so that pe= ople can understand what needs to change and adjust their systems accordingl= y. As far as geom based hardcoding is concerned: maybe this can serve as a g= ood lesson of what shouldn't be done and what should be fixed/have a transla= tion layer added for this item? Thanks, -Garrett= From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 19:23: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 593CB106566C; Mon, 25 Apr 2011 19:23:07 +0000 (UTC) (envelope-from mavbsd@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 4F92B8FC13; Mon, 25 Apr 2011 19:23:05 +0000 (UTC) Received: by bwz12 with SMTP id 12so2897960bwz.13 for ; Mon, 25 Apr 2011 12:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=V0bPMybhXpr0UBlWcTvuK5+VjaAzr+3+BI4YhmuBfsE=; b=v/eGL62D9wuzdZZgSlDpTvlvUJpWMXTT93Qom9LMVRI5C9tHKx6jL6PK303/ptWwci H8xI9RignomElZBxFjlBhCg2ulz/l0TwA5Sw4vxAu7MgGxSU3zKE9Q3IY3+WcT6hvi2n Zw1f3aEhgYGVfP+lOIdghYuLMS2sTEkbx7knE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=CmSbbn+OCCl9YPiikwVZ2vi7rX2F4k+YnXHc3QKpljnd6dYyJQLYdCVQf7TLun68aA +xhmhvVeZw+n2tDwaa8TatxMzGUoc0sXAzgCCeXYFyQb5Ajd6OxHmJsTkVuhedFbbx/Z mzh+CrHJSPpxl0z+CE3Ih+YWMGF/B8WfG5ZHc= Received: by 10.204.49.87 with SMTP id u23mr3734330bkf.171.1303759385067; Mon, 25 Apr 2011 12:23:05 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 16sm3428414bkm.6.2011.04.25.12.23.03 (version=SSLv3 cipher=OTHER); Mon, 25 Apr 2011 12:23:04 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB5CA13.8040305@FreeBSD.org> Date: Mon, 25 Apr 2011 22:22:59 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: obrien@FreeBSD.org References: <20110425183546.GA6188@dragon.NUXI.org> In-Reply-To: <20110425183546.GA6188@dragon.NUXI.org> X-Enigmail-Version: 0.96.0 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 19:23:07 -0000 David O'Brien wrote: > On Sun, Apr 24, 2011 at 08:58:58AM +0000, Alexander Motin wrote: >> Log: >> Switch the GENERIC kernels for all architectures to the new CAM-based ATA >> stack. It means that all legacy ATA drivers are disabled and replaced by >> respective CAM drivers. If you are using ATA device names in /etc/fstab or >> other places, make sure to update them respectively (adX -> adaY, >> acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential >> numbers for each type in order of detection, unless configured otherwise >> with tunables, see cam(4)). > > I apologize if I missed a past discussion... but wasn't CAM designed > so that all disk-like things would be 'da' (direct access) irregardless > of underling protocol (SCSI/SAS/PATA/SATA)? "afdX -> daY" above helps > suggest this. Wasn't that the reason we moved from 'sd' to 'da'? > At least this was the impression on freebsd-current@ back when we when > thru this in 1999 (e.g., <36EFF7C2.41C67EA6@whistle.com>, > <4714.920569143@verdi.nethelp.no>, <29382.921672594@verdi.nethelp.no>, > <199903172035.PAA07013@khavrinen.lcs.mit.edu>). CAM unifies the way to execute commands on devices with different transports. That is why after this change afdX become daY and acdX become cdY -- they all use SCSI command set. adaX same time stays on it's own because it is ATA and uses different peripheral driver. It was one of options to go by emulation way, translating SCSI commands into ATA. That would turned all direct access devices into SCSI and daX, but we went other way to not implement additional state machines for this translation, since existing ata(4) state machine was horrible and we prefer to drop it completely. > Now ATA-CAM is the default, why aren't disks devices named by the > established CAM names? > > If we're not going to call CAM controlled ATA disks "da", then why not > keep the existing "ad" and "ar" given "ad" stood for "ATA-Disk" and > "ATA-RAID" -- you're still calling the subsystem "ata". What's about ad and ada, there is about 18 month history of early adopting this new ATA stack. Using same name initially wasn't possible due to collisions old stack, change now -- due to many adopted systems. What's about ar, it is not so principal to me. With new names I was trying to mimic other GEOMs behavior. But if people decide otherwise, I see no problem to change it now. > Otherwise, we can just recycle email from 1999 where folks didn't > see much value in the sd->da change. Sorry, I wasn't there in 1990s to speak about that change. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 20:25: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 277441065676; Mon, 25 Apr 2011 20:25:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CA3418FC1D; Mon, 25 Apr 2011 20:25:07 +0000 (UTC) Received: from [10.30.101.54] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3PKKD11023681 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 14:20:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> Date: Mon, 25 Apr 2011 14:20:08 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 25 Apr 2011 14:20:15 -0600 (MDT) Cc: "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , Alexander Motin , "Bjoern A. Zeeb" , Robert Watson , "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 25 Apr 2011 20:25:08 -0000 On Apr 25, 2011, at 1:16 PM, Garrett Cooper wrote: > On Apr 25, 2011, at 9:29 AM, Alexander Motin wrote: >=20 >> Warner Losh wrote: >>> On Apr 25, 2011, at 7:45 AM, Pawel Jakub Dawidek wrote: >>>> On Sun, Apr 24, 2011 at 06:59:40PM +0000, Bjoern A. Zeeb wrote: >>>>> I had been pondering devfs "link"s myself, the problem is that = from the rc >>>>> framework they come too late. If you can add a simple .ko that = does it >>>>> programmatically on 9 that would be great. The problem is that = after booting >>>>> the new kernel you don't know whether people had ATA_STATIC on or = not, so >>>>> we'd have to go with the defaults, that were in 8.x (and an extra = tunable to >>>>> flip the logic maybe)? >>>> We do know that people have ATA_STATIC_ID, because if they don't, = this >>>> means they have their custom kernel config which doesn't contain = ATA_CAM >>>> and when they will use it next time they recompile their kernel = they >>>> will still have /dev/adX entries. >>>>=20 >>>> Also, as Alexander already noted, because of all the problems with = ATA >>>> naming over the years and for other reasons too, people often = hardcode >>>> provider name in various GEOM classes metadata, so symlink won't = help. >>>=20 >>> Do we have a short list of the places to look?=20 >>=20 >> Quick man pages grepping shows that at least gmirror, gstripe, = graid3, >> gjournal, gvirstor, gconcat, gshsec support provider names = hardcoding. >> For gmirror and graid3 present status can be obtained by: `gXXX list = | >> egrep "Flags: .*HARDCODED"`. For gvirstor, gshsec, gstripe and = gconcat: >> `gXXX dump adX | egrep "Hardcoded provider: ad"`. For gjournal: >> `gjournal dump adX | egrep "hcprovider: ad"`. >>=20 >>> A lot of this could be done with a script that gets run at = installworld and boot time to hunt down the old cases and report them to = the user before they upgrade their kernel (but this would mean backing = out the GENERIC change for a while to give people a chance to upgrade to = label-based provisioning... >>=20 >> If I understand idea right, independently of how much we delay it, = there >> will be some people who not updated during that window to get in code >> detecting it during boot. Hardly many people of target auditory = updating >> their systems each month. Same time some checks indeed could be done = in >> installkernel. >=20 > For people like me who install multiple kernels and boot them at will, = especially when there are other features under a large degree of = development, this kind of action isn't acceptable because it shoots you = in the foot when moving between the different kernels. No it doesn't. (a) There will be an override flag, if you really don't want to. = WITHOUT_FSCK_SANITY_CHECK=3Dt and we're done. (b) The /dev/ufsid/*,/dev/gpt/*, /dev/ufs/* naming works on both flavors = of kernel. > I'd prefer having an UPDATING note with all of the affected areas so = that people can understand what needs to change and adjust their systems = accordingly. As far as geom based hardcoding is concerned: maybe this = can serve as a good lesson of what shouldn't be done and what should be = fixed/have a translation layer added for this item? I'd prefer having it be there also. Warner > Thanks, > -Garrett >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 20:54:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1F81065673; Mon, 25 Apr 2011 20:54:12 +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 9E91E8FC18; Mon, 25 Apr 2011 20:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3PKsC6t091926; Mon, 25 Apr 2011 20:54:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PKsCaN091921; Mon, 25 Apr 2011 20:54:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201104252054.p3PKsCaN091921@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 25 Apr 2011 20:54: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: r221027 - in head: bin/sh tools/regression/bin/sh/execution X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 20:54:12 -0000 Author: jilles Date: Mon Apr 25 20:54:12 2011 New Revision: 221027 URL: http://svn.freebsd.org/changeset/base/221027 Log: sh: Set $? to 0 for background commands. For backgrounded pipelines and subshells, the previous value of $? was being preserved, which is incorrect. For backgrounded simple commands containing a command substitution, the status of the last command substitution was returned instead of 0. If fork() fails, this is an error. Added: head/tools/regression/bin/sh/execution/bg1.0 (contents, props changed) head/tools/regression/bin/sh/execution/bg2.0 (contents, props changed) head/tools/regression/bin/sh/execution/bg3.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Mon Apr 25 19:15:58 2011 (r221026) +++ head/bin/sh/eval.c Mon Apr 25 20:54:12 2011 (r221027) @@ -420,7 +420,8 @@ evalsubshell(union node *n, int flags) INTOFF; exitstatus = waitforjob(jp, (int *)NULL); INTON; - } + } else + exitstatus = 0; } @@ -559,7 +560,8 @@ evalpipe(union node *n) exitstatus = waitforjob(jp, (int *)NULL); TRACE(("evalpipe: job done exit status %d\n", exitstatus)); INTON; - } + } else + exitstatus = 0; } @@ -1056,7 +1058,8 @@ parent: /* parent process gets here (if backcmd->fd = pip[0]; close(pip[1]); backcmd->jp = jp; - } + } else + exitstatus = 0; out: if (lastarg) Added: head/tools/regression/bin/sh/execution/bg1.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg1.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +: `false` & Added: head/tools/regression/bin/sh/execution/bg2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg2.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 42; } +f +: | : & Added: head/tools/regression/bin/sh/execution/bg3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/execution/bg3.0 Mon Apr 25 20:54:12 2011 (r221027) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +f() { return 42; } +f +(:) & From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:14: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 01A3A106564A; Mon, 25 Apr 2011 21:14:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1EBA8FC15; Mon, 25 Apr 2011 21:14: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 p3PLEDlT092584; Mon, 25 Apr 2011 21:14:13 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLEDoa092581; Mon, 25 Apr 2011 21:14:13 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252114.p3PLEDoa092581@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 21:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221028 - stable/8/usr.sbin/nfsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 21:14:14 -0000 Author: rmacklem Date: Mon Apr 25 21:14:13 2011 New Revision: 221028 URL: http://svn.freebsd.org/changeset/base/221028 Log: MFC: r210933,r211397,r220518 Modify the man pages to reflect the addition of a backup stable restart file, as done by r220510. I also merged the typo fixes done in head as r210933, r211397 with joel@'s permission. This is a content change. Modified: stable/8/usr.sbin/nfsd/nfsv4.4 stable/8/usr.sbin/nfsd/stablerestart.5 Directory Properties: stable/8/usr.sbin/nfsd/ (props changed) Modified: stable/8/usr.sbin/nfsd/nfsv4.4 ============================================================================== --- stable/8/usr.sbin/nfsd/nfsv4.4 Mon Apr 25 20:54:12 2011 (r221027) +++ stable/8/usr.sbin/nfsd/nfsv4.4 Mon Apr 25 21:14:13 2011 (r221028) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2009 +.Dd April 10, 2011 .Dt NFSV4 4 .Os .Sh NAME @@ -56,12 +56,13 @@ open/lock state changing operations. To provide for correct recovery semantics, a small file described by .Xr stablerestart 5 is used by the server during the recovery phase. -If this file is missing, -the server will not start. -If this file is lost, it should be recovered from backups, since creating -an empty -.Xr stablerestart 5 -file will result in the server starting without providing a Grace Period +If this file is missing or empty, there is a backup copy maintained by +.Xr nfsd 8 +that will be used. If either file is missing, they will be +created by the +.Xr nfsd 8 . +If both the file and the backup copy are empty, +it will result in the server starting without providing a grace period for recovery. Note that recovery only occurs when the server machine is rebooted, not when the @@ -187,25 +188,9 @@ are set in .Pp You will also need to add at least one ``V4:'' line to the .Xr exports 5 -file and, before starting the server for the first time, create an empty -.sp -.Bd -literal -offset indent -compact -/var/db/nfs-stablerestart -.Ed -.sp -file. -The command -.sp -.Bd -literal -offset indent -compact -install -o root -g wheel -m 600 /dev/null /var/db/nfs-stablerestart -.Ed -.sp -executed as ``su'' should suffice. -This can only be done when the server is not running and there are no +file for .Nm -file system mounts against the server. -If this file is lost during a crash, recovery from backups is -recommended. +to work. .Pp If the file systems you are exporting are only being accessed via .Nm @@ -313,9 +298,11 @@ daemons at boot time via the ``nfsuserd_ .Xr rc.conf 5 variables. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFS V4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr stablerestart 5 @@ -329,5 +316,5 @@ NFS V4 stable restart file At this time, there is no recall of delegations for local file system operations. As such, delegations should only be enabled for file systems -that are being used soley as NFS export volumes and are not being accessed +that are being used solely as NFS export volumes and are not being accessed via local system calls nor services such as Samba. Modified: stable/8/usr.sbin/nfsd/stablerestart.5 ============================================================================== --- stable/8/usr.sbin/nfsd/stablerestart.5 Mon Apr 25 20:54:12 2011 (r221027) +++ stable/8/usr.sbin/nfsd/stablerestart.5 Mon Apr 25 21:14:13 2011 (r221028) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Sept 7, 2007 +.Dd April 10, 2011 .Dt STABLERESTART 5 .Os .Sh NAME @@ -58,7 +58,7 @@ end of the Grace Period. The rest of the file are appended records, as defined by struct nfst_rec in /usr/include/fs/nfs/nfsrvstate.h and are used represent one of two things. There are records which indicate that a -client successfully aquired state and records that indicate a client's state was revoked. +client successfully acquired state and records that indicate a client's state was revoked. State revoke records indicate that state information for a client was discarded, due to lease expiry and an otherwise conflicting open or lock request being made by a different client. @@ -75,9 +75,11 @@ is written to stable storage by the time has returned. This might require hardware level caching to be disabled for a local disk drive that holds the file, or similar. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFS V4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr nfsv4 4 @@ -86,8 +88,10 @@ NFS V4 stable restart file If the file is empty, the NFS V4 server has no choice but to return NFSERR_NOGRACE for all Reclaim requests. Although correct, this is a highly undesirable occurrence, so the file should not be lost if -at all possible. Nfsd will not create the file if it does not -exist and will simply log a failure to start, in the hopes that the -file can be recovered from a backup. To move the file, you must edit +at all possible. The backup copy of the file is maintained +and used by the +.Xr nfsd 8 +to minimize the risk of this occurring. +To move the file, you must edit the nfsd sources and recompile it. This was done to discourage accidental relocation of the file. From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:27: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 1B691106566C; Mon, 25 Apr 2011 21:27:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 088808FC15; Mon, 25 Apr 2011 21:27: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 p3PLRcgf093032; Mon, 25 Apr 2011 21:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLRcwI093030; Mon, 25 Apr 2011 21:27:38 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252127.p3PLRcwI093030@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 21:27:38 +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: r221029 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 21:27:39 -0000 Author: rmacklem Date: Mon Apr 25 21:27:38 2011 New Revision: 221029 URL: http://svn.freebsd.org/changeset/base/221029 Log: MFC: r220546 Vrele ni_startdir in the experimental NFS server for the case of NFSv2 getting an error return from VOP_MKNOD(). Without this patch, the server file system remains busy after an NFSv2 VOP_MKNOD() fails. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.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/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 25 21:14:13 2011 (r221028) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Mon Apr 25 21:27:38 2011 (r221029) @@ -763,10 +763,9 @@ nfsvno_createsub(struct nfsrv_descript * &ndp->ni_cnd, &nvap->na_vattr); vput(ndp->ni_dvp); nfsvno_relpathbuf(ndp); - if (error) { - vrele(ndp->ni_startdir); + vrele(ndp->ni_startdir); + if (error) return (error); - } } else { vrele(ndp->ni_startdir); nfsvno_relpathbuf(ndp); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 21:53: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 57DBE106564A; Mon, 25 Apr 2011 21:53:42 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4639E8FC16; Mon, 25 Apr 2011 21:53: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 p3PLrgQ2093852; Mon, 25 Apr 2011 21:53:42 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PLrgkW093850; Mon, 25 Apr 2011 21:53:42 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201104252153.p3PLrgkW093850@svn.freebsd.org> From: David Christensen Date: Mon, 25 Apr 2011 21:53: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: r221030 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 21:53:42 -0000 Author: davidch Date: Mon Apr 25 21:53:41 2011 New Revision: 221030 URL: http://svn.freebsd.org/changeset/base/221030 Log: - Added bxe(4) driver for i386 and amd64. Currently untested on other CPU architectures. MFC after: One week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 25 21:27:38 2011 (r221029) +++ head/sys/modules/Makefile Mon Apr 25 21:53:41 2011 (r221030) @@ -40,6 +40,8 @@ SUBDIR= ${_3dfx} \ bce \ bfe \ bge \ + ${_bxe} \ + ${_bxe} \ ${_bios} \ ${_bktr} \ ${_bm} \ @@ -383,6 +385,7 @@ _aout= aout _apm= apm _arcnet= arcnet _bktr= bktr +_bxe= bxe _cardbus= cardbus _cbb= cbb _ce= ce @@ -529,6 +532,7 @@ _amdsbwd= amdsbwd _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc +_bxe= bxe _cardbus= cardbus _cbb= cbb _cmx= cmx From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 22:00: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 94A311065670; Mon, 25 Apr 2011 22:00:23 +0000 (UTC) (envelope-from davidch@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68B6D8FC0A; Mon, 25 Apr 2011 22:00: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 p3PM0NU2094125; Mon, 25 Apr 2011 22:00:23 GMT (envelope-from davidch@svn.freebsd.org) Received: (from davidch@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PM0NiG094123; Mon, 25 Apr 2011 22:00:23 GMT (envelope-from davidch@svn.freebsd.org) Message-Id: <201104252200.p3PM0NiG094123@svn.freebsd.org> From: David Christensen Date: Mon, 25 Apr 2011 22:00: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: r221031 - head/sys/modules X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 22:00:23 -0000 Author: davidch Date: Mon Apr 25 22:00:23 2011 New Revision: 221031 URL: http://svn.freebsd.org/changeset/base/221031 Log: - Removed duplicate {_bxe} definition. MFC after: One week Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Apr 25 21:53:41 2011 (r221030) +++ head/sys/modules/Makefile Mon Apr 25 22:00:23 2011 (r221031) @@ -41,7 +41,6 @@ SUBDIR= ${_3dfx} \ bfe \ bge \ ${_bxe} \ - ${_bxe} \ ${_bios} \ ${_bktr} \ ${_bm} \ From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 22:22: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 EA203106566B; Mon, 25 Apr 2011 22:22:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D633B8FC1B; Mon, 25 Apr 2011 22:22: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 p3PMMpxJ094882; Mon, 25 Apr 2011 22:22:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PMMpJe094870; Mon, 25 Apr 2011 22:22:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252222.p3PMMpJe094870@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 22:22: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: r221032 - in head/sys: amd64/amd64 conf i386/i386 modules/nfscl modules/nfsclient nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 22:22:52 -0000 Author: rmacklem Date: Mon Apr 25 22:22:51 2011 New Revision: 221032 URL: http://svn.freebsd.org/changeset/base/221032 Log: Fix the experimental NFS client so that it does not bogusly set the f_flags field of "struct statfs". This had the interesting effect of making the NFSv4 mounts "disappear" after r221014, since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. Move the files used for a diskless NFS root from sys/nfsclient to sys/nfs in preparation for them to be used by both NFS clients. Also, move the declaration of the three global data structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c so that they are defined when either client uses them. Reviewed by: jhb MFC after: 2 weeks Added: head/sys/nfs/bootp_subr.c - copied, changed from r221031, head/sys/nfsclient/bootp_subr.c head/sys/nfs/krpc.h - copied unchanged from r221031, head/sys/nfsclient/krpc.h head/sys/nfs/krpc_subr.c - copied, changed from r221031, head/sys/nfsclient/krpc_subr.c head/sys/nfs/nfs_diskless.c - copied, changed from r221031, head/sys/nfsclient/nfs_diskless.c head/sys/nfs/nfsdiskless.h - copied unchanged from r221031, head/sys/nfsclient/nfsdiskless.h Deleted: head/sys/nfsclient/bootp_subr.c head/sys/nfsclient/krpc.h head/sys/nfsclient/krpc_subr.c head/sys/nfsclient/nfs_diskless.c head/sys/nfsclient/nfsdiskless.h Modified: head/sys/amd64/amd64/genassym.c head/sys/conf/files head/sys/i386/i386/genassym.c head/sys/modules/nfscl/Makefile head/sys/modules/nfsclient/Makefile head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/amd64/amd64/genassym.c Mon Apr 25 22:22:51 2011 (r221032) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/conf/files Mon Apr 25 22:22:51 2011 (r221032) @@ -2822,12 +2822,12 @@ netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb +nfs/bootp_subr.c optional bootp nfsclient | bootp nfscl +nfs/krpc_subr.c optional bootp nfsclient | bootp nfscl nfs/nfs_common.c optional nfsclient | nfsserver +nfs/nfs_diskless.c optional nfsclient nfs_root | nfscl nfs_root nfs/nfs_lock.c optional nfsclient | nfscl | nfslockd | nfsd -nfsclient/bootp_subr.c optional bootp nfsclient -nfsclient/krpc_subr.c optional bootp nfsclient nfsclient/nfs_bio.c optional nfsclient -nfsclient/nfs_diskless.c optional nfsclient nfs_root nfsclient/nfs_node.c optional nfsclient nfsclient/nfs_krpc.c optional nfsclient nfsclient/nfs_subs.c optional nfsclient Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/i386/i386/genassym.c Mon Apr 25 22:22:51 2011 (r221032) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #ifdef DEV_APIC #include #endif Modified: head/sys/modules/nfscl/Makefile ============================================================================== --- head/sys/modules/nfscl/Makefile Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/modules/nfscl/Makefile Mon Apr 25 22:22:51 2011 (r221032) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../fs/nfsclient +.PATH: ${.CURDIR}/../../fs/nfsclient ${.CURDIR}/../../nfs KMOD= nfscl SRCS= vnode_if.h \ nfs_clrpcops.c \ @@ -22,4 +22,36 @@ SRCS= vnode_if.h \ opt_ufs.h \ opt_kgssapi.h +.if !defined(KERNBUILDDIR) +NFS_INET?= 1 # 0/1 - requires INET to be configured in kernel +NFS_INET6?= 1 # 0/1 - requires INET6 to be configured in kernel +NFS_ROOT?= 1 # 0/1 - requires NFS_ROOT to be configured in kernel + +.if ${NFS_INET} > 0 +opt_inet.h: + echo "#define INET 1" > ${.TARGET} +.endif + +.if ${NFS_INET6} > 0 +opt_inet6.h: + echo "#define INET6 1" > ${.TARGET} +.endif + +.if ${NFS_ROOT} > 0 +opt_nfsroot.h: + echo "#define NFS_ROOT 1" > ${.TARGET} +.endif +.else +OPT_NFS_ROOT!= cat ${KERNBUILDDIR}/opt_nfsroot.h +.if empty(OPT_NFS_ROOT) +NFS_ROOT= 0 +.else +NFS_ROOT= 1 +.endif +.endif + +.if ${NFS_ROOT} > 0 +SRCS+= nfs_diskless.c +.endif + .include Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/modules/nfsclient/Makefile Mon Apr 25 22:22:51 2011 (r221032) @@ -1,6 +1,6 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../rpc +.PATH: ${.CURDIR}/../../nfsclient ${.CURDIR}/../../nfs ${.CURDIR}/../../rpc KMOD= nfsclient SRCS= vnode_if.h \ Copied and modified: head/sys/nfs/bootp_subr.c (from r221031, head/sys/nfsclient/bootp_subr.c) ============================================================================== --- head/sys/nfsclient/bootp_subr.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/bootp_subr.c Mon Apr 25 22:22:51 2011 (r221032) @@ -69,8 +69,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include +#include #include Copied: head/sys/nfs/krpc.h (from r221031, head/sys/nfsclient/krpc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/krpc.h Mon Apr 25 22:22:51 2011 (r221032, copy of r221031, head/sys/nfsclient/krpc.h) @@ -0,0 +1,31 @@ +/* $NetBSD: krpc.h,v 1.4 1995/12/19 23:07:11 cgd Exp $ */ +/* $FreeBSD$ */ + +#include + +struct mbuf; +struct thread; +struct sockaddr; +struct sockaddr_in; + +int krpc_call(struct sockaddr_in *_sin, + u_int prog, u_int vers, u_int func, + struct mbuf **data, struct sockaddr **from, struct thread *td); + +int krpc_portmap(struct sockaddr_in *_sin, + u_int prog, u_int vers, u_int16_t *portp, struct thread *td); + +struct mbuf *xdr_string_encode(char *str, int len); + +/* + * RPC definitions for the portmapper + */ +#define PMAPPORT 111 +#define PMAPPROG 100000 +#define PMAPVERS 2 +#define PMAPPROC_NULL 0 +#define PMAPPROC_SET 1 +#define PMAPPROC_UNSET 2 +#define PMAPPROC_GETPORT 3 +#define PMAPPROC_DUMP 4 +#define PMAPPROC_CALLIT 5 Copied and modified: head/sys/nfs/krpc_subr.c (from r221031, head/sys/nfsclient/krpc_subr.c) ============================================================================== --- head/sys/nfsclient/krpc_subr.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/krpc_subr.c Mon Apr 25 22:22:51 2011 (r221032) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include /* Copied and modified: head/sys/nfs/nfs_diskless.c (from r221031, head/sys/nfsclient/nfs_diskless.c) ============================================================================== --- head/sys/nfsclient/nfs_diskless.c Mon Apr 25 22:00:23 2011 (r221031, copy source) +++ head/sys/nfs/nfs_diskless.c Mon Apr 25 22:22:51 2011 (r221032) @@ -55,13 +55,22 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include static int inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa); static int hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa); static int decode_nfshandle(char *ev, u_char *fh, int maxfh); /* + * This structure must be filled in by a primary bootstrap or bootstrap + * server for a diskless/dataless machine. It is initialized below just + * to ensure that it is allocated to initialized data (.data not .bss). + */ +struct nfs_diskless nfs_diskless = { { { 0 } } }; +struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; +int nfs_diskless_valid = 0; + +/* * Validate/sanity check a rsize/wsize parameter. */ static int Copied: head/sys/nfs/nfsdiskless.h (from r221031, head/sys/nfsclient/nfsdiskless.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/nfs/nfsdiskless.h Mon Apr 25 22:22:51 2011 (r221032, copy of r221031, head/sys/nfsclient/nfsdiskless.h) @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Macklem at The University of Guelph. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * @(#)nfsdiskless.h 8.2 (Berkeley) 3/30/95 + * $FreeBSD$ + */ + +#ifndef _NFSCLIENT_NFSDISKLESS_H_ +#define _NFSCLIENT_NFSDISKLESS_H_ + +/* + * Structure that must be initialized for a diskless nfs client. + * This structure is used by nfs_mountroot() to set up the root vnode, + * and to do a partial ifconfig(8) and route(8) so that the critical net + * interface can communicate with the server. + * The primary bootstrap is expected to fill in the appropriate fields before + * starting the kernel. + * Currently only works for AF_INET protocols. + * NB: All fields are stored in net byte order to avoid hassles with + * client/server byte ordering differences. + */ + +/* + * I have defined a new structure that can handle an NFS Version 3 file handle + * but the kernel still expects the old Version 2 one to be provided. The + * changes required in nfs_vfsops.c for using the new are documented there in + * comments. (I felt that breaking network booting code by changing this + * structure would not be prudent at this time, since almost all servers are + * still Version 2 anyhow.) + */ +struct nfsv3_diskless { + struct ifaliasreq myif; /* Default interface */ + struct sockaddr_in mygateway; /* Default gateway */ + struct nfs_args root_args; /* Mount args for root fs */ + int root_fhsize; /* Size of root file handle */ + u_char root_fh[NFSX_V3FHMAX]; /* File handle of root dir */ + struct sockaddr_in root_saddr; /* Address of root server */ + char root_hostnam[MNAMELEN]; /* Host name for mount pt */ + long root_time; /* Timestamp of root fs */ + char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ +}; + +/* + * Old arguments to mount NFS + */ +struct onfs_args { + struct sockaddr *addr; /* file server address */ + int addrlen; /* length of address */ + int sotype; /* Socket type */ + int proto; /* and Protocol */ + u_char *fh; /* File handle to be mounted */ + int fhsize; /* Size, in bytes, of fh */ + int flags; /* flags */ + int wsize; /* write size in bytes */ + int rsize; /* read size in bytes */ + int readdirsize; /* readdir size in bytes */ + int timeo; /* initial timeout in .1 secs */ + int retrans; /* times to retry send */ + int maxgrouplist; /* Max. size of group list */ + int readahead; /* # of blocks to readahead */ + int leaseterm; /* Term (sec) of lease */ + int deadthresh; /* Retrans threshold */ + char *hostname; /* server's name */ +}; + +struct nfs_diskless { + struct ifaliasreq myif; /* Default interface */ + struct sockaddr_in mygateway; /* Default gateway */ + struct onfs_args root_args; /* Mount args for root fs */ + u_char root_fh[NFSX_V2FH]; /* File handle of root dir */ + struct sockaddr_in root_saddr; /* Address of root server */ + char root_hostnam[MNAMELEN]; /* Host name for mount pt */ + long root_time; /* Timestamp of root fs */ + char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ +}; + +#ifdef _KERNEL +extern struct nfsv3_diskless nfsv3_diskless; +extern struct nfs_diskless nfs_diskless; +extern int nfs_diskless_valid; +void bootpc_init(void); +void nfs_setup_diskless(void); +void nfs_parse_options(const char *, struct nfs_args *); +#endif + +#endif Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Mon Apr 25 22:00:23 2011 (r221031) +++ head/sys/nfsclient/nfs_vfsops.c Mon Apr 25 22:22:51 2011 (r221032) @@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include FEATURE(nfsclient, "NFS client"); @@ -164,15 +164,6 @@ static struct nfs_rpcops nfs_rpcops = { nfs_commit, }; -/* - * This structure must be filled in by a primary bootstrap or bootstrap - * server for a diskless/dataless machine. It is initialized below just - * to ensure that it is allocated to initialized data (.data not .bss). - */ -struct nfs_diskless nfs_diskless = { { { 0 } } }; -struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; -int nfs_diskless_valid = 0; - SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, &nfs_diskless_valid, 0, "Has the diskless struct been filled correctly"); From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 22: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 42E93106566B; Mon, 25 Apr 2011 22:38:10 +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 322CD8FC0C; Mon, 25 Apr 2011 22:38: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 p3PMcArU095414; Mon, 25 Apr 2011 22:38:10 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PMcAH9095412; Mon, 25 Apr 2011 22:38:10 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201104252238.p3PMcAH9095412@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 25 Apr 2011 22:38: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: r221035 - head/sys/ia64/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 22:38:10 -0000 Author: marcel Date: Mon Apr 25 22:38:09 2011 New Revision: 221035 URL: http://svn.freebsd.org/changeset/base/221035 Log: Remove prototypes of non-existent functions. Modified: head/sys/ia64/include/pmap.h Modified: head/sys/ia64/include/pmap.h ============================================================================== --- head/sys/ia64/include/pmap.h Mon Apr 25 22:36:43 2011 (r221034) +++ head/sys/ia64/include/pmap.h Mon Apr 25 22:38:09 2011 (r221035) @@ -127,13 +127,8 @@ void pmap_bootstrap(void); void pmap_kenter(vm_offset_t va, vm_offset_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); -void pmap_setdevram(unsigned long long basea, vm_offset_t sizea); -int pmap_uses_prom_console(void); void *pmap_mapdev(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); -unsigned *pmap_pte(pmap_t, vm_offset_t) __pure2; -void pmap_set_opt (unsigned *); -void pmap_set_opt_bsp (void); struct pmap *pmap_switch(struct pmap *pmap); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 23:12: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 D0CED1065672; Mon, 25 Apr 2011 23:12:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF1FC8FC0A; Mon, 25 Apr 2011 23:12: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 p3PNCIgZ096593; Mon, 25 Apr 2011 23:12:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PNCIh1096589; Mon, 25 Apr 2011 23:12:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104252312.p3PNCIh1096589@svn.freebsd.org> From: Rick Macklem Date: Mon, 25 Apr 2011 23:12: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: r221040 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 23:12:18 -0000 Author: rmacklem Date: Mon Apr 25 23:12:18 2011 New Revision: 221040 URL: http://svn.freebsd.org/changeset/base/221040 Log: Modify the experimental (newnfs) NFS client so that it uses the same diskless NFS root code as the regular client, which was moved to sys/nfs by r221032. This fixes the newnfs client so that it can do an NFSv3 diskless root file system. MFC after: 2 weeks Deleted: head/sys/fs/nfsclient/nfsdiskless.h Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs.h head/sys/fs/nfsclient/nfs_clvfsops.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Mon Apr 25 22:56:53 2011 (r221039) +++ head/sys/fs/nfs/nfs_var.h Mon Apr 25 23:12:18 2011 (r221040) @@ -41,7 +41,6 @@ struct ucred; struct nfscred; NFSPROC_T; struct buf; -struct nfs_diskless; struct sockaddr_in; struct nfs_dlmount; struct file; Modified: head/sys/fs/nfsclient/nfs.h ============================================================================== --- head/sys/fs/nfsclient/nfs.h Mon Apr 25 22:56:53 2011 (r221039) +++ head/sys/fs/nfsclient/nfs.h Mon Apr 25 23:12:18 2011 (r221040) @@ -101,7 +101,6 @@ int ncl_fsinfo(struct nfsmount *, struct struct thread *); int ncl_init(struct vfsconf *); int ncl_uninit(struct vfsconf *); -int ncl_mountroot(struct mount *); void ncl_nfsiodnew(void); void ncl_nfsiodnew_tq(__unused void *, int); Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 22:56:53 2011 (r221039) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Mon Apr 25 23:12:18 2011 (r221040) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include FEATURE(nfscl, "NFSv4 client"); @@ -97,6 +97,7 @@ static int nfs_tprintf_delay = NFS_TPRIN SYSCTL_INT(_vfs_newnfs, NFS_TPRINTF_DELAY, downdelayinterval, CTLFLAG_RW, &nfs_tprintf_delay, 0, ""); +static int nfs_mountroot(struct mount *); static void nfs_sec_name(char *, int *); static void nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp, const char *, struct ucred *, @@ -140,19 +141,15 @@ MODULE_VERSION(newnfs, 1); * server for a diskless/dataless machine. It is initialized below just * to ensure that it is allocated to initialized data (.data not .bss). */ -struct nfs_diskless newnfs_diskless = { { { 0 } } }; -struct nfsv3_diskless newnfsv3_diskless = { { { 0 } } }; -int newnfs_diskless_valid = 0; - SYSCTL_INT(_vfs_newnfs, OID_AUTO, diskless_valid, CTLFLAG_RD, - &newnfs_diskless_valid, 0, + &nfs_diskless_valid, 0, "Has the diskless struct been filled correctly"); SYSCTL_STRING(_vfs_newnfs, OID_AUTO, diskless_rootpath, CTLFLAG_RD, - newnfsv3_diskless.root_hostnam, 0, "Path to nfs root"); + nfsv3_diskless.root_hostnam, 0, "Path to nfs root"); SYSCTL_OPAQUE(_vfs_newnfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD, - &newnfsv3_diskless.root_saddr, sizeof newnfsv3_diskless.root_saddr, + &nfsv3_diskless.root_saddr, sizeof(nfsv3_diskless.root_saddr), "%Ssockaddr_in", "Diskless root nfs address"); @@ -230,29 +227,25 @@ static void nfs_convert_diskless(void) { - bcopy(&newnfs_diskless.myif, &newnfsv3_diskless.myif, - sizeof (struct ifaliasreq)); - bcopy(&newnfs_diskless.mygateway, &newnfsv3_diskless.mygateway, - sizeof (struct sockaddr_in)); - nfs_convert_oargs(&newnfsv3_diskless.root_args, - &newnfs_diskless.root_args); - if (newnfsv3_diskless.root_args.flags & NFSMNT_NFSV3) { - newnfsv3_diskless.root_fhsize = NFSX_MYFH; - bcopy(newnfs_diskless.root_fh, newnfsv3_diskless.root_fh, - NFSX_MYFH); + bcopy(&nfs_diskless.myif, &nfsv3_diskless.myif, + sizeof(struct ifaliasreq)); + bcopy(&nfs_diskless.mygateway, &nfsv3_diskless.mygateway, + sizeof(struct sockaddr_in)); + nfs_convert_oargs(&nfsv3_diskless.root_args,&nfs_diskless.root_args); + if (nfsv3_diskless.root_args.flags & NFSMNT_NFSV3) { + nfsv3_diskless.root_fhsize = NFSX_MYFH; + bcopy(nfs_diskless.root_fh, nfsv3_diskless.root_fh, NFSX_MYFH); } else { - newnfsv3_diskless.root_fhsize = NFSX_V2FH; - bcopy(newnfs_diskless.root_fh, newnfsv3_diskless.root_fh, - NFSX_V2FH); - } - bcopy(&newnfs_diskless.root_saddr,&newnfsv3_diskless.root_saddr, - sizeof(struct sockaddr_in)); - bcopy(newnfs_diskless.root_hostnam, newnfsv3_diskless.root_hostnam, - MNAMELEN); - newnfsv3_diskless.root_time = newnfs_diskless.root_time; - bcopy(newnfs_diskless.my_hostnam, newnfsv3_diskless.my_hostnam, - MAXHOSTNAMELEN); - newnfs_diskless_valid = 3; + nfsv3_diskless.root_fhsize = NFSX_V2FH; + bcopy(nfs_diskless.root_fh, nfsv3_diskless.root_fh, NFSX_V2FH); + } + bcopy(&nfs_diskless.root_saddr,&nfsv3_diskless.root_saddr, + sizeof(struct sockaddr_in)); + bcopy(nfs_diskless.root_hostnam, nfsv3_diskless.root_hostnam, MNAMELEN); + nfsv3_diskless.root_time = nfs_diskless.root_time; + bcopy(nfs_diskless.my_hostnam, nfsv3_diskless.my_hostnam, + MAXHOSTNAMELEN); + nfs_diskless_valid = 3; } /* @@ -358,12 +351,12 @@ ncl_fsinfo(struct nfsmount *nmp, struct /* * Mount a remote root fs via. nfs. This depends on the info in the - * newnfs_diskless structure that has been filled in properly by some primary + * nfs_diskless structure that has been filled in properly by some primary * bootstrap. * It goes something like this: * - do enough of "ifconfig" by calling ifioctl() so that the system * can talk to the server - * - If newnfs_diskless.mygateway is filled in, use that address as + * - If nfs_diskless.mygateway is filled in, use that address as * a default gateway. * - build the rootfs mount point and call mountnfs() to do the rest. * @@ -372,11 +365,11 @@ ncl_fsinfo(struct nfsmount *nmp, struct * nfs_mountroot() will be called once in the boot before any other NFS * client activity occurs. */ -int -ncl_mountroot(struct mount *mp) +static int +nfs_mountroot(struct mount *mp) { struct thread *td = curthread; - struct nfsv3_diskless *nd = &newnfsv3_diskless; + struct nfsv3_diskless *nd = &nfsv3_diskless; struct socket *so; struct vnode *vp; struct ifreq ir; @@ -391,9 +384,9 @@ ncl_mountroot(struct mount *mp) nfs_setup_diskless(); #endif - if (newnfs_diskless_valid == 0) + if (nfs_diskless_valid == 0) return (-1); - if (newnfs_diskless_valid == 1) + if (nfs_diskless_valid == 1) nfs_convert_diskless(); /* @@ -767,7 +760,7 @@ nfs_mount(struct mount *mp) td = curthread; if ((mp->mnt_flag & (MNT_ROOTFS | MNT_UPDATE)) == MNT_ROOTFS) { - error = ncl_mountroot(mp); + error = nfs_mountroot(mp); goto out; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 23:29: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 9E896106566B; Mon, 25 Apr 2011 23:29:45 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 202A78FC17; Mon, 25 Apr 2011 23:29:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAKoCtk2DaFvO/2dsb2JhbACET6FkiHCsG5EwgSmDUH0EjjU X-IronPort-AV: E=Sophos;i="4.64,267,1301889600"; d="scan'208";a="119459151" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn-pri.mail.uoguelph.ca with ESMTP; 25 Apr 2011 19:29:44 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 69B20B3F53; Mon, 25 Apr 2011 19:29:44 -0400 (EDT) Date: Mon, 25 Apr 2011 19:29:44 -0400 (EDT) From: Rick Macklem To: Rick Macklem Message-ID: <1630172819.550837.1303774184344.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <201104252222.p3PMMpJe094870@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221032 - in head/sys: amd64/amd64 conf i386/i386 modules/nfscl modules/nfsclient nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 23:29:45 -0000 > Author: rmacklem > Date: Mon Apr 25 22:22:51 2011 > New Revision: 221032 > URL: http://svn.freebsd.org/changeset/base/221032 > > Log: > Fix the experimental NFS client so that it does not bogusly > set the f_flags field of "struct statfs". This had the interesting > effect of making the NFSv4 mounts "disappear" after r221014, > since NFSMNT_NFSV4 and MNT_IGNORE became the same bit. > Move the files used for a diskless NFS root from sys/nfsclient > to sys/nfs in preparation for them to be used by both NFS > clients. Also, move the declaration of the three global data > structures from sys/nfsclient/nfs_vfsops.c to sys/nfs/nfs_diskless.c > so that they are defined when either client uses them. > Oops. The first four lines of this Log message were sitting in the editor from a provious commit and I didn't delete them. I don't think there's an easy way to fix that now? rick From owner-svn-src-all@FreeBSD.ORG Mon Apr 25 23:34: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 5AB2C106566C; Mon, 25 Apr 2011 23:34:22 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F8B08FC18; Mon, 25 Apr 2011 23:34: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 p3PNYM6S097268; Mon, 25 Apr 2011 23:34:22 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3PNYMe8097265; Mon, 25 Apr 2011 23:34:22 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201104252334.p3PNYMe8097265@svn.freebsd.org> From: Jack F Vogel Date: Mon, 25 Apr 2011 23:34: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: r221041 - head/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Apr 2011 23:34:22 -0000 Author: jfv Date: Mon Apr 25 23:34:21 2011 New Revision: 221041 URL: http://svn.freebsd.org/changeset/base/221041 Log: - Add the RX refresh changes from igb to ixgbe - Also a couple minor tweaks to the TX code from the same source. - Add the INET ioctl code which has been missing from this driver, and which caused IP aliases to reset the interface. - Last, some minor logic changes that just reflect upcoming hardware support, but have no other functional effect now. MFC after a week Modified: head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixgbe/ixgbe.h Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Apr 25 23:12:18 2011 (r221040) +++ head/sys/dev/ixgbe/ixgbe.c Mon Apr 25 23:34:21 2011 (r221041) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ /*$FreeBSD$*/ #ifdef HAVE_KERNEL_OPTION_HEADERS -#include "opt_device_polling.h" +#include "opt_inet.h" #endif #include "ixgbe.h" @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.3.8"; +char ixgbe_driver_version[] = "2.3.10"; /********************************************************************* * PCI Device ID Table @@ -270,8 +270,8 @@ TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe /* * Number of Queues, can be set to 0, * it then autoconfigures based on the - * number of cpus. Each queue is a pair - * of RX and TX rings with a msix vector + * number of cpus with a max of 8. This + * can be overriden manually here. */ static int ixgbe_num_queues = 0; TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues); @@ -787,10 +787,6 @@ ixgbe_mq_start_locked(struct ifnet *ifp, return (err); } - /* Call cleanup if number of TX descriptors low */ - if (txr->tx_avail <= IXGBE_TX_CLEANUP_THRESHOLD) - ixgbe_txeof(txr); - enqueued = 0; if (m == NULL) { next = drbr_dequeue(ifp, txr->br); @@ -814,7 +810,9 @@ ixgbe_mq_start_locked(struct ifnet *ifp, ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) { + if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) + ixgbe_txeof(txr); + if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } @@ -864,10 +862,35 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c { struct adapter *adapter = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; +#ifdef INET + struct ifaddr *ifa = (struct ifaddr *)data; +#endif int error = 0; switch (command) { + case SIOCSIFADDR: +#ifdef INET + if (ifa->ifa_addr->sa_family == AF_INET) { + /* + * Since resetting hardware takes a very long time + * and results in link renegotiation we only + * initialize the hardware only when it is absolutely + * required. + */ + ifp->if_flags |= IFF_UP; + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + IXGBE_CORE_LOCK(adapter); + ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + } + if (!(ifp->if_flags & IFF_NOARP)) + arp_ifinit(ifp, ifa); + } else +#endif + error = ether_ioctl(ifp, command, data); + break; + case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { @@ -989,7 +1012,7 @@ ixgbe_init_locked(struct adapter *adapte if (ifp->if_capenable & IFCAP_TXCSUM) { ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); #if __FreeBSD_version >= 800000 - if (hw->mac.type == ixgbe_mac_82599EB) + if (hw->mac.type != ixgbe_mac_82598EB) ifp->if_hwassist |= CSUM_SCTP; #endif } @@ -1032,14 +1055,12 @@ ixgbe_init_locked(struct adapter *adapte gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE); - if (hw->mac.type == ixgbe_mac_82599EB) { - gpie |= IXGBE_SDP1_GPIEN; - gpie |= IXGBE_SDP2_GPIEN; - } - /* Enable Fan Failure Interrupt */ - if (hw->device_id == IXGBE_DEV_ID_82598AT) - gpie |= IXGBE_SDP1_GPIEN; + gpie |= IXGBE_SDP1_GPIEN; + + /* Add for Thermal detection */ + if (hw->mac.type == ixgbe_mac_82599EB) + gpie |= IXGBE_SDP2_GPIEN; if (adapter->msix > 1) { /* Enable Enhanced MSIX mode */ @@ -1121,7 +1142,7 @@ ixgbe_init_locked(struct adapter *adapte #ifdef IXGBE_FDIR /* Init Flow director */ - if (hw->mac.type == ixgbe_mac_82599EB) + if (hw->mac.type != ixgbe_mac_82598EB) ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc); #endif @@ -1338,8 +1359,6 @@ ixgbe_msix_que(void *arg) more_tx = ixgbe_txeof(txr); IXGBE_TX_UNLOCK(txr); - more_rx = ixgbe_rxeof(que, adapter->rx_process_limit); - /* Do AIM now? */ if (ixgbe_enable_aim == FALSE) @@ -1417,7 +1436,7 @@ ixgbe_msix_link(void *arg) if (reg_eicr & IXGBE_EICR_LSC) taskqueue_enqueue(adapter->tq, &adapter->link_task); - if (adapter->hw.mac.type == ixgbe_mac_82599EB) { + if (adapter->hw.mac.type != ixgbe_mac_82598EB) { #ifdef IXGBE_FDIR if (reg_eicr & IXGBE_EICR_FLOW_DIR) { /* This is probably overkill :) */ @@ -2792,7 +2811,7 @@ ixgbe_setup_transmit_ring(struct tx_ring #ifdef IXGBE_FDIR /* Set the rate at which we sample packets */ - if (adapter->hw.mac.type == ixgbe_mac_82599EB) + if (adapter->hw.mac.type != ixgbe_mac_82598EB) txr->atr_sample = atr_sample_rate; #endif @@ -2874,7 +2893,7 @@ ixgbe_initialize_transmit_units(struct a } - if (hw->mac.type == ixgbe_mac_82599EB) { + if (hw->mac.type != ixgbe_mac_82598EB) { u32 dmatxctl, rttdcs; dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL); dmatxctl |= IXGBE_DMATXCTL_TE; @@ -3386,11 +3405,15 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, bus_dma_segment_t pseg[1]; struct ixgbe_rx_buf *rxbuf; struct mbuf *mh, *mp; - int i, nsegs, error, cleaned; + int i, j, nsegs, error; + bool refreshed = FALSE; - i = rxr->next_to_refresh; - cleaned = -1; /* Signify no completions */ - while (i != limit) { + i = j = rxr->next_to_refresh; + /* Control the loop with one beyond */ + if (++j == adapter->num_rx_desc) + j = 0; + + while (j != limit) { rxbuf = &rxr->rx_buffers[i]; if (rxr->hdr_split == FALSE) goto no_split; @@ -3418,7 +3441,8 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr, rxbuf->m_head = mh; bus_dmamap_sync(rxr->htag, rxbuf->hmap, BUS_DMASYNC_PREREAD); - rxr->rx_base[i].read.hdr_addr = htole64(hseg[0].ds_addr); + rxr->rx_base[i].read.hdr_addr = + htole64(hseg[0].ds_addr); no_split: if (rxbuf->m_pack == NULL) { @@ -3446,17 +3470,17 @@ no_split: rxr->rx_base[i].read.pkt_addr = htole64(pseg[0].ds_addr); - cleaned = i; - /* Calculate next index */ - if (++i == adapter->num_rx_desc) - i = 0; - /* This is the work marker for refresh */ + refreshed = TRUE; + /* Next is precalculated */ + i = j; rxr->next_to_refresh = i; + if (++j == adapter->num_rx_desc) + j = 0; } update: - if (cleaned != -1) /* If we refreshed some, bump tail */ + if (refreshed) /* Update hardware tail index */ IXGBE_WRITE_REG(&adapter->hw, - IXGBE_RDT(rxr->me), cleaned); + IXGBE_RDT(rxr->me), rxr->next_to_refresh); return; } @@ -3727,6 +3751,7 @@ skip_head: rxr->lro_enabled = FALSE; rxr->rx_split_packets = 0; rxr->rx_bytes = 0; + rxr->discard = FALSE; bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -3736,7 +3761,7 @@ skip_head: ** 82598 uses software LRO, the ** 82599 uses a hardware assist. */ - if ((adapter->hw.mac.type == ixgbe_mac_82599EB) && + if ((adapter->hw.mac.type != ixgbe_mac_82598EB) && (ifp->if_capenable & IFCAP_RXCSUM) && (ifp->if_capenable & IFCAP_LRO)) ixgbe_setup_hw_rsc(rxr); @@ -3862,8 +3887,7 @@ ixgbe_initialize_receive_units(struct ad IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0); } - if (adapter->hw.mac.type == ixgbe_mac_82599EB) { - /* PSRTYPE must be initialized in 82599 */ + if (adapter->hw.mac.type != ixgbe_mac_82598EB) { u32 psrtype = IXGBE_PSRTYPE_TCPHDR | IXGBE_PSRTYPE_UDPHDR | IXGBE_PSRTYPE_IPV4HDR | @@ -4307,10 +4331,8 @@ next_desc: } /* Refresh any remaining buf structs */ - if (processed != 0) { + if (ixgbe_rx_unrefreshed(rxr)) ixgbe_refresh_mbufs(rxr, i); - processed = 0; - } rxr->next_to_check = i; @@ -4472,7 +4494,7 @@ ixgbe_setup_vlan_hw_support(struct adapt IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl); /* On 82599 the VLAN enable is per/queue in RXDCTL */ - if (hw->mac.type == ixgbe_mac_82599EB) + if (hw->mac.type != ixgbe_mac_82598EB) for (int i = 0; i < adapter->num_queues; i++) { ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); ctrl |= IXGBE_RXDCTL_VME; @@ -4491,9 +4513,7 @@ ixgbe_enable_intr(struct adapter *adapte /* Enable Fan Failure detection */ if (hw->device_id == IXGBE_DEV_ID_82598AT) mask |= IXGBE_EIMS_GPI_SDP1; - - /* 82599 specific interrupts */ - if (adapter->hw.mac.type == ixgbe_mac_82599EB) { + else { mask |= IXGBE_EIMS_ECC; mask |= IXGBE_EIMS_GPI_SDP1; mask |= IXGBE_EIMS_GPI_SDP2; @@ -4810,7 +4830,7 @@ ixgbe_update_stats_counters(struct adapt adapter->stats.gprc += IXGBE_READ_REG(hw, IXGBE_GPRC); adapter->stats.gprc -= missed_rx; - if (hw->mac.type == ixgbe_mac_82599EB) { + if (hw->mac.type != ixgbe_mac_82598EB) { adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCL) + ((u64)IXGBE_READ_REG(hw, IXGBE_GORCH) << 32); adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL) + @@ -4878,7 +4898,7 @@ ixgbe_update_stats_counters(struct adapt adapter->stats.fccrc += IXGBE_READ_REG(hw, IXGBE_FCCRC); adapter->stats.fclast += IXGBE_READ_REG(hw, IXGBE_FCLAST); /* Only read FCOE on 82599 */ - if (hw->mac.type == ixgbe_mac_82599EB) { + if (hw->mac.type != ixgbe_mac_82598EB) { adapter->stats.fcoerpdc += IXGBE_READ_REG(hw, IXGBE_FCOERPDC); adapter->stats.fcoeprc += IXGBE_READ_REG(hw, IXGBE_FCOEPRC); adapter->stats.fcoeptc += IXGBE_READ_REG(hw, IXGBE_FCOEPTC); Modified: head/sys/dev/ixgbe/ixgbe.h ============================================================================== --- head/sys/dev/ixgbe/ixgbe.h Mon Apr 25 23:12:18 2011 (r221040) +++ head/sys/dev/ixgbe/ixgbe.h Mon Apr 25 23:34:21 2011 (r221041) @@ -1,6 +1,6 @@ /****************************************************************************** - Copyright (c) 2001-2010, Intel Corporation + Copyright (c) 2001-2011, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -497,4 +497,19 @@ drbr_needs_enqueue(struct ifnet *ifp, st } #endif +/* +** Find the number of unrefreshed RX descriptors +*/ +static inline u16 +ixgbe_rx_unrefreshed(struct rx_ring *rxr) +{ + struct adapter *adapter = rxr->adapter; + + if (rxr->next_to_check > rxr->next_to_refresh) + return (rxr->next_to_check - rxr->next_to_refresh - 1); + else + return ((adapter->num_rx_desc + rxr->next_to_check) - + rxr->next_to_refresh - 1); +} + #endif /* _IXGBE_H_ */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 00: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 2498E106566B; Tue, 26 Apr 2011 00:22:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1400E8FC08; Tue, 26 Apr 2011 00: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 p3Q0MH0J098935; Tue, 26 Apr 2011 00:22:17 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3Q0MHde098931; Tue, 26 Apr 2011 00:22:17 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104260022.p3Q0MHde098931@svn.freebsd.org> From: Rick Macklem Date: Tue, 26 Apr 2011 00:22: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: r221046 - 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: Tue, 26 Apr 2011 00:22:18 -0000 Author: rmacklem Date: Tue Apr 26 00:22:17 2011 New Revision: 221046 URL: http://svn.freebsd.org/changeset/base/221046 Log: Update the /etc/rc.d scripts for mountd and nfsd so they can use the "-o" option to force the old NFS server to run. Running the old NFS server is enabled by setting oldnfs_server_enable="YES". The scripts will only enable providing service for NFSv4 if nfsv4_server_enable="YES" is set. Reviewed by: dougb (rc) Modified: head/etc/defaults/rc.conf head/etc/rc.d/mountd head/etc/rc.d/nfsd Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Apr 26 00:20:04 2011 (r221045) +++ head/etc/defaults/rc.conf Tue Apr 26 00:22:17 2011 (r221046) @@ -323,6 +323,7 @@ amd_map_program="NO" # Can be set to "y nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). +oldnfs_server_enable="NO" # Run the old NFS server (YES/NO). nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled). mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r" # Flags to mountd (if NFS server enabled). Modified: head/etc/rc.d/mountd ============================================================================== --- head/etc/rc.d/mountd Tue Apr 26 00:20:04 2011 (r221045) +++ head/etc/rc.d/mountd Tue Apr 26 00:22:17 2011 (r221046) @@ -37,11 +37,10 @@ mountd_precmd() fi fi - # If nfsv4_server_enable is yes, force use of the experimental - # server + # If oldnfs_server_enable is yes, force use of the old NFS server # - if checkyesno nfsv4_server_enable; then - rc_flags="-e ${rc_flags}" + if checkyesno oldnfs_server_enable; then + rc_flags="-o ${rc_flags}" fi if checkyesno zfs_enable; then Modified: head/etc/rc.d/nfsd ============================================================================== --- head/etc/rc.d/nfsd Tue Apr 26 00:20:04 2011 (r221045) +++ head/etc/rc.d/nfsd Tue Apr 26 00:22:17 2011 (r221046) @@ -19,19 +19,8 @@ sig_stop="USR1" nfsd_precmd() { - if checkyesno nfsv4_server_enable; then - # If nfsv4_server_enable is yes, force use - # of the experimental server - # - rc_flags="-e ${nfs_server_flags}" - - if ! checkyesno nfsuserd_enable && \ - ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 - then - force_depend nfsuserd || return 1 - fi - else - rc_flags="${nfs_server_flags}" + if checkyesno oldnfs_server_enable; then + rc_flags="-o ${nfs_server_flags}" if ! sysctl vfs.nfsrv >/dev/null 2>&1; then force_depend nfsserver || return 1 @@ -41,6 +30,30 @@ nfsd_precmd() echo 'NFS on reserved port only=YES' sysctl vfs.nfsrv.nfs_privport=1 > /dev/null fi + else + rc_flags="${nfs_server_flags}" + + # Load the modules now, so that the vfs.newnfs sysctl + # oids are available. + load_kld nfsd + + if checkyesno nfs_reserved_port_only; then + echo 'NFS on reserved port only=YES' + sysctl vfs.newnfs.nfs_privport=1 > /dev/null + fi + + if checkyesno nfsv4_server_enable; then + if ! checkyesno nfsuserd_enable && \ + ! /etc/rc.d/nfsuserd forcestatus 1>/dev/null 2>&1 + then + if ! force_depend nfsuserd; then + err 1 "Cannot run nfsuserd" + fi + fi + else + echo 'NFSv4 is disabled' + sysctl vfs.newnfs.server_max_nfsvers=3 > /dev/null + fi fi if ! checkyesno rpcbind_enable && \ From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 02:06: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 107231065674; Tue, 26 Apr 2011 02:06:32 +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 F3BAF8FC15; Tue, 26 Apr 2011 02:06: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 p3Q26VIe002223; Tue, 26 Apr 2011 02:06:31 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3Q26Vh8002221; Tue, 26 Apr 2011 02:06:31 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201104260206.p3Q26Vh8002221@svn.freebsd.org> From: Colin Percival Date: Tue, 26 Apr 2011 02:06: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: r221049 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 02:06:32 -0000 Author: cperciva Date: Tue Apr 26 02:06:31 2011 New Revision: 221049 URL: http://svn.freebsd.org/changeset/base/221049 Log: Stop trying to zero UFS1 superblocks if we fall off the end of the disk. This avoids a potentially many-hours-long loop of failed writes if newfs finds a partially-overwritten superblock (or, for that matter, random garbage which happens to have superblock magic bytes); on one occasion I found newfs trying to zero 800 million superblocks on a 50 MB disk. Reviewed by: mckusick MFC after: 1 week Modified: head/sbin/newfs/mkfs.c Modified: head/sbin/newfs/mkfs.c ============================================================================== --- head/sbin/newfs/mkfs.c Tue Apr 26 01:56:18 2011 (r221048) +++ head/sbin/newfs/mkfs.c Tue Apr 26 02:06:31 2011 (r221049) @@ -516,9 +516,12 @@ restart: fsdummy.fs_magic = 0; bwrite(&disk, part_ofs + SBLOCK_UFS1 / disk.d_bsize, chdummy, SBLOCKSIZE); - for (cg = 0; cg < fsdummy.fs_ncg; cg++) + for (cg = 0; cg < fsdummy.fs_ncg; cg++) { + if (fsbtodb(&fsdummy, cgsblock(&fsdummy, cg)) > fssize) + break; bwrite(&disk, part_ofs + fsbtodb(&fsdummy, cgsblock(&fsdummy, cg)), chdummy, SBLOCKSIZE); + } } } if (!Nflag) From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 04:01: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 9AB91106566B; Tue, 26 Apr 2011 04:01:08 +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 88A9B8FC08; Tue, 26 Apr 2011 04:01:08 +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 p3Q418Lg005951; Tue, 26 Apr 2011 04:01:08 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3Q418O4005949; Tue, 26 Apr 2011 04:01:08 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201104260401.p3Q418O4005949@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 26 Apr 2011 04:01:08 +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: r221052 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 04:01:08 -0000 Author: obrien Date: Tue Apr 26 04:01:08 2011 New Revision: 221052 URL: http://svn.freebsd.org/changeset/base/221052 Log: Catch up with r57841 which removed the possible linking against libutil by not bothering to include its API. Modified: head/usr.bin/rlogin/rlogin.c Modified: head/usr.bin/rlogin/rlogin.c ============================================================================== --- head/usr.bin/rlogin/rlogin.c Tue Apr 26 03:27:21 2011 (r221051) +++ head/usr.bin/rlogin/rlogin.c Tue Apr 26 04:01:08 2011 (r221052) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 04: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 EE74A106564A; Tue, 26 Apr 2011 04:09:20 +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 C204A8FC15; Tue, 26 Apr 2011 04:09: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 p3Q49KQR006274; Tue, 26 Apr 2011 04:09:20 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3Q49KaJ006272; Tue, 26 Apr 2011 04:09:20 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201104260409.p3Q49KaJ006272@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 26 Apr 2011 04:09: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: r221053 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 04:09:21 -0000 Author: obrien Date: Tue Apr 26 04:09:20 2011 New Revision: 221053 URL: http://svn.freebsd.org/changeset/base/221053 Log: This builds OK using the parent dir's WARNS=6. [built on both AMD64 and i386] Modified: head/usr.bin/rlogin/Makefile Modified: head/usr.bin/rlogin/Makefile ============================================================================== --- head/usr.bin/rlogin/Makefile Tue Apr 26 04:01:08 2011 (r221052) +++ head/usr.bin/rlogin/Makefile Tue Apr 26 04:09:20 2011 (r221053) @@ -7,6 +7,4 @@ BINOWN= root BINMODE=4555 PRECIOUSPROG= -WARNS?= 3 - .include From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 04:45: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 40D97106566C; Tue, 26 Apr 2011 04:45:08 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8758FC19; Tue, 26 Apr 2011 04:45:07 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3Q4j7dV008806; Mon, 25 Apr 2011 21:45:07 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3Q4j7YV008805; Mon, 25 Apr 2011 21:45:07 -0700 (PDT) (envelope-from obrien) Date: Mon, 25 Apr 2011 21:45:07 -0700 From: "David O'Brien" To: Mark Murray Message-ID: <20110426044507.GA8767@dragon.NUXI.org> References: <201104091402.p39E24bm016157@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104091402.p39E24bm016157@svn.freebsd.org> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220497 - head/lib/libcrypt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages 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, 26 Apr 2011 04:45:08 -0000 On Sat, Apr 09, 2011 at 02:02:04PM +0000, Mark Murray wrote: > Log: > Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't > hurt us. Would you mind if I committed this to be a more consistent with the existing naming? Index: crypt.c =================================================================== --- crypt.c (revision 221053) +++ crypt.c (working copy) @@ -64,12 +64,12 @@ static const struct { }, { "sha256", - sha256_crypt, + crypt_sha256, "$5$" }, { "sha512", - sha512_crypt, + crypt_sha512, "$6$" }, { Index: crypt-sha512.c =================================================================== --- crypt-sha512.c (revision 221053) +++ crypt-sha512.c (working copy) @@ -60,7 +60,7 @@ static const char sha512_rounds_prefix[] #define ROUNDS_MAX 999999999 static char * -sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) +crypt_sha512_r(const char *key, const char *salt, char *buffer, int buflen) { u_long srounds; int n; @@ -280,12 +280,12 @@ sha512_crypt_r(const char *key, const ch /* This entry point is equivalent to crypt(3). */ char * -sha512_crypt(const char *key, const char *salt) +crypt_sha512(const char *key, const char *salt) { /* We don't want to have an arbitrary limit in the size of the * password. We can compute an upper bound for the size of the * result in advance and so we can prepare the buffer we pass to - * `sha512_crypt_r'. */ + * `crypt_sha512_r'. */ static char *buffer; static int buflen; int needed; @@ -305,7 +305,7 @@ sha512_crypt(const char *key, const char buflen = needed; } - return sha512_crypt_r(key, salt, buffer, buflen); + return crypt_sha512_r(key, salt, buffer, buflen); } #ifdef TEST @@ -482,7 +482,7 @@ main(void) } for (cnt = 0; cnt < ntests2; ++cnt) { - char *cp = sha512_crypt(tests2[cnt].input, tests2[cnt].salt); + char *cp = crypt_sha512(tests2[cnt].input, tests2[cnt].salt); if (strcmp(cp, tests2[cnt].expected) != 0) { printf("test %d: expected \"%s\", got \"%s\"\n", Index: crypt.h =================================================================== --- crypt.h (revision 221053) +++ crypt.h (working copy) @@ -36,8 +36,8 @@ char *crypt_des(const char *pw, const ch char *crypt_md5(const char *pw, const char *salt); char *crypt_nthash(const char *pw, const char *salt); char *crypt_blowfish(const char *pw, const char *salt); -char *sha256_crypt (const char *pw, const char *salt); -char *sha512_crypt (const char *pw, const char *salt); +char *crypt_sha256 (const char *pw, const char *salt); +char *crypt_sha512 (const char *pw, const char *salt); extern void _crypt_to64(char *s, u_long v, int n); extern void b64_from_24bit(uint8_t B2, uint8_t B1, uint8_t B0, int n, int *buflen, char **cp); Index: crypt-sha256.c =================================================================== --- crypt-sha256.c (revision 221053) +++ crypt-sha256.c (working copy) @@ -60,7 +60,7 @@ static const char sha256_rounds_prefix[] #define ROUNDS_MAX 999999999 static char * -sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) +crypt_sha256_r(const char *key, const char *salt, char *buffer, int buflen) { u_long srounds; int n; @@ -268,12 +268,12 @@ sha256_crypt_r(const char *key, const ch /* This entry point is equivalent to crypt(3). */ char * -sha256_crypt(const char *key, const char *salt) +crypt_sha256(const char *key, const char *salt) { /* We don't want to have an arbitrary limit in the size of the * password. We can compute an upper bound for the size of the * result in advance and so we can prepare the buffer we pass to - * `sha256_crypt_r'. */ + * `crypt_sha256_r'. */ static char *buffer; static int buflen; int needed; @@ -293,7 +293,7 @@ sha256_crypt(const char *key, const char buflen = needed; } - return sha256_crypt_r(key, salt, buffer, buflen); + return crypt_sha256_r(key, salt, buffer, buflen); } #ifdef TEST @@ -459,7 +459,7 @@ main(void) } for (cnt = 0; cnt < ntests2; ++cnt) { - char *cp = sha256_crypt(tests2[cnt].input, tests2[cnt].salt); + char *cp = crypt_sha256(tests2[cnt].input, tests2[cnt].salt); if (strcmp(cp, tests2[cnt].expected) != 0) { printf("test %d: expected \"%s\", got \"%s\"\n", From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:00: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 D47491065670; Tue, 26 Apr 2011 07:00:39 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 562988FC16; Tue, 26 Apr 2011 07:00:39 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 37F1445EA4; Tue, 26 Apr 2011 09:00:37 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 664BE45683; Tue, 26 Apr 2011 09:00:31 +0200 (CEST) Date: Tue, 26 Apr 2011 09:00:20 +0200 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110426070020.GC2472@garage.freebsd.pl> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Izn7cH1Com+I3R9J" Content-Disposition: inline In-Reply-To: <4DB5B0A9.4030805@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 07:00:39 -0000 --Izn7cH1Com+I3R9J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 25, 2011 at 08:34:33PM +0300, Alexander Motin wrote: > I've thought about the process of fixing hardcoded provider names there, > and it is absolutely not trivial. If we take the "symlinking" way (patch > is already posted to current@), I think it will be much easier for > everybody, and especially users, if I hack all mentioned above GEOM > classes to ignore adX/adaY difference in provider names. And it should > perfectly fit into remaining time window. Could you be more specific what the hack would do exactly? --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --Izn7cH1Com+I3R9J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22bYQACgkQForvXbEpPzTQOwCeOzQzd3/ZdFmOabyFTElzTgfA tpMAoMQOyLr7SpvsX9TDwFu76b6zuKxh =Bzph -----END PGP SIGNATURE----- --Izn7cH1Com+I3R9J-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:03: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 332CE1065670; Tue, 26 Apr 2011 07:03:18 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id BFB178FC0C; Tue, 26 Apr 2011 07:03:17 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B9EC545EE5; Tue, 26 Apr 2011 09:03:16 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 8062045EA7; Tue, 26 Apr 2011 09:03:11 +0200 (CEST) Date: Tue, 26 Apr 2011 09:03:00 +0200 From: Pawel Jakub Dawidek To: Garrett Cooper Message-ID: <20110426070300.GD2472@garage.freebsd.pl> References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HWvPVVuAAfuRc6SZ" Content-Disposition: inline In-Reply-To: <11B524F2-70D6-4B8A-BC7C-005EB5D6E393@gmail.com> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: "src-committers@FreeBSD.org" , Alexander Motin , "Bjoern A. Zeeb" , Robert Watson , "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 07:03:18 -0000 --HWvPVVuAAfuRc6SZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 25, 2011 at 12:16:22PM -0700, Garrett Cooper wrote: > I'd prefer having an UPDATING note with all of the affected areas so that= people can understand what needs to change and adjust their systems accord= ingly. As far as geom based hardcoding is concerned: maybe this can serve a= s a good lesson of what shouldn't be done and what should be fixed/have a t= ranslation layer added for this item? Hardcoding provider names in metadata is not mistake. It was added to protect against hacks like the 'c' partition. In the system there might be serval providers representing exactly same data and hardcoding provider name allows to choose the proper one. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --HWvPVVuAAfuRc6SZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22biQACgkQForvXbEpPzSZKgCgu0PVkYsS4LcMRsCY8uPggzht fyQAnilOlOSQJeb2Xh5H+7wKPtOkM6S4 =dXSu -----END PGP SIGNATURE----- --HWvPVVuAAfuRc6SZ-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:20: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 5FC63106564A; Tue, 26 Apr 2011 07:20:01 +0000 (UTC) (envelope-from mavbsd@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 D76C28FC08; Tue, 26 Apr 2011 07:19:59 +0000 (UTC) Received: by bwz12 with SMTP id 12so423798bwz.13 for ; Tue, 26 Apr 2011 00:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=9c0dJAcb8nj0O8DR8Oi1CWgdy9Ol0VcyFFzVccckl44=; b=OsZJY8nyhN5ya1Eko+BpXG5cfqz2lYhtCqVTB9Ts8dY1ZmUo6laSfS6PQf9FxDIPDn XNZKE4KfU3hJYt1gIERNm5AF6Gqo3kRE23foc5A4USEk64FuQ7/IunUEFOy2bpBGtniG L6WQ+t6ucR6RSfDKHELRZUM+onBc7HRxt5YXo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=m3GVYhyDfNX3HWBfCrguy4Y0NB2ahJBCOJ/B7q67VLM7BxElCg/IDFdC3+WDurGVyM P9coKMgp80Rl7uFHaNow51pjSqx9JE7UwuZdYHHL1sAecH9XOlh7CXbxR3wIskJmnRDB qSEqtD3WPsnw4psUG4KfaYJ2yyh+f5M2tKGEU= Received: by 10.204.82.143 with SMTP id b15mr361894bkl.118.1303802398901; Tue, 26 Apr 2011 00:19:58 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id w3sm3670075bkt.5.2011.04.26.00.19.56 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 00:19:58 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB6721B.3020600@FreeBSD.org> Date: Tue, 26 Apr 2011 10:19:55 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <201104240858.p3O8wwqT024628@svn.freebsd.org> <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> In-Reply-To: <20110426070020.GC2472@garage.freebsd.pl> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 07:20:01 -0000 On 26.04.2011 10:00, Pawel Jakub Dawidek wrote: > On Mon, Apr 25, 2011 at 08:34:33PM +0300, Alexander Motin wrote: >> I've thought about the process of fixing hardcoded provider names there, >> and it is absolutely not trivial. If we take the "symlinking" way (patch >> is already posted to current@), I think it will be much easier for >> everybody, and especially users, if I hack all mentioned above GEOM >> classes to ignore adX/adaY difference in provider names. And it should >> perfectly fit into remaining time window. > > Could you be more specific what the hack would do exactly? I would write some comparison function, which would search both names for adX/adaY prefixes, if they found on both arguments, trimmed them and compared remaining parts. I think for usual purpose of name hardcoding device name part is less important. Comparing partition names part should be enough. The tricky part there is to properly identify device part, so I was thinking about specific hack for adX/adaY. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:30: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 1FF701065670; Tue, 26 Apr 2011 07:30:53 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6F518FC0A; Tue, 26 Apr 2011 07:30: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 p3Q7UqQg012318; Tue, 26 Apr 2011 07:30:52 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3Q7UqbD012314; Tue, 26 Apr 2011 07:30:52 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201104260730.p3Q7UqbD012314@svn.freebsd.org> From: Jeff Roberson Date: Tue, 26 Apr 2011 07:30: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: r221055 - in head/sys: kern ofed/include/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 07:30:53 -0000 Author: jeff Date: Tue Apr 26 07:30:52 2011 New Revision: 221055 URL: http://svn.freebsd.org/changeset/base/221055 Log: - Catch up to falloc() changes. - PHOLD() before using a task structure on the stack. - Fix a LOR between the sleepq lock and thread lock in _intr_drain(). Modified: head/sys/kern/kern_intr.c head/sys/ofed/include/linux/file.h head/sys/ofed/include/linux/workqueue.h Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Tue Apr 26 04:52:35 2011 (r221054) +++ head/sys/kern/kern_intr.c Tue Apr 26 07:30:52 2011 (r221055) @@ -746,7 +746,6 @@ intr_handler_source(void *cookie) void _intr_drain(int irq) { - struct mtx *mtx; struct intr_event *ie; struct intr_thread *ithd; struct thread *td; @@ -758,13 +757,21 @@ _intr_drain(int irq) return; ithd = ie->ie_thread; td = ithd->it_thread; + /* + * We set the flag and wait for it to be cleared to avoid + * long delays with potentially busy interrupt handlers + * were we to only sample TD_AWAITING_INTR() every tick. + */ thread_lock(td); - mtx = td->td_lock; if (!TD_AWAITING_INTR(td)) { ithd->it_flags |= IT_WAIT; - msleep_spin(ithd, mtx, "isync", 0); + while (ithd->it_flags & IT_WAIT) { + thread_unlock(td); + pause("idrain", 1); + thread_lock(td); + } } - mtx_unlock_spin(mtx); + thread_unlock(td); return; } Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Tue Apr 26 04:52:35 2011 (r221054) +++ head/sys/ofed/include/linux/file.h Tue Apr 26 07:30:52 2011 (r221055) @@ -92,7 +92,7 @@ get_unused_fd(void) int error; int fd; - error = falloc(curthread, &file, &fd); + error = falloc(curthread, &file, &fd, 0); if (error) return -error; return fd; Modified: head/sys/ofed/include/linux/workqueue.h ============================================================================== --- head/sys/ofed/include/linux/workqueue.h Tue Apr 26 04:52:35 2011 (r221054) +++ head/sys/ofed/include/linux/workqueue.h Tue Apr 26 07:30:52 2011 (r221055) @@ -160,9 +160,11 @@ flush_taskqueue(struct taskqueue *tq) { struct task flushtask; + PHOLD(curproc); TASK_INIT(&flushtask, 0, _flush_fn, NULL); taskqueue_enqueue(tq, &flushtask); taskqueue_drain(tq, &flushtask); + PRELE(curproc); } static inline int From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:35: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 1CE4F106566C; Tue, 26 Apr 2011 07:35:37 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 643138FC15; Tue, 26 Apr 2011 07:35:36 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 5C1FE45E87; Tue, 26 Apr 2011 09:35:34 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 255E545685; Tue, 26 Apr 2011 09:35:28 +0200 (CEST) Date: Tue, 26 Apr 2011 09:35:17 +0200 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110426073517.GF2472@garage.freebsd.pl> References: <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="65ImJOski3p8EhYV" Content-Disposition: inline In-Reply-To: <4DB6721B.3020600@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 07:35:37 -0000 --65ImJOski3p8EhYV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 10:19:55AM +0300, Alexander Motin wrote: > On 26.04.2011 10:00, Pawel Jakub Dawidek wrote: > >On Mon, Apr 25, 2011 at 08:34:33PM +0300, Alexander Motin wrote: > >>I've thought about the process of fixing hardcoded provider names there, > >>and it is absolutely not trivial. If we take the "symlinking" way (patch > >>is already posted to current@), I think it will be much easier for > >>everybody, and especially users, if I hack all mentioned above GEOM > >>classes to ignore adX/adaY difference in provider names. And it should > >>perfectly fit into remaining time window. > > > >Could you be more specific what the hack would do exactly? >=20 > I would write some comparison function, which would search both > names for adX/adaY prefixes, if they found on both arguments, > trimmed them and compared remaining parts. >=20 > I think for usual purpose of name hardcoding device name part is > less important. Comparing partition names part should be enough. The > tricky part there is to properly identify device part, so I was > thinking about specific hack for adX/adaY. I was wondering how would you match X and Y, but this is indeed not important. So on taste we could do (totally untested): static bool provider_name_matches(const char *ppname, const char *hcname) { if (strcmp(ppname, hcname) =3D=3D 0) return (true); if (strncmp(hcname, "ad", 2) !=3D 0 || hcname[2] < '0' || hcname[2] > '9') { return (false); } if (strncmp(ppname, "ada", 3) !=3D 0 || ppname[3] < '0' || ppname[3] > '9') { return (false); } /* Skip 'ad[0-9]+'. */ hcname +=3D 3; while (hcname[0] >=3D '0' && hcname[0] <=3D '9') hcname++; /* Skip 'ada[0-9]+'. ppname +=3D 4; while (ppname[0] >=3D '0' && ppname[0] <=3D '9') ppname++; return (strcmp(ppname, hcname) =3D=3D 0); } That could work. Another possibility I was thinking of was to create GEOM providers for both names and orphan the other name once one of them is opened for writing. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --65ImJOski3p8EhYV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22dbUACgkQForvXbEpPzQbigCeNwDcYVHDWMG/NqzX+qOsTWXz 78cAnjuTBx9e7BEOTy/1NohoWyeiBGs1 =jhHX -----END PGP SIGNATURE----- --65ImJOski3p8EhYV-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 07:50: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 2A4D9106564A; Tue, 26 Apr 2011 07:50:23 +0000 (UTC) (envelope-from mavbsd@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 AE4EE8FC16; Tue, 26 Apr 2011 07:50:21 +0000 (UTC) Received: by bwz12 with SMTP id 12so443993bwz.13 for ; Tue, 26 Apr 2011 00:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=swLLm8VLPa2VdgNxVK6k6qEQ4diKhA/QJerEcAJd6EI=; b=WUf+9pgFkAG2VYJ7ObLx3LCgM20HVvJ5bTre2qRdGpfCOvVHBBJ8f5DtfblLv59TX5 URLWhX+FiqBSFnZWwnWBM0jgDnf3gVvdb5WdbNVYldqA5smIRIlivBf4GpHfYh+46Q/3 r5Amn3XFBQQKg6sJThmA5a9I05Qe4PRN5Jlhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=w35GqtSLzUuPbOdW1DSH5qgIoE3w+AFw/6Dm7Dl4qhWH6m1V/kikXgByau/aK+E5xr WRnAGthfW7mvrPX5KFagvRCXkMaBSSMRKaK80NfMuMu/0365Oe17wEhqY+nCvdoe6fIU oA2UxYLrAlgpw1knaFseaghe3ptysjKq3fCe0= Received: by 10.204.19.83 with SMTP id z19mr372562bka.191.1303804220741; Tue, 26 Apr 2011 00:50:20 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3686680bkl.1.2011.04.26.00.50.18 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 00:50:20 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB67939.6080301@FreeBSD.org> Date: Tue, 26 Apr 2011 10:50:17 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <4DB441B0.8020906@FreeBSD.org> <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> In-Reply-To: <20110426073517.GF2472@garage.freebsd.pl> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 07:50:23 -0000 On 26.04.2011 10:35, Pawel Jakub Dawidek wrote: > On Tue, Apr 26, 2011 at 10:19:55AM +0300, Alexander Motin wrote: >> On 26.04.2011 10:00, Pawel Jakub Dawidek wrote: >>> On Mon, Apr 25, 2011 at 08:34:33PM +0300, Alexander Motin wrote: >>>> I've thought about the process of fixing hardcoded provider names there, >>>> and it is absolutely not trivial. If we take the "symlinking" way (patch >>>> is already posted to current@), I think it will be much easier for >>>> everybody, and especially users, if I hack all mentioned above GEOM >>>> classes to ignore adX/adaY difference in provider names. And it should >>>> perfectly fit into remaining time window. >>> >>> Could you be more specific what the hack would do exactly? >> >> I would write some comparison function, which would search both >> names for adX/adaY prefixes, if they found on both arguments, >> trimmed them and compared remaining parts. >> >> I think for usual purpose of name hardcoding device name part is >> less important. Comparing partition names part should be enough. The >> tricky part there is to properly identify device part, so I was >> thinking about specific hack for adX/adaY. > > I was wondering how would you match X and Y, but this is indeed not > important. So on taste we could do (totally untested): > > static bool > provider_name_matches(const char *ppname, const char *hcname) > { > > if (strcmp(ppname, hcname) == 0) > return (true); > if (strncmp(hcname, "ad", 2) != 0 || > hcname[2]< '0' || hcname[2]> '9') { > return (false); > } > if (strncmp(ppname, "ada", 3) != 0 || > ppname[3]< '0' || ppname[3]> '9') { > return (false); > } > /* Skip 'ad[0-9]+'. */ > hcname += 3; > while (hcname[0]>= '0'&& hcname[0]<= '9') > hcname++; > /* Skip 'ada[0-9]+'. > ppname += 4; > while (ppname[0]>= '0'&& ppname[0]<= '9') > ppname++; > > return (strcmp(ppname, hcname) == 0); > } > > That could work. Yes, I was thinking about something like that. May be just symmetric, so it could handle some cases of downgrade. > Another possibility I was thinking of was to create GEOM providers for > both names and orphan the other name once one of them is opened for > writing. I've even implemented patch (posted on current@) with close idea (I was creating extra geom with legacy name), and it will have the same problem: if somebody open any partition on the device with the new name, all legacy names will become inaccessible (busy), and vice versa. It could be not a big problem if it would only be user's choice -- we could say just: "use one or another, not both". But provider could be chosen blindly by some GEOM class, such as glabel, and then it turns into pure lottery. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 08:02: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 9490C106564A; Tue, 26 Apr 2011 08:02:48 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id C1C978FC15; Tue, 26 Apr 2011 08:02:47 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 3686945CBA; Tue, 26 Apr 2011 10:02:46 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 95B5445685; Tue, 26 Apr 2011 10:02:33 +0200 (CEST) Date: Tue, 26 Apr 2011 10:02:22 +0200 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110426080222.GG2472@garage.freebsd.pl> References: <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> <4DB67939.6080301@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ahP6B03r4gLOj5uD" Content-Disposition: inline In-Reply-To: <4DB67939.6080301@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 08:02:48 -0000 --ahP6B03r4gLOj5uD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 10:50:17AM +0300, Alexander Motin wrote: > On 26.04.2011 10:35, Pawel Jakub Dawidek wrote: > >On Tue, Apr 26, 2011 at 10:19:55AM +0300, Alexander Motin wrote: > >>On 26.04.2011 10:00, Pawel Jakub Dawidek wrote: > >>>On Mon, Apr 25, 2011 at 08:34:33PM +0300, Alexander Motin wrote: > >>>>I've thought about the process of fixing hardcoded provider names the= re, > >>>>and it is absolutely not trivial. If we take the "symlinking" way (pa= tch > >>>>is already posted to current@), I think it will be much easier for > >>>>everybody, and especially users, if I hack all mentioned above GEOM > >>>>classes to ignore adX/adaY difference in provider names. And it should > >>>>perfectly fit into remaining time window. > >>> > >>>Could you be more specific what the hack would do exactly? > >> > >>I would write some comparison function, which would search both > >>names for adX/adaY prefixes, if they found on both arguments, > >>trimmed them and compared remaining parts. > >> > >>I think for usual purpose of name hardcoding device name part is > >>less important. Comparing partition names part should be enough. The > >>tricky part there is to properly identify device part, so I was > >>thinking about specific hack for adX/adaY. > > > >I was wondering how would you match X and Y, but this is indeed not > >important. So on taste we could do (totally untested): > > > >static bool > >provider_name_matches(const char *ppname, const char *hcname) > >{ > > > > if (strcmp(ppname, hcname) =3D=3D 0) > > return (true); > > if (strncmp(hcname, "ad", 2) !=3D 0 || > > hcname[2]< '0' || hcname[2]> '9') { > > return (false); > > } > > if (strncmp(ppname, "ada", 3) !=3D 0 || > > ppname[3]< '0' || ppname[3]> '9') { > > return (false); > > } > > /* Skip 'ad[0-9]+'. */ > > hcname +=3D 3; > > while (hcname[0]>=3D '0'&& hcname[0]<=3D '9') > > hcname++; > > /* Skip 'ada[0-9]+'. > > ppname +=3D 4; > > while (ppname[0]>=3D '0'&& ppname[0]<=3D '9') > > ppname++; > > > > return (strcmp(ppname, hcname) =3D=3D 0); > >} > > > >That could work. >=20 > Yes, I was thinking about something like that. May be just > symmetric, so it could handle some cases of downgrade. Ok, so this will handle hardcoded provider names. I think this is good enough. Now, what about fstab? There is a problem to figure out which disk we booted from once we enter the kernel. I was wondering if we could detect that someone is trying to mount root which from 'ad[0-9]+' and then we could scan all ada[0-9]+ looking for UFS file system and /etc/fstab in there and / entry which matches vfs.root.mountfrom variable. This should cover 99% of cases. 1% is for cases where another disk have identical partitioning scheme and /etc/fstab file. There also might be cases where someone defines vfs.root.mountfrom in /boot/loader.conf and doesn't really use /etc/fstab. > >Another possibility I was thinking of was to create GEOM providers for > >both names and orphan the other name once one of them is opened for > >writing. >=20 > I've even implemented patch (posted on current@) with close idea (I > was creating extra geom with legacy name), and it will have the same > problem: if somebody open any partition on the device with the new > name, all legacy names will become inaccessible (busy), and vice > versa. It could be not a big problem if it would only be user's > choice -- we could say just: "use one or another, not both". But > provider could be chosen blindly by some GEOM class, such as glabel, > and then it turns into pure lottery. Good point. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --ahP6B03r4gLOj5uD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22fA4ACgkQForvXbEpPzSVkgCg58FJFGH9t000FC0OxifMvnJ1 rWEAnRKfV9yeHHuQpVbqpInURY8T6tHj =vyDX -----END PGP SIGNATURE----- --ahP6B03r4gLOj5uD-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 08:18:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3912110657DA; Tue, 26 Apr 2011 08:18:12 +0000 (UTC) (envelope-from mavbsd@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 0C5B18FC14; Tue, 26 Apr 2011 08:18:10 +0000 (UTC) Received: by bwz12 with SMTP id 12so462161bwz.13 for ; Tue, 26 Apr 2011 01:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=FAv74fmn2EjrrM6XiV5R97GKWQuJzn2imGOfiq9kf5s=; b=svpNafyc6iq8QDD7owZtGiDAMyg6h4NYj3EUxHvT2tjqZJiK1uTz/zKF08MidZWkU0 KpXxn/RFmeC4B+9zPWREx0rjszY3mKVfahyytmr0Rbb70RlQdKlSPNYnkwyxkPBsMJNj 1pNzxHKkKf2dK8mfIKSnEsb8ajXt1+I2HZu9I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=hNdxK36uObiLZjAHXChmaZ4sLShTesyTn1Dk4DExVZY8VkZ+lGEMrpL0BspStO1Jhq dN/e8opvmtEjt6gE4IHAzbKuBRNeGSm2SKMwRqrquPeNFKhzoH3kicF/Dzv/hFG9Q3WU ynpY0TF5kc3hl/kOHoz9/hjZuIGjZ15gb9/3A= Received: by 10.204.20.74 with SMTP id e10mr408559bkb.148.1303805889802; Tue, 26 Apr 2011 01:18:09 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id l1sm3701423bkl.1.2011.04.26.01.18.08 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 01:18:09 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB67FBE.1050707@FreeBSD.org> Date: Tue, 26 Apr 2011 11:18:06 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20110425134531.GA4391@garage.freebsd.pl> <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> <4DB67939.6080301@FreeBSD.org> <20110426080222.GG2472@garage.freebsd.pl> In-Reply-To: <20110426080222.GG2472@garage.freebsd.pl> Content-Type: text/plain; charset=KOI8-R; 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 08:18:12 -0000 On 26.04.2011 11:02, Pawel Jakub Dawidek wrote: > Now, what about fstab? There is a problem to figure out which disk we > booted from once we enter the kernel. I was wondering if we could detect > that someone is trying to mount root which from 'ad[0-9]+' and > then we could scan all ada[0-9]+ looking for UFS file system and > /etc/fstab in there and / entry which matches vfs.root.mountfrom variable. > This should cover 99% of cases. 1% is for cases where another disk have > identical partitioning scheme and /etc/fstab file. There also might be > cases where someone defines vfs.root.mountfrom in /boot/loader.conf and > doesn't really use /etc/fstab. I think it will be unpredictable. Many disks may have s1a and especially s1d. What do you think about this: http://docs.freebsd.org/cgi/mid.cgi?4DB54BA9.5050901 ? I've found that zpool utility don't likes symbolic links, but except this and together with fixing hardcoding problem IMHO it looks not bad. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 08:34: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 E6A30106564A; Tue, 26 Apr 2011 08:34:49 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3348FC0C; Tue, 26 Apr 2011 08:34:49 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DA2F145EEB; Tue, 26 Apr 2011 10:34:47 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id BA01B45E49; Tue, 26 Apr 2011 10:34:41 +0200 (CEST) Date: Tue, 26 Apr 2011 10:34:31 +0200 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110426083431.GH2472@garage.freebsd.pl> References: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> <4DB67939.6080301@FreeBSD.org> <20110426080222.GG2472@garage.freebsd.pl> <4DB67FBE.1050707@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8/pVXlBMPtxfSuJG" Content-Disposition: inline In-Reply-To: <4DB67FBE.1050707@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 08:34:50 -0000 --8/pVXlBMPtxfSuJG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 11:18:06AM +0300, Alexander Motin wrote: > What do you think about this: > http://docs.freebsd.org/cgi/mid.cgi?4DB54BA9.5050901 > ? I've found that zpool utility don't likes symbolic links, but > except this and together with fixing hardcoding problem IMHO it > looks not bad. It does look good, indeed. What's the problem with zpool? It should operate on GEOM providers only. Also, ZFS should not be affected by providers name changes. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --8/pVXlBMPtxfSuJG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22g5cACgkQForvXbEpPzShdwCfdNSgL3IOMecww/KhKg6N6KNV 0ZsAoN5/r9tTzkYfG+BkUq6v8BShhI4t =NLzj -----END PGP SIGNATURE----- --8/pVXlBMPtxfSuJG-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 08:45: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 79150106566C; Tue, 26 Apr 2011 08:45:42 +0000 (UTC) (envelope-from mavbsd@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 391038FC08; Tue, 26 Apr 2011 08:45:41 +0000 (UTC) Received: by bwz12 with SMTP id 12so481016bwz.13 for ; Tue, 26 Apr 2011 01:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=uYjrS0uU6MtwCIt4RJnPJKLy0nlOtNUOHKUPg3DbCd0=; b=Vv2rpO076J8q9muhMUhJ+a6T0iGOSc6nOxBAC+p4Hv7WG1JQdh+traOinRt+FpKIb8 wmuoqGJtIM1I/07oG3KFTLwvFyXVx3vr+N9xGAOBNfMU6TCwlbLvGhUo5TdVxAwdo7C1 BtL7K1b0JpYPrfqywAH0iBfSn/Knrkr5jG8yE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=JYi6VEuLNNB9lgbF/zf0r9uxM5vJCrboxOtEbruwb3LrT2+hEqhEiPHgBMMwaJabzn HL1rEzUiKrM4xTSpjL86jgzvAHOXnynhodJMDOjrRjrtVDry0i4uHekgbja+rs9u4BZE phCZk6/qXNvfrrI+d4qc4lMRu7KwfwB7pntW0= Received: by 10.204.20.142 with SMTP id f14mr431274bkb.155.1303807540148; Tue, 26 Apr 2011 01:45:40 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id d11sm54047bka.7.2011.04.26.01.45.38 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 01:45:39 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DB68631.7070201@FreeBSD.org> Date: Tue, 26 Apr 2011 11:45:37 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110310 Thunderbird/3.1.9 MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <50385B7B-7EC8-4BC3-8F88-83F9EB4096FB@bsdimp.com> <4DB5A166.9010302@FreeBSD.org> <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> <4DB67939.6080301@FreeBSD.org> <20110426080222.GG2472@garage.freebsd.pl> <4DB67FBE.1050707@FreeBSD.org> <20110426083431.GH2472@garage.freebsd.pl> In-Reply-To: <20110426083431.GH2472@garage.freebsd.pl> Content-Type: text/plain; charset=KOI8-R; 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: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 08:45:42 -0000 On 26.04.2011 11:34, Pawel Jakub Dawidek wrote: > On Tue, Apr 26, 2011 at 11:18:06AM +0300, Alexander Motin wrote: >> What do you think about this: >> http://docs.freebsd.org/cgi/mid.cgi?4DB54BA9.5050901 >> ? I've found that zpool utility don't likes symbolic links, but >> except this and together with fixing hardcoding problem IMHO it >> looks not bad. > > It does look good, indeed. > > What's the problem with zpool? make_dev_alias() creates symlink to the original device. After that, attempt to do `zpool create test /dev/ad12 /dev/ad13` fails. May be because it doesn't resolve symlink and can't find geom with name ad12. > It should operate on GEOM providers only. OK. If `zpool create` is the only possible problem there, then I think we can live with it. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 08:59: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 22B141065672; Tue, 26 Apr 2011 08:59:45 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 84A8B8FC14; Tue, 26 Apr 2011 08:59:44 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id A6D6645E5C; Tue, 26 Apr 2011 10:59:43 +0200 (CEST) Received: from localhost (58.wheelsystems.com [83.12.187.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 561384569A; Tue, 26 Apr 2011 10:59:38 +0200 (CEST) Date: Tue, 26 Apr 2011 10:59:27 +0200 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20110426085927.GI2472@garage.freebsd.pl> References: <67F62848-FAA3-4C46-A95A-DA7C82281898@bsdimp.com> <4DB5B0A9.4030805@FreeBSD.org> <20110426070020.GC2472@garage.freebsd.pl> <4DB6721B.3020600@FreeBSD.org> <20110426073517.GF2472@garage.freebsd.pl> <4DB67939.6080301@FreeBSD.org> <20110426080222.GG2472@garage.freebsd.pl> <4DB67FBE.1050707@FreeBSD.org> <20110426083431.GH2472@garage.freebsd.pl> <4DB68631.7070201@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G3juXO9GfR42w+sw" Content-Disposition: inline In-Reply-To: <4DB68631.7070201@FreeBSD.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00, RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r220982 - in head: . sys/amd64/conf sys/arm/conf sys/conf sys/i386/conf sys/ia64/conf sys/mips/conf sys/mips/malta sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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, 26 Apr 2011 08:59:45 -0000 --G3juXO9GfR42w+sw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 11:45:37AM +0300, Alexander Motin wrote: > On 26.04.2011 11:34, Pawel Jakub Dawidek wrote: > >On Tue, Apr 26, 2011 at 11:18:06AM +0300, Alexander Motin wrote: > >>What do you think about this: > >>http://docs.freebsd.org/cgi/mid.cgi?4DB54BA9.5050901 > >>? I've found that zpool utility don't likes symbolic links, but > >>except this and together with fixing hardcoding problem IMHO it > >>looks not bad. > > > >It does look good, indeed. > > > >What's the problem with zpool? >=20 > make_dev_alias() creates symlink to the original device. After that, > attempt to do `zpool create test /dev/ad12 /dev/ad13` fails. May be > because it doesn't resolve symlink and can't find geom with name > ad12. IIRC zpool go straight to GEOM providers and doesn't even look into /dev/. Feel free to ignore this issue. Actually I think it is even better as people will notice that they should not use legacy names. > >It should operate on GEOM providers only. >=20 > OK. If `zpool create` is the only possible problem there, then I > think we can live with it. I agree. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --G3juXO9GfR42w+sw Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk22iW8ACgkQForvXbEpPzT+pACgmXU9mWJbWuNJikB4baiOn6lY 5RwAoIswFmqHTtCvQlviZ0cG1wDmW93S =DDCS -----END PGP SIGNATURE----- --G3juXO9GfR42w+sw-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 09:57: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 226D9106566B; Tue, 26 Apr 2011 09:57:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from gse-mta-27.emailfiltering.com (gse-mta-27-tx.emailfiltering.com [194.116.198.158]) by mx1.freebsd.org (Postfix) with ESMTP id 363C38FC0C; Tue, 26 Apr 2011 09:57:20 +0000 (UTC) Received: from mail-gw14.york.ac.uk ([144.32.129.164]) by gse-mta-27.emailfiltering.com with emfmta (version 4.8.1.33) by TLS id 982575672 for obrien@FreeBSD.org; a659cf463e8734f8; Tue, 26 Apr 2011 10:57:20 +0100 Received: from buffy-128.york.ac.uk ([144.32.128.160]:11577 helo=buffy.york.ac.uk) by mail-gw14.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QEf1D-00060Z-Az; Tue, 26 Apr 2011 10:57:19 +0100 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id p3Q9vI9Q050229; Tue, 26 Apr 2011 10:57:18 +0100 (BST) (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id p3Q9vIvr050221; Tue, 26 Apr 2011 10:57:18 +0100 (BST) (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: "David E. O'Brien" In-Reply-To: <201104260409.p3Q49KaJ006272@svn.freebsd.org> References: <201104260409.p3Q49KaJ006272@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Apr 2011 10:57:15 +0100 Message-ID: <1303811835.49968.6.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221053 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 09:57:22 -0000 On Tue, 2011-04-26 at 04:09 +0000, David E. O'Brien wrote: > Author: obrien > Date: Tue Apr 26 04:09:20 2011 > New Revision: 221053 > URL: http://svn.freebsd.org/changeset/base/221053 >=20 > Log: > This builds OK using the parent dir's WARNS=3D6. > [built on both AMD64 and i386] As a general rule, just compiling on i386 and amd64 are not sufficient to test WARNS bumps. It's usually sufficient to also crossbuild to a platform like sparc64 which has stricter alignment, but for a full test a "make universe" is best, as this will also catch other issues (for example arm, where char is unsigned). Thanks, Gavin --=20 Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B) From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 10:02: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 C8EA7106566B; Tue, 26 Apr 2011 10:02:15 +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 B8E5A8FC13; Tue, 26 Apr 2011 10:02: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 p3QA2F9N016872; Tue, 26 Apr 2011 10:02:15 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QA2F8d016870; Tue, 26 Apr 2011 10:02:15 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201104261002.p3QA2F8d016870@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 26 Apr 2011 10:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221058 - stable/8/sys/arm/xscale/i8134x X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 10:02:15 -0000 Author: pluknet Date: Tue Apr 26 10:02:15 2011 New Revision: 221058 URL: http://svn.freebsd.org/changeset/base/221058 Log: MFC r220836: Call init_param1() much earlier, so that msgbufsize is non-zero when we want to map and use the msgbuf. Modified: stable/8/sys/arm/xscale/i8134x/crb_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- stable/8/sys/arm/xscale/i8134x/crb_machdep.c Tue Apr 26 08:18:01 2011 (r221057) +++ stable/8/sys/arm/xscale/i8134x/crb_machdep.c Tue Apr 26 10:02:15 2011 (r221058) @@ -196,6 +196,9 @@ initarm(void *arg, void *arg2) pcpu_init(pcpup, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); + /* Do basic tuning, hz etc */ + init_param1(); + freemempos = 0x00200000; /* Define a macro to simplify memory allocation */ #define valloc_pages(var, np) \ @@ -389,8 +392,6 @@ initarm(void *arg, void *arg2) phys_avail[i++] = 0; phys_avail[i] = 0; - /* Do basic tuning, hz etc */ - init_param1(); init_param2(physmem); kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 11:39: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 7BBB71065672; Tue, 26 Apr 2011 11:39:56 +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 616478FC08; Tue, 26 Apr 2011 11:39: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 p3QBduuU020822; Tue, 26 Apr 2011 11:39:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QBduVx020817; Tue, 26 Apr 2011 11:39:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104261139.p3QBduVx020817@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Apr 2011 11:39: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: r221059 - in head/sys: kern 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, 26 Apr 2011 11:39:56 -0000 Author: kib Date: Tue Apr 26 11:39:56 2011 New Revision: 221059 URL: http://svn.freebsd.org/changeset/base/221059 Log: Implement the delayed task execution extension to the taskqueue mechanism. The caller may specify a timeout in ticks after which the task will be scheduled. Sponsored by: The FreeBSD Foundation Reviewed by: jeff, jhb MFC after: 1 month Added: head/sys/sys/_callout.h - copied, changed from r221058, head/sys/sys/callout.h Modified: head/sys/kern/subr_taskqueue.c head/sys/sys/callout.h head/sys/sys/taskqueue.h Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Tue Apr 26 10:02:15 2011 (r221058) +++ head/sys/kern/subr_taskqueue.c Tue Apr 26 11:39:56 2011 (r221059) @@ -61,12 +61,15 @@ struct taskqueue { int tq_tcount; int tq_spin; int tq_flags; + int tq_callouts; }; #define TQ_FLAGS_ACTIVE (1 << 0) #define TQ_FLAGS_BLOCKED (1 << 1) #define TQ_FLAGS_PENDING (1 << 2) +#define DT_CALLOUT_ARMED (1 << 0) + #define TQ_LOCK(tq) \ do { \ if ((tq)->tq_spin) \ @@ -83,6 +86,17 @@ struct taskqueue { mtx_unlock(&(tq)->tq_mutex); \ } while (0) +void +_timeout_task_init(struct taskqueue *queue, struct timeout_task *timeout_task, + int priority, task_fn_t func, void *context) +{ + + TASK_INIT(&timeout_task->t, priority, func, context); + callout_init_mtx(&timeout_task->c, &queue->tq_mutex, 0); + timeout_task->q = queue; + timeout_task->f = 0; +} + static __inline int TQ_SLEEP(struct taskqueue *tq, void *p, struct mtx *m, int pri, const char *wm, int t) @@ -129,7 +143,7 @@ static void taskqueue_terminate(struct thread **pp, struct taskqueue *tq) { - while (tq->tq_tcount > 0) { + while (tq->tq_tcount > 0 || tq->tq_callouts > 0) { wakeup(tq); TQ_SLEEP(tq, pp, &tq->tq_mutex, PWAIT, "taskqueue_destroy", 0); } @@ -143,26 +157,24 @@ taskqueue_free(struct taskqueue *queue) queue->tq_flags &= ~TQ_FLAGS_ACTIVE; taskqueue_terminate(queue->tq_threads, queue); KASSERT(TAILQ_EMPTY(&queue->tq_active), ("Tasks still running?")); + KASSERT(queue->tq_callouts == 0, ("Armed timeout tasks")); mtx_destroy(&queue->tq_mutex); free(queue->tq_threads, M_TASKQUEUE); free(queue, M_TASKQUEUE); } -int -taskqueue_enqueue(struct taskqueue *queue, struct task *task) +static int +taskqueue_enqueue_locked(struct taskqueue *queue, struct task *task) { struct task *ins; struct task *prev; - TQ_LOCK(queue); - /* * Count multiple enqueues. */ if (task->ta_pending) { task->ta_pending++; - TQ_UNLOCK(queue); - return 0; + return (0); } /* @@ -190,9 +202,60 @@ taskqueue_enqueue(struct taskqueue *queu else queue->tq_flags |= TQ_FLAGS_PENDING; + return (0); +} +int +taskqueue_enqueue(struct taskqueue *queue, struct task *task) +{ + int res; + + TQ_LOCK(queue); + res = taskqueue_enqueue_locked(queue, task); TQ_UNLOCK(queue); - return 0; + return (res); +} + +static void +taskqueue_timeout_func(void *arg) +{ + struct taskqueue *queue; + struct timeout_task *timeout_task; + + timeout_task = arg; + queue = timeout_task->q; + KASSERT((timeout_task->f & DT_CALLOUT_ARMED) != 0, ("Stray timeout")); + timeout_task->f &= ~DT_CALLOUT_ARMED; + queue->tq_callouts--; + taskqueue_enqueue_locked(timeout_task->q, &timeout_task->t); +} + +int +taskqueue_enqueue_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task, int ticks) +{ + int res; + + TQ_LOCK(queue); + KASSERT(timeout_task->q == NULL || timeout_task->q == queue, + ("Migrated queue")); + KASSERT(!queue->tq_spin, ("Timeout for spin-queue")); + timeout_task->q = queue; + res = timeout_task->t.ta_pending; + if (ticks == 0) { + taskqueue_enqueue_locked(queue, &timeout_task->t); + } else { + if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) { + res++; + } else { + queue->tq_callouts++; + timeout_task->f |= DT_CALLOUT_ARMED; + } + callout_reset(&timeout_task->c, ticks, taskqueue_timeout_func, + timeout_task); + } + TQ_UNLOCK(queue); + return (res); } void @@ -271,6 +334,19 @@ task_is_running(struct taskqueue *queue, return (0); } +static int +taskqueue_cancel_locked(struct taskqueue *queue, struct task *task, + u_int *pendp) +{ + + if (task->ta_pending > 0) + STAILQ_REMOVE(&queue->tq_queue, task, task, ta_link); + if (pendp != NULL) + *pendp = task->ta_pending; + task->ta_pending = 0; + return (task_is_running(queue, task) ? EBUSY : 0); +} + int taskqueue_cancel(struct taskqueue *queue, struct task *task, u_int *pendp) { @@ -278,14 +354,31 @@ taskqueue_cancel(struct taskqueue *queue int error; TQ_LOCK(queue); - if ((pending = task->ta_pending) > 0) - STAILQ_REMOVE(&queue->tq_queue, task, task, ta_link); - task->ta_pending = 0; - error = task_is_running(queue, task) ? EBUSY : 0; + pending = task->ta_pending; + error = taskqueue_cancel_locked(queue, task, pendp); + TQ_UNLOCK(queue); + + return (error); +} + +int +taskqueue_cancel_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task, u_int *pendp) +{ + u_int pending, pending1; + int error; + + TQ_LOCK(queue); + pending = !!callout_stop(&timeout_task->c); + error = taskqueue_cancel_locked(queue, &timeout_task->t, &pending1); + if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) { + timeout_task->f &= ~DT_CALLOUT_ARMED; + queue->tq_callouts--; + } TQ_UNLOCK(queue); if (pendp != NULL) - *pendp = pending; + *pendp = pending + pending1; return (error); } @@ -302,6 +395,15 @@ taskqueue_drain(struct taskqueue *queue, TQ_UNLOCK(queue); } +void +taskqueue_drain_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task) +{ + + callout_drain(&timeout_task->c); + taskqueue_drain(queue, &timeout_task->t); +} + static void taskqueue_swi_enqueue(void *context) { Copied and modified: head/sys/sys/_callout.h (from r221058, head/sys/sys/callout.h) ============================================================================== --- head/sys/sys/callout.h Tue Apr 26 10:02:15 2011 (r221058, copy source) +++ head/sys/sys/_callout.h Tue Apr 26 11:39:56 2011 (r221059) @@ -35,8 +35,8 @@ * $FreeBSD$ */ -#ifndef _SYS_CALLOUT_H_ -#define _SYS_CALLOUT_H_ +#ifndef _SYS__CALLOUT_H +#define _SYS__CALLOUT_H #include @@ -58,47 +58,4 @@ struct callout { volatile int c_cpu; /* CPU we're scheduled on */ }; -#define CALLOUT_LOCAL_ALLOC 0x0001 /* was allocated from callfree */ -#define CALLOUT_ACTIVE 0x0002 /* callout is currently active */ -#define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */ -#define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */ -#define CALLOUT_RETURNUNLOCKED 0x0010 /* handler returns with mtx unlocked */ -#define CALLOUT_SHAREDLOCK 0x0020 /* callout lock held in shared mode */ - -struct callout_handle { - struct callout *callout; -}; - -#ifdef _KERNEL -extern int ncallout; - -#define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) -#define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) -#define callout_drain(c) _callout_stop_safe(c, 1) -void callout_init(struct callout *, int); -void _callout_init_lock(struct callout *, struct lock_object *, int); -#define callout_init_mtx(c, mtx, flags) \ - _callout_init_lock((c), ((mtx) != NULL) ? &(mtx)->lock_object : \ - NULL, (flags)) -#define callout_init_rw(c, rw, flags) \ - _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ - NULL, (flags)) -#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING) -int callout_reset_on(struct callout *, int, void (*)(void *), void *, int); -#define callout_reset(c, on_tick, fn, arg) \ - callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu) -#define callout_reset_curcpu(c, on_tick, fn, arg) \ - callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid)) -int callout_schedule(struct callout *, int); -int callout_schedule_on(struct callout *, int, int); -#define callout_schedule_curcpu(c, on_tick) \ - callout_schedule_on((c), (on_tick), PCPU_GET(cpuid)) -#define callout_stop(c) _callout_stop_safe(c, 0) -int _callout_stop_safe(struct callout *, int); -void callout_tick(void); -int callout_tickstofirst(int limit); -extern void (*callout_new_inserted)(int cpu, int ticks); - #endif - -#endif /* _SYS_CALLOUT_H_ */ Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Tue Apr 26 10:02:15 2011 (r221058) +++ head/sys/sys/callout.h Tue Apr 26 11:39:56 2011 (r221059) @@ -38,25 +38,7 @@ #ifndef _SYS_CALLOUT_H_ #define _SYS_CALLOUT_H_ -#include - -struct lock_object; - -SLIST_HEAD(callout_list, callout); -TAILQ_HEAD(callout_tailq, callout); - -struct callout { - union { - SLIST_ENTRY(callout) sle; - TAILQ_ENTRY(callout) tqe; - } c_links; - int c_time; /* ticks to the event */ - void *c_arg; /* function argument */ - void (*c_func)(void *); /* function to call */ - struct lock_object *c_lock; /* lock to handle */ - int c_flags; /* state of this entry */ - volatile int c_cpu; /* CPU we're scheduled on */ -}; +#include #define CALLOUT_LOCAL_ALLOC 0x0001 /* was allocated from callfree */ #define CALLOUT_ACTIVE 0x0002 /* callout is currently active */ Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Tue Apr 26 10:02:15 2011 (r221058) +++ head/sys/sys/taskqueue.h Tue Apr 26 11:39:56 2011 (r221059) @@ -35,10 +35,18 @@ #include #include +#include struct taskqueue; struct thread; +struct timeout_task { + struct taskqueue *q; + struct task t; + struct callout c; + int f; +}; + /* * A notification callback function which is called from * taskqueue_enqueue(). The context argument is given in the call to @@ -54,9 +62,15 @@ struct taskqueue *taskqueue_create(const int taskqueue_start_threads(struct taskqueue **tqp, int count, int pri, const char *name, ...) __printflike(4, 5); int taskqueue_enqueue(struct taskqueue *queue, struct task *task); +int taskqueue_enqueue_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task, int ticks); int taskqueue_cancel(struct taskqueue *queue, struct task *task, u_int *pendp); +int taskqueue_cancel_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task, u_int *pendp); void taskqueue_drain(struct taskqueue *queue, struct task *task); +void taskqueue_drain_timeout(struct taskqueue *queue, + struct timeout_task *timeout_task); void taskqueue_free(struct taskqueue *queue); void taskqueue_run(struct taskqueue *queue); void taskqueue_block(struct taskqueue *queue); @@ -79,6 +93,12 @@ void taskqueue_thread_enqueue(void *cont (task)->ta_context = (context); \ } while (0) +void _timeout_task_init(struct taskqueue *queue, + struct timeout_task *timeout_task, int priority, task_fn_t func, + void *context); +#define TIMEOUT_TASK_INIT(queue, timeout_task, priority, func, context) \ + _timeout_task_init(queue, timeout_task, priority, func, context); + /* * Declare a reference to a taskqueue. */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 11:43: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 280B8106564A; Tue, 26 Apr 2011 11:43:58 +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 0E56F8FC17; Tue, 26 Apr 2011 11:43: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 p3QBhvsY020994; Tue, 26 Apr 2011 11:43:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QBhvQ2020992; Tue, 26 Apr 2011 11:43:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104261143.p3QBhvQ2020992@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Apr 2011 11:43: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: r221060 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 11:43:58 -0000 Author: kib Date: Tue Apr 26 11:43:57 2011 New Revision: 221060 URL: http://svn.freebsd.org/changeset/base/221060 Log: Document timeout_task. While there, fix the type of the func argument of INIT_TASK macro, and use the modern name of the analogous facility from Linux kernel. Sponsored by: The FreeBSD Foundation MFC after: 1 month Modified: head/share/man/man9/taskqueue.9 Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Tue Apr 26 11:39:56 2011 (r221059) +++ head/share/man/man9/taskqueue.9 Tue Apr 26 11:43:57 2011 (r221060) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2009 +.Dd April 26, 2011 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -52,6 +52,8 @@ struct task { task_fn_t ta_func; /* task handler */ void *ta_context; /* argument for handler */ }; + +struct timeout_task; .Ed .Ft struct taskqueue * .Fn taskqueue_create "const char *name" "int mflags" "taskqueue_enqueue_fn enqueue" "void *context" @@ -64,19 +66,26 @@ struct task { .Ft int .Fn taskqueue_enqueue_fast "struct taskqueue *queue" "struct task *task" .Ft int +.Fn taskqueue_enqueue_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" "int ticks" +.Ft int .Fn taskqueue_cancel "struct taskqueue *queue" "struct task *task" "u_int *pendp" +.Ft int +.Fn taskqueue_cancel_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" "u_int *pendp" .Ft void .Fn taskqueue_drain "struct taskqueue *queue" "struct task *task" +.Ft void +.Fn taskqueue_drain_timeout "struct taskqueue *queue" "struct timeout_task *timeout_task" .Ft int .Fn taskqueue_member "struct taskqueue *queue" "struct thread *td" .Ft void .Fn taskqueue_run "struct taskqueue *queue" -.Fn TASK_INIT "struct task *task" "int priority" "task_fn_t *func" "void *context" +.Fn TASK_INIT "struct task *task" "int priority" "task_fn_t func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" .Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" .Fn TASKQUEUE_DEFINE_THREAD "name" .Fn TASKQUEUE_FAST_DEFINE_THREAD "name" +.Fn TIMEOUT_TASK_INIT "struct taskqueue *queue" "struct timeout_task *timeout_task" "int priority" "task_fn_t func" "void *context" .Sh DESCRIPTION These functions provide a simple interface for asynchronous execution of code. @@ -164,6 +173,14 @@ is called on the task pointer passed to .Fn taskqueue_enqueue . .Pp The +.Fn taskqueue_enqueue_timeout +is used to schedule the enqueue after the specified amount of +.Va ticks . +Only non-fast task queues can be used for +.Va timeout_task +scheduling. +.Pp +The .Fn taskqueue_cancel function is used to cancel a task. The @@ -188,9 +205,16 @@ Note that, as with the caller is responsible for ensuring that the task is not re-enqueued after being canceled. .Pp +Similarly, the +.Fn taskqueue_cancel_timeout +function is used to cancel the scheduled task execution. +.Pp The .Fn taskqueue_drain -function is used to wait for the task to finish. +function is used to wait for the task to finish, and +the +.Fn taskqueue_drain_timeout +function is used to wait for the scheduled task to finish. There is no guarantee that the task will not be enqueued after call to .Fn taskqueue_drain . @@ -218,6 +242,9 @@ A convenience macro, is provided to initialise a .Va task structure. +A macro +.Fn TIMEOUT_TASK_INIT "queue" "timeout_task" "priority" "func" "context" +initializes the timeout_task structure. The values of .Va priority , .Va func , @@ -342,7 +369,7 @@ be created with a dedicated processing t .Sh HISTORY This interface first appeared in .Fx 5.0 . -There is a similar facility called tqueue in the Linux kernel. +There is a similar facility called work_queue in the Linux kernel. .Sh AUTHORS This manual page was written by .An Doug Rabson . From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 11:45: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 BADB3106564A; Tue, 26 Apr 2011 11:45:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id E0B438FC0C; Tue, 26 Apr 2011 11:45:07 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=Vlw5OJcoxCC473z5moizI40ESYe+BpcMN2hU0iQoJwI= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=oArLlKAruIoA:10 a=WQU8e4WWZSUA:10 a=N659UExz7-8A:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=RH0X6Hjl0PFd8RRinRsA:9 a=pILNOxqGKmIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mailfe01.swip.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-TFF-CGPSA-Version: 1.7 X-T2-CGPSA-Filter: Scanned Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 119119474; Tue, 26 Apr 2011 13:44:55 +0200 From: Hans Petter Selasky To: Konstantin Belousov Date: Tue, 26 Apr 2011 13:44:00 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201104261139.p3QBduVx020817@svn.freebsd.org> In-Reply-To: <201104261139.p3QBduVx020817@svn.freebsd.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-1?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-1?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201104261344.00551.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r221059 - in head/sys: kern 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, 26 Apr 2011 11:45:08 -0000 On Tuesday 26 April 2011 13:39:56 Konstantin Belousov wrote: > + pending = !!callout_stop(&timeout_task->c); pending = (callout_stop(&timeout_task->c) != 0); ? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 11:53: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 C5488106566C; Tue, 26 Apr 2011 11:53:41 +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 371208FC21; Tue, 26 Apr 2011 11:53:40 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3QBrXHh044755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Apr 2011 14:53:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3QBrXV1028952; Tue, 26 Apr 2011 14:53:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3QBrXFp028951; Tue, 26 Apr 2011 14:53:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 26 Apr 2011 14:53:33 +0300 From: Kostik Belousov To: Hans Petter Selasky Message-ID: <20110426115333.GP48734@deviant.kiev.zoral.com.ua> References: <201104261139.p3QBduVx020817@svn.freebsd.org> <201104261344.00551.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ct8ez/PVgO98mXV4" Content-Disposition: inline In-Reply-To: <201104261344.00551.hselasky@c2i.net> 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.4 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: r221059 - in head/sys: kern 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, 26 Apr 2011 11:53:41 -0000 --ct8ez/PVgO98mXV4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2011 at 01:44:00PM +0200, Hans Petter Selasky wrote: > On Tuesday 26 April 2011 13:39:56 Konstantin Belousov wrote: > > + pending =3D !!callout_stop(&timeout_task->c); >=20 > pending =3D (callout_stop(&timeout_task->c) !=3D 0); >=20 > ? This line is about conversion from a boolean value to {0, 1} value set. If !! construct does not look stylish, then wouldn't we need to go with pending =3D (callout_stop(&timeout_task->c) !=3D 0) ? 1 : 0; instead ? Feel free to adjust whatever variant you prefer and commit it. --ct8ez/PVgO98mXV4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk22sj0ACgkQC3+MBN1Mb4ggfQCgrvHcDN6+1Y8WuU04AIfPN5oH rxcAn33A6RRjpgu/pRYwVZKSbeNc3H9f =9Eou -----END PGP SIGNATURE----- --ct8ez/PVgO98mXV4-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 12:07: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 ED969106566C; Tue, 26 Apr 2011 12:07:07 +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 DF0308FC0C; Tue, 26 Apr 2011 12:07: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 p3QC77SR021727; Tue, 26 Apr 2011 12:07:07 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QC77tG021725; Tue, 26 Apr 2011 12:07:07 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104261207.p3QC77tG021725@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Apr 2011 12:07:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221061 - 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: Tue, 26 Apr 2011 12:07:08 -0000 Author: kib Date: Tue Apr 26 12:07:07 2011 New Revision: 221061 URL: http://svn.freebsd.org/changeset/base/221061 Log: MFC r220977: Fix two bugs in r218670. Hold the vnode around the region where object lock is dropped, until vnode lock is acquired. Do not drop the vnode reference for a case when the object was deallocated during unlock. Note that in this case, VV_TEXT is cleared by vnode_pager_dealloc(). Modified: stable/8/sys/vm/vm_object.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_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Tue Apr 26 11:43:57 2011 (r221060) +++ stable/8/sys/vm/vm_object.c Tue Apr 26 12:07:07 2011 (r221061) @@ -447,14 +447,21 @@ vm_object_vndeallocate(vm_object_t objec /* vrele may need the vnode lock. */ vrele(vp); } else { + vhold(vp); VM_OBJECT_UNLOCK(object); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vdrop(vp); VM_OBJECT_LOCK(object); object->ref_count--; - if (object->ref_count == 0) - vp->v_vflag &= ~VV_TEXT; - VM_OBJECT_UNLOCK(object); - vput(vp); + if (object->type == OBJT_DEAD) { + VM_OBJECT_UNLOCK(object); + VOP_UNLOCK(vp, 0); + } else { + if (object->ref_count == 0) + vp->v_vflag &= ~VV_TEXT; + VM_OBJECT_UNLOCK(object); + vput(vp); + } } } From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 12:08: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 59143106566B; Tue, 26 Apr 2011 12:08:49 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7AD8FC1C; Tue, 26 Apr 2011 12:08:48 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=118a5bn0tGnRZbUa9ClBty6BTuM1bA5mUZqmf2RHYp4= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=oArLlKAruIoA:10 a=WQU8e4WWZSUA:10 a=Q9fys5e9bTEA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=HVcOSVqeEClIJtUmUjUA:9 a=PUjeQqilurYA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 118551104; Tue, 26 Apr 2011 14:08:34 +0200 From: Hans Petter Selasky To: Kostik Belousov Date: Tue, 26 Apr 2011 14:07:31 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201104261139.p3QBduVx020817@svn.freebsd.org> <201104261344.00551.hselasky@c2i.net> <20110426115333.GP48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110426115333.GP48734@deviant.kiev.zoral.com.ua> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201104261407.31963.hselasky@c2i.net> Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r221059 - in head/sys: kern 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, 26 Apr 2011 12:08:49 -0000 On Tuesday 26 April 2011 13:53:33 Kostik Belousov wrote: > On Tue, Apr 26, 2011 at 01:44:00PM +0200, Hans Petter Selasky wrote: > > On Tuesday 26 April 2011 13:39:56 Konstantin Belousov wrote: > > > + pending = !!callout_stop(&timeout_task->c); > > > > pending = (callout_stop(&timeout_task->c) != 0); > > > > ? Hi, This is just a nit I noticed. > > This line is about conversion from a boolean value to {0, 1} value set. > If !! construct does not look stylish, then wouldn't we need to go > with > pending = (callout_stop(&timeout_task->c) != 0) ? 1 : 0; > instead ? The output from ! is already a boolean and "pending" is a u_int, so to be correct it should be similar to what you suggest. I'm not sure what case produce the less amount of code and which the compiler understands the best. Probably it does not matter that much. I was thinking that "!!" is depreceated, but "man style" is silent about it. > Feel free to adjust whatever variant you prefer and commit it. Ok. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 12:25: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 929481065782; Tue, 26 Apr 2011 12:25:36 +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 838E88FC1A; Tue, 26 Apr 2011 12:25: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 p3QCPaU2022297; Tue, 26 Apr 2011 12:25:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QCPa8Q022295; Tue, 26 Apr 2011 12:25:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201104261225.p3QCPa8Q022295@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 26 Apr 2011 12:25: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: r221062 - stable/8/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 12:25:36 -0000 Author: kib Date: Tue Apr 26 12:25:36 2011 New Revision: 221062 URL: http://svn.freebsd.org/changeset/base/221062 Log: MFC r220979: Fix display of the drm sysctls (nop on stable/8). Sponsored by: The FreeBSD Foundation Modified: stable/8/sys/dev/drm/drm_sysctl.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/drm/drm_sysctl.c ============================================================================== --- stable/8/sys/dev/drm/drm_sysctl.c Tue Apr 26 12:07:07 2011 (r221061) +++ stable/8/sys/dev/drm/drm_sysctl.c Tue Apr 26 12:25:36 2011 (r221062) @@ -95,7 +95,7 @@ int drm_sysctl_init(struct drm_device *d SYSCTL_CHILDREN(top), OID_AUTO, drm_sysctl_list[i].name, - CTLTYPE_INT | CTLFLAG_RD, + CTLTYPE_STRING | CTLFLAG_RD, dev, 0, drm_sysctl_list[i].f, From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 13:09: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 B4C981065674; Tue, 26 Apr 2011 13:09:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A54658FC16; Tue, 26 Apr 2011 13:09: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 p3QD9JPq023705; Tue, 26 Apr 2011 13:09:19 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QD9Jp0023703; Tue, 26 Apr 2011 13:09:19 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201104261309.p3QD9Jp0023703@svn.freebsd.org> From: Glen Barber Date: Tue, 26 Apr 2011 13:09: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: r221064 - 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, 26 Apr 2011 13:09:19 -0000 Author: gjb (doc committer) Date: Tue Apr 26 13:09:19 2011 New Revision: 221064 URL: http://svn.freebsd.org/changeset/base/221064 Log: MFC 220975: - Clarification on kld_file_stat.size - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Modified: stable/8/lib/libc/sys/kldstat.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/kldstat.2 ============================================================================== --- stable/8/lib/libc/sys/kldstat.2 Tue Apr 26 12:50:26 2011 (r221063) +++ stable/8/lib/libc/sys/kldstat.2 Tue Apr 26 13:09:19 2011 (r221064) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 1999 +.Dd April 23, 2011 .Dt KLDSTAT 2 .Os .Sh NAME @@ -51,8 +51,8 @@ struct kld_file_stat { char name[MAXPATHLEN]; int refs; int id; - caddr_t address; /* load address */ - size_t size; /* size in bytes */ + caddr_t address; + size_t size; char pathname[MAXPATHLEN]; }; .Ed @@ -77,7 +77,7 @@ The id of the file specified in .It address The load address of the kld file. .It size -The size of the file. +The amount of memory in bytes allocated by the file. .It pathname The full name of the file referred to by .Fa fileid , From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 13:09: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 2EE36106564A; Tue, 26 Apr 2011 13:09:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F5B58FC12; Tue, 26 Apr 2011 13:09: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 p3QD9tdv023759; Tue, 26 Apr 2011 13:09:55 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QD9tHn023757; Tue, 26 Apr 2011 13:09:55 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201104261309.p3QD9tHn023757@svn.freebsd.org> From: Glen Barber Date: Tue, 26 Apr 2011 13:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221065 - stable/7/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, 26 Apr 2011 13:09:55 -0000 Author: gjb (doc committer) Date: Tue Apr 26 13:09:54 2011 New Revision: 221065 URL: http://svn.freebsd.org/changeset/base/221065 Log: MFC 220975: - Clarification on kld_file_stat.size - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Modified: stable/7/lib/libc/sys/kldstat.2 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/sys/kldstat.2 ============================================================================== --- stable/7/lib/libc/sys/kldstat.2 Tue Apr 26 13:09:19 2011 (r221064) +++ stable/7/lib/libc/sys/kldstat.2 Tue Apr 26 13:09:54 2011 (r221065) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 1999 +.Dd April 23, 2011 .Dt KLDSTAT 2 .Os .Sh NAME @@ -51,8 +51,8 @@ struct kld_file_stat { char name[MAXPATHLEN]; int refs; int id; - caddr_t address; /* load address */ - size_t size; /* size in bytes */ + caddr_t address; + size_t size; }; .Ed .Pp @@ -76,7 +76,7 @@ The id of the file specified in .It address The load address of the kld file. .It size -The size of the file. +The amount of memory in bytes allocated by the file. .El .Sh RETURN VALUES .Rv -std kldstat From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 13:32: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 E97901065674; Tue, 26 Apr 2011 13:32:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BD79A8FC25; Tue, 26 Apr 2011 13:32:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 634DF46B45; Tue, 26 Apr 2011 09:32:46 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C1E5B8A02A; Tue, 26 Apr 2011 09:32:45 -0400 (EDT) From: John Baldwin To: "David E. O'Brien" Date: Tue, 26 Apr 2011 09:32:44 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; ) References: <201104260409.p3Q49KaJ006272@svn.freebsd.org> In-Reply-To: <201104260409.p3Q49KaJ006272@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201104260932.44199.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 26 Apr 2011 09:32:45 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221053 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 13:32:47 -0000 On Tuesday, April 26, 2011 12:09:20 am David E. O'Brien wrote: > Author: obrien > Date: Tue Apr 26 04:09:20 2011 > New Revision: 221053 > URL: http://svn.freebsd.org/changeset/base/221053 > > Log: > This builds OK using the parent dir's WARNS=6. > [built on both AMD64 and i386] This breaks the tinderbox on at least arm, ia64, mips, and sparc64. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 13:37: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 1659A106566C; Tue, 26 Apr 2011 13:37:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C89698FC16; Tue, 26 Apr 2011 13:37:47 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3QDRBK5033584 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 26 Apr 2011 07:27:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <1303811835.49968.6.camel@buffy.york.ac.uk> Date: Tue, 26 Apr 2011 07:27:11 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <67269B04-5727-4B8D-B442-D93CD0CB0A61@bsdimp.com> References: <201104260409.p3Q49KaJ006272@svn.freebsd.org> <1303811835.49968.6.camel@buffy.york.ac.uk> To: Gavin Atkinson X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 26 Apr 2011 07:27:11 -0600 (MDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "David E. O'Brien" Subject: Re: svn commit: r221053 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 13:37:48 -0000 On Apr 26, 2011, at 3:57 AM, Gavin Atkinson wrote: > On Tue, 2011-04-26 at 04:09 +0000, David E. O'Brien wrote: >> Author: obrien >> Date: Tue Apr 26 04:09:20 2011 >> New Revision: 221053 >> URL: http://svn.freebsd.org/changeset/base/221053 >>=20 >> Log: >> This builds OK using the parent dir's WARNS=3D6. >> [built on both AMD64 and i386] >=20 > As a general rule, just compiling on i386 and amd64 are not sufficient > to test WARNS bumps. It's usually sufficient to also crossbuild to a > platform like sparc64 which has stricter alignment, but for a full = test > a "make universe" is best, as this will also catch other issues (for > example arm, where char is unsigned). I read the test log as "not really tested, feel free to back it out if = it fails on a different architecture" :) Warner From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 13:50:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60EFC106566C; Tue, 26 Apr 2011 13:50:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 360608FC17; Tue, 26 Apr 2011 13:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3QDoCKF025005; Tue, 26 Apr 2011 13:50:12 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QDoCnX025002; Tue, 26 Apr 2011 13:50:12 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104261350.p3QDoCnX025002@svn.freebsd.org> From: Rick Macklem Date: Tue, 26 Apr 2011 13:50: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: r221066 - in head/sys: fs/nfsclient nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 13:50:12 -0000 Author: rmacklem Date: Tue Apr 26 13:50:11 2011 New Revision: 221066 URL: http://svn.freebsd.org/changeset/base/221066 Log: Fix a kernel linking problem introduced by r221032, r221040 when building kernels that don't have "options NFS_ROOT" specified. I plan on moving the functions that use these data structures into the shared code in sys/nfs/nfs_diskless.c in a future commit. At that time, these definitions will no longer be needed in nfs_vfsops.c and nfs_clvfsops.c. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/nfsclient/nfs_vfsops.c Modified: head/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvfsops.c Tue Apr 26 13:09:54 2011 (r221065) +++ head/sys/fs/nfsclient/nfs_clvfsops.c Tue Apr 26 13:50:11 2011 (r221066) @@ -137,10 +137,17 @@ VFS_SET(nfs_vfsops, newnfs, VFCF_NETWORK MODULE_VERSION(newnfs, 1); /* - * This structure must be filled in by a primary bootstrap or bootstrap - * server for a diskless/dataless machine. It is initialized below just - * to ensure that it is allocated to initialized data (.data not .bss). + * This structure is now defined in sys/nfs/nfs_diskless.c so that it + * can be shared by both NFS clients. It is declared here so that it + * will be defined for kernels built without NFS_ROOT, although it + * isn't used in that case. */ +#if !defined(NFS_ROOT) && !defined(NFSCLIENT) +struct nfs_diskless nfs_diskless = { { { 0 } } }; +struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; +int nfs_diskless_valid = 0; +#endif + SYSCTL_INT(_vfs_newnfs, OID_AUTO, diskless_valid, CTLFLAG_RD, &nfs_diskless_valid, 0, "Has the diskless struct been filled correctly"); Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Tue Apr 26 13:09:54 2011 (r221065) +++ head/sys/nfsclient/nfs_vfsops.c Tue Apr 26 13:50:11 2011 (r221066) @@ -164,6 +164,18 @@ static struct nfs_rpcops nfs_rpcops = { nfs_commit, }; +/* + * This structure is now defined in sys/nfs/nfs_diskless.c so that it + * can be shared by both NFS clients. It is declared here so that it + * will be defined for kernels built without NFS_ROOT, although it + * isn't used in that case. + */ +#ifndef NFS_ROOT +struct nfs_diskless nfs_diskless = { { { 0 } } }; +struct nfsv3_diskless nfsv3_diskless = { { { 0 } } }; +int nfs_diskless_valid = 0; +#endif + SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, &nfs_diskless_valid, 0, "Has the diskless struct been filled correctly"); From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 16:14: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 858E41065670; Tue, 26 Apr 2011 16:14:55 +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 5979C8FC12; Tue, 26 Apr 2011 16:14: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 p3QGEtCZ029388; Tue, 26 Apr 2011 16:14:55 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QGEtXx029386; Tue, 26 Apr 2011 16:14:55 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201104261614.p3QGEtXx029386@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 26 Apr 2011 16:14: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: r221069 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 16:14:55 -0000 Author: sobomax Date: Tue Apr 26 16:14:55 2011 New Revision: 221069 URL: http://svn.freebsd.org/changeset/base/221069 Log: With the typical memory size of the system in tenth of gigabytes counting memory being dumped in 16MB increments is somewhat silly. Especially if the dump fails and everything you've got for debugging is screen filled with numbers in 16 decrements... Replace that with percentage-based progress with max 10 updates all fitting into one line. Collapse other very "useful" piece of crash information (total ram) into the same line to save some more space. MFC after: 1 week Modified: head/sys/amd64/amd64/minidump_machdep.c Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Tue Apr 26 15:11:13 2011 (r221068) +++ head/sys/amd64/amd64/minidump_machdep.c Tue Apr 26 16:14:55 2011 (r221069) @@ -62,7 +62,7 @@ static off_t dumplo; /* Handle chunked writes. */ static size_t fragsz; static void *dump_va; -static size_t counter, progress; +static size_t counter, progress, dumpsize; CTASSERT(sizeof(*vm_page_dump) == 8); @@ -94,6 +94,40 @@ blk_flush(struct dumperinfo *di) return (error); } +static struct { + int min_per; + int max_per; + int visited; +} progress_track[10] = { + { 0, 10, 0}, + { 10, 20, 0}, + { 20, 30, 0}, + { 30, 40, 0}, + { 40, 50, 0}, + { 50, 60, 0}, + { 60, 70, 0}, + { 70, 80, 0}, + { 80, 90, 0}, + { 90, 100, 0} +}; + +static void +report_progress(size_t progress, size_t dumpsize) +{ + int sofar, i; + + sofar = 100 - ((progress * 100) / dumpsize); + for (i = 0; i < 10; i++) { + if (sofar < progress_track[i].min_per || sofar > progress_track[i].max_per) + continue; + if (progress_track[i].visited) + return; + progress_track[i].visited = 1; + printf("..%d%%", sofar); + return; + } +} + static int blk_write(struct dumperinfo *di, char *ptr, vm_paddr_t pa, size_t sz) { @@ -130,7 +164,7 @@ blk_write(struct dumperinfo *di, char *p counter += len; progress -= len; if (counter >> 24) { - printf(" %ld", PG2MB(progress >> PAGE_SHIFT)); + report_progress(progress, dumpsize); counter &= (1<<24) - 1; } if (ptr) { @@ -170,7 +204,6 @@ static pd_entry_t fakepd[NPDEPG]; void minidumpsys(struct dumperinfo *di) { - uint64_t dumpsize; uint32_t pmapsize; vm_offset_t va; int error; @@ -290,8 +323,8 @@ minidumpsys(struct dumperinfo *di) mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_AMD64_VERSION, dumpsize, di->blocksize); - printf("Physical memory: %ju MB\n", ptoa((uintmax_t)physmem) / 1048576); - printf("Dumping %llu MB:", (long long)dumpsize >> 20); + printf("Dumping %llu out of %ju MB:", (long long)dumpsize >> 20, + ptoa((uintmax_t)physmem) / 1048576); /* Dump leader */ error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 16:56: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 9BEFE106566B; Tue, 26 Apr 2011 16:56:43 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8891B8FC18; Tue, 26 Apr 2011 16:56: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 p3QGuhOl030637; Tue, 26 Apr 2011 16:56:43 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QGuh6I030634; Tue, 26 Apr 2011 16:56:43 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <201104261656.p3QGuh6I030634@svn.freebsd.org> From: Maksim Yevmenkin Date: Tue, 26 Apr 2011 16:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221070 - stable/8/usr.sbin/bluetooth/l2control X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 16:56:43 -0000 Author: emax Date: Tue Apr 26 16:56:43 2011 New Revision: 221070 URL: http://svn.freebsd.org/changeset/base/221070 Log: MFC r220840 Improve the man page and l2control's usage() a bit. Submitted by: arundel Modified: stable/8/usr.sbin/bluetooth/l2control/l2control.8 stable/8/usr.sbin/bluetooth/l2control/l2control.c Directory Properties: stable/8/usr.sbin/bluetooth/l2control/ (props changed) Modified: stable/8/usr.sbin/bluetooth/l2control/l2control.8 ============================================================================== --- stable/8/usr.sbin/bluetooth/l2control/l2control.8 Tue Apr 26 16:14:55 2011 (r221069) +++ stable/8/usr.sbin/bluetooth/l2control/l2control.8 Tue Apr 26 16:56:43 2011 (r221070) @@ -25,7 +25,7 @@ .\" $Id: l2control.8,v 1.5 2003/05/21 00:53:00 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd April 9, 2011 .Dt L2CONTROL 8 .Os .Sh NAME @@ -34,25 +34,27 @@ .Sh SYNOPSIS .Nm .Op Fl hn -.Fl a Ar BD_ADDR +.Fl a Ar local .Ar command .Op Ar parameters ... .Sh DESCRIPTION The .Nm -utility connects to the local device with the specified BD_ADDR and attempts -to send the specified command. +utility connects to the local device with the specified BD_ADDR or name +and attempts to send the specified command. The .Nm utility will print results to the standard output and error messages to -the standard error. +the standard error output. .Pp The options are as follows: .Bl -tag -width indent -.It Fl a Ar BD_ADDR -Connect to the local device with the specified BD_ADDR. +.It Fl a Ar local +Connect to the local device with the specified BD_ADDR or name. Example: -.Fl a Li 00:01:02:03:04:05 . +.Fl a Li 00:01:02:03:04:05 +or +.Fl a Li bt_device . .It Fl h Display usage message and exit. .It Fl n @@ -62,10 +64,10 @@ Normally attempts to resolve Bluetooth addresses, and display them symbolically. .It Ar command One of the supported commands (see below). -Special command +The special command .Cm help -can be used to obtain the list of all supported commands. -To get more information about specific command use +can be used to obtain a list of all supported commands. +To get more information about a specific command use .Cm help Ar command . .It Ar parameters One or more optional space separated command parameters. @@ -92,4 +94,4 @@ are: .Xr ng_l2cap 4 , .Xr l2ping 8 .Sh AUTHORS -.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com +.An Maksim Yevmenkin Aq emax@FreeBSD.org Modified: stable/8/usr.sbin/bluetooth/l2control/l2control.c ============================================================================== --- stable/8/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 26 16:14:55 2011 (r221069) +++ stable/8/usr.sbin/bluetooth/l2control/l2control.c Tue Apr 26 16:56:43 2011 (r221070) @@ -207,7 +207,14 @@ print_l2cap_command(struct l2cap_command static void usage(void) { - fprintf(stdout, "Usage: l2control -a BD_ADDR [-n] [-h] cmd [p1] [..]]\n"); + fprintf(stderr, "Usage: l2control [-hn] -a local cmd [params ..]\n"); + fprintf(stderr, "Where:\n"); + fprintf(stderr, " -a local Specify local device to connect to\n"); + fprintf(stderr, " -h Display this message\n"); + fprintf(stderr, " -n Show addresses as numbers\n"); + fprintf(stderr, " cmd Supported command " \ + "(see l2control help)\n"); + fprintf(stderr, " params Optional command parameters\n"); exit(255); } /* usage */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 17:01: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 955E2106566B; Tue, 26 Apr 2011 17:01:49 +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 800258FC16; Tue, 26 Apr 2011 17:01: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 p3QH1ntJ030905; Tue, 26 Apr 2011 17:01:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QH1ngd030888; Tue, 26 Apr 2011 17:01:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201104261701.p3QH1ngd030888@svn.freebsd.org> From: Alexander Motin Date: Tue, 26 Apr 2011 17:01: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: r221071 - in head: . sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/i386/conf sys/mips/conf sys/modules/cam sys/pc98/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, 26 Apr 2011 17:01:49 -0000 Author: mav Date: Tue Apr 26 17:01:49 2011 New Revision: 221071 URL: http://svn.freebsd.org/changeset/base/221071 Log: - Add shim to simplify migration to the CAM-based ATA. For each new adaX device in /dev/ create symbolic link with adY name, trying to mimic old ATA numbering. Imitation is not complete, but should be enough in most cases to mount file systems without touching /etc/fstab. - To know what behavior to mimic, restore ATA_STATIC_ID option in cases where it was present before. - Add some more details to UPDATING. Modified: head/UPDATING head/sys/amd64/conf/GENERIC head/sys/arm/conf/CRB head/sys/arm/conf/EP80219 head/sys/arm/conf/IQ31244 head/sys/cam/ata/ata_da.c head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/conf/NOTES head/sys/geom/geom_dev.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/mips/conf/OCTEON1 head/sys/mips/conf/std.SWARM head/sys/modules/cam/Makefile head/sys/pc98/conf/GENERIC Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Apr 26 16:56:43 2011 (r221070) +++ head/UPDATING Tue Apr 26 17:01:49 2011 (r221071) @@ -30,7 +30,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers starting from zero for each type in order of detection, unless configured otherwise with tunables, - see cam(4)). + see cam(4)). There will be symbolic links created in /dev/ to map + old adX devices to the respective adaY. They should provide basic + compatibility for file systems mounting in most cases, but they do + not support old user-level APIs and do not have respective providers + in GEOM. Consider using updated management tools with new device names. + + It is possible to load devices ahci, ata, siis and mvs as modules, + but option ATA_CAM should remain in kernel configuration to make ata + module work as CAM driver supporting legacy ATA controllers. Device ata + still can be used in modular fashion (atacore + ...). Modules atadisk + and atapi* are not used and won't affect operation in ATA_CAM mode. ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool @@ -49,7 +59,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives - options ATA_STATIC_ID # Static device numbering 20110423: The default NFS server has been changed to the new server, which Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/amd64/conf/GENERIC Tue Apr 26 17:01:49 2011 (r221071) @@ -93,6 +93,7 @@ device fdc device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/arm/conf/CRB Tue Apr 26 17:01:49 2011 (r221071) @@ -74,6 +74,7 @@ device pci device ata options ATA_CAM +options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/arm/conf/EP80219 Tue Apr 26 17:01:49 2011 (r221071) @@ -74,6 +74,7 @@ device pci device ata options ATA_CAM +options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/arm/conf/IQ31244 Tue Apr 26 17:01:49 2011 (r221071) @@ -73,6 +73,7 @@ device pci device ata options ATA_CAM +options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) device cd # CD Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/cam/ata/ata_da.c Tue Apr 26 17:01:49 2011 (r221071) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ada.h" +#include "opt_ata.h" #include @@ -183,6 +184,14 @@ static void adashutdown(void *arg, int static void adasuspend(void *arg); static void adaresume(void *arg); +#ifndef ADA_DEFAULT_LEGACY_ALIASES +#ifdef ATA_CAM +#define ADA_DEFAULT_LEGACY_ALIASES 1 +#else +#define ADA_DEFAULT_LEGACY_ALIASES 0 +#endif +#endif + #ifndef ADA_DEFAULT_TIMEOUT #define ADA_DEFAULT_TIMEOUT 30 /* Timeout in seconds */ #endif @@ -215,6 +224,7 @@ static void adaresume(void *arg); #define ata_disk_firmware_geom_adjust(disk) #endif +static int ada_legacy_aliases = ADA_DEFAULT_LEGACY_ALIASES; static int ada_retry_count = ADA_DEFAULT_RETRY; static int ada_default_timeout = ADA_DEFAULT_TIMEOUT; static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED; @@ -224,6 +234,9 @@ static int ada_write_cache = ADA_DEFAULT SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); +SYSCTL_INT(_kern_cam_ada, OID_AUTO, legacy_aliases, CTLFLAG_RW, + &ada_legacy_aliases, 0, "Create legacy-like device aliases"); +TUNABLE_INT("kern.cam.ada.legacy_aliases", &ada_legacy_aliases); SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RW, &ada_retry_count, 0, "Normal I/O retry count"); TUNABLE_INT("kern.cam.ada.retry_count", &ada_retry_count); @@ -723,10 +736,11 @@ adaregister(struct cam_periph *periph, v struct ada_softc *softc; struct ccb_pathinq cpi; struct ccb_getdev *cgd; - char announce_buf[80]; + char announce_buf[80], buf1[32]; struct disk_params *dp; caddr_t match; u_int maxio; + int legacy_id; cgd = (struct ccb_getdev *)arg; if (periph == NULL) { @@ -861,6 +875,22 @@ adaregister(struct cam_periph *periph, v softc->disk->d_fwheads = softc->params.heads; ata_disk_firmware_geom_adjust(softc->disk); + if (ada_legacy_aliases) { +#ifdef ATA_STATIC_ID + legacy_id = xpt_path_legacy_ata_id(periph->path); +#else + legacy_id = softc->disk->d_unit; +#endif + if (legacy_id >= 0) { + snprintf(announce_buf, sizeof(announce_buf), + "kern.devalias.%s%d", + softc->disk->d_name, softc->disk->d_unit); + snprintf(buf1, sizeof(buf1), + "ad%d", legacy_id); + setenv(announce_buf, buf1); + } + } else + legacy_id = -1; disk_create(softc->disk, DISK_VERSION); mtx_lock(periph->sim->mtx); cam_periph_unhold(periph); @@ -874,6 +904,9 @@ adaregister(struct cam_periph *periph, v dp->secsize, dp->heads, dp->secs_per_track, dp->cylinders); xpt_announce_periph(periph, announce_buf); + if (legacy_id >= 0) + printf("%s%d: Previously was known as ad%d\n", + periph->periph_name, periph->unit_number, legacy_id); /* * Create our sysctl variables, now that we know Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/cam/cam_xpt.c Tue Apr 26 17:01:49 2011 (r221071) @@ -3569,6 +3569,42 @@ xpt_path_periph(struct cam_path *path) return (path->periph); } +int +xpt_path_legacy_ata_id(struct cam_path *path) +{ + struct cam_eb *bus; + int bus_id; + + if ((strcmp(path->bus->sim->sim_name, "ata") != 0) && + strcmp(path->bus->sim->sim_name, "ahcich") != 0 && + strcmp(path->bus->sim->sim_name, "mvsch") != 0 && + strcmp(path->bus->sim->sim_name, "siisch") != 0) + return (-1); + + if (strcmp(path->bus->sim->sim_name, "ata") == 0 && + path->bus->sim->unit_number < 2) { + bus_id = path->bus->sim->unit_number; + } else { + bus_id = 2; + xpt_lock_buses(); + TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { + if (bus == path->bus) + break; + if ((strcmp(bus->sim->sim_name, "ata") == 0 && + bus->sim->unit_number >= 2) || + strcmp(bus->sim->sim_name, "ahcich") == 0 || + strcmp(bus->sim->sim_name, "mvsch") == 0 || + strcmp(bus->sim->sim_name, "siisch") == 0) + bus_id++; + } + xpt_unlock_buses(); + } + if (path->target != NULL) + return (bus_id * 2 + path->target->target_id); + else + return (bus_id * 2); +} + /* * Release a CAM control block for the caller. Remit the cost of the structure * to the device referenced by the path. If the this device had no 'credits' Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/cam/cam_xpt.h Tue Apr 26 17:01:49 2011 (r221071) @@ -113,6 +113,7 @@ int xpt_path_string(struct cam_path *p path_id_t xpt_path_path_id(struct cam_path *path); target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); +int xpt_path_legacy_ata_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); void xpt_async(u_int32_t async_code, struct cam_path *path, Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/conf/NOTES Tue Apr 26 17:01:49 2011 (r221071) @@ -1754,7 +1754,7 @@ hint.ata.1.irq="15" # atapifd, atapist, atapicam) and all user-level APIs. # cam(4) drivers and APIs will be connected instead. -#options ATA_STATIC_ID +options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 options ATA_CAM Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/geom/geom_dev.c Tue Apr 26 17:01:49 2011 (r221071) @@ -113,8 +113,9 @@ g_dev_taste(struct g_class *mp, struct g { struct g_geom *gp; struct g_consumer *cp; - int error; - struct cdev *dev; + int error, len; + struct cdev *dev, *adev; + char buf[64], *val; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -136,12 +137,35 @@ g_dev_taste(struct g_class *mp, struct g g_destroy_geom(gp); return (NULL); } + + /* Search for device alias name and create it if found. */ + adev = NULL; + for (len = MIN(strlen(gp->name), sizeof(buf) - 15); len > 0; len--) { + snprintf(buf, sizeof(buf), "kern.devalias.%s", gp->name); + buf[14 + len] = 0; + val = getenv(buf); + if (val != NULL) { + snprintf(buf, sizeof(buf), "%s%s", + val, gp->name + len); + freeenv(val); + adev = make_dev_alias(dev, buf); + break; + } + } + if (pp->flags & G_PF_CANDELETE) dev->si_flags |= SI_CANDELETE; dev->si_iosize_max = MAXPHYS; gp->softc = dev; dev->si_drv1 = gp; dev->si_drv2 = cp; + if (adev != NULL) { + if (pp->flags & G_PF_CANDELETE) + adev->si_flags |= SI_CANDELETE; + adev->si_iosize_max = MAXPHYS; + adev->si_drv1 = gp; + adev->si_drv2 = cp; + } return (gp); } Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/i386/conf/GENERIC Tue Apr 26 17:01:49 2011 (r221071) @@ -95,6 +95,7 @@ device fdc device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/i386/conf/XBOX Tue Apr 26 17:01:49 2011 (r221071) @@ -52,6 +52,7 @@ device pci # ATA and ATAPI devices device ata options ATA_CAM +options ATA_STATIC_ID # Static device numbering # ATA/SCSI peripherals device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/mips/conf/OCTEON1 Tue Apr 26 17:01:49 2011 (r221071) @@ -99,6 +99,7 @@ device pci device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/mips/conf/std.SWARM ============================================================================== --- head/sys/mips/conf/std.SWARM Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/mips/conf/std.SWARM Tue Apr 26 17:01:49 2011 (r221071) @@ -58,3 +58,4 @@ device pass device ata options ATA_CAM +options ATA_STATIC_ID # Static device numbering Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/modules/cam/Makefile Tue Apr 26 17:01:49 2011 (r221071) @@ -9,6 +9,7 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h SRCS+= opt_ada.h +SRCS+= opt_ata.h SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Tue Apr 26 16:56:43 2011 (r221070) +++ head/sys/pc98/conf/GENERIC Tue Apr 26 17:01:49 2011 (r221071) @@ -91,6 +91,7 @@ device fdc device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_CAM # Handle legacy controllers with CAM +options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 18:18: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 7E0FF1065673; Tue, 26 Apr 2011 18:18:10 +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 6B46D8FC19; Tue, 26 Apr 2011 18:18: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 p3QIIAlr033260; Tue, 26 Apr 2011 18:18:10 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QIIAYs033258; Tue, 26 Apr 2011 18:18:10 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201104261818.p3QIIAYs033258@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 26 Apr 2011 18:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221072 - stable/8/sys/netinet/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 18:18:10 -0000 Author: ae Date: Tue Apr 26 18:18:10 2011 New Revision: 221072 URL: http://svn.freebsd.org/changeset/base/221072 Log: MFC r220812: Use M_WAITOK instead M_WAIT for malloc. Remove unneded checks. Modified: stable/8/sys/netinet/ipfw/ip_dummynet.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/ipfw/ip_dummynet.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_dummynet.c Tue Apr 26 17:01:49 2011 (r221071) +++ stable/8/sys/netinet/ipfw/ip_dummynet.c Tue Apr 26 18:18:10 2011 (r221072) @@ -1833,9 +1833,7 @@ dummynet_get(struct sockopt *sopt, void #endif if (l > sizeof(r)) { /* request larger than default, allocate buffer */ - cmd = malloc(l, M_DUMMYNET, M_WAIT); - if (cmd == NULL) - return ENOMEM; //XXX + cmd = malloc(l, M_DUMMYNET, M_WAITOK); error = sooptcopyin(sopt, cmd, l, l); sopt->sopt_valsize = sopt_valsize; if (error) @@ -1891,10 +1889,6 @@ dummynet_get(struct sockopt *sopt, void have = need; start = malloc(have, M_DUMMYNET, M_WAITOK | M_ZERO); - if (start == NULL) { - error = ENOMEM; - goto done; - } } if (start == NULL) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 18:50: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 C48231065670; Tue, 26 Apr 2011 18:50:35 +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 B31778FC0A; Tue, 26 Apr 2011 18:50: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 p3QIoZQF034213; Tue, 26 Apr 2011 18:50:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QIoZF1034211; Tue, 26 Apr 2011 18:50:35 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201104261850.p3QIoZF1034211@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 26 Apr 2011 18:50: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: r221073 - 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: Tue, 26 Apr 2011 18:50:35 -0000 Author: hselasky Date: Tue Apr 26 18:50:35 2011 New Revision: 221073 URL: http://svn.freebsd.org/changeset/base/221073 Log: Fix for missing EHCI datatoggle change case. Reported by: Mike Tancsa MFC after: 3 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/controller/ehci.c Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Tue Apr 26 18:18:10 2011 (r221072) +++ head/sys/dev/usb/controller/ehci.c Tue Apr 26 18:50:35 2011 (r221073) @@ -1196,6 +1196,8 @@ ehci_data_toggle_update(struct usb_xfer dt ^= 1; /* short packet at the end */ else if (actlen != xlen) dt ^= 1; /* zero length packet at the end */ + else if (xlen == 0) + dt ^= 1; /* zero length transfer */ xfer->endpoint->toggle_next ^= dt; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 18:51: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 C1AFB1065672; Tue, 26 Apr 2011 18:51:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 992278FC13; Tue, 26 Apr 2011 18:51:19 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0FBB046B9E; Tue, 26 Apr 2011 14:51:19 -0400 (EDT) Date: Tue, 26 Apr 2011 19:51:18 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <201104261701.p3QH1ngd030888@svn.freebsd.org> Message-ID: References: <201104261701.p3QH1ngd030888@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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: r221071 - in head: . sys/amd64/conf sys/arm/conf sys/cam sys/cam/ata sys/conf sys/geom sys/i386/conf sys/mips/conf sys/modules/cam sys/pc98/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, 26 Apr 2011 18:51:19 -0000 On Tue, 26 Apr 2011, Alexander Motin wrote: > - Add shim to simplify migration to the CAM-based ATA. For each new adaX > device in /dev/ create symbolic link with adY name, trying to mimic old ATA > numbering. Imitation is not complete, but should be enough in most cases to > mount file systems without touching /etc/fstab. > - To know what behavior to mimic, restore ATA_STATIC_ID option in cases > where it was present before. > - Add some more details to UPDATING. Thanks for working on this! I'll give it a spin on some of my test boxes next week and see how it works out. Robert From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 19:11: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 C13D91065676; Tue, 26 Apr 2011 19:11:15 +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 B0B368FC18; Tue, 26 Apr 2011 19:11: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 p3QJBFfU034870; Tue, 26 Apr 2011 19:11:15 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QJBFnt034868; Tue, 26 Apr 2011 19:11:15 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201104261911.p3QJBFnt034868@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 26 Apr 2011 19:11: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: r221074 - 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, 26 Apr 2011 19:11:15 -0000 Author: trociny Date: Tue Apr 26 19:11:15 2011 New Revision: 221074 URL: http://svn.freebsd.org/changeset/base/221074 Log: Fix assert messages. Approved by: pjd (mentor) Modified: head/sbin/hastctl/hastctl.c Modified: head/sbin/hastctl/hastctl.c ============================================================================== --- head/sbin/hastctl/hastctl.c Tue Apr 26 18:50:35 2011 (r221073) +++ head/sbin/hastctl/hastctl.c Tue Apr 26 19:11:15 2011 (r221074) @@ -465,7 +465,7 @@ main(int argc, char *argv[]) } break; default: - assert(!"Impossible role!"); + assert(!"Impossible command!"); } /* Setup control connection... */ @@ -512,7 +512,7 @@ main(int argc, char *argv[]) error = control_status(nv); break; default: - assert(!"Impossible role!"); + assert(!"Impossible command!"); } exit(error); From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 19:22: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 E24341065670; Tue, 26 Apr 2011 19:22:54 +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 D1FA58FC1B; Tue, 26 Apr 2011 19:22: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 p3QJMsCU035240; Tue, 26 Apr 2011 19:22:54 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QJMs27035238; Tue, 26 Apr 2011 19:22:54 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201104261922.p3QJMs27035238@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 26 Apr 2011 19:22: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: r221075 - 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: Tue, 26 Apr 2011 19:22:55 -0000 Author: trociny Date: Tue Apr 26 19:22:54 2011 New Revision: 221075 URL: http://svn.freebsd.org/changeset/base/221075 Log: For conversation between hastctl and hastd we should use HASTCTL_CMD defines. Approved by: pjd (mentor) MFC after: 1 week Modified: head/sbin/hastd/control.c Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Tue Apr 26 19:11:15 2011 (r221074) +++ head/sbin/hastd/control.c Tue Apr 26 19:22:54 2011 (r221075) @@ -324,7 +324,7 @@ control_handle(struct hastd_config *cfg) error = EHAST_INVALID; goto fail; } - if (cmd == HASTCTL_SET_ROLE) { + if (cmd == HASTCTL_CMD_SETROLE) { role = nv_get_uint8(nvin, "role"); switch (role) { case HAST_ROLE_INIT: @@ -345,11 +345,11 @@ control_handle(struct hastd_config *cfg) ii = 0; TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) { switch (cmd) { - case HASTCTL_SET_ROLE: + case HASTCTL_CMD_SETROLE: control_set_role_common(cfg, nvout, role, res, res->hr_name, ii++); break; - case HASTCTL_STATUS: + case HASTCTL_CMD_STATUS: control_status(cfg, nvout, res, res->hr_name, ii++); break; @@ -368,11 +368,11 @@ control_handle(struct hastd_config *cfg) if (str == NULL) break; switch (cmd) { - case HASTCTL_SET_ROLE: + case HASTCTL_CMD_SETROLE: control_set_role_common(cfg, nvout, role, NULL, str, ii); break; - case HASTCTL_STATUS: + case HASTCTL_CMD_STATUS: control_status(cfg, nvout, NULL, str, ii); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 19:38: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 56C7D106566B; Tue, 26 Apr 2011 19:38:31 +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 2C6B08FC08; Tue, 26 Apr 2011 19:38: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 p3QJcV13035719; Tue, 26 Apr 2011 19:38:31 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QJcV3P035715; Tue, 26 Apr 2011 19:38:31 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201104261938.p3QJcV3P035715@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 26 Apr 2011 19:38: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: r221076 - 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: Tue, 26 Apr 2011 19:38:31 -0000 Author: trociny Date: Tue Apr 26 19:38:30 2011 New Revision: 221076 URL: http://svn.freebsd.org/changeset/base/221076 Log: Rename HASTCTL_ defines, which are used for conversion between main hastd process and workers, remove unused one and set different range of numbers. This is done in order not to confuse them with HASTCTL_CMD defines, used for conversation between hastctl and hastd, and to avoid bugs like the one fixed in in r221075. Approved by: pjd (mentor) MFC after: 1 week Modified: head/sbin/hastd/control.c head/sbin/hastd/control.h head/sbin/hastd/hastd.c Modified: head/sbin/hastd/control.c ============================================================================== --- head/sbin/hastd/control.c Tue Apr 26 19:22:54 2011 (r221075) +++ head/sbin/hastd/control.c Tue Apr 26 19:38:30 2011 (r221076) @@ -162,7 +162,7 @@ control_status_worker(struct hast_resour * Prepare and send command to worker process. */ cnvout = nv_alloc(); - nv_add_uint8(cnvout, HASTCTL_STATUS, "cmd"); + nv_add_uint8(cnvout, CONTROL_STATUS, "cmd"); error = nv_error(cnvout); if (error != 0) { pjdlog_common(LOG_ERR, 0, error, @@ -427,7 +427,7 @@ ctrl_thread(void *arg) } nvout = nv_alloc(); switch (cmd) { - case HASTCTL_STATUS: + case CONTROL_STATUS: if (res->hr_remotein != NULL && res->hr_remoteout != NULL) { nv_add_string(nvout, "complete", "status"); @@ -448,7 +448,7 @@ ctrl_thread(void *arg) } nv_add_int16(nvout, 0, "error"); break; - case HASTCTL_RELOAD: + case CONTROL_RELOAD: /* * When parent receives SIGHUP and discovers that * something related to us has changes, it sends reload Modified: head/sbin/hastd/control.h ============================================================================== --- head/sbin/hastd/control.h Tue Apr 26 19:22:54 2011 (r221075) +++ head/sbin/hastd/control.h Tue Apr 26 19:38:30 2011 (r221076) @@ -32,9 +32,8 @@ #ifndef _CONTROL_H_ #define _CONTROL_H_ -#define HASTCTL_SET_ROLE 1 -#define HASTCTL_STATUS 2 -#define HASTCTL_RELOAD 3 +#define CONTROL_STATUS 10 +#define CONTROL_RELOAD 11 struct hastd_config; struct hast_resource; Modified: head/sbin/hastd/hastd.c ============================================================================== --- head/sbin/hastd/hastd.c Tue Apr 26 19:22:54 2011 (r221075) +++ head/sbin/hastd/hastd.c Tue Apr 26 19:38:30 2011 (r221076) @@ -424,7 +424,7 @@ resource_reload(const struct hast_resour PJDLOG_ASSERT(res->hr_role == HAST_ROLE_PRIMARY); nvout = nv_alloc(); - nv_add_uint8(nvout, HASTCTL_RELOAD, "cmd"); + nv_add_uint8(nvout, CONTROL_RELOAD, "cmd"); nv_add_string(nvout, res->hr_remoteaddr, "remoteaddr"); nv_add_string(nvout, res->hr_sourceaddr, "sourceaddr"); nv_add_int32(nvout, (int32_t)res->hr_replication, "replication"); From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 19:40: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 175F91065670; Tue, 26 Apr 2011 19:40:38 +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 07ADD8FC1A; Tue, 26 Apr 2011 19:40: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 p3QJeb0B035819; Tue, 26 Apr 2011 19:40:37 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QJebFw035817; Tue, 26 Apr 2011 19:40:37 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201104261940.p3QJebFw035817@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 26 Apr 2011 19:40: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: r221077 - 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, 26 Apr 2011 19:40:38 -0000 Author: hselasky Date: Tue Apr 26 19:40:37 2011 New Revision: 221077 URL: http://svn.freebsd.org/changeset/base/221077 Log: The maximum NCM frame size must be so that it will generate a short terminated USB transfer if the maximum NCM frame size is greater than what the driver can handle. Reported by: Matthias Benesch MFC after: 7 days Approved by: thompsa (mentor) Modified: head/sys/dev/usb/net/if_cdcereg.h Modified: head/sys/dev/usb/net/if_cdcereg.h ============================================================================== --- head/sys/dev/usb/net/if_cdcereg.h Tue Apr 26 19:38:30 2011 (r221076) +++ head/sys/dev/usb/net/if_cdcereg.h Tue Apr 26 19:40:37 2011 (r221077) @@ -39,7 +39,7 @@ #define CDCE_IND_SIZE_MAX 32 /* bytes */ #define CDCE_NCM_TX_MINLEN 512 /* bytes, must be power of two */ -#define CDCE_NCM_TX_MAXLEN (1UL << 14) /* bytes */ +#define CDCE_NCM_TX_MAXLEN (16384 + 4) /* bytes, must be short terminated */ #define CDCE_NCM_TX_FRAMES_MAX 8 /* units */ #define CDCE_NCM_RX_MAXLEN (1UL << 14) /* bytes */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 19:52: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 B90C51065679; Tue, 26 Apr 2011 19:52:21 +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 A9BCE8FC1A; Tue, 26 Apr 2011 19:52: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 p3QJqLgO036201; Tue, 26 Apr 2011 19:52:21 GMT (envelope-from trociny@svn.freebsd.org) Received: (from trociny@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QJqL7N036199; Tue, 26 Apr 2011 19:52:21 GMT (envelope-from trociny@svn.freebsd.org) Message-Id: <201104261952.p3QJqL7N036199@svn.freebsd.org> From: Mikolaj Golub Date: Tue, 26 Apr 2011 19:52: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: r221078 - 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: Tue, 26 Apr 2011 19:52:21 -0000 Author: trociny Date: Tue Apr 26 19:52:21 2011 New Revision: 221078 URL: http://svn.freebsd.org/changeset/base/221078 Log: Add missing ifdef. This fixes build with NO_OPENSSL. Reported by: Pawel Tyll Approved by: pjd (mentor) MFC after: 1 week Modified: head/sbin/hastd/hast_proto.c Modified: head/sbin/hastd/hast_proto.c ============================================================================== --- head/sbin/hastd/hast_proto.c Tue Apr 26 19:40:37 2011 (r221077) +++ head/sbin/hastd/hast_proto.c Tue Apr 26 19:52:21 2011 (r221078) @@ -69,7 +69,9 @@ struct hast_pipe_stage { static struct hast_pipe_stage pipeline[] = { { "compression", compression_send, compression_recv }, +#ifdef HAVE_CRYPTO { "checksum", checksum_send, checksum_recv } +#endif }; /* From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 20:14: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 880B11065676; Tue, 26 Apr 2011 20:14:29 +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 794CE8FC16; Tue, 26 Apr 2011 20:14: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 p3QKETBW036938; Tue, 26 Apr 2011 20:14:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QKETGu036936; Tue, 26 Apr 2011 20:14:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201104262014.p3QKETGu036936@svn.freebsd.org> From: John Baldwin Date: Tue, 26 Apr 2011 20:14: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: r221079 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 20:14:29 -0000 Author: jhb Date: Tue Apr 26 20:14:29 2011 New Revision: 221079 URL: http://svn.freebsd.org/changeset/base/221079 Log: Generate the network byte order version of the window size structure in a temporary variable on the stack and then copy that into the output buffer so that the htons() conversions use aligned accesses. MFC after: 1 month Modified: head/usr.bin/rlogin/rlogin.c Modified: head/usr.bin/rlogin/rlogin.c ============================================================================== --- head/usr.bin/rlogin/rlogin.c Tue Apr 26 19:52:21 2011 (r221078) +++ head/usr.bin/rlogin/rlogin.c Tue Apr 26 20:14:29 2011 (r221079) @@ -484,18 +484,18 @@ sigwinch(int signo __unused) void sendwindow(void) { - struct winsize *wp; + struct winsize ws; char obuf[4 + sizeof (struct winsize)]; - wp = (struct winsize *)(obuf+4); obuf[0] = 0377; obuf[1] = 0377; obuf[2] = 's'; obuf[3] = 's'; - wp->ws_row = htons(winsize.ws_row); - wp->ws_col = htons(winsize.ws_col); - wp->ws_xpixel = htons(winsize.ws_xpixel); - wp->ws_ypixel = htons(winsize.ws_ypixel); + ws.ws_row = htons(winsize.ws_row); + ws.ws_col = htons(winsize.ws_col); + ws.ws_xpixel = htons(winsize.ws_xpixel); + ws.ws_ypixel = htons(winsize.ws_ypixel); + bcopy(&ws, obuf + 4, sizeof(ws)); (void)write(rem, obuf, sizeof(obuf)); } From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 20:34: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 1C930106566C; Tue, 26 Apr 2011 20:34:31 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7A9F8FC16; Tue, 26 Apr 2011 20:34: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 p3QKYUqE037588; Tue, 26 Apr 2011 20:34:30 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QKYUI3037586; Tue, 26 Apr 2011 20:34:30 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201104262034.p3QKYUI3037586@svn.freebsd.org> From: Ryan Stone Date: Tue, 26 Apr 2011 20:34: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: r221081 - 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, 26 Apr 2011 20:34:31 -0000 Author: rstone Date: Tue Apr 26 20:34:30 2011 New Revision: 221081 URL: http://svn.freebsd.org/changeset/base/221081 Log: If the 4BSD scheduler tries to schedule a thread that has been pinned or bound to an AP before SMP has started, the system will panic when we try to touch per-CPU state for that AP because that state has not been initialized yet. Fix this in the same way as ULE: place all threads in the global run queue before SMP has started. Reviewed by: jhb MFC after: 1 month Modified: head/sys/kern/sched_4bsd.c Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Tue Apr 26 20:25:16 2011 (r221080) +++ head/sys/kern/sched_4bsd.c Tue Apr 26 20:34:30 2011 (r221081) @@ -1246,25 +1246,27 @@ sched_add(struct thread *td, int flags) } TD_SET_RUNQ(td); - if (td->td_pinned != 0) { - cpu = td->td_lastcpu; - ts->ts_runq = &runq_pcpu[cpu]; - single_cpu = 1; - CTR3(KTR_RUNQ, - "sched_add: Put td_sched:%p(td:%p) on cpu%d runq", ts, td, - cpu); - } else if (td->td_flags & TDF_BOUND) { - /* Find CPU from bound runq. */ - KASSERT(SKE_RUNQ_PCPU(ts), - ("sched_add: bound td_sched not on cpu runq")); - cpu = ts->ts_runq - &runq_pcpu[0]; - single_cpu = 1; - CTR3(KTR_RUNQ, - "sched_add: Put td_sched:%p(td:%p) on cpu%d runq", ts, td, - cpu); - } else if (ts->ts_flags & TSF_AFFINITY) { - /* Find a valid CPU for our cpuset */ - cpu = sched_pickcpu(td); + /* + * If SMP is started and the thread is pinned or otherwise limited to + * a specific set of CPUs, queue the thread to a per-CPU run queue. + * Otherwise, queue the thread to the global run queue. + * + * If SMP has not yet been started we must use the global run queue + * as per-CPU state may not be initialized yet and we may crash if we + * try to access the per-CPU run queues. + */ + if (smp_started && (td->td_pinned != 0 || td->td_flags & TDF_BOUND || + ts->ts_flags & TSF_AFFINITY)) { + if (td->td_pinned != 0) + cpu = td->td_lastcpu; + else if (td->td_flags & TDF_BOUND) { + /* Find CPU from bound runq. */ + KASSERT(SKE_RUNQ_PCPU(ts), + ("sched_add: bound td_sched not on cpu runq")); + cpu = ts->ts_runq - &runq_pcpu[0]; + } else + /* Find a valid CPU for our cpuset */ + cpu = sched_pickcpu(td); ts->ts_runq = &runq_pcpu[cpu]; single_cpu = 1; CTR3(KTR_RUNQ, From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 22:02: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 D72AD106564A; Tue, 26 Apr 2011 22:02:51 +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 AE63E8FC15; Tue, 26 Apr 2011 22:02: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 p3QM2pQu040441; Tue, 26 Apr 2011 22:02:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QM2p0K040439; Tue, 26 Apr 2011 22:02:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201104262202.p3QM2p0K040439@svn.freebsd.org> From: Doug Barton Date: Tue, 26 Apr 2011 22:02: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: r221088 - head/usr.bin/rlogin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Apr 2011 22:02:51 -0000 Author: dougb Date: Tue Apr 26 22:02:51 2011 New Revision: 221088 URL: http://svn.freebsd.org/changeset/base/221088 Log: Revert r221053 by replacing WARNS?= 3 since it's breaking the build on several arches. Modified: head/usr.bin/rlogin/Makefile Modified: head/usr.bin/rlogin/Makefile ============================================================================== --- head/usr.bin/rlogin/Makefile Tue Apr 26 21:47:38 2011 (r221087) +++ head/usr.bin/rlogin/Makefile Tue Apr 26 22:02:51 2011 (r221088) @@ -7,4 +7,6 @@ BINOWN= root BINMODE=4555 PRECIOUSPROG= +WARNS?= 3 + .include From owner-svn-src-all@FreeBSD.ORG Tue Apr 26 22:10: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 05C801065677; Tue, 26 Apr 2011 22:10:03 +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 D9DE98FC16; Tue, 26 Apr 2011 22:10: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 p3QMA3oD040678; Tue, 26 Apr 2011 22:10:03 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMA3ZW040675; Tue, 26 Apr 2011 22:10:03 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201104262210.p3QMA3ZW040675@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 26 Apr 2011 22:10:03 +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: r221089 - 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, 26 Apr 2011 22:10:04 -0000 Author: edwin Date: Tue Apr 26 22:10:03 2011 New Revision: 221089 URL: http://svn.freebsd.org/changeset/base/221089 Log: Vendor import of tzdata2011g: - Egypt has cancelled the adjustment into DST for now. Obtained from: ftp://elsie.nci.nih.gov/pub/ Modified: vendor/tzdata/dist/africa vendor/tzdata/dist/europe vendor/tzdata/dist/southamerica Modified: vendor/tzdata/dist/africa ============================================================================== --- vendor/tzdata/dist/africa Tue Apr 26 22:02:51 2011 (r221088) +++ vendor/tzdata/dist/africa Tue Apr 26 22:10:03 2011 (r221089) @@ -1,5 +1,5 @@ #
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: vendor/tzdata/dist/europe
==============================================================================
--- vendor/tzdata/dist/europe	Tue Apr 26 22:02:51 2011	(r221088)
+++ vendor/tzdata/dist/europe	Tue Apr 26 22:10:03 2011	(r221089)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: vendor/tzdata/dist/southamerica
==============================================================================
--- vendor/tzdata/dist/southamerica	Tue Apr 26 22:02:51 2011	(r221088)
+++ vendor/tzdata/dist/southamerica	Tue Apr 26 22:10:03 2011	(r221089)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22: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 D0CDE1065675;
	Tue, 26 Apr 2011 22:11:40 +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 A90F38FC1F;
	Tue, 26 Apr 2011 22: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 p3QMBesC040778;
	Tue, 26 Apr 2011 22:11:40 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMBejM040777;
	Tue, 26 Apr 2011 22:11:40 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201104262211.p3QMBejM040777@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Apr 2011 22:11:40 +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: r221090 - vendor/tzdata/tzdata2011g
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 26 Apr 2011 22:11:40 -0000

Author: edwin
Date: Tue Apr 26 22:11:40 2011
New Revision: 221090
URL: http://svn.freebsd.org/changeset/base/221090

Log:
  Tag of tzdata2011g, r221089.

Added:
  vendor/tzdata/tzdata2011g/
     - copied from r221089, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:14: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 4CA19106564A;
	Tue, 26 Apr 2011 22:14:11 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 338198FC18;
	Tue, 26 Apr 2011 22:14: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 p3QMEB4X040943;
	Tue, 26 Apr 2011 22:14:11 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMEBwv040939;
	Tue, 26 Apr 2011 22:14:11 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201104262214.p3QMEBwv040939@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Apr 2011 22:14: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: r221092 - 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, 26 Apr 2011 22:14:11 -0000

Author: edwin
Date: Tue Apr 26 22:14:10 2011
New Revision: 221092
URL: http://svn.freebsd.org/changeset/base/221092

Log:
  MFV of tzdata2011g, 221089.
  
  - Egypt has cancelled the move to DST for now.

Modified:
  head/contrib/tzdata/africa
  head/contrib/tzdata/europe
  head/contrib/tzdata/southamerica
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/africa
==============================================================================
--- head/contrib/tzdata/africa	Tue Apr 26 22:13:58 2011	(r221091)
+++ head/contrib/tzdata/africa	Tue Apr 26 22:14:10 2011	(r221092)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: head/contrib/tzdata/europe
==============================================================================
--- head/contrib/tzdata/europe	Tue Apr 26 22:13:58 2011	(r221091)
+++ head/contrib/tzdata/europe	Tue Apr 26 22:14:10 2011	(r221092)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: head/contrib/tzdata/southamerica
==============================================================================
--- head/contrib/tzdata/southamerica	Tue Apr 26 22:13:58 2011	(r221091)
+++ head/contrib/tzdata/southamerica	Tue Apr 26 22:14:10 2011	(r221092)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:15: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 B917B106564A;
	Tue, 26 Apr 2011 22:15:32 +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 9FD098FC1E;
	Tue, 26 Apr 2011 22:15: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 p3QMFWA6041043;
	Tue, 26 Apr 2011 22:15:32 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMFWCN041039;
	Tue, 26 Apr 2011 22:15:32 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201104262215.p3QMFWCN041039@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Apr 2011 22:15: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: r221093 - 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, 26 Apr 2011 22:15:32 -0000

Author: edwin
Date: Tue Apr 26 22:15:32 2011
New Revision: 221093
URL: http://svn.freebsd.org/changeset/base/221093

Log:
  MFC of 221092, tzdata2011g
  
  - Egypt has cancelled the move to DST for now.

Modified:
  stable/8/share/zoneinfo/africa
  stable/8/share/zoneinfo/europe
  stable/8/share/zoneinfo/southamerica
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/africa
==============================================================================
--- stable/8/share/zoneinfo/africa	Tue Apr 26 22:14:10 2011	(r221092)
+++ stable/8/share/zoneinfo/africa	Tue Apr 26 22:15:32 2011	(r221093)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: stable/8/share/zoneinfo/europe
==============================================================================
--- stable/8/share/zoneinfo/europe	Tue Apr 26 22:14:10 2011	(r221092)
+++ stable/8/share/zoneinfo/europe	Tue Apr 26 22:15:32 2011	(r221093)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: stable/8/share/zoneinfo/southamerica
==============================================================================
--- stable/8/share/zoneinfo/southamerica	Tue Apr 26 22:14:10 2011	(r221092)
+++ stable/8/share/zoneinfo/southamerica	Tue Apr 26 22:15:32 2011	(r221093)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:16: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 3450B106564A;
	Tue, 26 Apr 2011 22:16: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 1B27F8FC18;
	Tue, 26 Apr 2011 22:16: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 p3QMGMtS041119;
	Tue, 26 Apr 2011 22:16:22 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMGMfi041115;
	Tue, 26 Apr 2011 22:16:22 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201104262216.p3QMGMfi041115@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Apr 2011 22:16:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221094 - 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, 26 Apr 2011 22:16:23 -0000

Author: edwin
Date: Tue Apr 26 22:16:22 2011
New Revision: 221094
URL: http://svn.freebsd.org/changeset/base/221094

Log:
  MFC of 221092, tzdata2011g
  
  - Egypt has cancelled the move to DST for now.

Modified:
  stable/7/share/zoneinfo/africa
  stable/7/share/zoneinfo/europe
  stable/7/share/zoneinfo/southamerica
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/africa
==============================================================================
--- stable/7/share/zoneinfo/africa	Tue Apr 26 22:15:32 2011	(r221093)
+++ stable/7/share/zoneinfo/africa	Tue Apr 26 22:16:22 2011	(r221094)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: stable/7/share/zoneinfo/europe
==============================================================================
--- stable/7/share/zoneinfo/europe	Tue Apr 26 22:15:32 2011	(r221093)
+++ stable/7/share/zoneinfo/europe	Tue Apr 26 22:16:22 2011	(r221094)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Apr 26 22:15:32 2011	(r221093)
+++ stable/7/share/zoneinfo/southamerica	Tue Apr 26 22:16:22 2011	(r221094)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:17: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 41A3B106566B;
	Tue, 26 Apr 2011 22:17:11 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 276FD8FC25;
	Tue, 26 Apr 2011 22:17: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 p3QMHBUP041198;
	Tue, 26 Apr 2011 22:17:11 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMHBIi041194;
	Tue, 26 Apr 2011 22:17:11 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <201104262217.p3QMHBIi041194@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 26 Apr 2011 22:17:10 +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: r221095 - 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, 26 Apr 2011 22:17:11 -0000

Author: edwin
Date: Tue Apr 26 22:17:10 2011
New Revision: 221095
URL: http://svn.freebsd.org/changeset/base/221095

Log:
  MFC of 221092, tzdata2011g
  
  - Egypt has cancelled the move to DST for now.

Modified:
  stable/6/share/zoneinfo/africa
  stable/6/share/zoneinfo/europe
  stable/6/share/zoneinfo/southamerica
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/africa
==============================================================================
--- stable/6/share/zoneinfo/africa	Tue Apr 26 22:16:22 2011	(r221094)
+++ stable/6/share/zoneinfo/africa	Tue Apr 26 22:17:10 2011	(r221095)
@@ -1,5 +1,5 @@
 # 
-# @(#)africa	8.30
+# @(#)africa	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -212,7 +212,21 @@ Rule	Egypt	1989	only	-	May	 6	1:00	1:00	
 Rule	Egypt	1990	1994	-	May	 1	1:00	1:00	S
 # IATA (after 1990) says transitions are at 0:00.
 # Go with IATA starting in 1995, except correct 1995 entry from 09-30 to 09-29.
-Rule	Egypt	1995	max	-	Apr	lastFri	 0:00s	1:00	S
+
+# From Alexander Krivenyshev (2011-04-20):
+# "...Egypt's interim cabinet decided on Wednesday to cancel daylight
+# saving time after a poll posted on its website showed the majority of
+# Egyptians would approve the cancellation."
+#
+# Egypt to cancel daylight saving time
+# 
+# http://www.almasryalyoum.com/en/node/407168
+# 
+# or
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_egypt04.html
+# 
+Rule	Egypt	1995	2010	-	Apr	lastFri	 0:00s	1:00	S
 Rule	Egypt	1995	2005	-	Sep	lastThu	23:00s	0	-
 # From Steffen Thorsen (2006-09-19):
 # The Egyptian Gazette, issue 41,090 (2006-09-18), page 1, reports:
@@ -313,7 +327,7 @@ Rule	Egypt	2008	only	-	Aug	lastThu	23:00
 Rule	Egypt	2009	only	-	Aug	20	23:00s	0	-
 Rule	Egypt	2010	only	-	Aug	11	0:00	0	-
 Rule	Egypt	2010	only	-	Sep	10	0:00	1:00	S
-Rule	Egypt	2010	max	-	Sep	lastThu	23:00s	0	-
+Rule	Egypt	2010	only	-	Sep	lastThu	23:00s	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Cairo	2:05:00 -	LMT	1900 Oct

Modified: stable/6/share/zoneinfo/europe
==============================================================================
--- stable/6/share/zoneinfo/europe	Tue Apr 26 22:16:22 2011	(r221094)
+++ stable/6/share/zoneinfo/europe	Tue Apr 26 22:17:10 2011	(r221095)
@@ -1,5 +1,5 @@
 # 
-# @(#)europe	8.31
+# @(#)europe	8.32
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -146,7 +146,7 @@
 # A monument to Willett was unveiled on 1927-05-21, in an open space in
 # a 45-acre wood near Chislehurst, Kent that was purchased by popular
 # subscription and open to the public.  On the south face of the monolith,
-# designed by G. W. Miller, is the the William Willett Memorial Sundial,
+# designed by G. W. Miller, is the...William Willett Memorial Sundial,
 # which is permanently set to Summer Time.
 
 # From Winston Churchill (1934-04-28):
@@ -1786,7 +1786,7 @@ Zone	Europe/Oslo	0:43:00 -	LMT	1895 Jan 
 #
 # All these events predate our cutoff date of 1970.  Unless we can
 # come up with more definitive info about the timekeeping during the
-# war years it's probably best just do do the following for now:
+# war years it's probably best just do...the following for now:
 Link	Europe/Oslo	Arctic/Longyearbyen
 
 # Poland

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Tue Apr 26 22:16:22 2011	(r221094)
+++ stable/6/share/zoneinfo/southamerica	Tue Apr 26 22:17:10 2011	(r221095)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.48
+# @(#)southamerica	8.49
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -745,7 +745,7 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 #
 # As a result of the above Decree I believe the America/Rio_Branco
 # timezone shall be modified from UTC-5 to UTC-4 and a new timezone shall
-# be created to represent the the west side of the Para State. I
+# be created to represent the...west side of the Para State. I
 # suggest this new timezone be called Santarem as the most
 # important/populated city in the affected area.
 #

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:18: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 BDB47106568C;
	Tue, 26 Apr 2011 22:18:44 +0000 (UTC) (envelope-from andy@fud.org.nz)
Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 1461F8FC14;
	Tue, 26 Apr 2011 22:18:43 +0000 (UTC)
Received: by wwk4 with SMTP id 4so2740120wwk.1
	for ; Tue, 26 Apr 2011 15:18:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.216.253.138 with SMTP id f10mr245408wes.30.1303856321479; Tue,
	26 Apr 2011 15:18:41 -0700 (PDT)
Sender: andy@fud.org.nz
Received: by 10.216.181.144 with HTTP; Tue, 26 Apr 2011 15:18:41 -0700 (PDT)
In-Reply-To: <201104262202.p3QM2p0K040439@svn.freebsd.org>
References: <201104262202.p3QM2p0K040439@svn.freebsd.org>
Date: Wed, 27 Apr 2011 10:18:41 +1200
X-Google-Sender-Auth: ue2Fwup4c2rpKZKAgxA7y1OQlvM
Message-ID: 
From: Andrew Thompson 
To: Doug Barton 
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: r221088 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 26 Apr 2011 22:18:44 -0000

On 27 April 2011 10:02, Doug Barton  wrote:
> Author: dougb
> Date: Tue Apr 26 22:02:51 2011
> New Revision: 221088
> URL: http://svn.freebsd.org/changeset/base/221088
>
> Log:
> =A0Revert r221053 by replacing WARNS?=3D 3 since it's breaking the build =
on
> =A0several arches.

r221079 from jhb may have already fixed it.

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22: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 297C1106564A;
	Tue, 26 Apr 2011 22:18:54 +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 1A51E8FC12;
	Tue, 26 Apr 2011 22: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 p3QMIro3041283;
	Tue, 26 Apr 2011 22:18:53 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3QMIr13041281;
	Tue, 26 Apr 2011 22:18:53 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201104262218.p3QMIr13041281@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Tue, 26 Apr 2011 22:18: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: r221096 - 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, 26 Apr 2011 22:18:54 -0000

Author: obrien
Date: Tue Apr 26 22:18:53 2011
New Revision: 221096
URL: http://svn.freebsd.org/changeset/base/221096

Log:
  Reap old SPL comments.
  
  Reviewed by:	alc

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Tue Apr 26 22:17:10 2011	(r221095)
+++ head/sys/vm/swap_pager.c	Tue Apr 26 22:18:53 2011	(r221096)
@@ -424,7 +424,6 @@ swp_pager_free_nrpage(vm_page_t m)
  *
  *	No restrictions on call
  *	This routine may not block.
- *	This routine must be called at splvm()
  */
 static void
 swp_sizecheck(void)
@@ -449,8 +448,6 @@ swp_sizecheck(void)
  *	the object and page index.  It returns a pointer to a pointer
  *	to the object, or a pointer to a NULL pointer if it could not
  *	find a swapblk.
- *
- *	This routine must be called at splvm().
  */
 static struct swblock **
 swp_pager_hash(vm_object_t object, vm_pindex_t index)
@@ -590,12 +587,7 @@ swap_pager_swap_init(void)
  *	and then converting it with swp_pager_meta_build().
  *
  *	This routine may block in vm_object_allocate() and create a named
- *	object lookup race, so we must interlock.   We must also run at
- *	splvm() for the object lookup to handle races with interrupts, but
- *	we do not have to maintain splvm() in between the lookup and the
- *	add because (I believe) it is not possible to attempt to create
- *	a new swap object w/handle when a default object with that handle
- *	already exists.
+ *	object lookup race, so we must interlock.
  *
  * MPSAFE
  */
@@ -708,11 +700,7 @@ swap_pager_dealloc(vm_object_t object)
  *	Also has the side effect of advising that somebody made a mistake
  *	when they configured swap and didn't configure enough.
  *
- *	Must be called at splvm() to avoid races with bitmap frees from
- *	vm_page_remove() aka swap_pager_page_removed().
- *
  *	This routine may not block
- *	This routine must be called at splvm().
  *
  *	We allocate in round-robin fashion from the configured devices.
  */
@@ -785,11 +773,7 @@ swp_pager_strategy(struct buf *bp)
  *	Note:  This routine may not block (it could in the old swap code),
  *	and through the use of the new blist routines it does not block.
  *
- *	We must be called at splvm() to avoid races with bitmap frees from
- *	vm_page_remove() aka swap_pager_page_removed().
- *
  *	This routine may not block
- *	This routine must be called at splvm().
  */
 static void
 swp_pager_freeswapspace(daddr_t blk, int npages)
@@ -829,9 +813,6 @@ swp_pager_freeswapspace(daddr_t blk, int
  *	The external callers of this routine typically have already destroyed 
  *	or renamed vm_page_t's associated with this range in the object so 
  *	we should be ok.
- *
- *	This routine may be called at any spl.  We up our spl to splvm temporarily
- *	in order to perform the metadata removal.
  */
 void
 swap_pager_freespace(vm_object_t object, vm_pindex_t start, vm_size_t size)
@@ -892,8 +873,6 @@ swap_pager_reserve(vm_object_t object, v
  *	indirectly through swp_pager_meta_build() or if paging is still in
  *	progress on the source. 
  *
- *	This routine can be called at any spl
- *
  *	XXX vm_page_collapse() kinda expects us not to block because we 
  *	supposedly do not need to allocate memory, but for the moment we
  *	*may* have to get a little memory from the zone allocator, but
@@ -1082,7 +1061,6 @@ swap_pager_haspage(vm_object_t object, v
  *	depends on it.
  *
  *	This routine may not block
- *	This routine must be called at splvm()
  */
 static void
 swap_pager_unswapped(vm_page_t m)
@@ -1813,9 +1791,7 @@ restart:
  ************************************************************************
  *
  *	These routines manipulate the swap metadata stored in the 
- *	OBJT_SWAP object.  All swp_*() routines must be called at
- *	splvm() because swap can be freed up by the low level vm_page
- *	code which might be called from interrupts beyond what splbio() covers.
+ *	OBJT_SWAP object.
  *
  *	Swap metadata is implemented with a global hash and not directly
  *	linked into the object.  Instead the object simply contains
@@ -1831,9 +1807,6 @@ restart:
  *	The specified swapblk is added to the object's swap metadata.  If
  *	the swapblk is not valid, it is freed instead.  Any previously
  *	assigned swapblk is freed.
- *
- *	This routine must be called at splvm(), except when used to convert
- *	an OBJT_DEFAULT object into an OBJT_SWAP object.
  */
 static void
 swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk)
@@ -1930,8 +1903,6 @@ done:
  *	This routine will free swap metadata structures as they are cleaned 
  *	out.  This routine does *NOT* operate on swap metadata associated
  *	with resident pages.
- *
- *	This routine must be called at splvm()
  */
 static void
 swp_pager_meta_free(vm_object_t object, vm_pindex_t index, daddr_t count)
@@ -1977,8 +1948,6 @@ swp_pager_meta_free(vm_object_t object, 
  *
  *	This routine locates and destroys all swap metadata associated with
  *	an object.
- *
- *	This routine must be called at splvm()
  */
 static void
 swp_pager_meta_free_all(vm_object_t object)
@@ -2033,8 +2002,6 @@ swp_pager_meta_free_all(vm_object_t obje
  *	have to wait until paging is complete but otherwise can act on the 
  *	busy page.
  *
- *	This routine must be called at splvm().
- *
  *	SWM_FREE	remove and free swap block from metadata
  *	SWM_POP		remove from meta data but do not free.. pop it out
  */

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 22:26: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 EB339106566B;
	Tue, 26 Apr 2011 22:26:42 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id CC0B28FC20;
	Tue, 26 Apr 2011 22:26:42 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3QMQgrJ044455;
	Tue, 26 Apr 2011 15:26:42 -0700 (PDT)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3QMQfEt044454;
	Tue, 26 Apr 2011 15:26:41 -0700 (PDT) (envelope-from obrien)
Date: Tue, 26 Apr 2011 15:26:41 -0700
From: "David O'Brien" 
To: John Baldwin 
Message-ID: <20110426222641.GA44259@dragon.NUXI.org>
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201104260932.44199.jhb@freebsd.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: "SVN commit messages 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, 26 Apr 2011 22:26:43 -0000

On Tue, Apr 26, 2011 at 09:32:44AM -0400, John Baldwin wrote:
> On Tuesday, April 26, 2011 12:09:20 am David E. O'Brien wrote:
> > Author: obrien
> > Date: Tue Apr 26 04:09:20 2011
> > New Revision: 221053
> > URL: http://svn.freebsd.org/changeset/base/221053
> > 
> > Log:
> >   This builds OK using the parent dir's WARNS=6.
> >   [built on both AMD64 and i386]
> 
> This breaks the tinderbox on at least arm, ia64, mips, and sparc64.

Sigh.  Do we yet have ARM, MIPS, or Sparc64 test machines in
the cluster?  http://www.freebsd.org/internal/machines.html doesn't list
any, but maybe some have been added?

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-all@FreeBSD.ORG  Tue Apr 26 23:31: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 8904A106566C;
	Tue, 26 Apr 2011 23:31:45 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org
	[IPv6:2001:4f8:fff6::36])
	by mx2.freebsd.org (Postfix) with ESMTP id 4E033154969;
	Tue, 26 Apr 2011 23:31:45 +0000 (UTC)
Message-ID: <4DB755E0.6020104@FreeBSD.org>
Date: Tue, 26 Apr 2011 16:31:44 -0700
From: Doug Barton 
Organization: http://SupersetSolutions.com/
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.15) Gecko/20110319 Thunderbird/3.1.9
MIME-Version: 1.0
To: Andrew Thompson 
References: <201104262202.p3QM2p0K040439@svn.freebsd.org>
	
In-Reply-To: 
X-Enigmail-Version: 1.1.2
OpenPGP: id=1A1ABC84
Content-Type: text/plain; charset=ISO-8859-1; 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: r221088 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 26 Apr 2011 23:31:45 -0000

On 04/26/2011 15:18, Andrew Thompson wrote:
> On 27 April 2011 10:02, Doug Barton  wrote:
>> Author: dougb
>> Date: Tue Apr 26 22:02:51 2011
>> New Revision: 221088
>> URL: http://svn.freebsd.org/changeset/base/221088
>>
>> Log:
>>   Revert r221053 by replacing WARNS?= 3 since it's breaking the build on
>>   several arches.
>
> r221079 from jhb may have already fixed it.

Great, I'll let someone who cares do the testing to determine that. Once 
it's tested I have no objections to someone reverting my reversion. :)


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  Tue Apr 26 23:49: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 02E8B106566B;
	Tue, 26 Apr 2011 23:49:00 +0000 (UTC)
	(envelope-from doconnor@gsoft.com.au)
Received: from cain.gsoft.com.au (unknown
	[IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16])
	by mx1.freebsd.org (Postfix) with ESMTP id 5E3FC8FC16;
	Tue, 26 Apr 2011 23:48:57 +0000 (UTC)
Received: from [10.4.33.117] ([202.90.207.206]) (authenticated bits=0)
	by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3QNmdMq084169
	(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
	Wed, 27 Apr 2011 09:18:40 +0930 (CST)
	(envelope-from doconnor@gsoft.com.au)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: "Daniel O'Connor" 
In-Reply-To: 
Date: Wed, 27 Apr 2011 09:48:39 +1000
Content-Transfer-Encoding: quoted-printable
Message-Id: <15C958E3-6CF7-48C4-88C9-2E61AC301657@gsoft.com.au>
References: <201104240923.p3O9N8QG025386@svn.freebsd.org>
	<20110424161933.GA18775@vniz.net>
	<18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au>
	
	<34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au>
	
To: Warner Losh 
X-Mailer: Apple Mail (2.1084)
X-Spam-Score: -0.272 () BAYES_00,RDNS_NONE
X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10
Cc: svn-src-head@FreeBSD.org, Alexander Motin ,
	src-committers@FreeBSD.org, Andrey Chernov ,
	svn-src-all@FreeBSD.org
Subject: Re: svn commit: r220983 - 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: Tue, 26 Apr 2011 23:49:00 -0000


On 26/04/2011, at 1:31, Warner Losh wrote:
>> This is why I prefer IDs since they are nominally unique (UFS ones, =
GPTs damn well better be :)
>>=20
>> Although I concede it is rather annoying to work out which is which, =
or type them out manually..
>=20
> For things like ZFS, UUIDs aren't so bad because it hides them.

Yes, I use GPT with ZFS, it's good :)

> For things like /etc/fstab, I prefer the named approach.  This allows =
me to survive a newfs on a partition if I have to without having to hack =
my /etc/fstab.  I have a large /tmp partition at times, and it gets =
newfs'd if there's a bad problem...

Yeah, but..
IMHO if the installer supports it then it is dramatically less painful..

I haven't looked to see how hard it is to add, hopefully I will get some =
time to look RSN and it shouldn't be too difficult.

FWIW the above shell snippet is found in a post [sys]install shell =
script I used for 6.x and later so it has had a bit of testing.

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C







From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 00:10: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 DFA70106566B;
	Wed, 27 Apr 2011 00:10:26 +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 CD82B8FC1B;
	Wed, 27 Apr 2011 00:10: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 p3R0AQid044876;
	Wed, 27 Apr 2011 00:10:26 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R0AQQv044866;
	Wed, 27 Apr 2011 00:10:26 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104270010.p3R0AQQv044866@svn.freebsd.org>
From: Alexander Motin 
Date: Wed, 27 Apr 2011 00:10: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: r221101 - in head/sys/geom: . concat journal mirror
	raid3 shsec stripe virstor
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 00:10:27 -0000

Author: mav
Date: Wed Apr 27 00:10:26 2011
New Revision: 221101
URL: http://svn.freebsd.org/changeset/base/221101

Log:
  Implement relaxed comparision for hardcoded provider names to make it
  ignore adX/adaY difference in both directions to simplify migration to
  the CAM-based ATA or back.

Modified:
  head/sys/geom/concat/g_concat.c
  head/sys/geom/geom.h
  head/sys/geom/geom_subr.c
  head/sys/geom/journal/g_journal.c
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/raid3/g_raid3.c
  head/sys/geom/shsec/g_shsec.c
  head/sys/geom/stripe/g_stripe.c
  head/sys/geom/virstor/g_virstor.c

Modified: head/sys/geom/concat/g_concat.c
==============================================================================
--- head/sys/geom/concat/g_concat.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/concat/g_concat.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -678,7 +678,8 @@ g_concat_taste(struct g_class *mp, struc
 	if (md.md_version < 4)
 		md.md_provsize = pp->mediasize;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/geom.h
==============================================================================
--- head/sys/geom/geom.h	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/geom.h	Wed Apr 27 00:10:26 2011	(r221101)
@@ -238,6 +238,7 @@ void g_waitidlelock(void);
 /* geom_subr.c */
 int g_access(struct g_consumer *cp, int nread, int nwrite, int nexcl);
 int g_attach(struct g_consumer *cp, struct g_provider *pp);
+int g_compare_names(const char *namea, const char *nameb);
 void g_destroy_consumer(struct g_consumer *cp);
 void g_destroy_geom(struct g_geom *pp);
 void g_destroy_provider(struct g_provider *pp);

Modified: head/sys/geom/geom_subr.c
==============================================================================
--- head/sys/geom/geom_subr.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/geom_subr.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -1017,6 +1017,43 @@ g_getattr__(const char *attr, struct g_c
 	return (0);
 }
 
+static int
+g_get_device_prefix_len(const char *name)
+{
+	int len;
+
+	if (strncmp(name, "ada", 3) == 0)
+		len = 3;
+	else if (strncmp(name, "ad", 2) == 0)
+		len = 2;
+	else
+		return (0);
+	if (name[len] < '0' || name[len] > '9')
+		return (0);
+	do {
+		len++;
+	} while (name[len] >= '0' && name[len] <= '9');
+	return (len);
+}
+
+int
+g_compare_names(const char *namea, const char *nameb)
+{
+	int deva, devb;
+
+	if (strcmp(namea, nameb) == 0)
+		return (1);
+	deva = g_get_device_prefix_len(namea);
+	if (deva == 0)
+		return (0);
+	devb = g_get_device_prefix_len(nameb);
+	if (devb == 0)
+		return (0);
+	if (strcmp(namea + deva, nameb + devb) == 0)
+		return (1);
+	return (0);
+}
+
 #if defined(DIAGNOSTIC) || defined(DDB)
 /*
  * This function walks the mesh and returns a non-zero integer if it

Modified: head/sys/geom/journal/g_journal.c
==============================================================================
--- head/sys/geom/journal/g_journal.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/journal/g_journal.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -2527,7 +2527,8 @@ g_journal_taste(struct g_class *mp, stru
 		return (NULL);
 	gp = NULL;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != 0 && md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/mirror/g_mirror.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -3007,7 +3007,8 @@ g_mirror_taste(struct g_class *mp, struc
 		return (NULL);
 	gp = NULL;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != 0 && md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/raid3/g_raid3.c
==============================================================================
--- head/sys/geom/raid3/g_raid3.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/raid3/g_raid3.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -3329,7 +3329,8 @@ g_raid3_taste(struct g_class *mp, struct
 		return (NULL);
 	gp = NULL;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != 0 && md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/shsec/g_shsec.c
==============================================================================
--- head/sys/geom/shsec/g_shsec.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/shsec/g_shsec.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -673,7 +673,8 @@ g_shsec_taste(struct g_class *mp, struct
 	if (md.md_version < 1)
 		md.md_provsize = pp->mediasize;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/stripe/g_stripe.c
==============================================================================
--- head/sys/geom/stripe/g_stripe.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/stripe/g_stripe.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -952,7 +952,8 @@ g_stripe_taste(struct g_class *mp, struc
 	if (md.md_version < 3)
 		md.md_provsize = pp->mediasize;
 
-	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
+	if (md.md_provider[0] != '\0' &&
+	    !g_compare_names(md.md_provider, pp->name))
 		return (NULL);
 	if (md.md_provsize != pp->mediasize)
 		return (NULL);

Modified: head/sys/geom/virstor/g_virstor.c
==============================================================================
--- head/sys/geom/virstor/g_virstor.c	Tue Apr 26 23:00:32 2011	(r221100)
+++ head/sys/geom/virstor/g_virstor.c	Wed Apr 27 00:10:26 2011	(r221101)
@@ -809,10 +809,9 @@ g_virstor_taste(struct g_class *mp, stru
 	/* If the provider name is hardcoded, use the offered provider only
 	 * if it's been offered with its proper name (the one used in
 	 * the label command). */
-	if (md.provider[0] != '\0') {
-		if (strcmp(md.provider, pp->name) != 0)
-			return (NULL);
-	}
+	if (md.provider[0] != '\0' &&
+	    !g_compare_names(md.provider, pp->name))
+		return (NULL);
 
 	/* Iterate all geoms this class already knows about to see if a new
 	 * geom instance of this class needs to be created (in case the provider

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 00:32: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 D8BBA106564A;
	Wed, 27 Apr 2011 00:32:35 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C7E938FC16;
	Wed, 27 Apr 2011 00:32: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 p3R0WZdd045606;
	Wed, 27 Apr 2011 00:32:35 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R0WZEF045604;
	Wed, 27 Apr 2011 00:32:35 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201104270032.p3R0WZEF045604@svn.freebsd.org>
From: Jung-uk Kim 
Date: Wed, 27 Apr 2011 00:32: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: r221102 - head/sys/x86/cpufreq
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 00:32:35 -0000

Author: jkim
Date: Wed Apr 27 00:32:35 2011
New Revision: 221102
URL: http://svn.freebsd.org/changeset/base/221102

Log:
  Use ACPI-supplied CPU frequencies instead of estimated ones as we are about
  to use other values from the same table anyway.
  
  MFC after:	3 days

Modified:
  head/sys/x86/cpufreq/powernow.c

Modified: head/sys/x86/cpufreq/powernow.c
==============================================================================
--- head/sys/x86/cpufreq/powernow.c	Wed Apr 27 00:10:26 2011	(r221101)
+++ head/sys/x86/cpufreq/powernow.c	Wed Apr 27 00:32:35 2011	(r221102)
@@ -801,15 +801,13 @@ pn_decode_acpi(device_t dev, device_t pe
 			if ((sc->errata & A0_ERRATA) &&
 			    (pn7_fid_to_mult[state.fid] % 10) == 5)
 				continue;
-			state.freq = 100 * pn7_fid_to_mult[state.fid] * sc->fsb;
 			break;
 		case PN8_TYPE:
 			state.fid = ACPI_PN8_CTRL_TO_FID(ctrl);
 			state.vid = ACPI_PN8_CTRL_TO_VID(ctrl);
-			state.freq = 100 * pn8_fid_to_mult[state.fid] * sc->fsb;
 			break;
 		}
-
+		state.freq = sets[i].freq * 1000;
 		state.power = sets[i].power;
 
 		j = n;
@@ -841,6 +839,7 @@ pn_decode_acpi(device_t dev, device_t pe
 			device_printf(dev, "ACPI MAX frequency not found\n");
 			return (EINVAL);
 		}
+		sc->fsb = state.freq / 100 / pn7_fid_to_mult[state.fid];
 		break;
 	case PN8_TYPE:
 		sc->vst = ACPI_PN8_CTRL_TO_VST(ctrl),
@@ -856,6 +855,7 @@ pn_decode_acpi(device_t dev, device_t pe
 		if (sc->powernow_max_states >= 2 &&
 		    (sc->powernow_states[sc->powernow_max_states - 2].fid < 8))
 			return (EINVAL);
+		sc->fsb = state.freq / 100 / pn8_fid_to_mult[state.fid];
 		break;
 	}
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 01: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 E4836106564A;
	Wed, 27 Apr 2011 01:10:15 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D32178FC0C;
	Wed, 27 Apr 2011 01: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 p3R1AF23046803;
	Wed, 27 Apr 2011 01:10:15 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R1AFMG046800;
	Wed, 27 Apr 2011 01:10:15 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104270110.p3R1AFMG046800@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 01: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: r221103 - head/share/man/man9
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 01:10:16 -0000

Author: des
Date: Wed Apr 27 01:10:15 2011
New Revision: 221103
URL: http://svn.freebsd.org/changeset/base/221103

Log:
  Rename alloc_unr(9) to unr(9) and adjust the links accordingly.
  
  MFC after:	3 weeks

Added:
  head/share/man/man9/unr.9
     - copied, changed from r210235, head/share/man/man9/alloc_unr.9
Deleted:
  head/share/man/man9/alloc_unr.9
Modified:
  head/share/man/man9/Makefile

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Wed Apr 27 00:32:35 2011	(r221102)
+++ head/share/man/man9/Makefile	Wed Apr 27 01:10:15 2011	(r221103)
@@ -5,7 +5,6 @@ MAN=	accept_filter.9 \
 	accf_dns.9 \
 	accf_http.9 \
 	acl.9 \
-	alloc_unr.9 \
 	alq.9 \
 	altq.9 \
 	atomic.9 \
@@ -257,6 +256,7 @@ MAN=	accept_filter.9 \
 	ucred.9 \
 	uidinfo.9 \
 	uio.9 \
+	unr.9 \
 	usbdi.9 \
 	utopia.9 \
 	vaccess.9 \
@@ -377,11 +377,12 @@ MAN=	accept_filter.9 \
 	zero_copy.9 \
 	zone.9
 
-MLINKS=	alloc_unr.9 alloc_unrl.9 \
-	alloc_unr.9 alloc_unr_specific.9 \
-	alloc_unr.9 delete_unrhdr.9 \
-	alloc_unr.9 free_unr.9 \
-	alloc_unr.9 new_unrhdr.9
+MLINKS=	unr.9 alloc_unr.9 \
+	unr.9 alloc_unrl.9 \
+	unr.9 alloc_unr_specific.9 \
+	unr.9 delete_unrhdr.9 \
+	unr.9 free_unr.9 \
+	unr.9 new_unrhdr.9
 MLINKS+=alq.9 ALQ.9 \
 	alq.9 alq_close.9 \
 	alq.9 alq_flush.9 \

Copied and modified: head/share/man/man9/unr.9 (from r210235, head/share/man/man9/alloc_unr.9)
==============================================================================
--- head/share/man/man9/alloc_unr.9	Mon Jul 19 12:52:19 2010	(r210235, copy source)
+++ head/share/man/man9/unr.9	Wed Apr 27 01:10:15 2011	(r221103)
@@ -25,7 +25,7 @@
 .\" $FreeBSD$
 .\"
 .Dd July 5, 2010
-.Dt ALLOC_UNR 9
+.Dt UNR 9
 .Os
 .Sh NAME
 .Nm new_unrhdr ,

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 01:33:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD0671065672;
	Wed, 27 Apr 2011 01:33:12 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 8040D8FC08;
	Wed, 27 Apr 2011 01:33:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3R1XCuk047583;
	Wed, 27 Apr 2011 01:33:12 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R1XCWP047580;
	Wed, 27 Apr 2011 01:33:12 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104270133.p3R1XCWP047580@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 01:33:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221104 - stable/8/sys/rpc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 01:33:12 -0000

Author: rmacklem
Date: Wed Apr 27 01:33:12 2011
New Revision: 221104
URL: http://svn.freebsd.org/changeset/base/221104

Log:
  MFC: r220585
  Fix a couple of mbuf leaks introduced by r217242. I do
  not believe that these leaks had a practical impact,
  since the situations in which they would have occurred
  would have been extremely rare.

Modified:
  stable/8/sys/rpc/clnt_dg.c
  stable/8/sys/rpc/clnt_vc.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/rpc/clnt_dg.c
==============================================================================
--- stable/8/sys/rpc/clnt_dg.c	Wed Apr 27 01:10:15 2011	(r221103)
+++ stable/8/sys/rpc/clnt_dg.c	Wed Apr 27 01:33:12 2011	(r221104)
@@ -1086,11 +1086,13 @@ clnt_dg_soupcall(struct socket *so, void
 		/*
 		 * The XID is in the first uint32_t of the reply.
 		 */
-		if (m->m_len < sizeof(xid) && m_length(m, NULL) < sizeof(xid))
+		if (m->m_len < sizeof(xid) && m_length(m, NULL) < sizeof(xid)) {
 			/*
 			 * Should never happen.
 			 */
+			m_freem(m);
 			continue;
+		}
 
 		m_copydata(m, 0, sizeof(xid), (char *)&xid);
 		xid = ntohl(xid);

Modified: stable/8/sys/rpc/clnt_vc.c
==============================================================================
--- stable/8/sys/rpc/clnt_vc.c	Wed Apr 27 01:10:15 2011	(r221103)
+++ stable/8/sys/rpc/clnt_vc.c	Wed Apr 27 01:33:12 2011	(r221104)
@@ -973,8 +973,11 @@ clnt_vc_soupcall(struct socket *so, void
 				 * the reply.
 				 */
 				if (ct->ct_record->m_len < sizeof(xid) &&
-				    m_length(ct->ct_record, NULL) < sizeof(xid))
+				    m_length(ct->ct_record, NULL) <
+				    sizeof(xid)) {
+					m_freem(ct->ct_record);
 					break;
+				}
 				m_copydata(ct->ct_record, 0, sizeof(xid),
 				    (char *)&xid);
 				xid = ntohl(xid);

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 01:45: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 EB01B106564A;
	Wed, 27 Apr 2011 01:45:05 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B94308FC20;
	Wed, 27 Apr 2011 01:45: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 p3R1j5LA048005;
	Wed, 27 Apr 2011 01:45:05 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R1j5c7048004;
	Wed, 27 Apr 2011 01:45:05 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104270145.p3R1j5c7048004@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 01:45:05 +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: r221105 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 01:45:06 -0000

Author: rmacklem
Date: Wed Apr 27 01:45:05 2011
New Revision: 221105
URL: http://svn.freebsd.org/changeset/base/221105

Log:
  MFC: r220610
  Fix the experimental NFSv4 client so that it recognizes server
  mount point crossings correctly. It was testing the wrong flag.
  Also, try harder to make sure that the fsid is different than
  the one assigned to the client mount point, by hashing the
  server's fsid (just to create a different value deterministically)
  when it is the same.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clport.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/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Wed Apr 27 01:33:12 2011	(r221104)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Wed Apr 27 01:45:05 2011	(r221105)
@@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
  * generally, I don't like #includes inside .h files, but it seems to
  * be the easiest way to handle the port.
  */
+#include 
 #include 
 #include 
 #include 
@@ -377,12 +378,23 @@ nfscl_loadattrcache(struct vnode **vpp, 
 	 * be the same as a local fs, but since this is in an NFS mount
 	 * point, I don't think that will cause any problems?
 	 */
-	if ((nmp->nm_flag & (NFSMNT_NFSV4 | NFSMNT_HASSETFSID)) ==
-	    (NFSMNT_NFSV4 | NFSMNT_HASSETFSID) &&
+	if (NFSHASNFSV4(nmp) && NFSHASHASSETFSID(nmp) &&
 	    (nmp->nm_fsid[0] != np->n_vattr.na_filesid[0] ||
-	     nmp->nm_fsid[1] != np->n_vattr.na_filesid[1]))
-		vap->va_fsid = np->n_vattr.na_filesid[0];
-	else
+	     nmp->nm_fsid[1] != np->n_vattr.na_filesid[1])) {
+		/*
+		 * va_fsid needs to be set to some value derived from
+		 * np->n_vattr.na_filesid that is not equal
+		 * vp->v_mount->mnt_stat.f_fsid[0], so that it changes
+		 * from the value used for the top level server volume
+		 * in the mounted subtree.
+		 */
+		if (vp->v_mount->mnt_stat.f_fsid.val[0] !=
+		    (uint32_t)np->n_vattr.na_filesid[0])
+			vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0];
+		else
+			vap->va_fsid = (uint32_t)hash32_buf(
+			    np->n_vattr.na_filesid, 2 * sizeof(uint64_t), 0);
+	} else
 		vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0];
 	np->n_attrstamp = time_second;
 	if (vap->va_size != np->n_size) {

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 02:32: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 B644D106566C;
	Wed, 27 Apr 2011 02:32:41 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A488E8FC08;
	Wed, 27 Apr 2011 02:32: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 p3R2Wfvo049709;
	Wed, 27 Apr 2011 02:32:41 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R2Wfof049707;
	Wed, 27 Apr 2011 02:32:41 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104270232.p3R2Wfof049707@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 02:32: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: r221107 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 02:32:41 -0000

Author: des
Date: Wed Apr 27 02:32:41 2011
New Revision: 221107
URL: http://svn.freebsd.org/changeset/base/221107

Log:
  Alphabetize the options.  No date bump since no actual change to the text.
  
  MFC after:	3 weeks

Modified:
  head/sbin/fsck_ffs/fsck_ffs.8

Modified: head/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- head/sbin/fsck_ffs/fsck_ffs.8	Wed Apr 27 02:12:01 2011	(r221106)
+++ head/sbin/fsck_ffs/fsck_ffs.8	Wed Apr 27 02:32:41 2011	(r221107)
@@ -139,6 +139,10 @@ action.
 The following flags are interpreted by
 .Nm :
 .Bl -tag -width indent
+.It Fl B
+A check is done on the specified and possibly active file system.
+The set of corrections that can be done is limited to those done
+when running in preen mode (see the
 .It Fl F
 Determine whether the file system needs to be cleaned immediately
 in foreground, or if its cleaning can be deferred to background.
@@ -160,10 +164,6 @@ The only thing that
 .Nm
 does is to determine whether a foreground or background
 check is needed and exit with an appropriate status code.
-.It Fl B
-A check is done on the specified and possibly active file system.
-The set of corrections that can be done is limited to those done
-when running in preen mode (see the
 .Fl p
 flag).
 If unexpected errors are found,

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 02:35: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 83918106567A;
	Wed, 27 Apr 2011 02:35:57 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 720EB8FC19;
	Wed, 27 Apr 2011 02:35: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 p3R2ZvLL049858;
	Wed, 27 Apr 2011 02:35:57 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R2Zvev049856;
	Wed, 27 Apr 2011 02:35:57 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104270235.p3R2Zvev049856@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 02:35: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: r221108 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 02:35:57 -0000

Author: des
Date: Wed Apr 27 02:35:57 2011
New Revision: 221108
URL: http://svn.freebsd.org/changeset/base/221108

Log:
  Fix boo-boo in previous commit.
  
  MFC after:	3 weeks

Modified:
  head/sbin/fsck_ffs/fsck_ffs.8

Modified: head/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- head/sbin/fsck_ffs/fsck_ffs.8	Wed Apr 27 02:32:41 2011	(r221107)
+++ head/sbin/fsck_ffs/fsck_ffs.8	Wed Apr 27 02:35:57 2011	(r221108)
@@ -38,7 +38,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl BFprfny
+.Op Fl BFfnpry
 .Op Fl b Ar block
 .Op Fl c Ar level
 .Op Fl m Ar mode
@@ -143,6 +143,12 @@ The following flags are interpreted by
 A check is done on the specified and possibly active file system.
 The set of corrections that can be done is limited to those done
 when running in preen mode (see the
+.Fl p
+flag).
+If unexpected errors are found,
+the file system is marked as needing a foreground check and
+.Nm
+exits without attempting any further cleaning.
 .It Fl F
 Determine whether the file system needs to be cleaned immediately
 in foreground, or if its cleaning can be deferred to background.
@@ -164,12 +170,6 @@ The only thing that
 .Nm
 does is to determine whether a foreground or background
 check is needed and exit with an appropriate status code.
-.Fl p
-flag).
-If unexpected errors are found,
-the file system is marked as needing a foreground check and
-.Nm
-exits without attempting any further cleaning.
 .It Fl b
 Use the block specified immediately after the flag as
 the super block for the file system.

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 02:55: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 82AD0106564A;
	Wed, 27 Apr 2011 02:55:03 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6977A8FC16;
	Wed, 27 Apr 2011 02:55: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 p3R2t3tE050520;
	Wed, 27 Apr 2011 02:55:03 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R2t3Pt050514;
	Wed, 27 Apr 2011 02:55:03 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104270255.p3R2t3Pt050514@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 02:55: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: r221110 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 02:55:03 -0000

Author: des
Date: Wed Apr 27 02:55:03 2011
New Revision: 221110
URL: http://svn.freebsd.org/changeset/base/221110

Log:
  Mechanical whitespace cleanup.
  
  MFC after:	3 weeks

Modified:
  head/sbin/fsck_ffs/ea.c
  head/sbin/fsck_ffs/inode.c
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/pass2.c
  head/sbin/fsck_ffs/suj.c
  head/sbin/fsck_ffs/utilities.c

Modified: head/sbin/fsck_ffs/ea.c
==============================================================================
--- head/sbin/fsck_ffs/ea.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/ea.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -83,4 +83,3 @@ eascan(struct inodesc *idesc, struct ufs
 	return (STOP);
 #endif
 }
-

Modified: head/sbin/fsck_ffs/inode.c
==============================================================================
--- head/sbin/fsck_ffs/inode.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/inode.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -91,18 +91,18 @@ ckinode(union dinode *dp, struct inodesc
 				/* An empty block in a directory XXX */
 				getpathname(pathbuf, idesc->id_number,
 						idesc->id_number);
-                        	pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
+				pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
 					pathbuf);
-                        	if (reply("ADJUST LENGTH") == 1) {
+				if (reply("ADJUST LENGTH") == 1) {
 					dp = ginode(idesc->id_number);
-                                	DIP_SET(dp, di_size,
+					DIP_SET(dp, di_size,
 					    i * sblock.fs_bsize);
 					printf(
 					    "YOU MUST RERUN FSCK AFTERWARDS\n");
 					rerun = 1;
-                                	inodirty();
-					
-                        	}
+					inodirty();
+
+				}
 			}
 			continue;
 		}
@@ -130,19 +130,19 @@ ckinode(union dinode *dp, struct inodesc
 				/* An empty block in a directory XXX */
 				getpathname(pathbuf, idesc->id_number,
 						idesc->id_number);
-                        	pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
+				pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
 					pathbuf);
-                        	if (reply("ADJUST LENGTH") == 1) {
+				if (reply("ADJUST LENGTH") == 1) {
 					dp = ginode(idesc->id_number);
-                                	DIP_SET(dp, di_size,
+					DIP_SET(dp, di_size,
 					    DIP(dp, di_size) - remsize);
 					remsize = 0;
 					printf(
 					    "YOU MUST RERUN FSCK AFTERWARDS\n");
 					rerun = 1;
-                                	inodirty();
+					inodirty();
 					break;
-                        	}
+				}
 			}
 		}
 		remsize -= sizepb;
@@ -209,20 +209,20 @@ iblock(struct inodesc *idesc, long ileve
 				/* An empty block in a directory XXX */
 				getpathname(pathbuf, idesc->id_number,
 						idesc->id_number);
-                        	pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
+				pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS",
 					pathbuf);
-                        	if (reply("ADJUST LENGTH") == 1) {
+				if (reply("ADJUST LENGTH") == 1) {
 					dp = ginode(idesc->id_number);
-                                	DIP_SET(dp, di_size,
+					DIP_SET(dp, di_size,
 					    DIP(dp, di_size) - isize);
 					isize = 0;
 					printf(
 					    "YOU MUST RERUN FSCK AFTERWARDS\n");
 					rerun = 1;
-                                	inodirty();
+					inodirty();
 					bp->b_flags &= ~B_INUSE;
 					return(STOP);
-                        	}
+				}
 			}
 		}
 		isize -= sizepb;

Modified: head/sbin/fsck_ffs/main.c
==============================================================================
--- head/sbin/fsck_ffs/main.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/main.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -407,7 +407,7 @@ checkfilesys(char *filesys)
 		sblock.fs_mtime = time(NULL);
 		sbdirty();
 	}
-	
+
 	/*
 	 * Cleared if any questions answered no. Used to decide if
 	 * the superblock should be marked clean.
@@ -576,7 +576,7 @@ chkdoreload(struct statfs *mntp)
 		/*
 		 * XX: We need the following line until we clean up
 		 * nmount parsing of root mounts and NFS root mounts.
-		 */ 
+		 */
 		build_iovec(&iov, &iovlen, "ro", NULL, 0);
 		if (nmount(iov, iovlen, mntp->f_flags) == 0) {
 			return (0);
@@ -631,9 +631,9 @@ getmntpt(const char *name)
 static void
 usage(void)
 {
-        (void) fprintf(stderr,
-            "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] "
-                        "filesystem ...\n",
-            getprogname());
-        exit(1);
+	(void) fprintf(stderr,
+	    "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] "
+			"filesystem ...\n",
+	    getprogname());
+	exit(1);
 }

Modified: head/sbin/fsck_ffs/pass2.c
==============================================================================
--- head/sbin/fsck_ffs/pass2.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/pass2.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -524,7 +524,7 @@ fix_extraneous(struct inoinfo *inp, stru
 	struct inodesc dotdesc;
 	char oldname[MAXPATHLEN + 1];
 	char newname[MAXPATHLEN + 1];
-	
+
 	/*
 	 * If we have not yet found "..", look it up now so we know
 	 * which inode the directory itself believes is its parent.

Modified: head/sbin/fsck_ffs/suj.c
==============================================================================
--- head/sbin/fsck_ffs/suj.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/suj.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -522,7 +522,7 @@ blk_setmask(struct jblkrec *brec, int *m
  * Determine whether a given block has been reallocated to a new location.
  * Returns a mask of overlapping bits if any frags have been reused or
  * zero if the block has not been re-used and the contents can be trusted.
- * 
+ *
  * This is used to ensure that an orphaned pointer due to truncate is safe
  * to be freed.  The mask value can be used to free partial blocks.
  */
@@ -554,7 +554,7 @@ blk_freemask(ufs2_daddr_t blk, ino_t ino
 		 * exactly it's a new allocation.  If it matches
 		 * exactly this record refers to the current
 		 * location.
-		 */ 
+		 */
 		if (blk_overlaps(brec, blk, frags) == 0)
 			continue;
 		if (blk_equals(brec, ino, lbn, blk, frags) == 1)
@@ -576,7 +576,7 @@ blk_freemask(ufs2_daddr_t blk, ino_t ino
  * It is also not safe to follow an indirect if the cg bitmap has been
  * cleared as a new allocation may write to the block prior to the journal
  * being written.
- * 
+ *
  * Returns 1 if it's safe to follow the indirect and 0 otherwise.
  */
 static int
@@ -718,7 +718,7 @@ indir_blkatoff(ufs2_daddr_t blk, ino_t i
 	base = -(cur + level);
 	for (i = level; i > 0; i--)
 		lbnadd *= NINDIR(fs);
-	if (lbn > 0) 
+	if (lbn > 0)
 		i = (lbn - base) / lbnadd;
 	else
 		i = (-lbn - base) / lbnadd;
@@ -1572,7 +1572,7 @@ ino_trunc(ino_t ino, off_t size)
 	 * last populated lbn is.  We will set the size to this last lbn
 	 * rather than worrying about allocating the final lbn as the kernel
 	 * would've done.  This is consistent with normal fsck behavior.
-	 */ 
+	 */
 	visitlbn = 0;
 	totalfrags = ino_visit(ip, ino, null_visit, VISIT_INDIR | VISIT_EXT);
 	if (size > lblktosize(fs, visitlbn + 1))
@@ -1650,7 +1650,7 @@ ino_check(struct suj_ino *sino)
 	removes = sino->si_nlinkadj;
 	TAILQ_FOREACH(srec, &sino->si_recs, sr_next) {
 		rrec = (struct jrefrec *)srec->sr_rec;
-		isat = ino_isat(rrec->jr_parent, rrec->jr_diroff, 
+		isat = ino_isat(rrec->jr_parent, rrec->jr_diroff,
 		    rrec->jr_ino, &mode, &isdot);
 		if (isat && (mode & IFMT) != (rrec->jr_mode & IFMT))
 			err_suj("Inode mode/directory type mismatch %o != %o\n",
@@ -1952,13 +1952,13 @@ ino_append(union jrec *rec)
 	mvrec = &rec->rec_jmvrec;
 	refrec = &rec->rec_jrefrec;
 	if (debug && mvrec->jm_op == JOP_MVREF)
-		printf("ino move: ino %d, parent %d, diroff %jd, oldoff %jd\n", 
+		printf("ino move: ino %d, parent %d, diroff %jd, oldoff %jd\n",
 		    mvrec->jm_ino, mvrec->jm_parent, mvrec->jm_newoff,
 		    mvrec->jm_oldoff);
 	else if (debug &&
 	    (refrec->jr_op == JOP_ADDREF || refrec->jr_op == JOP_REMREF))
 		printf("ino ref: op %d, ino %d, nlink %d, "
-		    "parent %d, diroff %jd\n", 
+		    "parent %d, diroff %jd\n",
 		    refrec->jr_op, refrec->jr_ino, refrec->jr_nlink,
 		    refrec->jr_parent, refrec->jr_diroff);
 	/*
@@ -2330,7 +2330,7 @@ suj_prune(void)
 		TAILQ_REMOVE(&allsegs, seg, ss_next);
 		TAILQ_INSERT_HEAD(&allsegs, seg, ss_next);
 		newseq = seg->ss_rec.jsr_seq;
-		
+
 	}
 	if (newseq != oldseq) {
 		err_suj("Journal file sequence mismatch %jd != %jd\n",
@@ -2609,7 +2609,7 @@ restart:
 				recn = (void *)((uintptr_t)rec) + i *
 				    real_dev_bsize;
 				if (recn->jsr_seq == rec->jsr_seq &&
-				    recn->jsr_time == rec->jsr_time) 
+				    recn->jsr_time == rec->jsr_time)
 					continue;
 				if (debug)
 					printf("Incomplete record %jd (%d)\n",

Modified: head/sbin/fsck_ffs/utilities.c
==============================================================================
--- head/sbin/fsck_ffs/utilities.c	Wed Apr 27 02:41:26 2011	(r221109)
+++ head/sbin/fsck_ffs/utilities.c	Wed Apr 27 02:55:03 2011	(r221110)
@@ -86,7 +86,7 @@ retry:
 	case S_IFDIR:
 		if (retried)
 			break;
-		
+
 		len = strlen(origname) - 1;
 		if (len > 0 && origname[len] == '/')
 			/* remove trailing slash */

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 03:00: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 5E6C21065673;
	Wed, 27 Apr 2011 03:00:27 +0000 (UTC)
	(envelope-from nwhitehorn@freebsd.org)
Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B8008FC15;
	Wed, 27 Apr 2011 03:00:21 +0000 (UTC)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mail.icecube.wisc.edu (Postfix) with ESMTP id 26EF058134;
	Tue, 26 Apr 2011 22:00:21 -0500 (CDT)
X-Virus-Scanned: amavisd-new at icecube.wisc.edu
Received: from mail.icecube.wisc.edu ([127.0.0.1])
	by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new,
	port 10030)
	with ESMTP id oh9+6SRQviPB; Tue, 26 Apr 2011 22:00:21 -0500 (CDT)
Received: from wanderer.tachypleus.net (unknown [76.210.65.155])
	by mail.icecube.wisc.edu (Postfix) with ESMTP id 3F3D65811E;
	Tue, 26 Apr 2011 22:00:20 -0500 (CDT)
Message-ID: <4DB786C3.3010607@freebsd.org>
Date: Tue, 26 Apr 2011 22:00:19 -0500
From: Nathan Whitehorn 
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US;
	rv:1.9.2.15) Gecko/20110317 Thunderbird/3.1.9
MIME-Version: 1.0
To: Daniel O'Connor 
References: <201104240923.p3O9N8QG025386@svn.freebsd.org>
	<20110424161933.GA18775@vniz.net>
	<18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au>
	
	<34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au>
	
	<15C958E3-6CF7-48C4-88C9-2E61AC301657@gsoft.com.au>
In-Reply-To: <15C958E3-6CF7-48C4-88C9-2E61AC301657@gsoft.com.au>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: src-committers@FreeBSD.org, Andrey Chernov ,
	Alexander Motin , svn-src-head@FreeBSD.org,
	svn-src-all@FreeBSD.org, Warner Losh 
Subject: Re: svn commit: r220983 - 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, 27 Apr 2011 03:00:27 -0000

On 04/26/11 18:48, Daniel O'Connor wrote:
>
> On 26/04/2011, at 1:31, Warner Losh wrote:
>>> This is why I prefer IDs since they are nominally unique (UFS
>>> ones, GPTs damn well better be :)
>>>
>>> Although I concede it is rather annoying to work out which is
>>> which, or type them out manually..
>>
>> For things like ZFS, UUIDs aren't so bad because it hides them.
>
> Yes, I use GPT with ZFS, it's good :)
>
>> For things like /etc/fstab, I prefer the named approach.  This
>> allows me to survive a newfs on a partition if I have to without
>> having to hack my /etc/fstab.  I have a large /tmp partition at
>> times, and it gets newfs'd if there's a bad problem...
>
> Yeah, but.. IMHO if the installer supports it then it is dramatically
> less painful..
>
> I haven't looked to see how hard it is to add, hopefully I will get
> some time to look RSN and it shouldn't be too difficult.

It's not difficult to add -- the issue is that the mechanism is 
unreliable. It doesn't work for all partition types supporting labels, 
it's hard to figure out what the name of the label provider is in a 
generic way, and the label providers have a nasty habit of disappearing 
periodically when you use the underlying provider for anything. Also, 
retastes don't always work. For example, if I change the label of a GPT 
partition, the label provider does not reflect the change until a disk 
reattach (e.g. a reboot).

If it's a feature that we enable by default, and that the installer 
relies upon, it has to work better than that.
-Nathan

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 03:16: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 9A2091065670;
	Wed, 27 Apr 2011 03:16:01 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7E3A68FC0A;
	Wed, 27 Apr 2011 03:16: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 p3R3G10D051505;
	Wed, 27 Apr 2011 03:16:01 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R3G1ii051503;
	Wed, 27 Apr 2011 03:16:01 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104270316.p3R3G1ii051503@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 03:16:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221111 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 03:16:01 -0000

Author: rmacklem
Date: Wed Apr 27 03:16:01 2011
New Revision: 221111
URL: http://svn.freebsd.org/changeset/base/221111

Log:
  MFC: r220611
  Add VOP_PATHCONF() support to the experimental NFS client
  so that it can, along with other things, report whether or
  not NFS4 ACLs are supported.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Wed Apr 27 02:55:03 2011	(r221110)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Wed Apr 27 03:16:01 2011	(r221111)
@@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$");
 #define	FALSE	0
 
 extern struct nfsstats newnfsstats;
+extern int nfsrv_useacl;
 MALLOC_DECLARE(M_NEWNFSREQ);
 
 /*
@@ -103,6 +104,7 @@ static vop_lookup_t	nfs_lookup;
 static vop_create_t	nfs_create;
 static vop_mknod_t	nfs_mknod;
 static vop_open_t	nfs_open;
+static vop_pathconf_t	nfs_pathconf;
 static vop_close_t	nfs_close;
 static vop_access_t	nfs_access;
 static vop_getattr_t	nfs_getattr;
@@ -153,6 +155,7 @@ struct vop_vector newnfs_vnodeops = {
 	.vop_mkdir =		nfs_mkdir,
 	.vop_mknod =		nfs_mknod,
 	.vop_open =		nfs_open,
+	.vop_pathconf =		nfs_pathconf,
 	.vop_print =		nfs_print,
 	.vop_read =		nfs_read,
 	.vop_readdir =		nfs_readdir,
@@ -3247,3 +3250,115 @@ nfs_setacl(struct vop_setacl_args *ap)
 }
 
 #endif	/* NFS4_ACL_EXTATTR_NAME */
+
+/*
+ * Return POSIX pathconf information applicable to nfs filesystems.
+ */
+static int
+nfs_pathconf(struct vop_pathconf_args *ap)
+{
+	struct nfsv3_pathconf pc;
+	struct nfsvattr nfsva;
+	struct vnode *vp = ap->a_vp;
+	struct thread *td = curthread;
+	int attrflag, error;
+
+	if (NFS_ISV34(vp)) {
+		error = nfsrpc_pathconf(vp, &pc, td->td_ucred, td, &nfsva,
+		    &attrflag, NULL);
+		if (attrflag != 0)
+			(void) nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 0,
+			    1);
+		if (error != 0)
+			return (error);
+	} else {
+		/* For NFSv2, just fake them. */
+		pc.pc_linkmax = LINK_MAX;
+		pc.pc_namemax = NFS_MAXNAMLEN;
+		pc.pc_notrunc = 1;
+		pc.pc_chownrestricted = 1;
+		pc.pc_caseinsensitive = 0;
+		pc.pc_casepreserving = 1;
+		error = 0;
+	}
+	switch (ap->a_name) {
+	case _PC_LINK_MAX:
+		*ap->a_retval = pc.pc_linkmax;
+		break;
+	case _PC_NAME_MAX:
+		*ap->a_retval = pc.pc_namemax;
+		break;
+	case _PC_PATH_MAX:
+		*ap->a_retval = PATH_MAX;
+		break;
+	case _PC_PIPE_BUF:
+		*ap->a_retval = PIPE_BUF;
+		break;
+	case _PC_CHOWN_RESTRICTED:
+		*ap->a_retval = pc.pc_chownrestricted;
+		break;
+	case _PC_NO_TRUNC:
+		*ap->a_retval = pc.pc_notrunc;
+		break;
+	case _PC_ACL_EXTENDED:
+		*ap->a_retval = 0;
+		break;
+	case _PC_ACL_NFS4:
+		if (NFS_ISV4(vp) && nfsrv_useacl != 0 && attrflag != 0 &&
+		    NFSISSET_ATTRBIT(&nfsva.na_suppattr, NFSATTRBIT_ACL))
+			*ap->a_retval = 1;
+		else
+			*ap->a_retval = 0;
+		break;
+	case _PC_ACL_PATH_MAX:
+		if (NFS_ISV4(vp))
+			*ap->a_retval = ACL_MAX_ENTRIES;
+		else
+			*ap->a_retval = 3;
+		break;
+	case _PC_MAC_PRESENT:
+		*ap->a_retval = 0;
+		break;
+	case _PC_ASYNC_IO:
+		/* _PC_ASYNC_IO should have been handled by upper layers. */
+		KASSERT(0, ("_PC_ASYNC_IO should not get here"));
+		error = EINVAL;
+		break;
+	case _PC_PRIO_IO:
+		*ap->a_retval = 0;
+		break;
+	case _PC_SYNC_IO:
+		*ap->a_retval = 0;
+		break;
+	case _PC_ALLOC_SIZE_MIN:
+		*ap->a_retval = vp->v_mount->mnt_stat.f_bsize;
+		break;
+	case _PC_FILESIZEBITS:
+		if (NFS_ISV34(vp))
+			*ap->a_retval = 64;
+		else
+			*ap->a_retval = 32;
+		break;
+	case _PC_REC_INCR_XFER_SIZE:
+		*ap->a_retval = vp->v_mount->mnt_stat.f_iosize;
+		break;
+	case _PC_REC_MAX_XFER_SIZE:
+		*ap->a_retval = -1; /* means ``unlimited'' */
+		break;
+	case _PC_REC_MIN_XFER_SIZE:
+		*ap->a_retval = vp->v_mount->mnt_stat.f_iosize;
+		break;
+	case _PC_REC_XFER_ALIGN:
+		*ap->a_retval = PAGE_SIZE;
+		break;
+	case _PC_SYMLINK_MAX:
+		*ap->a_retval = NFS_MAXPATHLEN;
+		break;
+
+	default:
+		error = EINVAL;
+		break;
+	}
+	return (error);
+}
+

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 03:21: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 69DD61065672;
	Wed, 27 Apr 2011 03:21:53 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 267E68FC0A;
	Wed, 27 Apr 2011 03:21:53 +0000 (UTC)
Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63])
	(authenticated bits=0)
	by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3R3H4j2041320
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO);
	Tue, 26 Apr 2011 21:17:37 -0600 (MDT) (envelope-from imp@bsdimp.com)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Warner Losh 
In-Reply-To: <201104262202.p3QM2p0K040439@svn.freebsd.org>
Date: Tue, 26 Apr 2011 21:17:37 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <36B3B1AD-2BAE-4325-9186-E388478313E8@bsdimp.com>
References: <201104262202.p3QM2p0K040439@svn.freebsd.org>
To: Doug Barton 
X-Mailer: Apple Mail (2.1084)
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(harmony.bsdimp.com [10.0.0.6]);
	Tue, 26 Apr 2011 21:17:37 -0600 (MDT)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r221088 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 03:21:53 -0000

Actually, it looks like jhb fixed things so this isn't necessary.

Warner

On Apr 26, 2011, at 4:02 PM, Doug Barton wrote:

> Author: dougb
> Date: Tue Apr 26 22:02:51 2011
> New Revision: 221088
> URL: http://svn.freebsd.org/changeset/base/221088
>=20
> Log:
>  Revert r221053 by replacing WARNS?=3D 3 since it's breaking the build =
on
>  several arches.
>=20
> Modified:
>  head/usr.bin/rlogin/Makefile
>=20
> Modified: head/usr.bin/rlogin/Makefile
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=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/usr.bin/rlogin/Makefile	Tue Apr 26 21:47:38 2011	=
(r221087)
> +++ head/usr.bin/rlogin/Makefile	Tue Apr 26 22:02:51 2011	=
(r221088)
> @@ -7,4 +7,6 @@ BINOWN=3D	root
> BINMODE=3D4555
> PRECIOUSPROG=3D
>=20
> +WARNS?=3D	3
> +
> .include 
>=20
>=20


From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 03:22: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 5B39B1065700;
	Wed, 27 Apr 2011 03:22:15 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id 16AED8FC14;
	Wed, 27 Apr 2011 03:22:15 +0000 (UTC)
Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63])
	(authenticated bits=0)
	by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3R3JH5Q041329
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO);
	Tue, 26 Apr 2011 21:19:19 -0600 (MDT) (envelope-from imp@bsdimp.com)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Warner Losh 
In-Reply-To: <20110426222641.GA44259@dragon.NUXI.org>
Date: Tue, 26 Apr 2011 21:19:17 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
	<20110426222641.GA44259@dragon.NUXI.org>
To: obrien@FreeBSD.org
X-Mailer: Apple Mail (2.1084)
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(harmony.bsdimp.com [10.0.0.6]);
	Tue, 26 Apr 2011 21:19:19 -0600 (MDT)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, John Baldwin 
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 03:22:15 -0000


On Apr 26, 2011, at 4:26 PM, David O'Brien wrote:

> On Tue, Apr 26, 2011 at 09:32:44AM -0400, John Baldwin wrote:
>> On Tuesday, April 26, 2011 12:09:20 am David E. O'Brien wrote:
>>> Author: obrien
>>> Date: Tue Apr 26 04:09:20 2011
>>> New Revision: 221053
>>> URL: http://svn.freebsd.org/changeset/base/221053
>>>=20
>>> Log:
>>>  This builds OK using the parent dir's WARNS=3D6.
>>>  [built on both AMD64 and i386]
>>=20
>> This breaks the tinderbox on at least arm, ia64, mips, and sparc64.
>=20
> Sigh.  Do we yet have ARM, MIPS, or Sparc64 test machines in
> the cluster?  http://www.freebsd.org/internal/machines.html doesn't =
list
> any, but maybe some have been added?

make universe

And don't give me grief about not being able to test...  You can at =
least compile-test things and to not do so when changing WARNS level has =
caused bugs in about 80% of the cases where people have done it before, =
so there's no excuse.

Warner


From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 03:22: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 578E11065702;
	Wed, 27 Apr 2011 03:22:16 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id E23B18FC17;
	Wed, 27 Apr 2011 03:22:15 +0000 (UTC)
Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63])
	(authenticated bits=0)
	by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3R3H4j1041320
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO);
	Tue, 26 Apr 2011 21:17:06 -0600 (MDT) (envelope-from imp@bsdimp.com)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Warner Losh 
In-Reply-To: <4DB786C3.3010607@freebsd.org>
Date: Tue, 26 Apr 2011 21:17:04 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201104240923.p3O9N8QG025386@svn.freebsd.org>
	<20110424161933.GA18775@vniz.net>
	<18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au>
	
	<34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au>
	
	<15C958E3-6CF7-48C4-88C9-2E61AC301657@gsoft.com.au>
	<4DB786C3.3010607@freebsd.org>
To: Nathan Whitehorn 
X-Mailer: Apple Mail (2.1084)
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(harmony.bsdimp.com [10.0.0.6]);
	Tue, 26 Apr 2011 21:17:06 -0600 (MDT)
Cc: src-committers@FreeBSD.org, Andrey Chernov ,
	Daniel O'Connor ,
	Alexander Motin , svn-src-head@FreeBSD.org,
	svn-src-all@FreeBSD.org
Subject: Re: svn commit: r220983 - 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, 27 Apr 2011 03:22:16 -0000


On Apr 26, 2011, at 9:00 PM, Nathan Whitehorn wrote:

> On 04/26/11 18:48, Daniel O'Connor wrote:
>>=20
>> On 26/04/2011, at 1:31, Warner Losh wrote:
>>>> This is why I prefer IDs since they are nominally unique (UFS
>>>> ones, GPTs damn well better be :)
>>>>=20
>>>> Although I concede it is rather annoying to work out which is
>>>> which, or type them out manually..
>>>=20
>>> For things like ZFS, UUIDs aren't so bad because it hides them.
>>=20
>> Yes, I use GPT with ZFS, it's good :)
>>=20
>>> For things like /etc/fstab, I prefer the named approach.  This
>>> allows me to survive a newfs on a partition if I have to without
>>> having to hack my /etc/fstab.  I have a large /tmp partition at
>>> times, and it gets newfs'd if there's a bad problem...
>>=20
>> Yeah, but.. IMHO if the installer supports it then it is dramatically
>> less painful..
>>=20
>> I haven't looked to see how hard it is to add, hopefully I will get
>> some time to look RSN and it shouldn't be too difficult.
>=20
> It's not difficult to add -- the issue is that the mechanism is =
unreliable. It doesn't work for all partition types supporting labels, =
it's hard to figure out what the name of the label provider is in a =
generic way, and the label providers have a nasty habit of disappearing =
periodically when you use the underlying provider for anything. Also, =
retastes don't always work. For example, if I change the label of a GPT =
partition, the label provider does not reflect the change until a disk =
reattach (e.g. a reboot).

I know that for ufs, it works well, except for the root partition which =
requires some dancing to retrofit.  But if you relabel a partition, it =
shows up right away in /dev/ufs/newlbl.  Guess not all of them are that =
reliable.

The new names, and slightly non-deterministic probe order make it more =
important that we shake out the bugs from this as best we can.  I think =
that names/uuid are critical to the future, and we need to fix any =
remaining issues.

> If it's a feature that we enable by default, and that the installer =
relies upon, it has to work better than that.


Thanks for the report.  Who are you working with to resolve these =
issues?  Some of them surprise me, but you speak of them as if they are =
widely known...  Without owners, these issues will languish.

Warner=

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 04:03: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 9E3241065670;
	Wed, 27 Apr 2011 04:03: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 8CB688FC0A;
	Wed, 27 Apr 2011 04:03: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 p3R434sV052978;
	Wed, 27 Apr 2011 04:03:04 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R4349e052976;
	Wed, 27 Apr 2011 04:03:04 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201104270403.p3R4349e052976@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Wed, 27 Apr 2011 04:03: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: r221112 -
	head/sys/cddl/contrib/opensolaris/common/atomic/ia64
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 04:03:04 -0000

Author: marcel
Date: Wed Apr 27 04:03:04 2011
New Revision: 221112
URL: http://svn.freebsd.org/changeset/base/221112

Log:
  Fix copy-paste bug.

Modified:
  head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S

Modified: head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S
==============================================================================
--- head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S	Wed Apr 27 03:16:01 2011	(r221111)
+++ head/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S	Wed Apr 27 04:03:04 2011	(r221112)
@@ -39,7 +39,7 @@ ENTRY(atomic_cas_32, 3)
 	cmpxchg4.acq    r8 = [r32], r34, ar.ccv
 	;;
 	br.ret.sptk     rp
-END(atomic_cas_64)
+END(atomic_cas_32)
 
 /*
  * uint64_t atomic_cas_64(volatile uint64_t *p, uint64_t cmp, uint64_t v)

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 07:03: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 60A36106566C;
	Wed, 27 Apr 2011 07:03:43 +0000 (UTC)
	(envelope-from pawel@dawidek.net)
Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60])
	by mx1.freebsd.org (Postfix) with ESMTP id B6EDD8FC12;
	Wed, 27 Apr 2011 07:03:42 +0000 (UTC)
Received: by mail.garage.freebsd.pl (Postfix, from userid 65534)
	id 01D1F45CD9; Wed, 27 Apr 2011 09:03:40 +0200 (CEST)
Received: from localhost (58.wheelsystems.com [83.12.187.58])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.garage.freebsd.pl (Postfix) with ESMTP id 166D445C98;
	Wed, 27 Apr 2011 09:03:35 +0200 (CEST)
Date: Wed, 27 Apr 2011 09:03:24 +0200
From: Pawel Jakub Dawidek 
To: Warner Losh 
Message-ID: <20110427070324.GB2185@garage.freebsd.pl>
References: <201104240923.p3O9N8QG025386@svn.freebsd.org>
	<20110424161933.GA18775@vniz.net>
	<18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au>
	
	<34A34338-79E0-435E-9BF1-614D10FC9FC7@gsoft.com.au>
	
	<15C958E3-6CF7-48C4-88C9-2E61AC301657@gsoft.com.au>
	<4DB786C3.3010607@freebsd.org>
	
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO"
Content-Disposition: inline
In-Reply-To: 
X-OS: FreeBSD 9.0-CURRENT amd64
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on 
	mail.garage.freebsd.pl
X-Spam-Level: 
X-Spam-Status: No, score=-3.9 required=4.5 tests=ALL_TRUSTED,BAYES_00,
	RCVD_IN_SORBS_DUL autolearn=ham version=3.0.4
Cc: src-committers@FreeBSD.org, Andrey Chernov ,
	Daniel O'Connor , Alexander Motin ,
	Nathan Whitehorn ,
	svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org
Subject: Re: svn commit: r220983 - 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, 27 Apr 2011 07:03:43 -0000


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

On Tue, Apr 26, 2011 at 09:17:04PM -0600, Warner Losh wrote:
> > It's not difficult to add -- the issue is that the mechanism is unrelia=
ble. It doesn't work for all partition types supporting labels, it's hard t=
o figure out what the name of the label provider is in a generic way, and t=
he label providers have a nasty habit of disappearing periodically when you=
 use the underlying provider for anything. Also, retastes don't always work=
=2E For example, if I change the label of a GPT partition, the label provid=
er does not reflect the change until a disk reattach (e.g. a reboot).
>=20
> I know that for ufs, it works well, except for the root partition which r=
equires some dancing to retrofit.  But if you relabel a partition, it shows=
 up right away in /dev/ufs/newlbl.  Guess not all of them are that reliable.
>=20
> The new names, and slightly non-deterministic probe order make it more im=
portant that we shake out the bugs from this as best we can.  I think that =
names/uuid are critical to the future, and we need to fix any remaining iss=
ues.

Labels are kinda tricky and they differ. For example UFS labels or IDs
don't play with tasting well (they were never designed to play well with
such mechanism). You can create file system that is smaller than
underlying provider (newfs -s). How do we know that label is assigned to
the provider we are tasing and not to some other provider?  Currently we
check that based on recorded file system size and provider size, so we
won't create label/id on ad0s1 instead of ad0s1a, but because of this we
won't create label/id at all if file system was created with the -s
option.

GPT labels and IDs should be implemented as part of GPART class and not
GLABEL. Currently if you modify GPT label for a partition in ad0 there
is no write to, eg. ad0p1, so there is no taste event which allows
glabel to detect the change, so the label is not updated in /dev/gpt/.
There is a patch on freebsd-geom@ to move GPT labels/IDs to GPART.

--=20
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com

--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature

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

iEYEARECAAYFAk23v7sACgkQForvXbEpPzT3tACgzVrAoS/NKzQmeGOOBEPe69M4
N8EAn3v8hznAseuiUjPKBweg6HUi56d5
=RIrJ
-----END PGP SIGNATURE-----

--2oS5YaxWCcQjTEyO--

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 07:25: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 F3C3F106564A;
	Wed, 27 Apr 2011 07:25:06 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
	by mx1.freebsd.org (Postfix) with ESMTP id A50208FC13;
	Wed, 27 Apr 2011 07:25:06 +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 DE86525D3888;
	Wed, 27 Apr 2011 07:25:05 +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 2E845159DD41;
	Wed, 27 Apr 2011 07:25:05 +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 bKTA12IaPuFc; Wed, 27 Apr 2011 07:25:04 +0000 (UTC)
Received: from orange-en1.sbone.de (orange-en1.sbone.de
	[IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPSA id 0D546159DD31;
	Wed, 27 Apr 2011 07:25:03 +0000 (UTC)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: "Bjoern A. Zeeb" 
In-Reply-To: <201104270010.p3R0AQQv044866@svn.freebsd.org>
Date: Wed, 27 Apr 2011 07:25:03 +0000
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201104270010.p3R0AQQv044866@svn.freebsd.org>
To: Alexander Motin 
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: r221101 - in head/sys/geom: . concat journal mirror
	raid3 shsec stripe virstor
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 07:25:07 -0000

On Apr 27, 2011, at 12:10 AM, Alexander Motin wrote:

Hi Alexander,

> Author: mav
> Date: Wed Apr 27 00:10:26 2011
> New Revision: 221101
> URL: http://svn.freebsd.org/changeset/base/221101
>=20
> Log:
>  Implement relaxed comparision for hardcoded provider names to make it
>  ignore adX/adaY difference in both directions to simplify migration =
to
>  the CAM-based ATA or back.


Thanks a lot for this and the earlier changes in such a quick time.  =
Very much appreciated!
I'll try to test them as good as I can over the next weeks and am happy =
this got sorted:)

Bjoern

--=20
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 Apr 27 08:03: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 A562A1065674;
	Wed, 27 Apr 2011 08:03:50 +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 3AE988FC17;
	Wed, 27 Apr 2011 08:03:49 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3R83Pku054668
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 27 Apr 2011 11:03:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	p3R83PPR050615; Wed, 27 Apr 2011 11:03:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3R83PMj050614; 
	Wed, 27 Apr 2011 11:03:25 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Wed, 27 Apr 2011 11:03:25 +0300
From: Kostik Belousov 
To: Alexander Motin 
Message-ID: <20110427080325.GV48734@deviant.kiev.zoral.com.ua>
References: <201104270010.p3R0AQQv044866@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="yOCDj6dCdxu1mn4c"
Content-Disposition: inline
In-Reply-To: <201104270010.p3R0AQQv044866@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.4 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: r221101 - in head/sys/geom: . concat journal mirror
	raid3 shsec stripe virstor
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 08:03:50 -0000


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

On Wed, Apr 27, 2011 at 12:10:26AM +0000, Alexander Motin wrote:
> Author: mav
> Date: Wed Apr 27 00:10:26 2011
> New Revision: 221101
> URL: http://svn.freebsd.org/changeset/base/221101
>=20
> Log:
>   Implement relaxed comparision for hardcoded provider names to make it
>   ignore adX/adaY difference in both directions to simplify migration to
>   the CAM-based ATA or back.
>=20
> Modified:
>   head/sys/geom/concat/g_concat.c
>   head/sys/geom/geom.h
>   head/sys/geom/geom_subr.c
>   head/sys/geom/journal/g_journal.c
>   head/sys/geom/mirror/g_mirror.c
>   head/sys/geom/raid3/g_raid3.c
>   head/sys/geom/shsec/g_shsec.c
>   head/sys/geom/stripe/g_stripe.c
>   head/sys/geom/virstor/g_virstor.c
>=20
> Modified: head/sys/geom/concat/g_concat.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/geom/concat/g_concat.c	Tue Apr 26 23:00:32 2011	(r221100)
> +++ head/sys/geom/concat/g_concat.c	Wed Apr 27 00:10:26 2011	(r221101)
> @@ -678,7 +678,8 @@ g_concat_taste(struct g_class *mp, struc
>  	if (md.md_version < 4)
>  		md.md_provsize =3D pp->mediasize;
> =20
> -	if (md.md_provider[0] !=3D '\0' && strcmp(md.md_provider, pp->name) !=
=3D 0)
> +	if (md.md_provider[0] !=3D '\0' &&
> +	    !g_compare_names(md.md_provider, pp->name))
>  		return (NULL);
>  	if (md.md_provsize !=3D pp->mediasize)
>  		return (NULL);
>=20
> Modified: head/sys/geom/geom.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/geom/geom.h	Tue Apr 26 23:00:32 2011	(r221100)
> +++ head/sys/geom/geom.h	Wed Apr 27 00:10:26 2011	(r221101)
> @@ -238,6 +238,7 @@ void g_waitidlelock(void);
>  /* geom_subr.c */
>  int g_access(struct g_consumer *cp, int nread, int nwrite, int nexcl);
>  int g_attach(struct g_consumer *cp, struct g_provider *pp);
> +int g_compare_names(const char *namea, const char *nameb);
>  void g_destroy_consumer(struct g_consumer *cp);
>  void g_destroy_geom(struct g_geom *pp);
>  void g_destroy_provider(struct g_provider *pp);
>=20
> Modified: head/sys/geom/geom_subr.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/geom/geom_subr.c	Tue Apr 26 23:00:32 2011	(r221100)
> +++ head/sys/geom/geom_subr.c	Wed Apr 27 00:10:26 2011	(r221101)
> @@ -1017,6 +1017,43 @@ g_getattr__(const char *attr, struct g_c
>  	return (0);
>  }
> =20
> +static int
> +g_get_device_prefix_len(const char *name)
> +{
> +	int len;
> +
> +	if (strncmp(name, "ada", 3) =3D=3D 0)
> +		len =3D 3;
> +	else if (strncmp(name, "ad", 2) =3D=3D 0)
> +		len =3D 2;
> +	else
> +		return (0);
> +	if (name[len] < '0' || name[len] > '9')
> +		return (0);
> +	do {
> +		len++;
> +	} while (name[len] >=3D '0' && name[len] <=3D '9');
> +	return (len);
> +}
> +
> +int
> +g_compare_names(const char *namea, const char *nameb)
> +{
> +	int deva, devb;
> +
> +	if (strcmp(namea, nameb) =3D=3D 0)
> +		return (1);
> +	deva =3D g_get_device_prefix_len(namea);
> +	if (deva =3D=3D 0)
> +		return (0);
> +	devb =3D g_get_device_prefix_len(nameb);
> +	if (devb =3D=3D 0)
> +		return (0);
> +	if (strcmp(namea + deva, nameb + devb) =3D=3D 0)
> +		return (1);
> +	return (0);
> +}
> +
This is most likely my misunderstanding of things.

Can we have a legitimate situation where both ada* and ad* devices coexist
on the same system ? E.g. on-board AHCI and legacy PATA controller ?

Wouldn't this hack then wreak the havoc ? Can the hack be put under the
control of some tunable ?

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

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

iEYEARECAAYFAk23zcwACgkQC3+MBN1Mb4hrjQCeP+S6FfrYF/fQOi73swqlLrY7
ueEAmwRJfT8TYREdrolXGYGK3Noj4sI8
=orH1
-----END PGP SIGNATURE-----

--yOCDj6dCdxu1mn4c--

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 08:24: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 0568B106564A;
	Wed, 27 Apr 2011 08:24:02 +0000 (UTC)
	(envelope-from mavbsd@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 312C38FC1D;
	Wed, 27 Apr 2011 08:24:00 +0000 (UTC)
Received: by bwz12 with SMTP id 12so1702754bwz.13
	for ; Wed, 27 Apr 2011 01:24:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:message-id:date:from:user-agent
	:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=uil9GRazJPvsH8okLg/FR/cuMm5pHj6k6enW3mTSXgk=;
	b=TXEJ8ag16V4m1ViQ+mc3vKKzEzD4GJ5XZfbtF43yW212K8fyjIaYDfeIEDqhIS+DYF
	9mBY4ckNuM4mffzFoRv3ozERV/UCIzJA467gjrlq30hsRGVDAiU0p+taFMnUagAz8fey
	+4xqJOPh/8OICBHslyv8TFxrRt5SIErT2agWQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=o4yOGr06Yo8neg57WRy66WD97wPnJBRodSKHdhigLwNdzS4FdhJF1adcSogcQL0SnY
	GZTJVwP5k2Mssf40v55EnbVyuzsU8X6F/BsGg2qSs2a41RAFG2Diu8gcjklmCGhm60XF
	lQ0SiOM4ixt0U5O332b59aF+qDMhoCbMbL7NI=
Received: by 10.204.71.193 with SMTP id i1mr1760293bkj.102.1303892640022;
	Wed, 27 Apr 2011 01:24:00 -0700 (PDT)
Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226])
	by mx.google.com with ESMTPS id w3sm281681bkt.5.2011.04.27.01.23.58
	(version=SSLv3 cipher=OTHER); Wed, 27 Apr 2011 01:23:59 -0700 (PDT)
Sender: Alexander Motin 
Message-ID: <4DB7D296.7020300@FreeBSD.org>
Date: Wed, 27 Apr 2011 11:23:50 +0300
From: Alexander Motin 
User-Agent: Thunderbird 2.0.0.23 (X11/20091212)
MIME-Version: 1.0
To: Kostik Belousov 
References: <201104270010.p3R0AQQv044866@svn.freebsd.org>
	<20110427080325.GV48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110427080325.GV48734@deviant.kiev.zoral.com.ua>
X-Enigmail-Version: 0.96.0
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221101 - in head/sys/geom: . concat journal mirror
 raid3 shsec stripe virstor
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 08:24:02 -0000

Kostik Belousov wrote:
> On Wed, Apr 27, 2011 at 12:10:26AM +0000, Alexander Motin wrote:
>> Author: mav
>> Date: Wed Apr 27 00:10:26 2011
>> New Revision: 221101
>> URL: http://svn.freebsd.org/changeset/base/221101
>>
>> Log:
>>   Implement relaxed comparision for hardcoded provider names to make it
>>   ignore adX/adaY difference in both directions to simplify migration to
>>   the CAM-based ATA or back.
>>
>> Modified:
>>   head/sys/geom/concat/g_concat.c
>>   head/sys/geom/geom.h
>>   head/sys/geom/geom_subr.c
>>   head/sys/geom/journal/g_journal.c
>>   head/sys/geom/mirror/g_mirror.c
>>   head/sys/geom/raid3/g_raid3.c
>>   head/sys/geom/shsec/g_shsec.c
>>   head/sys/geom/stripe/g_stripe.c
>>   head/sys/geom/virstor/g_virstor.c
>>
>> Modified: head/sys/geom/concat/g_concat.c
>> ==============================================================================
>> --- head/sys/geom/concat/g_concat.c	Tue Apr 26 23:00:32 2011	(r221100)
>> +++ head/sys/geom/concat/g_concat.c	Wed Apr 27 00:10:26 2011	(r221101)
>> @@ -678,7 +678,8 @@ g_concat_taste(struct g_class *mp, struc
>>  	if (md.md_version < 4)
>>  		md.md_provsize = pp->mediasize;
>>  
>> -	if (md.md_provider[0] != '\0' && strcmp(md.md_provider, pp->name) != 0)
>> +	if (md.md_provider[0] != '\0' &&
>> +	    !g_compare_names(md.md_provider, pp->name))
>>  		return (NULL);
>>  	if (md.md_provsize != pp->mediasize)
>>  		return (NULL);
>>
>> Modified: head/sys/geom/geom.h
>> ==============================================================================
>> --- head/sys/geom/geom.h	Tue Apr 26 23:00:32 2011	(r221100)
>> +++ head/sys/geom/geom.h	Wed Apr 27 00:10:26 2011	(r221101)
>> @@ -238,6 +238,7 @@ void g_waitidlelock(void);
>>  /* geom_subr.c */
>>  int g_access(struct g_consumer *cp, int nread, int nwrite, int nexcl);
>>  int g_attach(struct g_consumer *cp, struct g_provider *pp);
>> +int g_compare_names(const char *namea, const char *nameb);
>>  void g_destroy_consumer(struct g_consumer *cp);
>>  void g_destroy_geom(struct g_geom *pp);
>>  void g_destroy_provider(struct g_provider *pp);
>>
>> Modified: head/sys/geom/geom_subr.c
>> ==============================================================================
>> --- head/sys/geom/geom_subr.c	Tue Apr 26 23:00:32 2011	(r221100)
>> +++ head/sys/geom/geom_subr.c	Wed Apr 27 00:10:26 2011	(r221101)
>> @@ -1017,6 +1017,43 @@ g_getattr__(const char *attr, struct g_c
>>  	return (0);
>>  }
>>  
>> +static int
>> +g_get_device_prefix_len(const char *name)
>> +{
>> +	int len;
>> +
>> +	if (strncmp(name, "ada", 3) == 0)
>> +		len = 3;
>> +	else if (strncmp(name, "ad", 2) == 0)
>> +		len = 2;
>> +	else
>> +		return (0);
>> +	if (name[len] < '0' || name[len] > '9')
>> +		return (0);
>> +	do {
>> +		len++;
>> +	} while (name[len] >= '0' && name[len] <= '9');
>> +	return (len);
>> +}
>> +
>> +int
>> +g_compare_names(const char *namea, const char *nameb)
>> +{
>> +	int deva, devb;
>> +
>> +	if (strcmp(namea, nameb) == 0)
>> +		return (1);
>> +	deva = g_get_device_prefix_len(namea);
>> +	if (deva == 0)
>> +		return (0);
>> +	devb = g_get_device_prefix_len(nameb);
>> +	if (devb == 0)
>> +		return (0);
>> +	if (strcmp(namea + deva, nameb + devb) == 0)
>> +		return (1);
>> +	return (0);
>> +}
>> +
> This is most likely my misunderstanding of things.
> 
> Can we have a legitimate situation where both ada* and ad* devices coexist
> on the same system ? E.g. on-board AHCI and legacy PATA controller ?

Yes, we can and sometimes do. But the new GENERIC kernels in CURRENT
switch everything to the adaX.

> Wouldn't this hack then wreak the havoc ? Can the hack be put under the
> control of some tunable ?

I can't imagine useful situation when device name part of the hardcoded
provider name is important. Only partition name sometimes is.

-- 
Alexander Motin

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 08:53: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 92378106564A;
	Wed, 27 Apr 2011 08:53:52 +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 8334F8FC08;
	Wed, 27 Apr 2011 08:53: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 p3R8rqVs062152;
	Wed, 27 Apr 2011 08:53:52 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R8rqSm062150;
	Wed, 27 Apr 2011 08:53:52 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104270853.p3R8rqSm062150@svn.freebsd.org>
From: Alexander Motin 
Date: Wed, 27 Apr 2011 08:53: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: r221114 - 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, 27 Apr 2011 08:53:52 -0000

Author: mav
Date: Wed Apr 27 08:53:52 2011
New Revision: 221114
URL: http://svn.freebsd.org/changeset/base/221114

Log:
  Add obvious note that CAM drivers are required for using CAM ATA.

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed Apr 27 04:11:18 2011	(r221113)
+++ head/UPDATING	Wed Apr 27 08:53:52 2011	(r221114)
@@ -41,6 +41,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	module work as CAM driver supporting legacy ATA controllers. Device ata
 	still can be used in modular fashion (atacore + ...). Modules atadisk
 	and atapi* are not used and won't affect operation in ATA_CAM mode.
+	Note that to use CAM-based ATA kernel should include CAM devices
+	scbus, pass, da (or explicitly ada), cd and optionally others. All of
+	them are parts of the cam module.
 
 	ataraid(4) functionality is now supported by the RAID GEOM class.
 	To use it you can load geom_raid kernel module and use graid(8) tool

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 08:57: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 38A64106564A;
	Wed, 27 Apr 2011 08:57:13 +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 293A18FC0C;
	Wed, 27 Apr 2011 08:57: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 p3R8vDxR062296;
	Wed, 27 Apr 2011 08:57:13 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R8vDWV062294;
	Wed, 27 Apr 2011 08:57:13 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201104270857.p3R8vDWV062294@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 27 Apr 2011 08:57: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: r221115 - head/contrib/less
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 08:57:13 -0000

Author: obrien
Date: Wed Apr 27 08:57:12 2011
New Revision: 221115
URL: http://svn.freebsd.org/changeset/base/221115

Log:
  Be clear of what licensing terms we are using.

Deleted:
  head/contrib/less/COPYING
Modified:
  head/contrib/less/README

Modified: head/contrib/less/README
==============================================================================
--- head/contrib/less/README	Wed Apr 27 08:53:52 2011	(r221114)
+++ head/contrib/less/README	Wed Apr 27 08:57:12 2011	(r221115)
@@ -1,3 +1,11 @@
+**************************************************************************
+**************************************************************************
+**                                                                      **
+** The FreeBSD Project has chosen to redistribute and modify Less under **
+** the 'Less License' (as described in the 'LICENSE' file).             **
+**                                                                      **
+**************************************************************************
+**************************************************************************
 
                             Less, version 436
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 09:35: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 77E23106566B;
	Wed, 27 Apr 2011 09:35:40 +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 66E0A8FC0A;
	Wed, 27 Apr 2011 09:35: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 p3R9Zewp063610;
	Wed, 27 Apr 2011 09:35:40 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3R9Ze5B063608;
	Wed, 27 Apr 2011 09:35:40 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201104270935.p3R9Ze5B063608@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 27 Apr 2011 09:35:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221117 - stable/8/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, 27 Apr 2011 09:35:40 -0000

Author: kib
Date: Wed Apr 27 09:35:40 2011
New Revision: 221117
URL: http://svn.freebsd.org/changeset/base/221117

Log:
  MFC r220987:
  Fix typo.

Modified:
  stable/8/sys/sys/systm.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/sys/systm.h
==============================================================================
--- stable/8/sys/sys/systm.h	Wed Apr 27 09:10:58 2011	(r221116)
+++ stable/8/sys/sys/systm.h	Wed Apr 27 09:35:40 2011	(r221117)
@@ -150,7 +150,7 @@ int	nullop(void);
 int	eopnotsupp(void);
 int	ureadc(int, struct uio *);
 void	hashdestroy(void *, struct malloc_type *, u_long);
-void	*hashinit(int count, struct malloc_type *type, u_long *hashmark);
+void	*hashinit(int count, struct malloc_type *type, u_long *hashmask);
 void	*hashinit_flags(int count, struct malloc_type *type,
     u_long *hashmask, int flags);
 #define	HASH_NOWAIT	0x00000001

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 12:12: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 2C5C61065673;
	Wed, 27 Apr 2011 12:12:23 +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 1925D8FC14;
	Wed, 27 Apr 2011 12:12: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 p3RCCM1d071036;
	Wed, 27 Apr 2011 12:12:22 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RCCM32071034;
	Wed, 27 Apr 2011 12:12:22 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201104271212.p3RCCM32071034@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Wed, 27 Apr 2011 12:12: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: r221118 - head/share/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: Wed, 27 Apr 2011 12:12:23 -0000

Author: pluknet
Date: Wed Apr 27 12:12:22 2011
New Revision: 221118
URL: http://svn.freebsd.org/changeset/base/221118

Log:
  Add DragonFly 2.10.1 release.

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==============================================================================
--- head/share/misc/bsd-family-tree	Wed Apr 27 09:35:40 2011	(r221117)
+++ head/share/misc/bsd-family-tree	Wed Apr 27 12:12:22 2011	(r221118)
@@ -245,7 +245,7 @@ FreeBSD 5.2           |      |          
  |     |        |     |      |    |        OpenBSD 4.8                 |
  |     |        |     |      | NetBSD 5.1      |                       |
  |  FreeBSD  FreeBSD  |      |                 |                       |
- |    8.2      7.4    |      |                 |                       |
+ |    8.2      7.4    |      |                 |               DragonFly 2.10.1
  |     v              |      |                 |                       |
  |                    |      |                 |                       |
 FreeBSD 9 -current    |  NetBSD -current  OpenBSD -current             |
@@ -532,6 +532,7 @@ OpenBSD 4.8		2010-11-01 [OBD]
 NetBSD 5.1		2010-11-19 [NBD]
 FreeBSD 7.4		2011-02-24 [FBD]
 FreeBSD 8.2		2011-02-24 [FBD]
+DragonFly 2.10.1	2011-04-26 [DFB]
 
 Bibliography
 ------------------------

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 14:58: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 9B6EC106566B;
	Wed, 27 Apr 2011 14:58:06 +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 8B4808FC18;
	Wed, 27 Apr 2011 14:58: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 p3REw66E076273;
	Wed, 27 Apr 2011 14:58:06 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3REw6RN076271;
	Wed, 27 Apr 2011 14:58:06 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201104271458.p3REw6RN076271@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Wed, 27 Apr 2011 14:58: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: r221119 - head/usr.sbin/mfiutil
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 14:58:06 -0000

Author: pluknet
Date: Wed Apr 27 14:58:06 2011
New Revision: 221119
URL: http://svn.freebsd.org/changeset/base/221119

Log:
  Fix typo in "continuously" argument used in patrol auto command.
  
  Obtained from:	Sascha Wildner 
  Approved by:	jhb
  MFC after:	3 days

Modified:
  head/usr.sbin/mfiutil/mfi_patrol.c

Modified: head/usr.sbin/mfiutil/mfi_patrol.c
==============================================================================
--- head/usr.sbin/mfiutil/mfi_patrol.c	Wed Apr 27 12:12:22 2011	(r221118)
+++ head/usr.sbin/mfiutil/mfi_patrol.c	Wed Apr 27 14:58:06 2011	(r221119)
@@ -252,7 +252,7 @@ patrol_config(int ac, char **av)
 	if (strcasecmp(av[1], "auto") == 0) {
 		op_mode = MFI_PR_OPMODE_AUTO;
 		if (ac > 2) {
-			if (strcasecmp(av[2], "continously") == 0)
+			if (strcasecmp(av[2], "continuously") == 0)
 				exec_freq = 0xffffffff;
 			else {
 				val = strtol(av[2], &cp, 0);

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 15:01: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 C293E106564A;
	Wed, 27 Apr 2011 15:01:04 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 93AD68FC1D;
	Wed, 27 Apr 2011 15:01:04 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 36BE046B53;
	Wed, 27 Apr 2011 11:01:04 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id AEF448A01B;
	Wed, 27 Apr 2011 11:01:03 -0400 (EDT)
From: John Baldwin 
To: obrien@freebsd.org
Date: Wed, 27 Apr 2011 10:48:33 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; )
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
	<20110426222641.GA44259@dragon.NUXI.org>
In-Reply-To: <20110426222641.GA44259@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201104271048.33325.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Wed, 27 Apr 2011 11:01:03 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 15:01:04 -0000

On Tuesday, April 26, 2011 6:26:41 pm David O'Brien wrote:
> On Tue, Apr 26, 2011 at 09:32:44AM -0400, John Baldwin wrote:
> > On Tuesday, April 26, 2011 12:09:20 am David E. O'Brien wrote:
> > > Author: obrien
> > > Date: Tue Apr 26 04:09:20 2011
> > > New Revision: 221053
> > > URL: http://svn.freebsd.org/changeset/base/221053
> > > 
> > > Log:
> > >   This builds OK using the parent dir's WARNS=6.
> > >   [built on both AMD64 and i386]
> > 
> > This breaks the tinderbox on at least arm, ia64, mips, and sparc64.
> 
> Sigh.  Do we yet have ARM, MIPS, or Sparc64 test machines in
> the cluster?  http://www.freebsd.org/internal/machines.html doesn't list
> any, but maybe some have been added?

Umm, I just did:

make TARGET=ia64 toolchain
make TARGET=ia64 buildenv
cd usr.bin/rlogin
make

to test my fixes to rlogin.  For changing WARNS, 'make universe' works well (I 
have one running right now before I re-enable this change).

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 16:16: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 3C3AC1065674;
	Wed, 27 Apr 2011 16:16:02 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2BCB78FC16;
	Wed, 27 Apr 2011 16:16: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 p3RGG2sE078736;
	Wed, 27 Apr 2011 16:16:02 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RGG21A078732;
	Wed, 27 Apr 2011 16:16:02 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201104271616.p3RGG21A078732@svn.freebsd.org>
From: Navdeep Parhar 
Date: Wed, 27 Apr 2011 16:16:02 +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: r221120 - stable/8/sys/dev/cxgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 16:16:02 -0000

Author: np
Date: Wed Apr 27 16:16:01 2011
New Revision: 221120
URL: http://svn.freebsd.org/changeset/base/221120

Log:
  MFC r220873, r220897, r220905.
  
  r220873:
  - Move all Ethernet specific items from sge_eq to sge_txq.  sge_eq is
    now a suitable base for all kinds of egress queues.
  
  - Add control queues (sge_ctrlq) and allocate one of these per hardware           channel.  They can be used to program filters and steer traffic (and
    more).
  
  r220897:
  Use the correct free routine when destroying a control queue.
  
  r220905:
  Ring the freelist doorbell from within refill_fl.  While here, fix a bug
  that could have allowed the hardware pidx to reach the cidx even though
  the freelist isn't empty.  (Haven't actually seen this but it was there
  waiting to happen..)

Modified:
  stable/8/sys/dev/cxgbe/adapter.h
  stable/8/sys/dev/cxgbe/t4_main.c
  stable/8/sys/dev/cxgbe/t4_sge.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/cxgbe/adapter.h
==============================================================================
--- stable/8/sys/dev/cxgbe/adapter.h	Wed Apr 27 14:58:06 2011	(r221119)
+++ stable/8/sys/dev/cxgbe/adapter.h	Wed Apr 27 16:16:01 2011	(r221120)
@@ -110,6 +110,9 @@ enum {
 	FW_IQ_QSIZE = 256,
 	FW_IQ_ESIZE = 64,	/* At least 64 mandated by the firmware spec */
 
+	CTRL_EQ_QSIZE = 128,
+	CTRL_EQ_ESIZE = 64,
+
 	RX_IQ_QSIZE = 1024,
 	RX_IQ_ESIZE = 64,	/* At least 64 so CPL_RX_PKT will fit */
 
@@ -218,7 +221,7 @@ struct tx_map {
 
 struct tx_sdesc {
 	uint8_t desc_used;	/* # of hardware descriptors used by the WR */
-	uint8_t map_used;	/* # of frames sent out in the WR */
+	uint8_t credits;	/* NIC txq: # of frames sent out in the WR */
 };
 
 typedef void (iq_intr_handler_t)(void *);
@@ -275,7 +278,6 @@ enum {
  * consumes them) but it's special enough to have its own struct (see sge_fl).
  */
 struct sge_eq {
-	bus_dma_tag_t tx_tag;	/* tag for transmit buffers */
 	bus_dma_tag_t desc_tag;
 	bus_dmamap_t desc_map;
 	char lockname[16];
@@ -284,8 +286,6 @@ struct sge_eq {
 
 	struct tx_desc *desc;	/* KVA of descriptor ring */
 	bus_addr_t ba;		/* bus address of descriptor ring */
-	struct tx_sdesc *sdesc;	/* KVA of software descriptor ring */
-	struct buf_ring *br;	/* tx buffer ring */
 	struct sge_qstat *spg;	/* status page, for convenience */
 	uint16_t cap;		/* max # of desc, for convenience */
 	uint16_t avail;		/* available descriptors, for convenience */
@@ -295,14 +295,7 @@ struct sge_eq {
 	uint16_t pending;	/* # of descriptors used since last doorbell */
 	uint16_t iqid;		/* iq that gets egr_update for the eq */
 	uint32_t cntxt_id;	/* SGE context id for the eq */
-
-	/* DMA maps used for tx */
-	struct tx_map *maps;
-	uint32_t map_total;	/* # of DMA maps */
-	uint32_t map_pidx;	/* next map to be used */
-	uint32_t map_cidx;	/* reclaimed up to this index */
-	uint32_t map_avail;	/* # of available maps */
-} __aligned(CACHE_LINE_SIZE);
+};
 
 struct sge_fl {
 	bus_dma_tag_t desc_tag;
@@ -325,13 +318,23 @@ struct sge_fl {
 	unsigned int dmamap_failed;
 };
 
-/* txq: SGE egress queue + miscellaneous items */
+/* txq: SGE egress queue + what's needed for Ethernet NIC */
 struct sge_txq {
 	struct sge_eq eq;	/* MUST be first */
+
+	struct ifnet *ifp;	/* the interface this txq belongs to */
+	bus_dma_tag_t tx_tag;	/* tag for transmit buffers */
+	struct buf_ring *br;	/* tx buffer ring */
+	struct tx_sdesc *sdesc;	/* KVA of software descriptor ring */
 	struct mbuf *m;		/* held up due to temporary resource shortage */
 	struct task resume_tx;
 
-	struct ifnet *ifp;	/* the interface this txq belongs to */
+	/* DMA maps used for tx */
+	struct tx_map *maps;
+	uint32_t map_total;	/* # of DMA maps */
+	uint32_t map_pidx;	/* next map to be used */
+	uint32_t map_cidx;	/* reclaimed up to this index */
+	uint32_t map_avail;	/* # of available maps */
 
 	/* stats for common events first */
 
@@ -349,11 +352,12 @@ struct sge_txq {
 	uint32_t no_dmamap;	/* no DMA map to load the mbuf */
 	uint32_t no_desc;	/* out of hardware descriptors */
 	uint32_t egr_update;	/* # of SGE_EGR_UPDATE notifications for txq */
-};
+} __aligned(CACHE_LINE_SIZE);
 
 enum {
 	RXQ_LRO_ENABLED	= (1 << 0)
 };
+
 /* rxq: SGE ingress queue + SGE free list + miscellaneous items */
 struct sge_rxq {
 	struct sge_iq iq;	/* MUST be first */
@@ -374,6 +378,20 @@ struct sge_rxq {
 
 } __aligned(CACHE_LINE_SIZE);
 
+/* ctrlq: SGE egress queue + stats for control queue */
+struct sge_ctrlq {
+	struct sge_eq eq;	/* MUST be first */
+
+	/* stats for common events first */
+
+	uint64_t total_wrs;	/* # of work requests sent down this queue */
+
+	/* stats for not-that-common events */
+
+	uint32_t no_desc;	/* out of hardware descriptors */
+	uint32_t too_long;	/* WR longer than hardware max */
+} __aligned(CACHE_LINE_SIZE);
+
 struct sge {
 	uint16_t timer_val[SGE_NTIMERS];
 	uint8_t  counter_val[SGE_NCOUNTERS];
@@ -384,6 +402,7 @@ struct sge {
 	int neq;	/* total egress queues */
 
 	struct sge_iq fwq;	/* Firmware event queue */
+	struct sge_ctrlq *ctrlq;/* Control queues */
 	struct sge_iq *fiq;	/* Forwarded interrupt queues (INTR_FWD) */
 	struct sge_txq *txq;	/* NIC tx queues */
 	struct sge_rxq *rxq;	/* NIC rx queues */
@@ -436,6 +455,9 @@ struct adapter {
 	struct adapter_params params;
 	struct t4_virt_res vres;
 
+	struct sysctl_ctx_list ctx; /* from first_port_up to last_port_down */
+	struct sysctl_oid *oid_ctrlq;
+
 	struct mtx sc_lock;
 	char lockname[16];
 };
@@ -572,8 +594,8 @@ void t4_sge_modload(void);
 void t4_sge_init(struct adapter *);
 int t4_create_dma_tag(struct adapter *);
 int t4_destroy_dma_tag(struct adapter *);
-int t4_setup_adapter_iqs(struct adapter *);
-int t4_teardown_adapter_iqs(struct adapter *);
+int t4_setup_adapter_queues(struct adapter *);
+int t4_teardown_adapter_queues(struct adapter *);
 int t4_setup_eth_queues(struct port_info *);
 int t4_teardown_eth_queues(struct port_info *);
 void t4_intr_all(void *);
@@ -583,6 +605,7 @@ void t4_intr_evt(void *);
 void t4_intr_data(void *);
 void t4_evt_rx(void *);
 void t4_eth_rx(void *);
+int t4_mgmt_tx(struct adapter *, struct mbuf *);
 int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *);
 void t4_update_fl_bufsize(struct ifnet *);
 

Modified: stable/8/sys/dev/cxgbe/t4_main.c
==============================================================================
--- stable/8/sys/dev/cxgbe/t4_main.c	Wed Apr 27 14:58:06 2011	(r221119)
+++ stable/8/sys/dev/cxgbe/t4_main.c	Wed Apr 27 16:16:01 2011	(r221120)
@@ -544,7 +544,8 @@ t4_attach(device_t dev)
 	s = &sc->sge;
 	s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g;
 	s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g;
-	s->neq = s->ntxq + s->nrxq;	/* the fl in an rxq is an eq */
+	s->neq = s->ntxq + s->nrxq;	/* the free list in an rxq is an eq */
+	s->neq += NCHAN;		/* control queues, 1 per hw channel */
 	s->niq = s->nrxq + 1;		/* 1 extra for firmware event queue */
 	if (iaq.intr_fwd) {
 		sc->flags |= INTR_FWD;
@@ -552,6 +553,8 @@ t4_attach(device_t dev)
 		s->fiq = malloc(NFIQ(sc) * sizeof(struct sge_iq), M_CXGBE,
 		    M_ZERO | M_WAITOK);
 	}
+	s->ctrlq = malloc(NCHAN * sizeof(struct sge_ctrlq), M_CXGBE,
+	    M_ZERO | M_WAITOK);
 	s->rxq = malloc(s->nrxq * sizeof(struct sge_rxq), M_CXGBE,
 	    M_ZERO | M_WAITOK);
 	s->txq = malloc(s->ntxq * sizeof(struct sge_txq), M_CXGBE,
@@ -654,6 +657,7 @@ t4_detach(device_t dev)
 	free(sc->irq, M_CXGBE);
 	free(sc->sge.rxq, M_CXGBE);
 	free(sc->sge.txq, M_CXGBE);
+	free(sc->sge.ctrlq, M_CXGBE);
 	free(sc->sge.fiq, M_CXGBE);
 	free(sc->sge.iqmap, M_CXGBE);
 	free(sc->sge.eqmap, M_CXGBE);
@@ -993,7 +997,7 @@ cxgbe_transmit(struct ifnet *ifp, struct
 
 	if (m->m_flags & M_FLOWID)
 		txq += (m->m_pkthdr.flowid % pi->ntxq);
-	br = txq->eq.br;
+	br = txq->br;
 
 	if (TXQ_TRYLOCK(txq) == 0) {
 		/*
@@ -1048,7 +1052,7 @@ cxgbe_qflush(struct ifnet *ifp)
 		for_each_txq(pi, i, txq) {
 			TXQ_LOCK(txq);
 			m_freem(txq->m);
-			while ((m = buf_ring_dequeue_sc(txq->eq.br)) != NULL)
+			while ((m = buf_ring_dequeue_sc(txq->br)) != NULL)
 				m_freem(m);
 			TXQ_UNLOCK(txq);
 		}
@@ -1895,9 +1899,9 @@ first_port_up(struct adapter *sc)
 	ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
 
 	/*
-	 * The firmware event queue and the optional forwarded interrupt queues.
+	 * queues that belong to the adapter (not any particular port).
 	 */
-	rc = t4_setup_adapter_iqs(sc);
+	rc = t4_setup_adapter_queues(sc);
 	if (rc != 0)
 		goto done;
 
@@ -1964,7 +1968,7 @@ last_port_down(struct adapter *sc)
 
 	t4_intr_disable(sc);
 
-	t4_teardown_adapter_iqs(sc);
+	t4_teardown_adapter_queues(sc);
 
 	for (i = 0; i < sc->intr_count; i++)
 		t4_free_irq(sc, &sc->irq[i]);
@@ -2279,7 +2283,7 @@ cxgbe_tick(void *arg)
 
 	drops = s->tx_drop;
 	for_each_txq(pi, i, txq)
-		drops += txq->eq.br->br_drops;
+		drops += txq->br->br_drops;
 	ifp->if_snd.ifq_drops = drops;
 
 	ifp->if_oerrors = s->tx_error_frames;
@@ -2675,7 +2679,7 @@ txq_start(struct ifnet *ifp, struct sge_
 
 	TXQ_LOCK_ASSERT_OWNED(txq);
 
-	br = txq->eq.br;
+	br = txq->br;
 	m = txq->m ? txq->m : drbr_dequeue(ifp, br);
 	if (m)
 		t4_eth_tx(ifp, txq, m);

Modified: stable/8/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/8/sys/dev/cxgbe/t4_sge.c	Wed Apr 27 14:58:06 2011	(r221119)
+++ stable/8/sys/dev/cxgbe/t4_sge.c	Wed Apr 27 16:16:01 2011	(r221120)
@@ -94,7 +94,7 @@ struct sgl {
 static inline void init_iq(struct sge_iq *, struct adapter *, int, int, int,
     int, iq_intr_handler_t *, char *);
 static inline void init_fl(struct sge_fl *, int, char *);
-static inline void init_txq(struct sge_txq *, int, char *);
+static inline void init_eq(struct sge_eq *, int, char *);
 static int alloc_ring(struct adapter *, size_t, bus_dma_tag_t *, bus_dmamap_t *,
     bus_addr_t *, void **);
 static int free_ring(struct adapter *, bus_dma_tag_t, bus_dmamap_t, bus_addr_t,
@@ -106,17 +106,19 @@ static int alloc_iq(struct sge_iq *, int
 static int free_iq(struct sge_iq *);
 static int alloc_rxq(struct port_info *, struct sge_rxq *, int, int);
 static int free_rxq(struct port_info *, struct sge_rxq *);
+static int alloc_ctrlq(struct adapter *, struct sge_ctrlq *, int);
+static int free_ctrlq(struct adapter *, struct sge_ctrlq *);
 static int alloc_txq(struct port_info *, struct sge_txq *, int);
 static int free_txq(struct port_info *, struct sge_txq *);
 static void oneseg_dma_callback(void *, bus_dma_segment_t *, int, int);
 static inline bool is_new_response(const struct sge_iq *, struct rsp_ctrl **);
 static inline void iq_next(struct sge_iq *);
 static inline void ring_fl_db(struct adapter *, struct sge_fl *);
-static void refill_fl(struct sge_fl *, int);
+static void refill_fl(struct adapter *, struct sge_fl *, int, int);
 static int alloc_fl_sdesc(struct sge_fl *);
 static void free_fl_sdesc(struct sge_fl *);
-static int alloc_eq_maps(struct sge_eq *);
-static void free_eq_maps(struct sge_eq *);
+static int alloc_tx_maps(struct sge_txq *);
+static void free_tx_maps(struct sge_txq *);
 static void set_fl_tag_idx(struct sge_fl *, int);
 
 static int get_pkt_sgl(struct sge_txq *, struct mbuf **, struct sgl *, int);
@@ -130,14 +132,16 @@ static inline void write_ulp_cpl_sgl(str
     struct txpkts *, struct mbuf *, struct sgl *);
 static int write_sgl_to_txd(struct sge_eq *, struct sgl *, caddr_t *);
 static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int);
-static inline void ring_tx_db(struct adapter *, struct sge_eq *);
+static inline void ring_eq_db(struct adapter *, struct sge_eq *);
 static inline int reclaimable(struct sge_eq *);
-static int reclaim_tx_descs(struct sge_eq *, int, int);
+static int reclaim_tx_descs(struct sge_txq *, int, int);
 static void write_eqflush_wr(struct sge_eq *);
 static __be64 get_flit(bus_dma_segment_t *, int, int);
 static int handle_sge_egr_update(struct adapter *,
     const struct cpl_sge_egr_update *);
 
+static int ctrl_tx(struct adapter *, struct sge_ctrlq *, struct mbuf *);
+
 /*
  * Called on MOD_LOAD and fills up fl_buf_info[].
  */
@@ -235,23 +239,32 @@ t4_destroy_dma_tag(struct adapter *sc)
 }
 
 /*
- * Allocate and initialize the firmware event queue and the forwarded interrupt
- * queues, if any.  The adapter owns all these queues as they are not associated
- * with any particular port.
+ * Allocate and initialize the firmware event queue, control queues, and the
+ * forwarded interrupt queues (if any).  The adapter owns all these queues as
+ * they are not associated with any particular port.
  *
  * Returns errno on failure.  Resources allocated up to that point may still be
  * allocated.  Caller is responsible for cleanup in case this function fails.
  */
 int
-t4_setup_adapter_iqs(struct adapter *sc)
+t4_setup_adapter_queues(struct adapter *sc)
 {
 	int i, rc;
 	struct sge_iq *iq, *fwq;
+	struct sge_ctrlq *ctrlq;
 	iq_intr_handler_t *handler;
 	char name[16];
 
 	ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
 
+	if (sysctl_ctx_init(&sc->ctx) == 0) {
+		struct sysctl_oid *oid = device_get_sysctl_tree(sc->dev);
+		struct sysctl_oid_list *children = SYSCTL_CHILDREN(oid);
+
+		sc->oid_ctrlq = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO,
+		    "ctrlq", CTLFLAG_RD, NULL, "ctrl queues");
+	}
+
 	fwq = &sc->sge.fwq;
 	if (sc->flags & INTR_FWD) {
 		iq = &sc->sge.fiq[0];
@@ -292,6 +305,25 @@ t4_setup_adapter_iqs(struct adapter *sc)
 	if (rc != 0) {
 		device_printf(sc->dev,
 		    "failed to create firmware event queue: %d\n", rc);
+
+		return (rc);
+	}
+
+	/*
+	 * Control queues - one per hardware channel.
+	 */
+	ctrlq = &sc->sge.ctrlq[0];
+	for (i = 0; i < NCHAN; i++, ctrlq++) {
+		snprintf(name, sizeof(name), "%s ctrlq%d",
+		    device_get_nameunit(sc->dev), i);
+		init_eq(&ctrlq->eq, CTRL_EQ_QSIZE, name);
+
+		rc = alloc_ctrlq(sc, ctrlq, i);
+		if (rc != 0) {
+			device_printf(sc->dev,
+			    "failed to create control queue %d: %d\n", i, rc);
+			return (rc);
+		}
 	}
 
 	return (rc);
@@ -301,13 +333,22 @@ t4_setup_adapter_iqs(struct adapter *sc)
  * Idempotent
  */
 int
-t4_teardown_adapter_iqs(struct adapter *sc)
+t4_teardown_adapter_queues(struct adapter *sc)
 {
 	int i;
 	struct sge_iq *iq;
 
 	ADAPTER_LOCK_ASSERT_NOTOWNED(sc);
 
+	/* Do this before freeing the queues */
+	if (sc->oid_ctrlq) {
+		sysctl_ctx_free(&sc->ctx);
+		sc->oid_ctrlq = NULL;
+	}
+
+	for (i = 0; i < NCHAN; i++)
+		free_ctrlq(sc, &sc->sge.ctrlq[i]);
+
 	iq = &sc->sge.fwq;
 	free_iq(iq);
 	if (sc->flags & INTR_FWD) {
@@ -367,7 +408,7 @@ t4_setup_eth_queues(struct port_info *pi
 
 		snprintf(name, sizeof(name), "%s txq%d",
 		    device_get_nameunit(pi->dev), i);
-		init_txq(txq, pi->qsize_txq, name);
+		init_eq(&txq->eq, pi->qsize_txq, name);
 
 		rc = alloc_txq(pi, txq, i);
 		if (rc != 0)
@@ -722,9 +763,7 @@ t4_eth_rx(void *arg)
 		FL_LOCK(fl);
 		fl->needed += i;
 		if (fl->needed >= 32)
-			refill_fl(fl, 64);
-		if (fl->pending >= 32)
-			ring_fl_db(sc, fl);
+			refill_fl(sc, fl, 64, 32);
 		FL_UNLOCK(fl);
 
 nextdesc:	ndescs++;
@@ -752,12 +791,16 @@ nextdesc:	ndescs++;
 
 	FL_LOCK(fl);
 	if (fl->needed >= 32)
-		refill_fl(fl, 128);
-	if (fl->pending >= 8)
-		ring_fl_db(sc, fl);
+		refill_fl(sc, fl, 128, 8);
 	FL_UNLOCK(fl);
 }
 
+int
+t4_mgmt_tx(struct adapter *sc, struct mbuf *m)
+{
+	return ctrl_tx(sc, &sc->sge.ctrlq[0], m);
+}
+
 /* Per-packet header in a coalesced tx WR, before the SGL starts (in flits) */
 #define TXPKTS_PKT_HDR ((\
     sizeof(struct ulp_txpkt) + \
@@ -789,7 +832,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_
 	struct port_info *pi = (void *)ifp->if_softc;
 	struct adapter *sc = pi->adapter;
 	struct sge_eq *eq = &txq->eq;
-	struct buf_ring *br = eq->br;
+	struct buf_ring *br = txq->br;
 	struct mbuf *next;
 	int rc, coalescing, can_reclaim;
 	struct txpkts txpkts;
@@ -799,13 +842,13 @@ t4_eth_tx(struct ifnet *ifp, struct sge_
 	KASSERT(m, ("%s: called with nothing to do.", __func__));
 
 	prefetch(&eq->desc[eq->pidx]);
-	prefetch(&eq->sdesc[eq->pidx]);
+	prefetch(&txq->sdesc[eq->pidx]);
 
 	txpkts.npkt = 0;/* indicates there's nothing in txpkts */
 	coalescing = 0;
 
 	if (eq->avail < 8)
-		reclaim_tx_descs(eq, 0, 8);
+		reclaim_tx_descs(txq, 0, 8);
 
 	for (; m; m = next ? next : drbr_dequeue(ifp, br)) {
 
@@ -861,7 +904,7 @@ t4_eth_tx(struct ifnet *ifp, struct sge_
 		coalescing = 0;
 
 		if (eq->avail < 8)
-			reclaim_tx_descs(eq, 0, 8);
+			reclaim_tx_descs(txq, 0, 8);
 		rc = write_txpkt_wr(pi, txq, m, &sgl);
 		if (rc != 0) {
 
@@ -887,11 +930,11 @@ t4_eth_tx(struct ifnet *ifp, struct sge_
 doorbell:
 		/* Fewer and fewer doorbells as the queue fills up */
 		if (eq->pending >= (1 << (fls(eq->qsize - eq->avail) / 2)))
-		    ring_tx_db(sc, eq);
+		    ring_eq_db(sc, eq);
 
 		can_reclaim = reclaimable(eq);
 		if (can_reclaim >= 32)
-			reclaim_tx_descs(eq, can_reclaim, 32);
+			reclaim_tx_descs(txq, can_reclaim, 32);
 	}
 
 	if (txpkts.npkt > 0)
@@ -907,16 +950,21 @@ doorbell:
 	 * WR that reduced it to 0 so we don't need another flush (we don't have
 	 * any descriptor for a flush WR anyway, duh).
 	 */
-	if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED))
+	if (m && eq->avail > 0 && !(eq->flags & EQ_CRFLUSHED)) {
+		struct tx_sdesc *txsd = &txq->sdesc[eq->pidx];
+
+		txsd->desc_used = 1;
+		txsd->credits = 0;
 		write_eqflush_wr(eq);
+	}
 	txq->m = m;
 
 	if (eq->pending)
-		ring_tx_db(sc, eq);
+		ring_eq_db(sc, eq);
 
 	can_reclaim = reclaimable(eq);
 	if (can_reclaim >= 32)
-		reclaim_tx_descs(eq, can_reclaim, 128);
+		reclaim_tx_descs(txq, can_reclaim, 128);
 
 	return (0);
 }
@@ -970,10 +1018,10 @@ init_fl(struct sge_fl *fl, int qsize, ch
 }
 
 static inline void
-init_txq(struct sge_txq *txq, int qsize, char *name)
+init_eq(struct sge_eq *eq, int qsize, char *name)
 {
-	txq->eq.qsize = qsize;
-	strlcpy(txq->eq.lockname, name, sizeof(txq->eq.lockname));
+	eq->qsize = qsize;
+	strlcpy(eq->lockname, name, sizeof(eq->lockname));
 }
 
 static int
@@ -1127,7 +1175,7 @@ alloc_iq_fl(struct port_info *pi, struct
 			    rc);
 			return (rc);
 		}
-		fl->needed = fl->cap - 1; /* one less to avoid cidx = pidx */
+		fl->needed = fl->cap;
 
 		c.iqns_to_fl0congen =
 		    htobe32(V_FW_IQ_CMD_FL0HOSTFCMODE(X_HOSTFCMODE_NONE));
@@ -1170,9 +1218,7 @@ alloc_iq_fl(struct port_info *pi, struct
 		sc->sge.eqmap[cntxt_id] = (void *)fl;
 
 		FL_LOCK(fl);
-		refill_fl(fl, -1);
-		if (fl->pending >= 8)
-			ring_fl_db(sc, fl);
+		refill_fl(sc, fl, -1, 8);
 		FL_UNLOCK(fl);
 	}
 
@@ -1333,6 +1379,110 @@ free_rxq(struct port_info *pi, struct sg
 }
 
 static int
+alloc_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq, int idx)
+{
+	int rc, cntxt_id;
+	size_t len;
+	struct fw_eq_ctrl_cmd c;
+	struct sge_eq *eq = &ctrlq->eq;
+	char name[16];
+	struct sysctl_oid *oid;
+	struct sysctl_oid_list *children;
+
+	mtx_init(&eq->eq_lock, eq->lockname, NULL, MTX_DEF);
+
+	len = eq->qsize * CTRL_EQ_ESIZE;
+	rc = alloc_ring(sc, len, &eq->desc_tag, &eq->desc_map,
+	    &eq->ba, (void **)&eq->desc);
+	if (rc)
+		return (rc);
+
+	eq->cap = eq->qsize - SPG_LEN / CTRL_EQ_ESIZE;
+	eq->spg = (void *)&eq->desc[eq->cap];
+	eq->avail = eq->cap - 1;	/* one less to avoid cidx = pidx */
+	eq->iqid = sc->sge.fwq.cntxt_id;
+
+	bzero(&c, sizeof(c));
+
+	c.op_to_vfn = htobe32(V_FW_CMD_OP(FW_EQ_CTRL_CMD) | F_FW_CMD_REQUEST |
+	    F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_CTRL_CMD_PFN(sc->pf) |
+	    V_FW_EQ_CTRL_CMD_VFN(0));
+	c.alloc_to_len16 = htobe32(F_FW_EQ_CTRL_CMD_ALLOC |
+	    F_FW_EQ_CTRL_CMD_EQSTART | FW_LEN16(c));
+	c.cmpliqid_eqid = htonl(V_FW_EQ_CTRL_CMD_CMPLIQID(eq->iqid)); /* XXX */
+	c.physeqid_pkd = htobe32(0);
+	c.fetchszm_to_iqid =
+	    htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) |
+		V_FW_EQ_CTRL_CMD_PCIECHN(idx) |
+		V_FW_EQ_CTRL_CMD_IQID(eq->iqid));
+	c.dcaen_to_eqsize =
+	    htobe32(V_FW_EQ_CTRL_CMD_FBMIN(X_FETCHBURSTMIN_64B) |
+		V_FW_EQ_CTRL_CMD_FBMAX(X_FETCHBURSTMAX_512B) |
+		V_FW_EQ_CTRL_CMD_CIDXFTHRESH(X_CIDXFLUSHTHRESH_32) |
+		V_FW_EQ_CTRL_CMD_EQSIZE(eq->qsize));
+	c.eqaddr = htobe64(eq->ba);
+
+	rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c);
+	if (rc != 0) {
+		device_printf(sc->dev,
+		    "failed to create control queue %d: %d\n", idx, rc);
+		return (rc);
+	}
+
+	eq->pidx = eq->cidx = 0;
+	eq->cntxt_id = G_FW_EQ_CTRL_CMD_EQID(be32toh(c.cmpliqid_eqid));
+	eq->flags |= (EQ_ALLOCATED | EQ_STARTED);
+
+	cntxt_id = eq->cntxt_id - sc->sge.eq_start;
+	KASSERT(cntxt_id < sc->sge.neq,
+	    ("%s: eq->cntxt_id (%d) more than the max (%d)", __func__,
+	    cntxt_id, sc->sge.neq - 1));
+	sc->sge.eqmap[cntxt_id] = eq;
+
+	children = SYSCTL_CHILDREN(sc->oid_ctrlq);
+
+	snprintf(name, sizeof(name), "%d", idx);
+	oid = SYSCTL_ADD_NODE(&sc->ctx, children, OID_AUTO, name, CTLFLAG_RD,
+	    NULL, "ctrl queue");
+	children = SYSCTL_CHILDREN(oid);
+
+	SYSCTL_ADD_QUAD(&sc->ctx, children, OID_AUTO, "total_wrs", CTLFLAG_RD,
+	    &ctrlq->total_wrs, "total # of work requests");
+	SYSCTL_ADD_UINT(&sc->ctx, children, OID_AUTO, "no_desc", CTLFLAG_RD,
+	    &ctrlq->no_desc, 0,
+	    "# of times ctrlq ran out of hardware descriptors");
+	SYSCTL_ADD_UINT(&sc->ctx, children, OID_AUTO, "too_long", CTLFLAG_RD,
+	    &ctrlq->too_long, 0, "# of oversized work requests");
+
+	return (rc);
+}
+
+static int
+free_ctrlq(struct adapter *sc, struct sge_ctrlq *ctrlq)
+{
+	int rc;
+	struct sge_eq *eq = &ctrlq->eq;
+
+	if (eq->flags & (EQ_ALLOCATED | EQ_STARTED)) {
+		rc = -t4_ctrl_eq_free(sc, sc->mbox, sc->pf, 0, eq->cntxt_id);
+		if (rc != 0) {
+			device_printf(sc->dev,
+			    "failed to free ctrl queue %p: %d\n", eq, rc);
+			return (rc);
+		}
+		eq->flags &= ~(EQ_ALLOCATED | EQ_STARTED);
+	}
+
+	free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc);
+
+	if (mtx_initialized(&eq->eq_lock))
+		mtx_destroy(&eq->eq_lock);
+
+	bzero(ctrlq, sizeof(*ctrlq));
+	return (0);
+}
+
+static int
 alloc_txq(struct port_info *pi, struct sge_txq *txq, int idx)
 {
 	int rc, cntxt_id;
@@ -1358,21 +1508,21 @@ alloc_txq(struct port_info *pi, struct s
 	eq->cap = eq->qsize - SPG_LEN / TX_EQ_ESIZE;
 	eq->spg = (void *)&eq->desc[eq->cap];
 	eq->avail = eq->cap - 1;	/* one less to avoid cidx = pidx */
-	eq->sdesc = malloc(eq->cap * sizeof(struct tx_sdesc), M_CXGBE,
+	txq->sdesc = malloc(eq->cap * sizeof(struct tx_sdesc), M_CXGBE,
 	    M_ZERO | M_WAITOK);
-	eq->br = buf_ring_alloc(eq->qsize, M_CXGBE, M_WAITOK, &eq->eq_lock);
+	txq->br = buf_ring_alloc(eq->qsize, M_CXGBE, M_WAITOK, &eq->eq_lock);
 	eq->iqid = sc->sge.rxq[pi->first_rxq].iq.cntxt_id;
 
 	rc = bus_dma_tag_create(sc->dmat, 1, 0, BUS_SPACE_MAXADDR,
 	    BUS_SPACE_MAXADDR, NULL, NULL, 64 * 1024, TX_SGL_SEGS,
-	    BUS_SPACE_MAXSIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &eq->tx_tag);
+	    BUS_SPACE_MAXSIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &txq->tx_tag);
 	if (rc != 0) {
 		device_printf(sc->dev,
 		    "failed to create tx DMA tag: %d\n", rc);
 		return (rc);
 	}
 
-	rc = alloc_eq_maps(eq);
+	rc = alloc_tx_maps(txq);
 	if (rc != 0) {
 		device_printf(sc->dev, "failed to setup tx DMA maps: %d\n", rc);
 		return (rc);
@@ -1488,15 +1638,15 @@ free_txq(struct port_info *pi, struct sg
 
 	free_ring(sc, eq->desc_tag, eq->desc_map, eq->ba, eq->desc);
 
-	free(eq->sdesc, M_CXGBE);
+	free(txq->sdesc, M_CXGBE);
 
-	if (eq->maps)
-		free_eq_maps(eq);
+	if (txq->maps)
+		free_tx_maps(txq);
 
-	buf_ring_free(eq->br, M_CXGBE);
+	buf_ring_free(txq->br, M_CXGBE);
 
-	if (eq->tx_tag)
-		bus_dma_tag_destroy(eq->tx_tag);
+	if (txq->tx_tag)
+		bus_dma_tag_destroy(txq->tx_tag);
 
 	if (mtx_initialized(&eq->eq_lock))
 		mtx_destroy(&eq->eq_lock);
@@ -1536,24 +1686,31 @@ iq_next(struct sge_iq *iq)
 	}
 }
 
+#define FL_HW_IDX(x) ((x) >> 3)
 static inline void
 ring_fl_db(struct adapter *sc, struct sge_fl *fl)
 {
 	int ndesc = fl->pending / 8;
 
-	/* Caller responsible for ensuring there's something useful to do */
-	KASSERT(ndesc > 0, ("%s called with no useful work to do.", __func__));
+	if (FL_HW_IDX(fl->pidx) == FL_HW_IDX(fl->cidx))
+		ndesc--;	/* hold back one credit */
+
+	if (ndesc <= 0)
+		return;		/* nothing to do */
 
 	wmb();
 
 	t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL), F_DBPRIO |
 	    V_QID(fl->cntxt_id) | V_PIDX(ndesc));
-
-	fl->pending &= 7;
+	fl->pending -= ndesc * 8;
 }
 
+/*
+ * Fill up the freelist by upto nbufs and ring its doorbell if the number of
+ * buffers ready to be handed to the hardware >= dbthresh.
+ */
 static void
-refill_fl(struct sge_fl *fl, int nbufs)
+refill_fl(struct adapter *sc, struct sge_fl *fl, int nbufs, int dbthresh)
 {
 	__be64 *d = &fl->desc[fl->pidx];
 	struct fl_sdesc *sd = &fl->sdesc[fl->pidx];
@@ -1644,6 +1801,9 @@ recycled:
 			d = fl->desc;
 		}
 	}
+
+	if (fl->pending >= dbthresh)
+		ring_fl_db(sc, fl);
 }
 
 static int
@@ -1718,7 +1878,7 @@ free_fl_sdesc(struct sge_fl *fl)
 }
 
 static int
-alloc_eq_maps(struct sge_eq *eq)
+alloc_tx_maps(struct sge_txq *txq)
 {
 	struct tx_map *txm;
 	int i, rc, count;
@@ -1728,16 +1888,16 @@ alloc_eq_maps(struct sge_eq *eq)
 	 * limit for any WR).  txq->no_dmamap events shouldn't occur if maps is
 	 * sized for the worst case.
 	 */
-	count = eq->qsize * 10 / 8;
-	eq->map_total = eq->map_avail = count;
-	eq->map_cidx = eq->map_pidx = 0;
+	count = txq->eq.qsize * 10 / 8;
+	txq->map_total = txq->map_avail = count;
+	txq->map_cidx = txq->map_pidx = 0;
 
-	eq->maps = malloc(count * sizeof(struct tx_map), M_CXGBE,
+	txq->maps = malloc(count * sizeof(struct tx_map), M_CXGBE,
 	    M_ZERO | M_WAITOK);
 
-	txm = eq->maps;
+	txm = txq->maps;
 	for (i = 0; i < count; i++, txm++) {
-		rc = bus_dmamap_create(eq->tx_tag, 0, &txm->map);
+		rc = bus_dmamap_create(txq->tx_tag, 0, &txm->map);
 		if (rc != 0)
 			goto failed;
 	}
@@ -1746,36 +1906,36 @@ alloc_eq_maps(struct sge_eq *eq)
 failed:
 	while (--i >= 0) {
 		txm--;
-		bus_dmamap_destroy(eq->tx_tag, txm->map);
+		bus_dmamap_destroy(txq->tx_tag, txm->map);
 	}
-	KASSERT(txm == eq->maps, ("%s: EDOOFUS", __func__));
+	KASSERT(txm == txq->maps, ("%s: EDOOFUS", __func__));
 
-	free(eq->maps, M_CXGBE);
-	eq->maps = NULL;
+	free(txq->maps, M_CXGBE);
+	txq->maps = NULL;
 
 	return (rc);
 }
 
 static void
-free_eq_maps(struct sge_eq *eq)
+free_tx_maps(struct sge_txq *txq)
 {
 	struct tx_map *txm;
 	int i;
 
-	txm = eq->maps;
-	for (i = 0; i < eq->map_total; i++, txm++) {
+	txm = txq->maps;
+	for (i = 0; i < txq->map_total; i++, txm++) {
 
 		if (txm->m) {
-			bus_dmamap_unload(eq->tx_tag, txm->map);
+			bus_dmamap_unload(txq->tx_tag, txm->map);
 			m_freem(txm->m);
 			txm->m = NULL;
 		}
 
-		bus_dmamap_destroy(eq->tx_tag, txm->map);
+		bus_dmamap_destroy(txq->tx_tag, txm->map);
 	}
 
-	free(eq->maps, M_CXGBE);
-	eq->maps = NULL;
+	free(txq->maps, M_CXGBE);
+	txq->maps = NULL;
 }
 
 /*
@@ -1802,7 +1962,6 @@ get_pkt_sgl(struct sge_txq *txq, struct 
     int sgl_only)
 {
 	struct mbuf *m = *fp;
-	struct sge_eq *eq = &txq->eq;
 	struct tx_map *txm;
 	int rc, defragged = 0, n;
 
@@ -1816,11 +1975,11 @@ start:	sgl->nsegs = 0;
 	if (m->m_pkthdr.len <= IMM_LEN && !sgl_only)
 		return (0);	/* nsegs = 0 tells caller to use imm. tx */
 
-	if (eq->map_avail == 0) {
+	if (txq->map_avail == 0) {
 		txq->no_dmamap++;
 		return (ENOMEM);
 	}
-	txm = &eq->maps[eq->map_pidx];
+	txm = &txq->maps[txq->map_pidx];
 
 	if (m->m_pkthdr.tso_segsz && m->m_len < 50) {
 		*fp = m_pullup(m, 50);
@@ -1829,7 +1988,7 @@ start:	sgl->nsegs = 0;
 			return (ENOBUFS);
 	}
 
-	rc = bus_dmamap_load_mbuf_sg(eq->tx_tag, txm->map, m, sgl->seg,
+	rc = bus_dmamap_load_mbuf_sg(txq->tx_tag, txm->map, m, sgl->seg,
 	    &sgl->nsegs, BUS_DMA_NOWAIT);
 	if (rc == EFBIG && defragged == 0) {
 		m = m_defrag(m, M_DONTWAIT);
@@ -1844,9 +2003,9 @@ start:	sgl->nsegs = 0;
 		return (rc);
 
 	txm->m = m;
-	eq->map_avail--;
-	if (++eq->map_pidx == eq->map_total)
-		eq->map_pidx = 0;
+	txq->map_avail--;
+	if (++txq->map_pidx == txq->map_total)
+		txq->map_pidx = 0;
 
 	KASSERT(sgl->nsegs > 0 && sgl->nsegs <= TX_SGL_SEGS,
 	    ("%s: bad DMA mapping (%d segments)", __func__, sgl->nsegs));
@@ -1870,7 +2029,6 @@ start:	sgl->nsegs = 0;
 static int
 free_pkt_sgl(struct sge_txq *txq, struct sgl *sgl)
 {
-	struct sge_eq *eq = &txq->eq;
 	struct tx_map *txm;
 
 	TXQ_LOCK_ASSERT_OWNED(txq);
@@ -1880,14 +2038,14 @@ free_pkt_sgl(struct sge_txq *txq, struct
 
 	/* 1 pkt uses exactly 1 map, back it out */
 
-	eq->map_avail++;
-	if (eq->map_pidx > 0)
-		eq->map_pidx--;
+	txq->map_avail++;
+	if (txq->map_pidx > 0)
+		txq->map_pidx--;
 	else
-		eq->map_pidx = eq->map_total - 1;
+		txq->map_pidx = txq->map_total - 1;
 
-	txm = &eq->maps[eq->map_pidx];
-	bus_dmamap_unload(eq->tx_tag, txm->map);
+	txm = &txq->maps[txq->map_pidx];
+	bus_dmamap_unload(txq->tx_tag, txm->map);
 	txm->m = NULL;
 
 	return (0);
@@ -1997,7 +2155,7 @@ write_txpkt_wr(struct port_info *pi, str
 	cpl->ctrl1 = htobe64(ctrl1);
 
 	/* Software descriptor */
-	txsd = &eq->sdesc[eq->pidx];
+	txsd = &txq->sdesc[eq->pidx];
 	txsd->desc_used = ndesc;
 
 	eq->pending += ndesc;
@@ -2009,11 +2167,11 @@ write_txpkt_wr(struct port_info *pi, str
 	/* SGL */
 	dst = (void *)(cpl + 1);
 	if (sgl->nsegs > 0) {
-		txsd->map_used = 1;
+		txsd->credits = 1;
 		txq->sgl_wrs++;
 		write_sgl_to_txd(eq, sgl, &dst);
 	} else {
-		txsd->map_used = 0;
+		txsd->credits = 0;
 		txq->imm_wrs++;
 		for (; m; m = m->m_next) {
 			copy_to_txd(eq, mtod(m, caddr_t), &dst, m->m_len);
@@ -2063,8 +2221,8 @@ add_to_txpkts(struct port_info *pi, stru
 			txpkts->nflits += flits;
 			txpkts->plen += m->m_pkthdr.len;
 
-			txsd = &eq->sdesc[eq->pidx];
-			txsd->map_used++;
+			txsd = &txq->sdesc[eq->pidx];
+			txsd->credits++;
 
 			return (0);
 		}
@@ -2098,8 +2256,8 @@ add_to_txpkts(struct port_info *pi, stru
 	txpkts->flitp = &eq->desc[eq->pidx].flit[2];
 	txpkts->plen = m->m_pkthdr.len;
 
-	txsd = &eq->sdesc[eq->pidx];
-	txsd->map_used = 1;
+	txsd = &txq->sdesc[eq->pidx];
+	txsd->credits = 1;
 
 	return (0);
 }
@@ -2137,7 +2295,7 @@ write_txpkts_wr(struct sge_txq *txq, str
 
 	/* Everything else already written */
 
-	txsd = &eq->sdesc[eq->pidx];
+	txsd = &txq->sdesc[eq->pidx];
 	txsd->desc_used = ndesc;
 
 	KASSERT(eq->avail >= ndesc, ("%s: out of descriptors", __func__));
@@ -2328,7 +2486,7 @@ copy_to_txd(struct sge_eq *eq, caddr_t f
 }
 
 static inline void
-ring_tx_db(struct adapter *sc, struct sge_eq *eq)
+ring_eq_db(struct adapter *sc, struct sge_eq *eq)
 {
 	wmb();
 	t4_write_reg(sc, MYPF_REG(A_SGE_PF_KDOORBELL),
@@ -2357,11 +2515,12 @@ reclaimable(struct sge_eq *eq)
  * The actual number reclaimed is provided as the return value.
  */
 static int
-reclaim_tx_descs(struct sge_eq *eq, int can_reclaim, int n)
+reclaim_tx_descs(struct sge_txq *txq, int can_reclaim, int n)
 {
 	struct tx_sdesc *txsd;
 	struct tx_map *txm;
 	unsigned int reclaimed, maps;
+	struct sge_eq *eq = &txq->eq;
 
 	EQ_LOCK_ASSERT_OWNED(eq);
 
@@ -2372,7 +2531,7 @@ reclaim_tx_descs(struct sge_eq *eq, int 
 	while (can_reclaim && maps < n) {
 		int ndesc;
 
-		txsd = &eq->sdesc[eq->cidx];
+		txsd = &txq->sdesc[eq->cidx];
 		ndesc = txsd->desc_used;
 
 		/* Firmware doesn't return "partial" credits. */
@@ -2380,7 +2539,7 @@ reclaim_tx_descs(struct sge_eq *eq, int 
 		    ("%s: unexpected number of credits: %d, %d",
 		    __func__, can_reclaim, ndesc));
 
-		maps += txsd->map_used;
+		maps += txsd->credits;
 
 		reclaimed += ndesc;
 		can_reclaim -= ndesc;
@@ -2390,7 +2549,7 @@ reclaim_tx_descs(struct sge_eq *eq, int 
 			eq->cidx -= eq->cap;
 	}
 
-	txm = &eq->maps[eq->map_cidx];
+	txm = &txq->maps[txq->map_cidx];
 	if (maps)
 		prefetch(txm->m);
 
@@ -2398,25 +2557,25 @@ reclaim_tx_descs(struct sge_eq *eq, int 
 	KASSERT(eq->avail < eq->cap,	/* avail tops out at (cap - 1) */
 	    ("%s: too many descriptors available", __func__));
 
-	eq->map_avail += maps;
-	KASSERT(eq->map_avail <= eq->map_total,
+	txq->map_avail += maps;
+	KASSERT(txq->map_avail <= txq->map_total,
 	    ("%s: too many maps available", __func__));
 
 	while (maps--) {
 		struct tx_map *next;

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

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 16:43: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 BC44C106566B;
	Wed, 27 Apr 2011 16:43:03 +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 AD55D8FC1A;
	Wed, 27 Apr 2011 16:43: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 p3RGh3Bj079576;
	Wed, 27 Apr 2011 16:43:03 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RGh3rP079572;
	Wed, 27 Apr 2011 16:43:03 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201104271643.p3RGh3rP079572@svn.freebsd.org>
From: Attilio Rao 
Date: Wed, 27 Apr 2011 16:43: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: r221121 - in head/sys: ddb dev/watchdog 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, 27 Apr 2011 16:43:03 -0000

Author: attilio
Date: Wed Apr 27 16:43:03 2011
New Revision: 221121
URL: http://svn.freebsd.org/changeset/base/221121

Log:
  - Add the possibility to reuse the already last used timeout when patting
    the watchdog, via the watchdog(9) interface.
    For that, the WD_LASTVAL bitwise operation is used. It is mutually
    exclusive with any explicit timout passing to the watchdogs.
    The last timeout can be returned via the wdog_kern_last_timeout()
    KPI.
  - Add the possibility to pat the watchdogs installed via the watchdog(9)
    interface from the kernel.
    In order to do that the new KPI wdog_kern_pat() is offered and it does
    accept normalized nanoseconds or WD_LASTVAL.
  - Avoid to pass WD_ACTIVE down in the watchdog handlers. All the control
    bit processing should over to the upper layer functions and not passed
    down to the handlers at all.
  
  These changes are intended to be used in order to fix up the watchdog
  tripping in situation when the userland is busted, but protection is still
  wanted (examples: shutdown syncing / disk dumping).
  
  Sponsored by:	Sandvine Incorporated
  Reviewed by:	emaste, des, cognet
  MFC after:	2 weeks

Modified:
  head/sys/ddb/db_command.c
  head/sys/dev/watchdog/watchdog.c
  head/sys/sys/watchdog.h

Modified: head/sys/ddb/db_command.c
==============================================================================
--- head/sys/ddb/db_command.c	Wed Apr 27 16:16:01 2011	(r221120)
+++ head/sys/ddb/db_command.c	Wed Apr 27 16:43:03 2011	(r221121)
@@ -724,14 +724,6 @@ db_watchdog(dummy1, dummy2, dummy3, dumm
 	} else if ((tout & WD_INTERVAL) == WD_TO_NEVER) {
 		db_error("Out of range watchdog interval\n");
 		return;
-	} else {
-
-		/*
-		 * XXX: Right now we only support WD_ACTIVE, in the future we
-		 * may be possibly needing a more convoluted function for
-		 * dealing with different cases.
-		 */
-		tout |= WD_ACTIVE;
 	}
 	EVENTHANDLER_INVOKE(watchdog_list, tout, &i);
 }

Modified: head/sys/dev/watchdog/watchdog.c
==============================================================================
--- head/sys/dev/watchdog/watchdog.c	Wed Apr 27 16:16:01 2011	(r221120)
+++ head/sys/dev/watchdog/watchdog.c	Wed Apr 27 16:43:03 2011	(r221121)
@@ -40,35 +40,73 @@ __FBSDID("$FreeBSD$");
 #include 
 
 static struct cdev *wd_dev;
+static volatile u_int wd_last_u;
+
+static int
+kern_do_pat(u_int utim)
+{
+	int error;
+
+	if ((utim & WD_LASTVAL) != 0 && (utim & WD_INTERVAL) > 0)
+		return (EINVAL);
+
+	if ((utim & WD_LASTVAL) != 0) {
+		MPASS((wd_last_u & ~WD_INTERVAL) == 0);
+		utim &= ~WD_LASTVAL;
+		utim |= wd_last_u;
+	} else
+		wd_last_u = (utim & WD_INTERVAL);
+	if ((utim & WD_INTERVAL) == WD_TO_NEVER) {
+		utim = 0;
+
+		/* Assume all is well; watchdog signals failure. */
+		error = 0;
+	} else {
+		/* Assume no watchdog available; watchdog flags success */
+		error = EOPNOTSUPP;
+	}
+	EVENTHANDLER_INVOKE(watchdog_list, utim, &error);
+	return (error);
+}
 
 static int
 wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data,
     int flags __unused, struct thread *td)
 {
-	int error;
 	u_int u;
 
 	if (cmd != WDIOCPATPAT)
 		return (ENOIOCTL);
 	u = *(u_int *)data;
-	if (u & ~(WD_ACTIVE | WD_PASSIVE | WD_INTERVAL))
+	if (u & ~(WD_ACTIVE | WD_PASSIVE | WD_LASTVAL | WD_INTERVAL))
 		return (EINVAL);
 	if ((u & (WD_ACTIVE | WD_PASSIVE)) == (WD_ACTIVE | WD_PASSIVE))
 		return (EINVAL);
-	if ((u & (WD_ACTIVE | WD_PASSIVE)) == 0 && (u & WD_INTERVAL) > 0)
+	if ((u & (WD_ACTIVE | WD_PASSIVE)) == 0 && ((u & WD_INTERVAL) > 0 ||
+	    (u & WD_LASTVAL) != 0))
 		return (EINVAL);
 	if (u & WD_PASSIVE)
 		return (ENOSYS);	/* XXX Not implemented yet */
-	if ((u & WD_INTERVAL) == WD_TO_NEVER) {
-		u = 0;
-		/* Assume all is well; watchdog signals failure. */
-		error = 0;
-	} else {
-		/* Assume no watchdog available; watchdog flags success */
-		error = EOPNOTSUPP;
-	}
-	EVENTHANDLER_INVOKE(watchdog_list, u, &error);
-	return (error);
+	u &= ~(WD_ACTIVE | WD_PASSIVE);
+
+	return (kern_do_pat(u));
+}
+
+u_int
+wdog_kern_last_timeout(void)
+{
+
+	return (wd_last_u);
+}
+
+int
+wdog_kern_pat(u_int utim)
+{
+
+	if (utim & ~(WD_LASTVAL | WD_INTERVAL))
+		return (EINVAL);
+
+	return (kern_do_pat(utim));
 }
 
 static struct cdevsw wd_cdevsw = {

Modified: head/sys/sys/watchdog.h
==============================================================================
--- head/sys/sys/watchdog.h	Wed Apr 27 16:16:01 2011	(r221120)
+++ head/sys/sys/watchdog.h	Wed Apr 27 16:43:03 2011	(r221121)
@@ -50,6 +50,12 @@
 	 * right to the kernel.
  	 */
 
+#define WD_LASTVAL	0x0200000
+	/*
+	 * Use the already last used timeout value.
+	 * The kernel will use as timeout the last valid timeout provided.
+ 	 */
+
 #define WD_INTERVAL	0x00000ff
 	/*
 	 * Mask for duration bits.
@@ -78,6 +84,9 @@
 typedef void (*watchdog_fn)(void *, u_int, int *);
 
 EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn);
+
+u_int	wdog_kern_last_timeout(void);
+int	wdog_kern_pat(u_int utim);
 #endif
 
 #endif /* _SYS_WATCHDOG_H */

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 17:07: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 42A90106564A;
	Wed, 27 Apr 2011 17:07:23 +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 19B3E8FC14;
	Wed, 27 Apr 2011 17:07: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 p3RH7MlY080460;
	Wed, 27 Apr 2011 17:07:22 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RH7MJT080455;
	Wed, 27 Apr 2011 17:07:22 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201104271707.p3RH7MJT080455@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Wed, 27 Apr 2011 17:07:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221122 - stable/8/sys/mips/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, 27 Apr 2011 17:07:23 -0000

Author: pluknet
Date: Wed Apr 27 17:07:22 2011
New Revision: 221122
URL: http://svn.freebsd.org/changeset/base/221122

Log:
  MFC r216475 (by gonzo):
  - include argument should be in quotes

Modified:
  stable/8/sys/mips/conf/SWARM
  stable/8/sys/mips/conf/SWARM64
  stable/8/sys/mips/conf/SWARM64_SMP
  stable/8/sys/mips/conf/SWARM_SMP
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/mips/conf/SWARM
==============================================================================
--- stable/8/sys/mips/conf/SWARM	Wed Apr 27 16:43:03 2011	(r221121)
+++ stable/8/sys/mips/conf/SWARM	Wed Apr 27 17:07:22 2011	(r221122)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 #
 
-include		std.SWARM
+include		"std.SWARM"
 
 ident		SWARM
 

Modified: stable/8/sys/mips/conf/SWARM64
==============================================================================
--- stable/8/sys/mips/conf/SWARM64	Wed Apr 27 16:43:03 2011	(r221121)
+++ stable/8/sys/mips/conf/SWARM64	Wed Apr 27 17:07:22 2011	(r221122)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 #
 
-include		std.SWARM
+include		"std.SWARM"
 
 ident		SWARM64
 

Modified: stable/8/sys/mips/conf/SWARM64_SMP
==============================================================================
--- stable/8/sys/mips/conf/SWARM64_SMP	Wed Apr 27 16:43:03 2011	(r221121)
+++ stable/8/sys/mips/conf/SWARM64_SMP	Wed Apr 27 17:07:22 2011	(r221122)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 #
 
-include		std.SWARM
+include		"std.SWARM"
 
 ident		SWARM64_SMP
 

Modified: stable/8/sys/mips/conf/SWARM_SMP
==============================================================================
--- stable/8/sys/mips/conf/SWARM_SMP	Wed Apr 27 16:43:03 2011	(r221121)
+++ stable/8/sys/mips/conf/SWARM_SMP	Wed Apr 27 17:07:22 2011	(r221122)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 #
 
-include		std.SWARM
+include		"std.SWARM"
 
 ident		SWARM_SMP
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 17:36: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 E53DB106566B;
	Wed, 27 Apr 2011 17:36:37 +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 BD9BE8FC18;
	Wed, 27 Apr 2011 17:36: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 p3RHabAV081402;
	Wed, 27 Apr 2011 17:36:37 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RHab6c081400;
	Wed, 27 Apr 2011 17:36:37 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104271736.p3RHab6c081400@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 17:36: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: r221123 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 17:36:38 -0000

Author: jhb
Date: Wed Apr 27 17:36:37 2011
New Revision: 221123
URL: http://svn.freebsd.org/changeset/base/221123

Log:
  Raise rlogin back to a WARNS level of 6.
  
  Tested by:	make universe

Modified:
  head/usr.bin/rlogin/Makefile

Modified: head/usr.bin/rlogin/Makefile
==============================================================================
--- head/usr.bin/rlogin/Makefile	Wed Apr 27 17:07:22 2011	(r221122)
+++ head/usr.bin/rlogin/Makefile	Wed Apr 27 17:36:37 2011	(r221123)
@@ -7,6 +7,4 @@ BINOWN=	root
 BINMODE=4555
 PRECIOUSPROG=
 
-WARNS?=	3
-
 .include 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 17:51: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 52E871065670;
	Wed, 27 Apr 2011 17:51:52 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 41EDA8FC0A;
	Wed, 27 Apr 2011 17:51: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 p3RHpqlf081925;
	Wed, 27 Apr 2011 17:51:52 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RHpp6H081910;
	Wed, 27 Apr 2011 17:51:51 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104271751.p3RHpp6H081910@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 17:51: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: r221124 - in head: . sbin/mount sbin/mount_nfs
	sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf
	sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
	sys/sun4v/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, 27 Apr 2011 17:51:52 -0000

Author: rmacklem
Date: Wed Apr 27 17:51:51 2011
New Revision: 221124
URL: http://svn.freebsd.org/changeset/base/221124

Log:
  This patch changes head so that the default NFS client is now the new
  NFS client (which I guess is no longer experimental). The fstype "newnfs"
  is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
  Although mounts via fstype "nfs" will usually work without userland
  changes, an updated mount_nfs(8) binary is needed for kernels built with
  "options NFSCL" but not "options NFSCLIENT". Updated mount_nfs(8) and
  mount(8) binaries are needed to do mounts for fstype "oldnfs".
  The GENERIC kernel configs have been changed to use options
  NFSCL and NFSD (the new client and server) instead of NFSCLIENT and NFSSERVER.
  For kernels being used on diskless NFS root systems, "options NFSCL"
  must be in the kernel config.
  Discussed on freebsd-fs@.

Modified:
  head/UPDATING
  head/sbin/mount/mount.c
  head/sbin/mount_nfs/Makefile
  head/sbin/mount_nfs/mount_nfs.c
  head/sys/amd64/conf/GENERIC
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/i386/conf/GENERIC
  head/sys/ia64/conf/GENERIC
  head/sys/nfsclient/nfs_vfsops.c
  head/sys/pc98/conf/GENERIC
  head/sys/powerpc/conf/GENERIC
  head/sys/powerpc/conf/GENERIC64
  head/sys/sparc64/conf/GENERIC
  head/sys/sun4v/conf/GENERIC

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/UPDATING	Wed Apr 27 17:51:51 2011	(r221124)
@@ -22,6 +22,24 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20110427:
+	The default NFS client is now the new NFS client, so fstype "newnfs"
+	is now "nfs" and the regular/old NFS client is now fstype "oldnfs".
+	Although mounts via fstype "nfs" will usually work without userland
+	changes, it is recommended that the mount(8) and mount_nfs(8)
+	commands be rebuilt from sources and that a link to mount_nfs called
+	mount_oldnfs be created. The new client is compiled into the
+	kernel with "options NFSCL" and this is needed for diskless root
+	file systems. The GENERIC kernel configs have been changed to use
+	NFSCL and NFSD (the new server) instead of NFSCLIENT and NFSSERVER.
+	To use the regular/old client, you can "mount -t oldnfs ...". For
+	a diskless root file system, you must also include a line like:
+	
+	vfs.root.mountfrom="oldnfs:"
+
+	in the boot/loader.conf on the root fs on the NFS server to make
+	a diskless root fs use the old client.
+
 20110424:
 	The GENERIC kernels for all architectures now default to the new
 	CAM-based ATA stack. It means that all legacy ATA drivers were

Modified: head/sbin/mount/mount.c
==============================================================================
--- head/sbin/mount/mount.c	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sbin/mount/mount.c	Wed Apr 27 17:51:51 2011	(r221124)
@@ -141,8 +141,8 @@ use_mountprog(const char *vfstype)
 	 */
 	unsigned int i;
 	const char *fs[] = {
-	"cd9660", "mfs", "msdosfs", "newnfs", "nfs", "ntfs",
-	"nwfs", "nullfs", "portalfs", "smbfs", "udf", "unionfs",
+	"cd9660", "mfs", "msdosfs", "nfs", "ntfs",
+	"nwfs", "nullfs", "oldnfs", "portalfs", "smbfs", "udf", "unionfs",
 	NULL
 	};
 

Modified: head/sbin/mount_nfs/Makefile
==============================================================================
--- head/sbin/mount_nfs/Makefile	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sbin/mount_nfs/Makefile	Wed Apr 27 17:51:51 2011	(r221124)
@@ -12,7 +12,7 @@ UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.u
 CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL}
 WARNS?=	3
 
-LINKS=	${BINDIR}/mount_nfs ${BINDIR}/mount_newnfs
+LINKS=	${BINDIR}/mount_nfs ${BINDIR}/mount_oldnfs
 
 .PATH: ${MOUNT} ${UMNTALL}
 

Modified: head/sbin/mount_nfs/mount_nfs.c
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.c	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sbin/mount_nfs/mount_nfs.c	Wed Apr 27 17:51:51 2011	(r221124)
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
 				} else if (strcmp(opt, "nfsv4") == 0) {
 					pass_flag_to_nmount=0;
 					mountmode = V4;
-					fstype = "newnfs";
+					fstype = "nfs";
 					nfsproto = IPPROTO_TCP;
 					if (portspec == NULL)
 						portspec = "2049";
@@ -381,14 +381,10 @@ main(int argc, char *argv[])
 		retrycnt = 0;
 
 	/*
-	 * If the experimental nfs subsystem is loaded into the kernel
-	 * and the regular one is not, use it. Otherwise, use it if the
-	 * fstype is set to "newnfs", either via "mount -t newnfs ..."
-	 * or by specifying an nfsv4 mount.
+	 * If the fstye is "oldnfs", run the old NFS client unless the
+	 * "nfsv4" option was specified.
 	 */
-	if (modfind("nfscl") >= 0 && modfind("nfs") < 0) {
-		fstype = "newnfs";
-	} else if (strcmp(fstype, "newnfs") == 0) {
+	if (strcmp(fstype, "nfs") == 0) {
 		if (modfind("nfscl") < 0) {
 			/* Not present in kernel, try loading it */
 			if (kldload("nfscl") < 0 ||

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/amd64/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -34,8 +34,8 @@ options 	UFS_ACL			# Support for access 
 options 	UFS_DIRHASH		# Improve performance on big directories
 options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
 options 	MD_ROOT			# MD is a potential root device
-options 	NFSCLIENT		# Network Filesystem Client
-options 	NFSSERVER		# Network Filesystem Server
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
 options 	NFSLOCKD		# Network Lock Manager
 options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 options 	MSDOSFS			# MSDOS Filesystem

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Wed Apr 27 17:51:51 2011	(r221124)
@@ -131,7 +131,7 @@ static struct vfsops nfs_vfsops = {
 	.vfs_unmount =		nfs_unmount,
 	.vfs_sysctl =		nfs_sysctl,
 };
-VFS_SET(nfs_vfsops, newnfs, VFCF_NETWORK);
+VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
 MODULE_VERSION(newnfs, 1);

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/i386/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -36,8 +36,8 @@ options 	UFS_ACL			# Support for access 
 options 	UFS_DIRHASH		# Improve performance on big directories
 options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
 options 	MD_ROOT			# MD is a potential root device
-options 	NFSCLIENT		# Network Filesystem Client
-options 	NFSSERVER		# Network Filesystem Server
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
 options 	NFSLOCKD		# Network Lock Manager
 options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 options 	MSDOSFS			# MSDOS Filesystem

Modified: head/sys/ia64/conf/GENERIC
==============================================================================
--- head/sys/ia64/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/ia64/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -43,9 +43,9 @@ options 	KTRACE		# ktrace(1) syscall tra
 options 	MAC		# TrustedBSD MAC Framework
 options 	MD_ROOT		# MD usable as root device
 options 	MSDOSFS		# MSDOS Filesystem
-options 	NFSCLIENT	# Network Filesystem Client
+options 	NFSCL		# New Network Filesystem Client
 options 	NFSLOCKD	# Network Lock Manager
-options 	NFSSERVER	# Network Filesystem Server
+options 	NFSD		# New Network Filesystem Server
 options 	NFS_ROOT	# NFS usable as root device
 options 	P1003_1B_SEMAPHORES	# POSIX-style semaphores
 options 	PREEMPTION	# Enable kernel thread preemption

Modified: head/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- head/sys/nfsclient/nfs_vfsops.c	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/nfsclient/nfs_vfsops.c	Wed Apr 27 17:51:51 2011	(r221124)
@@ -144,7 +144,7 @@ static struct vfsops nfs_vfsops = {
 	.vfs_unmount =		nfs_unmount,
 	.vfs_sysctl =		nfs_sysctl,
 };
-VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
+VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK);
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
 MODULE_VERSION(nfs, 1);

Modified: head/sys/pc98/conf/GENERIC
==============================================================================
--- head/sys/pc98/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/pc98/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -36,8 +36,8 @@ options 	UFS_ACL			# Support for access 
 options 	UFS_DIRHASH		# Improve performance on big directories
 options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
 options 	MD_ROOT			# MD is a potential root device
-options 	NFSCLIENT		# Network Filesystem Client
-options 	NFSSERVER		# Network Filesystem Server
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
 options 	NFSLOCKD		# Network Lock Manager
 options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 options 	MSDOSFS			# MSDOS Filesystem

Modified: head/sys/powerpc/conf/GENERIC
==============================================================================
--- head/sys/powerpc/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/powerpc/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -40,8 +40,8 @@ options 	UFS_ACL			#Support for access c
 options 	UFS_DIRHASH		#Improve performance on big directories
 options 	UFS_GJOURNAL		#Enable gjournal-based UFS journaling
 options 	MD_ROOT			#MD is a potential root device
-options 	NFSCLIENT		#Network Filesystem Client
-options 	NFSSERVER		#Network Filesystem Server
+options 	NFSCL			#New Network Filesystem Client
+options 	NFSD			#New Network Filesystem Server
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFS_ROOT		#NFS usable as root device
 options 	MSDOSFS			#MSDOS Filesystem

Modified: head/sys/powerpc/conf/GENERIC64
==============================================================================
--- head/sys/powerpc/conf/GENERIC64	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/powerpc/conf/GENERIC64	Wed Apr 27 17:51:51 2011	(r221124)
@@ -40,8 +40,8 @@ options 	UFS_ACL			#Support for access c
 options 	UFS_DIRHASH		#Improve performance on big directories
 options 	UFS_GJOURNAL		#Enable gjournal-based UFS journaling
 options 	MD_ROOT			#MD is a potential root device
-options 	NFSCLIENT		#Network Filesystem Client
-options 	NFSSERVER		#Network Filesystem Server
+options 	NFSCL			#New Network Filesystem Client
+options 	NFSD			#New Network Filesystem Server
 options 	NFSLOCKD		#Network Lock Manager
 options 	NFS_ROOT		#NFS usable as root device
 options 	MSDOSFS			#MSDOS Filesystem

Modified: head/sys/sparc64/conf/GENERIC
==============================================================================
--- head/sys/sparc64/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/sparc64/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -37,8 +37,8 @@ options 	UFS_ACL			# Support for access 
 options 	UFS_DIRHASH		# Improve performance on big directories
 options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
 options 	MD_ROOT			# MD is a potential root device
-options 	NFSCLIENT		# Network Filesystem Client
-options 	NFSSERVER		# Network Filesystem Server
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
 options 	NFSLOCKD		# Network Lock Manager
 options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 #options 	MSDOSFS			# MSDOS Filesystem

Modified: head/sys/sun4v/conf/GENERIC
==============================================================================
--- head/sys/sun4v/conf/GENERIC	Wed Apr 27 17:36:37 2011	(r221123)
+++ head/sys/sun4v/conf/GENERIC	Wed Apr 27 17:51:51 2011	(r221124)
@@ -40,8 +40,8 @@ options 	UFS_ACL			# Support for access 
 options 	UFS_DIRHASH		# Improve performance on big directories
 options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
 options 	MD_ROOT			# MD is a potential root device
-options 	NFSCLIENT		# Network Filesystem Client
-options 	NFSSERVER		# Network Filesystem Server
+options 	NFSCL			# New Network Filesystem Client
+options 	NFSD			# New Network Filesystem Server
 options 	NFSLOCKD		# Network Lock Manager
 options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
 #options 	MSDOSFS			# MSDOS Filesystem

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 18:00: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 4A5861065672;
	Wed, 27 Apr 2011 18:00:48 +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 37E2A8FC0A;
	Wed, 27 Apr 2011 18:00: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 p3RI0mn9082388;
	Wed, 27 Apr 2011 18:00:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RI0kJD082284;
	Wed, 27 Apr 2011 18:00:46 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104271800.p3RI0kJD082284@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 18:00:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221125 - in stable/8/sys: amd64/acpica cam
	dev/sound/usb dev/usb dev/usb/controller dev/usb/input
	dev/usb/misc dev/usb/net dev/usb/quirk dev/usb/serial
	dev/usb/storage dev/usb/template...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 18:00:48 -0000

Author: jhb
Date: Wed Apr 27 18:00:46 2011
New Revision: 221125
URL: http://svn.freebsd.org/changeset/base/221125

Log:
  MFC 217265:
  Remove unneeded includes of .  Other headers that use
  it internally contain nested includes.
  
  Requested by:	hselasky

Modified:
  stable/8/sys/amd64/acpica/OsdEnvironment.c
  stable/8/sys/cam/cam_periph.c
  stable/8/sys/dev/sound/usb/uaudio.c
  stable/8/sys/dev/usb/controller/at91dci.c
  stable/8/sys/dev/usb/controller/at91dci_atmelarm.c
  stable/8/sys/dev/usb/controller/atmegadci.c
  stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c
  stable/8/sys/dev/usb/controller/avr32dci.c
  stable/8/sys/dev/usb/controller/ehci.c
  stable/8/sys/dev/usb/controller/ehci_ixp4xx.c
  stable/8/sys/dev/usb/controller/ehci_mbus.c
  stable/8/sys/dev/usb/controller/ehci_pci.c
  stable/8/sys/dev/usb/controller/musb_otg.c
  stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c
  stable/8/sys/dev/usb/controller/ohci.c
  stable/8/sys/dev/usb/controller/ohci_atmelarm.c
  stable/8/sys/dev/usb/controller/ohci_pci.c
  stable/8/sys/dev/usb/controller/uhci.c
  stable/8/sys/dev/usb/controller/uhci_pci.c
  stable/8/sys/dev/usb/controller/usb_controller.c
  stable/8/sys/dev/usb/controller/uss820dci.c
  stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c
  stable/8/sys/dev/usb/controller/xhci.c
  stable/8/sys/dev/usb/controller/xhci_pci.c
  stable/8/sys/dev/usb/input/uhid.c
  stable/8/sys/dev/usb/input/ukbd.c
  stable/8/sys/dev/usb/input/ums.c
  stable/8/sys/dev/usb/misc/udbp.c
  stable/8/sys/dev/usb/misc/ufm.c
  stable/8/sys/dev/usb/net/if_aue.c
  stable/8/sys/dev/usb/net/if_axe.c
  stable/8/sys/dev/usb/net/if_cdce.c
  stable/8/sys/dev/usb/net/if_cue.c
  stable/8/sys/dev/usb/net/if_ipheth.c
  stable/8/sys/dev/usb/net/if_kue.c
  stable/8/sys/dev/usb/net/if_rue.c
  stable/8/sys/dev/usb/net/if_udav.c
  stable/8/sys/dev/usb/net/usb_ethernet.c
  stable/8/sys/dev/usb/quirk/usb_quirk.c
  stable/8/sys/dev/usb/serial/u3g.c
  stable/8/sys/dev/usb/serial/uark.c
  stable/8/sys/dev/usb/serial/ubsa.c
  stable/8/sys/dev/usb/serial/ubser.c
  stable/8/sys/dev/usb/serial/uchcom.c
  stable/8/sys/dev/usb/serial/ucycom.c
  stable/8/sys/dev/usb/serial/ufoma.c
  stable/8/sys/dev/usb/serial/uftdi.c
  stable/8/sys/dev/usb/serial/ugensa.c
  stable/8/sys/dev/usb/serial/uipaq.c
  stable/8/sys/dev/usb/serial/ulpt.c
  stable/8/sys/dev/usb/serial/umct.c
  stable/8/sys/dev/usb/serial/umodem.c
  stable/8/sys/dev/usb/serial/umoscom.c
  stable/8/sys/dev/usb/serial/uplcom.c
  stable/8/sys/dev/usb/serial/usb_serial.c
  stable/8/sys/dev/usb/serial/uslcom.c
  stable/8/sys/dev/usb/serial/uvisor.c
  stable/8/sys/dev/usb/serial/uvscom.c
  stable/8/sys/dev/usb/storage/umass.c
  stable/8/sys/dev/usb/storage/urio.c
  stable/8/sys/dev/usb/storage/ustorage_fs.c
  stable/8/sys/dev/usb/template/usb_template.c
  stable/8/sys/dev/usb/template/usb_template_cdce.c
  stable/8/sys/dev/usb/template/usb_template_msc.c
  stable/8/sys/dev/usb/template/usb_template_mtp.c
  stable/8/sys/dev/usb/usb_busdma.c
  stable/8/sys/dev/usb/usb_compat_linux.c
  stable/8/sys/dev/usb/usb_core.c
  stable/8/sys/dev/usb/usb_debug.c
  stable/8/sys/dev/usb/usb_dev.c
  stable/8/sys/dev/usb/usb_device.c
  stable/8/sys/dev/usb/usb_dynamic.c
  stable/8/sys/dev/usb/usb_error.c
  stable/8/sys/dev/usb/usb_generic.c
  stable/8/sys/dev/usb/usb_handle_request.c
  stable/8/sys/dev/usb/usb_hid.c
  stable/8/sys/dev/usb/usb_hub.c
  stable/8/sys/dev/usb/usb_lookup.c
  stable/8/sys/dev/usb/usb_mbuf.c
  stable/8/sys/dev/usb/usb_msctest.c
  stable/8/sys/dev/usb/usb_parse.c
  stable/8/sys/dev/usb/usb_process.c
  stable/8/sys/dev/usb/usb_request.c
  stable/8/sys/dev/usb/usb_transfer.c
  stable/8/sys/dev/usb/usb_util.c
  stable/8/sys/i386/acpica/OsdEnvironment.c
  stable/8/sys/ia64/acpica/OsdEnvironment.c
  stable/8/sys/kern/kern_lock.c
  stable/8/sys/kern/kern_sx.c
  stable/8/sys/kern/subr_lock.c
  stable/8/sys/kern/subr_pcpu.c
  stable/8/sys/mips/cavium/usb/octusb.c
  stable/8/sys/mips/cavium/usb/octusb_octeon.c
  stable/8/sys/mips/rmi/xls_ehci.c
  stable/8/sys/net/vnet.c
  stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
  stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
  stable/8/sys/sparc64/sparc64/db_trace.c
  stable/8/sys/sparc64/sparc64/tlb.c
  stable/8/sys/sparc64/sparc64/tsb.c
  stable/8/sys/sparc64/sparc64/vm_machdep.c
  stable/8/sys/sun4v/sun4v/db_interface.c
  stable/8/sys/sun4v/sun4v/db_trace.c
  stable/8/sys/sun4v/sun4v/vm_machdep.c
  stable/8/sys/vm/phys_pager.c
  stable/8/sys/vm/vm_contig.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/amd64/acpica/OsdEnvironment.c
==============================================================================
--- stable/8/sys/amd64/acpica/OsdEnvironment.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/amd64/acpica/OsdEnvironment.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
  */
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: stable/8/sys/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/cam/cam_periph.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/sound/usb/uaudio.c
==============================================================================
--- stable/8/sys/dev/sound/usb/uaudio.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/sound/usb/uaudio.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -53,7 +53,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/at91dci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/at91dci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/at91dci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/at91dci_atmelarm.c
==============================================================================
--- stable/8/sys/dev/usb/controller/at91dci_atmelarm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/at91dci_atmelarm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/atmegadci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/atmegadci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c
==============================================================================
--- stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/avr32dci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/avr32dci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ehci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ehci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ehci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ehci_ixp4xx.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ehci_ixp4xx.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ehci_ixp4xx.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ehci_mbus.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ehci_mbus.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ehci_mbus.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ehci_pci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ehci_pci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ehci_pci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- stable/8/sys/dev/usb/controller/musb_otg.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/musb_otg.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c
==============================================================================
--- stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ohci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ohci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ohci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ohci_atmelarm.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ohci_atmelarm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ohci_atmelarm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/ohci_pci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ohci_pci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/ohci_pci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/uhci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/uhci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/uhci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/uhci_pci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/uhci_pci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/uhci_pci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/8/sys/dev/usb/controller/usb_controller.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/usb_controller.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/uss820dci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/uss820dci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c
==============================================================================
--- stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/xhci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/xhci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/xhci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/controller/xhci_pci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/xhci_pci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/controller/xhci_pci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/input/uhid.c
==============================================================================
--- stable/8/sys/dev/usb/input/uhid.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/input/uhid.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/input/ukbd.c
==============================================================================
--- stable/8/sys/dev/usb/input/ukbd.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/input/ukbd.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/input/ums.c
==============================================================================
--- stable/8/sys/dev/usb/input/ums.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/input/ums.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/misc/udbp.c
==============================================================================
--- stable/8/sys/dev/usb/misc/udbp.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/misc/udbp.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/misc/ufm.c
==============================================================================
--- stable/8/sys/dev/usb/misc/ufm.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/misc/ufm.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_aue.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_aue.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_aue.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_axe.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_axe.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_axe.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_cdce.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_cdce.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_cdce.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_cue.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_cue.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_cue.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_ipheth.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_ipheth.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_ipheth.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_kue.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_kue.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_kue.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_rue.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_rue.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_rue.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/if_udav.c
==============================================================================
--- stable/8/sys/dev/usb/net/if_udav.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/if_udav.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/net/usb_ethernet.c
==============================================================================
--- stable/8/sys/dev/usb/net/usb_ethernet.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/net/usb_ethernet.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c
==============================================================================
--- stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/quirk/usb_quirk.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/u3g.c
==============================================================================
--- stable/8/sys/dev/usb/serial/u3g.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/u3g.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -39,7 +39,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uark.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uark.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uark.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ubsa.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ubsa.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ubsa.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ubser.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ubser.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ubser.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uchcom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uchcom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uchcom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -78,7 +78,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ucycom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ucycom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ucycom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ufoma.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ufoma.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ufoma.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uftdi.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uftdi.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uftdi.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ugensa.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ugensa.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ugensa.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -43,7 +43,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uipaq.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uipaq.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uipaq.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/ulpt.c
==============================================================================
--- stable/8/sys/dev/usb/serial/ulpt.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/ulpt.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/umct.c
==============================================================================
--- stable/8/sys/dev/usb/serial/umct.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/umct.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/umodem.c
==============================================================================
--- stable/8/sys/dev/usb/serial/umodem.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/umodem.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/umoscom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/umoscom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/umoscom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uplcom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uplcom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uplcom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/usb_serial.c
==============================================================================
--- stable/8/sys/dev/usb/serial/usb_serial.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/usb_serial.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uslcom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uslcom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uslcom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -27,7 +27,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uvisor.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uvisor.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uvisor.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -55,7 +55,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/serial/uvscom.c
==============================================================================
--- stable/8/sys/dev/usb/serial/uvscom.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/serial/uvscom.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/storage/umass.c
==============================================================================
--- stable/8/sys/dev/usb/storage/umass.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/storage/umass.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -110,7 +110,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/storage/urio.c
==============================================================================
--- stable/8/sys/dev/usb/storage/urio.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/storage/urio.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/storage/ustorage_fs.c
==============================================================================
--- stable/8/sys/dev/usb/storage/ustorage_fs.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/storage/ustorage_fs.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -44,7 +44,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/template/usb_template.c
==============================================================================
--- stable/8/sys/dev/usb/template/usb_template.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/template/usb_template.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -37,7 +37,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/template/usb_template_cdce.c
==============================================================================
--- stable/8/sys/dev/usb/template/usb_template_cdce.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/template/usb_template_cdce.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/template/usb_template_msc.c
==============================================================================
--- stable/8/sys/dev/usb/template/usb_template_msc.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/template/usb_template_msc.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/template/usb_template_mtp.c
==============================================================================
--- stable/8/sys/dev/usb/template/usb_template_mtp.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/template/usb_template_mtp.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_busdma.c
==============================================================================
--- stable/8/sys/dev/usb/usb_busdma.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_busdma.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_compat_linux.c
==============================================================================
--- stable/8/sys/dev/usb/usb_compat_linux.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_compat_linux.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_core.c
==============================================================================
--- stable/8/sys/dev/usb/usb_core.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_core.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_debug.c
==============================================================================
--- stable/8/sys/dev/usb/usb_debug.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_debug.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_dev.c
==============================================================================
--- stable/8/sys/dev/usb/usb_dev.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_dev.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -35,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_device.c
==============================================================================
--- stable/8/sys/dev/usb/usb_device.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_device.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_dynamic.c
==============================================================================
--- stable/8/sys/dev/usb/usb_dynamic.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_dynamic.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_error.c
==============================================================================
--- stable/8/sys/dev/usb/usb_error.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_error.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_generic.c
==============================================================================
--- stable/8/sys/dev/usb/usb_generic.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_generic.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_handle_request.c
==============================================================================
--- stable/8/sys/dev/usb/usb_handle_request.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_handle_request.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_hid.c
==============================================================================
--- stable/8/sys/dev/usb/usb_hid.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_hid.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_hub.c
==============================================================================
--- stable/8/sys/dev/usb/usb_hub.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_hub.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -38,7 +38,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_lookup.c
==============================================================================
--- stable/8/sys/dev/usb/usb_lookup.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_lookup.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_mbuf.c
==============================================================================
--- stable/8/sys/dev/usb/usb_mbuf.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_mbuf.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_msctest.c
==============================================================================
--- stable/8/sys/dev/usb/usb_msctest.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_msctest.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_parse.c
==============================================================================
--- stable/8/sys/dev/usb/usb_parse.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_parse.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_process.c
==============================================================================
--- stable/8/sys/dev/usb/usb_process.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_process.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_request.c
==============================================================================
--- stable/8/sys/dev/usb/usb_request.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_request.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_transfer.c
==============================================================================
--- stable/8/sys/dev/usb/usb_transfer.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_transfer.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/dev/usb/usb_util.c
==============================================================================
--- stable/8/sys/dev/usb/usb_util.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/dev/usb/usb_util.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/i386/acpica/OsdEnvironment.c
==============================================================================
--- stable/8/sys/i386/acpica/OsdEnvironment.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/i386/acpica/OsdEnvironment.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
  */
 #include 
 #include 
-#include 
 #include 
 
 #include 

Modified: stable/8/sys/ia64/acpica/OsdEnvironment.c
==============================================================================
--- stable/8/sys/ia64/acpica/OsdEnvironment.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/ia64/acpica/OsdEnvironment.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -29,7 +29,6 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
 #include 
 #include 
 

Modified: stable/8/sys/kern/kern_lock.c
==============================================================================
--- stable/8/sys/kern/kern_lock.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/kern/kern_lock.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/kern/kern_sx.c
==============================================================================
--- stable/8/sys/kern/kern_sx.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/kern/kern_sx.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/kern/subr_lock.c
==============================================================================
--- stable/8/sys/kern/subr_lock.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/kern/subr_lock.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/kern/subr_pcpu.c
==============================================================================
--- stable/8/sys/kern/subr_pcpu.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/kern/subr_pcpu.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/mips/cavium/usb/octusb.c
==============================================================================
--- stable/8/sys/mips/cavium/usb/octusb.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/mips/cavium/usb/octusb.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/mips/cavium/usb/octusb_octeon.c
==============================================================================
--- stable/8/sys/mips/cavium/usb/octusb_octeon.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/mips/cavium/usb/octusb_octeon.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/mips/rmi/xls_ehci.c
==============================================================================
--- stable/8/sys/mips/rmi/xls_ehci.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/mips/rmi/xls_ehci.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/net/vnet.c
==============================================================================
--- stable/8/sys/net/vnet.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/net/vnet.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
==============================================================================
--- stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -100,7 +100,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
==============================================================================
--- stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -39,7 +39,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/sparc64/sparc64/db_trace.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/db_trace.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/sparc64/sparc64/db_trace.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/sparc64/sparc64/tlb.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/tlb.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/sparc64/sparc64/tlb.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: stable/8/sys/sparc64/sparc64/tsb.c
==============================================================================
--- stable/8/sys/sparc64/sparc64/tsb.c	Wed Apr 27 17:51:51 2011	(r221124)
+++ stable/8/sys/sparc64/sparc64/tsb.c	Wed Apr 27 18:00:46 2011	(r221125)
@@ -35,7 +35,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

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

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 18:15: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 3878C1065673;
	Wed, 27 Apr 2011 18:15:35 +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 2A66D8FC14;
	Wed, 27 Apr 2011 18:15: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 p3RIFZiV082941;
	Wed, 27 Apr 2011 18:15:35 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RIFZfi082935;
	Wed, 27 Apr 2011 18:15:35 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104271815.p3RIFZfi082935@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 18:15: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: r221126 - head/sys/fs/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 18:15:35 -0000

Author: jhb
Date: Wed Apr 27 18:15:34 2011
New Revision: 221126
URL: http://svn.freebsd.org/changeset/base/221126

Log:
  Various style fixes including using uint*_t instead of u_int*_t.
  
  Submitted by:	Pedro F. Giffuni  giffunip at yahoo

Modified:
  head/sys/fs/ext2fs/ext2_alloc.c
  head/sys/fs/ext2fs/ext2_dinode.h
  head/sys/fs/ext2fs/ext2_dir.h
  head/sys/fs/ext2fs/ext2fs.h
  head/sys/fs/ext2fs/inode.h

Modified: head/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_alloc.c	Wed Apr 27 18:00:46 2011	(r221125)
+++ head/sys/fs/ext2fs/ext2_alloc.c	Wed Apr 27 18:15:34 2011	(r221126)
@@ -181,7 +181,7 @@ return ENOSPC;
 	struct ext2mount *ump;
 	struct cluster_save *buflist;
 	struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp;
-	int32_t start_lbn, end_lbn, soff, newblk, blkno =0;
+	int32_t start_lbn, end_lbn, soff, newblk, blkno;
 	int i, len, start_lvl, end_lvl, pref, ssize;
 
 	vp = ap->a_vp;
@@ -231,7 +231,7 @@ return ENOSPC;
 	 * Find the preferred location for the cluster.
 	 */
 	EXT2_LOCK(ump);
-	pref = ext2_blkpref(ip, start_lbn, soff, sbap, blkno);
+	pref = ext2_blkpref(ip, start_lbn, soff, sbap, 0);
 	/*
 	 * If the block range spans two block maps, get the second map.
 	 */

Modified: head/sys/fs/ext2fs/ext2_dinode.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_dinode.h	Wed Apr 27 18:00:46 2011	(r221125)
+++ head/sys/fs/ext2fs/ext2_dinode.h	Wed Apr 27 18:15:34 2011	(r221126)
@@ -66,29 +66,29 @@
  * Structure of an inode on the disk
  */
 struct ext2fs_dinode {
-	u_int16_t	e2di_mode;	/*   0: IFMT, permissions; see below. */
-	u_int16_t	e2di_uid;	/*   2: Owner UID */
-	u_int32_t	e2di_size;	/*	 4: Size (in bytes) */
-	u_int32_t	e2di_atime;	/*	 8: Access time */
-	u_int32_t	e2di_ctime;	/*	12: Create time */
-	u_int32_t	e2di_mtime;	/*	16: Modification time */
-	u_int32_t	e2di_dtime;	/*	20: Deletion time */
-	u_int16_t	e2di_gid;	/*  24: Owner GID */
-	u_int16_t	e2di_nlink;	/*  26: File link count */
-	u_int32_t	e2di_nblock;	/*  28: Blocks count */
-	u_int32_t	e2di_flags;	/*  32: Status flags (chflags) */
-	u_int32_t	e2di_linux_reserved1; /* 36 */
-	u_int32_t	e2di_blocks[EXT2_N_BLOCKS]; /* 40: disk blocks */
-	u_int32_t	e2di_gen;	/* 100: generation number */
-	u_int32_t	e2di_facl;	/* 104: file ACL (not implemented) */
-	u_int32_t	e2di_dacl;	/* 108: dir ACL (not implemented) */
-	u_int32_t	e2di_faddr;	/* 112: fragment address */
-	u_int8_t	e2di_nfrag;	/* 116: fragment number */
-	u_int8_t	e2di_fsize;	/* 117: fragment size */
-	u_int16_t	e2di_linux_reserved2; /* 118 */
-	u_int16_t	e2di_uid_high;	/* 120: Owner UID top 16 bits */
-	u_int16_t	e2di_gid_high;	/* 122: Owner GID top 16 bits */
-	u_int32_t	e2di_linux_reserved3; /* 124 */
+	uint16_t	e2di_mode;	/*   0: IFMT, permissions; see below. */
+	uint16_t	e2di_uid;	/*   2: Owner UID */
+	uint32_t	e2di_size;	/*	 4: Size (in bytes) */
+	uint32_t	e2di_atime;	/*	 8: Access time */
+	uint32_t	e2di_ctime;	/*	12: Create time */
+	uint32_t	e2di_mtime;	/*	16: Modification time */
+	uint32_t	e2di_dtime;	/*	20: Deletion time */
+	uint16_t	e2di_gid;	/*  24: Owner GID */
+	uint16_t	e2di_nlink;	/*  26: File link count */
+	uint32_t	e2di_nblock;	/*  28: Blocks count */
+	uint32_t	e2di_flags;	/*  32: Status flags (chflags) */
+	uint32_t	e2di_linux_reserved1; /* 36 */
+	uint32_t	e2di_blocks[EXT2_N_BLOCKS]; /* 40: disk blocks */
+	uint32_t	e2di_gen;	/* 100: generation number */
+	uint32_t	e2di_facl;	/* 104: file ACL (not implemented) */
+	uint32_t	e2di_dacl;	/* 108: dir ACL (not implemented) */
+	uint32_t	e2di_faddr;	/* 112: fragment address */
+	uint8_t		e2di_nfrag;	/* 116: fragment number */
+	uint8_t		e2di_fsize;	/* 117: fragment size */
+	uint16_t	e2di_linux_reserved2; /* 118 */
+	uint16_t	e2di_uid_high;	/* 120: Owner UID top 16 bits */
+	uint16_t	e2di_gid_high;	/* 122: Owner GID top 16 bits */
+	uint32_t	e2di_linux_reserved3; /* 124 */
 };
 
 #endif /* !_FS_EXT2FS_EXT2_DINODE_H_ */

Modified: head/sys/fs/ext2fs/ext2_dir.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_dir.h	Wed Apr 27 18:00:46 2011	(r221125)
+++ head/sys/fs/ext2fs/ext2_dir.h	Wed Apr 27 18:15:34 2011	(r221126)
@@ -35,9 +35,9 @@
 #define EXT2FS_MAXNAMLEN 255
 
 struct	ext2fs_direct {
-	u_int32_t e2d_ino;		/* inode number of entry */
-	u_int16_t e2d_reclen;		/* length of this record */
-	u_int16_t e2d_namlen;		/* length of string in d_name */
+	uint32_t e2d_ino;		/* inode number of entry */
+	uint16_t e2d_reclen;		/* length of this record */
+	uint16_t e2d_namlen;		/* length of string in d_name */
 	char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */
 };
 /*
@@ -47,10 +47,10 @@ struct	ext2fs_direct {
  * file_type field.
  */
 struct	ext2fs_direct_2 {
-	u_int32_t e2d_ino;		/* inode number of entry */
-	u_int16_t e2d_reclen;		/* length of this record */
-	u_int8_t e2d_namlen;		/* length of string in d_name */
-	u_int8_t e2d_type;		/* file type */
+	uint32_t e2d_ino;		/* inode number of entry */
+	uint16_t e2d_reclen;		/* length of this record */
+	uint8_t e2d_namlen;		/* length of string in d_name */
+	uint8_t e2d_type;		/* file type */
 	char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */
 };
 /*

Modified: head/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- head/sys/fs/ext2fs/ext2fs.h	Wed Apr 27 18:00:46 2011	(r221125)
+++ head/sys/fs/ext2fs/ext2fs.h	Wed Apr 27 18:15:34 2011	(r221126)
@@ -65,44 +65,55 @@
  * Super block for an ext2fs file system.
  */
 struct ext2fs {
-	u_int32_t  e2fs_icount;		/* Inode count */
-	u_int32_t  e2fs_bcount;		/* blocks count */
-	u_int32_t  e2fs_rbcount;	/* reserved blocks count */
-	u_int32_t  e2fs_fbcount;	/* free blocks count */
-	u_int32_t  e2fs_ficount;	/* free inodes count */
-	u_int32_t  e2fs_first_dblock;	/* first data block */
-	u_int32_t  e2fs_log_bsize;	/* block size = 1024*(2^e2fs_log_bsize) */
-	u_int32_t  e2fs_log_fsize;	/* fragment size */
-	u_int32_t  e2fs_bpg;		/* blocks per group */
-	u_int32_t  e2fs_fpg;		/* frags per group */
-	u_int32_t  e2fs_ipg;		/* inodes per group */
-	u_int32_t  e2fs_mtime;		/* mount time */
-	u_int32_t  e2fs_wtime;		/* write time */
-	u_int16_t  e2fs_mnt_count;	/* mount count */
-	u_int16_t  e2fs_max_mnt_count;	/* max mount count */
-	u_int16_t  e2fs_magic;		/* magic number */
-	u_int16_t  e2fs_state;		/* file system state */
-	u_int16_t  e2fs_beh;		/* behavior on errors */
-	u_int16_t  e2fs_minrev;		/* minor revision level */
-	u_int32_t  e2fs_lastfsck;	/* time of last fsck */
-	u_int32_t  e2fs_fsckintv;	/* max time between fscks */
-	u_int32_t  e2fs_creator;	/* creator OS */
-	u_int32_t  e2fs_rev;		/* revision level */
-	u_int16_t  e2fs_ruid;		/* default uid for reserved blocks */
-	u_int16_t  e2fs_rgid;		/* default gid for reserved blocks */
+	uint32_t  e2fs_icount;		/* Inode count */
+	uint32_t  e2fs_bcount;		/* blocks count */
+	uint32_t  e2fs_rbcount;		/* reserved blocks count */
+	uint32_t  e2fs_fbcount;		/* free blocks count */
+	uint32_t  e2fs_ficount;		/* free inodes count */
+	uint32_t  e2fs_first_dblock;	/* first data block */
+	uint32_t  e2fs_log_bsize;	/* block size = 1024*(2^e2fs_log_bsize) */
+	uint32_t  e2fs_log_fsize;	/* fragment size */
+	uint32_t  e2fs_bpg;		/* blocks per group */
+	uint32_t  e2fs_fpg;		/* frags per group */
+	uint32_t  e2fs_ipg;		/* inodes per group */
+	uint32_t  e2fs_mtime;		/* mount time */
+	uint32_t  e2fs_wtime;		/* write time */
+	uint16_t  e2fs_mnt_count;	/* mount count */
+	uint16_t  e2fs_max_mnt_count;	/* max mount count */
+	uint16_t  e2fs_magic;		/* magic number */
+	uint16_t  e2fs_state;		/* file system state */
+	uint16_t  e2fs_beh;		/* behavior on errors */
+	uint16_t  e2fs_minrev;		/* minor revision level */
+	uint32_t  e2fs_lastfsck;	/* time of last fsck */
+	uint32_t  e2fs_fsckintv;	/* max time between fscks */
+	uint32_t  e2fs_creator;		/* creator OS */
+	uint32_t  e2fs_rev;		/* revision level */
+	uint16_t  e2fs_ruid;		/* default uid for reserved blocks */
+	uint16_t  e2fs_rgid;		/* default gid for reserved blocks */
 	/* EXT2_DYNAMIC_REV superblocks */
-	u_int32_t  e2fs_first_ino;	/* first non-reserved inode */
-	u_int16_t  e2fs_inode_size;	/* size of inode structure */
-	u_int16_t  e2fs_block_group_nr;	/* block grp number of this sblk*/
-	u_int32_t  e2fs_features_compat; /*  compatible feature set */
-	u_int32_t  e2fs_features_incompat; /* incompatible feature set */
-	u_int32_t  e2fs_features_rocompat; /* RO-compatible feature set */
-	u_int8_t   e2fs_uuid[16];	/* 128-bit uuid for volume */
-	char       e2fs_vname[16];	/* volume name */
-	char       e2fs_fsmnt[64]; 	/* name mounted on */
-	u_int32_t  e2fs_algo;		/* For comcate for dir */
-	u_int16_t  e2fs_reserved_ngdb; /* # of reserved gd blocks for resize */
-	u_int32_t  reserved2[204];
+	uint32_t  e2fs_first_ino;	/* first non-reserved inode */
+	uint16_t  e2fs_inode_size;	/* size of inode structure */
+	uint16_t  e2fs_block_group_nr;	/* block grp number of this sblk*/
+	uint32_t  e2fs_features_compat; /*  compatible feature set */
+	uint32_t  e2fs_features_incompat; /* incompatible feature set */
+	uint32_t  e2fs_features_rocompat; /* RO-compatible feature set */
+	uint8_t	  e2fs_uuid[16];	/* 128-bit uuid for volume */
+	char      e2fs_vname[16];	/* volume name */
+	char      e2fs_fsmnt[64]; 	/* name mounted on */
+	uint32_t  e2fs_algo;		/* For compression */
+	uint8_t   e2fs_prealloc;	/* # of blocks for old prealloc */
+	uint8_t   e2fs_dir_prealloc;	/* # of blocks for old prealloc dirs */
+	uint16_t  e2fs_reserved_ngdb;	/* # of reserved gd blocks for resize */
+	char      e3fs_journal_uuid[16]; /* uuid of journal superblock */
+	uint32_t  e3fs_journal_inum;	/* inode number of journal file */
+	uint32_t  e3fs_journal_dev;	/* device number of journal file */
+	uint32_t  e3fs_last_orphan;	/* start of list of inodes to delete */
+	uint32_t  e3fs_hash_seed[4];	/* HTREE hash seed */
+	char      e3fs_def_hash_version; /* Default hash version to use */
+	char      e3fs_reserved_char_pad;
+	uint32_t  e3fs_default_mount_opts;
+	uint32_t  e3fs_first_meta_bg;	/* First metablock block group */
+	uint32_t  reserved2[190];	/* Padding to the end of the block */
 };
 
 
@@ -112,14 +123,14 @@ struct ext2fs {
 
 struct m_ext2fs {
 	struct ext2fs * e2fs;
-	char e2fs_fsmnt[MAXMNTLEN];/* name mounted on */
-	char e2fs_ronly;          /* mounted read-only flag */
-	char e2fs_fmod;           /* super block modified flag */
+	char     e2fs_fsmnt[MAXMNTLEN];/* name mounted on */
+	char     e2fs_ronly;      /* mounted read-only flag */
+	char     e2fs_fmod;       /* super block modified flag */
 	uint32_t e2fs_bsize;      /* Block size */
 	uint32_t e2fs_bshift;     /* calc of logical block no */
-	int32_t e2fs_bmask;       /* calc of block offset */
-	int32_t e2fs_bpg;         /* Number of blocks per group */
-	int64_t e2fs_qbmask;      /* = s_blocksize -1 */
+	int32_t  e2fs_bmask;      /* calc of block offset */
+	int32_t  e2fs_bpg;        /* Number of blocks per group */
+	int64_t  e2fs_qbmask;     /* = s_blocksize -1 */
 	uint32_t e2fs_fsbtodb;    /* Shift to get disk block */
 	uint32_t e2fs_ipg;        /* Number of inodes per group */
 	uint32_t e2fs_ipb;        /* Number of inodes per block */
@@ -137,9 +148,9 @@ struct m_ext2fs {
 	uint32_t e2fs_blocksize_bits;
 	uint32_t e2fs_total_dir;  /* Total number of directories */
 	uint8_t	*e2fs_contigdirs; /* (u) # of contig. allocated dirs */
-	char e2fs_wasvalid;       /* valid at mount time */
-	off_t e2fs_maxfilesize;
-	struct ext2_gd *e2fs_gd; /* Group Descriptors */
+	char     e2fs_wasvalid;   /* valid at mount time */
+	off_t    e2fs_maxfilesize;
+	struct   ext2_gd *e2fs_gd; /* Group Descriptors */
 };
 
 /*
@@ -232,14 +243,14 @@ struct m_ext2fs {
 /* ext2 file system block group descriptor */
 
 struct ext2_gd {
-	u_int32_t ext2bgd_b_bitmap;	/* blocks bitmap block */
-	u_int32_t ext2bgd_i_bitmap;	/* inodes bitmap block */
-	u_int32_t ext2bgd_i_tables;	/* inodes table block  */
-	u_int16_t ext2bgd_nbfree;	/* number of free blocks */
-	u_int16_t ext2bgd_nifree;	/* number of free inodes */
-	u_int16_t ext2bgd_ndirs;	/* number of directories */
-	u_int16_t reserved;
-	u_int32_t reserved2[3];
+	uint32_t ext2bgd_b_bitmap;	/* blocks bitmap block */
+	uint32_t ext2bgd_i_bitmap;	/* inodes bitmap block */
+	uint32_t ext2bgd_i_tables;	/* inodes table block  */
+	uint16_t ext2bgd_nbfree;	/* number of free blocks */
+	uint16_t ext2bgd_nifree;	/* number of free inodes */
+	uint16_t ext2bgd_ndirs;	/* number of directories */
+	uint16_t reserved;
+	uint32_t reserved2[3];
 };
 
 /* EXT2FS metadatas are stored in little-endian byte order. These macros

Modified: head/sys/fs/ext2fs/inode.h
==============================================================================
--- head/sys/fs/ext2fs/inode.h	Wed Apr 27 18:00:46 2011	(r221125)
+++ head/sys/fs/ext2fs/inode.h	Wed Apr 27 18:15:34 2011	(r221126)
@@ -63,7 +63,7 @@
 struct inode {
 	struct	vnode  *i_vnode;/* Vnode associated with this inode. */
 	struct	ext2mount *i_ump;
-	u_int32_t i_flag;	/* flags, see below */
+	uint32_t i_flag;	/* flags, see below */
 	ino_t	  i_number;	/* The identity of the inode. */
 
 	struct	m_ext2fs *i_e2fs;	/* EXT2FS */
@@ -71,21 +71,21 @@ struct inode {
 	/*
 	 * Side effects; used during directory lookup.
 	 */
-	int32_t	  i_count;	/* Size of free slot in directory. */
-	doff_t	  i_endoff;	/* End of useful stuff in directory. */
-	doff_t	  i_diroff;	/* Offset in dir, where we found last entry. */
-	doff_t	  i_offset;	/* Offset of free space in directory. */
-
-	u_int32_t i_block_group;
-	u_int32_t i_next_alloc_block;
-	u_int32_t i_next_alloc_goal;
-	u_int32_t i_prealloc_block;
-	u_int32_t i_prealloc_count;
+	int32_t	 i_count;	/* Size of free slot in directory. */
+	doff_t	 i_endoff;	/* End of useful stuff in directory. */
+	doff_t	 i_diroff;	/* Offset in dir, where we found last entry. */
+	doff_t	 i_offset;	/* Offset of free space in directory. */
+
+	uint32_t i_block_group;
+	uint32_t i_next_alloc_block;
+	uint32_t i_next_alloc_goal;
+	uint32_t i_prealloc_block;
+	uint32_t i_prealloc_count;
 
 	/* Fields from struct dinode in UFS. */
-	u_int16_t	i_mode;		/* IFMT, permissions; see below. */
+	uint16_t	i_mode;		/* IFMT, permissions; see below. */
 	int16_t		i_nlink;	/* File link count. */
-	u_int64_t	i_size;		/* File byte count. */
+	uint64_t	i_size;		/* File byte count. */
 	int32_t		i_atime;	/* Last access time. */
 	int32_t		i_atimensec;	/* Last access time. */
 	int32_t		i_mtime;	/* Last modified time. */
@@ -94,11 +94,11 @@ struct inode {
 	int32_t		i_ctimensec;	/* Last inode change time. */
 	int32_t		i_db[NDADDR];	/* Direct disk blocks. */
 	int32_t		i_ib[NIADDR];	/* Indirect disk blocks. */
-	u_int32_t	i_flags;	/* Status flags (chflags). */
+	uint32_t	i_flags;	/* Status flags (chflags). */
 	int32_t		i_blocks;	/* Blocks actually held. */
 	int32_t		i_gen;		/* Generation number. */
-	u_int32_t	i_uid;		/* File owner. */
-	u_int32_t	i_gid;		/* File group. */
+	uint32_t	i_uid;		/* File owner. */
+	uint32_t	i_gid;		/* File group. */
 };
 
 /*
@@ -162,10 +162,10 @@ struct indir {
 
 /* This overlays the fid structure (see mount.h). */
 struct ufid {
-	u_int16_t ufid_len;	/* Length of structure. */
-	u_int16_t ufid_pad;	/* Force 32-bit alignment. */
-	ino_t	  ufid_ino;	/* File number (ino). */
-	int32_t	  ufid_gen;	/* Generation number. */
+	uint16_t ufid_len;	/* Length of structure. */
+	uint16_t ufid_pad;	/* Force 32-bit alignment. */
+	ino_t	 ufid_ino;	/* File number (ino). */
+	int32_t	 ufid_gen;	/* Generation number. */
 };
 #endif /* _KERNEL */
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 18:19: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 D4B98106566C;
	Wed, 27 Apr 2011 18:19:26 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id BB4898FC12;
	Wed, 27 Apr 2011 18:19: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 p3RIJQk9083094;
	Wed, 27 Apr 2011 18:19:26 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RIJQDc083089;
	Wed, 27 Apr 2011 18:19:26 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104271819.p3RIJQDc083089@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 18:19: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: r221127 - head/sys/rpc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 18:19:27 -0000

Author: rmacklem
Date: Wed Apr 27 18:19:26 2011
New Revision: 221127
URL: http://svn.freebsd.org/changeset/base/221127

Log:
  This patch is believed to fix a problem in the kernel rpc for
  non-interruptible NFS mounts, where a kernel thread will seem
  to be stuck sleeping on "rpccon". The msleep() in clnt_vc_create()
  that was waiting to a TCP connect to complete would return ERESTART,
  since PCATCH was specified. Then the tsleep() in clnt_reconnect_call()
  would sleep for 1 second and then try again and again and...
  The patch changes the msleep() in clnt_vc_create() so it only sets
  the PCATCH flag for interruptible cases.
  
  Tested by:	pho
  Reviewed by:	jhb
  MFC after:	2 weeks

Modified:
  head/sys/rpc/clnt.h
  head/sys/rpc/clnt_rc.c
  head/sys/rpc/clnt_vc.c
  head/sys/rpc/rpcb_clnt.c

Modified: head/sys/rpc/clnt.h
==============================================================================
--- head/sys/rpc/clnt.h	Wed Apr 27 18:15:34 2011	(r221126)
+++ head/sys/rpc/clnt.h	Wed Apr 27 18:19:26 2011	(r221127)
@@ -433,10 +433,11 @@ extern CLIENT *clnt_dg_create(struct soc
  *	rpcvers_t vers;				-- version number
  *	size_t sendsz;				-- buffer recv size
  *	size_t recvsz;				-- buffer send size
+ *	int intrflag;				-- is it interruptible
  */
 extern CLIENT *clnt_vc_create(struct socket *so,
     struct sockaddr *svcaddr, rpcprog_t program, rpcvers_t version,
-    size_t sendsz, size_t recvsz);
+    size_t sendsz, size_t recvsz, int intrflag);
 
 /*
  *	struct netconfig *nconf;		-- network type

Modified: head/sys/rpc/clnt_rc.c
==============================================================================
--- head/sys/rpc/clnt_rc.c	Wed Apr 27 18:15:34 2011	(r221126)
+++ head/sys/rpc/clnt_rc.c	Wed Apr 27 18:19:26 2011	(r221127)
@@ -195,7 +195,7 @@ clnt_reconnect_connect(CLIENT *cl)
 	else
 		newclient = clnt_vc_create(so,
 		    (struct sockaddr *) &rc->rc_addr, rc->rc_prog, rc->rc_vers,
-		    rc->rc_sendsz, rc->rc_recvsz);
+		    rc->rc_sendsz, rc->rc_recvsz, rc->rc_intr);
 	td->td_ucred = oldcred;
 
 	if (!newclient) {

Modified: head/sys/rpc/clnt_vc.c
==============================================================================
--- head/sys/rpc/clnt_vc.c	Wed Apr 27 18:15:34 2011	(r221126)
+++ head/sys/rpc/clnt_vc.c	Wed Apr 27 18:19:26 2011	(r221127)
@@ -168,7 +168,8 @@ clnt_vc_create(
 	const rpcprog_t prog,		/* program number */
 	const rpcvers_t vers,		/* version number */
 	size_t sendsz,			/* buffer recv size */
-	size_t recvsz)			/* buffer send size */
+	size_t recvsz,			/* buffer send size */
+	int intrflag)			/* interruptible */
 {
 	CLIENT *cl;			/* client handle */
 	struct ct_data *ct = NULL;	/* client handle */
@@ -177,7 +178,7 @@ clnt_vc_create(
 	static uint32_t disrupt;
 	struct __rpc_sockinfo si;
 	XDR xdrs;
-	int error, interrupted, one = 1;
+	int error, interrupted, one = 1, sleep_flag;
 	struct sockopt sopt;
 
 	if (disrupt == 0)
@@ -196,10 +197,13 @@ clnt_vc_create(
 		error = soconnect(so, raddr, curthread);
 		SOCK_LOCK(so);
 		interrupted = 0;
+		sleep_flag = PSOCK;
+		if (intrflag != 0)
+			sleep_flag |= (PCATCH | PBDRY);
 		while ((so->so_state & SS_ISCONNECTING)
 		    && so->so_error == 0) {
 			error = msleep(&so->so_timeo, SOCK_MTX(so),
-			    PSOCK | PCATCH | PBDRY, "connec", 0);
+			    sleep_flag, "connec", 0);
 			if (error) {
 				if (error == EINTR || error == ERESTART)
 					interrupted = 1;

Modified: head/sys/rpc/rpcb_clnt.c
==============================================================================
--- head/sys/rpc/rpcb_clnt.c	Wed Apr 27 18:15:34 2011	(r221126)
+++ head/sys/rpc/rpcb_clnt.c	Wed Apr 27 18:19:26 2011	(r221127)
@@ -477,7 +477,7 @@ local_rpcb()
 
 	tsize = __rpc_get_t_size(AF_LOCAL, 0, 0);
 	client = clnt_vc_create(so, (struct sockaddr *)&sun, (rpcprog_t)RPCBPROG,
-	    (rpcvers_t)RPCBVERS, tsize, tsize);
+	    (rpcvers_t)RPCBVERS, tsize, tsize, 1);
 
 	if (client != NULL) {
 		/* Mark the socket to be closed in destructor */

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 18:25: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 3CD57106564A;
	Wed, 27 Apr 2011 18:25: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 2F09A8FC14;
	Wed, 27 Apr 2011 18:25: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 p3RIPanB083324;
	Wed, 27 Apr 2011 18:25:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RIPaup083319;
	Wed, 27 Apr 2011 18:25:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104271825.p3RIPaup083319@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 18:25: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: r221128 - head/sys/fs/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 18:25:36 -0000

Author: jhb
Date: Wed Apr 27 18:25:35 2011
New Revision: 221128
URL: http://svn.freebsd.org/changeset/base/221128

Log:
  Use a private EXT2_ROOTINO constant instead of redefining ROOTINO.
  
  Submitted by:	Pedro F. Giffuni  giffunip at yahoo

Modified:
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_vfsops.c
  head/sys/fs/ext2fs/ext2_vnops.c
  head/sys/fs/ext2fs/inode.h

Modified: head/sys/fs/ext2fs/ext2_lookup.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_lookup.c	Wed Apr 27 18:19:26 2011	(r221127)
+++ head/sys/fs/ext2fs/ext2_lookup.c	Wed Apr 27 18:25:35 2011	(r221128)
@@ -57,9 +57,10 @@
 
 #include 
 #include 
-#include 
 #include 
+#include 
 #include 
+#include 
 
 #ifdef DIAGNOSTIC
 static int dirchk = 1;
@@ -1056,7 +1057,7 @@ ext2_checkpath(source, target, cred)
 		error = EEXIST;
 		goto out;
 	}
-	rootino = ROOTINO;
+	rootino = EXT2_ROOTINO;
 	error = 0;
 	if (target->i_number == rootino)
 		goto out;

Modified: head/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vfsops.c	Wed Apr 27 18:19:26 2011	(r221127)
+++ head/sys/fs/ext2fs/ext2_vfsops.c	Wed Apr 27 18:25:35 2011	(r221128)
@@ -983,7 +983,7 @@ ext2_fhtovp(struct mount *mp, struct fid
 
 	ufhp = (struct ufid *)fhp;
 	fs = VFSTOEXT2(mp)->um_e2fs;
-	if (ufhp->ufid_ino < ROOTINO ||
+	if (ufhp->ufid_ino < EXT2_ROOTINO ||
 	    ufhp->ufid_ino > fs->e2fs_gcount * fs->e2fs->e2fs_ipg)
 		return (ESTALE);
 
@@ -1063,7 +1063,7 @@ ext2_root(struct mount *mp, int flags, s
 	struct vnode *nvp;
 	int error;
 
-	error = VFS_VGET(mp, (ino_t)ROOTINO, LK_EXCLUSIVE, &nvp);
+	error = VFS_VGET(mp, EXT2_ROOTINO, LK_EXCLUSIVE, &nvp);
 	if (error)
 		return (error);
 	*vpp = nvp;

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Wed Apr 27 18:19:26 2011	(r221127)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Wed Apr 27 18:25:35 2011	(r221128)
@@ -71,12 +71,13 @@
 
 #include 
 
-#include 
-#include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *);
 static void ext2_itimes_locked(struct vnode *);
@@ -1581,7 +1582,7 @@ ext2_vinit(mntp, fifoops, vpp)
 	if (vp->v_type == VFIFO)
 		vp->v_op = fifoops;
 
-	if (ip->i_number == ROOTINO)
+	if (ip->i_number == EXT2_ROOTINO)
 		vp->v_vflag |= VV_ROOT;
 	ip->i_modrev = init_va_filerev();
 	*vpp = vp;

Modified: head/sys/fs/ext2fs/inode.h
==============================================================================
--- head/sys/fs/ext2fs/inode.h	Wed Apr 27 18:19:26 2011	(r221127)
+++ head/sys/fs/ext2fs/inode.h	Wed Apr 27 18:25:35 2011	(r221128)
@@ -41,8 +41,6 @@
 #include 
 #include 
 
-#define	ROOTINO	((ino_t)2)
-
 #define	NDADDR	12			/* Direct addresses in inode. */
 #define	NIADDR	3			/* Indirect addresses in inode. */
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:01: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 5C477106564A;
	Wed, 27 Apr 2011 19:01:07 +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 DE77F8FC0C;
	Wed, 27 Apr 2011 19:01:06 +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 81BB525D3860;
	Wed, 27 Apr 2011 19:01:04 +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 DAA06159DDF8;
	Wed, 27 Apr 2011 19:01:03 +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 L6CgrGOWx1zi; Wed, 27 Apr 2011 19:01:03 +0000 (UTC)
Received: from orange-en1.sbone.de (orange-en1.sbone.de
	[IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.sbone.de (Postfix) with ESMTPSA id CB911159DDDD;
	Wed, 27 Apr 2011 19:01:02 +0000 (UTC)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: "Bjoern A. Zeeb" 
In-Reply-To: <201104271751.p3RHpp6H081910@svn.freebsd.org>
Date: Wed, 27 Apr 2011 19:01:01 +0000
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201104271751.p3RHpp6H081910@svn.freebsd.org>
To: Rick Macklem 
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: r221124 - in head: . sbin/mount sbin/mount_nfs
	sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf
	sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
	sys/sun4v/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, 27 Apr 2011 19:01:07 -0000

On Apr 27, 2011, at 5:51 PM, Rick Macklem wrote:

> Author: rmacklem
> Date: Wed Apr 27 17:51:51 2011
> New Revision: 221124
> URL: http://svn.freebsd.org/changeset/base/221124
> 
> Log:
>  This patch changes head so that the default NFS client is now the new
>  NFS client (which I guess is no longer experimental). The fstype "newnfs"
>  is now "nfs" and the regular/old NFS client is now fstype "oldnfs".

Wooohooo!  Thanks a lot for all the hard work! :)

Bjoern

-- 
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 Apr 27 19:28: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 543B7106567A;
	Wed, 27 Apr 2011 19:28:43 +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 441AF8FC16;
	Wed, 27 Apr 2011 19:28: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 p3RJShF3085722;
	Wed, 27 Apr 2011 19:28:43 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJShEB085713;
	Wed, 27 Apr 2011 19:28:43 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104271928.p3RJShEB085713@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Apr 2011 19:28: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: r221129 - in head/sys: netinet6 netipsec
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 19:28:43 -0000

Author: bz
Date: Wed Apr 27 19:28:42 2011
New Revision: 221129
URL: http://svn.freebsd.org/changeset/base/221129

Log:
  Make IPsec compile without INET adding appropriate #ifdef checks.
  
  Unfold the IPSEC_COMMON_INPUT_CB() macro in xform_{ah,esp,ipcomp}.c
  to not need three different versions depending on INET, INET6 or both.
  
  Mark two places preparing for not yet supported functionality with IPv6.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/netinet6/ip6_ipsec.c
  head/sys/netipsec/ipsec_input.c
  head/sys/netipsec/ipsec_output.c
  head/sys/netipsec/key.c
  head/sys/netipsec/xform_ah.c
  head/sys/netipsec/xform_esp.c
  head/sys/netipsec/xform_ipcomp.c
  head/sys/netipsec/xform_ipip.c

Modified: head/sys/netinet6/ip6_ipsec.c
==============================================================================
--- head/sys/netinet6/ip6_ipsec.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netinet6/ip6_ipsec.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -30,6 +30,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"
 
@@ -43,6 +44,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -291,7 +293,11 @@ ip6_ipsec_output(struct mbuf **m, struct
 		 * this is done in the normal processing path.
 		 */
 		if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
+			ipseclog((LOG_DEBUG,
+			    "%s: we do not support IPv4 over IPv6", __func__));
+#ifdef INET
 			in_delayed_cksum(*m);
+#endif
 			(*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
 		}
 

Modified: head/sys/netipsec/ipsec_input.c
==============================================================================
--- head/sys/netipsec/ipsec_input.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/ipsec_input.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -119,9 +119,11 @@ ipsec_common_input(struct mbuf *m, int s
 	struct secasvar *sav;
 	u_int32_t spi;
 	int error;
+#ifdef INET
 #ifdef IPSEC_NAT_T
 	struct m_tag *tag;
 #endif
+#endif
 
 	IPSEC_ISTAT(sproto, V_espstat.esps_input, V_ahstat.ahs_input,
 		V_ipcompstat.ipcomps_input);

Modified: head/sys/netipsec/ipsec_output.c
==============================================================================
--- head/sys/netipsec/ipsec_output.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/ipsec_output.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -165,7 +165,29 @@ ipsec_process_done(struct mbuf *m, struc
 	 */
 	if (isr->next) {
 		V_ipsec4stat.ips_out_bundlesa++;
-		return ipsec4_process_packet(m, isr->next, 0, 0);
+		sav = isr->next->sav;
+		saidx = &sav->sah->saidx;
+		switch (saidx->dst.sa.sa_family) {
+#ifdef INET
+		case AF_INET:
+			return ipsec4_process_packet(m, isr->next, 0, 0);
+			/* NOTREACHED */
+#endif
+#ifdef notyet
+#ifdef INET6
+		case AF_INET6:
+			/* XXX */
+			ipsec6_output_trans()
+			ipsec6_output_tunnel()
+			/* NOTREACHED */
+#endif /* INET6 */
+#endif
+		default:
+			DPRINTF(("%s: unknown protocol family %u\n", __func__,
+			    saidx->dst.sa.sa_family));
+			error = ENXIO;
+			goto bad;
+		}
 	}
 	key_sa_recordxfer(sav, m);		/* record data transfer */
 

Modified: head/sys/netipsec/key.c
==============================================================================
--- head/sys/netipsec/key.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/key.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -73,7 +73,7 @@
 #include 
 #endif /* INET6 */
 
-#ifdef INET
+#if defined(INET) || defined(INET6)
 #include 
 #endif
 #ifdef INET6

Modified: head/sys/netipsec/xform_ah.c
==============================================================================
--- head/sys/netipsec/xform_ah.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/xform_ah.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -91,6 +91,7 @@ VNET_DEFINE(int, ah_enable) = 1;	/* cont
 VNET_DEFINE(int, ah_cleartos) = 1;	/* clear ip_tos when doing AH calc */
 VNET_DEFINE(struct ahstat, ahstat);
 
+#ifdef INET
 SYSCTL_DECL(_net_inet_ah);
 SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
 	ah_enable,	CTLFLAG_RW,	&VNET_NAME(ah_enable),	0, "");
@@ -98,6 +99,7 @@ SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
 	ah_cleartos,	CTLFLAG_RW,	&VNET_NAME(ah_cleartos), 0, "");
 SYSCTL_VNET_STRUCT(_net_inet_ah, IPSECCTL_STATS,
 	stats,		CTLFLAG_RD,	&VNET_NAME(ahstat), ahstat, "");
+#endif
 
 static unsigned char ipseczeroes[256];	/* larger than an ip6 extension hdr */
 
@@ -724,19 +726,6 @@ ah_input(struct mbuf *m, struct secasvar
 		return ah_input_cb(crp);
 }
 
-#ifdef INET6
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag) do {		     \
-	if (saidx->dst.sa.sa_family == AF_INET6) {			     \
-		error = ipsec6_common_input_cb(m, sav, skip, protoff, mtag); \
-	} else {							     \
-		error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag); \
-	}								     \
-} while (0)
-#else
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag)		     \
-	(error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag))
-#endif
-
 /*
  * AH input callback from the crypto driver.
  */
@@ -873,7 +862,21 @@ ah_input_cb(struct cryptop *crp)
 		goto bad;
 	}
 
-	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag);
+	switch (saidx->dst.sa.sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		error = ipsec6_common_input_cb(m, sav, skip, protoff, mtag);
+		break;
+#endif
+#ifdef INET
+	case AF_INET:
+		error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag);
+		break;
+#endif
+	default:
+		panic("%s: Unexpected address family: %d saidx=%p", __func__,
+		    saidx->dst.sa.sa_family, saidx);
+	}
 
 	KEY_FREESAV(&sav);
 	return error;

Modified: head/sys/netipsec/xform_esp.c
==============================================================================
--- head/sys/netipsec/xform_esp.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/xform_esp.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -451,19 +451,6 @@ esp_input(struct mbuf *m, struct secasva
 		return esp_input_cb(crp);
 }
 
-#ifdef INET6
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag) do {		     \
-	if (saidx->dst.sa.sa_family == AF_INET6) {			     \
-		error = ipsec6_common_input_cb(m, sav, skip, protoff, mtag); \
-	} else {							     \
-		error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag); \
-	}								     \
-} while (0)
-#else
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag)		     \
-	(error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag))
-#endif
-
 /*
  * ESP input callback from the crypto driver.
  */
@@ -647,7 +634,21 @@ esp_input_cb(struct cryptop *crp)
 	/* Restore the Next Protocol field */
 	m_copyback(m, protoff, sizeof (u_int8_t), lastthree + 2);
 
-	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag);
+	switch (saidx->dst.sa.sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		error = ipsec6_common_input_cb(m, sav, skip, protoff, mtag);
+		break;
+#endif
+#ifdef INET
+	case AF_INET:
+		error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag);
+		break;
+#endif
+	default:
+		panic("%s: Unexpected address family: %d saidx=%p", __func__,
+		    saidx->dst.sa.sa_family, saidx);
+	}
 
 	KEY_FREESAV(&sav);
 	return error;

Modified: head/sys/netipsec/xform_ipcomp.c
==============================================================================
--- head/sys/netipsec/xform_ipcomp.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/xform_ipcomp.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -213,19 +213,6 @@ ipcomp_input(struct mbuf *m, struct seca
 	return crypto_dispatch(crp);
 }
 
-#ifdef INET6
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag) do {		     \
-	if (saidx->dst.sa.sa_family == AF_INET6) {			     \
-		error = ipsec6_common_input_cb(m, sav, skip, protoff, mtag); \
-	} else {							     \
-		error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag); \
-	}								     \
-} while (0)
-#else
-#define	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, mtag)		     \
-	(error = ipsec4_common_input_cb(m, sav, skip, protoff, mtag))
-#endif
-
 /*
  * IPComp input callback from the crypto driver.
  */
@@ -316,7 +303,21 @@ ipcomp_input_cb(struct cryptop *crp)
 	/* Restore the Next Protocol field */
 	m_copyback(m, protoff, sizeof (u_int8_t), (u_int8_t *) &nproto);
 
-	IPSEC_COMMON_INPUT_CB(m, sav, skip, protoff, NULL);
+	switch (saidx->dst.sa.sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		error = ipsec6_common_input_cb(m, sav, skip, protoff, NULL);
+		break;
+#endif
+#ifdef INET
+	case AF_INET:
+		error = ipsec4_common_input_cb(m, sav, skip, protoff, NULL);
+		break;
+#endif
+	default:
+		panic("%s: Unexpected address family: %d saidx=%p", __func__,
+		    saidx->dst.sa.sa_family, saidx);
+	}
 
 	KEY_FREESAV(&sav);
 	return error;

Modified: head/sys/netipsec/xform_ipip.c
==============================================================================
--- head/sys/netipsec/xform_ipip.c	Wed Apr 27 18:25:35 2011	(r221128)
+++ head/sys/netipsec/xform_ipip.c	Wed Apr 27 19:28:42 2011	(r221129)
@@ -412,8 +412,10 @@ ipip_output(
 	u_int8_t tp, otos;
 	struct secasindex *saidx;
 	int error;
-#ifdef INET
+#if defined(INET) || defined(INET6)
 	u_int8_t itos;
+#endif
+#ifdef INET
 	struct ip *ipo;
 #endif /* INET */
 #ifdef INET6
@@ -466,7 +468,8 @@ ipip_output(
 		ipo->ip_id = ip_newid();
 
 		/* If the inner protocol is IP... */
-		if (tp == IPVERSION) {
+		switch (tp) {
+		case IPVERSION:
 			/* Save ECN notification */
 			m_copydata(m, sizeof(struct ip) +
 			    offsetof(struct ip, ip_tos),
@@ -484,9 +487,10 @@ ipip_output(
 			ipo->ip_off = ntohs(ipo->ip_off);
 			ipo->ip_off &= ~(IP_DF | IP_MF | IP_OFFMASK);
 			ipo->ip_off = htons(ipo->ip_off);
-		}
+			break;
 #ifdef INET6
-		else if (tp == (IPV6_VERSION >> 4)) {
+		case (IPV6_VERSION >> 4):
+		{
 			u_int32_t itos32;
 
 			/* Save ECN notification. */
@@ -496,9 +500,10 @@ ipip_output(
 			itos = ntohl(itos32) >> 20;
 			ipo->ip_p = IPPROTO_IPV6;
 			ipo->ip_off = 0;
+			break;
 		}
 #endif /* INET6 */
-		else {
+		default:
 			goto nofamily;
 		}
 
@@ -547,8 +552,9 @@ ipip_output(
 		ip6o->ip6_dst = saidx->dst.sin6.sin6_addr;
 		ip6o->ip6_src = saidx->src.sin6.sin6_addr;
 
+		switch (tp) {
 #ifdef INET
-		if (tp == IPVERSION) {
+		case IPVERSION:
 			/* Save ECN notification */
 			m_copydata(m, sizeof(struct ip6_hdr) +
 			    offsetof(struct ip, ip_tos), sizeof(u_int8_t),
@@ -556,21 +562,23 @@ ipip_output(
 
 			/* This is really IPVERSION. */
 			ip6o->ip6_nxt = IPPROTO_IPIP;
-		} else
+			break;
 #endif /* INET */
-			if (tp == (IPV6_VERSION >> 4)) {
-				u_int32_t itos32;
+		case (IPV6_VERSION >> 4):
+		{
+			u_int32_t itos32;
+
+			/* Save ECN notification. */
+			m_copydata(m, sizeof(struct ip6_hdr) +
+			    offsetof(struct ip6_hdr, ip6_flow),
+			    sizeof(u_int32_t), (caddr_t) &itos32);
+			itos = ntohl(itos32) >> 20;
 
-				/* Save ECN notification. */
-				m_copydata(m, sizeof(struct ip6_hdr) +
-				    offsetof(struct ip6_hdr, ip6_flow),
-				    sizeof(u_int32_t), (caddr_t) &itos32);
-				itos = ntohl(itos32) >> 20;
-
-				ip6o->ip6_nxt = IPPROTO_IPV6;
-			} else {
-				goto nofamily;
-			}
+			ip6o->ip6_nxt = IPPROTO_IPV6;
+		}
+		default:
+			goto nofamily;
+		}
 
 		otos = 0;
 		ip_ecn_ingress(ECN_ALLOWED, &otos, &itos);
@@ -622,6 +630,7 @@ bad:
 }
 
 #ifdef IPSEC
+#if defined(INET) || defined(INET6)
 static int
 ipe4_init(struct secasvar *sav, struct xformsw *xsp)
 {
@@ -652,6 +661,8 @@ static struct xformsw ipe4_xformsw = {
 };
 
 extern struct domain inetdomain;
+#endif /* INET || INET6 */
+#ifdef INET
 static struct protosw ipe4_protosw = {
 	.pr_type =	SOCK_RAW,
 	.pr_domain =	&inetdomain,
@@ -661,7 +672,8 @@ static struct protosw ipe4_protosw = {
 	.pr_ctloutput =	rip_ctloutput,
 	.pr_usrreqs =	&rip_usrreqs
 };
-#ifdef INET6
+#endif /* INET */
+#if defined(INET6) && defined(INET)
 static struct ip6protosw ipe6_protosw = {
 	.pr_type =	SOCK_RAW,
 	.pr_domain =	&inetdomain,
@@ -671,8 +683,9 @@ static struct ip6protosw ipe6_protosw = 
 	.pr_ctloutput =	rip_ctloutput,
 	.pr_usrreqs =	&rip_usrreqs
 };
-#endif
+#endif /* INET6 && INET */
 
+#if defined(INET)
 /*
  * Check the encapsulated packet to see if we want it
  */
@@ -687,6 +700,7 @@ ipe4_encapcheck(const struct mbuf *m, in
 	 */
 	return ((m->m_flags & M_IPSEC) != 0 ? 1 : 0);
 }
+#endif /* INET */
 
 static void
 ipe4_attach(void)
@@ -695,9 +709,11 @@ ipe4_attach(void)
 	xform_register(&ipe4_xformsw);
 	/* attach to encapsulation framework */
 	/* XXX save return cookie for detach on module remove */
+#ifdef INET
 	(void) encap_attach_func(AF_INET, -1,
 		ipe4_encapcheck, &ipe4_protosw, NULL);
-#ifdef INET6
+#endif
+#if defined(INET6) && defined(INET)
 	(void) encap_attach_func(AF_INET6, -1,
 		ipe4_encapcheck, (struct protosw *)&ipe6_protosw, NULL);
 #endif

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:30: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 410DA1065670;
	Wed, 27 Apr 2011 19:30:45 +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 27A5C8FC0A;
	Wed, 27 Apr 2011 19:30: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 p3RJUjBf085847;
	Wed, 27 Apr 2011 19:30:45 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJUi1r085842;
	Wed, 27 Apr 2011 19:30:44 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104271930.p3RJUi1r085842@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Apr 2011 19:30:44 +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: r221130 - in head/sys: dev/xen/netfront net 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: Wed, 27 Apr 2011 19:30:45 -0000

Author: bz
Date: Wed Apr 27 19:30:44 2011
New Revision: 221130
URL: http://svn.freebsd.org/changeset/base/221130

Log:
  Make various (pseudo) interfaces compile without INET in the kernel
  adding appropriate #ifdefs.  For module builds the framework needs
  adjustments for at least carp.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/dev/xen/netfront/netfront.c
  head/sys/net/if_enc.c
  head/sys/net/if_lagg.c
  head/sys/netinet/ip_carp.c

Modified: head/sys/dev/xen/netfront/netfront.c
==============================================================================
--- head/sys/dev/xen/netfront/netfront.c	Wed Apr 27 19:28:42 2011	(r221129)
+++ head/sys/dev/xen/netfront/netfront.c	Wed Apr 27 19:30:44 2011	(r221130)
@@ -28,6 +28,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_inet.h"
+
 #include 
 #include 
 #include 
@@ -625,6 +627,7 @@ setup_device(device_t dev, struct netfro
 	return (error);
 }
 
+#ifdef INET
 /**
  * If this interface has an ipv4 address, send an arp for it. This
  * helps to get the network going again after migrating hosts.
@@ -642,6 +645,7 @@ netfront_send_fake_arp(device_t dev, str
 		}
 	}
 }
+#endif
 
 /**
  * Callback received when the backend's state changes.
@@ -668,7 +672,9 @@ netfront_backend_changed(device_t dev, X
 		if (network_connect(sc) != 0)
 			break;
 		xenbus_set_state(dev, XenbusStateConnected);
+#ifdef INET
 		netfront_send_fake_arp(dev, sc);
+#endif
 		break;
 	case XenbusStateClosing:
 		xenbus_set_state(dev, XenbusStateClosed);
@@ -1725,12 +1731,15 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, 
 {
 	struct netfront_info *sc = ifp->if_softc;
 	struct ifreq *ifr = (struct ifreq *) data;
+#ifdef INET
 	struct ifaddr *ifa = (struct ifaddr *)data;
+#endif
 
 	int mask, error = 0;
 	switch(cmd) {
 	case SIOCSIFADDR:
 	case SIOCGIFADDR:
+#ifdef INET
 		XN_LOCK(sc);
 		if (ifa->ifa_addr->sa_family == AF_INET) {
 			ifp->if_flags |= IFF_UP;
@@ -1740,8 +1749,11 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, 
 			XN_UNLOCK(sc);	
 		} else {
 			XN_UNLOCK(sc);	
+#endif
 			error = ether_ioctl(ifp, cmd, data);
+#ifdef INET
 		}
+#endif
 		break;
 	case SIOCSIFMTU:
 		/* XXX can we alter the MTU on a VN ?*/

Modified: head/sys/net/if_enc.c
==============================================================================
--- head/sys/net/if_enc.c	Wed Apr 27 19:28:42 2011	(r221129)
+++ head/sys/net/if_enc.c	Wed Apr 27 19:30:44 2011	(r221130)
@@ -27,6 +27,10 @@
  * $FreeBSD$
  */
 
+#include "opt_inet.h"
+#include "opt_inet6.h"
+#include "opt_enc.h"
+
 #include 
 #include 
 #include 
@@ -53,14 +57,12 @@
 #include 
 #include 
 #include 
-#include "opt_inet6.h"
 
 #ifdef INET6
 #include 
 #include 
 #endif
 
-#include "opt_enc.h"
 #include 
 #include 
 
@@ -243,11 +245,14 @@ ipsec_filter(struct mbuf **mp, int dir, 
 	}
 
 	/* Skip pfil(9) if no filters are loaded */
-	if (!(PFIL_HOOKED(&V_inet_pfil_hook)
+	if (1
+#ifdef INET
+	    && !PFIL_HOOKED(&V_inet_pfil_hook)
+#endif
 #ifdef INET6
-	    || PFIL_HOOKED(&V_inet6_pfil_hook)
+	    && !PFIL_HOOKED(&V_inet6_pfil_hook)
 #endif
-	    )) {
+	    ) {
 		return (0);
 	}
 
@@ -263,6 +268,7 @@ ipsec_filter(struct mbuf **mp, int dir, 
 	error = 0;
 	ip = mtod(*mp, struct ip *);
 	switch (ip->ip_v) {
+#ifdef INET
 		case 4:
 			/*
 			 * before calling the firewall, swap fields the same as
@@ -282,7 +288,7 @@ ipsec_filter(struct mbuf **mp, int dir, 
 			ip->ip_len = htons(ip->ip_len);
 			ip->ip_off = htons(ip->ip_off);
 			break;
-
+#endif
 #ifdef INET6
 		case 6:
 			error = pfil_run_hooks(&V_inet6_pfil_hook, mp,

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Wed Apr 27 19:28:42 2011	(r221129)
+++ head/sys/net/if_lagg.c	Wed Apr 27 19:30:44 2011	(r221130)
@@ -52,8 +52,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef INET
+#if defined(INET) || defined(INET6)
 #include 
+#endif
+#ifdef INET
 #include 
 #include 
 #include 

Modified: head/sys/netinet/ip_carp.c
==============================================================================
--- head/sys/netinet/ip_carp.c	Wed Apr 27 19:28:42 2011	(r221129)
+++ head/sys/netinet/ip_carp.c	Wed Apr 27 19:30:44 2011	(r221130)
@@ -66,14 +66,19 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef INET
+#if defined(INET) || defined(INET6)
 #include 
 #include 
-#include 
+#include 
 #include 
+
+#include 
+#endif
+
+#ifdef INET
+#include 
 #include 
 #include 
-#include 
 #endif
 
 #ifdef INET6
@@ -82,11 +87,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #endif
 
 #include 
-#include 
 
 #define	CARP_IFNAME	"carp"
 static MALLOC_DEFINE(M_CARP, "CARP", "CARP interfaces");
@@ -96,7 +101,9 @@ struct carp_softc {
 	struct ifnet	 	*sc_ifp;	/* Interface clue */
 	struct ifnet		*sc_carpdev;	/* Pointer to parent interface */
 	struct in_ifaddr 	*sc_ia;		/* primary iface address */
+#ifdef INET
 	struct ip_moptions 	 sc_imo;
+#endif
 #ifdef INET6
 	struct in6_ifaddr 	*sc_ia6;	/* primary iface address v6 */
 	struct ip6_moptions 	 sc_im6o;
@@ -206,7 +213,9 @@ static int	carp_prepare_ad(struct mbuf *
 static void	carp_send_ad_all(void);
 static void	carp_send_ad(void *);
 static void	carp_send_ad_locked(struct carp_softc *);
+#ifdef INET
 static void	carp_send_arp(struct carp_softc *);
+#endif
 static void	carp_master_down(void *);
 static void	carp_master_down_locked(struct carp_softc *);
 static int	carp_ioctl(struct ifnet *, u_long, caddr_t);
@@ -215,12 +224,16 @@ static int	carp_looutput(struct ifnet *,
 static void	carp_start(struct ifnet *);
 static void	carp_setrun(struct carp_softc *, sa_family_t);
 static void	carp_set_state(struct carp_softc *, int);
+#ifdef INET
 static int	carp_addrcount(struct carp_if *, struct in_ifaddr *, int);
+#endif
 enum	{ CARP_COUNT_MASTER, CARP_COUNT_RUNNING };
 
+#ifdef INET
 static void	carp_multicast_cleanup(struct carp_softc *, int dofree);
 static int	carp_set_addr(struct carp_softc *, struct sockaddr_in *);
 static int	carp_del_addr(struct carp_softc *, struct sockaddr_in *);
+#endif
 static void	carp_carpdev_state_locked(struct carp_if *);
 static void	carp_sc_state_locked(struct carp_softc *);
 #ifdef INET6
@@ -369,6 +382,7 @@ carp_setroute(struct carp_softc *sc, int
 
 	s = splnet();
 	TAILQ_FOREACH(ifa, &SC2IFP(sc)->if_addrlist, ifa_list) {
+#ifdef INET
 		if (ifa->ifa_addr->sa_family == AF_INET &&
 		    sc->sc_carpdev != NULL) {
 			int count = carp_addrcount(
@@ -379,6 +393,7 @@ carp_setroute(struct carp_softc *sc, int
 			    (cmd == RTM_DELETE && count == 0))
 				rtinit(ifa, cmd, RTF_UP | RTF_HOST);
 		}
+#endif
 	}
 	splx(s);
 }
@@ -404,12 +419,14 @@ carp_clone_create(struct if_clone *ifc, 
 	sc->sc_advskew = 0;
 	sc->sc_init_counter = 1;
 	sc->sc_naddrs = sc->sc_naddrs6 = 0; /* M_ZERO? */
+#ifdef INET
 	sc->sc_imo.imo_membership = (struct in_multi **)malloc(
 	    (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP,
 	    M_WAITOK);
 	sc->sc_imo.imo_mfilters = NULL;
 	sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
 	sc->sc_imo.imo_multicast_vif = -1;
+#endif
 #ifdef INET6
 	sc->sc_im6o.im6o_membership = (struct in6_multi **)malloc(
 	    (sizeof(struct in6_multi *) * IPV6_MIN_MEMBERSHIPS), M_CARP,
@@ -456,7 +473,9 @@ carp_clone_destroy(struct ifnet *ifp)
 	bpfdetach(ifp);
 	if_detach(ifp);
 	if_free_type(ifp, IFT_ETHER);
+#ifdef INET
 	free(sc->sc_imo.imo_membership, M_CARP);
+#endif
 #ifdef INET6
 	free(sc->sc_im6o.im6o_membership, M_CARP);
 #endif
@@ -495,7 +514,9 @@ carpdetach(struct carp_softc *sc, int un
 	carp_set_state(sc, INIT);
 	SC2IFP(sc)->if_flags &= ~IFF_UP;
 	carp_setrun(sc, 0);
+#ifdef INET
 	carp_multicast_cleanup(sc, unlock);
+#endif
 #ifdef INET6
 	carp_multicast6_cleanup(sc, unlock);
 #endif
@@ -540,6 +561,7 @@ carp_ifdetach(void *arg __unused, struct
  * we have rearranged checks order compared to the rfc,
  * but it seems more efficient this way or not possible otherwise.
  */
+#ifdef INET
 void
 carp_input(struct mbuf *m, int hlen)
 {
@@ -630,6 +652,7 @@ carp_input(struct mbuf *m, int hlen)
 
 	carp_input_c(m, ch, AF_INET);
 }
+#endif
 
 #ifdef INET6
 int
@@ -720,12 +743,16 @@ carp_input_c(struct mbuf *m, struct carp
 	SC2IFP(sc)->if_ibytes += m->m_pkthdr.len;
 
 	if (bpf_peers_present(SC2IFP(sc)->if_bpf)) {
-		struct ip *ip = mtod(m, struct ip *);
 		uint32_t af1 = af;
+#ifdef INET
+		struct ip *ip = mtod(m, struct ip *);
 
 		/* BPF wants net byte order */
-		ip->ip_len = htons(ip->ip_len + (ip->ip_hl << 2));
-		ip->ip_off = htons(ip->ip_off);
+		if (af == AF_INET) {
+			ip->ip_len = htons(ip->ip_len + (ip->ip_hl << 2));
+			ip->ip_off = htons(ip->ip_off);
+		}
+#endif
 		bpf_mtap2(SC2IFP(sc)->if_bpf, &af1, sizeof(af1), m);
 	}
 
@@ -1081,6 +1108,7 @@ carp_send_ad_locked(struct carp_softc *s
 
 }
 
+#ifdef INET
 /*
  * Broadcast a gratuitous ARP request containing
  * the virtual router MAC address for each IP address
@@ -1102,6 +1130,7 @@ carp_send_arp(struct carp_softc *sc)
 		DELAY(1000);	/* XXX */
 	}
 }
+#endif
 
 #ifdef INET6
 static void
@@ -1124,6 +1153,7 @@ carp_send_na(struct carp_softc *sc)
 }
 #endif /* INET6 */
 
+#ifdef INET
 static int
 carp_addrcount(struct carp_if *cif, struct in_ifaddr *ia, int type)
 {
@@ -1227,6 +1257,7 @@ carp_iamatch(struct ifnet *ifp, struct i
 	CARP_UNLOCK(cif);
 	return (0);
 }
+#endif
 
 #ifdef INET6
 struct ifaddr *
@@ -1353,7 +1384,9 @@ carp_master_down_locked(struct carp_soft
 	case BACKUP:
 		carp_set_state(sc, MASTER);
 		carp_send_ad_locked(sc);
+#ifdef INET
 		carp_send_arp(sc);
+#endif
 #ifdef INET6
 		carp_send_na(sc);
 #endif /* INET6 */
@@ -1393,7 +1426,9 @@ carp_setrun(struct carp_softc *sc, sa_fa
 	case INIT:
 		if (carp_opts[CARPCTL_PREEMPT] && !carp_suppress_preempt) {
 			carp_send_ad_locked(sc);
+#ifdef INET
 			carp_send_arp(sc);
+#endif
 #ifdef INET6
 			carp_send_na(sc);
 #endif /* INET6 */
@@ -1444,6 +1479,7 @@ carp_setrun(struct carp_softc *sc, sa_fa
 	}
 }
 
+#ifdef INET
 static void
 carp_multicast_cleanup(struct carp_softc *sc, int dofree)
 {
@@ -1463,6 +1499,7 @@ carp_multicast_cleanup(struct carp_softc
 	imo->imo_num_memberships = 0;
 	imo->imo_multicast_ifp = NULL;
 }
+#endif
 
 #ifdef INET6
 static void
@@ -1485,6 +1522,7 @@ carp_multicast6_cleanup(struct carp_soft
 }
 #endif
 
+#ifdef INET
 static int
 carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
 {
@@ -1661,6 +1699,7 @@ carp_del_addr(struct carp_softc *sc, str
 
 	return (error);
 }
+#endif
 
 #ifdef INET6
 static int

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:32: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 49AB61065672;
	Wed, 27 Apr 2011 19:32:28 +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 3AF8A8FC13;
	Wed, 27 Apr 2011 19:32: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 p3RJWSb6085947;
	Wed, 27 Apr 2011 19:32:28 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJWSuC085944;
	Wed, 27 Apr 2011 19:32:28 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104271932.p3RJWSuC085944@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Apr 2011 19:32: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: r221131 - 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: Wed, 27 Apr 2011 19:32:28 -0000

Author: bz
Date: Wed Apr 27 19:32:27 2011
New Revision: 221131
URL: http://svn.freebsd.org/changeset/base/221131

Log:
  MfP4 CH=192004:
  
  Move ip_defttl to raw_ip.c where it is actually used.  In an IPv6
  only world we do not want to compile ip_input.c in for that and
  it is a shared default with INET6.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/netinet/ip_input.c
  head/sys/netinet/raw_ip.c

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c	Wed Apr 27 19:30:44 2011	(r221130)
+++ head/sys/netinet/ip_input.c	Wed Apr 27 19:32:27 2011	(r221131)
@@ -101,11 +101,6 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SEND
     &VNET_NAME(ipsendredirects), 0,
     "Enable sending IP redirects");
 
-VNET_DEFINE(int, ip_defttl) = IPDEFTTL;
-SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
-    &VNET_NAME(ip_defttl), 0,
-    "Maximum TTL on IP packets");
-
 static VNET_DEFINE(int, ip_keepfaith);
 #define	V_ip_keepfaith		VNET(ip_keepfaith)
 SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW,

Modified: head/sys/netinet/raw_ip.c
==============================================================================
--- head/sys/netinet/raw_ip.c	Wed Apr 27 19:30:44 2011	(r221130)
+++ head/sys/netinet/raw_ip.c	Wed Apr 27 19:32:27 2011	(r221131)
@@ -74,6 +74,11 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+VNET_DEFINE(int, ip_defttl) = IPDEFTTL;
+SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
+    &VNET_NAME(ip_defttl), 0,
+    "Maximum TTL on IP packets");
+
 VNET_DEFINE(struct inpcbhead, ripcb);
 VNET_DEFINE(struct inpcbinfo, ripcbinfo);
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:34: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 DCA29106564A;
	Wed, 27 Apr 2011 19:34:01 +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 C33F58FC13;
	Wed, 27 Apr 2011 19:34: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 p3RJY1Bn086058;
	Wed, 27 Apr 2011 19:34:01 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJY1Fq086054;
	Wed, 27 Apr 2011 19:34:01 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104271934.p3RJY1Fq086054@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Apr 2011 19:34: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: r221132 - 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: Wed, 27 Apr 2011 19:34:02 -0000

Author: bz
Date: Wed Apr 27 19:34:01 2011
New Revision: 221132
URL: http://svn.freebsd.org/changeset/base/221132

Log:
  Make pf compile without INET support by adding #ifdef INETs and
  correcting few #includes.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/contrib/pf/net/if_pflog.c
  head/sys/contrib/pf/net/pf.c
  head/sys/contrib/pf/net/pf_ioctl.c

Modified: head/sys/contrib/pf/net/if_pflog.c
==============================================================================
--- head/sys/contrib/pf/net/if_pflog.c	Wed Apr 27 19:32:27 2011	(r221131)
+++ head/sys/contrib/pf/net/if_pflog.c	Wed Apr 27 19:34:01 2011	(r221132)
@@ -82,17 +82,17 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#ifdef	INET
+#if defined(INET) || defined(INET6)
 #include 
+#endif
+#ifdef	INET
 #include 
 #include 
 #include 
 #endif
 
 #ifdef INET6
-#ifndef INET
-#include 
-#endif
+#include 
 #include 
 #endif /* INET6 */
 

Modified: head/sys/contrib/pf/net/pf.c
==============================================================================
--- head/sys/contrib/pf/net/pf.c	Wed Apr 27 19:32:27 2011	(r221131)
+++ head/sys/contrib/pf/net/pf.c	Wed Apr 27 19:34:01 2011	(r221132)
@@ -2039,8 +2039,10 @@ pf_send_icmp(struct mbuf *m, u_int8_t ty
 	struct pf_mtag	*pf_mtag;
 	struct mbuf	*m0;
 #ifdef __FreeBSD__
+#ifdef INET
 	struct ip *ip;
 #endif
+#endif
 
 #ifdef __FreeBSD__
 	m0 = m_copypacket(m, M_DONTWAIT);

Modified: head/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- head/sys/contrib/pf/net/pf_ioctl.c	Wed Apr 27 19:32:27 2011	(r221131)
+++ head/sys/contrib/pf/net/pf_ioctl.c	Wed Apr 27 19:34:01 2011	(r221132)
@@ -216,10 +216,12 @@ static void		 pf_clear_srcnodes(void);
 /*
  * Wrapper functions for pfil(9) hooks
  */
+#ifdef INET
 static int pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp,
 		int dir, struct inpcb *inp);
 static int pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp,
 		int dir, struct inpcb *inp);
+#endif
 #ifdef INET6
 static int pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp,
 		int dir, struct inpcb *inp);
@@ -3622,6 +3624,7 @@ shutdown_pf(void)
         return (error);
 }
 
+#ifdef INET
 static int
 pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir,
     struct inpcb *inp)
@@ -3696,6 +3699,7 @@ pf_check_out(void *arg, struct mbuf **m,
 	}
 	return chk;
 }
+#endif
 
 #ifdef INET6
 static int
@@ -3761,15 +3765,19 @@ hook_pf(void)
 	pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
 	if (pfh_inet == NULL)
 		return (ESRCH); /* XXX */
+#ifdef INET
 	pfil_add_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet);
 	pfil_add_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet);
+#endif
 #ifdef INET6
 	pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6);
 	if (pfh_inet6 == NULL) {
+#ifdef INET
 		pfil_remove_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK,
 		    pfh_inet);
 		pfil_remove_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
 		    pfh_inet);
+#endif
 		return (ESRCH); /* XXX */
 	}
 	pfil_add_hook(pf_check6_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6);
@@ -3796,10 +3804,12 @@ dehook_pf(void)
 	pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
 	if (pfh_inet == NULL)
 		return (ESRCH); /* XXX */
+#ifdef INET
 	pfil_remove_hook(pf_check_in, NULL, PFIL_IN | PFIL_WAITOK,
 	    pfh_inet);
 	pfil_remove_hook(pf_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
 	    pfh_inet);
+#endif
 #ifdef INET6
 	pfh_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6);
 	if (pfh_inet6 == NULL)

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:35: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 059701065678;
	Wed, 27 Apr 2011 19:35:51 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id D94228FC19;
	Wed, 27 Apr 2011 19:35:50 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3RJZo4K079816;
	Wed, 27 Apr 2011 12:35:50 -0700 (PDT)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3RJZowf079815;
	Wed, 27 Apr 2011 12:35:50 -0700 (PDT) (envelope-from obrien)
Date: Wed, 27 Apr 2011 12:35:50 -0700
From: "David O'Brien" 
To: John Baldwin 
Message-ID: <20110427193550.GA79786@dragon.NUXI.org>
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
	<20110426222641.GA44259@dragon.NUXI.org>
	<201104271048.33325.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201104271048.33325.jhb@freebsd.org>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@freebsd.org
List-Id: "SVN commit messages 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, 27 Apr 2011 19:35:51 -0000

On Wed, Apr 27, 2011 at 10:48:33AM -0400, John Baldwin wrote:
> For changing WARNS, 'make universe' works well

I have to disagree.  Due to its silent failing, it is only suitable for
what PHK added it for -- "what if" changes.
[Message-ID: <13101.1227520743@critter.freebsd.dk>]

One has to do all the various greps of the output in order to be
confident of their belief of the results.

We really need a new target that builds more normal (fails on first
error) and makes it obvious when there is a failure.

-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:36: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 103D9106566B;
	Wed, 27 Apr 2011 19:36:01 +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 DBA2F8FC13;
	Wed, 27 Apr 2011 19:36: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 p3RJa0Wp086167;
	Wed, 27 Apr 2011 19:36:00 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJa08q086163;
	Wed, 27 Apr 2011 19:36:00 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104271936.p3RJa08q086163@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 19:36:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221133 - in stable/8/sys: mips/alchemy mips/sibyte
	powerpc/booke
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 19:36:01 -0000

Author: jhb
Date: Wed Apr 27 19:36:00 2011
New Revision: 221133
URL: http://svn.freebsd.org/changeset/base/221133

Log:
  MFC: Various small compile nits found by make universe that are in already
  merged changes or larger changes not suitable for MFC.

Modified:
  stable/8/sys/mips/alchemy/obio.c
  stable/8/sys/mips/sibyte/sb_zbbus.c
  stable/8/sys/powerpc/booke/platform_bare.c

Modified: stable/8/sys/mips/alchemy/obio.c
==============================================================================
--- stable/8/sys/mips/alchemy/obio.c	Wed Apr 27 19:34:01 2011	(r221132)
+++ stable/8/sys/mips/alchemy/obio.c	Wed Apr 27 19:36:00 2011	(r221133)
@@ -101,7 +101,7 @@ int irq_priorities[NIRQS] = {
 
 static int	obio_activate_resource(device_t, device_t, int, int,
 		    struct resource *);
-static device_t	obio_add_child(device_t, int, const char *, int);
+static device_t	obio_add_child(device_t, u_int, const char *, int);
 static struct resource *
 		obio_alloc_resource(device_t, device_t, int, int *, u_long,
 		    u_long, u_long, u_int);
@@ -472,7 +472,7 @@ obio_hinted_child(device_t bus, const ch
 }
 
 static device_t
-obio_add_child(device_t bus, int order, const char *name, int unit)
+obio_add_child(device_t bus, u_int order, const char *name, int unit)
 {
 	device_t		child;
 	struct obio_ivar	*ivar;

Modified: stable/8/sys/mips/sibyte/sb_zbbus.c
==============================================================================
--- stable/8/sys/mips/sibyte/sb_zbbus.c	Wed Apr 27 19:34:01 2011	(r221132)
+++ stable/8/sys/mips/sibyte/sb_zbbus.c	Wed Apr 27 19:36:00 2011	(r221133)
@@ -402,7 +402,7 @@ zbbus_setup_intr(device_t dev, device_t 
 }
 
 static device_t
-zbbus_add_child(device_t bus, int order, const char *name, int unit)
+zbbus_add_child(device_t bus, u_int order, const char *name, int unit)
 {
 	device_t child;
 	struct zbbus_devinfo *dinfo;

Modified: stable/8/sys/powerpc/booke/platform_bare.c
==============================================================================
--- stable/8/sys/powerpc/booke/platform_bare.c	Wed Apr 27 19:34:01 2011	(r221132)
+++ stable/8/sys/powerpc/booke/platform_bare.c	Wed Apr 27 19:36:00 2011	(r221133)
@@ -79,7 +79,7 @@ static platform_method_t bare_methods[] 
 	PLATFORMMETHOD(platform_smp_get_bsp,	bare_smp_get_bsp),
 	PLATFORMMETHOD(platform_smp_start_cpu,	bare_smp_start_cpu),
 
-	PLATFORMMETHOD(platform_reset,		e500_reset);
+	PLATFORMMETHOD(platform_reset,		e500_reset),
 
 	{ 0, 0 }
 };

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19: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 959BC106564A;
	Wed, 27 Apr 2011 19:36:35 +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 866258FC2C;
	Wed, 27 Apr 2011 19: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 p3RJaZbW086225;
	Wed, 27 Apr 2011 19:36:35 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJaZH1086222;
	Wed, 27 Apr 2011 19:36:35 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104271936.p3RJaZH1086222@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 27 Apr 2011 19: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: r221134 - in head/sys: conf 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: Wed, 27 Apr 2011 19:36:35 -0000

Author: bz
Date: Wed Apr 27 19:36:35 2011
New Revision: 221134
URL: http://svn.freebsd.org/changeset/base/221134

Log:
  MfP4 CH=192029:
  
  Expose ip_icmp.c to INET6 as well and only export badport_bandlim()
  along with the two sysctls in the non-INET case.
  The bandlim types work for all cases I reviewed in IPv6 as well and
  the sysctls are available as we export net.inet.* from in_proto.c.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/conf/files
  head/sys/netinet/ip_icmp.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Wed Apr 27 19:36:00 2011	(r221133)
+++ head/sys/conf/files	Wed Apr 27 19:36:35 2011	(r221134)
@@ -2707,7 +2707,7 @@ netinet/ipfw/ip_fw_pfil.c	optional inet 
 netinet/ipfw/ip_fw_sockopt.c	optional inet ipfirewall
 netinet/ipfw/ip_fw_table.c	optional inet ipfirewall
 netinet/ipfw/ip_fw_nat.c	optional inet ipfirewall_nat
-netinet/ip_icmp.c		optional inet
+netinet/ip_icmp.c		optional inet | inet6
 netinet/ip_input.c		optional inet
 netinet/ip_ipsec.c		optional inet ipsec
 netinet/ip_mroute.c		optional mrouting inet | mrouting inet6

Modified: head/sys/netinet/ip_icmp.c
==============================================================================
--- head/sys/netinet/ip_icmp.c	Wed Apr 27 19:36:00 2011	(r221133)
+++ head/sys/netinet/ip_icmp.c	Wed Apr 27 19:36:35 2011	(r221134)
@@ -32,6 +32,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_inet.h"
 #include "opt_ipsec.h"
 
 #include 
@@ -62,6 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef INET
 #ifdef IPSEC
 #include 
 #include 
@@ -70,12 +72,26 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#endif /* INET */
 
 /*
  * ICMP routines: error generation, receive packet processing, and
  * routines to turnaround packets back to the originator, and
  * host table maintenance routines.
  */
+static VNET_DEFINE(int, icmplim) = 200;
+#define	V_icmplim			VNET(icmplim)
+SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW,
+	&VNET_NAME(icmplim), 0,
+	"Maximum number of ICMP responses per second");
+
+static VNET_DEFINE(int, icmplim_output) = 1;
+#define	V_icmplim_output		VNET(icmplim_output)
+SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW,
+	&VNET_NAME(icmplim_output), 0,
+	"Enable rate limiting of ICMP responses");
+
+#ifdef INET
 VNET_DEFINE(struct icmpstat, icmpstat);
 SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW,
 	&VNET_NAME(icmpstat), icmpstat, "");
@@ -104,18 +120,6 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO
 	&VNET_NAME(log_redirect), 0,
 	"Log ICMP redirects to the console");
 
-static VNET_DEFINE(int, icmplim) = 200;
-#define	V_icmplim			VNET(icmplim)
-SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW,
-	&VNET_NAME(icmplim), 0,
-	"Maximum number of ICMP responses per second");
-
-static VNET_DEFINE(int, icmplim_output) = 1;
-#define	V_icmplim_output		VNET(icmplim_output)
-SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW,
-	&VNET_NAME(icmplim_output), 0,
-	"Enable rate limiting of ICMP responses");
-
 static VNET_DEFINE(char, reply_src[IFNAMSIZ]);
 #define	V_reply_src			VNET(reply_src)
 SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW,
@@ -922,6 +926,7 @@ ip_next_mtu(int mtu, int dir)
 	}
 	return 0;
 }
+#endif /* INET */
 
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:39: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 153F31065670;
	Wed, 27 Apr 2011 19:39:57 +0000 (UTC) (envelope-from obrien@NUXI.org)
Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85])
	by mx1.freebsd.org (Postfix) with ESMTP id E90B58FC13;
	Wed, 27 Apr 2011 19:39:55 +0000 (UTC)
Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1])
	by dragon.nuxi.org (8.14.4/8.14.4) with ESMTP id p3RJdi6Z079904;
	Wed, 27 Apr 2011 12:39:44 -0700 (PDT)
	(envelope-from obrien@dragon.nuxi.org)
Received: (from obrien@localhost)
	by dragon.nuxi.org (8.14.4/8.14.4/Submit) id p3RJdi5x079903;
	Wed, 27 Apr 2011 12:39:44 -0700 (PDT) (envelope-from obrien)
Date: Wed, 27 Apr 2011 12:39:44 -0700
From: "David O'Brien" 
To: Warner Losh 
Message-ID: <20110427193944.GC79786@dragon.NUXI.org>
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<1303811835.49968.6.camel@buffy.york.ac.uk>
	<67269B04-5727-4B8D-B442-D93CD0CB0A61@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <67269B04-5727-4B8D-B442-D93CD0CB0A61@bsdimp.com>
X-Operating-System: FreeBSD 9.0-CURRENT
X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN?
User-Agent: Mutt/1.5.16 (2007-06-09)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	Gavin Atkinson , src-committers@FreeBSD.org
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: obrien@FreeBSD.org
List-Id: "SVN commit messages 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, 27 Apr 2011 19:39:57 -0000

On Tue, Apr 26, 2011 at 07:27:11AM -0600, Warner Losh wrote:
> I read the test log as "not really tested, feel free to back it out if
> it fails on a different architecture"

Irregardless of the reasons for a build break -- one should feel free to
fix or back the change out until the change can be revisited.

> :)
:-))
 
-- 
-- David  (obrien@FreeBSD.org)

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19: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 84A9E106566B;
	Wed, 27 Apr 2011 19:44:51 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 596798FC1B;
	Wed, 27 Apr 2011 19:44:51 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 0084D46B42;
	Wed, 27 Apr 2011 15:44:51 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AEB48A02E;
	Wed, 27 Apr 2011 15:44:50 -0400 (EDT)
From: John Baldwin 
To: obrien@freebsd.org
Date: Wed, 27 Apr 2011 15:44:47 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; )
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104271048.33325.jhb@freebsd.org>
	<20110427193550.GA79786@dragon.NUXI.org>
In-Reply-To: <20110427193550.GA79786@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201104271544.47729.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Wed, 27 Apr 2011 15:44:50 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 19:44:51 -0000

On Wednesday, April 27, 2011 3:35:50 pm David O'Brien wrote:
> On Wed, Apr 27, 2011 at 10:48:33AM -0400, John Baldwin wrote:
> > For changing WARNS, 'make universe' works well
> 
> I have to disagree.  Due to its silent failing, it is only suitable for
> what PHK added it for -- "what if" changes.
> [Message-ID: <13101.1227520743@critter.freebsd.dk>]
> 
> One has to do all the various greps of the output in order to be
> confident of their belief of the results.
> 
> We really need a new target that builds more normal (fails on first
> error) and makes it obvious when there is a failure.

make tinderbox already does this.  It gives you a nice summary at the end if 
anything failed.  If things do fail, yes, you have to look in the listed files 
to find the errors, but 'make tinderbox' tells you exactly which files to 
check.  For example:

--------------------------------------------------------------
>>> make universe completed on Wed Apr 27 15:05:23 EDT 2011
                      (started Wed Apr 27 14:09:08 EDT 2011)
--------------------------------------------------------------
Tinderbox failed:
mips AR71XX kernel failed, check _.mips.AR71XX for details
mips MALTA64 kernel failed, check _.mips.MALTA64 for details
....

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:46: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 98885106566B;
	Wed, 27 Apr 2011 19:46:57 +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 8700C8FC1E;
	Wed, 27 Apr 2011 19:46: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 p3RJkvtV086666;
	Wed, 27 Apr 2011 19:46:57 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RJkv5Y086656;
	Wed, 27 Apr 2011 19:46:57 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201104271946.p3RJkv5Y086656@svn.freebsd.org>
From: Mikolaj Golub 
Date: Wed, 27 Apr 2011 19:46: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: r221135 - in stable/8/sbin: hastctl 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: Wed, 27 Apr 2011 19:46:57 -0000

Author: trociny
Date: Wed Apr 27 19:46:57 2011
New Revision: 221135
URL: http://svn.freebsd.org/changeset/base/221135

Log:
  MFC r220520, r220521, r220522, r220523, r220573, r220744, r220865,
    r220889, r220890, r220898, r220899:
  
  r220520:
  
  hastd(8) maintains a map of dirty extents, not hastctl(8). Fix this.
  
  r220521:
  
  Fix a typo in comments.
  
  r220522:
  
  In hast_proto_recv_data() check that the size of the data to be
  received does not exceed the buffer size.
  
  r220573 (pjd):
  
  The replication mode that is currently support is fullsync, not memsync.
  Correct this and print a warning if different replication mode is
  configured.
  
  r220523, r220744:
  
  Remove hast_proto_recv(). It was used only in one place, where
  hast_proto_recv_hdr() may be used.
  
  r220865 (pjd):
  
  Scenario:
  - We have two nodes connected and synchronized (local counters on both sides
    are 0).
  - We take secondary down and recreate it.
  - Primary connects to it and starts synchronization (but local counters are
    still 0).
  - We switch the roles.
  - Synchronization restarts but data is synchronized now from new primary
    (because local counters are 0) that doesn't have new data yet.
  
  This fix this issue we bump local counter on primary when we discover that
  connected secondary was recreated and has no data yet.
  
  Reported by:    trociny
  Discussed with: trociny
  Tested by:      trociny
  
  r220889 (pjd):
  
  Timeout must be positive.
  
  r220890 (pjd):
  
  If we act in different role than requested by the remote node, log it
  as a warning and not an error.
  
  MFC after:      1 week
  
  r220898 (pjd), r220899 (pjd):
  
  When we become primary, we connect to the remote and expect it to be in
  secondary role. It is possible that the remote node is primary, but only
  because there was a role change and it didn't finish cleaning up (unmounting
  file systems, etc.). If we detect such situation, wait for the remote node
  to switch the role to secondary before accepting I/Os. If we don't wait for
  it in that case, we will most likely cause split-brain.
  
  Approved by:	pjd (mentor)

Modified:
  stable/8/sbin/hastctl/hastctl.8
  stable/8/sbin/hastctl/hastctl.c
  stable/8/sbin/hastd/activemap.c
  stable/8/sbin/hastd/hast_proto.c
  stable/8/sbin/hastd/hast_proto.h
  stable/8/sbin/hastd/hastd.c
  stable/8/sbin/hastd/parse.y
  stable/8/sbin/hastd/primary.c
  stable/8/sbin/hastd/secondary.c
Directory Properties:
  stable/8/sbin/hastctl/   (props changed)
  stable/8/sbin/hastd/   (props changed)

Modified: stable/8/sbin/hastctl/hastctl.8
==============================================================================
--- stable/8/sbin/hastctl/hastctl.8	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastctl/hastctl.8	Wed Apr 27 19:46:57 2011	(r221135)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 13, 2011
+.Dd April 10, 2011
 .Dt HASTCTL 8
 .Os
 .Sh NAME
@@ -88,7 +88,7 @@ Additional options include:
 .It Fl e Ar extentsize
 Size of an extent.
 Extent is a block which is used for synchronization.
-.Nm
+.Xr hastd 8
 maintains a map of dirty extents and extent is the smallest region that
 can be marked as dirty.
 If any part of an extent is modified, entire extent will be synchronized

Modified: stable/8/sbin/hastctl/hastctl.c
==============================================================================
--- stable/8/sbin/hastctl/hastctl.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastctl/hastctl.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -492,7 +492,7 @@ main(int argc, char *argv[])
 	}
 	nv_free(nv);
 	/* ...and receive reply. */
-	if (hast_proto_recv(NULL, controlconn, &nv, NULL, 0) < 0) {
+	if (hast_proto_recv_hdr(controlconn, &nv) < 0) {
 		pjdlog_exit(EX_UNAVAILABLE,
 		    "cannot receive reply from hastd via %s",
 		    cfg->hc_controladdr);

Modified: stable/8/sbin/hastd/activemap.c
==============================================================================
--- stable/8/sbin/hastd/activemap.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/activemap.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -470,7 +470,7 @@ activemap_copyin(struct activemap *amp, 
 }
 
 /*
- * Function merges the given bitmap with existng one.
+ * Function merges the given bitmap with existing one.
  */
 void
 activemap_merge(struct activemap *amp, const unsigned char *buf, size_t size)

Modified: stable/8/sbin/hastd/hast_proto.c
==============================================================================
--- stable/8/sbin/hastd/hast_proto.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/hast_proto.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -189,9 +189,12 @@ hast_proto_recv_data(const struct hast_r
 	dptr = data;
 
 	dsize = nv_get_uint32(nv, "size");
-	if (dsize == 0)
+	if (dsize > size) {
+		errno = EINVAL;
+		goto end;
+	} else if (dsize == 0) {
 		(void)nv_set_error(nv, 0);
-	else {
+	} else {
 		if (proto_recv(conn, data, dsize) < 0)
 			goto end;
 		for (ii = sizeof(pipeline) / sizeof(pipeline[0]); ii > 0;
@@ -216,26 +219,3 @@ end:
 		free(dptr);
 	return (ret);
 }
-
-int
-hast_proto_recv(const struct hast_resource *res, struct proto_conn *conn,
-    struct nv **nvp, void *data, size_t size)
-{
-	struct nv *nv;
-	size_t dsize;
-	int ret;
-
-	ret = hast_proto_recv_hdr(conn, &nv);
-	if (ret < 0)
-		return (ret);
-	dsize = nv_get_uint32(nv, "size");
-	if (dsize == 0)
-		(void)nv_set_error(nv, 0);
-	else
-		ret = hast_proto_recv_data(res, conn, nv, data, size);
-	if (ret < 0)
-		nv_free(nv);
-	else
-		*nvp = nv;
-	return (ret);
-}

Modified: stable/8/sbin/hastd/hast_proto.h
==============================================================================
--- stable/8/sbin/hastd/hast_proto.h	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/hast_proto.h	Wed Apr 27 19:46:57 2011	(r221135)
@@ -39,8 +39,6 @@
 
 int hast_proto_send(const struct hast_resource *res, struct proto_conn *conn,
     struct nv *nv, const void *data, size_t size);
-int hast_proto_recv(const struct hast_resource *res, struct proto_conn *conn,
-    struct nv **nvp, void *data, size_t size);
 int hast_proto_recv_hdr(const struct proto_conn *conn, struct nv **nvp);
 int hast_proto_recv_data(const struct hast_resource *res,
     struct proto_conn *conn, struct nv *nv, void *data, size_t size);

Modified: stable/8/sbin/hastd/hastd.c
==============================================================================
--- stable/8/sbin/hastd/hastd.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/hastd.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -730,12 +730,19 @@ listen_accept(void)
 	}
 	/* Is the resource marked as secondary? */
 	if (res->hr_role != HAST_ROLE_SECONDARY) {
-		pjdlog_error("We act as %s for the resource and not as %s as requested by %s.",
+		pjdlog_warning("We act as %s for the resource and not as %s as requested by %s.",
 		    role2str(res->hr_role), role2str(HAST_ROLE_SECONDARY),
 		    raddr);
 		nv_add_stringf(nverr, "errmsg",
 		    "Remote node acts as %s for the resource and not as %s.",
 		    role2str(res->hr_role), role2str(HAST_ROLE_SECONDARY));
+		if (res->hr_role == HAST_ROLE_PRIMARY) {
+			/*
+			 * If we act as primary request the other side to wait
+			 * for us a bit, as we might be finishing cleanups.
+			 */
+			nv_add_uint8(nverr, 1, "wait");
+		}
 		goto fail;
 	}
 	/* Does token (if exists) match? */

Modified: stable/8/sbin/hastd/parse.y
==============================================================================
--- stable/8/sbin/hastd/parse.y	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/parse.y	Wed Apr 27 19:46:57 2011	(r221135)
@@ -169,7 +169,7 @@ yy_config_parse(const char *config, bool
 	lineno = 0;
 
 	depth0_timeout = HAST_TIMEOUT;
-	depth0_replication = HAST_REPLICATION_MEMSYNC;
+	depth0_replication = HAST_REPLICATION_FULLSYNC;
 	depth0_checksum = HAST_CHECKSUM_NONE;
 	depth0_compression = HAST_COMPRESSION_HOLE;
 	strlcpy(depth0_control, HAST_CONTROL, sizeof(depth0_control));
@@ -228,6 +228,13 @@ 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) {
+			pjdlog_warning("Replication mode \"%s\" is not implemented, falling back to \"%s\".",
+			    curres->hr_replication == HAST_REPLICATION_MEMSYNC ?
+			    "memsync" : "async", "fullsync");
+			curres->hr_replication = HAST_REPLICATION_FULLSYNC;
+		}
 		if (curres->hr_checksum == -1) {
 			/*
 			 * Checksum is not set at resource-level.
@@ -454,6 +461,10 @@ compression_type:
 
 timeout_statement:	TIMEOUT NUM
 	{
+		if ($2 <= 0) {
+			pjdlog_error("Negative or zero timeout.");
+			return (1);
+		}
 		switch (depth) {
 		case 0:
 			depth0_timeout = $2;

Modified: stable/8/sbin/hastd/primary.c
==============================================================================
--- stable/8/sbin/hastd/primary.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/primary.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -219,6 +219,7 @@ static pthread_cond_t range_regular_cond
 static struct rangelocks *range_sync;
 static bool range_sync_wait;
 static pthread_cond_t range_sync_cond;
+static bool fullystarted;
 
 static void *ggate_recv_thread(void *arg);
 static void *local_send_thread(void *arg);
@@ -524,7 +525,7 @@ primary_connect(struct hast_resource *re
 	return (0);
 }
 
-static bool
+static int
 init_remote(struct hast_resource *res, struct proto_conn **inp,
     struct proto_conn **outp)
 {
@@ -537,6 +538,7 @@ init_remote(struct hast_resource *res, s
 	int64_t datasize;
 	uint32_t mapsize;
 	size_t size;
+	int error;
 
 	PJDLOG_ASSERT((inp == NULL && outp == NULL) || (inp != NULL && outp != NULL));
 	PJDLOG_ASSERT(real_remote(res));
@@ -545,7 +547,9 @@ init_remote(struct hast_resource *res, s
 	errmsg = NULL;
 
 	if (primary_connect(res, &out) == -1)
-		return (false);
+		return (ECONNREFUSED);
+
+	error = ECONNABORTED;
 
 	/*
 	 * First handshake step.
@@ -577,6 +581,8 @@ init_remote(struct hast_resource *res, s
 	errmsg = nv_get_string(nvin, "errmsg");
 	if (errmsg != NULL) {
 		pjdlog_warning("%s", errmsg);
+		if (nv_exists(nvin, "wait"))
+			error = EBUSY;
 		nv_free(nvin);
 		goto close;
 	}
@@ -667,6 +673,25 @@ init_remote(struct hast_resource *res, s
 	res->hr_secondary_localcnt = nv_get_uint64(nvin, "localcnt");
 	res->hr_secondary_remotecnt = nv_get_uint64(nvin, "remotecnt");
 	res->hr_syncsrc = nv_get_uint8(nvin, "syncsrc");
+	if (nv_exists(nvin, "virgin")) {
+		/*
+		 * Secondary was reinitialized, bump localcnt if it is 0 as
+		 * only we have the data.
+		 */
+		PJDLOG_ASSERT(res->hr_syncsrc == HAST_SYNCSRC_PRIMARY);
+		PJDLOG_ASSERT(res->hr_secondary_localcnt == 0);
+
+		if (res->hr_primary_localcnt == 0) {
+			PJDLOG_ASSERT(res->hr_secondary_remotecnt == 0);
+
+			mtx_lock(&metadata_lock);
+			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);
+		}
+	}
 	map = NULL;
 	mapsize = nv_get_uint32(nvin, "mapsize");
 	if (mapsize > 0) {
@@ -715,14 +740,14 @@ init_remote(struct hast_resource *res, s
 		res->hr_remoteout = out;
 	}
 	event_send(res, EVENT_CONNECT);
-	return (true);
+	return (0);
 close:
 	if (errmsg != NULL && strcmp(errmsg, "Split-brain condition!") == 0)
 		event_send(res, EVENT_SPLITBRAIN);
 	proto_close(out);
 	if (in != NULL)
 		proto_close(in);
-	return (false);
+	return (error);
 }
 
 static void
@@ -901,8 +926,30 @@ hastd_primary(struct hast_resource *res)
 	 */
 	error = pthread_create(&td, NULL, ctrl_thread, res);
 	PJDLOG_ASSERT(error == 0);
-	if (real_remote(res) && init_remote(res, NULL, NULL))
-		sync_start();
+	if (real_remote(res)) {
+		error = init_remote(res, NULL, NULL);
+		if (error == 0) {
+			sync_start();
+		} else if (error == EBUSY) {
+			time_t start = time(NULL);
+
+			pjdlog_warning("Waiting for remote node to become %s for %ds.",
+			    role2str(HAST_ROLE_SECONDARY),
+			    res->hr_timeout);
+			for (;;) {
+				sleep(1);
+				error = init_remote(res, NULL, NULL);
+				if (error != EBUSY)
+					break;
+				if (time(NULL) > start + res->hr_timeout)
+					break;
+			}
+			if (error == EBUSY) {
+				pjdlog_warning("Remote node is still %s, starting anyway.",
+				    role2str(HAST_ROLE_PRIMARY));
+			}
+		}
+	}
 	error = pthread_create(&td, NULL, ggate_recv_thread, res);
 	PJDLOG_ASSERT(error == 0);
 	error = pthread_create(&td, NULL, local_send_thread, res);
@@ -913,6 +960,7 @@ hastd_primary(struct hast_resource *res)
 	PJDLOG_ASSERT(error == 0);
 	error = pthread_create(&td, NULL, ggate_send_thread, res);
 	PJDLOG_ASSERT(error == 0);
+	fullystarted = true;
 	(void)sync_thread(res);
 }
 
@@ -2076,7 +2124,7 @@ guard_one(struct hast_resource *res, uns
 	pjdlog_debug(2, "remote_guard: Reconnecting to %s.",
 	    res->hr_remoteaddr);
 	in = out = NULL;
-	if (init_remote(res, &in, &out)) {
+	if (init_remote(res, &in, &out) == 0) {
 		rw_wlock(&hio_remote_lock[ncomp]);
 		PJDLOG_ASSERT(res->hr_remotein == NULL);
 		PJDLOG_ASSERT(res->hr_remoteout == NULL);
@@ -2134,12 +2182,19 @@ guard_thread(void *arg)
 			break;
 		}
 
-		pjdlog_debug(2, "remote_guard: Checking connections.");
-		now = time(NULL);
-		if (lastcheck + HAST_KEEPALIVE <= now) {
-			for (ii = 0; ii < ncomps; ii++)
-				guard_one(res, ii);
-			lastcheck = now;
+		/*
+		 * Don't check connections until we fully started,
+		 * as we may still be looping, waiting for remote node
+		 * to switch from primary to secondary.
+		 */
+		if (fullystarted) {
+			pjdlog_debug(2, "remote_guard: Checking connections.");
+			now = time(NULL);
+			if (lastcheck + HAST_KEEPALIVE <= now) {
+				for (ii = 0; ii < ncomps; ii++)
+					guard_one(res, ii);
+				lastcheck = now;
+			}
 		}
 		signo = sigtimedwait(&mask, NULL, &timeout);
 	}

Modified: stable/8/sbin/hastd/secondary.c
==============================================================================
--- stable/8/sbin/hastd/secondary.c	Wed Apr 27 19:36:35 2011	(r221134)
+++ stable/8/sbin/hastd/secondary.c	Wed Apr 27 19:46:57 2011	(r221135)
@@ -261,6 +261,7 @@ init_remote(struct hast_resource *res, s
 		} else {
 			memset(map, 0xff, mapsize);
 		}
+		nv_add_int8(nvout, 1, "virgin");
 		nv_add_uint8(nvout, HAST_SYNCSRC_PRIMARY, "syncsrc");
 	} else if (res->hr_resuid != resuid) {
 		char errmsg[256];

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 19:57: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 001301065672;
	Wed, 27 Apr 2011 19:57:04 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id B18298FC22;
	Wed, 27 Apr 2011 19:57:04 +0000 (UTC)
Received: from [10.30.101.54] ([209.117.142.2]) (authenticated bits=0)
	by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p3RJsGwc051380
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO);
	Wed, 27 Apr 2011 13:54:17 -0600 (MDT) (envelope-from imp@bsdimp.com)
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Warner Losh 
In-Reply-To: <20110427193550.GA79786@dragon.NUXI.org>
Date: Wed, 27 Apr 2011 13:54:10 -0600
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
	<20110426222641.GA44259@dragon.NUXI.org>
	<201104271048.33325.jhb@freebsd.org>
	<20110427193550.GA79786@dragon.NUXI.org>
To: obrien@freebsd.org
X-Mailer: Apple Mail (2.1084)
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(harmony.bsdimp.com [10.0.0.6]);
	Wed, 27 Apr 2011 13:54:18 -0600 (MDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, John Baldwin 
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 19:57:05 -0000

see make tinderbox if you want first fail semantics.

On Apr 27, 2011, at 1:35 PM, David O'Brien wrote:

> On Wed, Apr 27, 2011 at 10:48:33AM -0400, John Baldwin wrote:
>> For changing WARNS, 'make universe' works well
> 
> I have to disagree.  Due to its silent failing, it is only suitable for
> what PHK added it for -- "what if" changes.
> [Message-ID: <13101.1227520743@critter.freebsd.dk>]
> 
> One has to do all the various greps of the output in order to be
> confident of their belief of the results.
> 
> We really need a new target that builds more normal (fails on first
> error) and makes it obvious when there is a failure.
> 
> -- 
> -- David  (obrien@FreeBSD.org)
> 
> 


From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 20:08: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 184F0106566B;
	Wed, 27 Apr 2011 20:08:45 +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 08C2F8FC08;
	Wed, 27 Apr 2011 20:08: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 p3RK8iok087597;
	Wed, 27 Apr 2011 20:08:44 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RK8itg087595;
	Wed, 27 Apr 2011 20:08:44 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104272008.p3RK8itg087595@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 20:08:44 +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: r221138 - head/sys/dev/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 20:08:45 -0000

Author: jhb
Date: Wed Apr 27 20:08:44 2011
New Revision: 221138
URL: http://svn.freebsd.org/changeset/base/221138

Log:
  Only align MSI message groups based on the number of messages being
  allocated, not the maximum number of messages the device supports.  The
  spec only requires the former, and I believe I implemented the latter due
  to misunderstanding an e-mail.  In particular, this fixes an issue where
  having several devices that all support 16 messages can run out of
  IDT vectors on x86 even though the driver only uses a single message.
  
  Submitted by:	Bret Ketchum  bcketchum of gmail
  MFC after:	1 week

Modified:
  head/sys/dev/pci/pci.c

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c	Wed Apr 27 19:54:45 2011	(r221137)
+++ head/sys/dev/pci/pci.c	Wed Apr 27 20:08:44 2011	(r221138)
@@ -1969,7 +1969,7 @@ pci_alloc_msi_method(device_t dev, devic
 	for (;;) {
 		/* Try to allocate N messages. */
 		error = PCIB_ALLOC_MSI(device_get_parent(dev), child, actual,
-		    cfg->msi.msi_msgnum, irqs);
+		    actual, irqs);
 		if (error == 0)
 			break;
 		if (actual == 1)

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 20:42: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 DAF1B106566C;
	Wed, 27 Apr 2011 20:42:30 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AF2448FC12;
	Wed, 27 Apr 2011 20:42: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 p3RKgUKc089018;
	Wed, 27 Apr 2011 20:42:30 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RKgUYv089014;
	Wed, 27 Apr 2011 20:42:30 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104272042.p3RKgUYv089014@svn.freebsd.org>
From: Rick Macklem 
Date: Wed, 27 Apr 2011 20:42: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: r221139 - in head: etc/rc.d sys/fs/nfsclient
	sys/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 20:42:30 -0000

Author: rmacklem
Date: Wed Apr 27 20:42:30 2011
New Revision: 221139
URL: http://svn.freebsd.org/changeset/base/221139

Log:
  Fix module names and dependencies so the NFS clients will
  load correctly as modules after r221124.

Modified:
  head/etc/rc.d/nfsclient
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/nfsclient/nfs_vfsops.c

Modified: head/etc/rc.d/nfsclient
==============================================================================
--- head/etc/rc.d/nfsclient	Wed Apr 27 20:08:44 2011	(r221138)
+++ head/etc/rc.d/nfsclient	Wed Apr 27 20:42:30 2011	(r221139)
@@ -13,7 +13,7 @@ name="nfsclient"
 rcvar="nfs_client_enable"
 start_cmd="nfsclient_start"
 stop_cmd="unmount_all"
-required_modules="nfsclient:nfs"
+required_modules="nfsclient:oldnfs"
 
 nfsclient_start()
 {

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Wed Apr 27 20:08:44 2011	(r221138)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Wed Apr 27 20:42:30 2011	(r221139)
@@ -134,7 +134,11 @@ static struct vfsops nfs_vfsops = {
 VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
-MODULE_VERSION(newnfs, 1);
+MODULE_VERSION(nfs, 1);
+MODULE_DEPEND(nfs, nfscommon, 1, 1, 1);
+MODULE_DEPEND(nfs, krpc, 1, 1, 1);
+MODULE_DEPEND(nfs, nfssvc, 1, 1, 1);
+MODULE_DEPEND(nfs, nfslock, 1, 1, 1);
 
 /*
  * This structure is now defined in sys/nfs/nfs_diskless.c so that it

Modified: head/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- head/sys/nfsclient/nfs_vfsops.c	Wed Apr 27 20:08:44 2011	(r221138)
+++ head/sys/nfsclient/nfs_vfsops.c	Wed Apr 27 20:42:30 2011	(r221139)
@@ -147,13 +147,13 @@ static struct vfsops nfs_vfsops = {
 VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK);
 
 /* So that loader and kldload(2) can find us, wherever we are.. */
-MODULE_VERSION(nfs, 1);
-MODULE_DEPEND(nfs, krpc, 1, 1, 1);
+MODULE_VERSION(oldnfs, 1);
+MODULE_DEPEND(oldnfs, krpc, 1, 1, 1);
 #ifdef KGSSAPI
-MODULE_DEPEND(nfs, kgssapi, 1, 1, 1);
+MODULE_DEPEND(oldnfs, kgssapi, 1, 1, 1);
 #endif
-MODULE_DEPEND(nfs, nfs_common, 1, 1, 1);
-MODULE_DEPEND(nfs, nfslock, 1, 1, 1);
+MODULE_DEPEND(oldnfs, nfs_common, 1, 1, 1);
+MODULE_DEPEND(oldnfs, nfslock, 1, 1, 1);
 
 static struct nfs_rpcops nfs_rpcops = {
 	nfs_readrpc,

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 21:13: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 7A5AE106566B;
	Wed, 27 Apr 2011 21:13:20 +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 678FF8FC17;
	Wed, 27 Apr 2011 21:13: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 p3RLDKD3090474;
	Wed, 27 Apr 2011 21:13:20 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLDKE2090468;
	Wed, 27 Apr 2011 21:13:20 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104272113.p3RLDKE2090468@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 21:13:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221140 - in stable/8/sys/dev: acpica pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 21:13:20 -0000

Author: jhb
Date: Wed Apr 27 21:13:20 2011
New Revision: 221140
URL: http://svn.freebsd.org/changeset/base/221140

Log:
  MFC 210864:
  - Retire acpi_pcib_resume().  It is has just been an alias for
    bus_generic_resume() since the pci_link(4) driver was added.
  - Change the ACPI PCI-PCI bridge driver to inherit most of its methods
    from the generic PCI-PCI bridge driver.
  - This also exposes the generic PCI-PCI bridge driver as pcib_driver so
    other drivers can inherit from it.

Modified:
  stable/8/sys/dev/acpica/acpi_pcib.c
  stable/8/sys/dev/acpica/acpi_pcib_acpi.c
  stable/8/sys/dev/acpica/acpi_pcib_pci.c
  stable/8/sys/dev/acpica/acpi_pcibvar.h
  stable/8/sys/dev/pci/pcib_private.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/acpica/acpi_pcib.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 20:42:30 2011	(r221139)
+++ stable/8/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 21:13:20 2011	(r221140)
@@ -171,13 +171,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF
     return_VALUE (bus_generic_attach(dev));
 }
 
-int
-acpi_pcib_resume(device_t dev)
-{
-
-    return (bus_generic_resume(dev));
-}
-
 static void
 prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg)
 {

Modified: stable/8/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 20:42:30 2011	(r221139)
+++ stable/8/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 21:13:20 2011	(r221140)
@@ -65,7 +65,6 @@ struct acpi_hpcib_softc {
 
 static int		acpi_pcib_acpi_probe(device_t bus);
 static int		acpi_pcib_acpi_attach(device_t bus);
-static int		acpi_pcib_acpi_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_write_ivar(device_t dev, device_t child,
@@ -94,7 +93,7 @@ static device_method_t acpi_pcib_acpi_me
     DEVMETHOD(device_attach,		acpi_pcib_acpi_attach),
     DEVMETHOD(device_shutdown,		bus_generic_shutdown),
     DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_acpi_resume),
+    DEVMETHOD(device_resume,		bus_generic_resume),
 
     /* Bus interface */
     DEVMETHOD(bus_print_child,		bus_generic_print_child),
@@ -257,13 +256,6 @@ acpi_pcib_acpi_attach(device_t dev)
     return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
 }
 
-static int
-acpi_pcib_acpi_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
 /*
  * Support for standard PCI bridge ivars.
  */

Modified: stable/8/sys/dev/acpica/acpi_pcib_pci.c
==============================================================================
--- stable/8/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 20:42:30 2011	(r221139)
+++ stable/8/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 21:13:20 2011	(r221140)
@@ -65,7 +65,6 @@ struct acpi_pcib_lookup_info {
 
 static int		acpi_pcib_pci_probe(device_t bus);
 static int		acpi_pcib_pci_attach(device_t bus);
-static int		acpi_pcib_pci_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_pci_route_interrupt(device_t pcib,
@@ -75,39 +74,20 @@ static device_method_t acpi_pcib_pci_met
     /* Device interface */
     DEVMETHOD(device_probe,		acpi_pcib_pci_probe),
     DEVMETHOD(device_attach,		acpi_pcib_pci_attach),
-    DEVMETHOD(device_shutdown,		bus_generic_shutdown),
-    DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_pci_resume),
 
     /* Bus interface */
-    DEVMETHOD(bus_print_child,		bus_generic_print_child),
     DEVMETHOD(bus_read_ivar,		acpi_pcib_read_ivar),
-    DEVMETHOD(bus_write_ivar,		pcib_write_ivar),
-    DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-    DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),
-    DEVMETHOD(bus_deactivate_resource, 	bus_generic_deactivate_resource),
-    DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
-    DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
     /* pcib interface */
-    DEVMETHOD(pcib_maxslots,		pcib_maxslots),
-    DEVMETHOD(pcib_read_config,		pcib_read_config),
-    DEVMETHOD(pcib_write_config,	pcib_write_config),
     DEVMETHOD(pcib_route_interrupt,	acpi_pcib_pci_route_interrupt),
-    DEVMETHOD(pcib_alloc_msi,		pcib_alloc_msi),
-    DEVMETHOD(pcib_release_msi,		pcib_release_msi),
-    DEVMETHOD(pcib_alloc_msix,		pcib_alloc_msix),
-    DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-    DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
     {0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
-    sizeof(struct acpi_pcib_softc));
+DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
+    sizeof(struct acpi_pcib_softc), pcib_driver);
 DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
 MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
 
@@ -142,13 +122,6 @@ acpi_pcib_pci_attach(device_t dev)
 }
 
 static int
-acpi_pcib_pci_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
-static int
 acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 {
     struct acpi_pcib_softc *sc = device_get_softc(dev);

Modified: stable/8/sys/dev/acpica/acpi_pcibvar.h
==============================================================================
--- stable/8/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 20:42:30 2011	(r221139)
+++ stable/8/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 21:13:20 2011	(r221140)
@@ -31,13 +31,14 @@
 #define	_ACPI_PCIBVAR_H_
 
 #ifdef _KERNEL
+
 void	acpi_pci_link_add_reference(device_t dev, int index, device_t pcib,
     int slot, int pin);
 int	acpi_pci_link_route_interrupt(device_t dev, int index);
 int	acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
 int	acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
     ACPI_BUFFER *prtbuf);
-int	acpi_pcib_resume(device_t dev);
+
 #endif /* _KERNEL */
 
 #endif /* !_ACPI_PCIBVAR_H_ */

Modified: stable/8/sys/dev/pci/pcib_private.h
==============================================================================
--- stable/8/sys/dev/pci/pcib_private.h	Wed Apr 27 20:42:30 2011	(r221139)
+++ stable/8/sys/dev/pci/pcib_private.h	Wed Apr 27 21:13:20 2011	(r221140)
@@ -37,6 +37,7 @@
  * Export portions of generic PCI:PCI bridge support so that it can be
  * used by subclasses.
  */
+DECLARE_CLASS(pcib_driver);
 
 /*
  * Bridge-specific data.

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 21:13: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 6B461106564A;
	Wed, 27 Apr 2011 21:13:41 +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 5860D8FC12;
	Wed, 27 Apr 2011 21:13: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 p3RLDfox090523;
	Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLDfPe090517;
	Wed, 27 Apr 2011 21:13:41 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104272113.p3RLDfPe090517@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 27 Apr 2011 21:13:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221141 - in stable/7/sys/dev: acpica pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 21:13:41 -0000

Author: jhb
Date: Wed Apr 27 21:13:40 2011
New Revision: 221141
URL: http://svn.freebsd.org/changeset/base/221141

Log:
  MFC 210864:
  - Retire acpi_pcib_resume().  It is has just been an alias for
    bus_generic_resume() since the pci_link(4) driver was added.
  - Change the ACPI PCI-PCI bridge driver to inherit most of its methods
    from the generic PCI-PCI bridge driver.
  - This also exposes the generic PCI-PCI bridge driver as pcib_driver so
    other drivers can inherit from it.

Modified:
  stable/7/sys/dev/acpica/acpi_pcib.c
  stable/7/sys/dev/acpica/acpi_pcib_acpi.c
  stable/7/sys/dev/acpica/acpi_pcib_pci.c
  stable/7/sys/dev/acpica/acpi_pcibvar.h
  stable/7/sys/dev/pci/pcib_private.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/acpica/acpi_pcib.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -170,13 +170,6 @@ acpi_pcib_attach(device_t dev, ACPI_BUFF
     return_VALUE (bus_generic_attach(dev));
 }
 
-int
-acpi_pcib_resume(device_t dev)
-{
-
-    return (bus_generic_resume(dev));
-}
-
 static void
 prt_lookup_device(ACPI_PCI_ROUTING_TABLE *entry, void *arg)
 {

Modified: stable/7/sys/dev/acpica/acpi_pcib_acpi.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib_acpi.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -63,7 +63,6 @@ struct acpi_hpcib_softc {
 
 static int		acpi_pcib_acpi_probe(device_t bus);
 static int		acpi_pcib_acpi_attach(device_t bus);
-static int		acpi_pcib_acpi_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_write_ivar(device_t dev, device_t child,
@@ -91,7 +90,7 @@ static device_method_t acpi_pcib_acpi_me
     DEVMETHOD(device_attach,		acpi_pcib_acpi_attach),
     DEVMETHOD(device_shutdown,		bus_generic_shutdown),
     DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_acpi_resume),
+    DEVMETHOD(device_resume,		bus_generic_resume),
 
     /* Bus interface */
     DEVMETHOD(bus_print_child,		bus_generic_print_child),
@@ -250,13 +249,6 @@ acpi_pcib_acpi_attach(device_t dev)
     return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus));
 }
 
-static int
-acpi_pcib_acpi_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
 /*
  * Support for standard PCI bridge ivars.
  */

Modified: stable/7/sys/dev/acpica/acpi_pcib_pci.c
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcib_pci.c	Wed Apr 27 21:13:40 2011	(r221141)
@@ -63,7 +63,6 @@ struct acpi_pcib_lookup_info {
 
 static int		acpi_pcib_pci_probe(device_t bus);
 static int		acpi_pcib_pci_attach(device_t bus);
-static int		acpi_pcib_pci_resume(device_t bus);
 static int		acpi_pcib_read_ivar(device_t dev, device_t child,
 			    int which, uintptr_t *result);
 static int		acpi_pcib_pci_route_interrupt(device_t pcib,
@@ -73,39 +72,20 @@ static device_method_t acpi_pcib_pci_met
     /* Device interface */
     DEVMETHOD(device_probe,		acpi_pcib_pci_probe),
     DEVMETHOD(device_attach,		acpi_pcib_pci_attach),
-    DEVMETHOD(device_shutdown,		bus_generic_shutdown),
-    DEVMETHOD(device_suspend,		bus_generic_suspend),
-    DEVMETHOD(device_resume,		acpi_pcib_pci_resume),
 
     /* Bus interface */
-    DEVMETHOD(bus_print_child,		bus_generic_print_child),
     DEVMETHOD(bus_read_ivar,		acpi_pcib_read_ivar),
-    DEVMETHOD(bus_write_ivar,		pcib_write_ivar),
-    DEVMETHOD(bus_alloc_resource,	pcib_alloc_resource),
-    DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
-    DEVMETHOD(bus_activate_resource,	bus_generic_activate_resource),
-    DEVMETHOD(bus_deactivate_resource, 	bus_generic_deactivate_resource),
-    DEVMETHOD(bus_setup_intr,		bus_generic_setup_intr),
-    DEVMETHOD(bus_teardown_intr,	bus_generic_teardown_intr),
 
     /* pcib interface */
-    DEVMETHOD(pcib_maxslots,		pcib_maxslots),
-    DEVMETHOD(pcib_read_config,		pcib_read_config),
-    DEVMETHOD(pcib_write_config,	pcib_write_config),
     DEVMETHOD(pcib_route_interrupt,	acpi_pcib_pci_route_interrupt),
-    DEVMETHOD(pcib_alloc_msi,		pcib_alloc_msi),
-    DEVMETHOD(pcib_release_msi,		pcib_release_msi),
-    DEVMETHOD(pcib_alloc_msix,		pcib_alloc_msix),
-    DEVMETHOD(pcib_release_msix,	pcib_release_msix),
-    DEVMETHOD(pcib_map_msi,		pcib_map_msi),
 
     {0, 0}
 };
 
 static devclass_t pcib_devclass;
 
-DEFINE_CLASS_0(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
-    sizeof(struct acpi_pcib_softc));
+DEFINE_CLASS_1(pcib, acpi_pcib_pci_driver, acpi_pcib_pci_methods,
+    sizeof(struct acpi_pcib_softc), pcib_driver);
 DRIVER_MODULE(acpi_pcib, pci, acpi_pcib_pci_driver, pcib_devclass, 0, 0);
 MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1);
 
@@ -140,13 +120,6 @@ acpi_pcib_pci_attach(device_t dev)
 }
 
 static int
-acpi_pcib_pci_resume(device_t dev)
-{
-
-    return (acpi_pcib_resume(dev));
-}
-
-static int
 acpi_pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
 {
     struct acpi_pcib_softc *sc = device_get_softc(dev);

Modified: stable/7/sys/dev/acpica/acpi_pcibvar.h
==============================================================================
--- stable/7/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/acpica/acpi_pcibvar.h	Wed Apr 27 21:13:40 2011	(r221141)
@@ -31,13 +31,14 @@
 #define	_ACPI_PCIBVAR_H_
 
 #ifdef _KERNEL
+
 void	acpi_pci_link_add_reference(device_t dev, int index, device_t pcib,
     int slot, int pin);
 int	acpi_pci_link_route_interrupt(device_t dev, int index);
 int	acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno);
 int	acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin,
     ACPI_BUFFER *prtbuf);
-int	acpi_pcib_resume(device_t dev);
+
 #endif /* _KERNEL */
 
 #endif /* !_ACPI_PCIBVAR_H_ */

Modified: stable/7/sys/dev/pci/pcib_private.h
==============================================================================
--- stable/7/sys/dev/pci/pcib_private.h	Wed Apr 27 21:13:20 2011	(r221140)
+++ stable/7/sys/dev/pci/pcib_private.h	Wed Apr 27 21:13:40 2011	(r221141)
@@ -37,6 +37,7 @@
  * Export portions of generic PCI:PCI bridge support so that it can be
  * used by subclasses.
  */
+DECLARE_CLASS(pcib_driver);
 
 /*
  * Bridge-specific data.

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 21:33: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 281F51065674;
	Wed, 27 Apr 2011 21:33:57 +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 160208FC0C;
	Wed, 27 Apr 2011 21:33: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 p3RLXu12091356;
	Wed, 27 Apr 2011 21:33:56 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLXuMR091354;
	Wed, 27 Apr 2011 21:33:56 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201104272133.p3RLXuMR091354@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Wed, 27 Apr 2011 21:33: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: r221142 - head/lib/libcrypt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 21:33:57 -0000

Author: obrien
Date: Wed Apr 27 21:33:56 2011
New Revision: 221142
URL: http://svn.freebsd.org/changeset/base/221142

Log:
  Protect the reachover built symbols after the SHA256/512 crypt(3) addition.

Modified:
  head/lib/libcrypt/Makefile

Modified: head/lib/libcrypt/Makefile
==============================================================================
--- head/lib/libcrypt/Makefile	Wed Apr 27 21:13:40 2011	(r221141)
+++ head/lib/libcrypt/Makefile	Wed Apr 27 21:33:56 2011	(r221142)
@@ -31,7 +31,9 @@ CFLAGS+=	-I${.CURDIR} -DHAS_DES -DHAS_BL
 SRCS+=		auth.c property.c
 .for sym in auth_getval property_find properties_read properties_free \
 	    MD4Init MD4Final MD4Update MD4Pad \
-	    MD5Init MD5Final MD5Update MD5Pad
+	    MD5Init MD5Final MD5Update MD5Pad \
+	    SHA256_Init SHA256_Final SHA256_Update \
+	    SHA512_Init SHA512_Final SHA512_Update
 CFLAGS+=	-D${sym}=__${sym}
 .endfor
 

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 21:39: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 6B6F6106566B;
	Wed, 27 Apr 2011 21:39:59 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 598458FC14;
	Wed, 27 Apr 2011 21:39: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 p3RLdxav091644;
	Wed, 27 Apr 2011 21:39:59 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLdxJD091642;
	Wed, 27 Apr 2011 21:39:59 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104272139.p3RLdxJD091642@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 21:39: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: r221143 - head/sbin/mdconfig
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 21:39:59 -0000

Author: des
Date: Wed Apr 27 21:39:59 2011
New Revision: 221143
URL: http://svn.freebsd.org/changeset/base/221143

Log:
  whitespace nit

Modified:
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.c
==============================================================================
--- head/sbin/mdconfig/mdconfig.c	Wed Apr 27 21:33:56 2011	(r221142)
+++ head/sbin/mdconfig/mdconfig.c	Wed Apr 27 21:39:59 2011	(r221143)
@@ -294,7 +294,7 @@ main(int argc, char **argv)
 	}
 	if (action == LIST) {
 		if (mdio.md_options & MD_AUTOUNIT) {
-			/* 
+			/*
 			 * Listing all devices. This is why we pass NULL
 			 * together with OPT_LIST.
 			 */

From owner-svn-src-all@FreeBSD.ORG  Wed Apr 27 21:40: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 677A9106567A;
	Wed, 27 Apr 2011 21:40:49 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 55AC68FC23;
	Wed, 27 Apr 2011 21:40: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 p3RLen8k091720;
	Wed, 27 Apr 2011 21:40:49 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RLenvk091718;
	Wed, 27 Apr 2011 21:40:49 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104272140.p3RLenvk091718@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Wed, 27 Apr 2011 21:40: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: r221144 - head/sbin/mdconfig
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 27 Apr 2011 21:40:49 -0000

Author: des
Date: Wed Apr 27 21:40:49 2011
New Revision: 221144
URL: http://svn.freebsd.org/changeset/base/221144

Log:
  whitespace nit - sorry for the churn

Modified:
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.c
==============================================================================
--- head/sbin/mdconfig/mdconfig.c	Wed Apr 27 21:39:59 2011	(r221143)
+++ head/sbin/mdconfig/mdconfig.c	Wed Apr 27 21:40:49 2011	(r221144)
@@ -141,8 +141,8 @@ main(int argc, char **argv)
 				mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
 				cmdline = 2;
 			}
- 			if (cmdline != 2)
- 				usage();
+			if (cmdline != 2)
+				usage();
 			if (realpath(optarg, mdio.md_file) == NULL) {
 				err(1, "could not find full path for %s",
 				    optarg);

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 00:20: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 E65CD106566B;
	Thu, 28 Apr 2011 00:20:35 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D1EF08FC13;
	Thu, 28 Apr 2011 00:20: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 p3S0KZ0T096935;
	Thu, 28 Apr 2011 00:20:35 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S0KZLc096932;
	Thu, 28 Apr 2011 00:20:35 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104280020.p3S0KZLc096932@svn.freebsd.org>
From: Rick Macklem 
Date: Thu, 28 Apr 2011 00:20: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: r221145 - in head: sbin/mount_nfs 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: Thu, 28 Apr 2011 00:20:36 -0000

Author: rmacklem
Date: Thu Apr 28 00:20:35 2011
New Revision: 221145
URL: http://svn.freebsd.org/changeset/base/221145

Log:
  Update man pages related to the change in default NFS client
  applied by r221124. I also deleted references to idmapd, since that
  daemon no longer exists.
  This is a content change.

Modified:
  head/sbin/mount_nfs/mount_nfs.8
  head/share/man/man5/rc.conf.5

Modified: head/sbin/mount_nfs/mount_nfs.8
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.8	Wed Apr 27 21:40:49 2011	(r221144)
+++ head/sbin/mount_nfs/mount_nfs.8	Thu Apr 28 00:20:35 2011	(r221145)
@@ -28,7 +28,7 @@
 .\"	@(#)mount_nfs.8	8.3 (Berkeley) 3/29/95
 .\" $FreeBSD$
 .\"
-.Dd July 28, 2009
+.Dd April 27, 2011
 .Dt MOUNT_NFS 8
 .Os
 .Sh NAME
@@ -63,6 +63,12 @@ It implements the mount protocol as desc
 .%T "NFS: Network File System Version 3 Protocol Specification" ,
 Appendix I.
 .Pp
+If the file system type is specified as ``oldnfs'', which implies this
+command is run as ``mount_oldnfs'', then it forces use of the old NFS
+client, which does not support the
+.Cm nfsv4
+option.
+.Pp
 By default,
 .Nm
 keeps retrying until the mount succeeds.
@@ -163,10 +169,8 @@ Note that NFS version 2 has a file size 
 Use the NFS Version 3 protocol.
 .It Cm nfsv4
 Use the NFS Version 4 protocol.
-This option will force the mount to use the experimental nfs subsystem and
+This option will force the mount to use
 TCP transport.
-To use the experimental nfs subsystem for nfsv2 and nfsv3 mounts, you
-must specify the ``newnfs'' file system type instead of ``nfs''.
 .It Cm noconn
 For UDP mount points, do not do a
 .Xr connect 2 .

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Wed Apr 27 21:40:49 2011	(r221144)
+++ head/share/man/man5/rc.conf.5	Thu Apr 28 00:20:35 2011	(r221145)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 22, 2011
+.Dd April 27, 2011
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -2024,20 +2024,63 @@ is set to
 these are the flags to pass to the
 .Xr nfsd 8
 daemon.
-.It Va idmapd_enable
+.It Va nfsv4_server_enable
 .Pq Vt bool
-If set to
+If
+.Va nfs_server_enable
+is set to
+.Dq Li YES
+and
+.Va nfsv4_server_enable
+are set to
+.Dq Li YES ,
+enable the server for NFSv4 as well as NFSv2 and NFSv3.
+.It Va nfsuserd_enable
+.Pq Vt bool
+If
+.Va nfsuserd_enable
+is set to
+.Dq Li YES ,
+run the nfsuserd daemon, which is needed for NFSv4 in order
+to map between user/group names vs uid/gid numbers.
+If
+.Va nfsv4_server_enable
+is set to
 .Dq Li YES ,
-run the ID mapping daemon for NFS version 4.
-.It Va idmapd_flags
+this will be forced enabled.
+.It Va nfsuserd_flags
 .Pq Vt str
 If
-.Va idmapd_enable
+.Va nfsuserd_enable
 is set to
 .Dq Li YES ,
 these are the flags to pass to the
-.Xr idmapd 8
+.Xr nfsuserd 8
 daemon.
+.It Va nfscbd_enable
+.Pq Vt bool
+If
+.Va nfscbd_enable
+is set to
+.Dq Li YES ,
+run the nfscbd daemon, which enables callbacks/delegations for the NFSv4 client.
+.It Va nfscbd_flags
+.Pq Vt str
+If
+.Va nfscbd_enable
+is set to
+.Dq Li YES ,
+these are the flags to pass to the
+.Xr nfscbd 8
+daemon.
+.It Va oldnfs_server_enable
+.Pq Vt bool
+If
+.Va oldnfs_server_enable
+is set to
+.Dq Li YES ,
+force the NFS server daemons to run the old NFS server code
+that does not support NFSv4.
 .It Va mountd_enable
 .Pq Vt bool
 If set to

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 06:51: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 4F574106564A;
	Thu, 28 Apr 2011 06:51:48 +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 3D5BA8FC17;
	Thu, 28 Apr 2011 06:51: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 p3S6pmUG009573;
	Thu, 28 Apr 2011 06:51:48 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S6pm8g009571;
	Thu, 28 Apr 2011 06:51:48 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201104280651.p3S6pm8g009571@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Thu, 28 Apr 2011 06:51:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221149 - stable/8/sys/dev/sound/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: Thu, 28 Apr 2011 06:51:48 -0000

Author: hselasky
Date: Thu Apr 28 06:51:47 2011
New Revision: 221149
URL: http://svn.freebsd.org/changeset/base/221149

Log:
  MFC r220900.
  Only set the sample rate if the USB audio channel reports
  that it supports the frequency control request.
  
  Approved by:	thompsa

Modified:
  stable/8/sys/dev/sound/usb/uaudio.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/sound/usb/uaudio.c
==============================================================================
--- stable/8/sys/dev/sound/usb/uaudio.c	Thu Apr 28 05:48:32 2011	(r221148)
+++ stable/8/sys/dev/sound/usb/uaudio.c	Thu Apr 28 06:51:47 2011	(r221149)
@@ -1364,11 +1364,10 @@ uaudio_chan_init(struct uaudio_softc *sc
 	usbd_set_parent_iface(sc->sc_udev, iface_index, sc->sc_mixer_iface_index);
 
 	/*
-	 * If just one sampling rate is supported,
-	 * no need to call "uaudio_set_speed()".
-	 * Roland SD-90 freezes by a SAMPLING_FREQ_CONTROL request.
+	 * Only set the sample rate if the channel reports that it
+	 * supports the frequency control.
 	 */
-	if (ch->p_asf1d->bSamFreqType != 1) {
+	if (ch->p_sed->bmAttributes & UA_SED_FREQ_CONTROL) {
 		if (uaudio_set_speed(sc->sc_udev, endpoint, ch->sample_rate)) {
 			/*
 			 * If the endpoint is adaptive setting the speed may

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 06:54: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 434EC106564A;
	Thu, 28 Apr 2011 06:54:39 +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 3186B8FC20;
	Thu, 28 Apr 2011 06:54: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 p3S6sdhf009703;
	Thu, 28 Apr 2011 06:54:39 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S6sdZT009701;
	Thu, 28 Apr 2011 06:54:39 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201104280654.p3S6sdZT009701@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Thu, 28 Apr 2011 06:54:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221150 - stable/8/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: Thu, 28 Apr 2011 06:54:39 -0000

Author: hselasky
Date: Thu Apr 28 06:54:38 2011
New Revision: 221150
URL: http://svn.freebsd.org/changeset/base/221150

Log:
  MFC r221073.
  Fix for missing EHCI datatoggle change case.
  
  Approved by:	thompsa

Modified:
  stable/8/sys/dev/usb/controller/ehci.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/usb/controller/ehci.c
==============================================================================
--- stable/8/sys/dev/usb/controller/ehci.c	Thu Apr 28 06:51:47 2011	(r221149)
+++ stable/8/sys/dev/usb/controller/ehci.c	Thu Apr 28 06:54:38 2011	(r221150)
@@ -1196,6 +1196,8 @@ ehci_data_toggle_update(struct usb_xfer 
 		dt ^= 1;	/* short packet at the end */
 	else if (actlen != xlen)
 		dt ^= 1;	/* zero length packet at the end */
+	else if (xlen == 0)
+		dt ^= 1;	/* zero length transfer */
 
 	xfer->endpoint->toggle_next ^= dt;
 }

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 06: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 504FA106566C;
	Thu, 28 Apr 2011 06:57:47 +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 3E87C8FC13;
	Thu, 28 Apr 2011 06: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 p3S6vllH009898;
	Thu, 28 Apr 2011 06:57:47 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S6vlwG009896;
	Thu, 28 Apr 2011 06:57:47 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201104280657.p3S6vlwG009896@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Thu, 28 Apr 2011 06: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: r221151 - stable/8/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: Thu, 28 Apr 2011 06:57:47 -0000

Author: hselasky
Date: Thu Apr 28 06:57:46 2011
New Revision: 221151
URL: http://svn.freebsd.org/changeset/base/221151

Log:
  MFC r221077.
  The maximum NCM frame size must be so that it
  will generate a short terminated USB transfer if
  the maximum NCM frame size is greater than what
  the driver can handle.
  
  Approved by: 	thompsa

Modified:
  stable/8/sys/dev/usb/net/if_cdcereg.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/usb/net/if_cdcereg.h
==============================================================================
--- stable/8/sys/dev/usb/net/if_cdcereg.h	Thu Apr 28 06:54:38 2011	(r221150)
+++ stable/8/sys/dev/usb/net/if_cdcereg.h	Thu Apr 28 06:57:46 2011	(r221151)
@@ -39,7 +39,7 @@
 #define	CDCE_IND_SIZE_MAX 32            /* bytes */
 
 #define	CDCE_NCM_TX_MINLEN 512		/* bytes, must be power of two */
-#define	CDCE_NCM_TX_MAXLEN (1UL << 14)	/* bytes */
+#define	CDCE_NCM_TX_MAXLEN (16384 + 4)	/* bytes, must be short terminated */
 #define	CDCE_NCM_TX_FRAMES_MAX 8	/* units */
 
 #define	CDCE_NCM_RX_MAXLEN (1UL << 14)	/* bytes */

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 07:21: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 204AA106566B;
	Thu, 28 Apr 2011 07:21:02 +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 0EA198FC14;
	Thu, 28 Apr 2011 07:21: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 p3S7L1em010781;
	Thu, 28 Apr 2011 07:21:01 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S7L1dN010779;
	Thu, 28 Apr 2011 07:21:01 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104280721.p3S7L1dN010779@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Apr 2011 07:21:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221152 - stable/8/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 07:21:02 -0000

Author: mav
Date: Thu Apr 28 07:21:01 2011
New Revision: 221152
URL: http://svn.freebsd.org/changeset/base/221152

Log:
  MFC r220786:
  Remove always false "< 0" check for unsgined int variable. This check is
  also duplicate, as the value was already checked for 0 before decrementing.

Modified:
  stable/8/sys/cam/cam_periph.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/cam/cam_periph.c
==============================================================================
--- stable/8/sys/cam/cam_periph.c	Thu Apr 28 06:57:46 2011	(r221151)
+++ stable/8/sys/cam/cam_periph.c	Thu Apr 28 07:21:01 2011	(r221152)
@@ -527,8 +527,6 @@ cam_periph_invalidate(struct cam_periph 
 	xpt_lock_buses();
 	if (periph->refcount == 0)
 		camperiphfree(periph);
-	else if (periph->refcount < 0)
-		printf("cam_invalidate_periph: refcount < 0!!\n");
 	xpt_unlock_buses();
 }
 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 07:22: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 CF64E1065672;
	Thu, 28 Apr 2011 07:22:41 +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 A2FD88FC12;
	Thu, 28 Apr 2011 07:22: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 p3S7MfVM010893;
	Thu, 28 Apr 2011 07:22:41 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S7MfO3010889;
	Thu, 28 Apr 2011 07:22:41 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104280722.p3S7MfO3010889@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Apr 2011 07:22: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: r221153 - stable/8/sys/cam/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: Thu, 28 Apr 2011 07:22:41 -0000

Author: mav
Date: Thu Apr 28 07:22:41 2011
New Revision: 221153
URL: http://svn.freebsd.org/changeset/base/221153

Log:
  MFC r220886:
  Add basic support for DMA-capable ATA disks on DMA-incapable controller.
  This is really rare situation these days, but still may happen in embedded.

Modified:
  stable/8/sys/cam/ata/ata_all.h
  stable/8/sys/cam/ata/ata_da.c
  stable/8/sys/cam/ata/ata_xpt.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cam/ata/ata_all.h
==============================================================================
--- stable/8/sys/cam/ata/ata_all.h	Thu Apr 28 07:21:01 2011	(r221152)
+++ stable/8/sys/cam/ata/ata_all.h	Thu Apr 28 07:22:41 2011	(r221153)
@@ -35,6 +35,8 @@ struct ccb_ataio;
 struct cam_periph;
 union  ccb;
 
+#define	SID_DMA		0x10	/* Abuse inq_flags bit to track enabled DMA. */
+
 struct ata_cmd {
 	u_int8_t	flags;		/* ATA command flags */
 #define		CAM_ATAIO_48BIT		0x01	/* Command has 48-bit format */

Modified: stable/8/sys/cam/ata/ata_da.c
==============================================================================
--- stable/8/sys/cam/ata/ata_da.c	Thu Apr 28 07:21:01 2011	(r221152)
+++ stable/8/sys/cam/ata/ata_da.c	Thu Apr 28 07:22:41 2011	(r221153)
@@ -737,7 +737,8 @@ adaregister(struct cam_periph *periph, v
 	bioq_init(&softc->bio_queue);
 	bioq_init(&softc->trim_queue);
 
-	if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA)
+	if (cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA &&
+	    (cgd->inq_flags & SID_DMA))
 		softc->flags |= ADA_FLAG_CAN_DMA;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48)
 		softc->flags |= ADA_FLAG_CAN_48BIT;
@@ -746,7 +747,7 @@ adaregister(struct cam_periph *periph, v
 	if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT)
 		softc->flags |= ADA_FLAG_CAN_POWERMGT;
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
-	    cgd->inq_flags & SID_CmdQue)
+	    (cgd->inq_flags & SID_DMA) && (cgd->inq_flags & SID_CmdQue))
 		softc->flags |= ADA_FLAG_CAN_NCQ;
 	if (cgd->ident_data.support_dsm & ATA_SUPPORT_DSM_TRIM) {
 		softc->flags |= ADA_FLAG_CAN_TRIM;

Modified: stable/8/sys/cam/ata/ata_xpt.c
==============================================================================
--- stable/8/sys/cam/ata/ata_xpt.c	Thu Apr 28 07:21:01 2011	(r221152)
+++ stable/8/sys/cam/ata/ata_xpt.c	Thu Apr 28 07:22:41 2011	(r221153)
@@ -388,6 +388,11 @@ negotiate:
 		/* If SIM disagree - renegotiate. */
 		if (mode != wantmode)
 			goto negotiate;
+		/* Remember what transport thinks about DMA. */
+		if (mode < ATA_DMA)
+			path->device->inq_flags &= ~SID_DMA;
+		else
+			path->device->inq_flags |= SID_DMA;
 		cam_fill_ataio(ataio,
 		      1,
 		      probedone,

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 07:26: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 DEDAA1065673;
	Thu, 28 Apr 2011 07:26:28 +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 CC6DD8FC17;
	Thu, 28 Apr 2011 07:26: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 p3S7QSMI011118;
	Thu, 28 Apr 2011 07:26:28 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S7QSRj011114;
	Thu, 28 Apr 2011 07:26:28 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104280726.p3S7QSRj011114@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Apr 2011 07:26:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221154 - in stable/8/sys/dev: ahci mvs siis
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 07:26:29 -0000

Author: mav
Date: Thu Apr 28 07:26:28 2011
New Revision: 221154
URL: http://svn.freebsd.org/changeset/base/221154

Log:
  MFC r220822:
  Properly handle memory allocation errors during error recovery.

Modified:
  stable/8/sys/dev/ahci/ahci.c
  stable/8/sys/dev/mvs/mvs.c
  stable/8/sys/dev/siis/siis.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/ahci/ahci.c
==============================================================================
--- stable/8/sys/dev/ahci/ahci.c	Thu Apr 28 07:22:41 2011	(r221153)
+++ stable/8/sys/dev/ahci/ahci.c	Thu Apr 28 07:26:28 2011	(r221154)
@@ -2126,7 +2126,6 @@ ahci_issue_recovery(device_t dev)
 	struct ccb_scsiio *csio;
 	int i;
 
-	ch->recoverycmd = 1;
 	/* Find some holden command. */
 	for (i = 0; i < ch->numslots; i++) {
 		if (ch->hold[i])
@@ -2134,8 +2133,20 @@ ahci_issue_recovery(device_t dev)
 	}
 	ccb = xpt_alloc_ccb_nowait();
 	if (ccb == NULL) {
-		device_printf(dev, "Unable allocate READ LOG command");
-		return; /* XXX */
+		device_printf(dev, "Unable allocate recovery command\n");
+completeall:
+		/* We can't do anything -- complete holden commands. */
+		for (i = 0; i < ch->numslots; i++) {
+			if (ch->hold[i] == NULL)
+				continue;
+			ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK;
+			ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL;
+			xpt_done(ch->hold[i]);
+			ch->hold[i] = NULL;
+			ch->numhslots--;
+		}
+		ahci_reset(dev);
+		return;
 	}
 	ccb->ccb_h = ch->hold[i]->ccb_h;	/* Reuse old header. */
 	if (ccb->ccb_h.func_code == XPT_ATA_IO) {
@@ -2148,8 +2159,9 @@ ahci_issue_recovery(device_t dev)
 		ataio->data_ptr = malloc(512, M_AHCI, M_NOWAIT);
 		if (ataio->data_ptr == NULL) {
 			xpt_free_ccb(ccb);
-			device_printf(dev, "Unable allocate memory for READ LOG command");
-			return; /* XXX */
+			device_printf(dev,
+			    "Unable allocate memory for READ LOG command\n");
+			goto completeall;
 		}
 		ataio->dxfer_len = 512;
 		bzero(&ataio->cmd, sizeof(ataio->cmd));
@@ -2177,6 +2189,7 @@ ahci_issue_recovery(device_t dev)
 		csio->cdb_io.cdb_bytes[4] = csio->dxfer_len;
 	}
 	/* Freeze SIM while doing recovery. */
+	ch->recoverycmd = 1;
 	xpt_freeze_simq(ch->sim, 1);
 	ahci_begin_transaction(dev, ccb);
 }

Modified: stable/8/sys/dev/mvs/mvs.c
==============================================================================
--- stable/8/sys/dev/mvs/mvs.c	Thu Apr 28 07:22:41 2011	(r221153)
+++ stable/8/sys/dev/mvs/mvs.c	Thu Apr 28 07:26:28 2011	(r221154)
@@ -1780,7 +1780,6 @@ mvs_issue_recovery(device_t dev)
 	struct ccb_scsiio *csio;
 	int i;
 
-	ch->recoverycmd = 1;
 	/* Find some holden command. */
 	for (i = 0; i < MVS_MAX_SLOTS; i++) {
 		if (ch->hold[i])
@@ -1788,8 +1787,20 @@ mvs_issue_recovery(device_t dev)
 	}
 	ccb = xpt_alloc_ccb_nowait();
 	if (ccb == NULL) {
-		device_printf(dev, "Unable allocate READ LOG command");
-		return; /* XXX */
+		device_printf(dev, "Unable allocate recovery command\n");
+completeall:
+		/* We can't do anything -- complete holden commands. */
+		for (i = 0; i < MVS_MAX_SLOTS; i++) {
+			if (ch->hold[i] == NULL)
+				continue;
+			ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK;
+			ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL;
+			xpt_done(ch->hold[i]);
+			ch->hold[i] = NULL;
+			ch->numhslots--;
+		}
+		mvs_reset(dev);
+		return;
 	}
 	ccb->ccb_h = ch->hold[i]->ccb_h;	/* Reuse old header. */
 	if (ccb->ccb_h.func_code == XPT_ATA_IO) {
@@ -1802,8 +1813,9 @@ mvs_issue_recovery(device_t dev)
 		ataio->data_ptr = malloc(512, M_MVS, M_NOWAIT);
 		if (ataio->data_ptr == NULL) {
 			xpt_free_ccb(ccb);
-			device_printf(dev, "Unable allocate memory for READ LOG command");
-			return; /* XXX */
+			device_printf(dev,
+			    "Unable allocate memory for READ LOG command\n");
+			goto completeall;
 		}
 		ataio->dxfer_len = 512;
 		bzero(&ataio->cmd, sizeof(ataio->cmd));
@@ -1830,7 +1842,8 @@ mvs_issue_recovery(device_t dev)
 		csio->cdb_io.cdb_bytes[0] = 0x03;
 		csio->cdb_io.cdb_bytes[4] = csio->dxfer_len;
 	}
-	/* Freeze SIM while doing READ LOG EXT. */
+	/* Freeze SIM while doing recovery. */
+	ch->recoverycmd = 1;
 	xpt_freeze_simq(ch->sim, 1);
 	mvs_begin_transaction(dev, ccb);
 }

Modified: stable/8/sys/dev/siis/siis.c
==============================================================================
--- stable/8/sys/dev/siis/siis.c	Thu Apr 28 07:22:41 2011	(r221153)
+++ stable/8/sys/dev/siis/siis.c	Thu Apr 28 07:26:28 2011	(r221154)
@@ -1373,11 +1373,22 @@ siis_issue_recovery(device_t dev)
 	}
 	if (i == SIIS_MAX_SLOTS)
 		return;
-	ch->recoverycmd = 1;
 	ccb = xpt_alloc_ccb_nowait();
 	if (ccb == NULL) {
-		device_printf(dev, "Unable allocate READ LOG command");
-		return; /* XXX */
+		device_printf(dev, "Unable allocate recovery command\n");
+completeall:
+		/* We can't do anything -- complete holden commands. */
+		for (i = 0; i < SIIS_MAX_SLOTS; i++) {
+			if (ch->hold[i] == NULL)
+				continue;
+			ch->hold[i]->ccb_h.status &= ~CAM_STATUS_MASK;
+			ch->hold[i]->ccb_h.status |= CAM_RESRC_UNAVAIL;
+			xpt_done(ch->hold[i]);
+			ch->hold[i] = NULL;
+			ch->numhslots--;
+		}
+		siis_reset(dev);
+		return;
 	}
 	ccb->ccb_h = ch->hold[i]->ccb_h;	/* Reuse old header. */
 	if (ccb->ccb_h.func_code == XPT_ATA_IO) {
@@ -1390,8 +1401,9 @@ siis_issue_recovery(device_t dev)
 		ataio->data_ptr = malloc(512, M_SIIS, M_NOWAIT);
 		if (ataio->data_ptr == NULL) {
 			xpt_free_ccb(ccb);
-			device_printf(dev, "Unable allocate memory for READ LOG command");
-			return; /* XXX */
+			device_printf(dev,
+			    "Unable allocate memory for READ LOG command\n");
+			goto completeall;
 		}
 		ataio->dxfer_len = 512;
 		bzero(&ataio->cmd, sizeof(ataio->cmd));
@@ -1418,6 +1430,7 @@ siis_issue_recovery(device_t dev)
 		csio->cdb_io.cdb_bytes[0] = 0x03;
 		csio->cdb_io.cdb_bytes[4] = csio->dxfer_len;
 	}
+	ch->recoverycmd = 1;
 	siis_begin_transaction(dev, ccb);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 07:33: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 40D4B106566C;
	Thu, 28 Apr 2011 07:33:15 +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 2F0338FC16;
	Thu, 28 Apr 2011 07:33: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 p3S7XFBB011501;
	Thu, 28 Apr 2011 07:33:15 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S7XFRJ011499;
	Thu, 28 Apr 2011 07:33:15 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104280733.p3S7XFRJ011499@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Apr 2011 07:33:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221155 - stable/8/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: Thu, 28 Apr 2011 07:33:15 -0000

Author: mav
Date: Thu Apr 28 07:33:14 2011
New Revision: 221155
URL: http://svn.freebsd.org/changeset/base/221155

Log:
  MFC r220917:
  Use periodic status polling added at r214671 only in ATA_CAM mode. Legacy
  mode won't receive much benefit from it due to its hot-plug limitations.

Modified:
  stable/8/sys/dev/ata/ata-all.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/ata/ata-all.c
==============================================================================
--- stable/8/sys/dev/ata/ata-all.c	Thu Apr 28 07:26:28 2011	(r221154)
+++ stable/8/sys/dev/ata/ata-all.c	Thu Apr 28 07:33:14 2011	(r221155)
@@ -82,7 +82,9 @@ static void bswap(int8_t *, int);
 static void btrim(int8_t *, int);
 static void bpack(int8_t *, int8_t *, int);
 static void ata_interrupt_locked(void *data);
+#ifdef ATA_CAM
 static void ata_periodic_poll(void *data);
+#endif
 
 /* global vars */
 MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer");
@@ -177,8 +179,8 @@ ata_attach(device_t dev)
 		if (ch->pm_level > 1)
 			ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ;
 	}
-#endif
 	callout_init(&ch->poll_callout, 1);
+#endif
 
     /* reset the controller HW, the channel and device(s) */
     while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit)
@@ -206,8 +208,6 @@ ata_attach(device_t dev)
 	device_printf(dev, "unable to setup interrupt\n");
 	return error;
     }
-    if (ch->flags & ATA_PERIODIC_POLL)
-	callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch);
 
 #ifndef ATA_CAM
     /* probe and attach devices on this channel unless we are in early boot */
@@ -215,6 +215,8 @@ ata_attach(device_t dev)
 	ata_identify(dev);
     return (0);
 #else
+	if (ch->flags & ATA_PERIODIC_POLL)
+		callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch);
 	mtx_lock(&ch->state_mtx);
 	/* Create the device queue for our SIM. */
 	devq = cam_simq_alloc(1);
@@ -277,8 +279,10 @@ ata_detach(device_t dev)
     mtx_lock(&ch->state_mtx);
     ch->state |= ATA_STALL_QUEUE;
     mtx_unlock(&ch->state_mtx);
+#ifdef ATA_CAM
     if (ch->flags & ATA_PERIODIC_POLL)
 	callout_drain(&ch->poll_callout);
+#endif
 
 #ifndef ATA_CAM
     /* detach & delete all children */
@@ -466,9 +470,9 @@ ata_suspend(device_t dev)
     if (!dev || !(ch = device_get_softc(dev)))
 	return ENXIO;
 
-    if (ch->flags & ATA_PERIODIC_POLL)
-	callout_drain(&ch->poll_callout);
 #ifdef ATA_CAM
+	if (ch->flags & ATA_PERIODIC_POLL)
+		callout_drain(&ch->poll_callout);
 	mtx_lock(&ch->state_mtx);
 	xpt_freeze_simq(ch->sim, 1);
 	while (ch->state != ATA_IDLE)
@@ -506,14 +510,14 @@ ata_resume(device_t dev)
 	error = ata_reinit(dev);
 	xpt_release_simq(ch->sim, TRUE);
 	mtx_unlock(&ch->state_mtx);
+	if (ch->flags & ATA_PERIODIC_POLL)
+		callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch);
 #else
     /* reinit the devices, we dont know what mode/state they are in */
     error = ata_reinit(dev);
     /* kick off requests on the queue */
     ata_start(dev);
 #endif
-    if (ch->flags & ATA_PERIODIC_POLL)
-	callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch);
     return error;
 }
 
@@ -580,6 +584,7 @@ ata_interrupt_locked(void *data)
 #endif
 }
 
+#ifdef ATA_CAM
 static void
 ata_periodic_poll(void *data)
 {
@@ -588,6 +593,7 @@ ata_periodic_poll(void *data)
     callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch);
     ata_interrupt(ch);
 }
+#endif
 
 void
 ata_print_cable(device_t dev, u_int8_t *who)

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 07:34: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 DF903106564A;
	Thu, 28 Apr 2011 07:34:37 +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 B32E98FC19;
	Thu, 28 Apr 2011 07:34: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 p3S7Yb3O011590;
	Thu, 28 Apr 2011 07:34:37 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S7Ybq7011587;
	Thu, 28 Apr 2011 07:34:37 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104280734.p3S7Ybq7011587@svn.freebsd.org>
From: Alexander Motin 
Date: Thu, 28 Apr 2011 07:34:37 +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: r221156 - in stable/8/sys/dev/ata: . chipsets
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 07:34:38 -0000

Author: mav
Date: Thu Apr 28 07:34:37 2011
New Revision: 221156
URL: http://svn.freebsd.org/changeset/base/221156

Log:
  MFC r220920:
   - Fix mapping of the last two SATA ports on 6-port Intel controllers.
  This improves hard-reset and hot-plug on these ports.
   - Device with ID 0x29218086 is a 2-port variant of ICH9 in legacy mode.
  Skip probing for nonexistent slave devices there.

Modified:
  stable/8/sys/dev/ata/ata-pci.h
  stable/8/sys/dev/ata/chipsets/ata-intel.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/ata/ata-pci.h
==============================================================================
--- stable/8/sys/dev/ata/ata-pci.h	Thu Apr 28 07:33:14 2011	(r221155)
+++ stable/8/sys/dev/ata/ata-pci.h	Thu Apr 28 07:34:37 2011	(r221156)
@@ -187,7 +187,7 @@ struct ata_pci_controller {
 #define ATA_I82801HBM_S2        0x28298086
 #define ATA_I82801HBM_S3        0x282a8086
 #define ATA_I82801IB_S1         0x29208086
-#define ATA_I82801IB_AH2        0x29218086
+#define ATA_I82801IB_S3         0x29218086
 #define ATA_I82801IB_AH6        0x29228086
 #define ATA_I82801IB_AH4        0x29238086
 #define ATA_I82801IB_R1         0x29258086

Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-intel.c	Thu Apr 28 07:33:14 2011	(r221155)
+++ stable/8/sys/dev/ata/chipsets/ata-intel.c	Thu Apr 28 07:34:37 2011	(r221156)
@@ -140,7 +140,7 @@ ata_intel_probe(device_t dev)
      { ATA_I82801HBM_S3, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8M" },
      { ATA_I82801IB_S1,  0, INTEL_6CH,  0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_S2,  0, INTEL_6CH2, 0, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_S3,  0, INTEL_6CH2, 0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
@@ -336,7 +336,7 @@ ata_intel_ch_attach(device_t dev)
 		} else if (ctlr->chip->cfg1 & INTEL_6CH2) {
 			ch->flags |= ATA_SATA;
 			ch->flags |= ATA_NO_SLAVE;
-			smap[0] = (ch->unit == 0) ? 4 : 5;
+			smap[0] = (ch->unit == 0) ? 0 : 1;
 			smap[1] = 0;
 		} else {
 			map &= 0x03;

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 08:07: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 B5A551065672;
	Thu, 28 Apr 2011 08:07:54 +0000 (UTC) (envelope-from ed@hoeg.nl)
Received: from mx0.hoeg.nl (mx0.hoeg.nl [178.63.0.170])
	by mx1.freebsd.org (Postfix) with ESMTP id 730FD8FC12;
	Thu, 28 Apr 2011 08:07:54 +0000 (UTC)
Received: by mx0.hoeg.nl (Postfix, from userid 1000)
	id 7F2712A28D0A; Thu, 28 Apr 2011 09:50:09 +0200 (CEST)
Date: Thu, 28 Apr 2011 09:50:09 +0200
From: Ed Schouten 
To: David O'Brien 
Message-ID: <20110428075009.GX82526@hoeg.nl>
References: <201104260409.p3Q49KaJ006272@svn.freebsd.org>
	<201104260932.44199.jhb@freebsd.org>
	<20110426222641.GA44259@dragon.NUXI.org>
	<201104271048.33325.jhb@freebsd.org>
	<20110427193550.GA79786@dragon.NUXI.org>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="XCIqNWEteo88hZlY"
Content-Disposition: inline
In-Reply-To: <20110427193550.GA79786@dragon.NUXI.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, John Baldwin 
Subject: Re: svn commit: r221053 - head/usr.bin/rlogin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 08:07:54 -0000


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

* David O'Brien , 20110427 21:35:
> One has to do all the various greps of the output in order to be
> confident of their belief of the results.

I usually run this afterwards:

	tail -n 3 _.* | less

Or something like this to simply give a list of failures:

	fgrep -L 'completed on' _.*

About bumping WARNS -- it's pretty hard to remove any WARNS-lines
without modifying the code. I think I added most of them by first
building all of world with WARNS=3D6 and selectively lowering them.

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

--XCIqNWEteo88hZlY
Content-Type: application/pgp-signature

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

iQIcBAEBAgAGBQJNuRwxAAoJEG5e2P40kaK7EIcQAI8VbjuW6kOsG9IeHfDOxeg+
ke9lu8dlL1Mr9s4eBfmPKc84m++fu8uQ9wPYVOz3BVevogC4+/zII0schOmo86yC
Zx2aJ56g2S3Fla4bJ+q1UrT/xUE9Dm53g1b9rUJkY1e1E6vxNMj0j3BkUb0USy1p
2gyv8zSHsmGBFEyLNlEU6vjzS7PxNCZgH4dga4ck8zPbABGVn7F6nNcbLRgdVwbR
LrSyxoZXdHMQMBZzoTMPintD23JXDuOruLxncPNNTah4OOLJs5IGDU6Qo6EpM3r/
gvuDW1xSXYIsxcjxrUA8g70srOu8lWvQk9qrjZo7TwERuE7qzJT6kmHp6EWqElcf
pKQCx3m7EG6WQnXErcD5aOaPIX5nFxxpoeK8igyBehpOoTnFwqGvqhDagCWVff01
ky/ExdrhZkLZWVN0yfLxcgmr6E8amPUQ1QDzkiGgDYAPZu+HahsV9CvhTux5mq6e
tMton86t00KR71JAyHUaPzVK97Vld2rdW0zKWhqlJvk2Sa7y13DRgpE+w6qBf6K6
zB3hLLWE7HSL/Jg4DqshwQhmZZ1vM55uXsNFrgW9GWDSllsmKYs0cbho1cAc/J8i
cemcyu0ztrmeWcTaZ5PacqnGsuafOybcrAqGteQe6CIRUupRphDRVlPW0U6hHrUf
mSbSRMfcZTYYcI6or/kB
=0LzI
-----END PGP SIGNATURE-----

--XCIqNWEteo88hZlY--

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 08:49: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 10CF5106566B;
	Thu, 28 Apr 2011 08:49:44 +0000 (UTC)
	(envelope-from vanhu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F124D8FC14;
	Thu, 28 Apr 2011 08:49: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 p3S8nhBT014137;
	Thu, 28 Apr 2011 08:49:43 GMT (envelope-from vanhu@svn.freebsd.org)
Received: (from vanhu@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3S8nhgN014130;
	Thu, 28 Apr 2011 08:49:43 GMT (envelope-from vanhu@svn.freebsd.org)
Message-Id: <201104280849.p3S8nhgN014130@svn.freebsd.org>
From: VANHULLEBUS Yvan 
Date: Thu, 28 Apr 2011 08:49:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221157 - in stable/8: . sys/netipsec sys/opencrypto
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 08:49:44 -0000

Author: vanhu
Date: Thu Apr 28 08:49:43 2011
New Revision: 221157
URL: http://svn.freebsd.org/changeset/base/221157

Log:
  MFC 218794, 219026:
  Fixed IPsec's HMAC_SHA256-512 support to be RFC4868 compliant.
  This will break interoperability with all older versions of
  FreeBSD for those algorithms.
  
  Reviewed by:	bz, gnn
  Obtained from:	NETASQ

Modified:
  stable/8/UPDATING
  stable/8/sys/netipsec/key.c
  stable/8/sys/netipsec/xform.h
  stable/8/sys/netipsec/xform_ah.c
  stable/8/sys/netipsec/xform_esp.c
  stable/8/sys/opencrypto/xform.h
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/UPDATING
==============================================================================
--- stable/8/UPDATING	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/UPDATING	Thu Apr 28 08:49:43 2011	(r221157)
@@ -15,6 +15,16 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	debugging tools present in HEAD were left in place because
 	sun4v support still needs work to become production ready.
 
+20110428:
+	IPsec's HMAC_SHA256-512 support has been fixed to be RFC4868
+	compliant, and will now use half of hash for authentication.
+	This will break interoperability with all stacks (including all
+	older FreeBSD versions) who implement
+	draft-ietf-ipsec-ciph-sha-256-00 (they use 96 bits of hash for
+	authentication).
+	The only workaround with such peers is to use another HMAC
+	algorithm for IPsec ("phase 2") authentication.
+
 20110221:
 	8.2-RELEASE.
 

Modified: stable/8/sys/netipsec/key.c
==============================================================================
--- stable/8/sys/netipsec/key.c	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/sys/netipsec/key.c	Thu Apr 28 08:49:43 2011	(r221157)
@@ -6103,6 +6103,9 @@ key_getsizes_ah(
 		case SADB_X_AALG_MD5:	*min = *max = 16; break;
 		case SADB_X_AALG_SHA:	*min = *max = 20; break;
 		case SADB_X_AALG_NULL:	*min = 1; *max = 256; break;
+		case SADB_X_AALG_SHA2_256: *min = *max = 32; break;
+		case SADB_X_AALG_SHA2_384: *min = *max = 48; break;
+		case SADB_X_AALG_SHA2_512: *min = *max = 64; break;
 		default:
 			DPRINTF(("%s: unknown AH algorithm %u\n",
 				__func__, alg));
@@ -6128,7 +6131,11 @@ key_getcomb_ah()
 	for (i = 1; i <= SADB_AALG_MAX; i++) {
 #if 1
 		/* we prefer HMAC algorithms, not old algorithms */
-		if (i != SADB_AALG_SHA1HMAC && i != SADB_AALG_MD5HMAC)
+		if (i != SADB_AALG_SHA1HMAC &&
+		    i != SADB_AALG_MD5HMAC  &&
+		    i != SADB_X_AALG_SHA2_256 &&
+		    i != SADB_X_AALG_SHA2_384 &&
+		    i != SADB_X_AALG_SHA2_512)
 			continue;
 #endif
 		algo = ah_algorithm_lookup(i);

Modified: stable/8/sys/netipsec/xform.h
==============================================================================
--- stable/8/sys/netipsec/xform.h	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/sys/netipsec/xform.h	Thu Apr 28 08:49:43 2011	(r221157)
@@ -46,6 +46,7 @@
 #include 
 
 #define	AH_HMAC_HASHLEN		12	/* 96 bits of authenticator */
+#define	AH_HMAC_MAXHASHLEN	(SHA2_512_HASH_LEN/2)	/* Keep this updated */
 #define	AH_HMAC_INITIAL_RPL	1	/* replay counter initial value */
 
 /*

Modified: stable/8/sys/netipsec/xform_ah.c
==============================================================================
--- stable/8/sys/netipsec/xform_ah.c	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/sys/netipsec/xform_ah.c	Thu Apr 28 08:49:43 2011	(r221157)
@@ -85,8 +85,7 @@
  * to use a fixed 16-byte authenticator.  The new algorithm use 12-byte
  * authenticator.
  */
-#define	AUTHSIZE(sav) \
-	((sav->flags & SADB_X_EXT_OLD) ? 16 : AH_HMAC_HASHLEN)
+#define	AUTHSIZE(sav)	ah_authsize(sav)
 
 VNET_DEFINE(int, ah_enable) = 1;	/* control flow of packets with AH */
 VNET_DEFINE(int, ah_cleartos) = 1;	/* clear ip_tos when doing AH calc */
@@ -105,6 +104,27 @@ static unsigned char ipseczeroes[256];	/
 static int ah_input_cb(struct cryptop*);
 static int ah_output_cb(struct cryptop*);
 
+static int
+ah_authsize(struct secasvar *sav)
+{
+
+	IPSEC_ASSERT(sav != NULL, ("%s: sav == NULL", __func__));
+
+	if (sav->flags & SADB_X_EXT_OLD)
+		return 16;
+
+	switch (sav->alg_auth) {
+	case SADB_X_AALG_SHA2_256:
+		return 16;
+	case SADB_X_AALG_SHA2_384:
+		return 24;
+	case SADB_X_AALG_SHA2_512:
+		return 32;
+	default:
+		return AH_HMAC_HASHLEN;
+	}
+	/* NOTREACHED */
+}
 /*
  * NB: this is public for use by the PF_KEY support.
  */

Modified: stable/8/sys/netipsec/xform_esp.c
==============================================================================
--- stable/8/sys/netipsec/xform_esp.c	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/sys/netipsec/xform_esp.c	Thu Apr 28 08:49:43 2011	(r221157)
@@ -297,7 +297,19 @@ esp_input(struct mbuf *m, struct secasva
 	else
 		hlen = sizeof (struct newesp) + sav->ivlen;
 	/* Authenticator hash size */
-	alen = esph ? AH_HMAC_HASHLEN : 0;
+	if (esph != NULL) {
+		switch (esph->type) {
+		case CRYPTO_SHA2_256_HMAC:
+		case CRYPTO_SHA2_384_HMAC:
+		case CRYPTO_SHA2_512_HMAC:
+			alen = esph->hashsize/2;
+			break;
+		default:
+			alen = AH_HMAC_HASHLEN;
+			break;
+		}
+	}else
+		alen = 0;
 
 	/*
 	 * Verify payload length is multiple of encryption algorithm
@@ -450,8 +462,8 @@ esp_input(struct mbuf *m, struct secasva
 static int
 esp_input_cb(struct cryptop *crp)
 {
-	u_int8_t lastthree[3], aalg[AH_HMAC_HASHLEN];
-	int hlen, skip, protoff, error;
+	u_int8_t lastthree[3], aalg[AH_HMAC_MAXHASHLEN];
+	int hlen, skip, protoff, error, alen;
 	struct mbuf *m;
 	struct cryptodesc *crd;
 	struct auth_hash *esph;
@@ -519,6 +531,16 @@ esp_input_cb(struct cryptop *crp)
 
 	/* If authentication was performed, check now. */
 	if (esph != NULL) {
+		switch (esph->type) {
+		case CRYPTO_SHA2_256_HMAC:
+		case CRYPTO_SHA2_384_HMAC:
+		case CRYPTO_SHA2_512_HMAC:
+			alen = esph->hashsize/2;
+			break;
+		default:
+			alen = AH_HMAC_HASHLEN;
+			break;
+		}
 		/*
 		 * If we have a tag, it means an IPsec-aware NIC did
 		 * the verification for us.  Otherwise we need to
@@ -527,13 +549,13 @@ esp_input_cb(struct cryptop *crp)
 		V_ahstat.ahs_hist[sav->alg_auth]++;
 		if (mtag == NULL) {
 			/* Copy the authenticator from the packet */
-			m_copydata(m, m->m_pkthdr.len - AH_HMAC_HASHLEN,
-				AH_HMAC_HASHLEN, aalg);
+			m_copydata(m, m->m_pkthdr.len - alen,
+				alen, aalg);
 
 			ptr = (caddr_t) (tc + 1);
 
 			/* Verify authenticator */
-			if (bcmp(ptr, aalg, AH_HMAC_HASHLEN) != 0) {
+			if (bcmp(ptr, aalg, alen) != 0) {
 				DPRINTF(("%s: "
 		    "authentication hash mismatch for packet in SA %s/%08lx\n",
 				    __func__,
@@ -546,7 +568,7 @@ esp_input_cb(struct cryptop *crp)
 		}
 
 		/* Remove trailing authenticator */
-		m_adj(m, -AH_HMAC_HASHLEN);
+		m_adj(m, -alen);
 	}
 
 	/* Release the crypto descriptors */
@@ -690,7 +712,16 @@ esp_output(
 	plen = rlen + padding;		/* Padded payload length. */
 
 	if (esph)
+		switch (esph->type) {
+		case CRYPTO_SHA2_256_HMAC:
+		case CRYPTO_SHA2_384_HMAC:
+		case CRYPTO_SHA2_512_HMAC:
+			alen = esph->hashsize/2;
+			break;
+		default:
 		alen = AH_HMAC_HASHLEN;
+			break;
+		}
 	else
 		alen = 0;
 
@@ -944,7 +975,7 @@ esp_output_cb(struct cryptop *crp)
 #ifdef REGRESSION
 	/* Emulate man-in-the-middle attack when ipsec_integrity is TRUE. */
 	if (V_ipsec_integrity) {
-		static unsigned char ipseczeroes[AH_HMAC_HASHLEN];
+		static unsigned char ipseczeroes[AH_HMAC_MAXHASHLEN];
 		struct auth_hash *esph;
 
 		/*
@@ -953,8 +984,20 @@ esp_output_cb(struct cryptop *crp)
 		 */
 		esph = sav->tdb_authalgxform;
 		if (esph !=  NULL) {
-			m_copyback(m, m->m_pkthdr.len - AH_HMAC_HASHLEN,
-			    AH_HMAC_HASHLEN, ipseczeroes);
+			int alen;
+
+			switch (esph->type) {
+			case CRYPTO_SHA2_256_HMAC:
+			case CRYPTO_SHA2_384_HMAC:
+			case CRYPTO_SHA2_512_HMAC:
+				alen = esph->hashsize/2;
+				break;
+			default:
+				alen = AH_HMAC_HASHLEN;
+				break;
+			}
+			m_copyback(m, m->m_pkthdr.len - alen,
+			    alen, ipseczeroes);
 		}
 	}
 #endif

Modified: stable/8/sys/opencrypto/xform.h
==============================================================================
--- stable/8/sys/opencrypto/xform.h	Thu Apr 28 07:34:37 2011	(r221156)
+++ stable/8/sys/opencrypto/xform.h	Thu Apr 28 08:49:43 2011	(r221157)
@@ -43,7 +43,8 @@ struct auth_hash {
 	void (*Final) (u_int8_t *, void *);
 };
 
-#define	AH_ALEN_MAX	20	/* max authenticator hash length */
+/* XXX use a define common with other hash stuff ! */
+#define	AH_ALEN_MAX	64	/* max authenticator hash length */
 
 struct enc_xform {
 	int type;

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 11:13: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 7CEF0106564A;
	Thu, 28 Apr 2011 11:13:26 +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 4F1CA8FC14;
	Thu, 28 Apr 2011 11:13: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 p3SBDQ9m020380;
	Thu, 28 Apr 2011 11:13:26 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SBDQdR020376;
	Thu, 28 Apr 2011 11:13:26 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104281113.p3SBDQdR020376@svn.freebsd.org>
From: Adrian Chadd 
Date: Thu, 28 Apr 2011 11:13: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: r221160 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 11:13:26 -0000

Author: adrian
Date: Thu Apr 28 11:13:26 2011
New Revision: 221160
URL: http://svn.freebsd.org/changeset/base/221160

Log:
  Add the IP2 DDR flush handlers.
  
  These aren't yet used in the interrupt handler path but should be.

Modified:
  head/sys/mips/atheros/ar724x_chip.c
  head/sys/mips/atheros/ar724xreg.h
  head/sys/mips/atheros/ar91xx_chip.c

Modified: head/sys/mips/atheros/ar724x_chip.c
==============================================================================
--- head/sys/mips/atheros/ar724x_chip.c	Thu Apr 28 11:06:14 2011	(r221159)
+++ head/sys/mips/atheros/ar724x_chip.c	Thu Apr 28 11:13:26 2011	(r221160)
@@ -146,6 +146,13 @@ ar724x_chip_ddr_flush_ge1(void)
 	ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_GE1);
 }
 
+static void
+ar724x_chip_ddr_flush_ip2(void)
+{
+	ar71xx_ddr_flush(AR724X_DDR_REG_FLUSH_PCIE);
+}
+
+
 static uint32_t
 ar724x_chip_get_eth_pll(unsigned int mac, int speed)
 {
@@ -207,6 +214,6 @@ struct ar71xx_cpu_def ar724x_chip_def = 
         &ar724x_chip_ddr_flush_ge0,
         &ar724x_chip_ddr_flush_ge1,
         &ar724x_chip_get_eth_pll,
-	NULL,		/* ar71xx_chip_irq_flush_ip2 */
+        &ar724x_chip_ddr_flush_ip2,
 	&ar724x_chip_init_usb_peripheral
 };

Modified: head/sys/mips/atheros/ar724xreg.h
==============================================================================
--- head/sys/mips/atheros/ar724xreg.h	Thu Apr 28 11:06:14 2011	(r221159)
+++ head/sys/mips/atheros/ar724xreg.h	Thu Apr 28 11:13:26 2011	(r221160)
@@ -59,6 +59,7 @@
 #define	AR7240_OHCI_BASE		0x1b000000
 #define	AR7240_OHCI_SIZE		0x01000000
 #define	AR724X_DDR_REG_FLUSH_USB	(AR71XX_DDR_CONFIG + 0x84)
+#define	AR724X_DDR_REG_FLUSH_PCIE	(AR71XX_DDR_CONFIG + 0x88)
 
 #define	AR724X_PCI_CRP_BASE		(AR71XX_APB_BASE + 0x000C0000)
 #define	AR724X_PCI_CRP_SIZE		0x100

Modified: head/sys/mips/atheros/ar91xx_chip.c
==============================================================================
--- head/sys/mips/atheros/ar91xx_chip.c	Thu Apr 28 11:06:14 2011	(r221159)
+++ head/sys/mips/atheros/ar91xx_chip.c	Thu Apr 28 11:13:26 2011	(r221160)
@@ -174,6 +174,13 @@ ar91xx_chip_ddr_flush_ge1(void)
 	ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_GE1);
 }
 
+static void
+ar91xx_chip_ddr_flush_ip2(void)
+{
+	ar71xx_ddr_flush(AR91XX_DDR_REG_FLUSH_WMAC);
+}
+
+
 static uint32_t
 ar91xx_chip_get_eth_pll(unsigned int mac, int speed)
 {
@@ -211,6 +218,6 @@ struct ar71xx_cpu_def ar91xx_chip_def = 
         &ar91xx_chip_ddr_flush_ge0,
         &ar91xx_chip_ddr_flush_ge1,
         &ar91xx_chip_get_eth_pll,
-	NULL,
+        &ar91xx_chip_ddr_flush_ip2,
 	&ar91xx_chip_init_usb_peripheral,
 };

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 11:21: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 2F83E106564A;
	Thu, 28 Apr 2011 11:21:50 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 01F328FC12;
	Thu, 28 Apr 2011 11:21: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 p3SBLnXm020671;
	Thu, 28 Apr 2011 11:21:49 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SBLnnQ020670;
	Thu, 28 Apr 2011 11:21:49 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104281121.p3SBLnnQ020670@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Thu, 28 Apr 2011 11:21: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: r221161 - head/tools/build/options
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 11:21:50 -0000

Author: des
Date: Thu Apr 28 11:21:49 2011
New Revision: 221161
URL: http://svn.freebsd.org/changeset/base/221161

Log:
  executable

Modified:
Directory Properties:
  head/tools/build/options/makeman   (props changed)

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 12:47: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 B50F1106566C;
	Thu, 28 Apr 2011 12:47: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 9F2428FC0A;
	Thu, 28 Apr 2011 12:47: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 p3SCle5J023559;
	Thu, 28 Apr 2011 12:47:40 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SCle5T023546;
	Thu, 28 Apr 2011 12:47:40 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104281247.p3SCle5T023546@svn.freebsd.org>
From: Adrian Chadd 
Date: Thu, 28 Apr 2011 12:47: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: r221163 - in head/sys: conf dev/ath dev/ath/ath_hal
	dev/ath/ath_hal/ar5416 dev/ath/ath_hal/ar9001 modules/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: Thu, 28 Apr 2011 12:47:40 -0000

Author: adrian
Date: Thu Apr 28 12:47:40 2011
New Revision: 221163
URL: http://svn.freebsd.org/changeset/base/221163

Log:
  Introduce AR9130 (HOWL) WMAC support to the FreeBSD HAL.
  
  The AR9130 is an AR9160/AR5416 family WMAC which is glued directly
  to the AR913x SoC peripheral bus (APB) rather than via a PCI/PCIe
  bridge.
  
  The specifics:
  
  * A new build option is required to use the AR9130 - AH_SUPPORT_AR9130.
    This is needed due to the different location the RTC registers live
    with this chip; hopefully this will be undone in the future.
    This does currently mean that enabling this option will break non-AR9130
    builds, so don't enable it unless you're specifically building an image
    for the AR913x SoC.
  
  * Add the new probe, attach, EEPROM and PLL methods specific to Howl.
  
  * Add a work-around to ah_eeprom_v14.c which disables some of the checks
    for endian-ness and magic in the EEPROM image if an eepromdata block
    is provided. This'll be fixed at a later stage by porting the ath9k
    probe code and making sure it doesn't break in other setups (which
    my previous attempt at this did.)
  
  * Sprinkle Howl modifications throughput the interrupt path - it doesn't
    implement the SYNC interrupt registers, so ignore those.
  
  * Sprinkle Howl chip powerup/down throughout the reset path; the RTC methods
    were
  
  * Sprinkle some other Howl workarounds in the reset path.
  
  * Hard-code an alternative setup for the AR_CFG register for Howl, that
    sets up things suitable for Big-Endian MIPS (which is the only platform
    this chip is glued to.)
  
  This has been tested on the AR913x based TP-Link WR-1043nd mode, in
  legacy, HT/20 and HT/40 modes.
  
  Caveats:
  
  * 2ghz has only been tested. I've not seen any 5ghz radios glued to this
    chipset so I can't test it.
  
  * AR5416_INTERRUPT_MITIGATION is not supported on the AR9130. At least,
    it isn't implemented in ath9k. Please don't enable this.
  
  * This hasn't been tested in MBSS mode or in RX/TX block-aggregation mode.

Added:
  head/sys/dev/ath/ath_hal/ar9001/ar9130.ini   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.c   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.h   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9001/ar9130reg.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/ath/ath_hal/ah.c
  head/sys/dev/ath/ath_hal/ah_devid.h
  head/sys/dev/ath/ath_hal/ah_eeprom_v14.c
  head/sys/dev/ath/ath_hal/ar5416/ar2133.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
  head/sys/dev/ath/if_ath_ahb.c
  head/sys/modules/ath/Makefile

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/conf/files	Thu Apr 28 12:47:40 2011	(r221163)
@@ -757,6 +757,14 @@ dev/ath/ath_hal/ar5416/ar5416_reset.c \
 dev/ath/ath_hal/ar5416/ar5416_xmit.c \
 	optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+# ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130
+dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_hal | ath_ar9130 \
+	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9001/ar9130_phy.c optional ath_hal | ath_ar9130 \
+	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9001/ar9130_eeprom.c optional ath_hal | ath_ar9130 \
+	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+
 # ar9160 (depends on ar5416)
 dev/ath/ath_hal/ar9001/ar9160_attach.c optional ath_hal | ath_ar9160 \
 	compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"

Modified: head/sys/dev/ath/ath_hal/ah.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ah.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -109,6 +109,8 @@ ath_hal_mac_name(struct ath_hal *ah)
 		return "5416";
 	case AR_XSREV_VERSION_OWL_PCIE:
 		return "5418";
+	case AR_XSREV_VERSION_HOWL:
+		return "9130";
 	case AR_XSREV_VERSION_SOWL:
 		return "9160";
 	case AR_XSREV_VERSION_MERLIN:

Modified: head/sys/dev/ath/ath_hal/ah_devid.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_devid.h	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ah_devid.h	Thu Apr 28 12:47:40 2011	(r221163)
@@ -74,6 +74,7 @@
 /* AR5416 compatible devid's  */
 #define AR5416_DEVID_PCI	0x0023          /* AR5416 PCI (MB/CB) Owl */
 #define AR5416_DEVID_PCIE	0x0024          /* AR5416 PCI-E (XB) Owl */
+#define	AR5416_AR9130_DEVID     0x000b          /* AR9130 SoC WiMAC */
 #define AR9160_DEVID_PCI	0x0027          /* AR9160 PCI Sowl */
 #define AR9280_DEVID_PCI	0x0029          /* AR9280 PCI Merlin */
 #define AR9280_DEVID_PCIE	0x002a          /* AR9280 PCI-E Merlin */

Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ah_eeprom_v14.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -316,6 +316,11 @@ v14EepromDetach(struct ath_hal *ah)
 #define owl_get_eep_rev(_ee)   \
     (((_ee)->ee_base.baseEepHeader.version) & 0xFFF)
 
+/*
+ * Howl is (hopefully) a special case where the endian-ness of the EEPROM
+ * matches the native endian-ness; and that supplied EEPROMs don't have
+ * a magic value to check.
+ */
 HAL_STATUS
 ath_hal_v14EepromAttach(struct ath_hal *ah)
 {
@@ -328,16 +333,23 @@ ath_hal_v14EepromAttach(struct ath_hal *
 
 	HALASSERT(ee == AH_NULL);
  
-	if (!ath_hal_eepromRead(ah, AR5416_EEPROM_MAGIC_OFFSET, &magic)) {
-		HALDEBUG(ah, HAL_DEBUG_ANY,
-		    "%s Error reading Eeprom MAGIC\n", __func__);
-		return HAL_EEREAD;
-	}
-	HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
-	    __func__, magic);
-	if (magic != AR5416_EEPROM_MAGIC) {
-		HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
-		return HAL_EEMAGIC;
+	/*
+	 * Don't check magic if we're supplied with an EEPROM block,
+	 * typically this is from Howl but it may also be from later
+	 * boards w/ an embedded Merlin.
+	 */
+	if (ah->ah_eepromdata == NULL) {
+		if (!ath_hal_eepromRead(ah, AR5416_EEPROM_MAGIC_OFFSET, &magic)) {
+			HALDEBUG(ah, HAL_DEBUG_ANY,
+			    "%s Error reading Eeprom MAGIC\n", __func__);
+			return HAL_EEREAD;
+		}
+		HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
+		    __func__, magic);
+		if (magic != AR5416_EEPROM_MAGIC) {
+			HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
+			return HAL_EEMAGIC;
+		}
 	}
 
 	ee = ath_hal_malloc(sizeof(HAL_EEPROM_v14));
@@ -357,7 +369,8 @@ ath_hal_v14EepromAttach(struct ath_hal *
 		}
 	}
 	/* Convert to eeprom native eeprom endian format */
-	if (isBigEndian()) {
+	/* XXX this is likely incorrect but will do for now to get howl/ap83 working. */
+	if (ah->ah_eepromdata == NULL && isBigEndian()) {
 		for (w = 0; w < NW(struct ar5416eeprom); w++)
 			eep_data[w] = __bswap16(eep_data[w]);
 	}

Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar2133.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -171,7 +171,7 @@ ar2133SetChannel(struct ath_hal *ah, con
 			aModeRefSel = ath_hal_reverseBits(1, 2);
 	} else if ((freq % 10) == 0) {
 		channelSel = ath_hal_reverseBits(((freq - 4800) / 10 << 1), 8);
-		if (AR_SREV_SOWL_10_OR_LATER(ah))
+		if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah))
 			aModeRefSel = ath_hal_reverseBits(2, 2);
 		else
 			aModeRefSel = ath_hal_reverseBits(1, 2);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -34,6 +34,10 @@ HAL_BOOL
 ar5416IsInterruptPending(struct ath_hal *ah)
 {
 	uint32_t isr;
+
+	if (AR_SREV_HOWL(ah))
+		return AH_TRUE;
+
 	/* 
 	 * Some platforms trigger our ISR before applying power to
 	 * the card, so make sure the INTPEND is really 1, not 0xffffffff.
@@ -63,22 +67,27 @@ ar5416IsInterruptPending(struct ath_hal 
 HAL_BOOL
 ar5416GetPendingInterrupts(struct ath_hal *ah, HAL_INT *masked)
 {
-	uint32_t isr, isr0, isr1, sync_cause;
+	uint32_t isr, isr0, isr1, sync_cause = 0;
 
 	/*
 	 * Verify there's a mac interrupt and the RTC is on.
 	 */
-	if ((OS_REG_READ(ah, AR_INTR_ASYNC_CAUSE) & AR_INTR_MAC_IRQ) &&
-	    (OS_REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M) == AR_RTC_STATUS_ON)
+	if (AR_SREV_HOWL(ah)) {
+		*masked = 0;
 		isr = OS_REG_READ(ah, AR_ISR);
-	else
-		isr = 0;
-	sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
-	sync_cause &= AR_INTR_SYNC_DEFAULT;
-	*masked = 0;
+	} else {
+		if ((OS_REG_READ(ah, AR_INTR_ASYNC_CAUSE) & AR_INTR_MAC_IRQ) &&
+		    (OS_REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M) == AR_RTC_STATUS_ON)
+			isr = OS_REG_READ(ah, AR_ISR);
+		else
+			isr = 0;
+		sync_cause = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
+		sync_cause &= AR_INTR_SYNC_DEFAULT;
+		*masked = 0;
 
-	if (isr == 0 && sync_cause == 0)
-		return AH_FALSE;
+		if (isr == 0 && sync_cause == 0)
+			return AH_FALSE;
+	}
 
 	if (isr != 0) {
 		struct ath_hal_5212 *ahp = AH5212(ah);
@@ -138,6 +147,10 @@ ar5416GetPendingInterrupts(struct ath_ha
 #endif
 		*masked |= mask2;
 	}
+
+	if (AR_SREV_HOWL(ah))
+		return AH_TRUE;
+
 	if (sync_cause != 0) {
 		if (sync_cause & (AR_INTR_SYNC_HOST1_FATAL | AR_INTR_SYNC_HOST1_PERR)) {
 			*masked |= HAL_INT_FATAL;
@@ -186,11 +199,13 @@ ar5416SetInterrupts(struct ath_hal *ah, 
 		OS_REG_WRITE(ah, AR_IER, AR_IER_DISABLE);
 		(void) OS_REG_READ(ah, AR_IER);
 
-		OS_REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, 0);
-		(void) OS_REG_READ(ah, AR_INTR_ASYNC_ENABLE);
+		if (! AR_SREV_HOWL(ah)) {
+			OS_REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, 0);
+			(void) OS_REG_READ(ah, AR_INTR_ASYNC_ENABLE);
 
-		OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
-		(void) OS_REG_READ(ah, AR_INTR_SYNC_ENABLE);
+			OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
+			(void) OS_REG_READ(ah, AR_INTR_SYNC_ENABLE);
+		}
 	}
 
 	mask = ints & HAL_INT_COMMON;
@@ -270,19 +285,21 @@ ar5416SetInterrupts(struct ath_hal *ah, 
 		HALDEBUG(ah, HAL_DEBUG_INTERRUPT, "%s: enable IER\n", __func__);
 		OS_REG_WRITE(ah, AR_IER, AR_IER_ENABLE);
 
-		mask = AR_INTR_MAC_IRQ;
-		if (ints & HAL_INT_GPIO)
-			mask |= SM(AH5416(ah)->ah_gpioMask,
-			    AR_INTR_ASYNC_MASK_GPIO);
-		OS_REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, mask);
-		OS_REG_WRITE(ah, AR_INTR_ASYNC_MASK, mask);
-
-		mask = AR_INTR_SYNC_DEFAULT;
-		if (ints & HAL_INT_GPIO)
-			mask |= SM(AH5416(ah)->ah_gpioMask,
-			    AR_INTR_SYNC_MASK_GPIO);
-		OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, mask);
-		OS_REG_WRITE(ah, AR_INTR_SYNC_MASK, mask);
+		if (! AR_SREV_HOWL(ah)) {
+			mask = AR_INTR_MAC_IRQ;
+			if (ints & HAL_INT_GPIO)
+				mask |= SM(AH5416(ah)->ah_gpioMask,
+				    AR_INTR_ASYNC_MASK_GPIO);
+			OS_REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, mask);
+			OS_REG_WRITE(ah, AR_INTR_ASYNC_MASK, mask);
+
+			mask = AR_INTR_SYNC_DEFAULT;
+			if (ints & HAL_INT_GPIO)
+				mask |= SM(AH5416(ah)->ah_gpioMask,
+				    AR_INTR_SYNC_MASK_GPIO);
+			OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, mask);
+			OS_REG_WRITE(ah, AR_INTR_SYNC_MASK, mask);
+		}
 	}
 
 	return omask;

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -77,6 +77,9 @@ ar5416SetLedState(struct ath_hal *ah, HA
 	};
 	uint32_t bits;
 
+	if (AR_SREV_HOWL(ah))
+		return;
+
 	bits = OS_REG_READ(ah, AR_MAC_LED);
 	bits = (bits &~ AR_MAC_LED_MODE)
 	     | SM(AR_MAC_LED_MODE_POWON, AR_MAC_LED_MODE)

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_power.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -52,6 +52,9 @@ ar5416SetPowerModeAwake(struct ath_hal *
 				goto bad;			
 		}
 
+		if (AR_SREV_HOWL(ah))
+			OS_REG_SET_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
+
 		OS_REG_SET_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);
 		OS_DELAY(50);   /* Give chip the chance to awake */
 
@@ -88,7 +91,8 @@ ar5416SetPowerModeSleep(struct ath_hal *
 	if (setChip) {
 		/* Clear the RTC force wake bit to allow the mac to sleep */
 		OS_REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);
-		OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF);
+		if (! AR_SREV_HOWL(ah))
+			OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF);
 		/* Shutdown chip. Active low */
 		OS_REG_CLR_BIT(ah, AR_RTC_RESET, AR_RTC_RESET_EN);
 	}

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Thu Apr 28 12:47:40 2011	(r221163)
@@ -145,7 +145,8 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 		 AR_MAC_LED_BLINK_THRESH_SEL | AR_MAC_LED_BLINK_SLOW);
 
 	/* For chips on which the RTC reset is done, save TSF before it gets cleared */
-	if (AR_SREV_MERLIN_20_OR_LATER(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL))
+	if (AR_SREV_HOWL(ah) ||
+	    (AR_SREV_MERLIN_20_OR_LATER(ah) && ath_hal_eepromGetFlag(ah, AR_EEP_OL_PWRCTRL)))
 		tsf = ar5212GetTsf64(ah);
 
 	/* Mark PHY as inactive; marked active in ar5416InitBB() */
@@ -184,6 +185,17 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 
 	OS_MARK(ah, AH_MARK_RESET_LINE, __LINE__);
 
+	/*
+	 * Some AR91xx SoC devices frequently fail to accept TSF writes
+	 * right after the chip reset. When that happens, write a new
+	 * value after the initvals have been applied, with an offset
+	 * based on measured time difference
+	 */
+	if (AR_SREV_HOWL(ah) && (ar5212GetTsf64(ah) < tsf)) {
+		tsf += 1500;
+		ar5212SetTsf64(ah, tsf);
+	}
+
 	HALDEBUG(ah, HAL_DEBUG_RESET, ">>>2 %s: AR_PHY_DAG_CTRLCCK=0x%x\n",
 		__func__, OS_REG_READ(ah,AR_PHY_DAG_CTRLCCK));
 	HALDEBUG(ah, HAL_DEBUG_RESET, ">>>2 %s: AR_PHY_ADC_CTL=0x%x\n",
@@ -548,14 +560,25 @@ ar5416InitIMR(struct ath_hal *ah, HAL_OP
                         | AR_IMR_BCNMISC;
 
 #ifdef	AH_AR5416_INTERRUPT_MITIGATION
-       	ahp->ah_maskReg |= AR_IMR_TXINTM | AR_IMR_RXINTM
+	ahp->ah_maskReg |= AR_IMR_TXINTM | AR_IMR_RXINTM
 			|  AR_IMR_TXMINTR | AR_IMR_RXMINTR;
 #else
-        ahp->ah_maskReg |= AR_IMR_TXOK | AR_IMR_RXOK;
+	ahp->ah_maskReg |= AR_IMR_TXOK | AR_IMR_RXOK;
 #endif	
+
 	if (opmode == HAL_M_HOSTAP)
 		ahp->ah_maskReg |= AR_IMR_MIB;
 	OS_REG_WRITE(ah, AR_IMR, ahp->ah_maskReg);
+
+#ifdef  ADRIAN_NOTYET
+	/* This is straight from ath9k */
+	if (! AR_SREV_HOWL(ah)) {
+		OS_REG_WRITE(ah, AR_INTR_SYNC_CAUSE, 0xFFFFFFFF);
+		OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, AR_INTR_SYNC_DEFAULT);
+		OS_REG_WRITE(ah, AR_INTR_SYNC_MASK, 0);
+	}
+#endif
+
 	/* Enable bus errors that are OR'd to set the HIUERR bit */
 #if 0
 	OS_REG_WRITE(ah, AR_IMR_S2, 
@@ -1136,10 +1159,13 @@ ar5416SetResetPowerOn(struct ath_hal *ah
     /*
      * RTC reset and clear
      */
-    OS_REG_WRITE(ah, AR_RC, AR_RC_AHB);
+    if (! AR_SREV_HOWL(ah))
+    	OS_REG_WRITE(ah, AR_RC, AR_RC_AHB);
     OS_REG_WRITE(ah, AR_RTC_RESET, 0);
     OS_DELAY(20);
-    OS_REG_WRITE(ah, AR_RC, 0);
+
+    if (! AR_SREV_HOWL(ah))
+    	OS_REG_WRITE(ah, AR_RC, 0);
 
     OS_REG_WRITE(ah, AR_RTC_RESET, 1);
 
@@ -1158,6 +1184,18 @@ static HAL_BOOL
 ar5416SetReset(struct ath_hal *ah, int type)
 {
     uint32_t tmpReg, mask;
+    uint32_t rst_flags;
+
+#ifdef	AH_SUPPORT_AR9130	/* Because of the AR9130 specific registers */
+    if (AR_SREV_HOWL(ah)) {
+        HALDEBUG(ah, HAL_DEBUG_ANY, "[ath] HOWL: Fiddling with derived clk!\n");
+        uint32_t val = OS_REG_READ(ah, AR_RTC_DERIVED_CLK);
+        val &= ~AR_RTC_DERIVED_CLK_PERIOD;
+        val |= SM(1, AR_RTC_DERIVED_CLK_PERIOD);
+        OS_REG_WRITE(ah, AR_RTC_DERIVED_CLK, val);
+        (void) OS_REG_READ(ah, AR_RTC_DERIVED_CLK);
+    }
+#endif	/* AH_SUPPORT_AR9130 */
 
     /*
      * Force wake
@@ -1165,31 +1203,31 @@ ar5416SetReset(struct ath_hal *ah, int t
     OS_REG_WRITE(ah, AR_RTC_FORCE_WAKE,
 	AR_RTC_FORCE_WAKE_EN | AR_RTC_FORCE_WAKE_ON_INT);
 
-    /*
-     * Reset AHB
-     */
-    tmpReg = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
-    if (tmpReg & (AR_INTR_SYNC_LOCAL_TIMEOUT|AR_INTR_SYNC_RADM_CPL_TIMEOUT)) {
-	OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
-	OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF);
+#ifdef	AH_SUPPORT_AR9130
+    if (AR_SREV_HOWL(ah)) {
+        rst_flags = AR_RTC_RC_MAC_WARM | AR_RTC_RC_MAC_COLD |
+          AR_RTC_RC_COLD_RESET | AR_RTC_RC_WARM_RESET;
     } else {
-	OS_REG_WRITE(ah, AR_RC, AR_RC_AHB);
+#endif	/* AH_SUPPORT_AR9130 */
+        /*
+         * Reset AHB
+         */
+        tmpReg = OS_REG_READ(ah, AR_INTR_SYNC_CAUSE);
+        if (tmpReg & (AR_INTR_SYNC_LOCAL_TIMEOUT|AR_INTR_SYNC_RADM_CPL_TIMEOUT)) {
+            OS_REG_WRITE(ah, AR_INTR_SYNC_ENABLE, 0);
+            OS_REG_WRITE(ah, AR_RC, AR_RC_AHB|AR_RC_HOSTIF);
+        } else {
+	    OS_REG_WRITE(ah, AR_RC, AR_RC_AHB);
+        }
+        rst_flags = AR_RTC_RC_MAC_WARM;
+        if (type == HAL_RESET_COLD)
+            rst_flags |= AR_RTC_RC_MAC_COLD;
+#ifdef	AH_SUPPORT_AR9130
     }
+#endif	/* AH_SUPPORT_AR9130 */
 
-    /*
-     * Set Mac(BB,Phy) Warm Reset
-     */
-    switch (type) {
-    case HAL_RESET_WARM:
-            OS_REG_WRITE(ah, AR_RTC_RC, AR_RTC_RC_MAC_WARM);
-            break;
-    case HAL_RESET_COLD:
-            OS_REG_WRITE(ah, AR_RTC_RC, AR_RTC_RC_MAC_WARM|AR_RTC_RC_MAC_COLD);
-            break;
-    default:
-            HALASSERT(AH_FALSE);
-            break;
-    }
+    OS_REG_WRITE(ah, AR_RTC_RC, rst_flags);
+    OS_DELAY(50);
 
     /*
      * Clear resets and force wakeup
@@ -1201,8 +1239,26 @@ ar5416SetReset(struct ath_hal *ah, int t
     }
 
     /* Clear AHB reset */
-    OS_REG_WRITE(ah, AR_RC, 0);
+    if (! AR_SREV_HOWL(ah))
+        OS_REG_WRITE(ah, AR_RC, 0);
+
+    if (AR_SREV_HOWL(ah))
+        OS_DELAY(50);
 
+    if (AR_SREV_HOWL(ah)) {
+                uint32_t mask;
+                mask = OS_REG_READ(ah, AR_CFG);
+                if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) {
+                        HALDEBUG(ah, HAL_DEBUG_RESET,
+                                "CFG Byte Swap Set 0x%x\n", mask);
+                } else {
+                        mask =  
+                                INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB;
+                        OS_REG_WRITE(ah, AR_CFG, mask);
+                        HALDEBUG(ah, HAL_DEBUG_RESET,
+                                "Setting CFG 0x%x\n", OS_REG_READ(ah, AR_CFG));
+                }
+    } else {
 	if (type == HAL_RESET_COLD) {
 		if (isBigEndian()) {
 			/*
@@ -1219,6 +1275,7 @@ ar5416SetReset(struct ath_hal *ah, int t
 		} else
 			OS_REG_WRITE(ah, AR_CFG, INIT_CONFIG_STATUS);
 	}
+    }
 
     AH5416(ah)->ah_initPLL(ah, AH_NULL);
 
@@ -1235,6 +1292,11 @@ ar5416InitChainMasks(struct ath_hal *ah)
 	OS_REG_WRITE(ah, AR_PHY_RX_CHAINMASK, AH5416(ah)->ah_rx_chainmask);
 	OS_REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, AH5416(ah)->ah_rx_chainmask);
 	OS_REG_WRITE(ah, AR_SELFGEN_MASK, AH5416(ah)->ah_tx_chainmask);
+
+	if (AR_SREV_HOWL(ah)) {
+		OS_REG_WRITE(ah, AR_PHY_ANALOG_SWAP,
+		OS_REG_READ(ah, AR_PHY_ANALOG_SWAP) | 0x00000001);
+	}
 }
 
 void
@@ -2440,12 +2502,12 @@ ar5416OverrideIni(struct ath_hal *ah, co
 
 	/*
 	 * The AR5416 initvals have this already set to 0x11; AR9160 has
-	 * the register set to 0x0. Figure out whether AR9100/AR9160 needs
+	 * the register set to 0x0. Figure out whether AR9130/AR9160 needs
 	 * this before moving forward with it.
 	 */
 #if 0
-	/* Disable BB clock gating for AR5416v2, AR9100, AR9160 */
-        if (AR_SREV_OWL_20_OR_LATER(ah) || AR_SREV_9100(ah) || AR_SREV_SOWL(ah)) {
+	/* Disable BB clock gating for AR5416v2, AR9130, AR9160 */
+        if (AR_SREV_OWL_20_OR_LATER(ah) || AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) {
 		/*
 		 * Disable BB clock gating
 		 * Necessary to avoid issues on AR5416 2.0
@@ -2458,7 +2520,7 @@ ar5416OverrideIni(struct ath_hal *ah, co
 	 * Disable RIFS search on some chips to avoid baseband
 	 * hang issues.
 	 */
-	if (AR_SREV_9100(ah) || AR_SREV_SOWL(ah)) {
+	if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) {
 		val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS);
 		val &= ~AR_PHY_RIFS_INIT_DELAY;
 		OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Thu Apr 28 12:39:31 2011	(r221162)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h	Thu Apr 28 12:47:40 2011	(r221163)
@@ -54,15 +54,30 @@
 #define	AR_GPIO_OUTPUT_MUX3	0x4068
 #define	AR_EEPROM_STATUS_DATA	0x407c
 #define	AR_OBS			0x4080
-#define	AR_RTC_RC		0x7000	/* reset control */
-#define	AR_RTC_PLL_CONTROL	0x7014
-#define	AR_RTC_RESET		0x7040	/* RTC reset register */
-#define	AR_RTC_STATUS		0x7044	/* system sleep status */
-#define	AR_RTC_SLEEP_CLK	0x7048
-#define	AR_RTC_FORCE_WAKE	0x704c	/* control MAC force wake */
-#define	AR_RTC_INTR_CAUSE	0x7050	/* RTC interrupt cause/clear */
-#define	AR_RTC_INTR_ENABLE	0x7054	/* RTC interrupt enable */
-#define	AR_RTC_INTR_MASK	0x7058	/* RTC interrupt mask */
+
+#ifdef	AH_SUPPORT_AR9130
+#define	AR_RTC_BASE		0x20000
+#else
+#define	AR_RTC_BASE		0x7000
+#endif	/* AH_SUPPORT_AR9130 */
+
+#define	AR_RTC_RC		AR_RTC_BASE + 0x00	/* reset control */
+#define	AR_RTC_PLL_CONTROL	AR_RTC_BASE + 0x14
+#define	AR_RTC_RESET		AR_RTC_BASE + 0x40	/* RTC reset register */
+#define	AR_RTC_STATUS		AR_RTC_BASE + 0x44	/* system sleep status */
+#define	AR_RTC_SLEEP_CLK	AR_RTC_BASE + 0x48
+#define	AR_RTC_FORCE_WAKE	AR_RTC_BASE + 0x4c	/* control MAC force wake */
+#define	AR_RTC_INTR_CAUSE	AR_RTC_BASE + 0x50	/* RTC interrupt cause/clear */
+#define	AR_RTC_INTR_ENABLE	AR_RTC_BASE + 0x54	/* RTC interrupt enable */
+#define	AR_RTC_INTR_MASK	AR_RTC_BASE + 0x58	/* RTC interrupt mask */
+
+#ifdef	AH_SUPPORT_AR9130
+/* RTC_DERIVED_* - only for AR9130 */
+#define	AR_RTC_DERIVED_CLK		(AR_RTC_BASE + 0x0038)
+#define	AR_RTC_DERIVED_CLK_PERIOD	0x0000fffe
+#define	AR_RTC_DERIVED_CLK_PERIOD_S	1
+#endif	/* AH_SUPPORT_AR9130 */
+
 /* AR9280: rf long shift registers */
 #define	AR_AN_RF2G1_CH0         0x7810
 #define	AR_AN_RF5G1_CH0         0x7818
@@ -313,6 +328,10 @@
 #define	AR_RTC_RC_M		0x00000003
 #define	AR_RTC_RC_MAC_WARM	0x00000001
 #define	AR_RTC_RC_MAC_COLD	0x00000002
+#ifdef	AH_SUPPORT_AR9130
+#define AR_RTC_RC_COLD_RESET    0x00000004
+#define AR_RTC_RC_WARM_RESET    0x00000008
+#endif	/* AH_SUPPORT_AR9130 */
 #define	AR_RTC_PLL_DIV		0x0000001f
 #define	AR_RTC_PLL_DIV_S	0
 #define	AR_RTC_PLL_DIV2		0x00000020
@@ -328,7 +347,11 @@
 #define	AR_RTC_RESET_EN		0x00000001	/* Reset RTC bit */
 
 #define	AR_RTC_PM_STATUS_M	0x0000000f	/* Pwr Mgmt Status */
+#ifdef	AH_SUPPORT_AR9130
+#define	AR_RTC_STATUS_M		0x0000000f	/* RTC Status */
+#else
 #define	AR_RTC_STATUS_M		0x0000003f	/* RTC Status */
+#endif	/* AH_SUPPORT_AR9130 */
 #define	AR_RTC_STATUS_SHUTDOWN	0x00000001
 #define	AR_RTC_STATUS_ON	0x00000002
 #define	AR_RTC_STATUS_SLEEP	0x00000004
@@ -584,7 +607,7 @@
 #define	AR_XSREV_REVISION_OWL_20	1	/* Owl 2.0/2.1 */
 #define	AR_XSREV_REVISION_OWL_22	2	/* Owl 2.2 */
 #define	AR_XSREV_VERSION_HOWL		0x14	/* Howl (AR9130) */
-#define	AR_XSREV_VERSION_SOWL		0x40
+#define	AR_XSREV_VERSION_SOWL		0x40	/* Sowl (AR9160) */
 #define	AR_XSREV_REVISION_SOWL_10	0	/* Sowl 1.0 */
 #define	AR_XSREV_REVISION_SOWL_11	1	/* Sowl 1.1 */
 #define	AR_XSREV_VERSION_MERLIN		0x80	/* Merlin Version */
@@ -607,6 +630,10 @@
 	((AR_SREV_OWL(_ah) && AH_PRIVATE((_ah))->ah_macRev >= AR_XSREV_REVISION_OWL_22) || \
 	AH_PRIVATE((_ah))->ah_macVersion >= AR_XSREV_VERSION_HOWL)
 
+#define AR_SREV_HOWL(_ah) \
+	(AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_HOWL)
+#define	AR_SREV_9100(_ah)	AR_SREV_HOWL(_ah)
+
 #define	AR_SREV_SOWL(_ah) \
 	(AH_PRIVATE((_ah))->ah_macVersion == AR_XSREV_VERSION_SOWL)
 #define	AR_SREV_SOWL_10_OR_LATER(_ah) \
@@ -649,6 +676,5 @@
 /* Not yet implemented chips */
 #define	AR_SREV_9271(_ah)	0
 #define	AR_SREV_9287_11_OR_LATER(_ah)	0
-#define	AR_SREV_9100(_ah)	0
 
 #endif /* _DEV_ATH_AR5416REG_H */

Added: head/sys/dev/ath/ath_hal/ar9001/ar9130.ini
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/ath/ath_hal/ar9001/ar9130.ini	Thu Apr 28 12:47:40 2011	(r221163)
@@ -0,0 +1,669 @@
+/*
+ * Copyright (c) 2010 Atheros Communications Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+static const uint32_t ar5416Modes_9100[][6] = {
+    { 0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160, 0x000001e0 },
+    { 0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c, 0x000001e0 },
+    { 0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38, 0x00001180 },
+    { 0x000010f0, 0x0000a000, 0x00014000, 0x00016000, 0x0000b000, 0x00014008 },
+    { 0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00, 0x06e006e0 },
+    { 0x0000801c, 0x128d93a7, 0x128d93cf, 0x12e013d7, 0x12e013ab, 0x098813cf },
+    { 0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810, 0x08f04810 },
+    { 0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a, 0x0000320a },
+    { 0x00009804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, 0x00000303 },
+    { 0x00009820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, 0x02020200 },
+    { 0x00009824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e },
+    { 0x00009828, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001 },
+    { 0x00009834, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e },
+    { 0x00009838, 0x00000007, 0x00000007, 0x00000007, 0x00000007, 0x00000007 },
+    { 0x00009844, 0x0372161e, 0x0372161e, 0x037216a0, 0x037216a0, 0x037216a0 },
+    { 0x00009848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
+    { 0x0000a848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
+    { 0x0000b848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
+    { 0x00009850, 0x6c48b4e2, 0x6d48b4e2, 0x6d48b0e2, 0x6c48b0e2, 0x6c48b0e2 },
+    { 0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e },
+    { 0x0000985c, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e, 0x31395d5e },
+    { 0x00009860, 0x00048d18, 0x00048d18, 0x00048d20, 0x00048d20, 0x00048d18 },
+    { 0x0000c864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 },
+    { 0x00009868, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0 },
+    { 0x0000986c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081 },
+    { 0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0 },
+    { 0x00009918, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b, 0x00000016 },
+    { 0x00009924, 0xd00a8a07, 0xd00a8a07, 0xd00a8a0d, 0xd00a8a0d, 0xd00a8a0d },
+    { 0x00009940, 0x00750604, 0x00754604, 0xfff81204, 0xfff81204, 0xfff81204 },
+    { 0x00009944, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020 },
+    { 0x00009954, 0x5f3ca3de, 0x5f3ca3de, 0xe250a51e, 0xe250a51e, 0xe250a51e },
+    { 0x00009958, 0x2108ecff, 0x2108ecff, 0x3388ffff, 0x3388ffff, 0x3388ffff },
+    { 0x00009960, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0 },
+    { 0x0000a960, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0 },
+    { 0x0000b960, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0, 0x0001bfc0 },
+    { 0x00009964, 0x00001120, 0x00001120, 0x00001120, 0x00001120, 0x00001120 },
+    { 0x0000c9bc, 0x001a0600, 0x001a0600, 0x001a1000, 0x001a0c00, 0x001a0c00 },
+    { 0x000099c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, 0x038919be },
+    { 0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77 },
+    { 0x000099c8, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329, 0x6af65329 },
+    { 0x000099cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8 },
+    { 0x000099d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, 0x00046384 },
+    { 0x000099d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+    { 0x000099d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+    { 0x0000a204, 0x00000880, 0x00000880, 0x00000880, 0x00000880, 0x00000880 },
+    { 0x0000a208, 0xd6be4788, 0xd6be4788, 0xd03e4788, 0xd03e4788, 0xd03e4788 },
+    { 0x0000a20c, 0x002fc160, 0x002fc160, 0x002ac120, 0x002ac120, 0x002ac120 },
+    { 0x0000b20c, 0x002fc160, 0x002fc160, 0x002ac120, 0x002ac120, 0x002ac120 },
+    { 0x0000c20c, 0x002fc160, 0x002fc160, 0x002ac120, 0x002ac120, 0x002ac120 },
+    { 0x0000a21c, 0x1883800a, 0x1883800a, 0x1883800a, 0x1883800a, 0x1883800a },
+    { 0x0000a230, 0x00000000, 0x00000000, 0x00000210, 0x00000108, 0x00000000 },
+    { 0x0000a274, 0x0a1a9caa, 0x0a1a9caa, 0x0a1a7caa, 0x0a1a7caa, 0x0a1a7caa },
+    { 0x0000a300, 0x18010000, 0x18010000, 0x18010000, 0x18010000, 0x18010000 },
+    { 0x0000a304, 0x30032602, 0x30032602, 0x2e032402, 0x2e032402, 0x2e032402 },
+    { 0x0000a308, 0x48073e06, 0x48073e06, 0x4a0a3c06, 0x4a0a3c06, 0x4a0a3c06 },
+    { 0x0000a30c, 0x560b4c0a, 0x560b4c0a, 0x621a540b, 0x621a540b, 0x621a540b },
+    { 0x0000a310, 0x641a600f, 0x641a600f, 0x764f6c1b, 0x764f6c1b, 0x764f6c1b },
+    { 0x0000a314, 0x7a4f6e1b, 0x7a4f6e1b, 0x845b7a5a, 0x845b7a5a, 0x845b7a5a },
+    { 0x0000a318, 0x8c5b7e5a, 0x8c5b7e5a, 0x950f8ccf, 0x950f8ccf, 0x950f8ccf },
+    { 0x0000a31c, 0x9d0f96cf, 0x9d0f96cf, 0xa5cf9b4f, 0xa5cf9b4f, 0xa5cf9b4f },
+    { 0x0000a320, 0xb51fa69f, 0xb51fa69f, 0xbddfaf1f, 0xbddfaf1f, 0xbddfaf1f },
+    { 0x0000a324, 0xcb3fbd07, 0xcb3fbcbf, 0xd1ffc93f, 0xd1ffc93f, 0xd1ffc93f },
+    { 0x0000a328, 0x0000d7bf, 0x0000d7bf, 0x00000000, 0x00000000, 0x00000000 },
+    { 0x0000a32c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+    { 0x0000a330, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+    { 0x0000a334, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+};
+
+static const uint32_t ar5416Common_9100[][2] = {
+    /* Addr      allmodes  */
+    { 0x0000000c, 0x00000000 },
+    { 0x00000030, 0x00020015 },
+    { 0x00000034, 0x00000005 },
+    { 0x00000040, 0x00000000 },
+    { 0x00000044, 0x00000008 },
+    { 0x00000048, 0x00000008 },
+    { 0x0000004c, 0x00000010 },
+    { 0x00000050, 0x00000000 },
+    { 0x00000054, 0x0000001f },
+    { 0x00000800, 0x00000000 },
+    { 0x00000804, 0x00000000 },
+    { 0x00000808, 0x00000000 },
+    { 0x0000080c, 0x00000000 },
+    { 0x00000810, 0x00000000 },
+    { 0x00000814, 0x00000000 },
+    { 0x00000818, 0x00000000 },
+    { 0x0000081c, 0x00000000 },
+    { 0x00000820, 0x00000000 },
+    { 0x00000824, 0x00000000 },
+    { 0x00001040, 0x002ffc0f },
+    { 0x00001044, 0x002ffc0f },
+    { 0x00001048, 0x002ffc0f },
+    { 0x0000104c, 0x002ffc0f },
+    { 0x00001050, 0x002ffc0f },
+    { 0x00001054, 0x002ffc0f },
+    { 0x00001058, 0x002ffc0f },
+    { 0x0000105c, 0x002ffc0f },
+    { 0x00001060, 0x002ffc0f },
+    { 0x00001064, 0x002ffc0f },
+    { 0x00001230, 0x00000000 },
+    { 0x00001270, 0x00000000 },
+    { 0x00001038, 0x00000000 },
+    { 0x00001078, 0x00000000 },
+    { 0x000010b8, 0x00000000 },
+    { 0x000010f8, 0x00000000 },
+    { 0x00001138, 0x00000000 },
+    { 0x00001178, 0x00000000 },
+    { 0x000011b8, 0x00000000 },
+    { 0x000011f8, 0x00000000 },
+    { 0x00001238, 0x00000000 },
+    { 0x00001278, 0x00000000 },
+    { 0x000012b8, 0x00000000 },
+    { 0x000012f8, 0x00000000 },
+    { 0x00001338, 0x00000000 },
+    { 0x00001378, 0x00000000 },
+    { 0x000013b8, 0x00000000 },
+    { 0x000013f8, 0x00000000 },
+    { 0x00001438, 0x00000000 },
+    { 0x00001478, 0x00000000 },
+    { 0x000014b8, 0x00000000 },
+    { 0x000014f8, 0x00000000 },
+    { 0x00001538, 0x00000000 },
+    { 0x00001578, 0x00000000 },
+    { 0x000015b8, 0x00000000 },
+    { 0x000015f8, 0x00000000 },
+    { 0x00001638, 0x00000000 },
+    { 0x00001678, 0x00000000 },
+    { 0x000016b8, 0x00000000 },
+    { 0x000016f8, 0x00000000 },
+    { 0x00001738, 0x00000000 },
+    { 0x00001778, 0x00000000 },
+    { 0x000017b8, 0x00000000 },
+    { 0x000017f8, 0x00000000 },
+    { 0x0000103c, 0x00000000 },
+    { 0x0000107c, 0x00000000 },
+    { 0x000010bc, 0x00000000 },
+    { 0x000010fc, 0x00000000 },
+    { 0x0000113c, 0x00000000 },
+    { 0x0000117c, 0x00000000 },
+    { 0x000011bc, 0x00000000 },
+    { 0x000011fc, 0x00000000 },
+    { 0x0000123c, 0x00000000 },
+    { 0x0000127c, 0x00000000 },
+    { 0x000012bc, 0x00000000 },
+    { 0x000012fc, 0x00000000 },
+    { 0x0000133c, 0x00000000 },
+    { 0x0000137c, 0x00000000 },
+    { 0x000013bc, 0x00000000 },
+    { 0x000013fc, 0x00000000 },
+    { 0x0000143c, 0x00000000 },
+    { 0x0000147c, 0x00000000 },
+    { 0x00020010, 0x00000003 },
+    { 0x00020038, 0x000004c2 },
+    { 0x00008004, 0x00000000 },
+    { 0x00008008, 0x00000000 },
+    { 0x0000800c, 0x00000000 },
+    { 0x00008018, 0x00000700 },
+    { 0x00008020, 0x00000000 },
+    { 0x00008038, 0x00000000 },
+    { 0x0000803c, 0x00000000 },
+    { 0x00008048, 0x40000000 },
+    { 0x00008054, 0x00004000 },
+    { 0x00008058, 0x00000000 },
+    { 0x0000805c, 0x000fc78f },
+    { 0x00008060, 0x0000000f },
+    { 0x00008064, 0x00000000 },
+    { 0x000080c0, 0x2a82301a },
+    { 0x000080c4, 0x05dc01e0 },
+    { 0x000080c8, 0x1f402710 },
+    { 0x000080cc, 0x01f40000 },
+    { 0x000080d0, 0x00001e00 },
+    { 0x000080d4, 0x00000000 },
+    { 0x000080d8, 0x00400000 },
+    { 0x000080e0, 0xffffffff },
+    { 0x000080e4, 0x0000ffff },
+    { 0x000080e8, 0x003f3f3f },
+    { 0x000080ec, 0x00000000 },
+    { 0x000080f0, 0x00000000 },
+    { 0x000080f4, 0x00000000 },
+    { 0x000080f8, 0x00000000 },
+    { 0x000080fc, 0x00020000 },
+    { 0x00008100, 0x00020000 },
+    { 0x00008104, 0x00000001 },
+    { 0x00008108, 0x00000052 },
+    { 0x0000810c, 0x00000000 },
+    { 0x00008110, 0x00000168 },
+    { 0x00008118, 0x000100aa },
+    { 0x0000811c, 0x00003210 },
+    { 0x00008120, 0x08f04800 },
+    { 0x00008124, 0x00000000 },
+    { 0x00008128, 0x00000000 },
+    { 0x0000812c, 0x00000000 },
+    { 0x00008130, 0x00000000 },
+    { 0x00008134, 0x00000000 },
+    { 0x00008138, 0x00000000 },
+    { 0x0000813c, 0x00000000 },
+    { 0x00008144, 0x00000000 },
+    { 0x00008168, 0x00000000 },
+    { 0x0000816c, 0x00000000 },
+    { 0x00008170, 0x32143320 },
+    { 0x00008174, 0xfaa4fa50 },
+    { 0x00008178, 0x00000100 },
+    { 0x0000817c, 0x00000000 },
+    { 0x000081c4, 0x00000000 },
+    { 0x000081d0, 0x00003210 },
+    { 0x000081ec, 0x00000000 },
+    { 0x000081f0, 0x00000000 },
+    { 0x000081f4, 0x00000000 },
+    { 0x000081f8, 0x00000000 },
+    { 0x000081fc, 0x00000000 },
+    { 0x00008200, 0x00000000 },
+    { 0x00008204, 0x00000000 },
+    { 0x00008208, 0x00000000 },
+    { 0x0000820c, 0x00000000 },
+    { 0x00008210, 0x00000000 },
+    { 0x00008214, 0x00000000 },
+    { 0x00008218, 0x00000000 },
+    { 0x0000821c, 0x00000000 },
+    { 0x00008220, 0x00000000 },
+    { 0x00008224, 0x00000000 },
+    { 0x00008228, 0x00000000 },
+    { 0x0000822c, 0x00000000 },
+    { 0x00008230, 0x00000000 },
+    { 0x00008234, 0x00000000 },
+    { 0x00008238, 0x00000000 },
+    { 0x0000823c, 0x00000000 },
+    { 0x00008240, 0x00100000 },
+    { 0x00008244, 0x0010f400 },
+    { 0x00008248, 0x00000100 },
+    { 0x0000824c, 0x0001e800 },
+    { 0x00008250, 0x00000000 },
+    { 0x00008254, 0x00000000 },
+    { 0x00008258, 0x00000000 },
+    { 0x0000825c, 0x400000ff },
+    { 0x00008260, 0x00080922 },
+    { 0x00008270, 0x00000000 },
+    { 0x00008274, 0x40000000 },
+    { 0x00008278, 0x003e4180 },
+    { 0x0000827c, 0x00000000 },
+    { 0x00008284, 0x0000002c },
+    { 0x00008288, 0x0000002c },
+    { 0x0000828c, 0x00000000 },
+    { 0x00008294, 0x00000000 },
+    { 0x00008298, 0x00000000 },
+    { 0x00008300, 0x00000000 },
+    { 0x00008304, 0x00000000 },
+    { 0x00008308, 0x00000000 },
+    { 0x0000830c, 0x00000000 },
+    { 0x00008310, 0x00000000 },
+    { 0x00008314, 0x00000000 },
+    { 0x00008318, 0x00000000 },
+    { 0x00008328, 0x00000000 },
+    { 0x0000832c, 0x00000007 },
+    { 0x00008330, 0x00000302 },
+    { 0x00008334, 0x00000e00 },
+    { 0x00008338, 0x00000000 },
+    { 0x0000833c, 0x00000000 },
+    { 0x00008340, 0x000107ff },
+    { 0x00009808, 0x00000000 },
+    { 0x0000980c, 0xad848e19 },
+    { 0x00009810, 0x7d14e000 },
+    { 0x00009814, 0x9c0a9f6b },
+    { 0x0000981c, 0x00000000 },
+    { 0x0000982c, 0x0000a000 },
+    { 0x00009830, 0x00000000 },
+    { 0x0000983c, 0x00200400 },
+    { 0x00009840, 0x206a01ae },
+    { 0x0000984c, 0x1284233c },
+    { 0x00009854, 0x00000859 },
+    { 0x00009900, 0x00000000 },
+    { 0x00009904, 0x00000000 },
+    { 0x00009908, 0x00000000 },
+    { 0x0000990c, 0x00000000 },
+    { 0x0000991c, 0x10000fff },
+    { 0x00009920, 0x05100000 },
+    { 0x0000a920, 0x05100000 },
+    { 0x0000b920, 0x05100000 },
+    { 0x00009928, 0x00000001 },
+    { 0x0000992c, 0x00000004 },
+    { 0x00009934, 0x1e1f2022 },
+    { 0x00009938, 0x0a0b0c0d },
+    { 0x0000993c, 0x00000000 },
+    { 0x00009948, 0x9280b212 },
+    { 0x0000994c, 0x00020028 },
+    { 0x0000c95c, 0x004b6a8e },
+    { 0x0000c968, 0x000003ce },
+    { 0x00009970, 0x190fb515 },
+    { 0x00009974, 0x00000000 },
+    { 0x00009978, 0x00000001 },
+    { 0x0000997c, 0x00000000 },
+    { 0x00009980, 0x00000000 },
+    { 0x00009984, 0x00000000 },
+    { 0x00009988, 0x00000000 },
+    { 0x0000998c, 0x00000000 },
+    { 0x00009990, 0x00000000 },
+    { 0x00009994, 0x00000000 },
+    { 0x00009998, 0x00000000 },
+    { 0x0000999c, 0x00000000 },
+    { 0x000099a0, 0x00000000 },
+    { 0x000099a4, 0x00000001 },
+    { 0x000099a8, 0x201fff00 },
+    { 0x000099ac, 0x006f0000 },
+    { 0x000099b0, 0x03051000 },
+    { 0x000099dc, 0x00000000 },
+    { 0x000099e0, 0x00000200 },
+    { 0x000099e4, 0xaaaaaaaa },
+    { 0x000099e8, 0x3c466478 },
+    { 0x000099ec, 0x0cc80caa },
+    { 0x000099fc, 0x00001042 },
+    { 0x00009b00, 0x00000000 },
+    { 0x00009b04, 0x00000001 },
+    { 0x00009b08, 0x00000002 },
+    { 0x00009b0c, 0x00000003 },
+    { 0x00009b10, 0x00000004 },
+    { 0x00009b14, 0x00000005 },
+    { 0x00009b18, 0x00000008 },
+    { 0x00009b1c, 0x00000009 },
+    { 0x00009b20, 0x0000000a },
+    { 0x00009b24, 0x0000000b },
+    { 0x00009b28, 0x0000000c },
+    { 0x00009b2c, 0x0000000d },
+    { 0x00009b30, 0x00000010 },
+    { 0x00009b34, 0x00000011 },
+    { 0x00009b38, 0x00000012 },
+    { 0x00009b3c, 0x00000013 },
+    { 0x00009b40, 0x00000014 },
+    { 0x00009b44, 0x00000015 },
+    { 0x00009b48, 0x00000018 },
+    { 0x00009b4c, 0x00000019 },
+    { 0x00009b50, 0x0000001a },
+    { 0x00009b54, 0x0000001b },
+    { 0x00009b58, 0x0000001c },
+    { 0x00009b5c, 0x0000001d },
+    { 0x00009b60, 0x00000020 },
+    { 0x00009b64, 0x00000021 },
+    { 0x00009b68, 0x00000022 },
+    { 0x00009b6c, 0x00000023 },
+    { 0x00009b70, 0x00000024 },
+    { 0x00009b74, 0x00000025 },
+    { 0x00009b78, 0x00000028 },
+    { 0x00009b7c, 0x00000029 },
+    { 0x00009b80, 0x0000002a },
+    { 0x00009b84, 0x0000002b },
+    { 0x00009b88, 0x0000002c },
+    { 0x00009b8c, 0x0000002d },
+    { 0x00009b90, 0x00000030 },
+    { 0x00009b94, 0x00000031 },
+    { 0x00009b98, 0x00000032 },
+    { 0x00009b9c, 0x00000033 },
+    { 0x00009ba0, 0x00000034 },
+    { 0x00009ba4, 0x00000035 },
+    { 0x00009ba8, 0x00000035 },
+    { 0x00009bac, 0x00000035 },
+    { 0x00009bb0, 0x00000035 },
+    { 0x00009bb4, 0x00000035 },
+    { 0x00009bb8, 0x00000035 },
+    { 0x00009bbc, 0x00000035 },
+    { 0x00009bc0, 0x00000035 },
+    { 0x00009bc4, 0x00000035 },
+    { 0x00009bc8, 0x00000035 },
+    { 0x00009bcc, 0x00000035 },
+    { 0x00009bd0, 0x00000035 },
+    { 0x00009bd4, 0x00000035 },
+    { 0x00009bd8, 0x00000035 },
+    { 0x00009bdc, 0x00000035 },
+    { 0x00009be0, 0x00000035 },
+    { 0x00009be4, 0x00000035 },
+    { 0x00009be8, 0x00000035 },
+    { 0x00009bec, 0x00000035 },
+    { 0x00009bf0, 0x00000035 },
+    { 0x00009bf4, 0x00000035 },
+    { 0x00009bf8, 0x00000010 },
+    { 0x00009bfc, 0x0000001a },
+    { 0x0000a210, 0x40806333 },
+    { 0x0000a214, 0x00106c10 },
+    { 0x0000a218, 0x009c4060 },
+    { 0x0000a220, 0x018830c6 },
+    { 0x0000a224, 0x00000400 },
+    { 0x0000a228, 0x001a0bb5 },
+    { 0x0000a22c, 0x00000000 },
+    { 0x0000a234, 0x20202020 },
+    { 0x0000a238, 0x20202020 },
+    { 0x0000a23c, 0x13c889af },
+    { 0x0000a240, 0x38490a20 },
+    { 0x0000a244, 0x00007bb6 },
+    { 0x0000a248, 0x0fff3ffc },
+    { 0x0000a24c, 0x00000001 },
+    { 0x0000a250, 0x0000e000 },
+    { 0x0000a254, 0x00000000 },
+    { 0x0000a258, 0x0cc75380 },
+    { 0x0000a25c, 0x0f0f0f01 },
+    { 0x0000a260, 0xdfa91f01 },
+    { 0x0000a268, 0x00000001 },
+    { 0x0000a26c, 0x0ebae9c6 },
+    { 0x0000b26c, 0x0ebae9c6 },
+    { 0x0000c26c, 0x0ebae9c6 },
+    { 0x0000d270, 0x00820820 },
+    { 0x0000a278, 0x1ce739ce },
+    { 0x0000a27c, 0x050701ce },
+    { 0x0000a338, 0x00000000 },
+    { 0x0000a33c, 0x00000000 },
+    { 0x0000a340, 0x00000000 },
+    { 0x0000a344, 0x00000000 },
+    { 0x0000a348, 0x3fffffff },
+    { 0x0000a34c, 0x3fffffff },
+    { 0x0000a350, 0x3fffffff },
+    { 0x0000a354, 0x0003ffff },
+    { 0x0000a358, 0x79a8aa33 },
+    { 0x0000d35c, 0x07ffffef },
+    { 0x0000d360, 0x0fffffe7 },

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

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 12:52: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 DD6B5106566C;
	Thu, 28 Apr 2011 12:52:01 +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 CA4E98FC0A;
	Thu, 28 Apr 2011 12:52: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 p3SCq1xi023727;
	Thu, 28 Apr 2011 12:52:01 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SCq1vm023725;
	Thu, 28 Apr 2011 12:52:01 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104281252.p3SCq1vm023725@svn.freebsd.org>
From: Adrian Chadd 
Date: Thu, 28 Apr 2011 12:52: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: r221164 - head/sys/mips/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, 28 Apr 2011 12:52:02 -0000

Author: adrian
Date: Thu Apr 28 12:52:01 2011
New Revision: 221164
URL: http://svn.freebsd.org/changeset/base/221164

Log:
  Re-enable the wireless build parameters for the AR9130 WMAC.
  
  * enable 11n
  * add ath_ahb so the AHB<->ath glue is linked in
  * disable descriptor order swapping, it isn't needed here
  * disable interrupt mitigation, it isn't supported here

Modified:
  head/sys/mips/conf/AR91XX_BASE

Modified: head/sys/mips/conf/AR91XX_BASE
==============================================================================
--- head/sys/mips/conf/AR91XX_BASE	Thu Apr 28 12:47:40 2011	(r221163)
+++ head/sys/mips/conf/AR91XX_BASE	Thu Apr 28 12:52:01 2011	(r221164)
@@ -49,24 +49,27 @@ options         UFS_DIRHASH             
 options		IEEE80211_DEBUG
 options		IEEE80211_SUPPORT_MESH
 options		IEEE80211_SUPPORT_TDMA
-#device		wlan            # 802.11 support
-#device		wlan_wep        # 802.11 WEP support
-#device		wlan_ccmp       # 802.11 CCMP support
-#device		wlan_tkip       # 802.11 TKIP support
-#device		wlan_xauth	# 802.11 hostap support
+device		wlan            # 802.11 support
+device		wlan_wep        # 802.11 WEP support
+device		wlan_ccmp       # 802.11 CCMP support
+device		wlan_tkip       # 802.11 TKIP support
+device		wlan_xauth	# 802.11 hostap support
 
 # This will come later -adrian
-#device		ath             # Atheros pci/cardbus NIC's
+device		ath             # Atheros pci/cardbus NIC's
+device		ath_rate_sample
+device		ath_ahb
 options 	ATH_DEBUG
 options		ATH_DIAGAPI
+option		ATH_ENABLE_11N
+
+device		ath_hal
+
 options		AH_DEBUG
-#device		ath_hal
 option		AH_SUPPORT_AR5416
-option		AH_RXCFG_SDMAMW_4BYTES  # See NOTES for details of this WAR
-option		AH_NEED_DESC_SWAP	# ?
-#device		ath_rate_sample
-#device		ath_ahb
-option		AH_AR5416_INTERRUPT_MITIGATION
+option		AH_SUPPORT_AR9130	# Makes other chipsets not function!
+# interrupt mitigation not possible on AR9130
+# option		AH_AR5416_INTERRUPT_MITIGATION
 
 device		mii
 device		arge

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14: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 5C3D1106564A;
	Thu, 28 Apr 2011 14:01:24 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A19F8FC15;
	Thu, 28 Apr 2011 14: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 p3SE1OIE025936;
	Thu, 28 Apr 2011 14:01:24 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SE1ObL025934;
	Thu, 28 Apr 2011 14:01:24 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201104281401.p3SE1ObL025934@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 28 Apr 2011 14:01:24 +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: r221165 - 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: Thu, 28 Apr 2011 14:01:24 -0000

Author: gnn
Date: Thu Apr 28 14:01:23 2011
New Revision: 221165
URL: http://svn.freebsd.org/changeset/base/221165

Log:
  Add myself to the list in order to commit the latest Exar driver (vxge).
  
  Alphabetize the current list.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==============================================================================
--- svnadmin/conf/sizelimit.conf	Thu Apr 28 12:52:01 2011	(r221164)
+++ svnadmin/conf/sizelimit.conf	Thu Apr 28 14:01:23 2011	(r221165)
@@ -17,19 +17,20 @@
 #peter 3141592
 #grog
 #kan
+#lulf
 brooks
 des
+dim
 ed
+gnn
+gonzo
 imp
+jb
+jeff
+kmacy
 lstewart
-#lulf
 obrien
-thompsa
-sam
 rpaulo
 rwatson
-gonzo
-kmacy
-jb
-jeff
-dim
+sam
+thompsa

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:27: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 A4376106572F;
	Thu, 28 Apr 2011 14:27:17 +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 911258FC12;
	Thu, 28 Apr 2011 14:27: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 p3SERHfv026826;
	Thu, 28 Apr 2011 14:27:17 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SERHo1026817;
	Thu, 28 Apr 2011 14:27:17 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281427.p3SERHo1026817@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 14:27: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: r221166 - in head/sys: fs/ext2fs modules/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:27:17 -0000

Author: jhb
Date: Thu Apr 28 14:27:17 2011
New Revision: 221166
URL: http://svn.freebsd.org/changeset/base/221166

Log:
  Sync with several changes in UFS/FFS:
  - 77115: Implement support for O_DIRECT.
  - 98425: Fix a performance issue introduced in 70131 that was causing
    reads before writes even when writing full blocks.
  - 98658: Rename the BALLOC flags from B_* to BA_* to avoid confusion with
    the struct buf B_ flags.
  - 100344: Merge the BA_ and IO_ flags so so that they may both be used in
    the same flags word. This merger is possible by assigning the IO_ flags
    to the low sixteen bits and the BA_ flags the high sixteen bits.
  - 105422: Fix a file-rewrite performance case.
  - 129545: Implement IO_INVAL in VOP_WRITE() by marking the buffer as
    "no cache".
  - Readd the DOINGASYNC() macro and use it to control asynchronous writes.
    Change i-node updates to honor DOINGASYNC() instead of always being
    synchronous.
  - Use a PRIV_VFS_RETAINSUGID check instead of checking cr_uid against 0
    directly when deciding whether or not to clear suid and sgid bits.
  
  Submitted by:	Pedro F. Giffuni  giffunip at yahoo

Modified:
  head/sys/fs/ext2fs/ext2_balloc.c
  head/sys/fs/ext2fs/ext2_extern.h
  head/sys/fs/ext2fs/ext2_inode.c
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_readwrite.c
  head/sys/fs/ext2fs/ext2_vnops.c
  head/sys/fs/ext2fs/inode.h
  head/sys/modules/ext2fs/Makefile

Modified: head/sys/fs/ext2fs/ext2_balloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_balloc.c	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_balloc.c	Thu Apr 28 14:27:17 2011	(r221166)
@@ -41,7 +41,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -143,7 +143,7 @@ ext2_balloc(ip, lbn, size, cred, bpp, fl
 				return (error);
 			bp = getblk(vp, lbn, nsize, 0, 0, 0);
 			bp->b_blkno = fsbtodb(fs, newb);
-			if (flags & B_CLRBUF)
+			if (flags & BA_CLRBUF)
 				vfs_bio_clrbuf(bp);
 		}
 		ip->i_db[lbn] = dbtofsb(fs, bp->b_blkno);
@@ -235,7 +235,7 @@ ext2_balloc(ip, lbn, size, cred, bpp, fl
 		 * If required, write synchronously, otherwise use
 		 * delayed write.
 		 */
-		if (flags & B_SYNC) {
+		if (flags & IO_SYNC) {
 			bwrite(bp);
 		} else {
 			if (bp->b_bufsize == fs->e2fs_bsize)
@@ -258,14 +258,14 @@ ext2_balloc(ip, lbn, size, cred, bpp, fl
 		nb = newb;
 		nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0);
 		nbp->b_blkno = fsbtodb(fs, nb);
-		if (flags & B_CLRBUF)
+		if (flags & BA_CLRBUF)
 			vfs_bio_clrbuf(nbp);
 		bap[indirs[i].in_off] = nb;
 		/*
 		 * If required, write synchronously, otherwise use
 		 * delayed write.
 		 */
-		if (flags & B_SYNC) {
+		if (flags & IO_SYNC) {
 			bwrite(bp);
 		} else {
 		if (bp->b_bufsize == fs->e2fs_bsize)
@@ -276,8 +276,15 @@ ext2_balloc(ip, lbn, size, cred, bpp, fl
 		return (0);
 	}
 	brelse(bp);
-	if (flags & B_CLRBUF) {
-		error = bread(vp, lbn, (int)fs->e2fs_bsize, NOCRED, &nbp);
+	if (flags & BA_CLRBUF) {
+		int seqcount = (flags & BA_SEQMASK) >> BA_SEQSHIFT;
+		if (seqcount && (vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) {
+			error = cluster_read(vp, ip->i_size, lbn,
+			    (int)fs->e2fs_bsize, NOCRED,
+			    MAXBSIZE, seqcount, &nbp);
+		} else {
+			error = bread(vp, lbn, (int)fs->e2fs_bsize, NOCRED, &nbp);
+		}
 		if (error) {
 			brelse(nbp);
 			return (error);

Modified: head/sys/fs/ext2fs/ext2_extern.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_extern.h	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_extern.h	Thu Apr 28 14:27:17 2011	(r221166)
@@ -81,11 +81,13 @@ int	ext2_checkpath(struct inode *, struc
 int	cg_has_sb(int i);
 int	ext2_inactive(struct vop_inactive_args *);
 
-/* Flags to low-level allocation routines. */
-#define B_CLRBUF	0x01	/* Request allocated buffer be cleared. */
-#define B_SYNC		0x02	/* Do all allocations synchronously. */
-#define B_METAONLY	0x04	/* Return indirect block buffer. */
-#define B_NOWAIT	0x08	/* do not sleep to await lock */
+/* Flags to low-level allocation routines.
+ * The low 16-bits are reserved for IO_ flags from vnode.h.
+ */
+#define	BA_CLRBUF	0x00010000	/* Clear invalid areas of buffer. */
+#define	BA_SEQMASK	0x7F000000	/* Bits holding seq heuristic. */
+#define	BA_SEQSHIFT	24
+#define	BA_SEQMAX	0x7F
 
 extern struct vop_vector ext2_vnodeops;
 extern struct vop_vector ext2_fifoops;

Modified: head/sys/fs/ext2fs/ext2_inode.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode.c	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_inode.c	Thu Apr 28 14:27:17 2011	(r221166)
@@ -92,7 +92,7 @@ ext2_update(vp, waitfor)
 	}
 	ext2_i2ei(ip, (struct ext2fs_dinode *)((char *)bp->b_data +
 	    EXT2_INODE_SIZE(fs) * ino_to_fsbo(fs, ip->i_number)));
-	if (waitfor && (vp->v_mount->mnt_kern_flag & MNTK_ASYNC) == 0)
+	if (waitfor && !DOINGASYNC(vp))
 		return (bwrite(bp));
 	else {
 		bdwrite(bp);
@@ -125,7 +125,7 @@ ext2_truncate(vp, length, flags, cred, t
 	struct buf *bp;
 	int offset, size, level;
 	long count, nblocks, blocksreleased = 0;
-	int aflags, error, i, allerror;
+	int error, i, allerror;
 	off_t osize;
 
 	oip = VTOI(ovp);
@@ -164,10 +164,8 @@ ext2_truncate(vp, length, flags, cred, t
 		vnode_pager_setsize(ovp, length);
 		offset = blkoff(fs, length - 1);
 		lbn = lblkno(fs, length - 1);
-		aflags = B_CLRBUF;
-		if (flags & IO_SYNC)
-			aflags |= B_SYNC;
-		error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, aflags);
+		flags |= BA_CLRBUF;
+		error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, flags);
 		if (error) {
 			vnode_pager_setsize(vp, osize);
 			return (error);
@@ -175,9 +173,9 @@ ext2_truncate(vp, length, flags, cred, t
 		oip->i_size = length;
 		if (bp->b_bufsize == fs->e2fs_bsize)
 			bp->b_flags |= B_CLUSTEROK;
-		if (aflags & B_SYNC)
+		if (flags & IO_SYNC)
 			bwrite(bp);
-		else if (ovp->v_mount->mnt_flag & MNT_ASYNC)
+		else if (DOINGASYNC(ovp))
 			bdwrite(bp);
 		else
 			bawrite(bp);
@@ -197,10 +195,8 @@ ext2_truncate(vp, length, flags, cred, t
 		oip->i_size = length;
 	} else {
 		lbn = lblkno(fs, length);
-		aflags = B_CLRBUF;
-		if (flags & IO_SYNC)
-			aflags |= B_SYNC;
-		error = ext2_balloc(oip, lbn, offset, cred, &bp, aflags);
+		flags |= BA_CLRBUF;
+		error = ext2_balloc(oip, lbn, offset, cred, &bp, flags);
 		if (error)
 			return (error);
 		oip->i_size = length;
@@ -209,9 +205,9 @@ ext2_truncate(vp, length, flags, cred, t
 		allocbuf(bp, size);
 		if (bp->b_bufsize == fs->e2fs_bsize)
 			bp->b_flags |= B_CLUSTEROK;
-		if (aflags & B_SYNC)
+		if (flags & IO_SYNC)
 			bwrite(bp);
-		else if (ovp->v_mount->mnt_flag & MNT_ASYNC)
+		else if (DOINGASYNC(ovp))
 			bdwrite(bp);
 		else
 			bawrite(bp);

Modified: head/sys/fs/ext2fs/ext2_lookup.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_lookup.c	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_lookup.c	Thu Apr 28 14:27:17 2011	(r221166)
@@ -890,7 +890,12 @@ ext2_direnter(ip, dvp, cnp)
 		ep = (struct ext2fs_direct_2 *)((char *)ep + dsize);
 	}
 	bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize);
-	error = bwrite(bp);
+	if (DOINGASYNC(dvp)) {
+		bdwrite(bp);
+		error = 0;
+	} else {
+		error = bwrite(bp);
+	}
 	dp->i_flag |= IN_CHANGE | IN_UPDATE;
 	if (!error && dp->i_endoff && dp->i_endoff < dp->i_size)
 		error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC,
@@ -947,7 +952,10 @@ ext2_dirremove(dvp, cnp)
 	else
 		rep = (struct ext2fs_direct_2 *)((char *)ep + ep->e2d_reclen);
 	ep->e2d_reclen += rep->e2d_reclen;
-	error = bwrite(bp);
+	if (DOINGASYNC(dvp) && dp->i_count != 0)
+		bdwrite(bp);
+	else
+		error = bwrite(bp);
 	dp->i_flag |= IN_CHANGE | IN_UPDATE;
 	return (error);
 }

Modified: head/sys/fs/ext2fs/ext2_readwrite.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 14:27:17 2011	(r221166)
@@ -45,6 +45,15 @@
 #define	WRITE			ext2_write
 #define	WRITE_S			"ext2_write"
 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "opt_directio.h"
+
 /*
  * Vnode op for reading.
  */
@@ -66,15 +75,16 @@ READ(ap)
 	off_t bytesinfile;
 	long size, xfersize, blkoffset;
 	int error, orig_resid, seqcount;
-	seqcount = ap->a_ioflag >> IO_SEQSHIFT;
-	u_short mode;
+	int ioflag;
 
 	vp = ap->a_vp;
-	ip = VTOI(vp);
-	mode = ip->i_mode;
 	uio = ap->a_uio;
+	ioflag = ap->a_ioflag;
 
-#ifdef DIAGNOSTIC
+	seqcount = ap->a_ioflag >> IO_SEQSHIFT;
+	ip = VTOI(vp);
+
+#ifdef INVARIANTS
 	if (uio->uio_rw != UIO_READ)
 		panic("%s: mode", READ_S);
 
@@ -90,8 +100,10 @@ READ(ap)
 		return (0);
 	KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
 	fs = ip->I_FS;
-	if (uio->uio_offset < ip->i_size && uio->uio_offset >= fs->e2fs_maxfilesize)
-		return (EOVERFLOW);
+	if (uio->uio_offset < ip->i_size &&
+	    uio->uio_offset >= fs->e2fs_maxfilesize)
+	    	return (EOVERFLOW);
+
 	for (error = 0, bp = NULL; uio->uio_resid > 0; bp = NULL) {
 		if ((bytesinfile = ip->i_size - uio->uio_offset) <= 0)
 			break;
@@ -109,8 +121,8 @@ READ(ap)
 		if (lblktosize(fs, nextlbn) >= ip->i_size)
 			error = bread(vp, lbn, size, NOCRED, &bp);
 		else if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0)
-		error = cluster_read(vp, ip->i_size, lbn, size,
-  			NOCRED, blkoffset + uio->uio_resid, seqcount, &bp);
+			error = cluster_read(vp, ip->i_size, lbn, size,
+			    NOCRED, blkoffset + uio->uio_resid, seqcount, &bp);
 		else if (seqcount > 1) {
 			int nextsize = BLKSIZE(fs, ip, nextlbn);
 			error = breadn(vp, lbn,
@@ -124,6 +136,15 @@ READ(ap)
 		}
 
 		/*
+		 * If IO_DIRECT then set B_DIRECT for the buffer.  This
+		 * will cause us to attempt to release the buffer later on
+		 * and will cause the buffer cache to attempt to free the
+		 * underlying pages.
+		 */
+		if (ioflag & IO_DIRECT)
+			bp->b_flags |= B_DIRECT;
+
+		/*
 		 * We should only get non-zero b_resid when an I/O error
 		 * has occurred, which should cause us to break above.
 		 * However, if the short read did not cause an error,
@@ -141,10 +162,42 @@ READ(ap)
 		if (error)
 			break;
 
-		bqrelse(bp);
+		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
+		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+			/*
+			 * If there are no dependencies, and it's VMIO,
+			 * then we don't need the buf, mark it available
+			 * for freeing. The VM has the data.
+			 */
+			bp->b_flags |= B_RELBUF;
+			brelse(bp);
+		} else {
+			/*
+			 * Otherwise let whoever
+			 * made the request take care of
+			 * freeing it. We just queue
+			 * it onto another list.
+			 */
+			bqrelse(bp);
+		}
+	}
+
+	/* 
+	 * This can only happen in the case of an error
+	 * because the loop above resets bp to NULL on each iteration
+	 * and on normal completion has not set a new value into it.
+	 * so it must have come from a 'break' statement
+	 */
+	if (bp != NULL) {
+		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
+		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+			bp->b_flags |= B_RELBUF;
+			brelse(bp);
+		} else {
+			bqrelse(bp);
+		}
 	}
-	if (bp != NULL)
-		bqrelse(bp);
+
 	if ((error == 0 || uio->uio_resid != orig_resid) &&
 	    (vp->v_mount->mnt_flag & MNT_NOATIME) == 0)
 		ip->i_flag |= IN_ACCESS;
@@ -173,12 +226,13 @@ WRITE(ap)
 	int blkoffset, error, flags, ioflag, resid, size, seqcount, xfersize;
 
 	ioflag = ap->a_ioflag;
-	seqcount = ioflag >> IO_SEQSHIFT;
 	uio = ap->a_uio;
 	vp = ap->a_vp;
+
+	seqcount = ioflag >> IO_SEQSHIFT;
 	ip = VTOI(vp);
 
-#ifdef DIAGNOSTIC
+#ifdef INVARIANTS
 	if (uio->uio_rw != UIO_WRITE)
 		panic("%s: mode", WRITE_S);
 #endif
@@ -217,7 +271,12 @@ WRITE(ap)
 
 	resid = uio->uio_resid;
 	osize = ip->i_size;
-	flags = ioflag & IO_SYNC ? B_SYNC : 0;
+	if (seqcount > BA_SEQMAX)
+		flags = BA_SEQMAX << BA_SEQSHIFT;
+	else
+		flags = seqcount << BA_SEQSHIFT;
+	if ((ioflag & IO_SYNC) && !DOINGASYNC(vp))
+		flags |= IO_SYNC;
 
 	for (error = 0; uio->uio_resid > 0;) {
 		lbn = lblkno(fs, uio->uio_offset);
@@ -228,17 +287,30 @@ WRITE(ap)
 		if (uio->uio_offset + xfersize > ip->i_size)
 			vnode_pager_setsize(vp, uio->uio_offset + xfersize);
 
-		/*
-		 * Avoid a data-consistency race between write() and mmap()
-		 * by ensuring that newly allocated blocks are zeroed. The
-		 * race can occur even in the case where the write covers
-		 * the entire block.
-		 */
-		flags |= B_CLRBUF;
+                /*
+		 * We must perform a read-before-write if the transfer size
+		 * does not cover the entire buffer.
+                 */
+		if (fs->e2fs_bsize > xfersize)
+			flags |= BA_CLRBUF;
+		else
+			flags &= ~BA_CLRBUF;
 		error = ext2_balloc(ip, lbn, blkoffset + xfersize,
-			ap->a_cred, &bp, flags);
+		    ap->a_cred, &bp, flags);
 		if (error != 0)
 			break;
+
+		/*
+		 * If the buffer is not valid and we did not clear garbage
+		 * out above, we have to do so here even though the write
+		 * covers the entire buffer in order to avoid a mmap()/write
+		 * race where another process may see the garbage prior to
+		 * the uiomove() for a write replacing it.
+		 */
+		if ((bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize <= xfersize)
+			vfs_bio_clrbuf(bp);
+		if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
+			bp->b_flags |= B_NOCACHE;
 		if (uio->uio_offset + xfersize > ip->i_size)
 			ip->i_size = uio->uio_offset + xfersize;
 		size = BLKSIZE(fs, ip, lbn) - bp->b_resid;
@@ -247,12 +319,25 @@ WRITE(ap)
 
 		error =
 		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
-		if ((ioflag & IO_VMIO) &&
-		   LIST_FIRST(&bp->b_dep) == NULL) /* in ext2fs? */
+		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
+		   (LIST_EMPTY(&bp->b_dep))) {	/* in ext2fs? */
 			bp->b_flags |= B_RELBUF;
+		}
 
+		/*
+		 * If IO_SYNC each buffer is written synchronously.  Otherwise
+		 * if we have a severe page deficiency write the buffer
+		 * asynchronously.  Otherwise try to cluster, and if that
+		 * doesn't do it then either do an async write (if O_DIRECT),
+		 * or a delayed write (if not).
+		 */
 		if (ioflag & IO_SYNC) {
 			(void)bwrite(bp);
+		} else if (vm_page_count_severe() ||
+		    buf_dirty_count_severe() ||
+		    (ioflag & IO_ASYNC)) {
+			bp->b_flags |= B_CLUSTEROK;
+			bawrite(bp);
 		} else if (xfersize + blkoffset == fs->e2fs_fsize) {
 			if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
 				bp->b_flags |= B_CLUSTEROK;
@@ -260,6 +345,9 @@ WRITE(ap)
 			} else {
 				bawrite(bp);
 			}
+		} else if (ioflag & IO_DIRECT) {
+			bp->b_flags |= B_CLUSTEROK;
+			bawrite(bp);
 		} else {
 			bp->b_flags |= B_CLUSTEROK;
 			bdwrite(bp);
@@ -271,18 +359,13 @@ WRITE(ap)
 	 * If we successfully wrote any data, and we are not the superuser
 	 * we clear the setuid and setgid bits as a precaution against
 	 * tampering.
-	 * XXX too late, the tamperer may have opened the file while we
-	 * were writing the data (or before).
-	 * XXX too early, if (error && ioflag & IO_UNIT) then we will
-	 * unwrite the data.
 	 */
-	if (resid > uio->uio_resid && ap->a_cred && ap->a_cred->cr_uid != 0)
-		ip->i_mode &= ~(ISUID | ISGID);
+	if ((ip->i_mode & (ISUID | ISGID)) && resid > uio->uio_resid &&
+	    ap->a_cred) {
+		if (priv_check_cred(ap->a_cred, PRIV_VFS_RETAINSUGID, 0))
+			ip->i_mode &= ~(ISUID | ISGID);
+	}
 	if (error) {
-                /*
-                 * XXX should truncate to the last successfully written
-                 * data if the uiomove() failed.
-                 */
 		if (ioflag & IO_UNIT) {
 			(void)ext2_truncate(vp, osize,
 			    ioflag & IO_SYNC, ap->a_cred, uio->uio_td);

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Thu Apr 28 14:27:17 2011	(r221166)
@@ -738,7 +738,7 @@ ext2_link(ap)
 	}
 	ip->i_nlink++;
 	ip->i_flag |= IN_CHANGE;
-	error = ext2_update(vp, 1);
+	error = ext2_update(vp, !DOINGASYNC(vp));
 	if (!error)
 		error = ext2_direnter(ip, tdvp, cnp);
 	if (error) {
@@ -884,7 +884,7 @@ abortit:
 	 */
 	ip->i_nlink++;
 	ip->i_flag |= IN_CHANGE;
-	if ((error = ext2_update(fvp, 1)) != 0) {
+	if ((error = ext2_update(fvp, !DOINGASYNC(fvp))) != 0) {
 		VOP_UNLOCK(fvp, 0);
 		goto bad;
 	}
@@ -943,7 +943,7 @@ abortit:
 			}
 			dp->i_nlink++;
 			dp->i_flag |= IN_CHANGE;
-			error = ext2_update(tdvp, 1);
+			error = ext2_update(tdvp, !DOINGASYNC(tdvp));
 			if (error)
 				goto bad;
 		}
@@ -1211,7 +1211,7 @@ ext2_mkdir(ap)
 	 */
 	dp->i_nlink++;
 	dp->i_flag |= IN_CHANGE;
-	error = ext2_update(dvp, 1);
+	error = ext2_update(dvp, !DOINGASYNC(dvp));
 	if (error)
 		goto bad;
 
@@ -1655,7 +1655,7 @@ ext2_makeinode(mode, dvp, vpp, cnp)
 	/*
 	 * Make sure inode goes to disk before directory entry.
 	 */
-	error = ext2_update(tvp, 1);
+	error = ext2_update(tvp, !DOINGASYNC(tvp));
 	if (error)
 		goto bad;
 	error = ext2_direnter(ip, dvp, cnp);

Modified: head/sys/fs/ext2fs/inode.h
==============================================================================
--- head/sys/fs/ext2fs/inode.h	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/fs/ext2fs/inode.h	Thu Apr 28 14:27:17 2011	(r221166)
@@ -158,6 +158,9 @@ struct indir {
 #define VTOI(vp)	((struct inode *)(vp)->v_data)
 #define ITOV(ip)	((ip)->i_vnode)
 
+/* Check whether the MNTK_ASYNC flag has been set for a mount point */
+#define DOINGASYNC(vp)		((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC)
+
 /* This overlays the fid structure (see mount.h). */
 struct ufid {
 	uint16_t ufid_len;	/* Length of structure. */

Modified: head/sys/modules/ext2fs/Makefile
==============================================================================
--- head/sys/modules/ext2fs/Makefile	Thu Apr 28 14:01:23 2011	(r221165)
+++ head/sys/modules/ext2fs/Makefile	Thu Apr 28 14:27:17 2011	(r221166)
@@ -2,7 +2,7 @@
 
 .PATH:	${.CURDIR}/../../fs/ext2fs
 KMOD=	ext2fs
-SRCS=	opt_ddb.h opt_quota.h opt_suiddir.h vnode_if.h \
+SRCS=	opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \
 	ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_inode.c \
 	ext2_inode_cnv.c ext2_lookup.c ext2_subr.c ext2_vfsops.c \
 	ext2_vnops.c

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:33: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 4527710656B5;
	Thu, 28 Apr 2011 14:33:16 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2F7558FC13;
	Thu, 28 Apr 2011 14:33: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 p3SEXGKM027099;
	Thu, 28 Apr 2011 14:33:16 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEXGhh027089;
	Thu, 28 Apr 2011 14:33:16 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201104281433.p3SEXGhh027089@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 28 Apr 2011 14:33: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: r221167 - in head: share/man/man4 sys/conf sys/dev/vxge
	sys/dev/vxge/include sys/dev/vxge/vxgehal sys/modules/vxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:33:16 -0000

Author: gnn
Date: Thu Apr 28 14:33:15 2011
New Revision: 221167
URL: http://svn.freebsd.org/changeset/base/221167

Log:
  Exar driver for X3100 10GbE Server/Storage adapters
  
  Features: Jumbo frames (up to 9600), LRO (Large Receive Offload),
            TSO (TCP segmentation offload), RTH (Receive Traffic Hash).
  
  Submitted by: Sriram Rapuru at Exar
  MFC after:	2 weeks

Added:
  head/share/man/man4/vxge.4   (contents, props changed)
  head/sys/dev/vxge/
  head/sys/dev/vxge/LICENSE   (contents, props changed)
  head/sys/dev/vxge/README   (contents, props changed)
  head/sys/dev/vxge/include/
  head/sys/dev/vxge/include/build-version.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-debug.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-defs.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-list.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-os-debug.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-os-pal.h   (contents, props changed)
  head/sys/dev/vxge/include/vxge-queue.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-config.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-ll.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-mgmt.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-mgmtaux.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-stats.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-status.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-types.h   (contents, props changed)
  head/sys/dev/vxge/include/vxgehal-version.h   (contents, props changed)
  head/sys/dev/vxge/vxge-firmware.h   (contents, props changed)
  head/sys/dev/vxge/vxge-osdep.h   (contents, props changed)
  head/sys/dev/vxge/vxge.c   (contents, props changed)
  head/sys/dev/vxge/vxge.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/
  head/sys/dev/vxge/vxgehal/vxge-queue.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-blockpool.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-blockpool.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-channel.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-channel.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-common-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-config-priv.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-config.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-debug.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-device.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-device.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-doorbells.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-doorbells.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-driver.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-driver.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-fifo.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-fifo.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ifmsg.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ifmsg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-legacy-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-memrepair-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mgmt.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mgmtaux.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mm.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mm.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-mrpcim.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-pcicfgmgmt-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-regdefs.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-regs.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ring.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-ring.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-srpcim.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-swapper.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-swapper.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-toc-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-virtualpath.c   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-virtualpath.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-vpath-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal-vpmgmt-reg.h   (contents, props changed)
  head/sys/dev/vxge/vxgehal/vxgehal.h   (contents, props changed)
  head/sys/dev/vxge/vxgell-version.h   (contents, props changed)
  head/sys/modules/vxge/
  head/sys/modules/vxge/Makefile   (contents, props changed)
Modified:
  head/sys/conf/NOTES
  head/sys/conf/files

Added: head/share/man/man4/vxge.4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man4/vxge.4	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,111 @@
+.\" Copyright (c) 2002-2011 Exar Corp.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer as
+.\"    the first lines of this file unmodified.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 16, 2011
+.Dt VXGE 1
+.Os
+.Sh NAME
+.Nm vxge
+.Nd "Neterion X3100 10GbE Server/Storage adapter driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following line in your
+kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "device vxge"
+.Ed
+.Pp
+Alternatively, to load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+if_vxge_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for Neterion X3100 adapters.
+The driver supports TCP Segmentation Offload (TSO/LSO), 
+Large Receive Offlaod (LRO), Jumbo Frames, Receive Traffic Hash (RTH),
+VLAN, Promiscuous mode and Multi function mode.
+.Pp
+
+The
+.Nm
+driver supports following function modes:
+.Bd -ragged -offset indent
+.Cd "SF1_VP17 - 1 function with 17 VPATHs"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8_VP2 - 8 functions with 2 VPATHs per function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF2_VP8 - 2 functions, 8 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF4_VP4 - 4 Functions, 4 Paths/Function"
+.Ed
+.Bd -ragged -offset indent
+.Cd "MF8P_VP2 - 8 functions with 2 VPATHs per function required for DirectIO"
+.Ed
+.Pp
+For general information and support, please visit the Neterion support page
+.Pa http://www.neterion.com/support/support.html .
+.Pp
+Support for Jumbo Frames is provided via the interface MTU setting.
+Selecting an MTU larger than 1500 bytes with the
+.Xr ifconfig 8
+utility configures the adapter to transmit and receive Jumbo Frames.
+X3100 adapters support Jumbo Frames up to 9600 bytes.
+.Pp
+For Jumbo Frames, the driver will try to allocate physically contiguous buffers.
+Failures to do so may degrade the performance.
+To resolve such problems, please visit
+.Pa http://www.neterion.com
+where additional information and a kernel patch can be found.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Neterion X3100 10 Gigabit Ethernet adapters listed in
+.Pa http://www.neterion.com .
+.Sh SUPPORT
+For troubleshooting tips and FAQs, please visit
+.Pa http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous .
+.Pp
+For any issues please send an email to
+.Aq support@neterion.com .
+.Sh SEE ALSO
+.Xr arp 8 ,
+.Xr ifconfig 8
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Neterion
+.Aq support@neterion.com .

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Thu Apr 28 14:27:17 2011	(r221166)
+++ head/sys/conf/NOTES	Thu Apr 28 14:33:15 2011	(r221167)
@@ -2094,6 +2094,7 @@ device		nxge		# Neterion Xframe 10GbE Se
 device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
 device		txp		# 3Com 3cR990 (``Typhoon'')
 device		vx		# 3Com 3c590, 3c595 (``Vortex'')
+device		vxge		# Exar/Neterion XFrame 3100 10GbE
 
 # PCI FDDI NICs.
 device		fpa

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Apr 28 14:27:17 2011	(r221166)
+++ head/sys/conf/files	Thu Apr 28 14:33:15 2011	(r221167)
@@ -1970,6 +1970,24 @@ dev/vte/if_vte.c		optional vte pci
 dev/vx/if_vx.c			optional vx
 dev/vx/if_vx_eisa.c		optional vx eisa
 dev/vx/if_vx_pci.c		optional vx pci
+dev/vxge/vxge.c				optional vxge
+dev/vxge/vxgehal/vxgehal-ifmsg.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mrpcim.c	optional vxge
+dev/vxge/vxgehal/vxge-queue.c		optional vxge
+dev/vxge/vxgehal/vxgehal-ring.c		optional vxge
+dev/vxge/vxgehal/vxgehal-swapper.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mgmt.c		optional vxge
+dev/vxge/vxgehal/vxgehal-srpcim.c	optional vxge
+dev/vxge/vxgehal/vxgehal-config.c	optional vxge
+dev/vxge/vxgehal/vxgehal-blockpool.c	optional vxge
+dev/vxge/vxgehal/vxgehal-doorbells.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mgmtaux.c	optional vxge
+dev/vxge/vxgehal/vxgehal-device.c	optional vxge
+dev/vxge/vxgehal/vxgehal-mm.c		optional vxge
+dev/vxge/vxgehal/vxgehal-driver.c	optional vxge
+dev/vxge/vxgehal/vxgehal-virtualpath.c	optional vxge
+dev/vxge/vxgehal/vxgehal-channel.c	optional vxge
+dev/vxge/vxgehal/vxgehal-fifo.c		optional vxge
 dev/watchdog/watchdog.c		standard
 dev/wb/if_wb.c			optional wb pci
 dev/wds/wd7000.c		optional wds isa

Added: head/sys/dev/vxge/LICENSE
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/LICENSE	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,31 @@
+/*-
+ *  Copyright (c) 2002-2010 Exar Corp.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification are permitted provided 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.
+ *
+ *    3. Neither the name of the Exar Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$*/
\ No newline at end of file

Added: head/sys/dev/vxge/README
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/README	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,450 @@
+$FreeBSD$
+''_Readme for FreeBSD X3100 Series 10GbE PCIe I/O Virtualized Server Adapter Drivers_'''
+
+=== Introduction ===
+FreeBSD Driver for X3100 10GbE Server/Storage adapters 
+* Drivers support all X3100 10GbE adapters with FreeBSD version 7.x, 8.x and 9.x
+* Supports both i386 and amd64 architectures
+* Features:	Jumbo frames (up to 9600),
+		LRO (Large Receive Offload),
+		TSO (TCP segmentation offload),
+		RTH (Receive Traffic Hash).
+   Also, Extended Message Signaled Interrupts (MSI-X).
+
+
+''Features''
+
+    a.	Jumbo frames:
+	X3110 and X3120 supports MTU up to 9600 bytes, modifiable using ifconfig command.
+
+    b.	LRO (Large Receive Offload):
+	LRO can be enabled/disabled before loading driver.
+	Set lro_enable in vxge.conf to 1 before loading driver.
+
+    c.	TSO (TCP Segmentation Offload)
+	TSO can be enabled/disabled before loading driver.
+	Set tso_enable in vxge.conf to 1 before loading driver.
+
+    d.	RTH (Receive Traffic Hash)
+	Receive side steering for better scaling.
+	Set rth_enable in vxge.conf to 1 before loading driver.
+
+    e.	MSI-X
+	Can be enabled on platforms which support it, resulting in noticeable
+	performance improvement. 
+
+    f.	Multi-VPaths
+	Up to 17 hardware based transmit and receive data channels, with
+	multiple steering options.
+
+
+''X3100 & Driver configuration: vxge.conf''
+
+The vxge.conf contains following attributes.
+
+
+''msix_enable''
+
+Enable MSI (Message Signaled Interrupts) feature in driver.
+0 - INTA
+1 - MSI-X
+Default: 1
+
+
+''rth_enable''
+
+Enables Receive side steering for better scaling (RTH - Receive Traffic Hash)
+Range: 0 - 1
+Default: 1
+
+
+''lro_enable''
+
+Enables LRO (Large Receive Offload) feature in driver.
+Range: 0 - 1
+Default: 1
+
+
+''tso_enable''
+
+Enables TSO (TCP Segmentaton Offload) feature in driver.
+Range: 0 - 1
+Default: 1
+
+
+''no_of_vpath''
+
+Specifies maximum VPATH(s) configured for each device function.
+Valid range: 1-17
+Default: Optimized by driver
+
+
+''func_mode''
+
+Change PCI function mode
+    0  - SF1_VP17 (1 function with 17 VPATHs)
+    1  - MF8_VP2  (8 functions with 2 VPATHs per function)
+    8  - MF2_VP8  (2 functions, 8 Paths/Function)
+    9  - MF4_VP4  (4 Functions, 4 Paths/Function)
+    11 - MF8P_VP2 (8 functions with 2 VPATHS per function required for DirectIO)
+    Default: -1
+
+
+''port_mode''
+
+Change the default dual port mode
+    2 - Active Passive
+    3 - Single Port
+    4 - Dual Port
+
+
+''l2_switch''
+
+Turn on/off the inter function traffic through l2 switch
+    0 - Disallow inter function traffic
+    1 - Allow inter function traffic
+    Default: -1
+
+
+''bandwidth_0 - bandwidth_7''
+
+    Desired max receive/transmit bandwidth,in Mbps for function 0 to function 7
+    Minimum value is 100 Mbps, for 1 Gbps specify a value of 1024.
+
+
+''priority_0 - priority_7''
+
+    Desired receive/transmit priority for function 0 to function 7 
+
+
+''intr_coalesce''
+
+    Adaptive interrupt coalescing
+    0 - Disable
+    1 - Enable
+
+
+''Low Latency''
+
+   0 - Disable
+   1 - Enable
+
+=== Installation Instructions ===
+
+''Identifying the Adapter''
+
+    The X3100 adapter is identified by the board ID number on the adapter.
+
+    Look for a label that has a barcode and a number, for example,
+    SXT0425072. The factory-burned MAC address (hardware address)
+    shows up on the board above the serial number, 
+    (similar to 000CFC000449 -- 00:0C:FC:00:04:49).
+
+
+''Kernel Driver Source Package''
+
+This package contains kernel_update.sh script which is to be used to copy driver sources to kernel path.
+It creates vxge folder with source code in /usr/src/sys/dev and Makefile in /usr/src/sys/modules.
+
+Loadable parameters can be changed by putting below lines in /boot/device.hints and set values as desired.
+	hint.vxge.0.msix_enable="1"
+	hint.vxge.0.rth_enable="1"
+	hint.vxge.0.lro_enable="1"
+	hint.vxge.0.tso_enable="1"
+	hint.vxge.0.tx_steering="1"
+	hint.vxge.0.no_of_vpath="-1"
+	hint.vxge.0.func_mode="-1"
+	hint.vxge.0.port_mode="-1"
+	hint.vxge.0.fw_upgrade="1"
+	hint.vxge.0.bandwidth_0="-1"
+	hint.vxge.0.bandwidth_1="-1"
+	hint.vxge.0.bandwidth_2="-1"
+	hint.vxge.0.bandwidth_3="-1"
+	hint.vxge.0.bandwidth_4="-1"
+	hint.vxge.0.bandwidth_5="-1"
+	hint.vxge.0.bandwidth_6="-1"
+	hint.vxge.0.bandwidth_7="-1"
+	hint.vxge.0.priority_0="-1"
+	hint.vxge.0.priority_1="-1"
+	hint.vxge.0.priority_2="-1"
+	hint.vxge.0.priority_3="-1"
+	hint.vxge.0.priority_4="-1"
+	hint.vxge.0.priority_5="-1"
+	hint.vxge.0.priority_6="-1"
+	hint.vxge.0.priority_7="-1"
+	hint.vxge.0.intr_coalesce="0"
+	hint.vxge.0.low_latency="0"
+
+	e.g., set hint.vxge.0.msix_enable to 0 to load driver in INTA mode.
+	Then reboot the system to add loadable parameters to kenv.
+
+
+''Standalone Driver Source Package''
+
+vxge (FreeBSD package)
+    This directory contains FreeBSD driver sources for X3100 device(s),
+    Makefile, and X3100 Hardware Abstraction headers and sources
+    (vxgehal and include folders)
+
+vxgehal
+    This directory contains the X3100 HAL sources.
+    The driver uses HAL to perform operations on the X3100 hardware.
+
+include
+    The include subdirectory contains HAL header files.
+ 
+Source code for vxge-manage tool (used to get statistics, pciconfig and
+register dump) are included in the freebsd directory.
+
+
+''Building the driver''
+
+    The driver is distributed in the source form. Driver and installation
+    utility executables need to be built for the target platform. 
+
+    In the directory containing Makefile for building Exar driver for FreeBSD, 
+	#make clean
+	#make
+
+    Please unload previously installed Exar drivers before proceeding with following steps.
+	#make uninstall
+
+
+''Loading the driver''
+
+     Use "kldload" to load driver module vxge.ko.
+	#kldload ./vxge.ko
+
+    Run "kldstat" and find an entry for vxge kernel module to ensure driver installation
+    was successful.
+	#kldstat | grep vxge
+	3 1 0xc22cc000 26000   vxge.ko
+
+
+''Enabling interface and assigning IP address''
+
+    #ifconfig   up
+     will be similar to vxge0, vxge1 etc. and can be
+    found by executing "ifconfig -a".
+    Neterion adapters typically have MAC addresses starting with
+    "00:0C:FC" or "00:11:25".
+
+    Example:
+	#ifconfig vxge0 10.2.2.40 up
+	Enables vxge0 interface and assigns to it the IP address 10.2.2.40.
+
+	vxge0: flags=8843 metric 0 mtu 1500
+	options=53b
+	ether 00:0c:fc:00:da:47
+	inet6 fe80::20c:fcff:fe00:da47%vxge0 prefixlen 64 scopeid 0x3
+	inet 10.2.2.40 netmask 0xff000000 broadcast 17.255.255.255
+	media: Ethernet autoselect (10Gbase-SR )
+	status: active
+
+
+''Disabling the interface''
+
+    #ifconfig  down
+    Example:
+	#ifconfig vxge0 down
+
+
+''Unloading the Driver''
+	#kldunload vxge.ko
+
+
+=== Performance Suggestions ===
+
+Sysctl Tuning Parameters
+	#sysctl net.inet.tcp.sendspace=786432
+	#sysctl net.inet.tcp.recvspace=786432
+	#sysctl net.inet.tcp.recvbuf_max=16777216
+	#sysctl net.inet.tcp.sendbuf_max=16777216
+	#sysctl net.inet.tcp.blackhole=1
+	#sysctl net.inet.tcp.rfc1323=1
+	#sysctl net.inet.tcp.path_mtu_discovery=1
+	#sysctl net.inet.tcp.inflight.enable=0
+	#sysctl net.inet.ip.maxfragsperpacket=2147483647
+	#sysctl kern.ipc.maxsockbuf=8388608
+	#sysctl kern.ipc.nmbclusters=2147483647
+	#sysctl kern.ipc.nmbjumbop=262144
+	#sysctl kern.ipc.maxsockets=81920
+	#sysctl hw.intr_storm_threshold=9000
+
+
+''Usage & Troubleshooting''
+
+For general information and support, please visit Neterion support website at 
+http://www.neterion.com/support/support.html
+
+Make sure that the operating system identifies the X3100 adapter. Note that
+Neterion vendor ID is 0x17D5 and X3110 and X3120 adapters can be fixed to both PCIe slots.
+
+The rest of this section details troubleshooting tips and information. Some of
+them are general and some are more specific. For online Troubleshooting tips 
+and faqs, please visit
+http://trac.neterion.com/cgi-bin/trac.cgi/wiki/TitleIndex?anonymous
+
+
+''Loading the driver and initializing the device''
+
+The first time FreeBSD identifies the device it stores the corresponding
+device/vendor IDs in an enumerated tree of PCI devices. Note that Neterion
+vendor id is 0x17d5.
+
+After cold reboot FreeBSD finds the device and tries to load the corresponding
+driver. If it fails, try to switch the card and/or cable. And, in parallel, send
+us the "tail" of the "/var/log/messages". We also need traces, register dump and
+statistics(Use vxge-manage tool).
+
+
+''Collect information''
+
+If you're reporting a problem to Neterion, please describe:
+host(s) and adapter(s), switch (if used), software version.
+
+
+''ARP''
+
+If this is a basic connectivity issue (e.g., cannot connect, cannot ping),
+make sure first that ARP works
+Do you see ARPs coming through a switch (in case switch is used)?
+Do you see frame drops at the switch when pinging?
+Do you see frame counts increasing via statistics?
+
+
+''Have you tried''
+
+    a. A previous driver release;
+    b. A different adapter in the same PCI slot;
+    c. A different PCI slot;
+    d. Back-to-back setup so that the switch is excluded from the equation.
+    e. To replace the cables?
+    f. To use a different PCI slot?
+
+
+''Start clean''
+
+    a. Have you tried to reboot the switch? Cold-reboot the host?
+    b. Make sure that the latest released driver gets loaded after the host
+    reboot, and that the 10GE interface shows up via ifconfig.
+
+
+''LEDs''
+
+Do you see LED going green after everything is connected and drivers loaded?
+How/when does the color changes?
+
+
+''ifconfig''
+
+Run "ifconfig -a" at the command prompt and check whether the output Looks as
+expected. Include the output in your problem report.
+
+Note for instance that "all-foxes" i.e, FF:FF:FF:FF:FF:FF MAC address could
+explain a general connectivity issue, if that's what you see.
+
+
+''Log''
+
+Please attach the generated log, with traces enabled.
+
+Note that the driver's logging facility is configurable at compile-time. Errors
+and traces can be compiled out on a per-component basis. The components are: HAL
+fifos and rings, device, etc., see VXGE_COMPONENT_HAL_??? in the Makefile.
+
+Here's how you enable all except data path traces:
+CFLAGS_VXGE = -DVXGE_DEBUG_MODULE_MASK=0xffffffbf  \
+-DVXGE_DEBUG_ERR_MASK=0xffffffbf
+Recompile with traces and include the log in the report.
+
+
+=== Utilities ===
+
+''Statistics''
+
+ To print hardware and software statistics for interface instance 0
+       (i.e., vxge0), run:
+	#vxge-manage vxgeX stats common
+	#vxge-manage vxgeX stats mrpcim
+	#vxge-manage vxgeX stats driver
+	#vxge-manage vxgeX pciconfig
+	#vxge-manage vxgeX hwinfo
+	#vxge-manage vxgeX bw_pri_get
+	#vxge-manage vxgeX bw_pri_get vf_id
+	#vxge-manage vxgeX port_mode_get
+
+The vxge-manage tool generates log file in the working directory. Once done, ping a
+few times, and collect the statistics again (Ping both from this and the remote
+machines).
+
+Many counters could be of interest. For example, "rx_vld_frms" counts all
+valid incoming Ethernet frames seen by the adapter. Information could be derived
+from the fact that (for instance) counter stay constant during ping, if that is
+what happening. For detailed description of the X3100 counters, please refer
+to the "X3100 User Guide".
+
+Please include the statistics into your problem report.
+
+
+''X3100 registers''
+
+       Use vxge-manage to dump all X3100 BAR0 space registers. Include this register dump
+       into your problem report.
+       #vxge-manage vxgeX regs
+
+
+''PCI configuration space''
+
+Use vxge-manage to retrieve PCI vendor, device, etc. Include the PCI configutation
+space in your problem report.
+	#vxge-manage vxgeX pciconfig
+
+
+''Hardware Info''
+
+To retrieve hardware info of device, e.g, serial / part number and function mode etc.
+use vxge-manage 
+	#vxge-manage vxgeX hwinfo
+
+
+''Bandwidth and Priority''
+
+Use vxge-manage to display Bandwidth and Priority information.
+	#vxge-manage vxgeX bw_pri_get
+	or
+	#vxge-manage vxgeX bw_pri_get vf_id
+
+vxge-manage can also be used to set bandwidth and priority for individual VF.
+	#vxge-manage vxgeX bw_pri_set vf_id bandwidth 
+	or
+	#vxge-manage vxgeX bw_pri_set vf_id bandwidth priority
+
+	Example:
+	#vxge-manage vxge0 bw_pri_set 0 1500
+	or
+	#vxge-manage vxge0 bw_pri_set 0 1500 1
+
+''Port mode''
+
+Use vxge-manage to display Port mode setting
+	#vxge-manage vxgeX port_mode_get
+
+vxge-manage can also be used to set Port mode.
+	#vxge-manage vxgeX port_mode_set port_mode_value
+
+	Example:
+	#vxge-manage vxge0 port_mode_set 2
+
+=== Known Issues ===
+
+
+=== Available Downloads ===
+
+   For latest available drivers or further support please contact your network
+   adapter provider or neterionsupport@exar.com.
+
+
+===================================================================
+ Exar Corp., Proprietary
+ COPYRIGHT (c) 2002-2011 Exar corp., ALL RIGHTS RESERVED

Added: head/sys/dev/vxge/include/build-version.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/build-version.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,7 @@
+/* $FreeBSD$ */
+
+#ifndef	BUILD_VERSION_H
+#define	BUILD_VERSION_H
+/* Do not edit! Automatically generated when released. */
+#define	GENERATED_BUILD_VERSION 22708
+#endif /* BUILD_VERSION_H */

Added: head/sys/dev/vxge/include/vxge-debug.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/vxge-debug.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,159 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided 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.
+ *
+ *    3. Neither the name of the Exar Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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	VXGE_DEBUG_H
+#define	VXGE_DEBUG_H
+
+__EXTERN_BEGIN_DECLS
+
+/*
+ * __FUNCTION__ is, together with __PRETTY_FUNCTION__ or something similar,
+ * a gcc extension. we'll have to #if defined around that, and provide some
+ * meaningful replacement for those, so to make some gcc versions happier
+ */
+#ifndef	__func__
+#if defined(__FUNCTION__)
+#define	__func__ __FUNCTION__
+#else
+#define	__func__ " "
+#endif
+#endif
+
+#define	NULL_HLDEV					NULL
+#define	NULL_VPID					0xFFFFFFFF
+
+#define	VXGE_DEBUG_MODULE_MASK_DEF			0xFFFFFFFF
+#define	VXGE_DEBUG_LEVEL_DEF				VXGE_TRACE
+
+extern u32 g_debug_level;
+
+#ifndef	VXGE_DEBUG_MODULE_MASK
+#define	VXGE_DEBUG_MODULE_MASK				0
+#endif
+
+/*
+ * enum vxge_debug_level_e
+ * @VXGE_NONE: debug disabled
+ * @VXGE_ERR: all errors going to be logged out
+ * @VXGE_INFO: all errors plus all kind of info tracing print outs
+ *		going to be logged out. noisy.
+ * @VXGE_TRACE: all errors, all info plus all function entry and exit
+ *		and parameters. Very noisy
+ *
+ * This enumeration going to be used to switch between different
+ * debug levels during runtime if DEBUG macro defined during
+ * compilation. If DEBUG macro not defined than code will be
+ * compiled out.
+ */
+typedef enum vxge_debug_level_e {
+	VXGE_NONE   = 0x0,
+	VXGE_ERR    = 0x1,
+	VXGE_INFO   = 0x2,
+	VXGE_TRACE  = 0x4,
+} vxge_debug_level_e;
+
+/*
+ * @VXGE_COMPONENT_HAL_DEVICE: do debug for vxge core device module
+ * @VXGE_COMPONENT_HAL_DEVICE_IRQ: do debug for vxge core device module in ISR
+ * @VXGE_COMPONENT_HAL_VAPTH: do debug for vxge core virtual path module
+ * @VXGE_COMPONENT_HAL_VAPTH_ISR: do debug for vxge core virtual path module in
+ *		ISR
+ * @VXGE_COMPONENT_HAL_CONFIG: do debug for vxge core config module
+ * @VXGE_COMPONENT_HAL_MM: do debug for vxge core memory module
+ * @VXGE_COMPONENT_HAL_POOL: do debug for vxge core memory pool module
+ * @VXGE_COMPONENT_HAL_QUEUE: do debug for vxge core queue module
+ * @VXGE_COMPONENT_HAL_BITMAP: do debug for vxge core BITMAP module
+ * @VXGE_COMPONENT_HAL_CHANNEL: do debug for vxge core channel module
+ * @VXGE_COMPONENT_HAL_FIFO: do debug for vxge core fifo module
+ * @VXGE_COMPONENT_HAL_RING: do debug for vxge core ring module
+ * @VXGE_COMPONENT_HAL_DMQ: do debug for vxge core DMQ module
+ * @VXGE_COMPONENT_HAL_UMQ: do debug for vxge core UMQ module
+ * @VXGE_COMPONENT_HAL_SQ: do debug for vxge core SQ module
+ * @VXGE_COMPONENT_HAL_SRQ: do debug for vxge core SRQ module
+ * @VXGE_COMPONENT_HAL_CQRQ: do debug for vxge core CRQ module
+ * @VXGE_COMPONENT_HAL_NCE: do debug for vxge core NCE module
+ * @VXGE_COMPONENT_HAL_STAG: do debug for vxge core STAG module
+ * @VXGE_COMPONENT_HAL_TCP: do debug for vxge core TCP module
+ * @VXGE_COMPONENT_HAL_LRO: do debug for vxge core LRO module
+ * @VXGE_COMPONENT_HAL_SPDM: do debug for vxge core SPDM module
+ * @VXGE_COMPONENT_HAL_SESSION: do debug for vxge core SESSION module
+ * @VXGE_COMPONENT_HAL_STATS: do debug for vxge core statistics module
+ * @VXGE_COMPONENT_HAL_MRPCIM: do debug for vxge KMA core mrpcim module
+ * @VXGE_COMPONENT_HAL_SRPCIM: do debug for vxge KMA core srpcim module
+ * @VXGE_COMPONENT_OSDEP: do debug for vxge KMA os dependent parts
+ * @VXGE_COMPONENT_LL: do debug for vxge link layer module
+ * @VXGE_COMPONENT_ULD: do debug for vxge upper layer driver
+ * @VXGE_COMPONENT_ALL: activate debug for all modules with no exceptions
+ *
+ * This enumeration going to be used to distinguish modules
+ * or libraries during compilation and runtime.  Makefile must declare
+ * VXGE_DEBUG_MODULE_MASK macro and set it to proper value.
+ */
+#define	VXGE_COMPONENT_HAL_DEVICE			0x00000001
+#define	VXGE_COMPONENT_HAL_DEVICE_IRQ			0x00000002
+#define	VXGE_COMPONENT_HAL_VPATH			0x00000004
+#define	VXGE_COMPONENT_HAL_VPATH_IRQ			0x00000008
+#define	VXGE_COMPONENT_HAL_CONFIG			0x00000010
+#define	VXGE_COMPONENT_HAL_MM				0x00000020
+#define	VXGE_COMPONENT_HAL_POOL				0x00000040
+#define	VXGE_COMPONENT_HAL_QUEUE			0x00000080
+#define	VXGE_COMPONENT_HAL_BITMAP			0x00000100
+#define	VXGE_COMPONENT_HAL_CHANNEL			0x00000200
+#define	VXGE_COMPONENT_HAL_FIFO				0x00000400
+#define	VXGE_COMPONENT_HAL_RING				0x00000800
+#define	VXGE_COMPONENT_HAL_DMQ				0x00001000
+#define	VXGE_COMPONENT_HAL_UMQ				0x00002000
+#define	VXGE_COMPONENT_HAL_SQ				0x00004000
+#define	VXGE_COMPONENT_HAL_SRQ				0x00008000
+#define	VXGE_COMPONENT_HAL_CQRQ				0x00010000
+#define	VXGE_COMPONENT_HAL_NCE				0x00020000
+#define	VXGE_COMPONENT_HAL_STAG				0x00040000
+#define	VXGE_COMPONENT_HAL_TCP				0x00080000
+#define	VXGE_COMPONENT_HAL_LRO				0x00100000
+#define	VXGE_COMPONENT_HAL_SPDM				0x00200000
+#define	VXGE_COMPONENT_HAL_SESSION			0x00400000
+#define	VXGE_COMPONENT_HAL_STATS			0x00800000
+#define	VXGE_COMPONENT_HAL_MRPCIM			0x01000000
+#define	VXGE_COMPONENT_HAL_MRPCIM_IRQ			0x02000000
+#define	VXGE_COMPONENT_HAL_SRPCIM			0x04000000
+#define	VXGE_COMPONENT_HAL_SRPCIM_IRQ			0x08000000
+#define	VXGE_COMPONENT_HAL_DRIVER			0x10000000
+
+/* space for CORE_XXX */
+#define	VXGE_COMPONENT_OSDEP				0x20000000
+#define	VXGE_COMPONENT_LL				0x40000000
+#define	VXGE_COMPONENT_ULD				0x80000000
+#define	VXGE_COMPONENT_ALL				0xffffffff
+
+__EXTERN_END_DECLS
+
+#endif	/* VXGE_DEBUG_H */

Added: head/sys/dev/vxge/include/vxge-defs.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dev/vxge/include/vxge-defs.h	Thu Apr 28 14:33:15 2011	(r221167)
@@ -0,0 +1,251 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided 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.
+ *
+ *    3. Neither the name of the Exar Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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	VXGE_DEFS_H
+#define	VXGE_DEFS_H
+
+#define	VXGE_PCI_VENDOR_ID			0x17D5
+#define	VXGE_PCI_DEVICE_ID_TITAN_1		0x5833
+#define	VXGE_PCI_REVISION_TITAN_1		1
+#define	VXGE_PCI_DEVICE_ID_TITAN_1A		0x5833
+#define	VXGE_PCI_REVISION_TITAN_1A		2
+#define	VXGE_PCI_DEVICE_ID_TITAN_2		0x5834
+#define	VXGE_PCI_REVISION_TITAN_2		1
+
+#define	VXGE_MIN_FW_MAJOR_VERSION		1
+#define	VXGE_MIN_FW_MINOR_VERSION		8
+#define	VXGE_MIN_FW_BUILD_NUMBER		1
+
+#define	VXGE_DRIVER_VENDOR			"Exar Corp."
+#define	VXGE_CHIP_FAMILY			"X3100"
+#define	VXGE_SUPPORTED_MEDIA_0			"Fiber"
+
+#define	VXGE_DRIVER_NAME			\
+	"Neterion X3100 10GbE PCIe Server Adapter Driver"
+/*
+ * mBIT(loc) - set bit at offset
+ */
+#define	mBIT(loc)		(0x8000000000000000ULL >> (loc))
+
+/*
+ * vBIT(val, loc, sz) - set bits at offset
+ */
+#define	vBIT(val, loc, sz)	(((u64)(val)) << (64-(loc)-(sz)))
+#define	vBIT32(val, loc, sz)	(((u32)(val)) << (32-(loc)-(sz)))
+
+/*
+ * bVALx(bits, loc) - Get the value of x bits at location
+ */
+#define	bVAL1(bits, loc)  ((((u64)bits) >> (64-(loc+1))) & 0x1)
+#define	bVAL2(bits, loc)  ((((u64)bits) >> (64-(loc+2))) & 0x3)
+#define	bVAL3(bits, loc)  ((((u64)bits) >> (64-(loc+3))) & 0x7)
+#define	bVAL4(bits, loc)  ((((u64)bits) >> (64-(loc+4))) & 0xF)
+#define	bVAL5(bits, loc)  ((((u64)bits) >> (64-(loc+5))) & 0x1F)
+#define	bVAL6(bits, loc)  ((((u64)bits) >> (64-(loc+6))) & 0x3F)
+#define	bVAL7(bits, loc)  ((((u64)bits) >> (64-(loc+7))) & 0x7F)
+#define	bVAL8(bits, loc)  ((((u64)bits) >> (64-(loc+8))) & 0xFF)
+#define	bVAL9(bits, loc)  ((((u64)bits) >> (64-(loc+9))) & 0x1FF)
+#define	bVAL11(bits, loc) ((((u64)bits) >> (64-(loc+11))) & 0x7FF)
+#define	bVAL12(bits, loc) ((((u64)bits) >> (64-(loc+12))) & 0xFFF)
+#define	bVAL14(bits, loc) ((((u64)bits) >> (64-(loc+14))) & 0x3FFF)
+#define	bVAL15(bits, loc) ((((u64)bits) >> (64-(loc+15))) & 0x7FFF)
+#define	bVAL16(bits, loc) ((((u64)bits) >> (64-(loc+16))) & 0xFFFF)
+#define	bVAL17(bits, loc) ((((u64)bits) >> (64-(loc+17))) & 0x1FFFF)
+#define	bVAL18(bits, loc) ((((u64)bits) >> (64-(loc+18))) & 0x3FFFF)
+#define	bVAL20(bits, loc) ((((u64)bits) >> (64-(loc+20))) & 0xFFFFF)
+#define	bVAL22(bits, loc) ((((u64)bits) >> (64-(loc+22))) & 0x3FFFFF)
+#define	bVAL24(bits, loc) ((((u64)bits) >> (64-(loc+24))) & 0xFFFFFF)
+#define	bVAL28(bits, loc) ((((u64)bits) >> (64-(loc+28))) & 0xFFFFFFF)
+#define	bVAL32(bits, loc) ((((u64)bits) >> (64-(loc+32))) & 0xFFFFFFFF)
+#define	bVAL36(bits, loc) ((((u64)bits) >> (64-(loc+36))) & 0xFFFFFFFFFULL)
+#define	bVAL40(bits, loc) ((((u64)bits) >> (64-(loc+40))) & 0xFFFFFFFFFFULL)
+#define	bVAL44(bits, loc) ((((u64)bits) >> (64-(loc+44))) & 0xFFFFFFFFFFFULL)
+#define	bVAL48(bits, loc) ((((u64)bits) >> (64-(loc+48))) & 0xFFFFFFFFFFFFULL)
+#define	bVAL52(bits, loc) ((((u64)bits) >> (64-(loc+52))) & 0xFFFFFFFFFFFFFULL)
+#define	bVAL56(bits, loc) ((((u64)bits) >> (64-(loc+56))) & 0xFFFFFFFFFFFFFFULL)
+#define	bVAL60(bits, loc)   \
+		((((u64)bits) >> (64-(loc+60))) & 0xFFFFFFFFFFFFFFFULL)
+#define	bVAL61(bits, loc)   \
+		((((u64)bits) >> (64-(loc+61))) & 0x1FFFFFFFFFFFFFFFULL)
+
+#define	VXGE_HAL_VPATH_BMAP_START	47
+#define	VXGE_HAL_VPATH_BMAP_END		63
+
+#define	VXGE_HAL_ALL_FOXES		0xFFFFFFFFFFFFFFFFULL
+
+#define	VXGE_HAL_INTR_MASK_ALL		0xFFFFFFFFFFFFFFFFULL
+
+#define	VXGE_HAL_MAX_VIRTUAL_PATHS	17
+
+#define	VXGE_HAL_MAX_FUNCTIONS		8
+
+#define	VXGE_HAL_MAX_ITABLE_ENTRIES	256
+
+#define	VXGE_HAL_MAX_RSS_KEY_SIZE	40
+
+#define	VXGE_HAL_MAC_MAX_WIRE_PORTS	2
+
+#define	VXGE_HAL_MAC_SWITCH_PORT	2
+
+#define	VXGE_HAL_MAC_MAX_AGGR_PORTS	2
+
+#define	VXGE_HAL_MAC_MAX_PORTS		3
+
+#define	VXGE_HAL_INTR_ALARM		(1<<4)
+
+#define	VXGE_HAL_INTR_TX		(1<<(3-VXGE_HAL_VPATH_INTR_TX))
+
+#define	VXGE_HAL_INTR_RX		(1<<(3-VXGE_HAL_VPATH_INTR_RX))
+
+#define	VXGE_HAL_INTR_EINTA		(1<<(3-VXGE_HAL_VPATH_INTR_EINTA))
+
+#define	VXGE_HAL_INTR_BMAP		(1<<(3-VXGE_HAL_VPATH_INTR_BMAP))
+
+#define	VXGE_HAL_PCI_CONFIG_SPACE_SIZE	VXGE_OS_PCI_CONFIG_SIZE
+
+#define	VXGE_HAL_DEFAULT_32		0xffffffff
+
+#define	VXGE_HAL_DEFAULT_64		0xffffffffffffffff
+
+#define	VXGE_HAL_DUMP_BUF_SIZE		0x10000
+
+#define	VXGE_HAL_VPD_BUFFER_SIZE	128
+
+#define	VXGE_HAL_VPD_LENGTH		80
+
+/* Check whether an address is multicast. */
+#define	VXGE_HAL_IS_NULL(Address)	(Address == 0x0000000000000000ULL)
+
+/* Check whether an address is multicast. */
+#define	VXGE_HAL_IS_MULTICAST(Address)	(Address & 0x0000010000000000ULL)
+
+/* Check whether an address is broadcast. */
+#define	VXGE_HAL_IS_BROADCAST(Address)	\
+	((Address & 0x0000FFFF00000000ULL) == 0x0000FFFF00000000ULL)
+
+#define	VXGE_HAL_IS_UNICAST(Address)		\
+	(!(VXGE_HAL_IS_NULL(Address) ||		\
+	VXGE_HAL_IS_MULTICAST(Address) ||	\
+	VXGE_HAL_IS_BROADCAST(Address)))
+
+/* frames sizes */
+#define	VXGE_HAL_HEADER_ETHERNET_II_802_3_SIZE		14
+#define	VXGE_HAL_HEADER_802_2_SIZE			3
+#define	VXGE_HAL_HEADER_SNAP_SIZE			5
+#define	VXGE_HAL_HEADER_VLAN_SIZE			4
+#define	VXGE_HAL_MAC_HEADER_MAX_SIZE \
+			(VXGE_HAL_HEADER_ETHERNET_II_802_3_SIZE + \
+			VXGE_HAL_HEADER_802_2_SIZE + \
+			VXGE_HAL_HEADER_SNAP_SIZE)
+
+#define	VXGE_HAL_TCPIP_HEADER_MAX_SIZE			(64 + 64)
+
+/* 32bit alignments */
+
+/* A receive data corruption can occur resulting in either a single-bit or
+double-bit ECC error being flagged in the ASIC if starting offset of a
+buffer in single buffer mode is 0x2 to 0xa. Single bit ECC error will not
+lock up the card but can hide the data corruption while the double-bit ECC
+error will lock up the card. Limiting the starting offset of the buffers to
+0x0, 0x1 or to a value greater than 0xF will workaround this issue.
+VXGE_HAL_HEADER_ETHERNET_II_802_3_ALIGN of 2 causes the starting offset of
+buffer to be 0x2, 0x12 and so on, to have the start of the ip header dword
+aligned. The start of buffer of 0x2 will cause this problem to occur.
+To avoid this problem in all cases, add 0x10 to 0x2, to ensure that the start
+of buffer is outside of the problem causing offsets.
+*/
+

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

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:42: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 3665A1065670;
	Thu, 28 Apr 2011 14:42:43 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2432A8FC08;
	Thu, 28 Apr 2011 14:42: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 p3SEghH9027404;
	Thu, 28 Apr 2011 14:42:43 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEghVR027402;
	Thu, 28 Apr 2011 14:42:43 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281442.p3SEghVR027402@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:42:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221168 - stable/8/sys/dev/mxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:42:43 -0000

Author: gallatin
Date: Thu Apr 28 14:42:42 2011
New Revision: 221168
URL: http://svn.freebsd.org/changeset/base/221168

Log:
  MFC r220385: Implement mxge_init()
  
    This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
    did not bring the interface into a RUNNING state, like it does on
    most (all?) other FreeBSD NIC drivers.
  
    Thanks to gnn for mentioning the bug, and yongari for pointing out that
    ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

Modified:
  stable/8/sys/dev/mxge/if_mxge.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/mxge/if_mxge.c
==============================================================================
--- stable/8/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:33:15 2011	(r221167)
+++ stable/8/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:42:42 2011	(r221168)
@@ -3057,6 +3057,14 @@ mxge_intr(void *arg)
 static void
 mxge_init(void *arg)
 {
+	mxge_softc_t *sc = arg;
+	struct ifnet *ifp = sc->ifp;
+
+
+	mtx_lock(&sc->driver_mtx);
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+		(void) mxge_open(sc);
+	mtx_unlock(&sc->driver_mtx);
 }
 
 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:42: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 06E271065697;
	Thu, 28 Apr 2011 14:42:56 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E8C438FC16;
	Thu, 28 Apr 2011 14:42: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 p3SEgtWv027449;
	Thu, 28 Apr 2011 14:42:55 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEgtIx027447;
	Thu, 28 Apr 2011 14:42:55 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281442.p3SEgtIx027447@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:42:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221169 - stable/7/sys/dev/mxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:42:56 -0000

Author: gallatin
Date: Thu Apr 28 14:42:55 2011
New Revision: 221169
URL: http://svn.freebsd.org/changeset/base/221169

Log:
  MFC r220385: Implement mxge_init()
  
    This fixes a long standing bug in mxge(4) where "ifconfig mxge0 $IP"
    did not bring the interface into a RUNNING state, like it does on
    most (all?) other FreeBSD NIC drivers.
  
    Thanks to gnn for mentioning the bug, and yongari for pointing out that
    ether_ioctl() invokes ifp->if_init() in SIOCSIFADDR.

Modified:
  stable/7/sys/dev/mxge/if_mxge.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/mxge/if_mxge.c
==============================================================================
--- stable/7/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:42:42 2011	(r221168)
+++ stable/7/sys/dev/mxge/if_mxge.c	Thu Apr 28 14:42:55 2011	(r221169)
@@ -2867,6 +2867,14 @@ mxge_intr(void *arg)
 static void
 mxge_init(void *arg)
 {
+	mxge_softc_t *sc = arg;
+	struct ifnet *ifp = sc->ifp;
+
+
+	mtx_lock(&sc->driver_mtx);
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+		(void) mxge_open(sc);
+	mtx_unlock(&sc->driver_mtx);
 }
 
 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:43: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 6C9DC1065672;
	Thu, 28 Apr 2011 14:43:38 +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 5B5668FC16;
	Thu, 28 Apr 2011 14:43: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 p3SEhcLO027509;
	Thu, 28 Apr 2011 14:43:38 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEhcYb027507;
	Thu, 28 Apr 2011 14:43:38 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201104281443.p3SEhcYb027507@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Thu, 28 Apr 2011 14:43: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: r221170 - in head/contrib/tcsh/nls: . pl
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:43:38 -0000

Author: obrien
Date: Thu Apr 28 14:43:38 2011
New Revision: 221170
URL: http://svn.freebsd.org/changeset/base/221170

Log:
  Remove unused GPL files from tcsh.

Deleted:
  head/contrib/tcsh/nls/pl/
Modified:
  head/contrib/tcsh/nls/Makefile

Modified: head/contrib/tcsh/nls/Makefile
==============================================================================
--- head/contrib/tcsh/nls/Makefile	Thu Apr 28 14:42:55 2011	(r221169)
+++ head/contrib/tcsh/nls/Makefile	Thu Apr 28 14:43:38 2011	(r221170)
@@ -1,6 +1,6 @@
 # $tcsh: Makefile,v 1.14 2006/03/02 18:46:45 christos Exp $
 
-SUBDIRS=	C et finnish french german greek italian ja pl russian \
+SUBDIRS=	C et finnish french german greek italian ja russian \
 		spanish ukrainian
 #GENCAT=	gencat --new
 CHARSET=	charset

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:47: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 F3FCD106564A;
	Thu, 28 Apr 2011 14:47:42 +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 6B4C38FC12;
	Thu, 28 Apr 2011 14:47:41 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3SElbUS030615
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 28 Apr 2011 17:47:37 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id
	p3SElbp4093497; Thu, 28 Apr 2011 17:47:37 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3SElb8N093496; 
	Thu, 28 Apr 2011 17:47:37 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Thu, 28 Apr 2011 17:47:37 +0300
From: Kostik Belousov 
To: John Baldwin 
Message-ID: <20110428144737.GB48734@deviant.kiev.zoral.com.ua>
References: <201104281427.p3SERHo1026817@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="zGqVP2YgkFRp/g3j"
Content-Disposition: inline
In-Reply-To: <201104281427.p3SERHo1026817@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.4 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: r221166 - in head/sys: fs/ext2fs modules/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:47:43 -0000


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

On Thu, Apr 28, 2011 at 02:27:17PM +0000, John Baldwin wrote:
> Author: jhb
> Date: Thu Apr 28 14:27:17 2011
> New Revision: 221166
> URL: http://svn.freebsd.org/changeset/base/221166
>=20
> Log:
>   Sync with several changes in UFS/FFS:
>   - 77115: Implement support for O_DIRECT.
>   - 98425: Fix a performance issue introduced in 70131 that was causing
>     reads before writes even when writing full blocks.
>   - 98658: Rename the BALLOC flags from B_* to BA_* to avoid confusion wi=
th
>     the struct buf B_ flags.
>   - 100344: Merge the BA_ and IO_ flags so so that they may both be used =
in
>     the same flags word. This merger is possible by assigning the IO_ fla=
gs
>     to the low sixteen bits and the BA_ flags the high sixteen bits.
>   - 105422: Fix a file-rewrite performance case.
>   - 129545: Implement IO_INVAL in VOP_WRITE() by marking the buffer as
>     "no cache".
>   - Readd the DOINGASYNC() macro and use it to control asynchronous write=
s.
>     Change i-node updates to honor DOINGASYNC() instead of always being
>     synchronous.
>   - Use a PRIV_VFS_RETAINSUGID check instead of checking cr_uid against 0
>     directly when deciding whether or not to clear suid and sgid bits.
>  =20
>   Submitted by:	Pedro F. Giffuni  giffunip at yahoo
>=20

> @@ -141,10 +162,42 @@ READ(ap)
>  		if (error)
>  			break;
> =20
> -		bqrelse(bp);
> +		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
> +		   (LIST_FIRST(&bp->b_dep) =3D=3D NULL)) {
> +			/*
> +			 * If there are no dependencies, and it's VMIO,
There is no dependencies for ext2fs, the FFS comments talks about SU.

Also, I am unsure what the resulting semantic of O_DIRECTIO for ext2
is ? UFS tries to eliminate any use of buffer cache for O_DIRECTIO
case, up to the mapping of user pages into pbuf to perform the
actual i/o. In ext2 case, it seems we will just destroy the buffers
after using them for i/o. Is it useful ?


--zGqVP2YgkFRp/g3j
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iEYEARECAAYFAk25fgkACgkQC3+MBN1Mb4jmSgCgi2R5XScqXS6lzLZN6H62KL09
g20AoOqUTEF1cN7DUZsVKzm7uzf9V3Tv
=2UAt
-----END PGP SIGNATURE-----

--zGqVP2YgkFRp/g3j--

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:55: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 237B3106566C;
	Thu, 28 Apr 2011 14:55:35 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 11B118FC1A;
	Thu, 28 Apr 2011 14:55: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 p3SEtYs6028029;
	Thu, 28 Apr 2011 14:55:34 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEtY7x028027;
	Thu, 28 Apr 2011 14:55:34 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281455.p3SEtY7x028027@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:55:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221171 - stable/8/sys/dev/mxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:55:35 -0000

Author: gallatin
Date: Thu Apr 28 14:55:34 2011
New Revision: 221171
URL: http://svn.freebsd.org/changeset/base/221171

Log:
  MFC r220424:
    Fix a bug in mxge's LRO which can cause dup acks to
    get aggregated & hence prevent TCP from entering
    fast retransmit.
  
    Pointed out by: jeff
    Reviewed by: gnn

Modified:
  stable/8/sys/dev/mxge/mxge_lro.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/mxge/mxge_lro.c
==============================================================================
--- stable/8/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:43:38 2011	(r221170)
+++ stable/8/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:55:34 2011	(r221171)
@@ -237,8 +237,10 @@ mxge_lro_rx(struct mxge_slice_state *ss,
 		    lro->dest_ip == ip->ip_dst.s_addr) {
 			/* Try to append it */
 
-			if (__predict_false(seq != lro->next_seq)) {
-				/* out of order packet */
+			if (__predict_false(seq != lro->next_seq ||
+				    (tcp_data_len == 0 &&
+				     lro->ack_seq == tcp->th_ack))) {
+				/* out of order packet or dup ack */
 				SLIST_REMOVE(&ss->lro_active, lro,
 					     lro_entry, next);
 				mxge_lro_flush(ss, lro);

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 14:55: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 DFF5A1065768;
	Thu, 28 Apr 2011 14:55:43 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2BAEF8FC0C;
	Thu, 28 Apr 2011 14:55: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 p3SEtgfh028069;
	Thu, 28 Apr 2011 14:55:42 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SEtgOM028068;
	Thu, 28 Apr 2011 14:55:42 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <201104281455.p3SEtgOM028068@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 28 Apr 2011 14:55:42 +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: r221172 - stable/7/sys/dev/mxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 14:55:44 -0000

Author: gallatin
Date: Thu Apr 28 14:55:41 2011
New Revision: 221172
URL: http://svn.freebsd.org/changeset/base/221172

Log:
  MFC r220424:
    Fix a bug in mxge's LRO which can cause dup acks to
    get aggregated & hence prevent TCP from entering
    fast retransmit.
  
    Pointed out by: jeff
    Reviewed by: gnn

Modified:
  stable/7/sys/dev/mxge/mxge_lro.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/mxge/mxge_lro.c
==============================================================================
--- stable/7/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:55:34 2011	(r221171)
+++ stable/7/sys/dev/mxge/mxge_lro.c	Thu Apr 28 14:55:41 2011	(r221172)
@@ -234,8 +234,10 @@ mxge_lro_rx(struct mxge_slice_state *ss,
 		    lro->dest_ip == ip->ip_dst.s_addr) {
 			/* Try to append it */
 
-			if (__predict_false(seq != lro->next_seq)) {
-				/* out of order packet */
+			if (__predict_false(seq != lro->next_seq ||
+				    (tcp_data_len == 0 &&
+				     lro->ack_seq == tcp->th_ack))) {
+				/* out of order packet or dup ack */
 				SLIST_REMOVE(&ss->lro_active, lro,
 					     lro_entry, next);
 				mxge_lro_flush(ss, lro);

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 16:02: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 8C290106573B;
	Thu, 28 Apr 2011 16:02:06 +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 6F32F8FC1D;
	Thu, 28 Apr 2011 16:02: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 p3SG26Ls030107;
	Thu, 28 Apr 2011 16:02:06 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SG265H030096;
	Thu, 28 Apr 2011 16:02:06 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201104281602.p3SG265H030096@svn.freebsd.org>
From: Attilio Rao 
Date: Thu, 28 Apr 2011 16:02: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: r221173 - in head/sys: amd64/amd64 arm/arm i386/i386
	ia64/ia64 kern mips/mips powerpc/powerpc x86/x86
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 16:02:06 -0000

Author: attilio
Date: Thu Apr 28 16:02:05 2011
New Revision: 221173
URL: http://svn.freebsd.org/changeset/base/221173

Log:
  Add the watchdogs patting during the (shutdown time) disk syncing and
  disk dumping.
  With the option SW_WATCHDOG on, these operations are doomed to let
  watchdog fire, fi they take too long.
  
  I implemented the stubs this way because I really want wdog_kern_*
  KPI to not be dependant by SW_WATCHDOG being on (and really, the option
  only enables watchdog activation in hardclock) and also avoid to
  call them when not necessary (avoiding not-volountary watchdog
  activations).
  
  Sponsored by:	Sandvine Incorporated
  Discussed with:	emaste, des
  MFC after:	2 weeks

Modified:
  head/sys/amd64/amd64/minidump_machdep.c
  head/sys/arm/arm/dump_machdep.c
  head/sys/arm/arm/minidump_machdep.c
  head/sys/i386/i386/minidump_machdep.c
  head/sys/ia64/ia64/dump_machdep.c
  head/sys/kern/kern_shutdown.c
  head/sys/kern/vfs_subr.c
  head/sys/mips/mips/dump_machdep.c
  head/sys/powerpc/powerpc/dump_machdep.c
  head/sys/x86/x86/dump_machdep.c

Modified: head/sys/amd64/amd64/minidump_machdep.c
==============================================================================
--- head/sys/amd64/amd64/minidump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/amd64/amd64/minidump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -167,6 +172,9 @@ blk_write(struct dumperinfo *di, char *p
 			report_progress(progress, dumpsize);
 			counter &= (1<<24) - 1;
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		if (ptr) {
 			error = dump_write(di, ptr, 0, dumplo, len);
 			if (error)

Modified: head/sys/arm/arm/dump_machdep.c
==============================================================================
--- head/sys/arm/arm/dump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/arm/arm/dump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -35,6 +37,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -189,6 +194,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
 			cpu_tlb_flushID_SE(0);
 			cpu_cpwait();
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		error = dump_write(di, 
 		    (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz);
 		if (error)

Modified: head/sys/arm/arm/minidump_machdep.c
==============================================================================
--- head/sys/arm/arm/minidump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/arm/arm/minidump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -29,6 +29,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -36,6 +38,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p
 			counter &= (1<<22) - 1;
 		}
 
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		if (ptr) {
 			error = dump_write(di, ptr, 0, dumplo, len);
 			if (error)

Modified: head/sys/i386/i386/minidump_machdep.c
==============================================================================
--- head/sys/i386/i386/minidump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/i386/i386/minidump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p
 			printf(" %lld", PG2MB(progress >> PAGE_SHIFT));
 			counter &= (1<<24) - 1;
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		if (ptr) {
 			error = dump_write(di, ptr, 0, dumplo, len);
 			if (error)

Modified: head/sys/ia64/ia64/dump_machdep.c
==============================================================================
--- head/sys/ia64/ia64/dump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/ia64/ia64/dump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,12 +27,17 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -125,6 +130,9 @@ cb_dumpdata(struct efi_md *mdp, int seqn
 			printf("%c\b", "|/-\\"[twiddle++ & 3]);
 			counter &= (1<<24) - 1;
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		error = dump_write(di, (void*)pa, 0, dumplo, sz);
 		if (error)
 			break;

Modified: head/sys/kern/kern_shutdown.c
==============================================================================
--- head/sys/kern/kern_shutdown.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/kern/kern_shutdown.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_panic.h"
 #include "opt_show_busybufs.h"
 #include "opt_sched.h"
+#include "opt_watchdog.h"
 
 #include 
 #include 
@@ -65,6 +66,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 
 #include 
 
@@ -310,6 +314,9 @@ kern_reboot(int howto)
 
 		waittime = 0;
 
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		sync(curthread, NULL);
 
 		/*
@@ -335,6 +342,9 @@ kern_reboot(int howto)
 			if (nbusy < pbusy)
 				iter = 0;
 			pbusy = nbusy;
+#ifdef SW_WATCHDOG
+			wdog_kern_pat(WD_LASTVAL);
+#endif
 			sync(curthread, NULL);
 
 #ifdef PREEMPTION

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/kern/vfs_subr.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -42,6 +42,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ddb.h"
+#include "opt_watchdog.h"
 
 #include 
 #include 
@@ -72,6 +73,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 
 #include 
 
@@ -1839,6 +1843,10 @@ sched_sync(void)
 				LIST_INSERT_HEAD(next, bo, bo_synclist);
 				continue;
 			}
+#ifdef SW_WATCHDOG
+			if (first_printf == 0)
+				wdog_kern_pat(WD_LASTVAL);
+#endif
 		}
 		if (!LIST_EMPTY(gslp)) {
 			mtx_unlock(&sync_mtx);

Modified: head/sys/mips/mips/dump_machdep.c
==============================================================================
--- head/sys/mips/mips/dump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/mips/mips/dump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -35,6 +37,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -182,6 +187,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
 			counter &= (1<<24) - 1;
 		}
 
+#ifdef SW_WATCHDOG
+		wdog_kern_path(WD_LASTVAL);
+#endif
 		error = dump_write(di, (void *)(intptr_t)(pa),0, dumplo, sz); /* XXX fix PA */
 		if (error)
 			break;

Modified: head/sys/powerpc/powerpc/dump_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/dump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/powerpc/powerpc/dump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -129,6 +134,9 @@ cb_dumpdata(struct pmap_md *md, int seqn
 			printf("%c\b", "|/-\\"[twiddle++ & 3]);
 			counter &= (1<<24) - 1;
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		error = di->dumper(di->priv, (void*)va, 0, dumplo, sz);
 		pmap_dumpsys_unmap(md, ofs, va);
 		if (error)

Modified: head/sys/x86/x86/dump_machdep.c
==============================================================================
--- head/sys/x86/x86/dump_machdep.c	Thu Apr 28 14:55:41 2011	(r221172)
+++ head/sys/x86/x86/dump_machdep.c	Thu Apr 28 16:02:05 2011	(r221173)
@@ -27,6 +27,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_watchdog.h"
+
 #include 
 #include 
 #include 
@@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef SW_WATCHDOG
+#include 
+#endif
 #include 
 #include 
 #include 
@@ -193,6 +198,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
 			a = pa + i * PAGE_SIZE;
 			va = pmap_kenter_temporary(trunc_page(a), i);
 		}
+#ifdef SW_WATCHDOG
+		wdog_kern_pat(WD_LASTVAL);
+#endif
 		error = dump_write(di, va, 0, dumplo, sz);
 		if (error)
 			break;

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 16:18: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 118241065672;
	Thu, 28 Apr 2011 16:18:31 +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 F09BB8FC08;
	Thu, 28 Apr 2011 16:18: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 p3SGIUcV030641;
	Thu, 28 Apr 2011 16:18:30 GMT
	(envelope-from hselasky@svn.freebsd.org)
Received: (from hselasky@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SGIUqr030633;
	Thu, 28 Apr 2011 16:18:30 GMT
	(envelope-from hselasky@svn.freebsd.org)
Message-Id: <201104281618.p3SGIUqr030633@svn.freebsd.org>
From: Hans Petter Selasky 
Date: Thu, 28 Apr 2011 16:18: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: r221174 - in stable/8: sbin/geom/class/sched
	sbin/ifconfig sys/conf sys/dev/usb sys/dev/usb/controller
	sys/modules/usb/usb sys/net usr.sbin
	usr.sbin/bsnmpd/modules/snmp_hostres usr.sbin...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 16:18:31 -0000

Author: hselasky
Date: Thu Apr 28 16:18:30 2011
New Revision: 221174
URL: http://svn.freebsd.org/changeset/base/221174

Log:
  MFC r215649,r215764,r215802,r215804,r215810,r215812,r216091,r216267,r218165,r220301,r215651,r215803,r216138,r218010,r217558,r220312,r220314,r215846 and r216268.
  Backport USB PF and usbdump from head to 8-stable.
  
  Approved by:	thompsa

Added:
  stable/8/sys/dev/usb/usb_pf.c
     - copied, changed from r215649, head/sys/dev/usb/usb_pf.c
  stable/8/sys/dev/usb/usb_pf.h
     - copied, changed from r215649, head/sys/dev/usb/usb_pf.h
     - copied from r215651, head/usr.sbin/usbdump/
Directory Properties:
  stable/8/usr.sbin/usbdump/   (props changed)
Modified:
  stable/8/sbin/ifconfig/ifconfig.c
  stable/8/sys/conf/files
  stable/8/sys/dev/usb/controller/usb_controller.c
  stable/8/sys/dev/usb/usb_bus.h
  stable/8/sys/dev/usb/usb_freebsd.h
  stable/8/sys/dev/usb/usb_transfer.c
  stable/8/sys/dev/usb/usbdi.h
  stable/8/sys/modules/usb/usb/Makefile
  stable/8/sys/net/if.h
  stable/8/usr.sbin/Makefile   (contents, props changed)
  stable/8/usr.sbin/usbdump/usbdump.c
Directory Properties:
  stable/8/sbin/   (props changed)
  stable/8/sbin/atacontrol/   (props changed)
  stable/8/sbin/bsdlabel/   (props changed)
  stable/8/sbin/camcontrol/   (props changed)
  stable/8/sbin/conscontrol/   (props changed)
  stable/8/sbin/ddb/   (props changed)
  stable/8/sbin/devd/   (props changed)
  stable/8/sbin/devfs/   (props changed)
  stable/8/sbin/dhclient/   (props changed)
  stable/8/sbin/dump/   (props changed)
  stable/8/sbin/dumpfs/   (props changed)
  stable/8/sbin/fdisk/   (props changed)
  stable/8/sbin/fsck/   (props changed)
  stable/8/sbin/fsck_ffs/   (props changed)
  stable/8/sbin/fsck_msdosfs/   (props changed)
  stable/8/sbin/fsirand/   (props changed)
  stable/8/sbin/geom/   (props changed)
  stable/8/sbin/geom/class/multipath/   (props changed)
  stable/8/sbin/geom/class/part/   (props changed)
  stable/8/sbin/geom/class/sched/gsched.8   (props changed)
  stable/8/sbin/geom/class/stripe/   (props changed)
  stable/8/sbin/ggate/   (props changed)
  stable/8/sbin/growfs/   (props changed)
  stable/8/sbin/gvinum/   (props changed)
  stable/8/sbin/hastctl/   (props changed)
  stable/8/sbin/hastd/   (props changed)
  stable/8/sbin/ifconfig/   (props changed)
  stable/8/sbin/ipfw/   (props changed)
  stable/8/sbin/iscontrol/   (props changed)
  stable/8/sbin/kldload/   (props changed)
  stable/8/sbin/kldstat/   (props changed)
  stable/8/sbin/mdconfig/   (props changed)
  stable/8/sbin/mksnap_ffs/   (props changed)
  stable/8/sbin/mount/   (props changed)
  stable/8/sbin/mount_cd9660/   (props changed)
  stable/8/sbin/mount_msdosfs/   (props changed)
  stable/8/sbin/mount_nfs/   (props changed)
  stable/8/sbin/mount_unionfs/   (props changed)
  stable/8/sbin/natd/   (props changed)
  stable/8/sbin/newfs/   (props changed)
  stable/8/sbin/newfs_msdos/   (props changed)
  stable/8/sbin/ping6/   (props changed)
  stable/8/sbin/quotacheck/   (props changed)
  stable/8/sbin/reboot/   (props changed)
  stable/8/sbin/restore/   (props changed)
  stable/8/sbin/route/   (props changed)
  stable/8/sbin/routed/   (props changed)
  stable/8/sbin/setkey/   (props changed)
  stable/8/sbin/spppcontrol/   (props changed)
  stable/8/sbin/sysctl/   (props changed)
  stable/8/sbin/tunefs/   (props changed)
  stable/8/sbin/umount/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/usr.sbin/   (props changed)
  stable/8/usr.sbin/acpi/   (props changed)
  stable/8/usr.sbin/arp/   (props changed)
  stable/8/usr.sbin/asf/   (props changed)
  stable/8/usr.sbin/bluetooth/   (props changed)
  stable/8/usr.sbin/bluetooth/bthidcontrol/   (props changed)
  stable/8/usr.sbin/bluetooth/bthidd/   (props changed)
  stable/8/usr.sbin/bluetooth/l2control/   (props changed)
  stable/8/usr.sbin/bluetooth/l2ping/   (props changed)
  stable/8/usr.sbin/boot0cfg/   (props changed)
  stable/8/usr.sbin/bsnmpd/   (props changed)
  stable/8/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c   (props changed)
  stable/8/usr.sbin/burncd/   (props changed)
  stable/8/usr.sbin/cdcontrol/   (props changed)
  stable/8/usr.sbin/chown/   (props changed)
  stable/8/usr.sbin/config/   (props changed)
  stable/8/usr.sbin/config/SMM.doc/   (props changed)
  stable/8/usr.sbin/cpucontrol/   (props changed)
  stable/8/usr.sbin/crashinfo/   (props changed)
  stable/8/usr.sbin/cron/   (props changed)
  stable/8/usr.sbin/crunch/examples/   (props changed)
  stable/8/usr.sbin/ctm/   (props changed)
  stable/8/usr.sbin/cxgbtool/   (props changed)
  stable/8/usr.sbin/devinfo/   (props changed)
  stable/8/usr.sbin/diskinfo/   (props changed)
  stable/8/usr.sbin/dumpcis/cardinfo.h   (props changed)
  stable/8/usr.sbin/dumpcis/cis.h   (props changed)
  stable/8/usr.sbin/faithd/   (props changed)
  stable/8/usr.sbin/fdcontrol/   (props changed)
  stable/8/usr.sbin/fdformat/   (props changed)
  stable/8/usr.sbin/fdread/   (props changed)
  stable/8/usr.sbin/fdwrite/   (props changed)
  stable/8/usr.sbin/fifolog/   (props changed)
  stable/8/usr.sbin/flowctl/   (props changed)
  stable/8/usr.sbin/freebsd-update/   (props changed)
  stable/8/usr.sbin/i2c/   (props changed)
  stable/8/usr.sbin/inetd/   (props changed)
  stable/8/usr.sbin/iostat/   (props changed)
  stable/8/usr.sbin/jail/   (props changed)
  stable/8/usr.sbin/jls/   (props changed)
  stable/8/usr.sbin/lpr/   (props changed)
  stable/8/usr.sbin/mailwrapper/   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  stable/8/usr.sbin/makefs/getid.c   (props changed)
  stable/8/usr.sbin/mergemaster/   (props changed)
  stable/8/usr.sbin/mfiutil/   (props changed)
  stable/8/usr.sbin/mountd/   (props changed)
  stable/8/usr.sbin/moused/   (props changed)
  stable/8/usr.sbin/mptutil/   (props changed)
  stable/8/usr.sbin/mtest/   (props changed)
  stable/8/usr.sbin/mtree/   (props changed)
  stable/8/usr.sbin/named/   (props changed)
  stable/8/usr.sbin/ndp/   (props changed)
  stable/8/usr.sbin/newsyslog/   (props changed)
  stable/8/usr.sbin/nfsd/   (props changed)
  stable/8/usr.sbin/nfsdumpstate/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)
  stable/8/usr.sbin/pciconf/   (props changed)
  stable/8/usr.sbin/periodic/   (props changed)
  stable/8/usr.sbin/pkg_install/   (props changed)
  stable/8/usr.sbin/pmcannotate/   (props changed)
  stable/8/usr.sbin/pmccontrol/   (props changed)
  stable/8/usr.sbin/pmcstat/   (props changed)
  stable/8/usr.sbin/powerd/   (props changed)
  stable/8/usr.sbin/ppp/   (props changed)
  stable/8/usr.sbin/pppctl/   (props changed)
  stable/8/usr.sbin/pstat/   (props changed)
  stable/8/usr.sbin/pw/   (props changed)
  stable/8/usr.sbin/rpc.lockd/   (props changed)
  stable/8/usr.sbin/rpc.umntall/   (props changed)
  stable/8/usr.sbin/rpcbind/   (props changed)
  stable/8/usr.sbin/rtadvd/   (props changed)
  stable/8/usr.sbin/rtsold/   (props changed)
  stable/8/usr.sbin/sade/   (props changed)
  stable/8/usr.sbin/service/   (props changed)
  stable/8/usr.sbin/services_mkdb/   (props changed)
  stable/8/usr.sbin/setfmac/   (props changed)
  stable/8/usr.sbin/setpmac/   (props changed)
  stable/8/usr.sbin/smbmsg/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/syslogd/   (props changed)
  stable/8/usr.sbin/traceroute/   (props changed)
  stable/8/usr.sbin/traceroute6/   (props changed)
  stable/8/usr.sbin/tzsetup/   (props changed)
  stable/8/usr.sbin/uathload/   (props changed)
  stable/8/usr.sbin/ugidfw/   (props changed)
  stable/8/usr.sbin/uhsoctl/   (props changed)
  stable/8/usr.sbin/usbconfig/   (props changed)
  stable/8/usr.sbin/vidcontrol/   (props changed)
  stable/8/usr.sbin/watchdogd/   (props changed)
  stable/8/usr.sbin/wpa/   (props changed)
  stable/8/usr.sbin/ypserv/   (props changed)
  stable/8/usr.sbin/zic/   (props changed)

Modified: stable/8/sbin/ifconfig/ifconfig.c
==============================================================================
--- stable/8/sbin/ifconfig/ifconfig.c	Thu Apr 28 16:02:05 2011	(r221173)
+++ stable/8/sbin/ifconfig/ifconfig.c	Thu Apr 28 16:18:30 2011	(r221174)
@@ -305,6 +305,8 @@ main(int argc, char *argv[])
 		}
 		cp = ifa->ifa_name;
 
+		if ((ifa->ifa_flags & IFF_CANTCONFIG) != 0)
+			continue;
 		if (downonly && (ifa->ifa_flags & IFF_UP) != 0)
 			continue;
 		if (uponly && (ifa->ifa_flags & IFF_UP) == 0)

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Thu Apr 28 16:02:05 2011	(r221173)
+++ stable/8/sys/conf/files	Thu Apr 28 16:18:30 2011	(r221174)
@@ -1749,6 +1749,7 @@ dev/usb/usb_lookup.c		optional usb
 dev/usb/usb_mbuf.c		optional usb
 dev/usb/usb_msctest.c		optional usb
 dev/usb/usb_parse.c		optional usb
+dev/usb/usb_pf.c		optional usb
 dev/usb/usb_process.c		optional usb
 dev/usb/usb_request.c		optional usb
 dev/usb/usb_transfer.c		optional usb

Modified: stable/8/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- stable/8/sys/dev/usb/controller/usb_controller.c	Thu Apr 28 16:02:05 2011	(r221173)
+++ stable/8/sys/dev/usb/controller/usb_controller.c	Thu Apr 28 16:18:30 2011	(r221174)
@@ -60,6 +60,7 @@
 
 #include 
 #include 
+#include 
 
 /* function prototypes  */
 
@@ -205,6 +206,9 @@ usb_detach(device_t dev)
 
 	usb_proc_free(&bus->control_xfer_proc);
 
+#if USB_HAVE_PF
+	usbpf_detach(bus);
+#endif
 	return (0);
 }
 
@@ -433,6 +437,9 @@ usb_attach_sub(device_t dev, struct usb_
 		usb_devclass_ptr = devclass_find("usbus");
 	mtx_unlock(&Giant);
 
+#if USB_HAVE_PF
+	usbpf_attach(bus);
+#endif
 	/* Initialise USB process messages */
 	bus->explore_msg[0].hdr.pm_callback = &usb_bus_explore;
 	bus->explore_msg[0].bus = bus;
@@ -595,3 +602,4 @@ usb_bus_mem_free_all(struct usb_bus *bus
 
 	mtx_destroy(&bus->bus_mtx);
 }
+

Modified: stable/8/sys/dev/usb/usb_bus.h
==============================================================================
--- stable/8/sys/dev/usb/usb_bus.h	Thu Apr 28 16:02:05 2011	(r221173)
+++ stable/8/sys/dev/usb/usb_bus.h	Thu Apr 28 16:18:30 2011	(r221174)
@@ -86,6 +86,8 @@ struct usb_bus {
 	struct usb_bus_methods *methods;	/* filled by HC driver */
 	struct usb_device **devices;
 
+	struct ifnet *ifp;	/* only for USB Packet Filter */
+
 	usb_power_mask_t hw_power_state;	/* see USB_HW_POWER_XXX */
 	usb_size_t uframe_usage[USB_HS_MICRO_FRAMES_MAX];
 

Modified: stable/8/sys/dev/usb/usb_freebsd.h
==============================================================================
--- stable/8/sys/dev/usb/usb_freebsd.h	Thu Apr 28 16:02:05 2011	(r221173)
+++ stable/8/sys/dev/usb/usb_freebsd.h	Thu Apr 28 16:18:30 2011	(r221174)
@@ -40,6 +40,7 @@
 #define	USB_HAVE_TT_SUPPORT 1
 #define	USB_HAVE_POWERD 1
 #define	USB_HAVE_MSCTEST 1
+#define	USB_HAVE_PF 1
 
 #define	USB_TD_GET_PROC(td) (td)->td_proc
 #define	USB_PROC_GET_GID(td) (td)->p_pgid

Copied and modified: stable/8/sys/dev/usb/usb_pf.c (from r215649, head/sys/dev/usb/usb_pf.c)
==============================================================================
--- head/sys/dev/usb/usb_pf.c	Mon Nov 22 01:11:28 2010	(r215649, copy source)
+++ stable/8/sys/dev/usb/usb_pf.c	Thu Apr 28 16:18:30 2011	(r221174)
@@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -55,1623 +58,58 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-/*
- * All usbpf implementations are extracted from bpf(9) APIs and it's
- * specialized for USB packet filtering between the driver and the host
- * controller.
- */
-
-MALLOC_DEFINE(M_USBPF, "USBPktFilter", "USB Packet Filter");
-
-/*
- * Rotate the packet buffers in descriptor ud.  Move the store buffer into the
- * hold slot, and the free buffer ino the store slot.  Zero the length of the
- * new store buffer.  Descriptor lock should be held.
- */
-#define	USBPF_ROTATE_BUFFERS(ud)	do {				\
-	(ud)->ud_hbuf = (ud)->ud_sbuf;					\
-	(ud)->ud_hlen = (ud)->ud_slen;					\
-	(ud)->ud_sbuf = (ud)->ud_fbuf;					\
-	(ud)->ud_slen = 0;						\
-	(ud)->ud_fbuf = NULL;						\
-	usbpf_bufheld(ud);						\
-} while (0)
+static int usb_no_pf;
 
-#ifndef __i386__
-#define	USBPF_ALIGN
-#endif
-
-#ifndef USBPF_ALIGN
-#define	USBPF_EXTRACT_SHORT(p)	((u_int16_t)ntohs(*(u_int16_t *)p))
-#define	USBPF_EXTRACT_LONG(p)	(ntohl(*(u_int32_t *)p))
-#else
-#define	USBPF_EXTRACT_SHORT(p)						\
-	((u_int16_t)							\
-	    ((u_int16_t)*((u_char *)p+0)<<8|				\
-		(u_int16_t)*((u_char *)p+1)<<0))
-#define	USBPF_EXTRACT_LONG(p)						\
-	((u_int32_t)*((u_char *)p+0)<<24|				\
-	    (u_int32_t)*((u_char *)p+1)<<16|				\
-	    (u_int32_t)*((u_char *)p+2)<<8|				\
-	    (u_int32_t)*((u_char *)p+3)<<0)
-#endif
-
-/*
- * Number of scratch memory words (for USBPF_LD|USBPF_MEM and USBPF_ST).
- */
-#define	USBPF_MEMWORDS		 16
-
-/* Values for ud_state */
-#define	USBPF_IDLE		0	/* no select in progress */
-#define	USBPF_WAITING		1	/* waiting for read timeout in select */
-#define	USBPF_TIMED_OUT		2	/* read timeout has expired in select */
-
-#define	PRIUSB			26	/* interruptible */
-
-/* Frame directions */
-enum usbpf_direction {
-	USBPF_D_IN,	/* See incoming frames */
-	USBPF_D_INOUT,	/* See incoming and outgoing frames */
-	USBPF_D_OUT	/* See outgoing frames */
-};
-
-static void	usbpf_append_bytes(struct usbpf_d *, caddr_t, u_int, void *,
-		    u_int);
-static void	usbpf_attachd(struct usbpf_d *, struct usbpf_if *);
-static void	usbpf_detachd(struct usbpf_d *);
-static int	usbpf_canfreebuf(struct usbpf_d *);
-static void	usbpf_buf_reclaimed(struct usbpf_d *);
-static int	usbpf_canwritebuf(struct usbpf_d *);
-
-static	d_open_t	usbpf_open;
-static	d_read_t	usbpf_read;
-static	d_write_t	usbpf_write;
-static	d_ioctl_t	usbpf_ioctl;
-static	d_poll_t	usbpf_poll;
-static	d_kqfilter_t	usbpf_kqfilter;
-
-static struct cdevsw usbpf_cdevsw = {
-	.d_version =	D_VERSION,
-	.d_open =	usbpf_open,
-	.d_read =	usbpf_read,
-	.d_write =	usbpf_write,
-	.d_ioctl =	usbpf_ioctl,
-	.d_poll =	usbpf_poll,
-	.d_name =	"usbpf",
-	.d_kqfilter =	usbpf_kqfilter,
-};
-
-static LIST_HEAD(, usbpf_if)	usbpf_iflist;
-static struct mtx	usbpf_mtx;		/* global lock */
-static int usbpf_uifd_cnt;
-
-static int usbpf_bufsize = 4096;
-#define	USBPF_MINBUFSIZE 32
-#define	USBPF_MAXBUFSIZE 0x80000
-static int usbpf_maxbufsize = USBPF_MAXBUFSIZE;
-#define	USBPF_MAXINSNS 512
-static int usbpf_maxinsns = USBPF_MAXINSNS;
-
-static void
-usbpf_buffer_init(struct usbpf_d *ud)
-{
-
-	ud->ud_bufsize = usbpf_bufsize;
-}
-
-/*
- * Free USBPF kernel buffers on device close.
- */
-static void
-usbpf_buffer_free(struct usbpf_d *ud)
-{
-
-	if (ud->ud_sbuf != NULL)
-		free(ud->ud_sbuf, M_USBPF);
-	if (ud->ud_hbuf != NULL)
-		free(ud->ud_hbuf, M_USBPF);
-	if (ud->ud_fbuf != NULL)
-		free(ud->ud_fbuf, M_USBPF);
-
-#ifdef INVARIANTS
-	ud->ud_sbuf = ud->ud_hbuf = ud->ud_fbuf = (caddr_t)~0;
-#endif
-}
-
-static void
-usbpf_buffer_alloc(struct usbpf_d *ud)
-{
-
-	KASSERT(ud->ud_fbuf == NULL, ("%s: ud_fbuf != NULL", __func__));
-	KASSERT(ud->ud_sbuf == NULL, ("%s: ud_sbuf != NULL", __func__));
-	KASSERT(ud->ud_hbuf == NULL, ("%s: ud_hbuf != NULL", __func__));
-
-	ud->ud_fbuf = (caddr_t)malloc(ud->ud_bufsize, M_USBPF, M_WAITOK);
-	ud->ud_sbuf = (caddr_t)malloc(ud->ud_bufsize, M_USBPF, M_WAITOK);
-	ud->ud_hbuf = NULL;
-	ud->ud_slen = 0;
-	ud->ud_hlen = 0;
-}
-
-/*
- * Copy buffer storage to user space in read().
- */
-static int
-usbpf_buffer_uiomove(struct usbpf_d *ud, caddr_t buf, u_int len,
-    struct uio *uio)
-{
-
-	return (uiomove(buf, len, uio));
-}
-
-/*
- * Simple data copy to the current kernel buffer.
- */
-static void
-usbpf_buffer_append_bytes(struct usbpf_d *ud, caddr_t buf, u_int offset,
-    void *src, u_int len)
-{
-	u_char *src_bytes;
-
-	src_bytes = (u_char *)src;
-	bcopy(src_bytes, buf + offset, len);
-}
-
-/*
- * Allocate or resize buffers.
- */
-static int
-usbpf_buffer_ioctl_sblen(struct usbpf_d *ud, u_int *i)
-{
-	u_int size;
-
-	USBPFD_LOCK(ud);
-	if (ud->ud_bif != NULL) {
-		USBPFD_UNLOCK(ud);
-		return (EINVAL);
-	}
-	size = *i;
-	if (size > usbpf_maxbufsize)
-		*i = size = usbpf_maxbufsize;
-	else if (size < USBPF_MINBUFSIZE)
-		*i = size = USBPF_MINBUFSIZE;
-	ud->ud_bufsize = size;
-	USBPFD_UNLOCK(ud);
-	return (0);
-}
-
-static const u_short	usbpf_code_map[] = {
-	0x10ff,	/* 0x00-0x0f: 1111111100001000 */
-	0x3070,	/* 0x10-0x1f: 0000111000001100 */
-	0x3131,	/* 0x20-0x2f: 1000110010001100 */
-	0x3031,	/* 0x30-0x3f: 1000110000001100 */
-	0x3131,	/* 0x40-0x4f: 1000110010001100 */
-	0x1011,	/* 0x50-0x5f: 1000100000001000 */
-	0x1013,	/* 0x60-0x6f: 1100100000001000 */
-	0x1010,	/* 0x70-0x7f: 0000100000001000 */
-	0x0093,	/* 0x80-0x8f: 1100100100000000 */
-	0x0000,	/* 0x90-0x9f: 0000000000000000 */
-	0x0000,	/* 0xa0-0xaf: 0000000000000000 */
-	0x0002,	/* 0xb0-0xbf: 0100000000000000 */
-	0x0000,	/* 0xc0-0xcf: 0000000000000000 */
-	0x0000,	/* 0xd0-0xdf: 0000000000000000 */
-	0x0000,	/* 0xe0-0xef: 0000000000000000 */
-	0x0000	/* 0xf0-0xff: 0000000000000000 */
-};
-
-#define	USBPF_VALIDATE_CODE(c)	\
-    ((c) <= 0xff && (usbpf_code_map[(c) >> 4] & (1 << ((c) & 0xf))) != 0)
-
-/*
- * Return true if the 'fcode' is a valid filter program.
- * The constraints are that each jump be forward and to a valid
- * code.  The code must terminate with either an accept or reject.
- *
- * The kernel needs to be able to verify an application's filter code.
- * Otherwise, a bogus program could easily crash the system.
- */
-static int
-usbpf_validate(const struct usbpf_insn *f, int len)
-{
-	register int i;
-	register const struct usbpf_insn *p;
-
-	/* Do not accept negative length filter. */
-	if (len < 0)
-		return (0);
-
-	/* An empty filter means accept all. */
-	if (len == 0)
-		return (1);
-
-	for (i = 0; i < len; ++i) {
-		p = &f[i];
-		/*
-		 * Check that the code is valid.
-		 */
-		if (!USBPF_VALIDATE_CODE(p->code))
-			return (0);
-		/*
-		 * Check that that jumps are forward, and within
-		 * the code block.
-		 */
-		if (USBPF_CLASS(p->code) == USBPF_JMP) {
-			register u_int offset;
-
-			if (p->code == (USBPF_JMP|USBPF_JA))
-				offset = p->k;
-			else
-				offset = p->jt > p->jf ? p->jt : p->jf;
-			if (offset >= (u_int)(len - i) - 1)
-				return (0);
-			continue;
-		}
-		/*
-		 * Check that memory operations use valid addresses.
-		 */
-		if (p->code == USBPF_ST || p->code == USBPF_STX ||
-		    p->code == (USBPF_LD|USBPF_MEM) ||
-		    p->code == (USBPF_LDX|USBPF_MEM)) {
-			if (p->k >= USBPF_MEMWORDS)
-				return (0);
-			continue;
-		}
-		/*
-		 * Check for constant division by 0.
-		 */
-		if (p->code == (USBPF_ALU|USBPF_DIV|USBPF_K) && p->k == 0)
-			return (0);
-	}
-	return (USBPF_CLASS(f[len - 1].code) == USBPF_RET);
-}
-
-#ifdef _KERNEL
-#define	MINDEX(m, k) \
-{ \
-	register int len = m->m_len; \
- \
-	while (k >= len) { \
-		k -= len; \
-		m = m->m_next; \
-		if (m == 0) \
-			return (0); \
-		len = m->m_len; \
-	} \
-}
-
-static u_int16_t	m_xhalf(struct mbuf *m, usbpf_u_int32 k, int *err);
-static u_int32_t	m_xword(struct mbuf *m, usbpf_u_int32 k, int *err);
-
-static u_int32_t
-m_xword(struct mbuf *m, usbpf_u_int32 k, int *err)
-{
-	size_t len;
-	u_char *cp, *np;
-	struct mbuf *m0;
-
-	len = m->m_len;
-	while (k >= len) {
-		k -= len;
-		m = m->m_next;
-		if (m == 0)
-			goto bad;
-		len = m->m_len;
-	}
-	cp = mtod(m, u_char *) + k;
-	if (len - k >= 4) {
-		*err = 0;
-		return (USBPF_EXTRACT_LONG(cp));
-	}
-	m0 = m->m_next;
-	if (m0 == 0 || m0->m_len + len - k < 4)
-		goto bad;
-	*err = 0;
-	np = mtod(m0, u_char *);
-	switch (len - k) {
-	case 1:
-		return (((u_int32_t)cp[0] << 24) |
-		    ((u_int32_t)np[0] << 16) |
-		    ((u_int32_t)np[1] << 8)  |
-		    (u_int32_t)np[2]);
-
-	case 2:
-		return (((u_int32_t)cp[0] << 24) |
-		    ((u_int32_t)cp[1] << 16) |
-		    ((u_int32_t)np[0] << 8) |
-		    (u_int32_t)np[1]);
-
-	default:
-		return (((u_int32_t)cp[0] << 24) |
-		    ((u_int32_t)cp[1] << 16) |
-		    ((u_int32_t)cp[2] << 8) |
-		    (u_int32_t)np[0]);
-	}
-    bad:
-	*err = 1;
-	return (0);
-}
-
-static u_int16_t
-m_xhalf(struct mbuf *m, usbpf_u_int32 k, int *err)
-{
-	size_t len;
-	u_char *cp;
-	struct mbuf *m0;
-
-	len = m->m_len;
-	while (k >= len) {
-		k -= len;
-		m = m->m_next;
-		if (m == 0)
-			goto bad;
-		len = m->m_len;
-	}
-	cp = mtod(m, u_char *) + k;
-	if (len - k >= 2) {
-		*err = 0;
-		return (USBPF_EXTRACT_SHORT(cp));
-	}
-	m0 = m->m_next;
-	if (m0 == 0)
-		goto bad;
-	*err = 0;
-	return ((cp[0] << 8) | mtod(m0, u_char *)[0]);
- bad:
-	*err = 1;
-	return (0);
-}
-#endif
-
-/*
- * Execute the filter program starting at pc on the packet p
- * wirelen is the length of the original packet
- * buflen is the amount of data present
- */
-static u_int
-usbpf_filter(const struct usbpf_insn *pc, u_char *p, u_int wirelen,
-    u_int buflen)
-{
-	u_int32_t A = 0, X = 0;
-	usbpf_u_int32 k;
-	u_int32_t mem[USBPF_MEMWORDS];
-
-	/*
-	 * XXX temporarily the filter system is disabled because currently it
-	 * could not handle the some machine code properly that leads to
-	 * kernel crash by invalid usage.
-	 */
-	return ((u_int)-1);
-
-	if (pc == NULL)
-		/*
-		 * No filter means accept all.
-		 */
-		return ((u_int)-1);
-
-	--pc;
-	while (1) {
-		++pc;
-		switch (pc->code) {
-		default:
-#ifdef _KERNEL
-			return (0);
-#else
-			abort();
-#endif
-
-		case USBPF_RET|USBPF_K:
-			return ((u_int)pc->k);
-
-		case USBPF_RET|USBPF_A:
-			return ((u_int)A);
-
-		case USBPF_LD|USBPF_W|USBPF_ABS:
-			k = pc->k;
-			if (k > buflen || sizeof(int32_t) > buflen - k) {
-#ifdef _KERNEL
-				int merr;
-
-				if (buflen != 0)
-					return (0);
-				A = m_xword((struct mbuf *)p, k, &merr);
-				if (merr != 0)
-					return (0);
-				continue;
-#else
-				return (0);
-#endif
-			}
-#ifdef USBPF_ALIGN
-			if (((intptr_t)(p + k) & 3) != 0)
-				A = USBPF_EXTRACT_LONG(&p[k]);
-			else
-#endif
-				A = ntohl(*(int32_t *)(p + k));
-			continue;
-
-		case USBPF_LD|USBPF_H|USBPF_ABS:
-			k = pc->k;
-			if (k > buflen || sizeof(int16_t) > buflen - k) {
-#ifdef _KERNEL
-				int merr;
-
-				if (buflen != 0)
-					return (0);
-				A = m_xhalf((struct mbuf *)p, k, &merr);
-				continue;
-#else
-				return (0);
-#endif
-			}
-			A = USBPF_EXTRACT_SHORT(&p[k]);
-			continue;
+SYSCTL_INT(_hw_usb, OID_AUTO, no_pf, CTLFLAG_RW,
+    &usb_no_pf, 0, "Set to disable USB packet filtering");
 
-		case USBPF_LD|USBPF_B|USBPF_ABS:
-			k = pc->k;
-			if (k >= buflen) {
-#ifdef _KERNEL
-				struct mbuf *m;
-
-				if (buflen != 0)
-					return (0);
-				m = (struct mbuf *)p;
-				MINDEX(m, k);
-				A = mtod(m, u_char *)[k];
-				continue;
-#else
-				return (0);
-#endif
-			}
-			A = p[k];
-			continue;
-
-		case USBPF_LD|USBPF_W|USBPF_LEN:
-			A = wirelen;
-			continue;
-
-		case USBPF_LDX|USBPF_W|USBPF_LEN:
-			X = wirelen;
-			continue;
-
-		case USBPF_LD|USBPF_W|USBPF_IND:
-			k = X + pc->k;
-			if (pc->k > buflen || X > buflen - pc->k ||
-			    sizeof(int32_t) > buflen - k) {
-#ifdef _KERNEL
-				int merr;
-
-				if (buflen != 0)
-					return (0);
-				A = m_xword((struct mbuf *)p, k, &merr);
-				if (merr != 0)
-					return (0);
-				continue;
-#else
-				return (0);
-#endif
-			}
-#ifdef USBPF_ALIGN
-			if (((intptr_t)(p + k) & 3) != 0)
-				A = USBPF_EXTRACT_LONG(&p[k]);
-			else
-#endif
-				A = ntohl(*(int32_t *)(p + k));
-			continue;
-
-		case USBPF_LD|USBPF_H|USBPF_IND:
-			k = X + pc->k;
-			if (X > buflen || pc->k > buflen - X ||
-			    sizeof(int16_t) > buflen - k) {
-#ifdef _KERNEL
-				int merr;
-
-				if (buflen != 0)
-					return (0);
-				A = m_xhalf((struct mbuf *)p, k, &merr);
-				if (merr != 0)
-					return (0);
-				continue;
-#else
-				return (0);
-#endif
-			}
-			A = USBPF_EXTRACT_SHORT(&p[k]);
-			continue;
-
-		case USBPF_LD|USBPF_B|USBPF_IND:
-			k = X + pc->k;
-			if (pc->k >= buflen || X >= buflen - pc->k) {
-#ifdef _KERNEL
-				struct mbuf *m;
-
-				if (buflen != 0)
-					return (0);
-				m = (struct mbuf *)p;
-				MINDEX(m, k);
-				A = mtod(m, u_char *)[k];
-				continue;
-#else
-				return (0);
-#endif
-			}
-			A = p[k];
-			continue;
-
-		case USBPF_LDX|USBPF_MSH|USBPF_B:
-			k = pc->k;
-			if (k >= buflen) {
-#ifdef _KERNEL
-				register struct mbuf *m;
-
-				if (buflen != 0)
-					return (0);
-				m = (struct mbuf *)p;
-				MINDEX(m, k);
-				X = (mtod(m, u_char *)[k] & 0xf) << 2;
-				continue;
-#else
-				return (0);
-#endif
-			}
-			X = (p[pc->k] & 0xf) << 2;
-			continue;
-
-		case USBPF_LD|USBPF_IMM:
-			A = pc->k;
-			continue;
-
-		case USBPF_LDX|USBPF_IMM:
-			X = pc->k;
-			continue;
-
-		case USBPF_LD|USBPF_MEM:
-			A = mem[pc->k];
-			continue;
-
-		case USBPF_LDX|USBPF_MEM:
-			X = mem[pc->k];
-			continue;
-
-		case USBPF_ST:
-			mem[pc->k] = A;
-			continue;
-
-		case USBPF_STX:
-			mem[pc->k] = X;
-			continue;
-
-		case USBPF_JMP|USBPF_JA:
-			pc += pc->k;
-			continue;
-
-		case USBPF_JMP|USBPF_JGT|USBPF_K:
-			pc += (A > pc->k) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JGE|USBPF_K:
-			pc += (A >= pc->k) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JEQ|USBPF_K:
-			pc += (A == pc->k) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JSET|USBPF_K:
-			pc += (A & pc->k) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JGT|USBPF_X:
-			pc += (A > X) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JGE|USBPF_X:
-			pc += (A >= X) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JEQ|USBPF_X:
-			pc += (A == X) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_JMP|USBPF_JSET|USBPF_X:
-			pc += (A & X) ? pc->jt : pc->jf;
-			continue;
-
-		case USBPF_ALU|USBPF_ADD|USBPF_X:
-			A += X;
-			continue;
-
-		case USBPF_ALU|USBPF_SUB|USBPF_X:
-			A -= X;
-			continue;
-
-		case USBPF_ALU|USBPF_MUL|USBPF_X:
-			A *= X;
-			continue;
-
-		case USBPF_ALU|USBPF_DIV|USBPF_X:
-			if (X == 0)
-				return (0);
-			A /= X;
-			continue;
-
-		case USBPF_ALU|USBPF_AND|USBPF_X:
-			A &= X;
-			continue;
-
-		case USBPF_ALU|USBPF_OR|USBPF_X:
-			A |= X;
-			continue;
-
-		case USBPF_ALU|USBPF_LSH|USBPF_X:
-			A <<= X;
-			continue;
-
-		case USBPF_ALU|USBPF_RSH|USBPF_X:
-			A >>= X;
-			continue;
-
-		case USBPF_ALU|USBPF_ADD|USBPF_K:
-			A += pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_SUB|USBPF_K:
-			A -= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_MUL|USBPF_K:
-			A *= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_DIV|USBPF_K:
-			A /= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_AND|USBPF_K:
-			A &= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_OR|USBPF_K:
-			A |= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_LSH|USBPF_K:
-			A <<= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_RSH|USBPF_K:
-			A >>= pc->k;
-			continue;
-
-		case USBPF_ALU|USBPF_NEG:
-			A = -A;
-			continue;
-
-		case USBPF_MISC|USBPF_TAX:
-			X = A;
-			continue;
-
-		case USBPF_MISC|USBPF_TXA:
-			A = X;
-			continue;
-		}
-	}
-}
-
-static void
-usbpf_free(struct usbpf_d *ud)
-{
-
-	switch (ud->ud_bufmode) {
-	case USBPF_BUFMODE_BUFFER:
-		return (usbpf_buffer_free(ud));
-	default:
-		panic("usbpf_buf_free");
-	}
-}
+TUNABLE_INT("hw.usb.no_pf", &usb_no_pf);
 
-/*
- * Notify the buffer model that a buffer has moved into the hold position.
- */
-static void
-usbpf_bufheld(struct usbpf_d *ud)
-{
-
-	USBPFD_LOCK_ASSERT(ud);
-}
-
-/*
- * Free buffers currently in use by a descriptor.
- * Called on close.
- */
-static void
-usbpf_freed(struct usbpf_d *ud)
-{
-
-	/*
-	 * We don't need to lock out interrupts since this descriptor has
-	 * been detached from its interface and it yet hasn't been marked
-	 * free.
-	 */
-	usbpf_free(ud);
-	if (ud->ud_rfilter != NULL)
-		free((caddr_t)ud->ud_rfilter, M_USBPF);
-	if (ud->ud_wfilter != NULL)
-		free((caddr_t)ud->ud_wfilter, M_USBPF);
-	mtx_destroy(&ud->ud_mtx);
-}
-
-/*
- * Close the descriptor by detaching it from its interface,
- * deallocating its buffers, and marking it free.
- */
-static void
-usbpf_dtor(void *data)
-{
-	struct usbpf_d *ud = data;
-
-	USBPFD_LOCK(ud);
-	if (ud->ud_state == USBPF_WAITING)
-		callout_stop(&ud->ud_callout);
-	ud->ud_state = USBPF_IDLE;
-	USBPFD_UNLOCK(ud);
-	funsetown(&ud->ud_sigio);
-	mtx_lock(&usbpf_mtx);
-	if (ud->ud_bif)
-		usbpf_detachd(ud);
-	mtx_unlock(&usbpf_mtx);
-	selwakeuppri(&ud->ud_sel, PRIUSB);
-	knlist_destroy(&ud->ud_sel.si_note);
-	callout_drain(&ud->ud_callout);
-	usbpf_freed(ud);
-	free(ud, M_USBPF);
-}
-
-/*
- * Open device.  Returns ENXIO for illegal minor device number,
- * EBUSY if file is open by another process.
- */
-/* ARGSUSED */
-static	int
-usbpf_open(struct cdev *dev, int flags, int fmt, struct thread *td)
-{
-	struct usbpf_d *ud;
-	int error;
-
-	ud = malloc(sizeof(*ud), M_USBPF, M_WAITOK | M_ZERO);
-	error = devfs_set_cdevpriv(ud, usbpf_dtor);
-	if (error != 0) {
-		free(ud, M_USBPF);
-		return (error);
-	}
-
-	usbpf_buffer_init(ud);
-	ud->ud_bufmode = USBPF_BUFMODE_BUFFER;
-	ud->ud_sig = SIGIO;
-	ud->ud_direction = USBPF_D_INOUT;
-	ud->ud_pid = td->td_proc->p_pid;
-	mtx_init(&ud->ud_mtx, devtoname(dev), "usbpf cdev lock", MTX_DEF);
-	callout_init_mtx(&ud->ud_callout, &ud->ud_mtx, 0);
-	knlist_init_mtx(&ud->ud_sel.si_note, &ud->ud_mtx);
-
-	return (0);
-}
-
-static int
-usbpf_uiomove(struct usbpf_d *ud, caddr_t buf, u_int len, struct uio *uio)
-{
-
-	if (ud->ud_bufmode != USBPF_BUFMODE_BUFFER)
-		return (EOPNOTSUPP);
-	return (usbpf_buffer_uiomove(ud, buf, len, uio));
-}
-
-/*
- *  usbpf_read - read next chunk of packets from buffers
- */
-static	int
-usbpf_read(struct cdev *dev, struct uio *uio, int ioflag)
-{
-	struct usbpf_d *ud;
-	int error;
-	int non_block;
-	int timed_out;
-
-	error = devfs_get_cdevpriv((void **)&ud);
-	if (error != 0)
-		return (error);
-
-	/*
-	 * Restrict application to use a buffer the same size as
-	 * as kernel buffers.
-	 */
-	if (uio->uio_resid != ud->ud_bufsize)
-		return (EINVAL);
-
-	non_block = ((ioflag & O_NONBLOCK) != 0);
-
-	USBPFD_LOCK(ud);
-	ud->ud_pid = curthread->td_proc->p_pid;
-	if (ud->ud_bufmode != USBPF_BUFMODE_BUFFER) {
-		USBPFD_UNLOCK(ud);
-		return (EOPNOTSUPP);
-	}
-	if (ud->ud_state == USBPF_WAITING)
-		callout_stop(&ud->ud_callout);
-	timed_out = (ud->ud_state == USBPF_TIMED_OUT);
-	ud->ud_state = USBPF_IDLE;
-	/*
-	 * If the hold buffer is empty, then do a timed sleep, which
-	 * ends when the timeout expires or when enough packets
-	 * have arrived to fill the store buffer.
-	 */
-	while (ud->ud_hbuf == NULL) {
-		if (ud->ud_slen != 0) {
-			/*
-			 * A packet(s) either arrived since the previous
-			 * read or arrived while we were asleep.
-			 */
-			if (ud->ud_immediate || non_block || timed_out) {
-				/*
-				 * Rotate the buffers and return what's here
-				 * if we are in immediate mode, non-blocking
-				 * flag is set, or this descriptor timed out.
-				 */
-				USBPF_ROTATE_BUFFERS(ud);
-				break;
-			}
-		}
-
-		/*
-		 * No data is available, check to see if the usbpf device
-		 * is still pointed at a real interface.  If not, return
-		 * ENXIO so that the userland process knows to rebind
-		 * it before using it again.
-		 */
-		if (ud->ud_bif == NULL) {
-			USBPFD_UNLOCK(ud);
-			return (ENXIO);
-		}
-
-		if (non_block) {
-			USBPFD_UNLOCK(ud);
-			return (EWOULDBLOCK);
-		}
-		error = msleep(ud, &ud->ud_mtx, PRIUSB|PCATCH,
-		    "uff", ud->ud_rtout);
-		if (error == EINTR || error == ERESTART) {
-			USBPFD_UNLOCK(ud);
-			return (error);
-		}
-		if (error == EWOULDBLOCK) {
-			/*
-			 * On a timeout, return what's in the buffer,
-			 * which may be nothing.  If there is something
-			 * in the store buffer, we can rotate the buffers.
-			 */
-			if (ud->ud_hbuf)
-				/*
-				 * We filled up the buffer in between
-				 * getting the timeout and arriving
-				 * here, so we don't need to rotate.
-				 */
-				break;
-
-			if (ud->ud_slen == 0) {
-				USBPFD_UNLOCK(ud);

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

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 16:29: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 0679B106566B;
	Thu, 28 Apr 2011 16:29:20 +0000 (UTC) (envelope-from gnn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E9B058FC0A;
	Thu, 28 Apr 2011 16: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 p3SGTJZC030996;
	Thu, 28 Apr 2011 16:29:19 GMT (envelope-from gnn@svn.freebsd.org)
Received: (from gnn@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SGTJdi030990;
	Thu, 28 Apr 2011 16:29:19 GMT (envelope-from gnn@svn.freebsd.org)
Message-Id: <201104281629.p3SGTJdi030990@svn.freebsd.org>
From: "George V. Neville-Neil" 
Date: Thu, 28 Apr 2011 16: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: r221175 - in head/tools/tools: . vxge
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 16:29:20 -0000

Author: gnn
Date: Thu Apr 28 16:29:19 2011
New Revision: 221175
URL: http://svn.freebsd.org/changeset/base/221175

Log:
  A diagnostic tool to go along with the vxge(4) 10GbE driver.
  This tool can be used to print statistics, registers, and
  other device specific information once the driver is loaded
  into the kernel.
  
  Submitted by:	Sriram Rapuru from Exar
  MFC after:	2 weeks

Added:
  head/tools/tools/vxge/
  head/tools/tools/vxge/Makefile   (contents, props changed)
  head/tools/tools/vxge/vxge_cmn.h   (contents, props changed)
  head/tools/tools/vxge/vxge_info.c   (contents, props changed)
  head/tools/tools/vxge/vxge_info.h   (contents, props changed)
  head/tools/tools/vxge/vxge_log.c   (contents, props changed)
  head/tools/tools/vxge/vxge_log.h   (contents, props changed)
Modified:
  head/tools/tools/README

Modified: head/tools/tools/README
==============================================================================
--- head/tools/tools/README	Thu Apr 28 16:18:30 2011	(r221174)
+++ head/tools/tools/README	Thu Apr 28 16:29:19 2011	(r221175)
@@ -66,4 +66,5 @@ vimage		An interim utility for managing 
 		stack infrastructure.
 vop_table	Generates a HTML document that shows all the VOP's in
 		the kernel.
+vxge		A diagnostic tool for the vxge(4) driver
 whereintheworld	Summarizes "make world" output.

Added: head/tools/tools/vxge/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/tools/vxge/Makefile	Thu Apr 28 16:29:19 2011	(r221175)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+PROG= vxge-manage
+SRCS= vxge_info.c vxge_log.c
+NO_MAN=
+ 
+.include 

Added: head/tools/tools/vxge/vxge_cmn.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/tools/vxge/vxge_cmn.h	Thu Apr 28 16:29:19 2011	(r221175)
@@ -0,0 +1,260 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided 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.
+ *
+ *    3. Neither the name of the Exar Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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	_VXGE_CMN_H_
+#define	_VXGE_CMN_H_
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#if BYTE_ORDER == BIG_ENDIAN
+#define	VXGE_OS_HOST_BIG_ENDIAN
+#else
+#define	VXGE_OS_HOST_LITTLE_ENDIAN
+#endif
+
+#if defined(VXGE_OS_HOST_BIG_ENDIAN)
+
+#define	GET_OFFSET_STATS(index)		statsInfo[(index)].be_offset
+#define	GET_OFFSET_PCICONF(index)	pciconfInfo[(index)].be_offset
+
+#else
+
+#define	GET_OFFSET_STATS(index)		statsInfo[(index)].le_offset
+#define	GET_OFFSET_PCICONF(index)	pciconfInfo[(index)].le_offset
+
+#endif
+
+#define	vxge_mem_free(x)	\
+	if (NULL != x) { free(x); x = NULL; }
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef unsigned long long u64;
+typedef u_long ulong_t;
+
+typedef enum _vxge_query_device_info_e {
+
+	VXGE_GET_PCI_CONF = 100,
+	VXGE_GET_MRPCIM_STATS = 101,
+	VXGE_GET_DEVICE_STATS = 102,
+	VXGE_GET_DEVICE_HWINFO = 103,
+	VXGE_GET_DRIVER_STATS = 104,
+	VXGE_GET_INTR_STATS = 105,
+	VXGE_GET_VERSION = 106,
+	VXGE_GET_TCODE = 107,
+	VXGE_GET_VPATH_COUNT = 108,
+	VXGE_GET_BANDWIDTH = 109,
+	VXGE_SET_BANDWIDTH = 110,
+	VXGE_GET_PORT_MODE = 111,
+	VXGE_SET_PORT_MODE = 112
+
+} vxge_query_device_info_e;
+
+/* Register type enumaration */
+typedef enum vxge_hal_mgmt_reg_type_e {
+
+	vxge_hal_mgmt_reg_type_legacy = 0,
+	vxge_hal_mgmt_reg_type_toc = 1,
+	vxge_hal_mgmt_reg_type_common = 2,
+	vxge_hal_mgmt_reg_type_memrepair = 3,
+	vxge_hal_mgmt_reg_type_pcicfgmgmt = 4,
+	vxge_hal_mgmt_reg_type_mrpcim = 5,
+	vxge_hal_mgmt_reg_type_srpcim = 6,
+	vxge_hal_mgmt_reg_type_vpmgmt = 7,
+	vxge_hal_mgmt_reg_type_vpath = 8
+
+} vxge_hal_mgmt_reg_type_e;
+
+typedef enum vxge_hal_xmac_nwif_dp_mode {
+
+	VXGE_HAL_DP_NP_MODE_DEFAULT,
+	VXGE_HAL_DP_NP_MODE_LINK_AGGR,
+	VXGE_HAL_DP_NP_MODE_ACTIVE_PASSIVE,
+	VXGE_HAL_DP_NP_MODE_SINGLE_PORT,
+	VXGE_HAL_DP_NP_MODE_DUAL_PORT,
+	VXGE_HAL_DP_NP_MODE_DISABLE_PORT_MGMT
+
+} vxge_hal_xmac_nwif_dp_mode;
+
+typedef enum vxge_hal_xmac_nwif_behavior_on_failure {
+
+	VXGE_HAL_XMAC_NWIF_OnFailure_NoMove,
+	VXGE_HAL_XMAC_NWIF_OnFailure_OtherPort,
+	VXGE_HAL_XMAC_NWIF_OnFailure_OtherPortBackOnRestore
+
+} vxge_hal_xmac_nwif_behavior_on_failure;
+
+#define	VXGE_HAL_MGMT_REG_COUNT_LEGACY		7
+#define	VXGE_HAL_MGMT_REG_COUNT_TOC		11
+#define	VXGE_HAL_MGMT_REG_COUNT_COMMON		65
+#define	VXGE_HAL_MGMT_REG_COUNT_PCICFGMGMT	3
+#define	VXGE_HAL_MGMT_REG_COUNT_MRPCIM		1370
+#define	VXGE_HAL_MGMT_REG_COUNT_SRPCIM		48
+#define	VXGE_HAL_MGMT_REG_COUNT_VPMGMT		29
+#define	VXGE_HAL_MGMT_REG_COUNT_VPATH		139
+#define	VXGE_HAL_MGMT_STATS_COUNT_DRIVER	17
+#define	VXGE_HAL_MGMT_STATS_COUNT		160
+#define	VXGE_HAL_MGMT_STATS_COUNT_SW		54
+#define	VXGE_HAL_MGMT_STATS_COUNT_EXTENDED	56
+#define	VXGE_MAX_BANDWIDTH			10000
+
+#define	VXGE_HAL_MAX_VIRTUAL_PATHS		17
+#define	ETH_LENGTH_OF_ADDRESS			6
+
+typedef char macaddr[ETH_LENGTH_OF_ADDRESS];
+
+#define	VXGE_PRINT(fd, fmt...) {	\
+	fprintf(fd, fmt);		\
+	fprintf(fd, "\n");		\
+	printf(fmt);			\
+	printf("\n");			\
+}
+
+/* Read	& Write	Register */
+typedef struct _vxge_register_info_t {
+
+	u64	value;
+	u64	offset;
+	char	option[2];
+
+} vxge_register_info_t;
+
+/* Register Dump */
+typedef struct _vxge_pci_bar0_t {
+	char	name[64];
+	u64	offset;
+	u32	size;
+
+} vxge_pci_bar0_t;
+
+typedef struct _vxge_stats_driver_info_t {
+
+	char	name[32];
+	u64	value;
+
+} vxge_stats_driver_info_t;
+
+typedef struct _vxge_hal_device_pmd_info_t {
+
+	u32	type;
+	u32	unused;
+	char	vendor[24];
+	char	part_num[24];
+	char	ser_num[24];
+
+} vxge_hal_device_pmd_info_t;
+
+typedef struct _vxge_hal_device_version_t {
+
+	u32	major;
+	u32	minor;
+	u32	build;
+	char	version[32];
+
+} vxge_hal_device_version_t;
+
+typedef struct _vxge_hal_device_date_t {
+
+	u32	day;
+	u32	month;
+	u32	year;
+	char	date[16];
+
+} vxge_hal_device_date_t;
+
+typedef struct _vxge_hal_device_hw_info_t {
+
+	u32	host_type;
+	u64	function_mode;
+	u32	func_id;
+	u64	vpath_mask;
+
+	vxge_hal_device_version_t fw_version;
+	vxge_hal_device_date_t fw_date;
+	vxge_hal_device_version_t flash_version;
+	vxge_hal_device_date_t flash_date;
+
+	char	serial_number[24];
+	char	part_number[24];
+	char	product_description[72];
+	u32	unused;
+	u32	ports;
+
+	vxge_hal_device_pmd_info_t pmd_port0;
+	vxge_hal_device_pmd_info_t pmd_port1;
+
+	macaddr	mac_addrs[VXGE_HAL_MAX_VIRTUAL_PATHS];
+	macaddr	mac_addr_masks[VXGE_HAL_MAX_VIRTUAL_PATHS];
+
+} vxge_hal_device_hw_info_t;
+
+typedef struct _vxge_device_hw_info_t {
+
+	vxge_hal_device_hw_info_t hw_info;
+	u32	port_mode;
+	u32	port_failure;
+
+} vxge_device_hw_info_t;
+
+typedef struct _vxge_bw_info_t {
+
+	char	query;
+	u64	func_id;
+	int	priority;
+	int	bandwidth;
+
+} vxge_bw_info_t;
+
+typedef struct _vxge_port_info_t {
+
+	char	query;
+	int	port_mode;
+	int	port_failure;
+
+} vxge_port_info_t;
+
+u32	vxge_get_num_vpath(void);
+void	vxge_null_terminate(char *, size_t);
+
+#endif	/* _VXGE_CMN_H_ */

Added: head/tools/tools/vxge/vxge_info.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/tools/vxge/vxge_info.c	Thu Apr 28 16:29:19 2011	(r221175)
@@ -0,0 +1,857 @@
+/*-
+ * Copyright(c) 2002-2011 Exar Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification are permitted provided 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.
+ *
+ *    3. Neither the name of the Exar Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$*/
+
+#include "vxge_info.h"
+
+static int sockfd;
+static struct ifreq ifr;
+
+int
+main(int argc, char *argv[])
+{
+	if (argc >= 4) {
+		if (!((strcasecmp(argv[2], "regs") == 0) ||
+		    (strcasecmp(argv[2], "stats") == 0) ||
+		    (strcasecmp(argv[2], "bw_pri_set") == 0) ||
+		    (strcasecmp(argv[2], "port_mode_set") == 0) ||
+		    (strcasecmp(argv[2], "bw_pri_get") == 0)))
+			goto out;
+		else {
+			if (strcasecmp(argv[2], "regs") == 0) {
+				if (!((strcasecmp(argv[3], "common") == 0) ||
+				    (strcasecmp(argv[3], "legacy") == 0) ||
+				    (strcasecmp(argv[3], "pcicfgmgmt") == 0) ||
+				    (strcasecmp(argv[3], "toc") == 0) ||
+				    (strcasecmp(argv[3], "vpath") == 0) ||
+				    (strcasecmp(argv[3], "vpmgmt") == 0) ||
+				    (strcasecmp(argv[3], "mrpcim") == 0) ||
+				    (strcasecmp(argv[3], "srpcim") == 0) ||
+				    (strcasecmp(argv[3], "all") == 0))) {
+					goto regs;
+				}
+			} else if (strcasecmp(argv[2], "stats") == 0) {
+
+				if (!((strcasecmp(argv[3], "common") == 0) ||
+				    (strcasecmp(argv[3], "mrpcim") == 0) ||
+				    (strcasecmp(argv[3], "all") == 0) ||
+				    (strcasecmp(argv[3], "driver") == 0))) {
+					goto stats;
+				}
+			}
+		}
+	} else {
+		if (argc != 3)
+			goto out;
+		else {
+			if (!((strcasecmp(argv[2], "hwinfo") == 0) ||
+			    (strcasecmp(argv[2], "pciconfig") == 0) ||
+			    (strcasecmp(argv[2], "port_mode_get") == 0) ||
+			    (strcasecmp(argv[2], "bw_pri_get") == 0))) {
+				if (strcasecmp(argv[2], "regs") == 0)
+					goto regs;
+
+				if (strcasecmp(argv[2], "stats") == 0)
+					goto stats;
+
+				if (strcasecmp(argv[2], "bw_pri_set") == 0)
+					goto bw_pri_set;
+
+				if (strcasecmp(argv[2], "port_mode_set") == 0)
+					goto port_mode_set;
+
+				goto out;
+			}
+		}
+	}
+
+	sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+	if (sockfd < 0) {
+		printf("Creating socket failed\n");
+		goto _exit0;
+	}
+
+	ifr.ifr_addr.sa_family = AF_INET;
+	strlcpy(ifr.ifr_name, argv[1], sizeof(ifr.ifr_name));
+
+	if (strcasecmp(argv[2], "pciconfig") == 0)
+		vxge_get_pci_config();
+
+	else if (strcasecmp(argv[2], "hwinfo") == 0)
+		vxge_get_hw_info();
+
+	else if (strcasecmp(argv[2], "vpathinfo") == 0)
+		vxge_get_num_vpath();
+
+	else if (strcasecmp(argv[2], "port_mode_get") == 0)
+		vxge_get_port_mode();
+
+	else if (strcasecmp(argv[2], "regs") == 0) {
+
+		if (strcasecmp(argv[3], "common") == 0)
+			vxge_get_registers_common();
+
+		else if (strcasecmp(argv[3], "toc") == 0)
+			vxge_get_registers_toc();
+
+		else if (strcasecmp(argv[3], "pcicfgmgmt") == 0)
+			vxge_get_registers_pcicfgmgmt();
+
+		else if (strcasecmp(argv[3], "vpath") == 0)
+			vxge_get_registers_vpath();
+
+		else if (strcasecmp(argv[3], "vpmgmt") == 0)
+			vxge_get_registers_vpmgmt();
+
+		else if (strcasecmp(argv[3], "srpcim") == 0)
+			vxge_get_registers_srpcim();
+
+		else if (strcasecmp(argv[3], "legacy") == 0)
+			vxge_get_registers_legacy();
+
+		if (strcasecmp(argv[3], "mrpcim") == 0)
+			vxge_get_registers_mrpcim();
+
+		else if (strcasecmp(argv[3], "all") == 0)
+			vxge_get_registers_all();
+
+	} else if (strcasecmp(argv[2], "stats") == 0) {
+
+		if (strcasecmp(argv[3], "mrpcim") == 0)
+			vxge_get_stats_mrpcim();
+
+		else if (strcasecmp(argv[3], "common") == 0)
+			vxge_get_stats_common();
+
+		else if (strcasecmp(argv[3], "all") == 0)
+			vxge_get_stats_all();
+
+		else if (strcasecmp(argv[3], "driver") == 0) {
+			if (argc == 4) {
+				vxge_get_stats_driver(-1);
+			} else if (argc == 6) {
+				if ((strcasecmp(argv[4], "vpath") == 0) &&
+				    (atoi(argv[5]) >= 0) &&
+				    (atoi(argv[5]) < 17)) {
+					vxge_get_stats_driver(atoi(argv[5]));
+				} else {
+					goto stats;
+				}
+			}
+		} else {
+			goto stats;
+		}
+	} else if (strcasecmp(argv[2], "port_mode_set") == 0) {
+		if ((atoi(argv[3]) >= 2) && (atoi(argv[3]) <= 4))
+			vxge_set_port_mode(atoi(argv[3]));
+		else
+			goto port_mode_set;
+	} else if (argc == 5) {
+		if (strcasecmp(argv[2], "bw_pri_set") == 0) {
+			if (((atoi(argv[3]) >= 0) && (atoi(argv[3]) < 8) &&
+			    (atoi(argv[4]) <= 10000)))
+				vxge_set_bw_priority(atoi(argv[3]),
+				    atoi(argv[4]), -1, VXGE_SET_BANDWIDTH);
+			else
+				goto bw_pri_set;
+		}
+	} else if (argc == 6) {
+		if (strcasecmp(argv[2], "bw_pri_set") == 0) {
+			if (((atoi(argv[3]) >= 0) && (atoi(argv[3]) < 8) &&
+			    (atoi(argv[4]) <= 10000)) && (atoi(argv[5]) <= 3))
+				vxge_set_bw_priority(atoi(argv[3]),
+				    atoi(argv[4]), atoi(argv[5]),
+				    VXGE_SET_BANDWIDTH);
+			else
+				goto bw_pri_set;
+		}
+	} else if (argc == 4) {
+		if (strcasecmp(argv[2], "bw_pri_get") == 0) {
+			if ((atoi(argv[3]) >= 0) && (atoi(argv[3]) < 8))
+				vxge_get_bw_priority(atoi(argv[3]), VXGE_GET_BANDWIDTH);
+			else
+				goto bw_pri_get;
+		}
+	} else if (argc == 3) {
+		if (strcasecmp(argv[2], "bw_pri_get") == 0)
+			vxge_get_bw_priority(-1, VXGE_GET_BANDWIDTH);
+		else
+			goto bw_pri_get;
+	}
+
+	goto _exit0;
+
+out:
+	printf("Usage: ");
+	printf("vxge-manage  ");
+	printf("[regs] [stats] [hwinfo] [bw_pri_get] [bw_pri_set] [port_mode_get] [port_mode_set] [pciconfig]\n");
+	printf("\tINTERFACE      : Interface (vxge0, vxge1, vxge2, ..)\n");
+	printf("\tregs           : Prints register values\n");
+	printf("\tstats          : Prints statistics\n");
+	printf("\tpciconfig      : Prints pci configuration space\n");
+	printf("\thwinfo         : Displays hardware information\n");
+	printf("\tbw_pri_get     : Displays bandwidth and priority information\n");
+	printf("\tbw_pri_set     : Set bandwidth and priority of a function\n");
+	printf("\tport_mode_get  : Displays dual port adapter's port mode\n");
+	printf("\tport_mode_set  : Set dual port adapter's port mode\n\n");
+	goto _exit0;
+
+regs:
+	printf("Regs\n");
+	printf("[common] [legacy] [pcicfgmgmt] [toc] [vpath] [vpmgmt] [mrpcim] [srpcim] [All]\n");
+	printf("\tcommon         : print common registers\n");
+	printf("\tlegacy         : print legacy registers\n");
+	printf("\tpcicfgmgmt     : print pcicfgmgmt registers\n");
+	printf("\ttoc            : print toc registers\n");
+	printf("\tvpath          : print vpath registers\n");
+	printf("\tvpmgmt         : print vpmgmt registers\n");
+	printf("\tmrpcim         : print mrpcim registers\n");
+	printf("\tsrpcim         : print srpcim registers\n\n");
+	goto _exit0;
+
+stats:
+	printf("Stats\n");
+	printf("[common] [mrpcim] [driver [vpath (< 17) ]] [All]\n");
+	printf("\tcommon         : print common statistics\n");
+	printf("\tmrpcim         : print mrpcim statistics\n");
+	printf("\tdriver         : print driver statistics\n");
+	printf("\tAll            : print all statistics\n\n");
+	goto _exit0;
+
+bw_pri_set:
+	printf("Bandwidth & Priority\n");
+	printf("[vf-id (0-7)] [bandwidth (100-10000)] [priority (0-3)]\n\n");
+	goto _exit0;
+
+bw_pri_get:
+	printf("Bandwidth & Priority\n");
+	printf("[vf-id (0-7)]\n\n");
+	goto _exit0;
+
+port_mode_set:
+	printf("Port mode Setting\n");
+	printf("[port mode value (2-4)]\n\n");
+	goto _exit0;
+
+_exit0:
+	return (0);
+}
+
+/*
+ * vxge_get_registers_all
+ */
+void
+vxge_get_registers_all(void)
+{
+	vxge_get_registers_legacy();
+	vxge_get_registers_toc();
+	vxge_get_registers_common();
+	vxge_get_registers_pcicfgmgmt();
+	vxge_get_registers_srpcim();
+	vxge_get_registers_mrpcim();
+	vxge_get_registers_vpmgmt();
+	vxge_get_registers_vpath();
+}
+
+int
+vxge_get_registers_common(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize =
+	    reginfo_registers[VXGE_HAL_MGMT_REG_COUNT_COMMON - 1].offset + 8;
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_common;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_legacy
+ */
+int
+vxge_get_registers_legacy(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = reginfo_legacy[VXGE_HAL_MGMT_REG_COUNT_LEGACY - 1].offset + 8;
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_legacy;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers_legacy(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_toc
+ */
+int
+vxge_get_registers_toc(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = reginfo_toc[VXGE_HAL_MGMT_REG_COUNT_TOC - 1].offset + 8;
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_toc;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers_toc(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_pcicfgmgmt
+ */
+int
+vxge_get_registers_pcicfgmgmt(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = reginfo_pcicfgmgmt[VXGE_HAL_MGMT_REG_COUNT_PCICFGMGMT - 1].offset + 8;
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_pcicfgmgmt;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers_pcicfgmgmt(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_vpath
+ */
+int
+vxge_get_registers_vpath(void)
+{
+	int bufsize, err = 0;
+	u32 i, no_of_vpath;
+	char *buffer = NULL;
+
+	no_of_vpath = vxge_get_num_vpath();
+	bufsize = reginfo_vpath[VXGE_HAL_MGMT_REG_COUNT_VPATH - 1].offset + 8;
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	for (i = 0; i < no_of_vpath; i++) {
+
+		bzero(buffer, bufsize);
+		*buffer = vxge_hal_mgmt_reg_type_vpath;
+		*((u32 *) (buffer + sizeof(u32))) = i;
+
+		ifr.ifr_data = (caddr_t) buffer;
+		err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+		if ((err < 0) || (err == EINVAL)) {
+			printf("Getting register values failed\n");
+			goto _exit0;
+		}
+
+		vxge_print_registers_vpath(buffer, i);
+	}
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_vpmgmt
+ */
+int
+vxge_get_registers_vpmgmt(void)
+{
+	int bufsize, err = 0;
+	u32 i, no_of_vpath;
+	char *buffer = NULL;
+
+	no_of_vpath = vxge_get_num_vpath();
+	bufsize = reginfo_vpmgmt[VXGE_HAL_MGMT_REG_COUNT_VPMGMT - 1].offset + 8;
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	for (i = 0; i < no_of_vpath; i++) {
+
+		bzero(buffer, bufsize);
+		*buffer = vxge_hal_mgmt_reg_type_vpmgmt;
+		*((u32 *) (buffer + sizeof(u32))) = i;
+
+		ifr.ifr_data = (caddr_t) buffer;
+		err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+		if ((err < 0) || (err == EINVAL)) {
+			printf("Getting register values failed\n");
+			goto _exit0;
+		}
+
+		vxge_print_registers_vpmgmt(buffer);
+	}
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+u32
+vxge_get_num_vpath(void)
+{
+	int err = 0;
+	u32 buffer, no_of_vpath = 0;
+
+	buffer = VXGE_GET_VPATH_COUNT;
+
+	ifr.ifr_data = (caddr_t) &buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if (err == 0)
+		no_of_vpath = buffer;
+	else
+		printf("Getting number of vpath failed\n");
+
+	return (no_of_vpath);
+}
+
+/*
+ * vxge_get_registers_mrpcim
+ */
+int
+vxge_get_registers_mrpcim(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = reginfo_mrpcim[VXGE_HAL_MGMT_REG_COUNT_MRPCIM - 1].offset + 8;
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_mrpcim;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers_mrpcim(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_registers_srpcim
+ * Gets srpcim register values
+ * Returns EXIT_SUCCESS or EXIT_FAILURE
+ */
+int
+vxge_get_registers_srpcim(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = reginfo_srpcim[VXGE_HAL_MGMT_REG_COUNT_SRPCIM - 1].offset + 8;
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for register dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = vxge_hal_mgmt_reg_type_srpcim;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting register values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_registers_srpcim(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_stats_driver
+ */
+int
+vxge_get_stats_driver(int vpath_num)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = VXGE_HAL_MGMT_STATS_COUNT_DRIVER * sizeof(u64) *
+	    VXGE_HAL_MAX_VIRTUAL_PATHS;
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for driver statistics failed\n");
+		goto _exit0;
+	}
+
+	*buffer = VXGE_GET_DRIVER_STATS;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_0, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting Driver Statistics failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_stats_drv(buffer, vpath_num);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_stats_common
+ */
+int
+vxge_get_stats_common(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = 1024 * 64 * sizeof(char);
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for statistics dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = VXGE_GET_DEVICE_STATS;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_0, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting statistics values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_stats(buffer, VXGE_GET_DEVICE_STATS);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+
+}
+
+/*
+ * vxge_get_stats_mrpcim
+ */
+int
+vxge_get_stats_mrpcim(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = 1024 * 64 * sizeof(char);
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for statistics dump failed\n");
+		goto _exit0;
+	}
+
+	*buffer = VXGE_GET_MRPCIM_STATS;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_0, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting statistics values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_stats(buffer, VXGE_GET_MRPCIM_STATS);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+int
+vxge_get_pci_config(void)
+{
+	int bufsize, err = 0;
+	char *buffer = NULL;
+
+	bufsize = 64 * 1024 * sizeof(char);
+
+	buffer = (char *) vxge_mem_alloc(bufsize);
+	if (!buffer) {
+		printf("Allocating memory for pci config failed\n");
+		goto _exit0;
+	}
+
+	*buffer = VXGE_GET_PCI_CONF;
+
+	ifr.ifr_data = (caddr_t) buffer;
+	err = ioctl(sockfd, SIOCGPRIVATE_0, &ifr);
+	if ((err < 0) || (err == EINVAL)) {
+		printf("Getting pci config values failed\n");
+		goto _exit0;
+	}
+
+	vxge_print_pci_config(buffer);
+
+_exit0:
+	vxge_mem_free(buffer);
+	return (err);
+}
+
+/*
+ * vxge_get_hw_info
+ */
+int
+vxge_get_hw_info(void)
+{
+	int err = 0;
+	char *buffer = NULL;
+
+	buffer = (char *) vxge_mem_alloc(sizeof(vxge_device_hw_info_t));

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

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 16:31: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 E547B1065676;
	Thu, 28 Apr 2011 16:31:53 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F12F8FC15;
	Thu, 28 Apr 2011 16:31:53 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2AB6A46B9E;
	Thu, 28 Apr 2011 12:31:53 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 955528A02A;
	Thu, 28 Apr 2011 12:31:52 -0400 (EDT)
From: John Baldwin 
To: Kostik Belousov 
Date: Thu, 28 Apr 2011 12:31:50 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; )
References: <201104281427.p3SERHo1026817@svn.freebsd.org>
	<20110428144737.GB48734@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110428144737.GB48734@deviant.kiev.zoral.com.ua>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Message-Id: <201104281231.51237.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Thu, 28 Apr 2011 12:31:52 -0400 (EDT)
Cc: svn-src-head@freebsd.org, "Pedro F. Giffuni" ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r221166 - in head/sys: fs/ext2fs modules/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 16:31:54 -0000

On Thursday, April 28, 2011 10:47:37 am Kostik Belousov wrote:
> On Thu, Apr 28, 2011 at 02:27:17PM +0000, John Baldwin wrote:
> > Author: jhb
> > Date: Thu Apr 28 14:27:17 2011
> > New Revision: 221166
> > URL: http://svn.freebsd.org/changeset/base/221166
> > 
> > Log:
> >   Sync with several changes in UFS/FFS:
> >   - 77115: Implement support for O_DIRECT.
> >   - 98425: Fix a performance issue introduced in 70131 that was causing
> >     reads before writes even when writing full blocks.
> >   - 98658: Rename the BALLOC flags from B_* to BA_* to avoid confusion with
> >     the struct buf B_ flags.
> >   - 100344: Merge the BA_ and IO_ flags so so that they may both be used in
> >     the same flags word. This merger is possible by assigning the IO_ flags
> >     to the low sixteen bits and the BA_ flags the high sixteen bits.
> >   - 105422: Fix a file-rewrite performance case.
> >   - 129545: Implement IO_INVAL in VOP_WRITE() by marking the buffer as
> >     "no cache".
> >   - Readd the DOINGASYNC() macro and use it to control asynchronous writes.
> >     Change i-node updates to honor DOINGASYNC() instead of always being
> >     synchronous.
> >   - Use a PRIV_VFS_RETAINSUGID check instead of checking cr_uid against 0
> >     directly when deciding whether or not to clear suid and sgid bits.
> >   
> >   Submitted by:	Pedro F. Giffuni  giffunip at yahoo
> > 
> 
> > @@ -141,10 +162,42 @@ READ(ap)
> >  		if (error)
> >  			break;
> >  
> > -		bqrelse(bp);
> > +		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
> > +		   (LIST_FIRST(&bp->b_dep) == NULL)) {
> > +			/*
> > +			 * If there are no dependencies, and it's VMIO,
> There is no dependencies for ext2fs, the FFS comments talks about SU.

It looks like Pedro hinted at that in the 3rd place the code tested it.  This
patch should remove the checks assuming they are always true:

Index: ext2_readwrite.c
===================================================================
--- ext2_readwrite.c	(revision 221166)
+++ ext2_readwrite.c	(working copy)
@@ -162,8 +162,7 @@ READ(ap)
 		if (error)
 			break;
 
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
@@ -189,8 +188,7 @@ READ(ap)
 	 * so it must have come from a 'break' statement
 	 */
 	if (bp != NULL) {
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);
 		} else {
@@ -319,8 +317,7 @@ WRITE(ap)
 
 		error =
 		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_EMPTY(&bp->b_dep))) {	/* in ext2fs? */
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			bp->b_flags |= B_RELBUF;
 		}
 

> Also, I am unsure what the resulting semantic of O_DIRECTIO for ext2
> is ? UFS tries to eliminate any use of buffer cache for O_DIRECTIO
> case, up to the mapping of user pages into pbuf to perform the
> actual i/o. In ext2 case, it seems we will just destroy the buffers
> after using them for i/o. Is it useful ?

Hmm, I believe Pedro said he did not see a performance change in benchmarks,
but that it was still good to reduce diffs with the UFS code at least.
However, mapping the user pages into the buffer seems mandatory for any
performance gain to be seen.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 17:36: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 0B18F106564A;
	Thu, 28 Apr 2011 17:36:27 +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 EFD298FC0A;
	Thu, 28 Apr 2011 17:36: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 p3SHaQvu032996;
	Thu, 28 Apr 2011 17:36:26 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SHaQhl032994;
	Thu, 28 Apr 2011 17:36:26 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281736.p3SHaQhl032994@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 17:36: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: r221176 - head/sys/fs/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 17:36:27 -0000

Author: jhb
Date: Thu Apr 28 17:36:26 2011
New Revision: 221176
URL: http://svn.freebsd.org/changeset/base/221176

Log:
  The b_dep field of buffers is always empty for ext2fs, it is only used
  for SU in FFS.
  
  Reported by:	kib

Modified:
  head/sys/fs/ext2fs/ext2_readwrite.c

Modified: head/sys/fs/ext2fs/ext2_readwrite.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 16:29:19 2011	(r221175)
+++ head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 17:36:26 2011	(r221176)
@@ -162,8 +162,7 @@ READ(ap)
 		if (error)
 			break;
 
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
@@ -189,8 +188,7 @@ READ(ap)
 	 * so it must have come from a 'break' statement
 	 */
 	if (bp != NULL) {
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_FIRST(&bp->b_dep) == NULL)) {
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);
 		} else {
@@ -319,8 +317,7 @@ WRITE(ap)
 
 		error =
 		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
-		if ((ioflag & (IO_VMIO|IO_DIRECT)) &&
-		   (LIST_EMPTY(&bp->b_dep))) {	/* in ext2fs? */
+		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			bp->b_flags |= B_RELBUF;
 		}
 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 17: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 850CC106564A;
	Thu, 28 Apr 2011 17:44:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A42A8FC0A;
	Thu, 28 Apr 2011 17: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 p3SHiOAR033276;
	Thu, 28 Apr 2011 17:44:24 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SHiOT9033271;
	Thu, 28 Apr 2011 17:44:24 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281744.p3SHiOT9033271@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 17: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: r221177 - in head/sys/boot/i386: boot2 common zfsboot
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 17:44:24 -0000

Author: jhb
Date: Thu Apr 28 17:44:24 2011
New Revision: 221177
URL: http://svn.freebsd.org/changeset/base/221177

Log:
  Due to space constraints, the UFS boot2 and boot1 use an evil hack where
  boot2 calls back into boot1 to perform disk reads.  The ZFS MBR boot blocks
  do not have the same space constraints, so remove this hack for ZFS.
  While here, remove commented out code to support C/H/S addressing from
  zfsldr.  The ZFS and GPT bootstraps always just use EDD LBA addressing.
  
  MFC after:	2 weeks

Modified:
  head/sys/boot/i386/boot2/Makefile
  head/sys/boot/i386/common/drv.c
  head/sys/boot/i386/zfsboot/Makefile
  head/sys/boot/i386/zfsboot/zfsldr.S

Modified: head/sys/boot/i386/boot2/Makefile
==============================================================================
--- head/sys/boot/i386/boot2/Makefile	Thu Apr 28 17:36:26 2011	(r221176)
+++ head/sys/boot/i386/boot2/Makefile	Thu Apr 28 17:44:24 2011	(r221177)
@@ -32,6 +32,7 @@ CFLAGS=	-Os \
 	-mno-align-long-strings \
 	-mrtd \
 	-mregparm=3 \
+	-DUSE_XREAD \
 	-D${BOOT2_UFS} \
 	-DFLAGS=${BOOT_BOOT1_FLAGS} \
 	-DSIOPRT=${BOOT_COMCONSOLE_PORT} \

Modified: head/sys/boot/i386/common/drv.c
==============================================================================
--- head/sys/boot/i386/common/drv.c	Thu Apr 28 17:36:26 2011	(r221176)
+++ head/sys/boot/i386/common/drv.c	Thu Apr 28 17:44:24 2011	(r221177)
@@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$");
 #include "rbx.h"
 #include "util.h"
 #include "drv.h"
-#ifndef GPT
+#ifdef USE_XREAD
 #include "xreadorg.h"
 #endif
 
@@ -58,7 +58,7 @@ drvsize(struct dsk *dskp)
 }
 #endif	/* GPT */
 
-#ifdef GPT
+#ifndef USE_XREAD
 static struct {
 	uint16_t	len;
 	uint16_t	count;
@@ -66,7 +66,7 @@ static struct {
 	uint16_t	seg;
 	uint64_t	lba;
 } packet;
-#endif	/* GPT */
+#endif
 
 int
 drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk)
@@ -75,7 +75,7 @@ drvread(struct dsk *dskp, void *buf, dad
 
 	if (!OPT_CHECK(RBX_QUIET))
 		printf("%c\b", c = c << 8 | c >> 24);
-#ifdef GPT
+#ifndef USE_XREAD
 	packet.len = 0x10;
 	packet.count = nblk;
 	packet.off = VTOPOFF(buf);
@@ -87,7 +87,7 @@ drvread(struct dsk *dskp, void *buf, dad
 	v86.edx = dskp->drive;
 	v86.ds = VTOPSEG(&packet);
 	v86.esi = VTOPOFF(&packet);
-#else	/* !GPT */
+#else	/* USE_XREAD */
 	v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
 	v86.addr = XREADORG;		/* call to xread in boot1 */
 	v86.es = VTOPSEG(buf);
@@ -95,7 +95,7 @@ drvread(struct dsk *dskp, void *buf, dad
 	v86.ebx = VTOPOFF(buf);
 	v86.ecx = lba >> 32;
 	v86.edx = nblk << 8 | dskp->drive;
-#endif	/* !GPT */
+#endif	/* USE_XREAD */
 	v86int();
 	if (V86_CY(v86.efl)) {
 		printf("%s: error %u lba %u\n",

Modified: head/sys/boot/i386/zfsboot/Makefile
==============================================================================
--- head/sys/boot/i386/zfsboot/Makefile	Thu Apr 28 17:36:26 2011	(r221176)
+++ head/sys/boot/i386/zfsboot/Makefile	Thu Apr 28 17:44:24 2011	(r221177)
@@ -6,9 +6,6 @@ FILES=		zfsboot
 
 NM?=		nm
 
-# A value of 0x80 enables LBA support.
-BOOT_BOOT1_FLAGS?=	0x80
-
 BOOT_COMCONSOLE_PORT?= 0x3f8
 BOOT_COMCONSOLE_SPEED?= 9600
 B2SIOFMT?=	0x3
@@ -25,7 +22,6 @@ CFLAGS=	-DBOOTPROG=\"zfsboot\" \
 	-mno-align-long-strings \
 	-mrtd \
 	-DBOOT2 \
-	-DFLAGS=${BOOT_BOOT1_FLAGS} \
 	-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
 	-DSIOFMT=${B2SIOFMT} \
 	-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
@@ -64,8 +60,7 @@ zfsldr.out: zfsldr.o
 	${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o
 
 CLEANFILES+=	zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \
-		zfsboot.o zfsboot.s zfsboot.s.tmp xreadorg.h sio.o cons.o \
-		drv.o util.o
+		zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o util.o
 
 # We currently allow 65536 bytes for zfsboot - in practice it could be
 # any size up to 3.5Mb but keeping it fixed size simplifies zfsldr.
@@ -92,20 +87,13 @@ zfsboot.out: ${BTXCRT} zfsboot.o sio.o d
 
 zfsboot.o: zfsboot.s
 
-SRCS=	zfsboot.c xreadorg.h
+SRCS=	zfsboot.c
 
-zfsboot.s: zfsboot.c xreadorg.h ${.CURDIR}/../../zfs/zfsimpl.c
+zfsboot.s: zfsboot.c ${.CURDIR}/../../zfs/zfsimpl.c
 	${CC} ${CFLAGS} -S -o zfsboot.s.tmp ${.CURDIR}/zfsboot.c
 	sed -e '/align/d' -e '/nop/d' < zfsboot.s.tmp > zfsboot.s
 	rm -f zfsboot.s.tmp
 
-xreadorg.h: zfsldr.out
-	${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \
-	    { x = $$1 - ORG1; \
-	    printf("#define XREADORG %#x\n", REL1 + x) }' \
-	    ORG1=`printf "%d" ${ORG1}` \
-	    REL1=`printf "%d" ${REL1}` > ${.TARGET}
-
 .if ${MACHINE_CPUARCH} == "amd64"
 beforedepend zfsboot.s: machine
 CLEANFILES+=	machine

Modified: head/sys/boot/i386/zfsboot/zfsldr.S
==============================================================================
--- head/sys/boot/i386/zfsboot/zfsldr.S	Thu Apr 28 17:36:26 2011	(r221176)
+++ head/sys/boot/i386/zfsboot/zfsldr.S	Thu Apr 28 17:44:24 2011	(r221177)
@@ -30,16 +30,12 @@
 		.set PRT_NUM,0x4		# Partitions
 		.set PRT_BSD,0xa5		# Partition type
 
-/* Flag Bits */
-		.set FL_PACKET,0x80		# Packet mode
-
 /* Misc. Constants */
 		.set SIZ_PAG,0x1000		# Page size
 		.set SIZ_SEC,0x200		# Sector size
 
 		.set NSECT,0x80
 		.globl start
-		.globl xread
 		.code16
 
 start:		jmp main			# Start recognizably
@@ -49,7 +45,7 @@ start:		jmp main			# Start recognizably
  * FAT disks have this at the start of their MBR. While normal BIOS's will
  * work fine without this section, IBM's El Torito emulation "fixes" up the
  * BPB by writing into the memory copy of the MBR. Rather than have data
- * written into our xread routine, we'll define a BPB to work around it.
+ * written into our code, we'll define a BPB to work around it.
  * The data marked with (T) indicates a field required for a ThinkPad to
  * recognize the disk and (W) indicates fields written from IBM BIOS code.
  * The use of the BPB is based on what OpenBSD and NetBSD implemented in
@@ -80,34 +76,7 @@ ebpb:		.byte	0		# BIOS physical drive nu
 
 		.org 0x25,0x90
 /*
- * Trampoline used by boot2 to call read to read data from the disk via
- * the BIOS.  Call with:
- *
- * %ecx:%eax	- long    - LBA to read in
- * %es:(%bx)	- caddr_t - buffer to read data into
- * %dl		- byte    - drive to read from
- * %dh		- byte    - num sectors to read
- */
-
-xread:		push %ss			# Address
-		pop %ds				#  data
-/*
- * Setup an EDD disk packet and pass it to read
- */
-xread.1:	pushl %ecx			# Starting absolute block
-		pushl %eax			#  block number
-		push %es			# Address of
-		push %bx			#  transfer buffer
-		xor %ax,%ax			# Number of
-		movb %dh,%al			#  blocks to
-		push %ax			#  transfer
-		push $0x10			# Size of packet
-		mov %sp,%bp			# Packet pointer
-		callw read			# Read from disk
-		lea 0x10(%bp),%sp		# Clear stack
-		lret				# To far caller
-/*
- * Load the rest of boot2 and BTX up, copy the parts to the right locations,
+ * Load the rest of zfsboot2 and BTX up, copy the parts to the right locations,
  * and start it all up.
  */
 
@@ -181,7 +150,7 @@ main.4: 	xor %dx,%dx			# Partition:drive
  * itself to 0x9000 - doing it in this order means that none of the
  * memcpy regions overlap which would corrupt the copy.  Normally, BTX
  * clients start at MEM_USR, or 0xa000, but when we use btxld to
- * create boot2, we use an entry point of 0x2000.  That entry point is
+ * create zfsboot2, we use an entry point of 0x2000.  That entry point is
  * relative to MEM_USR; thus boot2.bin starts at 0xc000.
  *
  * The load area and the target area for the client overlap so we have
@@ -241,15 +210,29 @@ seta20.3:	sti				# Enable interrupts
 
 
 /*
- * Trampoline used to call read from within boot1.
+ * Trampoline used to call read from within zfsldr.  Sets up an EDD
+ * packet on the stack and passes it to read.
+ *
+ * %eax		- int     - LBA to read in relative to partition start
+ * %dl		- byte    - drive to read from
+ * %dh		- byte    - num sectors to read
+ * %si		- ptr     - MBR partition entry
  */
 nread:		xor %eax,%eax			# Sector offset in partition
-nread.1:	mov $MEM_BUF,%bx		# Transfer buffer
-		xor %ecx,%ecx			# Get
+nread.1:	xor %ecx,%ecx			# Get
 		addl 0x8(%si),%eax		#  LBA
 		adc $0,%ecx
-		push %cs			# Read from
-		callw xread.1	 		#  disk
+		pushl %ecx			# Starting absolute block
+		pushl %eax			#  block number
+		push %es			# Address of
+		push $MEM_BUF			#  transfer buffer
+		xor %ax,%ax			# Number of
+		movb %dh,%al			#  blocks to
+		push %ax			#  transfer
+		push $0x10			# Size of packet
+		mov %sp,%bp			# Packet pointer
+		callw read			# Read from disk
+		lea 0x10(%bp),%sp		# Clear stack
 		jnc return			# If success, return
 		mov $msg_read,%si		# Otherwise, set the error
 						#  message and fall through to
@@ -293,9 +276,7 @@ return: 	retw				# To caller
  * %dl	- byte     - drive number
  * stack - 10 bytes - EDD Packet
  */
-read:		testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled?
-		jz read.1			# No, use CHS
-		cmpb $0x80,%dl			# Hard drive?
+read:		cmpb $0x80,%dl			# Hard drive?
 		jb read.1			# No, use CHS
 		mov $0x55aa,%bx			# Magic
 		push %dx			# Save
@@ -311,73 +292,9 @@ read:		testb $FL_PACKET,%cs:MEM_REL+flag
 		movb $0x42,%ah			# BIOS: Extended
 		int $0x13			#  read
 		retw				# To caller
-#if 0	
-read.1:	 	push %dx			# Save
-		movb $0x8,%ah			# BIOS: Get drive
-		int $0x13			#  parameters
-		movb %dh,%ch			# Max head number
-		pop %dx				# Restore
-		jc return			# If error
-		andb $0x3f,%cl			# Sectors per track
-		jz ereturn			# If zero
-		cli				# Disable interrupts
-		mov 0x8(%bp),%eax		# Get LBA
-		push %dx			# Save
-		movzbl %cl,%ebx			# Divide by
-		xor %edx,%edx			#  sectors
-		div %ebx			#  per track
-		movb %ch,%bl			# Max head number
-		movb %dl,%ch			# Sector number
-		inc %bx				# Divide by
-		xorb %dl,%dl			#  number
-		div %ebx			#  of heads
-		movb %dl,%bh			# Head number
-		pop %dx				# Restore
-		cmpl $0x3ff,%eax		# Cylinder number supportable?
-		sti				# Enable interrupts
-		ja ereturn			# No, return an error
-		xchgb %al,%ah			# Set up cylinder
-		rorb $0x2,%al			#  number
-		orb %ch,%al			# Merge
-		inc %ax				#  sector
-		xchg %ax,%cx	 		#  number
-		movb %bh,%dh			# Head number
-		subb %ah,%al			# Sectors this track
-		mov 0x2(%bp),%ah		# Blocks to read
-		cmpb %ah,%al			# To read
-		jb read.2			#  this
-#ifdef	TRACK_AT_A_TIME
-		movb %ah,%al			#  track
-#else
-		movb $1,%al			#  one sector
-#endif
-read.2: 	mov $0x5,%di	 		# Try count
-read.3: 	les 0x4(%bp),%bx		# Transfer buffer
-		push %ax			# Save
-		movb $0x2,%ah			# BIOS: Read
-		int $0x13			#  from disk
-		pop %bx				# Restore
-		jnc read.4			# If success
-		dec %di				# Retry?
-		jz read.6			# No
-		xorb %ah,%ah			# BIOS: Reset
-		int $0x13			#  disk system
-		xchg %bx,%ax	 		# Block count
-		jmp read.3			# Continue
-read.4: 	movzbw %bl,%ax	 		# Sectors read
-		add %ax,0x8(%bp)		# Adjust
-		jnc read.5			#  LBA,
-		incw 0xa(%bp)	 		#  transfer
-read.5: 	shlb %bl			#  buffer
-		add %bl,0x5(%bp)		#  pointer,
-		sub %al,0x2(%bp)		#  block count
-		ja read.1			# If not done
-read.6: 	retw				# To caller
-#else
 read.1:		mov $msg_chs,%si
 		jmp error
 msg_chs:	.asciz "CHS not supported"
-#endif
 
 /* Messages */
 
@@ -386,8 +303,6 @@ msg_part:	.asciz "Boot"
 
 prompt: 	.asciz " error\r\n"
 
-flags:		.byte FLAGS			# Flags
-
 		.org PRT_OFF,0x90
 
 /* Partition table */

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 17:56: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 626B91065670;
	Thu, 28 Apr 2011 17:56:02 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 523DE8FC08;
	Thu, 28 Apr 2011 17:56: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 p3SHu2Yt035012;
	Thu, 28 Apr 2011 17:56:02 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SHu2MS035010;
	Thu, 28 Apr 2011 17:56:02 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201104281756.p3SHu2MS035010@svn.freebsd.org>
From: Jung-uk Kim 
Date: Thu, 28 Apr 2011 17:56: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: r221178 - head/sys/x86/x86
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 17:56:02 -0000

Author: jkim
Date: Thu Apr 28 17:56:02 2011
New Revision: 221178
URL: http://svn.freebsd.org/changeset/base/221178

Log:
  Turn off periodic recalibration of CPU ticker frequency if it is invariant.

Modified:
  head/sys/x86/x86/tsc.c

Modified: head/sys/x86/x86/tsc.c
==============================================================================
--- head/sys/x86/x86/tsc.c	Thu Apr 28 17:44:24 2011	(r221177)
+++ head/sys/x86/x86/tsc.c	Thu Apr 28 17:56:02 2011	(r221178)
@@ -228,7 +228,7 @@ init_TSC(void)
 	 * discovers a new max frequency.
 	 */
 	if (tsc_freq != 0)
-		set_cputicker(rdtsc, tsc_freq, 1);
+		set_cputicker(rdtsc, tsc_freq, !tsc_is_invariant);
 
 	if (tsc_is_invariant)
 		return;

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 17:59: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 5C0EC1065674;
	Thu, 28 Apr 2011 17:59:34 +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 4BAD18FC1A;
	Thu, 28 Apr 2011 17:59: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 p3SHxYE5035809;
	Thu, 28 Apr 2011 17:59:34 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SHxY1L035806;
	Thu, 28 Apr 2011 17:59:34 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281759.p3SHxY1L035806@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 17:59: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: r221179 - in head/sys: ddb 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: Thu, 28 Apr 2011 17:59:34 -0000

Author: jhb
Date: Thu Apr 28 17:59:33 2011
New Revision: 221179
URL: http://svn.freebsd.org/changeset/base/221179

Log:
  Trim some additional unnecessary  includes.
  
  MFC after:	1 week

Modified:
  head/sys/ddb/db_ps.c
  head/sys/dev/usb/net/if_mos.c

Modified: head/sys/ddb/db_ps.c
==============================================================================
--- head/sys/ddb/db_ps.c	Thu Apr 28 17:56:02 2011	(r221178)
+++ head/sys/ddb/db_ps.c	Thu Apr 28 17:59:33 2011	(r221179)
@@ -34,7 +34,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

Modified: head/sys/dev/usb/net/if_mos.c
==============================================================================
--- head/sys/dev/usb/net/if_mos.c	Thu Apr 28 17:56:02 2011	(r221178)
+++ head/sys/dev/usb/net/if_mos.c	Thu Apr 28 17:59:33 2011	(r221179)
@@ -104,7 +104,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 19:00: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 DAB6B1065673;
	Thu, 28 Apr 2011 19:00:48 +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 C87728FC1F;
	Thu, 28 Apr 2011 19:00: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 p3SJ0ms8049192;
	Thu, 28 Apr 2011 19:00:48 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SJ0mOR049189;
	Thu, 28 Apr 2011 19:00:48 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281900.p3SJ0mOR049189@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 19:00:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221180 - stable/7/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: Thu, 28 Apr 2011 19:00:49 -0000

Author: jhb
Date: Thu Apr 28 19:00:48 2011
New Revision: 221180
URL: http://svn.freebsd.org/changeset/base/221180

Log:
  MFC 191897:
  Add ID of one more SII3132 revision found on adaptec aar-1225sa rev a2.

Modified:
  stable/7/sys/dev/ata/ata-chipset.c
  stable/7/sys/dev/ata/ata-pci.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/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Thu Apr 28 17:59:33 2011	(r221179)
+++ stable/7/sys/dev/ata/ata-chipset.c	Thu Apr 28 19:00:48 2011	(r221180)
@@ -4623,6 +4623,7 @@ ata_sii_ident(device_t dev)
      { ATA_SII3124,   0x00, SIIPRBIO, SII4CH,    ATA_SA300, "SiI 3124" },
      { ATA_SII3132,   0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
      { ATA_SII3132_1, 0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
+     { ATA_SII3132_2, 0x00, SIIPRBIO, 0,         ATA_SA300, "SiI 3132" },
      { ATA_SII0680,   0x00, SIIMEMIO, SIISETCLK, ATA_UDMA6, "SiI 0680" },
      { ATA_CMD649,    0x00, 0,        SIIINTR,   ATA_UDMA5, "CMD 649" },
      { ATA_CMD648,    0x00, 0,        SIIINTR,   ATA_UDMA4, "CMD 648" },

Modified: stable/7/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.h	Thu Apr 28 17:59:33 2011	(r221179)
+++ stable/7/sys/dev/ata/ata-pci.h	Thu Apr 28 19:00:48 2011	(r221180)
@@ -343,6 +343,7 @@ struct ata_connect_task {
 #define ATA_SII3124		0x31241095
 #define ATA_SII3132		0x31321095
 #define ATA_SII3132_1		0x02421095
+#define ATA_SII3132_2		0x02441095
 #define ATA_SII0680             0x06801095
 #define ATA_CMD646              0x06461095
 #define ATA_CMD648              0x06481095

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 19:08: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 ECDA3106566C;
	Thu, 28 Apr 2011 19:08:31 +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 DAA1E8FC0A;
	Thu, 28 Apr 2011 19:08: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 p3SJ8V84050444;
	Thu, 28 Apr 2011 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SJ8Vdq050442;
	Thu, 28 Apr 2011 19:08:31 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281908.p3SJ8Vdq050442@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 19:08:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221181 - stable/7/sys/dev/puc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 19:08:32 -0000

Author: jhb
Date: Thu Apr 28 19:08:31 2011
New Revision: 221181
URL: http://svn.freebsd.org/changeset/base/221181

Log:
  MFC 186520:
  Add support for the Oxford OX16PCI958-based card.

Modified:
  stable/7/sys/dev/puc/pucdata.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/puc/pucdata.c
==============================================================================
--- stable/7/sys/dev/puc/pucdata.c	Thu Apr 28 19:00:48 2011	(r221180)
+++ stable/7/sys/dev/puc/pucdata.c	Thu Apr 28 19:08:31 2011	(r221181)
@@ -632,6 +632,12 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_2S, 0x10, 4, 0,
 	},
 
+	{   0x1415, 0x9538, 0xffff, 0,
+	    "Oxford Semiconductor OX16PCI958 UARTs",
+	    DEFAULT_RCLK * 10,
+	    PUC_PORT_8S, 0x18, 0, 8,
+	},
+
 	/*
 	 * Perle boards use Oxford Semiconductor chips, but they store the
 	 * Oxford Semiconductor device ID as a subvendor device ID and use

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 19:19: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 A5980106566B;
	Thu, 28 Apr 2011 19:19:25 +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 936D08FC12;
	Thu, 28 Apr 2011 19:19: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 p3SJJPej051954;
	Thu, 28 Apr 2011 19:19:25 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SJJPK4051952;
	Thu, 28 Apr 2011 19:19:25 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104281919.p3SJJPK4051952@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 19:19: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: r221182 - head/sys/dev/puc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 19:19:25 -0000

Author: jhb
Date: Thu Apr 28 19:19:25 2011
New Revision: 221182
URL: http://svn.freebsd.org/changeset/base/221182

Log:
  Add support for Oxford PCI Express Expresso family devices.
  For these devices, the number of supported ports is read from a register
  in BAR 0.
  
  PR:		kern/134878
  Submitted by:	David Wood  david of wood2 org uk
  MFC after:	1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c	Thu Apr 28 19:08:31 2011	(r221181)
+++ head/sys/dev/puc/pucdata.c	Thu Apr 28 19:19:25 2011	(r221182)
@@ -56,6 +56,7 @@ static puc_config_f puc_config_syba;
 static puc_config_f puc_config_siig;
 static puc_config_f puc_config_timedia;
 static puc_config_f puc_config_titan;
+static puc_config_f puc_config_oxford_pcie;
 
 const struct puc_cfg puc_pci_devices[] = {
 
@@ -619,7 +620,7 @@ const struct puc_cfg puc_pci_devices[] =
 	 * Boards with an Oxford Semiconductor chip.
 	 *
 	 * Oxford Semiconductor provides documentation for their chip at:
-	 * 
+	 * 
 	 *
 	 * As sold by Kouwell .
 	 * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports.
@@ -679,6 +680,63 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_4S, 0x10, 0, 8,
 	},
 
+	/*
+	 * Oxford Semiconductor PCI Express Expresso family
+	 *
+	 * Found in many 'native' PCI Express serial boards such as:
+	 *
+	 * eMegatech MP954ER4 (4 port) and MP958ER8 (8 port)
+	 * 
+	 *
+	 * Lindy 51189 (4 port)
+	 *  
+	 * 
+	 * StarTech.com PEX4S952 (4 port) and PEX8S952 (8 port)
+	 * 
+	 */
+
+	{   0x1415, 0xc158, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe952 UARTs",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
+	{   0x1415, 0xc15d, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe952 UARTs (function 1)",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
+	{   0x1415, 0xc208, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe954 UARTs",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
+	{   0x1415, 0xc20d, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe954 UARTs (function 1)",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
+	{   0x1415, 0xc308, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe958 UARTs",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
+	{   0x1415, 0xc30d, 0xffff, 0,
+	    "Oxford Semiconductor OXPCIe958 UARTs (function 1)",
+	    DEFAULT_RCLK * 0x22,
+	    PUC_PORT_NONSTANDARD, 0x10, 0, -1,
+	    .config_function = puc_config_oxford_pcie
+	},
+
 	{   0x14d2, 0x8010, 0xffff, 0,
 	    "VScom PCI-100L",
 	    DEFAULT_RCLK * 8,
@@ -1253,6 +1311,81 @@ puc_config_timedia(struct puc_softc *sc,
 }
 
 static int
+puc_config_oxford_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+    intptr_t *res)
+{
+	const struct puc_cfg *cfg = sc->sc_cfg;
+	int idx;
+	struct puc_bar *bar;
+	uint8_t value;
+
+	switch (cmd) {
+	case PUC_CFG_SETUP:
+		device_printf(sc->sc_dev, "%d UARTs detected\n",
+			sc->sc_nports);
+
+		/* Set UARTs to enhanced mode */
+		bar = puc_get_bar(sc, cfg->rid);
+		if (bar == NULL)
+			return (ENXIO);
+
+		for (idx = 0; idx < sc->sc_nports; idx++) {
+			value = bus_read_1(bar->b_res, 0x1000 + (idx << 9)
+				+ 0x92);
+			bus_write_1(bar->b_res, 0x1000 + (idx << 9) + 0x92,
+				value | 0x10);
+		}
+
+		return (0);
+	case PUC_CFG_GET_LEN:
+		*res = 0x200;
+		return (0);
+	case PUC_CFG_GET_NPORTS:
+		/*
+		 * Check if we are being called from puc_bfe_attach()
+		 * or puc_bfe_probe(). If puc_bfe_probe(), we cannot
+		 * puc_get_bar(), so we return a value of 16. This has cosmetic
+		 * side-effects at worst; in PUC_CFG_GET_DESC,
+		 * (int)sc->sc_cfg_data will not contain the true number of
+		 * ports in PUC_CFG_GET_DESC, but we are not implementing that
+		 * call for this device family anyway.
+		 *
+		 * The check is for initialisation of sc->sc_bar[idx], which is
+		 * only done in puc_bfe_attach().
+		 */
+		idx = 0;
+		do {
+			if (sc->sc_bar[idx++].b_rid != -1) {
+				sc->sc_cfg_data = 16;
+				*res = sc->sc_cfg_data;
+				return (0);
+			}
+		} while (idx < PUC_PCI_BARS);
+
+		bar = puc_get_bar(sc, cfg->rid);
+		if (bar == NULL)
+			return (ENXIO);
+
+		value = bus_read_1(bar->b_res, 0x04);
+		if (value == 0)
+			return (ENXIO);
+
+		sc->sc_cfg_data = value;
+		*res = sc->sc_cfg_data;
+		return (0);
+	case PUC_CFG_GET_OFS:
+		*res = 0x1000 + (port << 9);
+		return (0);
+	case PUC_CFG_GET_TYPE:
+		*res = PUC_TYPE_SERIAL;
+		return (0);
+	default:
+		break;
+	}
+	return (ENXIO);
+}
+
+static int
 puc_config_titan(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
     intptr_t *res)
 {

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 20:25: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 47D08106566C;
	Thu, 28 Apr 2011 20:25:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 36B5C8FC15;
	Thu, 28 Apr 2011 20:25: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 p3SKPGBN057786;
	Thu, 28 Apr 2011 20:25:16 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SKPGmm057784;
	Thu, 28 Apr 2011 20:25:16 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104282025.p3SKPGmm057784@svn.freebsd.org>
From: John Baldwin 
Date: Thu, 28 Apr 2011 20:25: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: r221183 - head/sys/fs/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 20:25:16 -0000

Author: jhb
Date: Thu Apr 28 20:25:15 2011
New Revision: 221183
URL: http://svn.freebsd.org/changeset/base/221183

Log:
  Update a comment since ext2fs does not use SU.
  
  Reviewed by:	kib

Modified:
  head/sys/fs/ext2fs/ext2_readwrite.c

Modified: head/sys/fs/ext2fs/ext2_readwrite.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 19:19:25 2011	(r221182)
+++ head/sys/fs/ext2fs/ext2_readwrite.c	Thu Apr 28 20:25:15 2011	(r221183)
@@ -164,9 +164,9 @@ READ(ap)
 
 		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			/*
-			 * If there are no dependencies, and it's VMIO,
-			 * then we don't need the buf, mark it available
-			 * for freeing. The VM has the data.
+			 * If it's VMIO or direct I/O, then we don't
+			 * need the buf, mark it available for
+			 * freeing. If it's VMIO, the VM has the data.
 			 */
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 21:27: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 3ECA4106564A;
	Thu, 28 Apr 2011 21:27:35 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2D6438FC16;
	Thu, 28 Apr 2011 21:27: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 p3SLRZpu063556;
	Thu, 28 Apr 2011 21:27:35 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SLRZYl063554;
	Thu, 28 Apr 2011 21:27:35 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201104282127.p3SLRZYl063554@svn.freebsd.org>
From: Andrew Thompson 
Date: Thu, 28 Apr 2011 21:27:35 +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: r221185 - stable/8/usr.sbin/usbdump
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 21:27:35 -0000

Author: thompsa
Date: Thu Apr 28 21:27:34 2011
New Revision: 221185
URL: http://svn.freebsd.org/changeset/base/221185

Log:
  MFC r220316
  
   Lower WARNS to unbreak the build, some archs may have alignment issues.

Modified:
  stable/8/usr.sbin/usbdump/Makefile
Directory Properties:
  stable/8/usr.sbin/usbdump/   (props changed)

Modified: stable/8/usr.sbin/usbdump/Makefile
==============================================================================
--- stable/8/usr.sbin/usbdump/Makefile	Thu Apr 28 21:25:58 2011	(r221184)
+++ stable/8/usr.sbin/usbdump/Makefile	Thu Apr 28 21:27:34 2011	(r221185)
@@ -3,6 +3,6 @@
 PROG=	usbdump
 SRCS=	usbdump.c
 MAN=	usbdump.8
-WARNS?=	4
+WARNS?=	3
 
 .include 

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 22:21: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 348C51065672;
	Thu, 28 Apr 2011 22:21:54 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2525B8FC14;
	Thu, 28 Apr 2011 22:21: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 p3SMLsRh068510;
	Thu, 28 Apr 2011 22:21:54 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SMLs5M068508;
	Thu, 28 Apr 2011 22:21:54 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201104282221.p3SMLs5M068508@svn.freebsd.org>
From: Jack F Vogel 
Date: Thu, 28 Apr 2011 22:21: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: r221187 - head/sys/dev/e1000
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 22:21:54 -0000

Author: jfv
Date: Thu Apr 28 22:21:53 2011
New Revision: 221187
URL: http://svn.freebsd.org/changeset/base/221187

Log:
  Small change to make backporting to stable/7,
  thanks to Arnaud Lacombe for suggesting it.

Modified:
  head/sys/dev/e1000/if_igb.h

Modified: head/sys/dev/e1000/if_igb.h
==============================================================================
--- head/sys/dev/e1000/if_igb.h	Thu Apr 28 21:41:00 2011	(r221186)
+++ head/sys/dev/e1000/if_igb.h	Thu Apr 28 22:21:53 2011	(r221187)
@@ -524,7 +524,7 @@ igb_rx_unrefreshed(struct rx_ring *rxr)
 	cur |= new;				\
 }
 
-#if __FreeBSD_version < 800504
+#if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504
 static __inline int
 drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
 {

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 22:23: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 B3C81106566C;
	Thu, 28 Apr 2011 22:23:39 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 892738FC0C;
	Thu, 28 Apr 2011 22:23: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 p3SMNdnt068708;
	Thu, 28 Apr 2011 22:23:39 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SMNdeJ068703;
	Thu, 28 Apr 2011 22:23:39 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201104282223.p3SMNdeJ068703@svn.freebsd.org>
From: Jung-uk Kim 
Date: Thu, 28 Apr 2011 22:23: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: r221188 - in head/sys: amd64/amd64 amd64/include
	i386/i386 i386/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 22:23:39 -0000

Author: jkim
Date: Thu Apr 28 22:23:39 2011
New Revision: 221188
URL: http://svn.freebsd.org/changeset/base/221188

Log:
  Define "Hypervisor Present" bit.  This bit is used by several hypervisors to
  identify CPUs running under emulation.  Currently QEMU-KVM, Xen-HVM, VMware,
  and MS Hyper-V are known to set this bit.
  
  MFC after:	3 days

Modified:
  head/sys/amd64/amd64/identcpu.c
  head/sys/amd64/include/specialreg.h
  head/sys/i386/i386/identcpu.c
  head/sys/i386/include/specialreg.h

Modified: head/sys/amd64/amd64/identcpu.c
==============================================================================
--- head/sys/amd64/amd64/identcpu.c	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/amd64/amd64/identcpu.c	Thu Apr 28 22:23:39 2011	(r221188)
@@ -296,7 +296,7 @@ printcpuinfo(void)
 				"\035"
 				"\036"
 				"\037"
-				"\040"
+				"\040HV"	/* Hypervisor */
 				);
 			}
 

Modified: head/sys/amd64/include/specialreg.h
==============================================================================
--- head/sys/amd64/include/specialreg.h	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/amd64/include/specialreg.h	Thu Apr 28 22:23:39 2011	(r221188)
@@ -134,6 +134,7 @@
 #define	CPUID2_MOVBE	0x00400000
 #define	CPUID2_POPCNT	0x00800000
 #define	CPUID2_AESNI	0x02000000
+#define	CPUID2_HV	0x80000000
 
 /*
  * Important bits in the Thermal and Power Management flags

Modified: head/sys/i386/i386/identcpu.c
==============================================================================
--- head/sys/i386/i386/identcpu.c	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/i386/i386/identcpu.c	Thu Apr 28 22:23:39 2011	(r221188)
@@ -773,7 +773,7 @@ printcpuinfo(void)
 				"\035"
 				"\036"
 				"\037"
-				"\040"
+				"\040HV"	/* Hypervisor */
 				);
 			}
 

Modified: head/sys/i386/include/specialreg.h
==============================================================================
--- head/sys/i386/include/specialreg.h	Thu Apr 28 22:21:53 2011	(r221187)
+++ head/sys/i386/include/specialreg.h	Thu Apr 28 22:23:39 2011	(r221188)
@@ -131,6 +131,7 @@
 #define	CPUID2_MOVBE	0x00400000
 #define	CPUID2_POPCNT	0x00800000
 #define	CPUID2_AESNI	0x02000000
+#define	CPUID2_HV	0x80000000
 
 /*
  * Important bits in the Thermal and Power Management flags

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 23: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 E6EA4106564A;
	Thu, 28 Apr 2011 23:21:40 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D85A78FC0C;
	Thu, 28 Apr 2011 23: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 p3SNLe1a072853;
	Thu, 28 Apr 2011 23:21:40 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SNLeVD072851;
	Thu, 28 Apr 2011 23:21:40 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201104282321.p3SNLeVD072851@svn.freebsd.org>
From: Jack F Vogel 
Date: Thu, 28 Apr 2011 23: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: r221189 - head/sys/dev/ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 23:21:41 -0000

Author: jfv
Date: Thu Apr 28 23:21:40 2011
New Revision: 221189
URL: http://svn.freebsd.org/changeset/base/221189

Log:
  Add a #define for driver portability to older OS

Modified:
  head/sys/dev/ixgbe/ixgbe.h

Modified: head/sys/dev/ixgbe/ixgbe.h
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.h	Thu Apr 28 22:23:39 2011	(r221188)
+++ head/sys/dev/ixgbe/ixgbe.h	Thu Apr 28 23:21:40 2011	(r221189)
@@ -154,6 +154,11 @@
 #define IXGBE_FC_HI		0x20000
 #define IXGBE_FC_LO		0x10000
 
+/* Keep older OS drivers building... */
+#if !defined(SYSCTL_ADD_UQUAD)
+#define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD
+#endif
+
 /* Defines for printing debug information */
 #define DEBUG_INIT  0
 #define DEBUG_IOCTL 0

From owner-svn-src-all@FreeBSD.ORG  Thu Apr 28 23:21: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 2914B106578E;
	Thu, 28 Apr 2011 23:21:51 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 15E648FC12;
	Thu, 28 Apr 2011 23:21: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 p3SNLo2A072893;
	Thu, 28 Apr 2011 23:21:50 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3SNLopx072891;
	Thu, 28 Apr 2011 23:21:50 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104282321.p3SNLopx072891@svn.freebsd.org>
From: Rick Macklem 
Date: Thu, 28 Apr 2011 23:21: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: r221190 - head/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 28 Apr 2011 23:21:51 -0000

Author: rmacklem
Date: Thu Apr 28 23:21:50 2011
New Revision: 221190
URL: http://svn.freebsd.org/changeset/base/221190

Log:
  Fix the new NFS client so that it handles the "nfs_args" value
  in mnt_optnew. This is needed so that the old mount(2) syscall
  works and that is needed so that amd(8) works. The code was
  basically just cribbed from sys/nfsclient/nfs_vfsops.c with minor
  changes. This patch is mainly to fix the new NFS client so that
  amd(8) works with it. Thanks go to Craig Rodrigues for helping with
  this.
  
  Tested by:	Craig Rodrigues (for amd)
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Thu Apr 28 23:21:40 2011	(r221189)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Thu Apr 28 23:21:50 2011	(r221190)
@@ -708,7 +708,7 @@ nfs_decode_args(struct mount *mp, struct
 	}
 }
 
-static const char *nfs_opts[] = { "from",
+static const char *nfs_opts[] = { "from", "nfs_args",
     "noatime", "noexec", "suiddir", "nosuid", "nosymfollow", "union",
     "noclusterr", "noclusterw", "multilabel", "acls", "force", "update",
     "async", "noconn", "nolockd", "conn", "lockd", "intr", "rdirplus",
@@ -762,8 +762,9 @@ nfs_mount(struct mount *mp)
 	u_char nfh[NFSX_FHMAX], krbname[100], dirpath[100], srvkrbname[100];
 	char *opt, *name, *secname;
 	int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
-	int dirlen, krbnamelen, srvkrbnamelen;
+	int dirlen, has_nfs_args_opt, krbnamelen, srvkrbnamelen;
 
+	has_nfs_args_opt = 0;
 	if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) {
 		error = EINVAL;
 		goto out;
@@ -777,6 +778,25 @@ nfs_mount(struct mount *mp)
 
 	nfscl_init();
 
+	/*
+	 * The old mount_nfs program passed the struct nfs_args
+	 * from userspace to kernel.  The new mount_nfs program
+	 * passes string options via nmount() from userspace to kernel
+	 * and we populate the struct nfs_args in the kernel.
+	 */
+	if (vfs_getopt(mp->mnt_optnew, "nfs_args", NULL, NULL) == 0) {
+		error = vfs_copyopt(mp->mnt_optnew, "nfs_args", &args,
+		    sizeof(args));
+		if (error != 0)
+			goto out;
+
+		if (args.version != NFS_ARGSVERSION) {
+			error = EPROGMISMATCH;
+			goto out;
+		}
+		has_nfs_args_opt = 1;
+	}
+
 	/* Handle the new style options. */
 	if (vfs_getopt(mp->mnt_optnew, "noconn", NULL, NULL) == 0)
 		args.flags |= NFSMNT_NOCONN;
@@ -993,27 +1013,52 @@ nfs_mount(struct mount *mp)
 	if (nfs_ip_paranoia == 0)
 		args.flags |= NFSMNT_NOCONN;
 
-	if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh,
-	    &args.fhsize) == 0) {
-		if (args.fhsize < 0 || args.fhsize > NFSX_FHMAX) {
+	if (has_nfs_args_opt != 0) {
+		/*
+		 * In the 'nfs_args' case, the pointers in the args
+		 * structure are in userland - we copy them in here.
+		 */
+		if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX) {
 			vfs_mount_error(mp, "Bad file handle");
 			error = EINVAL;
 			goto out;
 		}
-		bcopy(args.fh, nfh, args.fhsize);
+		error = copyin((caddr_t)args.fh, (caddr_t)nfh,
+		    args.fhsize);
+		if (error != 0)
+			goto out;
+		error = copyinstr(args.hostname, hst, MNAMELEN - 1, &len);
+		if (error != 0)
+			goto out;
+		bzero(&hst[len], MNAMELEN - len);
+		args.hostname = hst;
+		/* sockargs() call must be after above copyin() calls */
+		error = getsockaddr(&nam, (caddr_t)args.addr,
+		    args.addrlen);
+		if (error != 0)
+			goto out;
 	} else {
-		args.fhsize = 0;
-	}
-
-	(void) vfs_getopt(mp->mnt_optnew, "hostname", (void **)&args.hostname,
-	    &len);
-	if (args.hostname == NULL) {
-		vfs_mount_error(mp, "Invalid hostname");
-		error = EINVAL;
-		goto out;
+		if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh,
+		    &args.fhsize) == 0) {
+			if (args.fhsize < 0 || args.fhsize > NFSX_FHMAX) {
+				vfs_mount_error(mp, "Bad file handle");
+				error = EINVAL;
+				goto out;
+			}
+			bcopy(args.fh, nfh, args.fhsize);
+		} else {
+			args.fhsize = 0;
+		}
+		(void) vfs_getopt(mp->mnt_optnew, "hostname",
+		    (void **)&args.hostname, &len);
+		if (args.hostname == NULL) {
+			vfs_mount_error(mp, "Invalid hostname");
+			error = EINVAL;
+			goto out;
+		}
+		bcopy(args.hostname, hst, MNAMELEN);
+		hst[MNAMELEN - 1] = '\0';
 	}
-	bcopy(args.hostname, hst, MNAMELEN);
-	hst[MNAMELEN - 1] = '\0';
 
 	if (vfs_getopt(mp->mnt_optnew, "principal", (void **)&name, NULL) == 0)
 		strlcpy(srvkrbname, name, sizeof (srvkrbname));
@@ -1033,8 +1078,8 @@ nfs_mount(struct mount *mp)
 		dirpath[0] = '\0';
 	dirlen = strlen(dirpath);
 
-	if (vfs_getopt(mp->mnt_optnew, "addr", (void **)&args.addr,
-	    &args.addrlen) == 0) {
+	if (has_nfs_args_opt == 0 && vfs_getopt(mp->mnt_optnew, "addr",
+	    (void **)&args.addr, &args.addrlen) == 0) {
 		if (args.addrlen > SOCK_MAXADDRLEN) {
 			error = ENAMETOOLONG;
 			goto out;

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 00:00: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 1FD261065672;
	Fri, 29 Apr 2011 00:00:55 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F8908FC14;
	Fri, 29 Apr 2011 00:00: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 p3T00txh074896;
	Fri, 29 Apr 2011 00:00:55 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T00sNR074886;
	Fri, 29 Apr 2011 00:00:54 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201104290000.p3T00sNR074886@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 29 Apr 2011 00:00:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221191 - in stable/8/sys/dev: e1000 ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 00:00:55 -0000

Author: jfv
Date: Fri Apr 29 00:00:54 2011
New Revision: 221191
URL: http://svn.freebsd.org/changeset/base/221191

Log:
  MFC of the 1G Intel drivers, the following revisions
  from HEAD are merged:
  
  217318,218530,218548,218581,218582,218583,218587,218588,
  219753,219763,219764,220251,220254,220375,221187,221189

Modified:
  stable/8/sys/dev/e1000/e1000_80003es2lan.c
  stable/8/sys/dev/e1000/e1000_80003es2lan.h
  stable/8/sys/dev/e1000/e1000_82540.c
  stable/8/sys/dev/e1000/e1000_82541.c
  stable/8/sys/dev/e1000/e1000_82542.c
  stable/8/sys/dev/e1000/e1000_82543.c
  stable/8/sys/dev/e1000/e1000_82571.c
  stable/8/sys/dev/e1000/e1000_82575.c
  stable/8/sys/dev/e1000/e1000_82575.h
  stable/8/sys/dev/e1000/e1000_api.c
  stable/8/sys/dev/e1000/e1000_api.h
  stable/8/sys/dev/e1000/e1000_defines.h
  stable/8/sys/dev/e1000/e1000_hw.h
  stable/8/sys/dev/e1000/e1000_ich8lan.c
  stable/8/sys/dev/e1000/e1000_ich8lan.h
  stable/8/sys/dev/e1000/e1000_mac.c
  stable/8/sys/dev/e1000/e1000_mac.h
  stable/8/sys/dev/e1000/e1000_manage.c
  stable/8/sys/dev/e1000/e1000_manage.h
  stable/8/sys/dev/e1000/e1000_mbx.c
  stable/8/sys/dev/e1000/e1000_nvm.c
  stable/8/sys/dev/e1000/e1000_nvm.h
  stable/8/sys/dev/e1000/e1000_osdep.c
  stable/8/sys/dev/e1000/e1000_phy.c
  stable/8/sys/dev/e1000/e1000_phy.h
  stable/8/sys/dev/e1000/e1000_regs.h
  stable/8/sys/dev/e1000/e1000_vf.c
  stable/8/sys/dev/e1000/e1000_vf.h
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_em.h
  stable/8/sys/dev/e1000/if_igb.c
  stable/8/sys/dev/e1000/if_igb.h
  stable/8/sys/dev/e1000/if_lem.c
  stable/8/sys/dev/e1000/if_lem.h
  stable/8/sys/dev/ixgbe/ixgbe.c
  stable/8/sys/dev/ixgbe/ixgbe.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/e1000/e1000_80003es2lan.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_80003es2lan.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_80003es2lan.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -82,8 +82,8 @@ static void e1000_power_down_phy_copper_
  * with a lower bound at "index" and the upper bound at
  * "index + 5".
  */
-static const u16 e1000_gg82563_cable_length_table[] =
-         { 0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
+static const u16 e1000_gg82563_cable_length_table[] = {
+	0, 60, 115, 150, 150, 60, 115, 150, 180, 180, 0xFF };
 #define GG82563_CABLE_LENGTH_TABLE_SIZE \
                 (sizeof(e1000_gg82563_cable_length_table) / \
                  sizeof(e1000_gg82563_cable_length_table[0]))
@@ -854,7 +854,7 @@ static s32 e1000_get_link_up_info_80003e
  **/
 static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
 {
-	u32 ctrl, icr;
+	u32 ctrl;
 	s32 ret_val;
 
 	DEBUGFUNC("e1000_reset_hw_80003es2lan");
@@ -890,7 +890,7 @@ static s32 e1000_reset_hw_80003es2lan(st
 
 	/* Clear any pending interrupt events. */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	ret_val = e1000_check_alt_mac_addr_generic(hw);
 
@@ -909,6 +909,7 @@ static s32 e1000_init_hw_80003es2lan(str
 	struct e1000_mac_info *mac = &hw->mac;
 	u32 reg_data;
 	s32 ret_val;
+	u16 kum_reg_data;
 	u16 i;
 
 	DEBUGFUNC("e1000_init_hw_80003es2lan");
@@ -936,6 +937,13 @@ static s32 e1000_init_hw_80003es2lan(str
 	/* Setup link and flow control */
 	ret_val = mac->ops.setup_link(hw);
 
+	/* Disable IBIST slave mode (far-end loopback) */
+	e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+	                                &kum_reg_data);
+	kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+	e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+	                                 kum_reg_data);
+
 	/* Set the transmit descriptor write-back policy */
 	reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
 	reg_data = (reg_data & ~E1000_TXDCTL_WTHRESH) |

Modified: stable/8/sys/dev/e1000/e1000_80003es2lan.h
==============================================================================
--- stable/8/sys/dev/e1000/e1000_80003es2lan.h	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_80003es2lan.h	Fri Apr 29 00:00:54 2011	(r221191)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2009, Intel Corporation 
+  Copyright (c) 2001-2010, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 

Modified: stable/8/sys/dev/e1000/e1000_82540.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82540.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82540.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -269,7 +269,7 @@ void e1000_init_function_pointers_82540(
  **/
 static s32 e1000_reset_hw_82540(struct e1000_hw *hw)
 {
-	u32 ctrl, icr, manc;
+	u32 ctrl, manc;
 	s32 ret_val = E1000_SUCCESS;
 
 	DEBUGFUNC("e1000_reset_hw_82540");
@@ -314,7 +314,7 @@ static s32 e1000_reset_hw_82540(struct e
 	E1000_WRITE_REG(hw, E1000_MANC, manc);
 
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	return ret_val;
 }

Modified: stable/8/sys/dev/e1000/e1000_82541.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82541.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82541.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -300,7 +300,7 @@ void e1000_init_function_pointers_82541(
  **/
 static s32 e1000_reset_hw_82541(struct e1000_hw *hw)
 {
-	u32 ledctl, ctrl, icr, manc;
+	u32 ledctl, ctrl, manc;
 
 	DEBUGFUNC("e1000_reset_hw_82541");
 
@@ -364,7 +364,7 @@ static s32 e1000_reset_hw_82541(struct e
 	E1000_WRITE_REG(hw, E1000_IMC, 0xFFFFFFFF);
 
 	/* Clear any pending interrupt events. */
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	return E1000_SUCCESS;
 }
@@ -390,7 +390,7 @@ static s32 e1000_init_hw_82541(struct e1
 		DEBUGOUT("Error initializing identification LED\n");
 		/* This is not fatal and we should not stop init due to this */
 	}
-        
+
 	/* Storing the Speed Power Down  value for later use */
 	ret_val = hw->phy.ops.read_reg(hw,
 	                               IGP01E1000_GMII_FIFO,

Modified: stable/8/sys/dev/e1000/e1000_82542.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82542.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82542.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -51,7 +51,6 @@ static void e1000_rar_set_82542(struct e
 static void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
 static s32  e1000_read_mac_addr_82542(struct e1000_hw *hw);
 
-
 /**
  *  e1000_init_phy_params_82542 - Init PHY func ptrs.
  *  @hw: pointer to the HW structure
@@ -192,7 +191,7 @@ static s32 e1000_reset_hw_82542(struct e
 {
 	struct e1000_bus_info *bus = &hw->bus;
 	s32 ret_val = E1000_SUCCESS;
-	u32 ctrl, icr;
+	u32 ctrl;
 
 	DEBUGFUNC("e1000_reset_hw_82542");
 
@@ -223,7 +222,7 @@ static s32 e1000_reset_hw_82542(struct e
 	msec_delay(2);
 
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	if (hw->revision_id == E1000_REVISION_2) {
 		if (bus->pci_cmd_word & CMD_MEM_WRT_INVALIDATE)

Modified: stable/8/sys/dev/e1000/e1000_82543.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82543.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82543.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -901,7 +901,7 @@ static s32 e1000_phy_hw_reset_82543(stru
  **/
 static s32 e1000_reset_hw_82543(struct e1000_hw *hw)
 {
-	u32 ctrl, icr;
+	u32 ctrl;
 	s32 ret_val = E1000_SUCCESS;
 
 	DEBUGFUNC("e1000_reset_hw_82543");
@@ -943,7 +943,7 @@ static s32 e1000_reset_hw_82543(struct e
 
 	/* Masking off and clearing any pending interrupts */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	return ret_val;
 }

Modified: stable/8/sys/dev/e1000/e1000_82571.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82571.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82571.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -82,6 +82,10 @@ static s32  e1000_get_hw_semaphore_82573
 static void e1000_put_hw_semaphore_82573(struct e1000_hw *hw);
 static s32  e1000_get_hw_semaphore_82574(struct e1000_hw *hw);
 static void e1000_put_hw_semaphore_82574(struct e1000_hw *hw);
+static s32  e1000_set_d0_lplu_state_82574(struct e1000_hw *hw,
+                                          bool active);
+static s32  e1000_set_d3_lplu_state_82574(struct e1000_hw *hw,
+                                          bool active);
 static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw);
 static s32  e1000_write_nvm_eewr_82571(struct e1000_hw *hw, u16 offset,
                                        u16 words, u16 *data);
@@ -95,7 +99,6 @@ static void e1000_power_down_phy_copper_
 static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
 {
 	struct e1000_phy_info *phy = &hw->phy;
-	struct e1000_dev_spec_82571 *dev_spec = &hw->dev_spec._82571;
 	s32 ret_val = E1000_SUCCESS;
 
 	DEBUGFUNC("e1000_init_phy_params_82571");
@@ -129,16 +132,6 @@ static s32 e1000_init_phy_params_82571(s
 		phy->ops.write_reg          = e1000_write_phy_reg_igp;
 		phy->ops.acquire            = e1000_get_hw_semaphore_82571;
 		phy->ops.release            = e1000_put_hw_semaphore_82571;
-
-		/* This uses above function pointers */
-		ret_val = e1000_get_phy_id_82571(hw);
-
-		/* Verify PHY ID */
-		if (phy->id != IGP01E1000_I_PHY_ID) {
-			ret_val = -E1000_ERR_PHY;
-			DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id);
-			goto out;
-		}
 		break;
 	case e1000_82573:
 		phy->type                   = e1000_phy_m88;
@@ -152,20 +145,10 @@ static s32 e1000_init_phy_params_82571(s
 		phy->ops.write_reg          = e1000_write_phy_reg_m88;
 		phy->ops.acquire            = e1000_get_hw_semaphore_82571;
 		phy->ops.release            = e1000_put_hw_semaphore_82571;
-
-		/* This uses above function pointers */
-		ret_val = e1000_get_phy_id_82571(hw);
-
-		/* Verify PHY ID */
-		if (phy->id != M88E1111_I_PHY_ID) {
-			ret_val = -E1000_ERR_PHY;
-			DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id);
-			goto out;
-		}
 		break;
 	case e1000_82574:
 	case e1000_82583:
-		E1000_MUTEX_INIT(&dev_spec->swflag_mutex);
+		E1000_MUTEX_INIT(&hw->dev_spec._82571.swflag_mutex);
 
 		phy->type                   = e1000_phy_bm;
 		phy->ops.get_cfg_done       = e1000_get_cfg_done_generic;
@@ -178,22 +161,46 @@ static s32 e1000_init_phy_params_82571(s
 		phy->ops.write_reg          = e1000_write_phy_reg_bm2;
 		phy->ops.acquire            = e1000_get_hw_semaphore_82574;
 		phy->ops.release            = e1000_put_hw_semaphore_82574;
+		phy->ops.set_d0_lplu_state  = e1000_set_d0_lplu_state_82574;
+		phy->ops.set_d3_lplu_state  = e1000_set_d3_lplu_state_82574;
+		break;
+	default:
+		ret_val = -E1000_ERR_PHY;
+		goto out;
+		break;
+	}
+
+	/* This can only be done after all function pointers are setup. */
+	ret_val = e1000_get_phy_id_82571(hw);
+	if (ret_val) {
+		DEBUGOUT("Error getting PHY ID\n");
+		goto out;
+	}
 
-		/* This uses above function pointers */
-		ret_val = e1000_get_phy_id_82571(hw);
-		/* Verify PHY ID */
-		if (phy->id != BME1000_E_PHY_ID_R2) {
+	/* Verify phy id */
+	switch (hw->mac.type) {
+	case e1000_82571:
+	case e1000_82572:
+		if (phy->id != IGP01E1000_I_PHY_ID)
+			ret_val = -E1000_ERR_PHY;
+		break;
+	case e1000_82573:
+		if (phy->id != M88E1111_I_PHY_ID)
+			ret_val = -E1000_ERR_PHY;
+		break;
+	case e1000_82574:
+	case e1000_82583:
+		if (phy->id != BME1000_E_PHY_ID_R2)
 			ret_val = -E1000_ERR_PHY;
-			DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id);
-			goto out;
-		}
 		break;
 	default:
 		ret_val = -E1000_ERR_PHY;
-		goto out;
 		break;
 	}
 
+	if (ret_val)
+		DEBUGOUT1("PHY ID unknown: type = 0x%08x\n", phy->id);
+
 out:
 	return ret_val;
 }
@@ -693,6 +700,62 @@ static void e1000_put_hw_semaphore_82574
 }
 
 /**
+ *  e1000_set_d0_lplu_state_82574 - Set Low Power Linkup D0 state
+ *  @hw: pointer to the HW structure
+ *  @active: TRUE to enable LPLU, FALSE to disable
+ *
+ *  Sets the LPLU D0 state according to the active flag.
+ *  LPLU will not be activated unless the
+ *  device autonegotiation advertisement meets standards of
+ *  either 10 or 10/100 or 10/100/1000 at all duplexes.
+ *  This is a function pointer entry point only called by
+ *  PHY setup routines.
+ **/
+static s32 e1000_set_d0_lplu_state_82574(struct e1000_hw *hw, bool active)
+{
+	u16 data = E1000_READ_REG(hw, E1000_POEMB);
+
+	DEBUGFUNC("e1000_set_d0_lplu_state_82574");
+
+	if (active)
+		data |= E1000_PHY_CTRL_D0A_LPLU;
+	else
+		data &= ~E1000_PHY_CTRL_D0A_LPLU;
+
+	E1000_WRITE_REG(hw, E1000_POEMB, data);
+	return E1000_SUCCESS;
+}
+
+/**
+ *  e1000_set_d3_lplu_state_82574 - Sets low power link up state for D3
+ *  @hw: pointer to the HW structure
+ *  @active: boolean used to enable/disable lplu
+ *
+ *  The low power link up (lplu) state is set to the power management level D3
+ *  when active is TRUE, else clear lplu for D3. LPLU
+ *  is used during Dx states where the power conservation is most important.
+ *  During driver activity, SmartSpeed should be enabled so performance is
+ *  maintained.
+ **/
+static s32 e1000_set_d3_lplu_state_82574(struct e1000_hw *hw, bool active)
+{
+	u16 data = E1000_READ_REG(hw, E1000_POEMB);
+
+	DEBUGFUNC("e1000_set_d3_lplu_state_82574");
+
+	if (!active) {
+		data &= ~E1000_PHY_CTRL_NOND0A_LPLU;
+	} else if ((hw->phy.autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
+	           (hw->phy.autoneg_advertised == E1000_ALL_NOT_GIG) ||
+	           (hw->phy.autoneg_advertised == E1000_ALL_10_SPEED)) {
+		data |= E1000_PHY_CTRL_NOND0A_LPLU;
+	}
+
+	E1000_WRITE_REG(hw, E1000_POEMB, data);
+	return E1000_SUCCESS;
+}
+
+/**
  *  e1000_acquire_nvm_82571 - Request for access to the EEPROM
  *  @hw: pointer to the HW structure
  *
@@ -1039,7 +1102,7 @@ out:
  **/
 static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
 {
-	u32 ctrl, ctrl_ext, icr;
+	u32 ctrl, ctrl_ext;
 	s32 ret_val;
 
 	DEBUGFUNC("e1000_reset_hw_82571");
@@ -1125,7 +1188,7 @@ static s32 e1000_reset_hw_82571(struct e
 
 	/* Clear any pending interrupt events. */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	if (hw->mac.type == e1000_82571) {
 		/* Install any alternate MAC address into RAR0 */
@@ -1336,7 +1399,7 @@ static void e1000_initialize_hw_bits_825
 		 * apply workaround for hardware errata documented in errata
 		 * docs Fixes issue where some error prone or unreliable PCIe
 		 * completions are occurring, particularly with ASPM enabled.
-		 * Without fix, issue can cause tx timeouts.
+		 * Without fix, issue can cause Tx timeouts.
 		 */
 		reg = E1000_READ_REG(hw, E1000_GCR2);
 		reg |= 1;
@@ -1467,7 +1530,7 @@ bool e1000_check_phy_82574(struct e1000_
 	                               &receive_errors);
 	if (ret_val)
 		goto out;
-	if (receive_errors == E1000_RECEIVE_ERROR_MAX)  {
+	if (receive_errors == E1000_RECEIVE_ERROR_MAX) {
 		ret_val = hw->phy.ops.read_reg(hw, E1000_BASE1000T_STATUS,
 		                               &status_1kbt);
 		if (ret_val)
@@ -1510,6 +1573,7 @@ static s32 e1000_setup_link_82571(struct
 	default:
 		break;
 	}
+
 	return e1000_setup_link_generic(hw);
 }
 
@@ -1645,7 +1709,7 @@ static s32 e1000_check_for_serdes_link_8
 			 * auto-negotiation in the TXCW register and disable
 			 * forced link in the Device Control register in an
 			 * attempt to auto-negotiate with our link partner.
-			 * If the partner code word is null, stop forcing 
+			 * If the partner code word is null, stop forcing
 			 * and restart auto negotiation.
 			 */
 			if ((rxcw & E1000_RXCW_C) || !(rxcw & E1000_RXCW_CW))  {

Modified: stable/8/sys/dev/e1000/e1000_82575.c
==============================================================================
--- stable/8/sys/dev/e1000/e1000_82575.c	Thu Apr 28 23:21:50 2011	(r221190)
+++ stable/8/sys/dev/e1000/e1000_82575.c	Fri Apr 29 00:00:54 2011	(r221191)
@@ -36,7 +36,6 @@
  * 82575EB Gigabit Network Connection
  * 82575EB Gigabit Backplane Connection
  * 82575GB Gigabit Network Connection
- * 82575GB Gigabit Network Connection
  * 82576 Gigabit Network Connection
  * 82576 Quad Port Gigabit Mezzanine Adapter
  */
@@ -44,7 +43,6 @@
 #include "e1000_api.h"
 
 static s32  e1000_init_phy_params_82575(struct e1000_hw *hw);
-static s32  e1000_init_nvm_params_82575(struct e1000_hw *hw);
 static s32  e1000_init_mac_params_82575(struct e1000_hw *hw);
 static s32  e1000_acquire_phy_82575(struct e1000_hw *hw);
 static void e1000_release_phy_82575(struct e1000_hw *hw);
@@ -60,10 +58,14 @@ static s32  e1000_read_phy_reg_sgmii_825
                                            u16 *data);
 static s32  e1000_reset_hw_82575(struct e1000_hw *hw);
 static s32  e1000_reset_hw_82580(struct e1000_hw *hw);
-static s32 e1000_read_phy_reg_82580(struct e1000_hw *hw,
+static s32  e1000_read_phy_reg_82580(struct e1000_hw *hw,
                                     u32 offset, u16 *data);
-static s32 e1000_write_phy_reg_82580(struct e1000_hw *hw,
+static s32  e1000_write_phy_reg_82580(struct e1000_hw *hw,
                                      u32 offset, u16 data);
+static s32  e1000_set_d0_lplu_state_82580(struct e1000_hw *hw,
+                                          bool active);
+static s32  e1000_set_d3_lplu_state_82580(struct e1000_hw *hw,
+                                          bool active);
 static s32  e1000_set_d0_lplu_state_82575(struct e1000_hw *hw,
                                           bool active);
 static s32  e1000_setup_copper_link_82575(struct e1000_hw *hw);
@@ -86,6 +88,14 @@ static void e1000_shutdown_serdes_link_8
 static void e1000_power_up_serdes_link_82575(struct e1000_hw *hw);
 static s32 e1000_set_pcie_completion_timeout(struct e1000_hw *hw);
 static s32 e1000_reset_mdicnfg_82580(struct e1000_hw *hw);
+static s32 e1000_validate_nvm_checksum_82580(struct e1000_hw *hw);
+static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw);
+static s32 e1000_update_nvm_checksum_with_offset(struct e1000_hw *hw,
+						u16 offset);
+static s32 e1000_validate_nvm_checksum_with_offset(struct e1000_hw *hw,
+						u16 offset);
+static s32 e1000_validate_nvm_checksum_i350(struct e1000_hw *hw);
+static s32 e1000_update_nvm_checksum_i350(struct e1000_hw *hw);
 
 static const u16 e1000_82580_rxpbs_table[] =
 	{ 36, 72, 144, 1, 2, 4, 8, 16,
@@ -115,6 +125,7 @@ static bool e1000_sgmii_uses_mdio_82575(
 		ext_mdio = !!(reg & E1000_MDIC_DEST);
 		break;
 	case e1000_82580:
+	case e1000_i350:
 		reg = E1000_READ_REG(hw, E1000_MDICNFG);
 		ext_mdio = !!(reg & E1000_MDICNFG_EXT_MDIO);
 		break;
@@ -165,7 +176,7 @@ static s32 e1000_init_phy_params_82575(s
 
 	E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
 	e1000_reset_mdicnfg_82580(hw);
-		
+
 	if (e1000_sgmii_active_82575(hw) && !e1000_sgmii_uses_mdio_82575(hw)) {
 		phy->ops.read_reg   = e1000_read_phy_reg_sgmii_82575;
 		phy->ops.write_reg  = e1000_write_phy_reg_sgmii_82575;
@@ -182,11 +193,19 @@ static s32 e1000_init_phy_params_82575(s
 
 	/* Verify phy id and set remaining function pointers */
 	switch (phy->id) {
+	case I347AT4_E_PHY_ID:
+	case M88E1112_E_PHY_ID:
+	case M88E1340M_E_PHY_ID:
 	case M88E1111_I_PHY_ID:
 		phy->type                   = e1000_phy_m88;
 		phy->ops.check_polarity     = e1000_check_polarity_m88;
 		phy->ops.get_info           = e1000_get_phy_info_m88;
-		phy->ops.get_cable_length   = e1000_get_cable_length_m88;
+		if (phy->id == I347AT4_E_PHY_ID ||
+		    phy->id == M88E1112_E_PHY_ID ||
+		    phy->id == M88E1340M_E_PHY_ID)
+			phy->ops.get_cable_length = e1000_get_cable_length_m88_gen2;
+		else
+			phy->ops.get_cable_length = e1000_get_cable_length_m88;
 		phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_m88;
 		break;
 	case IGP03E1000_E_PHY_ID:
@@ -200,11 +219,14 @@ static s32 e1000_init_phy_params_82575(s
 		phy->ops.set_d3_lplu_state  = e1000_set_d3_lplu_state_generic;
 		break;
 	case I82580_I_PHY_ID:
+	case I350_I_PHY_ID:
 		phy->type                   = e1000_phy_82580;
 		phy->ops.check_polarity     = e1000_check_polarity_82577;
 		phy->ops.force_speed_duplex = e1000_phy_force_speed_duplex_82577;
 		phy->ops.get_cable_length   = e1000_get_cable_length_82577;
 		phy->ops.get_info           = e1000_get_phy_info_82577;
+		phy->ops.set_d0_lplu_state  = e1000_set_d0_lplu_state_82580;
+		phy->ops.set_d3_lplu_state  = e1000_set_d3_lplu_state_82580;
 		break;
 	default:
 		ret_val = -E1000_ERR_PHY;
@@ -219,7 +241,7 @@ out:
  *  e1000_init_nvm_params_82575 - Init NVM func ptrs.
  *  @hw: pointer to the HW structure
  **/
-static s32 e1000_init_nvm_params_82575(struct e1000_hw *hw)
+s32 e1000_init_nvm_params_82575(struct e1000_hw *hw)
 {
 	struct e1000_nvm_info *nvm = &hw->nvm;
 	u32 eecd = E1000_READ_REG(hw, E1000_EECD);
@@ -227,6 +249,15 @@ static s32 e1000_init_nvm_params_82575(s
 
 	DEBUGFUNC("e1000_init_nvm_params_82575");
 
+	size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
+	             E1000_EECD_SIZE_EX_SHIFT);
+	/*
+	 * Added to a constant, "size" becomes the left-shift value
+	 * for setting word_size.
+	 */
+	size += NVM_WORD_SIZE_BASE_SHIFT;
+
+	nvm->word_size = 1 << size;
 	nvm->opcode_bits        = 8;
 	nvm->delay_usec         = 1;
 	switch (nvm->override) {
@@ -244,30 +275,37 @@ static s32 e1000_init_nvm_params_82575(s
 		break;
 	}
 
-	nvm->type              = e1000_nvm_eeprom_spi;
+	nvm->type = e1000_nvm_eeprom_spi;
 
-	size = (u16)((eecd & E1000_EECD_SIZE_EX_MASK) >>
-	                  E1000_EECD_SIZE_EX_SHIFT);
+	if (nvm->word_size == (1 << 15))
+		nvm->page_size = 128;
 
-	/*
-	 * Added to a constant, "size" becomes the left-shift value
-	 * for setting word_size.
-	 */
-	size += NVM_WORD_SIZE_BASE_SHIFT;
+	/* Function Pointers */
+	nvm->ops.acquire    = e1000_acquire_nvm_82575;
+	nvm->ops.release    = e1000_release_nvm_82575;
+	if (nvm->word_size < (1 << 15))
+		nvm->ops.read    = e1000_read_nvm_eerd;
+	else
+		nvm->ops.read    = e1000_read_nvm_spi;
 
-	/* EEPROM access above 16k is unsupported */
-	if (size > 14)
-		size = 14;
-	nvm->word_size = 1 << size;
+	nvm->ops.write              = e1000_write_nvm_spi;
+	nvm->ops.validate           = e1000_validate_nvm_checksum_generic;
+	nvm->ops.update             = e1000_update_nvm_checksum_generic;
+	nvm->ops.valid_led_default  = e1000_valid_led_default_82575;
 
-	/* Function Pointers */
-	nvm->ops.acquire       = e1000_acquire_nvm_82575;
-	nvm->ops.read          = e1000_read_nvm_eerd;
-	nvm->ops.release       = e1000_release_nvm_82575;
-	nvm->ops.update        = e1000_update_nvm_checksum_generic;
-	nvm->ops.valid_led_default = e1000_valid_led_default_82575;
-	nvm->ops.validate      = e1000_validate_nvm_checksum_generic;
-	nvm->ops.write         = e1000_write_nvm_spi;
+	/* override genric family function pointers for specific descendants */
+	switch (hw->mac.type) {
+	case e1000_82580:
+		nvm->ops.validate = e1000_validate_nvm_checksum_82580;
+		nvm->ops.update = e1000_update_nvm_checksum_82580;
+		break;
+	case e1000_i350:
+		nvm->ops.validate = e1000_validate_nvm_checksum_i350;
+		nvm->ops.update = e1000_update_nvm_checksum_i350;
+		break;
+	default:
+		break;
+	}
 
 	return E1000_SUCCESS;
 }
@@ -318,6 +356,12 @@ static s32 e1000_init_mac_params_82575(s
 		mac->rar_entry_count = E1000_RAR_ENTRIES_82576;
 	if (mac->type == e1000_82580)
 		mac->rar_entry_count = E1000_RAR_ENTRIES_82580;
+	if (mac->type == e1000_i350) {
+		mac->rar_entry_count = E1000_RAR_ENTRIES_I350;
+		/* Enable EEE default settings for i350 */
+		dev_spec->eee_disable = FALSE;
+	}
+
 	/* Set if part includes ASF firmware */
 	mac->asf_firmware_present = TRUE;
 	/* FWSM register */
@@ -550,6 +594,7 @@ static s32 e1000_get_phy_id_82575(struct
 			phy->addr = mdic >> E1000_MDIC_PHY_SHIFT;
 			break;
 		case e1000_82580:
+		case e1000_i350:
 			mdic = E1000_READ_REG(hw, E1000_MDICNFG);
 			mdic &= E1000_MDICNFG_PHY_MASK;
 			phy->addr = mdic >> E1000_MDICNFG_PHY_SHIFT;
@@ -730,6 +775,103 @@ out:
 }
 
 /**
+ *  e1000_set_d0_lplu_state_82580 - Set Low Power Linkup D0 state
+ *  @hw: pointer to the HW structure
+ *  @active: TRUE to enable LPLU, FALSE to disable
+ *
+ *  Sets the LPLU D0 state according to the active flag.  When
+ *  activating LPLU this function also disables smart speed
+ *  and vice versa.  LPLU will not be activated unless the
+ *  device autonegotiation advertisement meets standards of
+ *  either 10 or 10/100 or 10/100/1000 at all duplexes.
+ *  This is a function pointer entry point only called by
+ *  PHY setup routines.
+ **/
+static s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
+{
+	struct e1000_phy_info *phy = &hw->phy;
+	s32 ret_val = E1000_SUCCESS;
+	u16 data;
+
+	DEBUGFUNC("e1000_set_d0_lplu_state_82580");
+
+	data = E1000_READ_REG(hw, E1000_82580_PHY_POWER_MGMT);
+
+	if (active) {
+		data |= E1000_82580_PM_D0_LPLU;
+
+		/* When LPLU is enabled, we should disable SmartSpeed */
+		data &= ~E1000_82580_PM_SPD;
+	} else {
+		data &= ~E1000_82580_PM_D0_LPLU;
+
+		/*
+		 * LPLU and SmartSpeed are mutually exclusive.  LPLU is used
+		 * during Dx states where the power conservation is most
+		 * important.  During driver activity we should enable
+		 * SmartSpeed, so performance is maintained.
+		 */
+		if (phy->smart_speed == e1000_smart_speed_on) {
+			data |= E1000_82580_PM_SPD;
+		} else if (phy->smart_speed == e1000_smart_speed_off) {
+			data &= ~E1000_82580_PM_SPD;
+		}
+	}
+
+	E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
+	return ret_val;
+}
+
+/**
+ *  e1000_set_d3_lplu_state_82580 - Sets low power link up state for D3
+ *  @hw: pointer to the HW structure
+ *  @active: boolean used to enable/disable lplu
+ *
+ *  Success returns 0, Failure returns 1
+ *
+ *  The low power link up (lplu) state is set to the power management level D3
+ *  and SmartSpeed is disabled when active is TRUE, else clear lplu for D3
+ *  and enable Smartspeed.  LPLU and Smartspeed are mutually exclusive.  LPLU
+ *  is used during Dx states where the power conservation is most important.
+ *  During driver activity, SmartSpeed should be enabled so performance is
+ *  maintained.
+ **/
+s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
+{
+	struct e1000_phy_info *phy = &hw->phy;
+	s32 ret_val = E1000_SUCCESS;
+	u16 data;
+
+	DEBUGFUNC("e1000_set_d3_lplu_state_82580");
+
+	data = E1000_READ_REG(hw, E1000_82580_PHY_POWER_MGMT);
+
+	if (!active) {
+		data &= ~E1000_82580_PM_D3_LPLU;
+		/*
+		 * LPLU and SmartSpeed are mutually exclusive.  LPLU is used
+		 * during Dx states where the power conservation is most
+		 * important.  During driver activity we should enable
+		 * SmartSpeed, so performance is maintained.
+		 */
+		if (phy->smart_speed == e1000_smart_speed_on) {
+			data |= E1000_82580_PM_SPD;
+		} else if (phy->smart_speed == e1000_smart_speed_off) {
+			data &= ~E1000_82580_PM_SPD;
+		}
+	} else if ((phy->autoneg_advertised == E1000_ALL_SPEED_DUPLEX) ||
+	           (phy->autoneg_advertised == E1000_ALL_NOT_GIG) ||
+	           (phy->autoneg_advertised == E1000_ALL_10_SPEED)) {
+		data |= E1000_82580_PM_D3_LPLU;
+		/* When LPLU is enabled, we should disable SmartSpeed */
+		data &= ~E1000_82580_PM_SPD;
+	}
+
+	E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
+	return ret_val;
+}
+
+/**
  *  e1000_acquire_nvm_82575 - Request for access to EEPROM
  *  @hw: pointer to the HW structure
  *
@@ -747,9 +889,7 @@ static s32 e1000_acquire_nvm_82575(struc
 	ret_val = e1000_acquire_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
 	if (ret_val)
 		goto out;
-
 	ret_val = e1000_acquire_nvm_generic(hw);
-
 	if (ret_val)
 		e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
 
@@ -768,7 +908,6 @@ static void e1000_release_nvm_82575(stru
 {
 	DEBUGFUNC("e1000_release_nvm_82575");
 
-	e1000_release_nvm_generic(hw);
 	e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
 }
 
@@ -1076,7 +1215,7 @@ void e1000_shutdown_serdes_link_82575(st
  **/
 static s32 e1000_reset_hw_82575(struct e1000_hw *hw)
 {
-	u32 ctrl, icr;
+	u32 ctrl;
 	s32 ret_val;
 
 	DEBUGFUNC("e1000_reset_hw_82575");
@@ -1126,7 +1265,7 @@ static s32 e1000_reset_hw_82575(struct e
 
 	/* Clear any pending interrupt events. */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	/* Install any alternate MAC address into RAR0 */
 	ret_val = e1000_check_alt_mac_addr_generic(hw);
@@ -1222,7 +1361,12 @@ static s32 e1000_setup_copper_link_82575
 	}
 	switch (hw->phy.type) {
 	case e1000_phy_m88:
-		ret_val = e1000_copper_link_setup_m88(hw);
+		if (hw->phy.id == I347AT4_E_PHY_ID ||
+		    hw->phy.id == M88E1112_E_PHY_ID ||
+		    hw->phy.id == M88E1340M_E_PHY_ID)
+			ret_val = e1000_copper_link_setup_m88_gen2(hw);
+		else
+			ret_val = e1000_copper_link_setup_m88(hw);
 		break;
 	case e1000_phy_igp_3:
 		ret_val = e1000_copper_link_setup_igp(hw);
@@ -1570,7 +1714,7 @@ static void e1000_clear_hw_cntrs_82575(s
 }
 
 /**
- *  e1000_rx_fifo_flush_82575 - Clean rx fifo after RX enable
+ *  e1000_rx_fifo_flush_82575 - Clean rx fifo after Rx enable
  *  @hw: pointer to the HW structure
  *
  *  After rx enable if managability is enabled then there is likely some
@@ -1588,7 +1732,7 @@ void e1000_rx_fifo_flush_82575(struct e1
 	    !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN))
 		return;
 
-	/* Disable all RX queues */
+	/* Disable all Rx queues */
 	for (i = 0; i < 4; i++) {
 		rxdctl[i] = E1000_READ_REG(hw, E1000_RXDCTL(i));
 		E1000_WRITE_REG(hw, E1000_RXDCTL(i),
@@ -1626,7 +1770,7 @@ void e1000_rx_fifo_flush_82575(struct e1
 	E1000_WRITE_FLUSH(hw);
 	msec_delay(2);
 
-	/* Enable RX queues that were previously enabled and restore our
+	/* Enable Rx queues that were previously enabled and restore our
 	 * previous state
 	 */
 	for (i = 0; i < 4; i++)
@@ -1694,7 +1838,6 @@ out:
 	return ret_val;
 }
 
-
 /**
  *  e1000_vmdq_set_anti_spoofing_pf - enable or disable anti-spoofing
  *  @hw: pointer to the hardware struct
@@ -1709,6 +1852,7 @@ void e1000_vmdq_set_anti_spoofing_pf(str
 
 	switch (hw->mac.type) {
 	case e1000_82576:
+	case e1000_i350:
 		dtxswc = E1000_READ_REG(hw, E1000_DTXSWC);
 		if (enable) {
 			dtxswc |= (E1000_DTXSWC_MAC_SPOOF_MASK |
@@ -1747,6 +1891,14 @@ void e1000_vmdq_set_loopback_pf(struct e
 			dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN;
 		E1000_WRITE_REG(hw, E1000_DTXSWC, dtxswc);
 		break;
+	case e1000_i350:
+		dtxswc = E1000_READ_REG(hw, E1000_TXSWC);
+		if (enable)
+			dtxswc |= E1000_DTXSWC_VMDQ_LOOPBACK_EN;
+		else
+			dtxswc &= ~E1000_DTXSWC_VMDQ_LOOPBACK_EN;
+		E1000_WRITE_REG(hw, E1000_TXSWC, dtxswc);
+		break;
 	default:
 		/* Currently no other hardware supports loopback */
 		break;
@@ -1831,7 +1983,7 @@ out:
  *  e1000_reset_mdicnfg_82580 - Reset MDICNFG destination and com_mdio bits
  *  @hw: pointer to the HW structure
  *
- *  This resets the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on
+ *  This resets the the MDICNFG.Destination and MDICNFG.Com_MDIO bits based on
  *  the values found in the EEPROM.  This addresses an issue in which these
  *  bits are not restored from EEPROM after reset.
  **/
@@ -1839,7 +1991,7 @@ static s32 e1000_reset_mdicnfg_82580(str
 {
 	s32 ret_val = E1000_SUCCESS;
 	u32 mdicnfg;
-	u16 nvm_data;
+	u16 nvm_data = 0;
 
 	DEBUGFUNC("e1000_reset_mdicnfg_82580");
 
@@ -1878,7 +2030,7 @@ static s32 e1000_reset_hw_82580(struct e
 	s32 ret_val = E1000_SUCCESS;
 	/* BH SW mailbox bit in SW_FW_SYNC */
 	u16 swmbsw_mask = E1000_SW_SYNCH_MB;
-	u32 ctrl, icr;
+	u32 ctrl;
 	bool global_device_reset = hw->dev_spec._82575.global_device_reset;
 
 	DEBUGFUNC("e1000_reset_hw_82580");
@@ -1940,7 +2092,7 @@ static s32 e1000_reset_hw_82580(struct e
 
 	/* Clear any pending interrupt events. */
 	E1000_WRITE_REG(hw, E1000_IMC, 0xffffffff);
-	icr = E1000_READ_REG(hw, E1000_ICR);
+	E1000_READ_REG(hw, E1000_ICR);
 
 	ret_val = e1000_reset_mdicnfg_82580(hw);
 	if (ret_val)
@@ -1957,7 +2109,7 @@ static s32 e1000_reset_hw_82580(struct e
 }
 
 /**
- *  e1000_rxpbs_adjust_82580 - adjust RXPBS value to reflect actual RX PBA size
+ *  e1000_rxpbs_adjust_82580 - adjust RXPBS value to reflect actual Rx PBA size
  *  @data: data received by reading RXPBS register
  *
  *  The 82580 uses a table based approach for packet buffer allocation sizes.
@@ -1975,3 +2127,263 @@ u16 e1000_rxpbs_adjust_82580(u32 data)
 
 	return ret_val;
 }
+
+/**
+ *  e1000_validate_nvm_checksum_with_offset - Validate EEPROM
+ *  checksum
+ *  @hw: pointer to the HW structure
+ *  @offset: offset in words of the checksum protected region
+ *
+ *  Calculates the EEPROM checksum by reading/adding each word of the EEPROM
+ *  and then verifies that the sum of the EEPROM is equal to 0xBABA.
+ **/
+s32 e1000_validate_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)
+{
+	s32 ret_val = E1000_SUCCESS;
+	u16 checksum = 0;
+	u16 i, nvm_data;
+
+	DEBUGFUNC("e1000_validate_nvm_checksum_with_offset");
+
+	for (i = offset; i < ((NVM_CHECKSUM_REG + offset) + 1); i++) {
+		ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data);
+		if (ret_val) {
+			DEBUGOUT("NVM Read Error\n");
+			goto out;
+		}
+		checksum += nvm_data;
+	}
+
+	if (checksum != (u16) NVM_SUM) {
+		DEBUGOUT("NVM Checksum Invalid\n");
+		ret_val = -E1000_ERR_NVM;
+		goto out;
+	}
+
+out:
+	return ret_val;
+}
+
+/**
+ *  e1000_update_nvm_checksum_with_offset - Update EEPROM
+ *  checksum
+ *  @hw: pointer to the HW structure
+ *  @offset: offset in words of the checksum protected region
+ *
+ *  Updates the EEPROM checksum by reading/adding each word of the EEPROM
+ *  up to the checksum.  Then calculates the EEPROM checksum and writes the
+ *  value to the EEPROM.
+ **/
+s32 e1000_update_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)
+{
+	s32 ret_val;
+	u16 checksum = 0;
+	u16 i, nvm_data;
+
+	DEBUGFUNC("e1000_update_nvm_checksum_with_offset");
+
+	for (i = offset; i < (NVM_CHECKSUM_REG + offset); i++) {
+		ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data);
+		if (ret_val) {
+			DEBUGOUT("NVM Read Error while updating checksum.\n");
+			goto out;
+		}
+		checksum += nvm_data;
+	}
+	checksum = (u16) NVM_SUM - checksum;
+	ret_val = hw->nvm.ops.write(hw, (NVM_CHECKSUM_REG + offset), 1,
+				&checksum);
+	if (ret_val)
+		DEBUGOUT("NVM Write Error while updating checksum.\n");
+
+out:
+	return ret_val;
+}
+
+/**
+ *  e1000_validate_nvm_checksum_82580 - Validate EEPROM checksum
+ *  @hw: pointer to the HW structure
+ *
+ *  Calculates the EEPROM section checksum by reading/adding each word of
+ *  the EEPROM and then verifies that the sum of the EEPROM is
+ *  equal to 0xBABA.
+ **/
+static s32 e1000_validate_nvm_checksum_82580(struct e1000_hw *hw)
+{
+	s32 ret_val = E1000_SUCCESS;
+	u16 eeprom_regions_count = 1;
+	u16 j, nvm_data;
+	u16 nvm_offset;
+
+	DEBUGFUNC("e1000_validate_nvm_checksum_82580");
+
+	ret_val = hw->nvm.ops.read(hw, NVM_COMPATIBILITY_REG_3, 1, &nvm_data);
+	if (ret_val) {
+		DEBUGOUT("NVM Read Error\n");
+		goto out;
+	}
+
+	if (nvm_data & NVM_COMPATIBILITY_BIT_MASK) {
+		/* if chekcsums compatibility bit is set validate checksums
+		 * for all 4 ports. */
+		eeprom_regions_count = 4;
+	}
+
+	for (j = 0; j < eeprom_regions_count; j++) {
+		nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
+		ret_val = e1000_validate_nvm_checksum_with_offset(hw,
+								nvm_offset);
+		if (ret_val != E1000_SUCCESS)
+			goto out;
+	}
+
+out:
+	return ret_val;
+}
+
+/**
+ *  e1000_update_nvm_checksum_82580 - Update EEPROM checksum
+ *  @hw: pointer to the HW structure
+ *
+ *  Updates the EEPROM section checksums for all 4 ports by reading/adding
+ *  each word of the EEPROM up to the checksum.  Then calculates the EEPROM
+ *  checksum and writes the value to the EEPROM.
+ **/
+static s32 e1000_update_nvm_checksum_82580(struct e1000_hw *hw)
+{
+	s32 ret_val;
+	u16 j, nvm_data;
+	u16 nvm_offset;
+
+	DEBUGFUNC("e1000_update_nvm_checksum_82580");
+
+	ret_val = hw->nvm.ops.read(hw, NVM_COMPATIBILITY_REG_3, 1, &nvm_data);
+	if (ret_val) {
+		DEBUGOUT("NVM Read Error while updating checksum"
+			" compatibility bit.\n");
+		goto out;
+	}
+
+	if ((nvm_data & NVM_COMPATIBILITY_BIT_MASK) == 0) {
+		/* set compatibility bit to validate checksums appropriately */
+		nvm_data = nvm_data | NVM_COMPATIBILITY_BIT_MASK;
+		ret_val = hw->nvm.ops.write(hw, NVM_COMPATIBILITY_REG_3, 1,

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

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 00:24: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 A05E7106564A;
	Fri, 29 Apr 2011 00:24:17 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 90D208FC13;
	Fri, 29 Apr 2011 00:24: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 p3T0OHLG075771;
	Fri, 29 Apr 2011 00:24:17 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T0OHhP075767;
	Fri, 29 Apr 2011 00:24:17 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201104290024.p3T0OHhP075767@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 29 Apr 2011 00:24:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221192 - stable/8/sys/dev/ixgbe
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 00:24:17 -0000

Author: jfv
Date: Fri Apr 29 00:24:17 2011
New Revision: 221192
URL: http://svn.freebsd.org/changeset/base/221192

Log:
  MFC of the ixgbe driver: revisions 217131, 217132, and 221041.
  This brings this driver up to the level in HEAD as well.

Modified:
  stable/8/sys/dev/ixgbe/ixgbe.c
  stable/8/sys/dev/ixgbe/ixgbe.h
  stable/8/sys/dev/ixgbe/ixv.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/ixgbe/ixgbe.c
==============================================================================
--- stable/8/sys/dev/ixgbe/ixgbe.c	Fri Apr 29 00:00:54 2011	(r221191)
+++ stable/8/sys/dev/ixgbe/ixgbe.c	Fri Apr 29 00:24:17 2011	(r221192)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2010, Intel Corporation 
+  Copyright (c) 2001-2011, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -33,7 +33,7 @@
 /*$FreeBSD$*/
 
 #ifdef HAVE_KERNEL_OPTION_HEADERS
-#include "opt_device_polling.h"
+#include "opt_inet.h"
 #endif
 
 #include "ixgbe.h"
@@ -46,7 +46,7 @@ int             ixgbe_display_debug_stat
 /*********************************************************************
  *  Driver version
  *********************************************************************/
-char ixgbe_driver_version[] = "2.3.8";
+char ixgbe_driver_version[] = "2.3.10";
 
 /*********************************************************************
  *  PCI Device ID Table
@@ -270,8 +270,8 @@ TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe
 /*
  * Number of Queues, can be set to 0,
  * it then autoconfigures based on the
- * number of cpus. Each queue is a pair
- * of RX and TX rings with a msix vector
+ * number of cpus with a max of 8. This
+ * can be overriden manually here.
  */
 static int ixgbe_num_queues = 0;
 TUNABLE_INT("hw.ixgbe.num_queues", &ixgbe_num_queues);
@@ -787,10 +787,6 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
 		return (err);
 	}
 
-	/* Call cleanup if number of TX descriptors low */
-	if (txr->tx_avail <= IXGBE_TX_CLEANUP_THRESHOLD)
-		ixgbe_txeof(txr);
-
 	enqueued = 0;
 	if (m == NULL) {
 		next = drbr_dequeue(ifp, txr->br);
@@ -814,7 +810,9 @@ ixgbe_mq_start_locked(struct ifnet *ifp,
 		ETHER_BPF_MTAP(ifp, next);
 		if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
 			break;
-		if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) {
+		if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD)
+			ixgbe_txeof(txr);
+		if (txr->tx_avail < IXGBE_TX_OP_THRESHOLD) {
 			ifp->if_drv_flags |= IFF_DRV_OACTIVE;
 			break;
 		}
@@ -864,10 +862,35 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
 {
 	struct adapter	*adapter = ifp->if_softc;
 	struct ifreq	*ifr = (struct ifreq *) data;
+#ifdef INET
+	struct ifaddr *ifa = (struct ifaddr *)data;
+#endif
 	int             error = 0;
 
 	switch (command) {
 
+        case SIOCSIFADDR:
+#ifdef INET
+		if (ifa->ifa_addr->sa_family == AF_INET) {
+			/*
+			 * Since resetting hardware takes a very long time
+			 * and results in link renegotiation we only
+			 * initialize the hardware only when it is absolutely
+			 * required.
+			 */
+			ifp->if_flags |= IFF_UP;
+			if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
+				IXGBE_CORE_LOCK(adapter);
+				ixgbe_init_locked(adapter);
+				IXGBE_CORE_UNLOCK(adapter);
+			}
+			if (!(ifp->if_flags & IFF_NOARP))
+				arp_ifinit(ifp, ifa);
+		} else
+#endif
+			error = ether_ioctl(ifp, command, data);
+		break;
+
 	case SIOCSIFMTU:
 		IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)");
 		if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) {
@@ -989,7 +1012,7 @@ ixgbe_init_locked(struct adapter *adapte
 	if (ifp->if_capenable & IFCAP_TXCSUM) {
 		ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP);
 #if __FreeBSD_version >= 800000
-		if (hw->mac.type == ixgbe_mac_82599EB)
+		if (hw->mac.type != ixgbe_mac_82598EB)
 			ifp->if_hwassist |= CSUM_SCTP;
 #endif
 	}
@@ -1032,14 +1055,12 @@ ixgbe_init_locked(struct adapter *adapte
 
 	gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE);
 
-	if (hw->mac.type == ixgbe_mac_82599EB) {
-		gpie |= IXGBE_SDP1_GPIEN;
-		gpie |= IXGBE_SDP2_GPIEN;
-	}
-
 	/* Enable Fan Failure Interrupt */
-	if (hw->device_id == IXGBE_DEV_ID_82598AT)
-		gpie |= IXGBE_SDP1_GPIEN;
+	gpie |= IXGBE_SDP1_GPIEN;
+
+	/* Add for Thermal detection */
+	if (hw->mac.type == ixgbe_mac_82599EB)
+		gpie |= IXGBE_SDP2_GPIEN;
 
 	if (adapter->msix > 1) {
 		/* Enable Enhanced MSIX mode */
@@ -1121,7 +1142,7 @@ ixgbe_init_locked(struct adapter *adapte
 
 #ifdef IXGBE_FDIR
 	/* Init Flow director */
-	if (hw->mac.type == ixgbe_mac_82599EB)
+	if (hw->mac.type != ixgbe_mac_82598EB)
 		ixgbe_init_fdir_signature_82599(&adapter->hw, fdir_pballoc);
 #endif
 
@@ -1338,8 +1359,6 @@ ixgbe_msix_que(void *arg)
 	more_tx = ixgbe_txeof(txr);
 	IXGBE_TX_UNLOCK(txr);
 
-	more_rx = ixgbe_rxeof(que, adapter->rx_process_limit);
-
 	/* Do AIM now? */
 
 	if (ixgbe_enable_aim == FALSE)
@@ -1417,7 +1436,7 @@ ixgbe_msix_link(void *arg)
 	if (reg_eicr & IXGBE_EICR_LSC)
 		taskqueue_enqueue(adapter->tq, &adapter->link_task);
 
-	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
+	if (adapter->hw.mac.type != ixgbe_mac_82598EB) {
 #ifdef IXGBE_FDIR
 		if (reg_eicr & IXGBE_EICR_FLOW_DIR) {
 			/* This is probably overkill :) */
@@ -2792,7 +2811,7 @@ ixgbe_setup_transmit_ring(struct tx_ring
 
 #ifdef IXGBE_FDIR
 	/* Set the rate at which we sample packets */
-	if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+	if (adapter->hw.mac.type != ixgbe_mac_82598EB)
 		txr->atr_sample = atr_sample_rate;
 #endif
 
@@ -2874,7 +2893,7 @@ ixgbe_initialize_transmit_units(struct a
 
 	}
 
-	if (hw->mac.type == ixgbe_mac_82599EB) {
+	if (hw->mac.type != ixgbe_mac_82598EB) {
 		u32 dmatxctl, rttdcs;
 		dmatxctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL);
 		dmatxctl |= IXGBE_DMATXCTL_TE;
@@ -3386,11 +3405,15 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 	bus_dma_segment_t	pseg[1];
 	struct ixgbe_rx_buf	*rxbuf;
 	struct mbuf		*mh, *mp;
-	int			i, nsegs, error, cleaned;
+	int			i, j, nsegs, error;
+	bool			refreshed = FALSE;
 
-	i = rxr->next_to_refresh;
-	cleaned = -1; /* Signify no completions */
-	while (i != limit) {
+	i = j = rxr->next_to_refresh;
+	/* Control the loop with one beyond */
+	if (++j == adapter->num_rx_desc)
+		j = 0;
+
+	while (j != limit) {
 		rxbuf = &rxr->rx_buffers[i];
 		if (rxr->hdr_split == FALSE)
 			goto no_split;
@@ -3418,7 +3441,8 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 		rxbuf->m_head = mh;
 		bus_dmamap_sync(rxr->htag, rxbuf->hmap,
 		    BUS_DMASYNC_PREREAD);
-		rxr->rx_base[i].read.hdr_addr = htole64(hseg[0].ds_addr);
+		rxr->rx_base[i].read.hdr_addr =
+		    htole64(hseg[0].ds_addr);
 
 no_split:
 		if (rxbuf->m_pack == NULL) {
@@ -3446,17 +3470,17 @@ no_split:
 		rxr->rx_base[i].read.pkt_addr =
 		    htole64(pseg[0].ds_addr);
 
-		cleaned = i;
-		/* Calculate next index */
-		if (++i == adapter->num_rx_desc)
-			i = 0;
-		/* This is the work marker for refresh */
+		refreshed = TRUE;
+		/* Next is precalculated */
+		i = j;
 		rxr->next_to_refresh = i;
+		if (++j == adapter->num_rx_desc)
+			j = 0;
 	}
 update:
-	if (cleaned != -1) /* If we refreshed some, bump tail */
+	if (refreshed) /* Update hardware tail index */
 		IXGBE_WRITE_REG(&adapter->hw,
-		    IXGBE_RDT(rxr->me), cleaned);
+		    IXGBE_RDT(rxr->me), rxr->next_to_refresh);
 	return;
 }
 
@@ -3727,6 +3751,7 @@ skip_head:
 	rxr->lro_enabled = FALSE;
 	rxr->rx_split_packets = 0;
 	rxr->rx_bytes = 0;
+	rxr->discard = FALSE;
 
 	bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map,
 	    BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
@@ -3736,7 +3761,7 @@ skip_head:
 	** 82598 uses software LRO, the
 	** 82599 uses a hardware assist.
 	*/
-	if ((adapter->hw.mac.type == ixgbe_mac_82599EB) &&
+	if ((adapter->hw.mac.type != ixgbe_mac_82598EB) &&
 	    (ifp->if_capenable & IFCAP_RXCSUM) &&
 	    (ifp->if_capenable & IFCAP_LRO))
 		ixgbe_setup_hw_rsc(rxr);
@@ -3862,8 +3887,7 @@ ixgbe_initialize_receive_units(struct ad
 		IXGBE_WRITE_REG(hw, IXGBE_RDT(i), 0);
 	}
 
-	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
-		/* PSRTYPE must be initialized in 82599 */
+	if (adapter->hw.mac.type != ixgbe_mac_82598EB) {
 		u32 psrtype = IXGBE_PSRTYPE_TCPHDR |
 			      IXGBE_PSRTYPE_UDPHDR |
 			      IXGBE_PSRTYPE_IPV4HDR |
@@ -4307,10 +4331,8 @@ next_desc:
 	}
 
 	/* Refresh any remaining buf structs */
-	if (processed != 0) {
+	if (ixgbe_rx_unrefreshed(rxr))
 		ixgbe_refresh_mbufs(rxr, i);
-		processed = 0;
-	}
 
 	rxr->next_to_check = i;
 
@@ -4472,7 +4494,7 @@ ixgbe_setup_vlan_hw_support(struct adapt
 	IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl);
 
 	/* On 82599 the VLAN enable is per/queue in RXDCTL */
-	if (hw->mac.type == ixgbe_mac_82599EB)
+	if (hw->mac.type != ixgbe_mac_82598EB)
 		for (int i = 0; i < adapter->num_queues; i++) {
 			ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i));
 				ctrl |= IXGBE_RXDCTL_VME;
@@ -4491,9 +4513,7 @@ ixgbe_enable_intr(struct adapter *adapte
 	/* Enable Fan Failure detection */
 	if (hw->device_id == IXGBE_DEV_ID_82598AT)
 		    mask |= IXGBE_EIMS_GPI_SDP1;
-
-	/* 82599 specific interrupts */
-	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
+	else {
 		    mask |= IXGBE_EIMS_ECC;
 		    mask |= IXGBE_EIMS_GPI_SDP1;
 		    mask |= IXGBE_EIMS_GPI_SDP2;
@@ -4810,7 +4830,7 @@ ixgbe_update_stats_counters(struct adapt
 	adapter->stats.gprc += IXGBE_READ_REG(hw, IXGBE_GPRC);
 	adapter->stats.gprc -= missed_rx;
 
-	if (hw->mac.type == ixgbe_mac_82599EB) {
+	if (hw->mac.type != ixgbe_mac_82598EB) {
 		adapter->stats.gorc += IXGBE_READ_REG(hw, IXGBE_GORCL) +
 		    ((u64)IXGBE_READ_REG(hw, IXGBE_GORCH) << 32);
 		adapter->stats.gotc += IXGBE_READ_REG(hw, IXGBE_GOTCL) +
@@ -4878,7 +4898,7 @@ ixgbe_update_stats_counters(struct adapt
 	adapter->stats.fccrc += IXGBE_READ_REG(hw, IXGBE_FCCRC);
 	adapter->stats.fclast += IXGBE_READ_REG(hw, IXGBE_FCLAST);
 	/* Only read FCOE on 82599 */
-	if (hw->mac.type == ixgbe_mac_82599EB) {
+	if (hw->mac.type != ixgbe_mac_82598EB) {
 		adapter->stats.fcoerpdc += IXGBE_READ_REG(hw, IXGBE_FCOERPDC);
 		adapter->stats.fcoeprc += IXGBE_READ_REG(hw, IXGBE_FCOEPRC);
 		adapter->stats.fcoeptc += IXGBE_READ_REG(hw, IXGBE_FCOEPTC);

Modified: stable/8/sys/dev/ixgbe/ixgbe.h
==============================================================================
--- stable/8/sys/dev/ixgbe/ixgbe.h	Fri Apr 29 00:00:54 2011	(r221191)
+++ stable/8/sys/dev/ixgbe/ixgbe.h	Fri Apr 29 00:24:17 2011	(r221192)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2010, Intel Corporation 
+  Copyright (c) 2001-2011, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -490,7 +490,7 @@ ixgbe_is_sfp(struct ixgbe_hw *hw)
 }
 
 /* Workaround to make 8.0 buildable */
-#if __FreeBSD_version < 800504
+#if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504
 static __inline int
 drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
 {
@@ -502,4 +502,19 @@ drbr_needs_enqueue(struct ifnet *ifp, st
 }
 #endif
 
+/*
+** Find the number of unrefreshed RX descriptors
+*/
+static inline u16
+ixgbe_rx_unrefreshed(struct rx_ring *rxr)
+{       
+	struct adapter  *adapter = rxr->adapter;
+        
+	if (rxr->next_to_check > rxr->next_to_refresh)
+		return (rxr->next_to_check - rxr->next_to_refresh - 1);
+	else
+		return ((adapter->num_rx_desc + rxr->next_to_check) -
+		    rxr->next_to_refresh - 1);
+}       
+
 #endif /* _IXGBE_H_ */

Modified: stable/8/sys/dev/ixgbe/ixv.h
==============================================================================
--- stable/8/sys/dev/ixgbe/ixv.h	Fri Apr 29 00:00:54 2011	(r221191)
+++ stable/8/sys/dev/ixgbe/ixv.h	Fri Apr 29 00:24:17 2011	(r221192)
@@ -175,7 +175,11 @@
 #define VFTA_SIZE			128
 
 /* Offload bits in mbuf flag */
+#if __FreeBSD_version >= 800000
 #define CSUM_OFFLOAD		(CSUM_IP|CSUM_TCP|CSUM_UDP|CSUM_SCTP)
+#else
+#define CSUM_OFFLOAD		(CSUM_IP|CSUM_TCP|CSUM_UDP)
+#endif
 
 /*
  *****************************************************************************
@@ -400,7 +404,7 @@ struct adapter {
 #define IXV_TX_LOCK_ASSERT(_sc)         mtx_assert(&(_sc)->tx_mtx, MA_OWNED)
 
 /* Workaround to make 8.0 buildable */
-#if __FreeBSD_version < 800504
+#if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504
 static __inline int
 drbr_needs_enqueue(struct ifnet *ifp, struct buf_ring *br)
 {

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 00:40: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 8888B1065672;
	Fri, 29 Apr 2011 00:40:00 +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 7685C8FC08;
	Fri, 29 Apr 2011 00:40: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 p3T0e0EA076261;
	Fri, 29 Apr 2011 00:40:00 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T0e0Q4076257;
	Fri, 29 Apr 2011 00:40:00 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201104290040.p3T0e0Q4076257@svn.freebsd.org>
From: Xin LI 
Date: Fri, 29 Apr 2011 00:40:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221193 - stable/8/lib/libutil
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 00:40:00 -0000

Author: delphij
Date: Fri Apr 29 00:40:00 2011
New Revision: 221193
URL: http://svn.freebsd.org/changeset/base/221193

Log:
  MFC r220582:
  
  Add support for IEE/IEC (and now also SI) power of two notions of
  prefixes (Ki, Mi, Gi...) for humanize_number(3).
  
  Note that applications has to pass HN_IEC_PREFIXES to use this
  feature for backward compatibility reasons.
  
  Reviewed by:	arundel

Modified:
  stable/8/lib/libutil/humanize_number.3
  stable/8/lib/libutil/humanize_number.c
  stable/8/lib/libutil/libutil.h
Directory Properties:
  stable/8/lib/libutil/   (props changed)

Modified: stable/8/lib/libutil/humanize_number.3
==============================================================================
--- stable/8/lib/libutil/humanize_number.3	Fri Apr 29 00:24:17 2011	(r221192)
+++ stable/8/lib/libutil/humanize_number.3	Fri Apr 29 00:40:00 2011	(r221193)
@@ -35,7 +35,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 25, 2004
+.Dd Apr 12, 2011
 .Dt HUMANIZE_NUMBER 3
 .Os
 .Sh NAME
@@ -75,17 +75,24 @@ then divide
 by 1024 until it will.
 In this case, prefix
 .Fa suffix
-with the appropriate SI designator.
+with the appropriate designator.
 The
 .Fn humanize_number
-function
-follows the traditional computer science conventions rather than the proposed
-SI power of two convention.
+function follows the traditional computer science conventions by
+default, rather than the IEE/IEC (and now also SI) power of two
+convention or the power of ten notion.
+This behaviour however can be altered by specifying the
+.Dv HN_DIVISOR_1000
+and
+.Dv HN_IEC_PREFIXES
+flags.
 .Pp
-The prefixes are:
+The traditional
+.Pq default
+prefixes are:
 .Bl -column "Prefix" "Description" "1000000000000000000" -offset indent
 .It Sy "Prefix" Ta Sy "Description" Ta Sy "Multiplier" Ta Sy "Multiplier 1000x"
-.It Li k Ta No kilo Ta 1024 Ta 1000
+.It Li (note) Ta No kilo Ta 1024 Ta 1000
 .It Li M Ta No mega Ta 1048576 Ta 1000000
 .It Li G Ta No giga Ta 1073741824 Ta 1000000000
 .It Li T Ta No tera Ta 1099511627776 Ta 1000000000000
@@ -93,6 +100,20 @@ The prefixes are:
 .It Li E Ta No exa Ta 1152921504606846976 Ta 1000000000000000000
 .El
 .Pp
+Note:
+An uppercase K indicates a power of two, a lowercase k a power of ten.
+.Pp
+The IEE/IEC (and now also SI) power of two prefixes are:
+.Bl -column "Prefix" "Description" "1000000000000000000" -offset indent
+.It Sy "Prefix" Ta Sy "Description" Ta Sy "Multiplier"
+.It Li Ki Ta No kibi Ta 1024
+.It Li Mi Ta No mebi Ta 1048576
+.It Li Gi Ta No gibi Ta 1073741824
+.It Li Ti Ta No tebi Ta 1099511627776
+.It Li Pi Ta No pebi Ta 1125899906842624
+.It Li Ei Ta No exbi Ta 1152921504606846976
+.El
+.Pp
 The
 .Fa len
 argument must be at least 4 plus the length of
@@ -101,7 +122,12 @@ in order to ensure a useful result is ge
 .Fa buf .
 To use a specific prefix, specify this as
 .Fa scale
-(multiplier = 1024 ^ scale).
+.Po multiplier = 1024 ^ scale;
+when
+.Dv HN_DIVISOR_1000
+is specified,
+multiplier = 1000 ^ scale
+.Pc .
 This cannot be combined with any of the
 .Fa scale
 flags below.
@@ -134,6 +160,11 @@ Use
 Divide
 .Fa number
 with 1000 instead of 1024.
+.It Dv HN_IEC_PREFIXES
+Use the IEE/IEC notion of prefixes (Ki, Mi, Gi...).
+This flag has no effect when
+.Dv HN_DIVISOR_1000
+is also specified.
 .El
 .Sh RETURN VALUES
 The
@@ -148,6 +179,18 @@ If
 is specified, the prefix index number will be returned instead.
 .Sh SEE ALSO
 .Xr expand_number 3
+.Sh STANDARDS
+The
+.Dv HN_DIVISOR_1000
+and
+.Dv HN_IEC_PREFIXES
+flags
+conform to
+.Tn ISO/IEC
+Std\~80000-13:2008
+and
+.Tn IEEE
+Std\~1541-2002.
 .Sh HISTORY
 The
 .Fn humanize_number
@@ -155,3 +198,7 @@ function first appeared in
 .Nx 2.0
 and then in
 .Fx 5.3 .
+The
+.Dv HN_IEC_PREFIXES
+flag was introduced in
+.Fx 9.0 .

Modified: stable/8/lib/libutil/humanize_number.c
==============================================================================
--- stable/8/lib/libutil/humanize_number.c	Fri Apr 29 00:24:17 2011	(r221192)
+++ stable/8/lib/libutil/humanize_number.c	Fri Apr 29 00:40:00 2011	(r221193)
@@ -42,45 +42,58 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+static const int maxscale = 7;
+
 int
 humanize_number(char *buf, size_t len, int64_t quotient,
     const char *suffix, int scale, int flags)
 {
 	const char *prefixes, *sep;
-	int	i, r, remainder, maxscale, s1, s2, sign;
+	int	i, r, remainder, s1, s2, sign;
 	int64_t	divisor, max;
 	size_t	baselen;
 
 	assert(buf != NULL);
 	assert(suffix != NULL);
 	assert(scale >= 0);
+	assert(scale < maxscale || (((scale & (HN_AUTOSCALE | HN_GETSCALE)) != 0)));
+	assert(!((flags & HN_DIVISOR_1000) && (flags & HN_IEC_PREFIXES)));
 
 	remainder = 0;
 
-	if (flags & HN_DIVISOR_1000) {
-		/* SI for decimal multiplies */
-		divisor = 1000;
-		if (flags & HN_B)
-			prefixes = "B\0k\0M\0G\0T\0P\0E";
-		else
-			prefixes = "\0\0k\0M\0G\0T\0P\0E";
-	} else {
+	if (flags & HN_IEC_PREFIXES) {
+		baselen = 2;
 		/*
-		 * binary multiplies
-		 * XXX IEC 60027-2 recommends Ki, Mi, Gi...
+		 * Use the prefixes for power of two recommended by
+		 * the International Electrotechnical Commission
+		 * (IEC) in IEC 80000-3 (i.e. Ki, Mi, Gi...).
+		 *
+		 * HN_IEC_PREFIXES implies a divisor of 1024 here
+		 * (use of HN_DIVISOR_1000 would have triggered
+		 * an assertion earlier).
 		 */
 		divisor = 1024;
 		if (flags & HN_B)
-			prefixes = "B\0K\0M\0G\0T\0P\0E";
+			prefixes = "B\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei";
+		else
+			prefixes = "\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei";
+	} else {
+		baselen = 1;
+		if (flags & HN_DIVISOR_1000)
+			divisor = 1000;
+		else
+			divisor = 1024;
+
+		if (flags & HN_B)
+			prefixes = "B\0\0k\0\0M\0\0G\0\0T\0\0P\0\0E";
 		else
-			prefixes = "\0\0K\0M\0G\0T\0P\0E";
+			prefixes = "\0\0\0k\0\0M\0\0G\0\0T\0\0P\0\0E";
 	}
 
-#define	SCALE2PREFIX(scale)	(&prefixes[(scale) << 1])
-	maxscale = 7;
+#define	SCALE2PREFIX(scale)	(&prefixes[(scale) * 3])
 
-	if (scale >= maxscale &&
-	    (scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0)
+	if (scale < 0 || (scale >= maxscale &&
+	    (scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0))
 		return (-1);
 
 	if (buf == NULL || suffix == NULL)
@@ -91,10 +104,10 @@ humanize_number(char *buf, size_t len, i
 	if (quotient < 0) {
 		sign = -1;
 		quotient = -quotient;
-		baselen = 3;		/* sign, digit, prefix */
+		baselen += 2;		/* sign, digit */
 	} else {
 		sign = 1;
-		baselen = 2;		/* digit, prefix */
+		baselen += 1;		/* digit */
 	}
 	if (flags & HN_NOSPACE)
 		sep = "";

Modified: stable/8/lib/libutil/libutil.h
==============================================================================
--- stable/8/lib/libutil/libutil.h	Fri Apr 29 00:24:17 2011	(r221192)
+++ stable/8/lib/libutil/libutil.h	Fri Apr 29 00:40:00 2011	(r221193)
@@ -207,7 +207,9 @@ __END_DECLS
 #define HN_NOSPACE		0x02
 #define HN_B			0x04
 #define HN_DIVISOR_1000		0x08
+#define HN_IEC_PREFIXES		0x10
 
+/* maxscale = 0x07 */
 #define HN_GETSCALE		0x10
 #define HN_AUTOSCALE		0x20
 

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 01:14: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 4761C106566B;
	Fri, 29 Apr 2011 01:14:13 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 3970F8FC0C;
	Fri, 29 Apr 2011 01:14: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 p3T1ED52077274;
	Fri, 29 Apr 2011 01:14:13 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T1EDmt077272;
	Fri, 29 Apr 2011 01:14:13 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104290114.p3T1EDmt077272@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 01:14: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: r221194 - head/sbin/mount
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 01:14:13 -0000

Author: rmacklem
Date: Fri Apr 29 01:14:12 2011
New Revision: 221194
URL: http://svn.freebsd.org/changeset/base/221194

Log:
  Another man page update related to the switchover of the
  NFS clients done by r221124.
  This is a content change.
  
  Submitted by:	jh

Modified:
  head/sbin/mount/mount.8

Modified: head/sbin/mount/mount.8
==============================================================================
--- head/sbin/mount/mount.8	Fri Apr 29 00:40:00 2011	(r221193)
+++ head/sbin/mount/mount.8	Fri Apr 29 01:14:12 2011	(r221194)
@@ -28,7 +28,7 @@
 .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
 .\" $FreeBSD$
 .\"
-.Dd February 10, 2010
+.Dd April 28, 2011
 .Dt MOUNT 8
 .Os
 .Sh NAME
@@ -430,11 +430,11 @@ However, for the following file system t
 .Cm cd9660 ,
 .Cm mfs ,
 .Cm msdosfs ,
-.Cm newnfs ,
 .Cm nfs ,
 .Cm ntfs ,
 .Cm nwfs ,
 .Cm nullfs ,
+.Cm oldnfs ,
 .Cm portalfs ,
 .Cm smbfs ,
 .Cm udf ,

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 03:20: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 7813B106564A;
	Fri, 29 Apr 2011 03:20:52 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4C9A88FC12;
	Fri, 29 Apr 2011 03:20: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 p3T3KqfM081119;
	Fri, 29 Apr 2011 03:20:52 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T3Kqrw081117;
	Fri, 29 Apr 2011 03:20:52 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201104290320.p3T3Kqrw081117@svn.freebsd.org>
From: Andrew Thompson 
Date: Fri, 29 Apr 2011 03:20:52 +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: r221196 - 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: Fri, 29 Apr 2011 03:20:52 -0000

Author: thompsa
Date: Fri Apr 29 03:20:51 2011
New Revision: 221196
URL: http://svn.freebsd.org/changeset/base/221196

Log:
  Release hselasky, onwards and upwards.

Modified:
  svnadmin/conf/mentors

Modified: svnadmin/conf/mentors
==============================================================================
--- svnadmin/conf/mentors	Fri Apr 29 03:16:15 2011	(r221195)
+++ svnadmin/conf/mentors	Fri Apr 29 03:20:51 2011	(r221196)
@@ -16,7 +16,6 @@ andrew		imp
 art		avg		Co-mentor: marcel
 eri		mlaier		Co-mentor: thompsa
 gabor		delphij
-hselasky	thompsa
 jinmei		gnn
 jonathan	rwatson
 jpaetzel	kib

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 05:00: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 969551065674;
	Fri, 29 Apr 2011 05:00:48 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 795138FC1F;
	Fri, 29 Apr 2011 05:00: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 p3T50mLI084314;
	Fri, 29 Apr 2011 05:00:48 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T50mGX084312;
	Fri, 29 Apr 2011 05:00:48 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <201104290500.p3T50mGX084312@svn.freebsd.org>
From: Takahashi Yoshihiro 
Date: Fri, 29 Apr 2011 05:00:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221197 - stable/7/sys/pc98/pc98
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 05:00:48 -0000

Author: nyan
Date: Fri Apr 29 05:00:48 2011
New Revision: 221197
URL: http://svn.freebsd.org/changeset/base/221197

Log:
  MFC: revision 218390
  
    Clear the padding when returning context to the usermode, for
    MI ucontext_t and x86 MD parts.

Modified:
  stable/7/sys/pc98/pc98/machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/pc98/pc98/machdep.c
==============================================================================
--- stable/7/sys/pc98/pc98/machdep.c	Fri Apr 29 03:20:51 2011	(r221196)
+++ stable/7/sys/pc98/pc98/machdep.c	Fri Apr 29 05:00:48 2011	(r221197)
@@ -309,12 +309,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi,
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc;
+	bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_arg2 = (register_t)&fp->sf_siginfo;
 		sf.sf_siginfo.si_signo = sig;
 		sf.sf_siginfo.si_code = ksi->ksi_code;
 		sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher;
+		sf.sf_addr = 0;
 	} else {
 		/* Old FreeBSD-style arguments. */
 		sf.sf_arg2 = ksi->ksi_code;
@@ -428,6 +430,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo
 	sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0;
 	sf.sf_uc.uc_mcontext.mc_gs = rgs();
 	bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs));
+	bzero(sf.sf_uc.uc_mcontext.mc_fpregs,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_fpregs));
+	bzero(sf.sf_uc.uc_mcontext.__spare__,
+	    sizeof(sf.sf_uc.uc_mcontext.__spare__));
+	bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
 	/* Allocate space for the signal handler context. */
 	if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
@@ -447,6 +454,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_ucontext = (register_t)&sfp->sf_uc;
+	bzero(&sf.sf_si, sizeof(sf.sf_si));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_siginfo = (register_t)&sfp->sf_si;
@@ -563,6 +571,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */
 	get_fpcontext(td, &sf.sf_uc.uc_mcontext);
 	fpstate_drop(td);
+	bzero(sf.sf_uc.uc_mcontext.mc_spare1,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_spare1));
+	bzero(sf.sf_uc.uc_mcontext.mc_spare2,
+	    sizeof(sf.sf_uc.uc_mcontext.mc_spare2));
+	bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__));
 
 	/* Allocate space for the signal handler context. */
 	if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack &&
@@ -584,6 +597,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	/* Build the argument list for the signal handler. */
 	sf.sf_signum = sig;
 	sf.sf_ucontext = (register_t)&sfp->sf_uc;
+	bzero(&sf.sf_si, sizeof(sf.sf_si));
 	if (SIGISMEMBER(psp->ps_siginfo, sig)) {
 		/* Signal handler installed with SA_SIGINFO. */
 		sf.sf_siginfo = (register_t)&sfp->sf_si;
@@ -2163,7 +2177,7 @@ init386(first)
 	_udatasel = GSEL(GUDATA_SEL, SEL_UPL);
 
 	/* setup proc 0's pcb */
-	thread0.td_pcb->pcb_flags = 0; /* XXXKSE */
+	thread0.td_pcb->pcb_flags = 0;
 	thread0.td_pcb->pcb_cr3 = (int)IdlePTD;
 	thread0.td_pcb->pcb_ext = 0;
 	thread0.td_frame = &proc0_tf;
@@ -2455,6 +2469,8 @@ get_mcontext(struct thread *td, mcontext
 	mcp->mc_ss = tp->tf_ss;
 	mcp->mc_len = sizeof(*mcp);
 	get_fpcontext(td, mcp);
+	bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1));
+	bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2));
 	return (0);
 }
 
@@ -2502,6 +2518,7 @@ get_fpcontext(struct thread *td, mcontex
 #ifndef DEV_NPX
 	mcp->mc_fpformat = _MC_FPFMT_NODEV;
 	mcp->mc_ownedfp = _MC_FPOWNED_NONE;
+	bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate));
 #else
 	union savefpu *addr;
 

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 06: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 E9769106564A;
	Fri, 29 Apr 2011 06:25:11 +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 D81B78FC0A;
	Fri, 29 Apr 2011 06: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 p3T6PB5n086399;
	Fri, 29 Apr 2011 06:25:11 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T6PBPC086397;
	Fri, 29 Apr 2011 06:25:11 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104290625.p3T6PBPC086397@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 29 Apr 2011 06: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: r221198 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 06:25:12 -0000

Author: adrian
Date: Fri Apr 29 06:25:11 2011
New Revision: 221198
URL: http://svn.freebsd.org/changeset/base/221198

Log:
  Tidy up the naming of the ip2 DDR flush routine, and add an inline
  accessor method (which is currently unused) in there.

Modified:
  head/sys/mips/atheros/ar71xx_cpudef.h

Modified: head/sys/mips/atheros/ar71xx_cpudef.h
==============================================================================
--- head/sys/mips/atheros/ar71xx_cpudef.h	Fri Apr 29 05:00:48 2011	(r221197)
+++ head/sys/mips/atheros/ar71xx_cpudef.h	Fri Apr 29 06:25:11 2011	(r221198)
@@ -51,7 +51,7 @@ struct ar71xx_cpu_def {
 	 * This flush is done before the IRQ is handled to make
 	 * sure the driver correctly sees any memory updates.
 	 */
-	void (* ar71xx_chip_irq_flush_ip2) (void);
+	void (* ar71xx_chip_ddr_flush_ip2) (void);
 	/*
 	 * The USB peripheral init code is subtly different for
 	 * each chip.
@@ -106,6 +106,11 @@ static inline void ar71xx_init_usb_perip
 	ar71xx_cpu_ops->ar71xx_chip_init_usb_peripheral();
 }
 
+static inline void ar71xx_device_ddr_flush_ip2(void)
+{
+	ar71xx_cpu_ops->ar71xx_chip_ddr_flush_ip2();
+}
+
 /* XXX shouldn't be here! */
 extern uint32_t u_ar71xx_cpu_freq;
 extern uint32_t u_ar71xx_ahb_freq;

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 06:28: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 5120A106566B;
	Fri, 29 Apr 2011 06:28:30 +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 3FE6E8FC12;
	Fri, 29 Apr 2011 06:28: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 p3T6SU2l086526;
	Fri, 29 Apr 2011 06:28:30 GMT (envelope-from kevlo@svn.freebsd.org)
Received: (from kevlo@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T6SUV5086524;
	Fri, 29 Apr 2011 06:28:30 GMT (envelope-from kevlo@svn.freebsd.org)
Message-Id: <201104290628.p3T6SUV5086524@svn.freebsd.org>
From: Kevin Lo 
Date: Fri, 29 Apr 2011 06:28: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: r221199 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 06:28:30 -0000

Author: kevlo
Date: Fri Apr 29 06:28:29 2011
New Revision: 221199
URL: http://svn.freebsd.org/changeset/base/221199

Log:
  Guard against default ni_chan
  
  PR: kern/144642
  Submitted by: Arthur Hartwig 

Modified:
  head/sys/dev/usb/wlan/if_rum.c

Modified: head/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rum.c	Fri Apr 29 06:25:11 2011	(r221198)
+++ head/sys/dev/usb/wlan/if_rum.c	Fri Apr 29 06:28:29 2011	(r221199)
@@ -208,7 +208,7 @@ static void		rum_init(void *);
 static void		rum_stop(struct rum_softc *);
 static void		rum_load_microcode(struct rum_softc *, const uint8_t *,
 			    size_t);
-static int		rum_prepare_beacon(struct rum_softc *,
+static void		rum_prepare_beacon(struct rum_softc *,
 			    struct ieee80211vap *);
 static int		rum_raw_xmit(struct ieee80211_node *, struct mbuf *,
 			    const struct ieee80211_bpf_params *);
@@ -2119,7 +2119,7 @@ rum_load_microcode(struct rum_softc *sc,
 	rum_pause(sc, hz / 8);
 }
 
-static int
+static void
 rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap)
 {
 	struct ieee80211com *ic = vap->iv_ic;
@@ -2127,9 +2127,12 @@ rum_prepare_beacon(struct rum_softc *sc,
 	struct rum_tx_desc desc;
 	struct mbuf *m0;
 
+	if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC)
+		return;
+
 	m0 = ieee80211_beacon_alloc(vap->iv_bss, &RUM_VAP(vap)->bo);
 	if (m0 == NULL) {
-		return ENOBUFS;
+		return;
 	}
 
 	tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)];
@@ -2144,8 +2147,6 @@ rum_prepare_beacon(struct rum_softc *sc,
 	    m0->m_pkthdr.len);
 
 	m_freem(m0);
-
-	return 0;
 }
 
 static int

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 06:36: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 0A864106566C;
	Fri, 29 Apr 2011 06:36: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 ED41D8FC1E;
	Fri, 29 Apr 2011 06:36: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 p3T6ad1H086797;
	Fri, 29 Apr 2011 06:36:39 GMT (envelope-from kevlo@svn.freebsd.org)
Received: (from kevlo@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T6adMX086793;
	Fri, 29 Apr 2011 06:36:39 GMT (envelope-from kevlo@svn.freebsd.org)
Message-Id: <201104290636.p3T6adMX086793@svn.freebsd.org>
From: Kevin Lo 
Date: Fri, 29 Apr 2011 06:36: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: r221200 - in head/sys: amd64/conf conf i386/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, 29 Apr 2011 06:36:40 -0000

Author: kevlo
Date: Fri Apr 29 06:36:39 2011
New Revision: 221200
URL: http://svn.freebsd.org/changeset/base/221200

Log:
  Add urtw(4)

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/conf/NOTES
  head/sys/i386/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==============================================================================
--- head/sys/amd64/conf/GENERIC	Fri Apr 29 06:28:29 2011	(r221199)
+++ head/sys/amd64/conf/GENERIC	Fri Apr 29 06:36:39 2011	(r221200)
@@ -316,6 +316,7 @@ device		udav		# Davicom DM9601E USB
 device		rum		# Ralink Technology RT2501USB wireless NICs
 device		uath		# Atheros AR5523 wireless NICs
 device		ural		# Ralink Technology RT2500USB wireless NICs
+device		urtw		# Realtek RTL8187B/L wireless NICs
 device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support

Modified: head/sys/conf/NOTES
==============================================================================
--- head/sys/conf/NOTES	Fri Apr 29 06:28:29 2011	(r221199)
+++ head/sys/conf/NOTES	Fri Apr 29 06:36:39 2011	(r221200)
@@ -2730,6 +2730,9 @@ device		uath
 # Ralink Technology RT2500USB wireless driver
 device		ural
 #
+# Realtek RTL8187B/L wireless driver
+device		urtw
+#
 # ZyDas ZD1211/ZD1211B wireless driver
 device		zyd
 

Modified: head/sys/i386/conf/GENERIC
==============================================================================
--- head/sys/i386/conf/GENERIC	Fri Apr 29 06:28:29 2011	(r221199)
+++ head/sys/i386/conf/GENERIC	Fri Apr 29 06:36:39 2011	(r221200)
@@ -329,6 +329,7 @@ device		udav		# Davicom DM9601E USB
 device		rum		# Ralink Technology RT2501USB wireless NICs
 device		uath		# Atheros AR5523 wireless NICs
 device		ural		# Ralink Technology RT2500USB wireless NICs
+device		urtw		# Realtek RTL8187B/L wireless NICs
 device		zyd		# ZyDAS zb1211/zb1211b wireless NICs
 
 # FireWire support

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 07:11: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 C6BE6106566B;
	Fri, 29 Apr 2011 07:11:09 +0000 (UTC)
	(envelope-from bschmidt@techwires.net)
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by mx1.freebsd.org (Postfix) with ESMTP id 03E748FC0C;
	Fri, 29 Apr 2011 07:11:08 +0000 (UTC)
Received: by bwz12 with SMTP id 12so4145625bwz.13
	for ; Fri, 29 Apr 2011 00:11:07 -0700 (PDT)
Received: by 10.204.81.196 with SMTP id y4mr325426bkk.111.1304061032855;
	Fri, 29 Apr 2011 00:10:32 -0700 (PDT)
Received: from jessie.localnet (p5B2ECD51.dip0.t-ipconnect.de [91.46.205.81])
	by mx.google.com with ESMTPS id
	c11sm1433337bkc.14.2011.04.29.00.10.31 (version=SSLv3 cipher=OTHER);
	Fri, 29 Apr 2011 00:10:32 -0700 (PDT)
Sender: Bernhard Schmidt 
From: Bernhard Schmidt 
To: Kevin Lo 
Date: Fri, 29 Apr 2011 09:09:34 +0200
User-Agent: KMail/1.13.5 (Linux/2.6.32-31-generic; KDE/4.4.5; i686; ; )
References: <201104290628.p3T6SUV5086524@svn.freebsd.org>
In-Reply-To: <201104290628.p3T6SUV5086524@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201104290909.34920.bschmidt@freebsd.org>
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, Arthur Hartwig 
Subject: Re: svn commit: r221199 - head/sys/dev/usb/wlan
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: bschmidt@freebsd.org
List-Id: "SVN commit messages 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, 29 Apr 2011 07:11:09 -0000

On Friday, April 29, 2011 08:28:30 Kevin Lo wrote:
> Author: kevlo
> Date: Fri Apr 29 06:28:29 2011
> New Revision: 221199
> URL: http://svn.freebsd.org/changeset/base/221199
> 
> Log:
>   Guard against default ni_chan
>   
>   PR: kern/144642
>   Submitted by: Arthur Hartwig 
> 
> Modified:
>   head/sys/dev/usb/wlan/if_rum.c

This seems about right, but.. did anyone ever verify that any beacons
get sent? and if so are the information included correct?

If the call fails due to the channel not yet being set, no further
attempt to setup the beacons are made. This might be quite harmless
for IBSS as long as other nodes are sending beacons. But for AP mode
it is rather critical. There also seem to be at least one missing
backcall, iv_update_beacon, this should ensure that beacons contain
updated information, eg. node's powersafe states. It can also be used
to ensure the beacon is setup.

Any takers? :)

-- 
Bernhard

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 07:14: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 594D6106564A;
	Fri, 29 Apr 2011 07:14:38 +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 47AE08FC08;
	Fri, 29 Apr 2011 07:14: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 p3T7EcXO087988;
	Fri, 29 Apr 2011 07:14:38 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3T7Ec93087986;
	Fri, 29 Apr 2011 07:14:38 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201104290714.p3T7Ec93087986@svn.freebsd.org>
From: Alexander Motin 
Date: Fri, 29 Apr 2011 07:14: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: r221201 - head/sys/cam
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 07:14:38 -0000

Author: mav
Date: Fri Apr 29 07:14:37 2011
New Revision: 221201
URL: http://svn.freebsd.org/changeset/base/221201

Log:
  Make CAM_DEBUG_CDB also dump ATA commands in addition to SCSI.

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==============================================================================
--- head/sys/cam/cam_xpt.c	Fri Apr 29 06:36:39 2011	(r221200)
+++ head/sys/cam/cam_xpt.c	Fri Apr 29 07:14:37 2011	(r221201)
@@ -2328,19 +2328,18 @@ xpt_action(union ccb *start_ccb)
 void
 xpt_action_default(union ccb *start_ccb)
 {
+#ifdef CAMDEBUG
+	char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
+#endif
+	struct cam_path *path;
 
-	CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action_default\n"));
+	path = start_ccb->ccb_h.path;
+	CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_action_default\n"));
 
 	switch (start_ccb->ccb_h.func_code) {
 	case XPT_SCSI_IO:
 	{
 		struct cam_ed *device;
-#ifdef CAMDEBUG
-		char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
-		struct cam_path *path;
-
-		path = start_ccb->ccb_h.path;
-#endif
 
 		/*
 		 * For the sake of compatibility with SCSI-1
@@ -2358,7 +2357,7 @@ xpt_action_default(union ccb *start_ccb)
 		 * This means that this code will be exercised while probing
 		 * devices with an ANSI revision greater than 2.
 		 */
-		device = start_ccb->ccb_h.path->device;
+		device = path->device;
 		if (device->protocol_version <= SCSI_REV_2
 		 && start_ccb->ccb_h.target_lun < 8
 		 && (start_ccb->ccb_h.flags & CAM_CDB_POINTER) == 0) {
@@ -2382,13 +2381,16 @@ xpt_action_default(union ccb *start_ccb)
 	case XPT_ATA_IO:
 		if (start_ccb->ccb_h.func_code == XPT_ATA_IO) {
 			start_ccb->ataio.resid = 0;
+			CAM_DEBUG(path, CAM_DEBUG_CDB,("%s. ACB: %s\n",
+			    ata_op_string(&start_ccb->ataio.cmd),
+			    ata_cmd_string(&start_ccb->ataio.cmd,
+					  cdb_str, sizeof(cdb_str))));
 		}
 		/* FALLTHROUGH */
 	case XPT_RESET_DEV:
 	case XPT_ENG_EXEC:
 	case XPT_SMP_IO:
 	{
-		struct cam_path *path = start_ccb->ccb_h.path;
 		int frozen;
 
 		frozen = cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb);
@@ -2427,7 +2429,7 @@ xpt_action_default(union ccb *start_ccb)
 			break;
 		}
 #endif
-		sim = start_ccb->ccb_h.path->bus->sim;
+		sim = path->bus->sim;
 		(*(sim->sim_action))(sim, start_ccb);
 		break;
 	}
@@ -2495,7 +2497,7 @@ xpt_action_default(union ccb *start_ccb)
 	{
 		struct cam_sim *sim;
 
-		sim = start_ccb->ccb_h.path->bus->sim;
+		sim = path->bus->sim;
 		(*(sim->sim_action))(sim, start_ccb);
 		break;
 	}
@@ -2503,20 +2505,19 @@ xpt_action_default(union ccb *start_ccb)
 	{
 		struct cam_sim *sim;
 
-		sim = start_ccb->ccb_h.path->bus->sim;
+		sim = path->bus->sim;
 		(*(sim->sim_action))(sim, start_ccb);
 		break;
 	}
 	case XPT_PATH_STATS:
-		start_ccb->cpis.last_reset =
-			start_ccb->ccb_h.path->bus->last_reset;
+		start_ccb->cpis.last_reset = path->bus->last_reset;
 		start_ccb->ccb_h.status = CAM_REQ_CMP;
 		break;
 	case XPT_GDEV_TYPE:
 	{
 		struct cam_ed *dev;
 
-		dev = start_ccb->ccb_h.path->device;
+		dev = path->device;
 		if ((dev->flags & CAM_DEV_UNCONFIGURED) != 0) {
 			start_ccb->ccb_h.status = CAM_DEV_NOT_THERE;
 		} else {
@@ -2540,7 +2541,7 @@ xpt_action_default(union ccb *start_ccb)
 	{
 		struct cam_ed *dev;
 
-		dev = start_ccb->ccb_h.path->device;
+		dev = path->device;
 		if ((dev->flags & CAM_DEV_UNCONFIGURED) != 0) {
 			start_ccb->ccb_h.status = CAM_DEV_NOT_THERE;
 		} else {
@@ -2549,8 +2550,8 @@ xpt_action_default(union ccb *start_ccb)
 			struct cam_et *tar;
 
 			cgds = &start_ccb->cgds;
-			bus = cgds->ccb_h.path->bus;
-			tar = cgds->ccb_h.path->target;
+			bus = path->bus;
+			tar = path->target;
 			cgds->dev_openings = dev->ccbq.dev_openings;
 			cgds->dev_active = dev->ccbq.dev_active;
 			cgds->devq_openings = dev->ccbq.devq_openings;
@@ -2580,7 +2581,7 @@ xpt_action_default(union ccb *start_ccb)
 		/*
 		 * Don't want anyone mucking with our data.
 		 */
-		device = start_ccb->ccb_h.path->device;
+		device = path->device;
 		periph_head = &device->periphs;
 		cgdl = &start_ccb->cgdl;
 
@@ -2697,7 +2698,7 @@ xpt_action_default(union ccb *start_ccb)
 
 		csa = &start_ccb->csa;
 		added = csa->event_enable;
-		async_head = &csa->ccb_h.path->device->asyncs;
+		async_head = &path->device->asyncs;
 
 		/*
 		 * If there is already an entry for us, simply
@@ -2720,7 +2721,7 @@ xpt_action_default(union ccb *start_ccb)
 			if (csa->event_enable == 0) {
 				SLIST_REMOVE(async_head, cur_entry,
 					     async_node, links);
-				xpt_release_device(csa->ccb_h.path->device);
+				xpt_release_device(path->device);
 				free(cur_entry, M_CAMXPT);
 			} else {
 				cur_entry->event_enable = csa->event_enable;
@@ -2737,7 +2738,7 @@ xpt_action_default(union ccb *start_ccb)
 			cur_entry->callback_arg = csa->callback_arg;
 			cur_entry->callback = csa->callback;
 			SLIST_INSERT_HEAD(async_head, cur_entry, links);
-			xpt_acquire_device(csa->ccb_h.path->device);
+			xpt_acquire_device(path->device);
 		}
 		start_ccb->ccb_h.status = CAM_REQ_CMP;
 		break;
@@ -2748,7 +2749,7 @@ xpt_action_default(union ccb *start_ccb)
 		struct cam_ed *dev;
 
 		crs = &start_ccb->crs;
-		dev = crs->ccb_h.path->device;
+		dev = path->device;
 		if (dev == NULL) {
 
 			crs->ccb_h.status = CAM_DEV_NOT_THERE;
@@ -2760,11 +2761,11 @@ xpt_action_default(union ccb *start_ccb)
  			if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) {
 				/* Don't ever go below one opening */
 				if (crs->openings > 0) {
-					xpt_dev_ccbq_resize(crs->ccb_h.path,
+					xpt_dev_ccbq_resize(path,
 							    crs->openings);
 
 					if (bootverbose) {
-						xpt_print(crs->ccb_h.path,
+						xpt_print(path,
 						    "tagged openings now %d\n",
 						    crs->openings);
 					}
@@ -2826,7 +2827,7 @@ xpt_action_default(union ccb *start_ccb)
 		}
 
 		if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) {
-			xpt_release_devq_rl(crs->ccb_h.path, /*runlevel*/
+			xpt_release_devq_rl(path, /*runlevel*/
 			    (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ?
 				crs->release_timeout : 0,
 			    /*count*/1, /*run_queue*/TRUE);
@@ -2872,7 +2873,7 @@ xpt_action_default(union ccb *start_ccb)
 	{
 		struct ccb_relsim *crs = &start_ccb->crs;
 
-		xpt_freeze_devq_rl(crs->ccb_h.path, /*runlevel*/
+		xpt_freeze_devq_rl(path, /*runlevel*/
 		    (crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ?
 		    crs->release_timeout : 0, /*count*/1);
 		start_ccb->ccb_h.status = CAM_REQ_CMP;
@@ -2880,7 +2881,7 @@ xpt_action_default(union ccb *start_ccb)
 	}
 	case XPT_NOOP:
 		if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) != 0)
-			xpt_freeze_devq(start_ccb->ccb_h.path, 1);
+			xpt_freeze_devq(path, 1);
 		start_ccb->ccb_h.status = CAM_REQ_CMP;
 		break;
 	default:

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 10:28: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 55854106566B;
	Fri, 29 Apr 2011 10:28:56 +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 448D78FC12;
	Fri, 29 Apr 2011 10:28: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 p3TASusS095367;
	Fri, 29 Apr 2011 10:28:56 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TASucO095365;
	Fri, 29 Apr 2011 10:28:56 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201104291028.p3TASucO095365@svn.freebsd.org>
From: Gavin Atkinson 
Date: Fri, 29 Apr 2011 10:28:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221203 - stable/8/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, 29 Apr 2011 10:28:56 -0000

Author: gavin
Date: Fri Apr 29 10:28:55 2011
New Revision: 221203
URL: http://svn.freebsd.org/changeset/base/221203

Log:
  Merge r220652 from head:
  
    Remove an incorrect be16toh() that prevented geom_part_apm from working on                                                                                                       little-endian machines.

Modified:
  stable/8/sys/geom/part/g_part_apm.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/geom/part/g_part_apm.c
==============================================================================
--- stable/8/sys/geom/part/g_part_apm.c	Fri Apr 29 07:26:22 2011	(r221202)
+++ stable/8/sys/geom/part/g_part_apm.c	Fri Apr 29 10:28:55 2011	(r221203)
@@ -387,7 +387,7 @@ g_part_apm_probe(struct g_part_table *ba
 	buf = g_read_data(cp, 0L, pp->sectorsize, &error);
 	if (buf == NULL)
 		return (error);
-	if (be16dec(buf) == be16toh(APM_DDR_SIG)) {
+	if (be16dec(buf) == APM_DDR_SIG) {
 		/* Normal Apple DDR */
 		table->ddr.ddr_sig = be16dec(buf);
 		table->ddr.ddr_blksize = be16dec(buf + 2);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 10: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 5303A106566C;
	Fri, 29 Apr 2011 10:33:55 +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 421378FC08;
	Fri, 29 Apr 2011 10: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 p3TAXtsL095573;
	Fri, 29 Apr 2011 10:33:55 GMT (envelope-from gavin@svn.freebsd.org)
Received: (from gavin@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TAXt5L095571;
	Fri, 29 Apr 2011 10:33:55 GMT (envelope-from gavin@svn.freebsd.org)
Message-Id: <201104291033.p3TAXt5L095571@svn.freebsd.org>
From: Gavin Atkinson 
Date: Fri, 29 Apr 2011 10:33:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221204 - stable/7/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, 29 Apr 2011 10:33:55 -0000

Author: gavin
Date: Fri Apr 29 10:33:54 2011
New Revision: 221204
URL: http://svn.freebsd.org/changeset/base/221204

Log:
  Merge r220652 from head:
  
    Remove an incorrect be16toh() that prevented geom_part_apm from working on
    little-endian machines.

Modified:
  stable/7/sys/geom/part/g_part_apm.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/geom/part/g_part_apm.c
==============================================================================
--- stable/7/sys/geom/part/g_part_apm.c	Fri Apr 29 10:28:55 2011	(r221203)
+++ stable/7/sys/geom/part/g_part_apm.c	Fri Apr 29 10:33:54 2011	(r221204)
@@ -343,7 +343,7 @@ g_part_apm_probe(struct g_part_table *ba
 	buf = g_read_data(cp, 0L, pp->sectorsize, &error);
 	if (buf == NULL)
 		return (error);
-	if (be16dec(buf) == be16toh(APM_DDR_SIG)) {
+	if (be16dec(buf) == APM_DDR_SIG) {
 		/* Normal Apple DDR */
 		table->ddr.ddr_sig = be16dec(buf);
 		table->ddr.ddr_blksize = be16dec(buf + 2);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 12:30: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 946F1106566B;
	Fri, 29 Apr 2011 12:30:15 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 82D238FC12;
	Fri, 29 Apr 2011 12:30: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 p3TCUFa7099083;
	Fri, 29 Apr 2011 12:30:15 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TCUFOR099081;
	Fri, 29 Apr 2011 12:30:15 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104291230.p3TCUFOR099081@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 12:30: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: r221205 - head/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 12:30:15 -0000

Author: rmacklem
Date: Fri Apr 29 12:30:15 2011
New Revision: 221205
URL: http://svn.freebsd.org/changeset/base/221205

Log:
  The build was broken by r221190 for 64bit arches like amd64.
  This patch fixes it.
  
  MFC after:	2 weeks

Modified:
  head/sys/fs/nfsclient/nfs_clvfsops.c

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Fri Apr 29 10:33:54 2011	(r221204)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Fri Apr 29 12:30:15 2011	(r221205)
@@ -763,6 +763,7 @@ nfs_mount(struct mount *mp)
 	char *opt, *name, *secname;
 	int negnametimeo = NFS_DEFAULT_NEGNAMETIMEO;
 	int dirlen, has_nfs_args_opt, krbnamelen, srvkrbnamelen;
+	size_t hstlen;
 
 	has_nfs_args_opt = 0;
 	if (vfs_filteropt(mp->mnt_optnew, nfs_opts)) {
@@ -1027,10 +1028,10 @@ nfs_mount(struct mount *mp)
 		    args.fhsize);
 		if (error != 0)
 			goto out;
-		error = copyinstr(args.hostname, hst, MNAMELEN - 1, &len);
+		error = copyinstr(args.hostname, hst, MNAMELEN - 1, &hstlen);
 		if (error != 0)
 			goto out;
-		bzero(&hst[len], MNAMELEN - len);
+		bzero(&hst[hstlen], MNAMELEN - hstlen);
 		args.hostname = hst;
 		/* sockargs() call must be after above copyin() calls */
 		error = getsockaddr(&nam, (caddr_t)args.addr,

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 12:52: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 106B4106566B;
	Fri, 29 Apr 2011 12:52:19 +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 F2A498FC1D;
	Fri, 29 Apr 2011 12:52: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 p3TCqITN099732;
	Fri, 29 Apr 2011 12:52:18 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TCqIMs099730;
	Fri, 29 Apr 2011 12:52:18 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104291252.p3TCqIMs099730@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 29 Apr 2011 12:52: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: r221206 - 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: Fri, 29 Apr 2011 12:52:19 -0000

Author: adrian
Date: Fri Apr 29 12:52:18 2011
New Revision: 221206
URL: http://svn.freebsd.org/changeset/base/221206

Log:
  Remove some holdovers from the AR5212 origin of this code.
  These aren't relevant here.

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	Fri Apr 29 12:30:15 2011	(r221205)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Fri Apr 29 12:52:18 2011	(r221206)
@@ -201,23 +201,6 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 	HALDEBUG(ah, HAL_DEBUG_RESET, ">>>2 %s: AR_PHY_ADC_CTL=0x%x\n",
 		__func__, OS_REG_READ(ah,AR_PHY_ADC_CTL));	
 
-	/* Set the mute mask to the correct default */
-	if (AH_PRIVATE(ah)->ah_phyRev >= AR_PHY_CHIP_ID_REV_2)
-		OS_REG_WRITE(ah, AR_SEQ_MASK, 0x0000000F);
-
-	if (AH_PRIVATE(ah)->ah_phyRev >= AR_PHY_CHIP_ID_REV_3) {
-		/* Clear reg to alllow RX_CLEAR line debug */
-		OS_REG_WRITE(ah, AR_PHY_BLUETOOTH,  0);
-	}
-	if (AH_PRIVATE(ah)->ah_phyRev >= AR_PHY_CHIP_ID_REV_4) {
-#ifdef notyet
-		/* Enable burst prefetch for the data queues */
-		OS_REG_RMW_FIELD(ah, AR_D_FPCTL, ... );
-		/* Enable double-buffering */
-		OS_REG_CLR_BIT(ah, AR_TXCFG, AR_TXCFG_DBL_BUF_DIS);
-#endif
-	}
-
 	/*
 	 * Setup ah_tx_chainmask / ah_rx_chainmask before we fiddle
 	 * with enabling the TX/RX radio chains.
@@ -228,6 +211,8 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO
 	 * before any radio register twiddling is done.
 	 */
 	ar5416InitChainMasks(ah);
+
+	/* Setup the open-loop temperature compensation if required */
 	AH5416(ah)->ah_olcInit(ah);
 
 	/* Setup the transmit power values. */

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 14:01: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 5874E106567E;
	Fri, 29 Apr 2011 14:01:50 +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 0DB378FC15;
	Fri, 29 Apr 2011 14:01: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 p3TE1n8Q001993;
	Fri, 29 Apr 2011 14:01:49 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TE1nvn001991;
	Fri, 29 Apr 2011 14:01:49 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291401.p3TE1nvn001991@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 14:01: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: r221207 - head/sys/arm/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, 29 Apr 2011 14:01:50 -0000

Author: jhb
Date: Fri Apr 29 14:01:49 2011
New Revision: 221207
URL: http://svn.freebsd.org/changeset/base/221207

Log:
  Fix build of this kernel config.  The ath(4) bits need the 11n frame format
  even though ar5416 isn't enabled.
  
  Reviewed by:	adrian

Modified:
  head/sys/arm/conf/CAMBRIA

Modified: head/sys/arm/conf/CAMBRIA
==============================================================================
--- head/sys/arm/conf/CAMBRIA	Fri Apr 29 12:52:18 2011	(r221206)
+++ head/sys/arm/conf/CAMBRIA	Fri Apr 29 14:01:49 2011	(r221207)
@@ -144,7 +144,7 @@ device		ath_rf5112
 device		ath_rf5413
 #
 #device		ath_ar5416
-#options 	AH_SUPPORT_AR5416	# NB: for 11n descriptor format
+options 	AH_SUPPORT_AR5416	# NB: for 11n descriptor format
 #device		ath_ar9160
 #device		ath_ar9280
 

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 14:06: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 CBA25106567C;
	Fri, 29 Apr 2011 14:06:37 +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 ADF898FC18;
	Fri, 29 Apr 2011 14:06: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 p3TE6bUF002165;
	Fri, 29 Apr 2011 14:06:37 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TE6bHD002161;
	Fri, 29 Apr 2011 14:06:37 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291406.p3TE6bHD002161@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 14:06: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: r221208 - head/usr.sbin/mfiutil
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 14:06:37 -0000

Author: jhb
Date: Fri Apr 29 14:06:37 2011
New Revision: 221208
URL: http://svn.freebsd.org/changeset/base/221208

Log:
  Add a 'show progress' command that shows a summary of all in-progress
  commands for a given adapter.  Specifically, it shows the status of any
  drive or volume activities currently in progress similar to the
  'drive process' and 'volume progress' commands.
  
  Reviewed by:	emaste
  MFC after:	1 week

Modified:
  head/usr.sbin/mfiutil/mfi_show.c
  head/usr.sbin/mfiutil/mfiutil.8
  head/usr.sbin/mfiutil/mfiutil.c

Modified: head/usr.sbin/mfiutil/mfi_show.c
==============================================================================
--- head/usr.sbin/mfiutil/mfi_show.c	Fri Apr 29 14:01:49 2011	(r221207)
+++ head/usr.sbin/mfiutil/mfi_show.c	Fri Apr 29 14:06:37 2011	(r221208)
@@ -572,7 +572,7 @@ show_firmware(int ac, char **av)
 	u_int i;
 
 	if (ac != 1) {
-		warnx("show drives: extra arguments");
+		warnx("show firmware: extra arguments");
 		return (EINVAL);
 	}
 
@@ -617,3 +617,112 @@ show_firmware(int ac, char **av)
 	return (0);
 }
 MFI_COMMAND(show, firmware, show_firmware);
+
+static int
+show_progress(int ac, char **av)
+{
+	struct mfi_ld_list llist;
+	struct mfi_pd_list *plist;
+	struct mfi_ld_info linfo;
+	struct mfi_pd_info pinfo;
+	int busy, error, fd;
+	u_int i;
+	
+	uint16_t device_id;
+	uint8_t target_id;
+
+	if (ac != 1) {
+		warnx("show progress: extra arguments");
+		return (EINVAL);
+	}
+
+	fd = mfi_open(mfi_unit);
+	if (fd < 0) {
+		error = errno;
+		warn("mfi_open");
+		return (error);
+	}
+	busy = 0;
+
+	if (mfi_ld_get_list(fd, &llist, NULL) < 0) {
+		error = errno;
+		warn("Failed to get volume list");
+		return (error);
+	}
+	if (mfi_pd_get_list(fd, &plist, NULL) < 0) {
+		error = errno;
+		warn("Failed to get drive list");
+		return (error);
+	}
+
+	for (i = 0; i < llist.ld_count; i++) {
+		target_id = llist.ld_list[i].ld.v.target_id;
+		if (mfi_ld_get_info(fd, target_id, &linfo, NULL) < 0) {
+			error = errno;
+			warn("Failed to get info for volume %s",
+			    mfi_volume_name(fd, target_id));
+			return (error);
+		}
+		if (linfo.progress.active & MFI_LD_PROGRESS_CC) {
+			printf("volume %s ", mfi_volume_name(fd, target_id));
+			mfi_display_progress("Consistency Check",
+			    &linfo.progress.cc);
+			busy = 1;
+		}
+		if (linfo.progress.active & MFI_LD_PROGRESS_BGI) {
+			printf("volume %s ", mfi_volume_name(fd, target_id));
+			mfi_display_progress("Background Init",
+			    &linfo.progress.bgi);
+			busy = 1;
+		}
+		if (linfo.progress.active & MFI_LD_PROGRESS_FGI) {
+			printf("volume %s ", mfi_volume_name(fd, target_id));
+			mfi_display_progress("Foreground Init",
+			    &linfo.progress.fgi);
+			busy = 1;
+		}
+		if (linfo.progress.active & MFI_LD_PROGRESS_RECON) {
+			printf("volume %s ", mfi_volume_name(fd, target_id));
+			mfi_display_progress("Reconstruction",
+			    &linfo.progress.recon);
+			busy = 1;
+		}
+	}
+
+	for (i = 0; i < plist->count; i++) {
+		if (plist->addr[i].scsi_dev_type != 0)
+			continue;
+
+		device_id = plist->addr[i].device_id;
+		if (mfi_pd_get_info(fd, device_id, &pinfo, NULL) < 0) {
+			error = errno;
+			warn("Failed to fetch info for drive %u", device_id);
+			return (error);
+		}
+
+		if (pinfo.prog_info.active & MFI_PD_PROGRESS_REBUILD) {
+			printf("drive %u ", device_id);
+			mfi_display_progress("Rebuild", &pinfo.prog_info.rbld);
+			busy = 1;
+		}
+		if (pinfo.prog_info.active & MFI_PD_PROGRESS_PATROL) {
+			printf("drive %u ", device_id);
+			mfi_display_progress("Patrol Read",
+			    &pinfo.prog_info.patrol);
+			busy = 1;
+		}
+		if (pinfo.prog_info.active & MFI_PD_PROGRESS_CLEAR) {
+			printf("drive %u ", device_id);
+			mfi_display_progress("Clear", &pinfo.prog_info.clear);
+			busy = 1;
+		}
+	}
+
+	close(fd);
+
+	if (!busy)
+		printf("No activity in progress for adapter mfi%d\n", mfi_unit);
+
+	return (0);
+}
+MFI_COMMAND(show, progress, show_progress);

Modified: head/usr.sbin/mfiutil/mfiutil.8
==============================================================================
--- head/usr.sbin/mfiutil/mfiutil.8	Fri Apr 29 14:01:49 2011	(r221207)
+++ head/usr.sbin/mfiutil/mfiutil.8	Fri Apr 29 14:06:37 2011	(r221208)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 5, 2011
+.Dd April 29, 2011
 .Dt MFIUTIL 8
 .Os
 .Sh NAME
@@ -67,6 +67,9 @@
 .Cm show patrol
 .Nm
 .Op Fl u Ar unit
+.Cm show progress
+.Nm
+.Op Fl u Ar unit
 .Cm show volumes
 .Nm
 .Op Fl u Ar unit
@@ -296,6 +299,9 @@ Lists all of the firmware images present
 Display the various sequence numbers associated with the event log.
 .It Cm show patrol
 Display the status of the controller's patrol read operation.
+.It Cm show progress
+Report the current progress and estimated completion time for active
+operations on all volumes and drives.
 .It Cm show volumes
 Lists all of the logical volumes managed by the controller.
 .El

Modified: head/usr.sbin/mfiutil/mfiutil.c
==============================================================================
--- head/usr.sbin/mfiutil/mfiutil.c	Fri Apr 29 14:01:49 2011	(r221207)
+++ head/usr.sbin/mfiutil/mfiutil.c	Fri Apr 29 14:06:37 2011	(r221208)
@@ -60,6 +60,7 @@ usage(void)
 	fprintf(stderr, "    show firmware             - list firmware images\n");
 	fprintf(stderr, "    show volumes              - list logical volumes\n");
 	fprintf(stderr, "    show patrol               - display patrol read status\n");
+	fprintf(stderr, "    show progress             - display status of active operations\n");
 	fprintf(stderr, "    fail               - fail a physical drive\n");
 	fprintf(stderr, "    good               - mark a bad physical drive as good\n");
 	fprintf(stderr, "    rebuild            - mark failed drive ready for rebuild\n");

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 14:24: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 8346E106567B;
	Fri, 29 Apr 2011 14:24:37 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 54D5F8FC1C;
	Fri, 29 Apr 2011 14:24:37 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 0185846B59;
	Fri, 29 Apr 2011 10:24:37 -0400 (EDT)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
	by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6AAE38A02A;
	Fri, 29 Apr 2011 10:24:36 -0400 (EDT)
From: John Baldwin 
To: Rick Macklem 
Date: Fri, 29 Apr 2011 10:24:34 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110325; KDE/4.5.5; amd64; ; )
References: <201104291230.p3TCUFOR099081@svn.freebsd.org>
In-Reply-To: <201104291230.p3TCUFOR099081@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201104291024.34096.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6
	(bigwig.baldwin.cx); Fri, 29 Apr 2011 10:24:36 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221205 - head/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 14:24:37 -0000

On Friday, April 29, 2011 8:30:15 am Rick Macklem wrote:
> Author: rmacklem
> Date: Fri Apr 29 12:30:15 2011
> New Revision: 221205
> URL: http://svn.freebsd.org/changeset/base/221205
> 
> Log:
>   The build was broken by r221190 for 64bit arches like amd64.
>   This patch fixes it.
>   
>   MFC after:	2 weeks
> 
> Modified:
>   head/sys/fs/nfsclient/nfs_clvfsops.c
> 
> Modified: head/sys/fs/nfsclient/nfs_clvfsops.c

Somewhat related.  It seems the vfs_* API used to process nmount-style
mount options, uses 'int' instead of 'size_t' for all of its 'len'
parameters.  I think this is a bug and that it should be fixed to use
size_t instead.  That would let this change be reverted as 'len' could
always be a size_t in this case.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 15:40:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA10D106567A;
	Fri, 29 Apr 2011 15:40:12 +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 96E678FC0C;
	Fri, 29 Apr 2011 15:40:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3TFeCNJ004942;
	Fri, 29 Apr 2011 15:40:12 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TFeChw004937;
	Fri, 29 Apr 2011 15:40:12 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291540.p3TFeChw004937@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 15:40: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: r221209 - 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: Fri, 29 Apr 2011 15:40:12 -0000

Author: jhb
Date: Fri Apr 29 15:40:12 2011
New Revision: 221209
URL: http://svn.freebsd.org/changeset/base/221209

Log:
  TCP reuses t_rxtshift to determine the backoff timer used for both the
  persist state and the retransmit timer.  However, the code that implements
  "bad retransmit recovery" only checks t_rxtshift to see if an ACK has been
  received in during the first retransmit timeout window.  As a result, if
  ticks has wrapped over to a negative value and a socket is in the persist
  state, it can incorrectly treat an ACK from the remote peer as a
  "bad retransmit recovery" and restore saved values such as snd_ssthresh and
  snd_cwnd.  However, if the socket has never had a retransmit timeout, then
  these saved values will be zero, so snd_ssthresh and snd_cwnd will be set
  to 0.
  
  If the socket is in fast recovery (this can be caused by excessive
  duplicate ACKs such as those fixed by 220794), then each ACK that arrives
  triggers either NewReno or SACK partial ACK handling which clamps snd_cwnd
  to be no larger than snd_ssthresh.  In effect, the socket's send window
  is permamently stuck at 0 even though the remote peer is advertising a
  much larger window and pending data is only sent via TCP window probes
  (so one byte every few seconds).
  
  Fix this by adding a new TCP pcb flag (TF_PREVVALID) that indicates that
  the various snd_*_prev fields in the pcb are valid and only perform
  "bad retransmit recovery" if this flag is set in the pcb.  The flag is set
  on the first retransmit timeout that occurs and is cleared on subsequent
  retransmit timeouts or when entering the persist state.
  
  Reviewed by:	bz
  MFC after:	2 weeks

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_timer.c
  head/sys/netinet/tcp_var.h

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Fri Apr 29 14:06:37 2011	(r221208)
+++ head/sys/netinet/tcp_input.c	Fri Apr 29 15:40:12 2011	(r221209)
@@ -420,6 +420,7 @@ cc_cong_signal(struct tcpcb *tp, struct 
 		if (tp->t_flags & TF_WASCRECOVERY)
 			ENTER_CONGRECOVERY(tp->t_flags);
 		tp->snd_nxt = tp->snd_max;
+		tp->t_flags &= ~TF_PREVVALID;
 		tp->t_badrxtwin = 0;
 		break;
 	}
@@ -1575,6 +1576,7 @@ tcp_do_segment(struct mbuf *m, struct tc
 				 * "bad retransmit" recovery.
 				 */
 				if (tp->t_rxtshift == 1 &&
+				    tp->t_flags & TF_PREVVALID &&
 				    (int)(ticks - tp->t_badrxtwin) < 0) {
 					cc_cong_signal(tp, th, CC_RTO_ERR);
 				}
@@ -2521,7 +2523,8 @@ process_ACK:
 		 * original cwnd and ssthresh, and proceed to transmit where
 		 * we left off.
 		 */
-		if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0)
+		if (tp->t_rxtshift == 1 && tp->t_flags & TF_PREVVALID &&
+		    (int)(ticks - tp->t_badrxtwin) < 0)
 			cc_cong_signal(tp, th, CC_RTO_ERR);
 
 		/*

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c	Fri Apr 29 14:06:37 2011	(r221208)
+++ head/sys/netinet/tcp_output.c	Fri Apr 29 15:40:12 2011	(r221209)
@@ -1346,6 +1346,7 @@ tcp_setpersist(struct tcpcb *tp)
 	int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1;
 	int tt;
 
+	tp->t_flags &= ~TF_PREVVALID;
 	if (tcp_timer_active(tp, TT_REXMT))
 		panic("tcp_setpersist: retransmit pending");
 	/*

Modified: head/sys/netinet/tcp_timer.c
==============================================================================
--- head/sys/netinet/tcp_timer.c	Fri Apr 29 14:06:37 2011	(r221208)
+++ head/sys/netinet/tcp_timer.c	Fri Apr 29 15:40:12 2011	(r221209)
@@ -524,7 +524,9 @@ tcp_timer_rexmt(void * xtp)
 		else
 			tp->t_flags &= ~TF_WASCRECOVERY;
 		tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
-	}
+		tp->t_flags |= TF_PREVVALID;
+	} else
+		tp->t_flags &= ~TF_PREVVALID;
 	TCPSTAT_INC(tcps_rexmttimeo);
 	if (tp->t_state == TCPS_SYN_SENT)
 		rexmt = TCP_REXMTVAL(tp) * tcp_syn_backoff[tp->t_rxtshift];

Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h	Fri Apr 29 14:06:37 2011	(r221208)
+++ head/sys/netinet/tcp_var.h	Fri Apr 29 15:40:12 2011	(r221209)
@@ -224,6 +224,7 @@ struct tcpcb {
 #define	TF_NEEDSYN	0x000400	/* send SYN (implicit state) */
 #define	TF_NEEDFIN	0x000800	/* send FIN (implicit state) */
 #define	TF_NOPUSH	0x001000	/* don't push */
+#define	TF_PREVVALID	0x002000	/* saved values for bad rxmit valid */
 #define	TF_MORETOCOME	0x010000	/* More data to be appended to sock */
 #define	TF_LQ_OVERFLOW	0x020000	/* listen queue overflow */
 #define	TF_LASTIDLE	0x040000	/* connection was previously idle */

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 16:43: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 BB373106564A;
	Fri, 29 Apr 2011 16:43:30 +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 AB4608FC13;
	Fri, 29 Apr 2011 16:43: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 p3TGhUZ3006833;
	Fri, 29 Apr 2011 16:43:30 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TGhUQr006831;
	Fri, 29 Apr 2011 16:43:30 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104291643.p3TGhUQr006831@svn.freebsd.org>
From: Adrian Chadd 
Date: Fri, 29 Apr 2011 16:43: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: r221210 - 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, 29 Apr 2011 16:43:30 -0000

Author: adrian
Date: Fri Apr 29 16:43:30 2011
New Revision: 221210
URL: http://svn.freebsd.org/changeset/base/221210

Log:
  Cosmetic changes to fit 80 character screen width.

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

Modified: head/sys/dev/ath/if_ath.c
==============================================================================
--- head/sys/dev/ath/if_ath.c	Fri Apr 29 15:40:12 2011	(r221209)
+++ head/sys/dev/ath/if_ath.c	Fri Apr 29 16:43:30 2011	(r221210)
@@ -3586,14 +3586,14 @@ rx_accept:
 				IEEE80211_KEYIX_NONE : rs->rs_keyix);
 		sc->sc_lastrs = rs;
 
-		/* Keep statistics on the number of aggregate packets received */
 		if (rs->rs_isaggr)
 			sc->sc_stats.ast_rx_agg++;
 
 		if (ni != NULL) {
 			/*
- 			 * Only punt packets for ampdu reorder processing for 11n nodes;
- 			 * net80211 enforces that M_AMPDU is only set for 11n nodes.
+ 			 * Only punt packets for ampdu reorder processing for
+			 * 11n nodes; net80211 enforces that M_AMPDU is only
+			 * set for 11n nodes.
  			 */
 			if (ni->ni_flags & IEEE80211_NODE_HT)
 				m->m_flags |= M_AMPDU;

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 17:04: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 856A4106564A;
	Fri, 29 Apr 2011 17:04:52 +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 74EE78FC14;
	Fri, 29 Apr 2011 17:04: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 p3TH4qRU007495;
	Fri, 29 Apr 2011 17:04:52 GMT (envelope-from attilio@svn.freebsd.org)
Received: (from attilio@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TH4qY3007493;
	Fri, 29 Apr 2011 17:04:52 GMT (envelope-from attilio@svn.freebsd.org)
Message-Id: <201104291704.p3TH4qY3007493@svn.freebsd.org>
From: Attilio Rao 
Date: Fri, 29 Apr 2011 17:04:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221211 - stable/8/sys/ddb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 17:04:52 -0000

Author: attilio
Date: Fri Apr 29 17:04:52 2011
New Revision: 221211
URL: http://svn.freebsd.org/changeset/base/221211

Log:
  MFC r220362:
  Extend the DDB command watchdog with the ability to specify a timeout
  value.

Modified:
  stable/8/sys/ddb/db_command.c

Modified: stable/8/sys/ddb/db_command.c
==============================================================================
--- stable/8/sys/ddb/db_command.c	Fri Apr 29 16:43:30 2011	(r221210)
+++ stable/8/sys/ddb/db_command.c	Fri Apr 29 17:04:52 2011	(r221211)
@@ -129,7 +129,7 @@ static struct command db_cmds[] = {
 	{ "reboot",	db_reset,		0,	0 },
 	{ "reset",	db_reset,		0,	0 },
 	{ "kill",	db_kill,		CS_OWN,	0 },
-	{ "watchdog",	db_watchdog,		0,	0 },
+	{ "watchdog",	db_watchdog,		CS_OWN,	0 },
 	{ "thread",	db_set_thread,		CS_OWN,	0 },
 	{ "run",	db_run_cmd,		CS_OWN,	0 },
 	{ "script",	db_script_cmd,		CS_OWN,	0 },
@@ -708,15 +708,32 @@ db_watchdog(dummy1, dummy2, dummy3, dumm
 	db_expr_t	dummy3;
 	char *		dummy4;
 {
-	int i;
+	db_expr_t old_radix, tout;
+	int err, i;
 
-	/*
-	 * XXX: It might make sense to be able to set the watchdog to a
-	 * XXX: timeout here so that failure or hang as a result of subsequent
-	 * XXX: ddb commands could be recovered by a reset.
-	 */
+	old_radix = db_radix;
+	db_radix = 10;
+	err = db_expression(&tout);
+	db_skip_to_eol();
+	db_radix = old_radix;
 
-	EVENTHANDLER_INVOKE(watchdog_list, 0, &i);
+	/* If no argument is provided the watchdog will just be disabled. */
+	if (err == 0) {
+		db_printf("No argument provided, disabling watchdog\n");
+		tout = 0;
+	} else if ((tout & WD_INTERVAL) == WD_TO_NEVER) {
+		db_error("Out of range watchdog interval\n");
+		return;
+	} else {
+
+		/*
+		 * XXX: Right now we only support WD_ACTIVE, in the future we
+		 * may be possibly needing a more convoluted function for
+		 * dealing with different cases.
+		 */
+		tout |= WD_ACTIVE;
+	}
+	EVENTHANDLER_INVOKE(watchdog_list, tout, &i);
 }
 
 static void

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 17:57: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 37B0E106566C;
	Fri, 29 Apr 2011 17:57:36 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 25E488FC0A;
	Fri, 29 Apr 2011 17:57: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 p3THvadX009135;
	Fri, 29 Apr 2011 17:57:36 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3THva0n009126;
	Fri, 29 Apr 2011 17:57:36 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104291757.p3THva0n009126@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 17:57: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: r221212 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 17:57:36 -0000

Author: rmacklem
Date: Fri Apr 29 17:57:35 2011
New Revision: 221212
URL: http://svn.freebsd.org/changeset/base/221212

Log:
  MFC: r200069
  Remove unneeded ifdefs.
  MFC'd with trasz@'s permission.

Modified:
  stable/8/sys/fs/nfs/nfs_commonacl.c
  stable/8/sys/fs/nfs/nfs_commonport.c
  stable/8/sys/fs/nfs/nfs_commonsubs.c
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfs/nfsport.h
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
  stable/8/sys/fs/nfsclient/nfs_clvnops.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/fs/nfs/nfs_commonacl.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonacl.c	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfs/nfs_commonacl.c	Fri Apr 29 17:57:35 2011	(r221212)
@@ -37,7 +37,6 @@ extern int nfsrv_useacl;
 static int nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner,
     enum vtype type, acl_perm_t *permp);
 
-#if defined(NFS4_ACL_EXTATTR_NAME)
 /*
  * Handle xdr for an ace.
  */
@@ -263,189 +262,7 @@ nfsrv_acemasktoperm(u_int32_t acetype, u
 	*permp = perm;
 	return (0);
 }
-#else
-/*
- * Handle xdr for an ace.
- */
-APPLESTATIC int
-nfsrv_dissectace(struct nfsrv_descript *nd, struct acl_entry *acep,
-    int *aceerrp, int *acesizep, NFSPROC_T *p)
-{
-	u_int32_t *tl;
-	int len, gotid = 0, owner = 0, error = 0, aceerr = 0;
-	u_char *name, namestr[NFSV4_SMALLSTR + 1];
-	u_int32_t flag, mask, acetype;
-	gid_t gid;
-	uid_t uid;
-
-	*aceerrp = 0;
-	NFSM_DISSECT(tl, u_int32_t *, 4 * NFSX_UNSIGNED);
-	acetype = fxdr_unsigned(u_int32_t, *tl++);
-	flag = fxdr_unsigned(u_int32_t, *tl++);
-	mask = fxdr_unsigned(u_int32_t, *tl++);
-	len = fxdr_unsigned(int, *tl);
-	if (len < 0) {
-		return (NFSERR_BADXDR);
-	} else if (len == 0) {
-		/* Netapp filers return a 0 length who for nil users */
-		acep->ae_tag = ACL_UNDEFINED_TAG;
-		acep->ae_id = ACL_UNDEFINED_ID;
-		acep->ae_perm = (acl_perm_t)0;
-		if (acesizep)
-			*acesizep = 4 * NFSX_UNSIGNED;
-		return (0);
-	}
-	if (len > NFSV4_SMALLSTR)
-		name = malloc(len + 1, M_NFSSTRING, M_WAITOK);
-	else
-		name = namestr;
-	error = nfsrv_mtostr(nd, name, len);
-	if (error) {
-		if (len > NFSV4_SMALLSTR)
-			free(name, M_NFSSTRING);
-		return (error);
-	}
-	if (len == 6) {
-		if (!NFSBCMP(name, "OWNER@", 6)) {
-			acep->ae_tag = ACL_USER_OBJ;
-			acep->ae_id = ACL_UNDEFINED_ID;
-			owner = 1;
-			gotid = 1;
-		} else if (!NFSBCMP(name, "GROUP@", 6)) {
-			acep->ae_tag = ACL_GROUP_OBJ;
-			acep->ae_id = ACL_UNDEFINED_ID;
-			gotid = 1;
-			flag &= ~NFSV4ACE_IDENTIFIERGROUP;
-		}
-	} else if (len == 9 && !NFSBCMP(name, "EVERYONE@", 9)) {
-		acep->ae_tag = ACL_OTHER;
-		acep->ae_id = ACL_UNDEFINED_ID;
-		gotid = 1;
-	}
-	if (!gotid) {
-		if (flag & NFSV4ACE_IDENTIFIERGROUP) {
-			flag &= ~NFSV4ACE_IDENTIFIERGROUP;
-			acep->ae_tag = ACL_GROUP;
-			aceerr = nfsv4_strtogid(name, len, &gid, p);
-			if (!aceerr)
-				acep->ae_id = (uid_t)gid;
-		} else {
-			acep->ae_tag = ACL_USER;
-			aceerr = nfsv4_strtouid(name, len, &uid, p);
-			if (!aceerr)
-				acep->ae_id = uid;
-		}
-	}
-	if (len > NFSV4_SMALLSTR)
-		free(name, M_NFSSTRING);
-
-	/*
-	 * Now, check for unsupported types or flag bits.
-	 */
-	if (!aceerr && ((acetype != NFSV4ACE_ALLOWEDTYPE &&
-	     acetype != NFSV4ACE_AUDITTYPE && acetype != NFSV4ACE_ALARMTYPE
-	     && acetype != NFSV4ACE_DENIEDTYPE) || flag))
-		aceerr = NFSERR_ATTRNOTSUPP;
-
-	/*
-	 * And turn the mask into perm bits.
-	 */
-	if (!aceerr)
-		aceerr = nfsrv_acemasktoperm(acetype, mask, owner, VREG,
-			&acep->ae_perm);
-	*aceerrp = aceerr;
-	if (acesizep)
-		*acesizep = NFSM_RNDUP(len) + (4 * NFSX_UNSIGNED);
-	return (0);
-nfsmout:
-	return (error);
-}
-
-/*
- * Turn an NFSv4 ace mask into R/W/X flag bits.
- */
-static int
-nfsrv_acemasktoperm(u_int32_t acetype, u_int32_t mask, int owner,
-    enum vtype type, acl_perm_t *permp)
-{
-	acl_perm_t perm = 0x0;
-
-	if (acetype != NFSV4ACE_ALLOWEDTYPE && acetype != NFSV4ACE_DENIEDTYPE){
-		if (mask & ~NFSV4ACE_AUDITMASK)
-			return (NFSERR_ATTRNOTSUPP);
-	}
-	if (mask & NFSV4ACE_DELETE) {
-		return (NFSERR_ATTRNOTSUPP);
-	}
-	if (acetype == NFSV4ACE_DENIEDTYPE) {
-		if (mask & NFSV4ACE_ALLFILESMASK) {
-			return (NFSERR_ATTRNOTSUPP);
-		}
-		if (owner) {
-			if (mask & NFSV4ACE_OWNERMASK) {
-				return (NFSERR_ATTRNOTSUPP);
-			}
-		} else {
-			if ((mask & NFSV4ACE_OWNERMASK) != NFSV4ACE_OWNERMASK) {
-				return (NFSERR_ATTRNOTSUPP);
-			}
-			mask &= ~NFSV4ACE_OWNERMASK;
-		}
-	} else if (acetype == NFSV4ACE_ALLOWEDTYPE) {
-		if ((mask & NFSV4ACE_ALLFILESMASK) != NFSV4ACE_ALLFILESMASK) {
-			return (NFSERR_ATTRNOTSUPP);
-		}
-		mask &= ~NFSV4ACE_ALLFILESMASK;
-		if (owner) {
-			if ((mask & NFSV4ACE_OWNERMASK) != NFSV4ACE_OWNERMASK) {
-				return (NFSERR_ATTRNOTSUPP);
-			}
-			mask &= ~NFSV4ACE_OWNERMASK;
-		} else if (mask & NFSV4ACE_OWNERMASK) {
-			return (NFSERR_ATTRNOTSUPP);
-		}
-	}
-	if (type == VDIR) {
-		if ((mask & NFSV4ACE_DIRREADMASK) == NFSV4ACE_DIRREADMASK) {
-			perm |= ACL_READ;
-			mask &= ~NFSV4ACE_DIRREADMASK;
-		}
-		if ((mask & NFSV4ACE_DIRWRITEMASK) == NFSV4ACE_DIRWRITEMASK) {
-			perm |= ACL_WRITE;
-			mask &= ~NFSV4ACE_DIRWRITEMASK;
-		}
-		if ((mask & NFSV4ACE_DIREXECUTEMASK)==NFSV4ACE_DIREXECUTEMASK){
-			perm |= ACL_EXECUTE;
-			mask &= ~NFSV4ACE_DIREXECUTEMASK;
-		}
-	} else {
-		if (acetype == NFSV4ACE_DENIEDTYPE &&
-		    (mask & NFSV4ACE_SYNCHRONIZE)) {
-			return (NFSERR_ATTRNOTSUPP);
-		}
-		mask &= ~(NFSV4ACE_SYNCHRONIZE | NFSV4ACE_DELETECHILD);
-		if ((mask & NFSV4ACE_READMASK) == NFSV4ACE_READMASK) {
-			perm |= ACL_READ;
-			mask &= ~NFSV4ACE_READMASK;
-		}
-		if ((mask & NFSV4ACE_WRITEMASK) == NFSV4ACE_WRITEMASK) {
-			perm |= ACL_WRITE;
-			mask &= ~NFSV4ACE_WRITEMASK;
-		}
-		if ((mask & NFSV4ACE_EXECUTEMASK) == NFSV4ACE_EXECUTEMASK) {
-			perm |= ACL_EXECUTE;
-			mask &= ~NFSV4ACE_EXECUTEMASK;
-		}
-	}
-	if (mask) {
-		return (NFSERR_ATTRNOTSUPP);
-	}
-	*permp = perm;
-	return (0);
-}
-#endif	/* !NFS4_ACL_EXTATTR_NAME */
 
-#ifdef NFS4_ACL_EXTATTR_NAME
 /* local functions */
 static int nfsrv_buildace(struct nfsrv_descript *, u_char *, int,
     enum vtype, int, int, struct acl_entry *);
@@ -678,5 +495,3 @@ nfsrv_compareacl(NFSACL_T *aclp1, NFSACL
 	}
 	return (0);
 }
-
-#endif	/* NFS4_ACL_EXTATTR_NAME */

Modified: stable/8/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonport.c	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfs/nfs_commonport.c	Fri Apr 29 17:57:35 2011	(r221212)
@@ -432,7 +432,6 @@ newnfs_portinit(void)
 	mtx_init(&nfs_state_mutex, "nfs_state_mutex", NULL, MTX_DEF);
 }
 
-#ifdef NFS4_ACL_EXTATTR_NAME
 /*
  * Determine if the file system supports NFSv4 ACLs.
  * Return 1 if it does, 0 otherwise.
@@ -452,7 +451,6 @@ nfs_supportsnfsv4acls(struct mount *mp)
 	}
 	return (0);
 }
-#endif	/* NFS4_ACL_EXTATTR_NAME */
 
 extern int (*nfsd_call_nfscommon)(struct thread *, struct nfssvc_args *);
 

Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 17:57:35 2011	(r221212)
@@ -650,10 +650,8 @@ nfsrv_dissectacl(struct nfsrv_descript *
 	int acecnt, error = 0, aceerr = 0, acesize;
 
 	*aclerrp = 0;
-#ifdef NFS4_ACL_EXTATTR_NAME
 	if (aclp)
 		aclp->acl_cnt = 0;
-#endif
 	/*
 	 * Parse out the ace entries and expect them to conform to
 	 * what can be supported by R/W/X bits.
@@ -661,28 +659,22 @@ nfsrv_dissectacl(struct nfsrv_descript *
 	NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
 	aclsize = NFSX_UNSIGNED;
 	acecnt = fxdr_unsigned(int, *tl);
-#ifdef NFS4_ACL_EXTATTR_NAME
 	if (acecnt > ACL_MAX_ENTRIES)
 		aceerr = 1;
-#endif
 	if (nfsrv_useacl == 0)
 		aceerr = 1;
 	for (i = 0; i < acecnt; i++) {
-#ifdef NFS4_ACL_EXTATTR_NAME
 		if (aclp && !aceerr)
 			error = nfsrv_dissectace(nd, &aclp->acl_entry[i],
 			    &aceerr, &acesize, p);
 		else
-#endif
 			error = nfsrv_skipace(nd, &acesize);
 		if (error)
 			return (error);
 		aclsize += acesize;
 	}
-#ifdef NFS4_ACL_EXTATTR_NAME
 	if (aclp && !aceerr)
 		aclp->acl_cnt = acecnt;
-#endif
 	if (aceerr)
 		*aclerrp = aceerr;
 	if (aclsizep)
@@ -1014,7 +1006,6 @@ nfsv4_loadattr(struct nfsrv_descript *nd
 		case NFSATTRBIT_ACL:
 			if (compare) {
 			  if (!(*retcmpp)) {
-#ifdef NFS4_ACL_EXTATTR_NAME
 			    if (nfsrv_useacl) {
 				NFSACL_T *naclp;
 
@@ -1028,9 +1019,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd
 				if (aceerr || nfsrv_compareacl(aclp, naclp))
 				    *retcmpp = NFSERR_NOTSAME;
 				acl_free(naclp);
-			    } else
-#endif
-			    {
+			    } else {
 				error = nfsrv_dissectacl(nd, NULL, &aceerr,
 				    &cnt, p);
 				*retcmpp = NFSERR_ATTRNOTSUPP;
@@ -1960,9 +1949,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		aclp = saclp;
 	} else {
 		NFSCLRNOTFILLABLE_ATTRBIT(retbitp);
-#ifdef NFS4_ACL_EXTATTR_NAME
 		naclp = acl_alloc(M_WAITOK);
-#endif
 		aclp = naclp;
 	}
 	nfsvno_getfs(&fsinf, isdgram);
@@ -1985,21 +1972,15 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	/*
 	 * And the NFSv4 ACL...
 	 */
-	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT)
-#ifdef NFS4_ACL_EXTATTR_NAME
-	    && (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
-		!NFSHASNFS4ACL(vnode_mount(vp))))
-#endif
-	    ) {
+	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT) &&
+	    (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
+		!NFSHASNFS4ACL(vnode_mount(vp))))) {
 		NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT);
 	}
 	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACL)) {
-#ifdef NFS4_ACL_EXTATTR_NAME
 		if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
 		    !NFSHASNFS4ACL(vnode_mount(vp)))) {
-#endif
 			NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACL);
-#ifdef NFS4_ACL_EXTATTR_NAME
 		} else if (naclp != NULL) {
 			if (vn_lock(vp, LK_SHARED) == 0) {
 				error = VOP_ACCESSX(vp, VREAD_ACL, cred, p);
@@ -2017,7 +1998,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 				NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACL);
 			}
 		}
-#endif
 	}
 	/*
 	 * Put out the attribute bitmap for the ones being filled in
@@ -2035,11 +2015,8 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		switch (bitpos) {
 		case NFSATTRBIT_SUPPORTEDATTRS:
 			NFSSETSUPP_ATTRBIT(&attrbits);
-#ifdef NFS4_ACL_EXTATTR_NAME
 			if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL)
-			    && !NFSHASNFS4ACL(vnode_mount(vp))))
-#endif
-			{
+			    && !NFSHASNFS4ACL(vnode_mount(vp)))) {
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACLSUPPORT);
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACL);
 			}
@@ -2112,7 +2089,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		/*
 		 * Recommended Attributes. (Only the supported ones.)
 		 */
-#ifdef NFS4_ACL_EXTATTR_NAME
 		case NFSATTRBIT_ACL:
 			retnum += nfsrv_buildacl(nd, aclp, vnode_vtype(vp), p);
 			break;
@@ -2121,7 +2097,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			*tl = txdr_unsigned(NFSV4ACE_SUPTYPES);
 			retnum += NFSX_UNSIGNED;
 			break;
-#endif
 		case NFSATTRBIT_CANSETTIME:
 			NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
 			if (fsinf.fs_properties & NFSV3FSINFO_CANSETTIME)
@@ -2427,10 +2402,8 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		};
 	    }
 	}
-#ifdef NFS4_ACL_EXTATTR_NAME
 	if (naclp != NULL)
 		acl_free(naclp);
-#endif
 	*retnump = txdr_unsigned(retnum);
 	return (retnum + prefixnum);
 }

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 17:57:35 2011	(r221212)
@@ -332,13 +332,11 @@ void newnfs_timer(void *);
 /* nfs_commonacl.c */
 int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *,
     int *, int *, NFSPROC_T *);
-#ifdef NFS4_ACL_EXTATTR_NAME
 int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, enum vtype,
     NFSPROC_T *);
 int nfsrv_setacl(vnode_t, NFSACL_T *, struct ucred *,
     NFSPROC_T *);
 int nfsrv_compareacl(NFSACL_T *, NFSACL_T *);
-#endif
 
 /* nfs_clrpcops.c */
 int nfsrpc_null(vnode_t, struct ucred *, NFSPROC_T *);

Modified: stable/8/sys/fs/nfs/nfsport.h
==============================================================================
--- stable/8/sys/fs/nfs/nfsport.h	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfs/nfsport.h	Fri Apr 29 17:57:35 2011	(r221212)
@@ -125,11 +125,7 @@
 #define	NFSPROC_T	struct thread
 #define	NFSDEV_T	dev_t
 #define	NFSSVCARGS	nfssvc_args
-#ifdef NFS4_ACL_EXTATTR_NAME
 #define	NFSACL_T	struct acl
-#else
-#define	NFSACL_T	void
-#endif
 
 /*
  * These should be defined as the types used for the corresponding VOP's

Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 17:57:35 2011	(r221212)
@@ -81,10 +81,8 @@ static int nfsrpc_createv4(vnode_t , cha
 static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *,
     struct nfscllockowner *, u_int64_t, u_int64_t,
     u_int32_t, struct ucred *, NFSPROC_T *, int);
-#ifdef NFS4_ACL_EXTATTR_NAME
 static int nfsrpc_setaclrpc(vnode_t, struct ucred *, NFSPROC_T *,
     struct acl *, nfsv4stateid_t *, void *);
-#endif
 
 /*
  * nfs null call from vfs.
@@ -998,14 +996,9 @@ nfsrpc_setattr(vnode_t vp, struct vattr 
 		if (vap != NULL)
 			error = nfsrpc_setattrrpc(vp, vap, &stateid, cred, p,
 			    rnap, attrflagp, stuff);
-#ifdef NFS4_ACL_EXTATTR_NAME
 		else
 			error = nfsrpc_setaclrpc(vp, cred, p, aclp, &stateid,
 			    stuff);
-#else
-		else
-			error = EOPNOTSUPP;
-#endif
 		if (error == NFSERR_STALESTATEID)
 			nfscl_initiate_recovery(nmp->nm_clp);
 		if (lckp != NULL)
@@ -4119,7 +4112,6 @@ nfsrpc_delegreturn(struct nfscldeleg *dp
 	return (error);
 }
 
-#ifdef NFS4_ACL_EXTATTR_NAME
 /*
  * nfs getacl call.
  */
@@ -4193,5 +4185,3 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucre
 	mbuf_freem(nd->nd_mrep);
 	return (nd->nd_repstat);
 }
-
-#endif	/* NFS4_ACL_EXTATTR_NAME */

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Fri Apr 29 17:04:52 2011	(r221211)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Fri Apr 29 17:57:35 2011	(r221212)
@@ -129,10 +129,8 @@ static vop_readlink_t	nfs_readlink;
 static vop_print_t	nfs_print;
 static vop_advlock_t	nfs_advlock;
 static vop_advlockasync_t nfs_advlockasync;
-#ifdef NFS4_ACL_EXTATTR_NAME
 static vop_getacl_t nfs_getacl;
 static vop_setacl_t nfs_setacl;
-#endif
 
 /*
  * Global vfs data structures for nfs
@@ -168,10 +166,8 @@ struct vop_vector newnfs_vnodeops = {
 	.vop_strategy =		nfs_strategy,
 	.vop_symlink =		nfs_symlink,
 	.vop_write =		ncl_write,
-#ifdef NFS4_ACL_EXTATTR_NAME
 	.vop_getacl =		nfs_getacl,
 	.vop_setacl =		nfs_setacl,
-#endif
 };
 
 struct vop_vector newnfs_fifoops = {
@@ -329,12 +325,9 @@ nfs_access(struct vop_access_args *ap)
 	 * unless the file is a socket, fifo, or a block or character
 	 * device resident on the filesystem.
 	 */
-	if ((ap->a_accmode & (VWRITE | VAPPEND
-#ifdef NFS4_ACL_EXTATTR_NAME
-	    | VWRITE_NAMED_ATTRS | VDELETE_CHILD | VWRITE_ATTRIBUTES |
-	    VDELETE | VWRITE_ACL | VWRITE_OWNER
-#endif
-	    )) != 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) {
+	if ((ap->a_accmode & (VWRITE | VAPPEND | VWRITE_NAMED_ATTRS |
+	    VDELETE_CHILD | VWRITE_ATTRIBUTES | VDELETE | VWRITE_ACL |
+	    VWRITE_OWNER)) != 0 && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) {
 		switch (vp->v_type) {
 		case VREG:
 		case VDIR:
@@ -364,10 +357,8 @@ nfs_access(struct vop_access_args *ap)
 				mode |= NFSACCESS_EXTEND;
 			if (ap->a_accmode & VEXEC)
 				mode |= NFSACCESS_EXECUTE;
-#ifdef NFS4_ACL_EXTATTR_NAME
 			if (ap->a_accmode & VDELETE)
 				mode |= NFSACCESS_DELETE;
-#endif
 		} else {
 			if (ap->a_accmode & VWRITE)
 				mode |= (NFSACCESS_MODIFY | NFSACCESS_EXTEND);
@@ -375,12 +366,10 @@ nfs_access(struct vop_access_args *ap)
 				mode |= NFSACCESS_EXTEND;
 			if (ap->a_accmode & VEXEC)
 				mode |= NFSACCESS_LOOKUP;
-#ifdef NFS4_ACL_EXTATTR_NAME
 			if (ap->a_accmode & VDELETE)
 				mode |= NFSACCESS_DELETE;
 			if (ap->a_accmode & VDELETE_CHILD)
 				mode |= NFSACCESS_MODIFY;
-#endif
 		}
 		/* XXX safety belt, only make blanket request if caching */
 		if (nfsaccess_cache_timeout > 0) {
@@ -3216,7 +3205,6 @@ nfs_lock1(struct vop_lock1_args *ap)
 	    ap->a_line));
 }
 
-#ifdef NFS4_ACL_EXTATTR_NAME
 static int
 nfs_getacl(struct vop_getacl_args *ap)
 {
@@ -3249,8 +3237,6 @@ nfs_setacl(struct vop_setacl_args *ap)
 	return (error);
 }
 
-#endif	/* NFS4_ACL_EXTATTR_NAME */
-
 /*
  * Return POSIX pathconf information applicable to nfs filesystems.
  */

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:17: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 BFF4E106564A;
	Fri, 29 Apr 2011 18:17:01 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id ADE8C8FC17;
	Fri, 29 Apr 2011 18:17: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 p3TIH1Cq009761;
	Fri, 29 Apr 2011 18:17:01 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIH1ix009753;
	Fri, 29 Apr 2011 18:17:01 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104291817.p3TIH1ix009753@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 18:17:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221213 - in stable/8/sys/fs: nfs nfsclient nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 18:17:01 -0000

Author: rmacklem
Date: Fri Apr 29 18:17:01 2011
New Revision: 221213
URL: http://svn.freebsd.org/changeset/base/221213

Log:
  MFC: r220645
  Modify the experimental NFSv4 server so that it handles
  crossing of server mount points properly. The functions
  nfsvno_fillattr() and nfsv4_fillattr() were modified to
  take the extra arguments that are the mount point, a flag
  to indicate that it is a file system root and the mounted
  on fileno. The mount point argument needs to be busy when
  nfsvno_fillattr() is called, since the vp argument is not
  locked.

Modified:
  stable/8/sys/fs/nfs/nfs_commonsubs.c
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
  stable/8/sys/fs/nfsclient/nfs_clstate.c
  stable/8/sys/fs/nfsserver/nfs_nfsdport.c
  stable/8/sys/fs/nfsserver/nfs_nfsdserv.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/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -1916,9 +1916,10 @@ nfsrv_mtostr(struct nfsrv_descript *nd, 
  * Fill in the attributes as marked by the bitmap (V4).
  */
 APPLESTATIC int
-nfsv4_fillattr(struct nfsrv_descript *nd, vnode_t vp, NFSACL_T *saclp,
-    struct vattr *vap, fhandle_t *fhp, int rderror, nfsattrbit_t *attrbitp,
-    struct ucred *cred, NFSPROC_T *p, int isdgram, int reterr)
+nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
+    NFSACL_T *saclp, struct vattr *vap, fhandle_t *fhp, int rderror,
+    nfsattrbit_t *attrbitp, struct ucred *cred, NFSPROC_T *p, int isdgram,
+    int reterr, int at_root, uint64_t mounted_on_fileno)
 {
 	int bitpos, retnum = 0;
 	u_int32_t *tl;
@@ -1928,7 +1929,6 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	nfsattrbit_t *retbitp = &retbits;
 	u_int32_t freenum, *retnump;
 	u_int64_t uquad;
-	long fid;
 	struct statfs fs;
 	struct nfsfsinfo fsinf;
 	struct timespec temptime;
@@ -1958,7 +1958,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	 * Get the VFS_STATFS(), since some attributes need them.
 	 */
 	if (NFSISSETSTATFS_ATTRBIT(retbitp)) {
-		error = VFS_STATFS(vnode_mount(vp), &fs);
+		error = VFS_STATFS(mp, &fs);
 		if (error != 0) {
 			if (reterr) {
 				nd->nd_repstat = NFSERR_ACCES;
@@ -1974,12 +1974,12 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	 */
 	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT) &&
 	    (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
-		!NFSHASNFS4ACL(vnode_mount(vp))))) {
+		!NFSHASNFS4ACL(mp)))) {
 		NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT);
 	}
 	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACL)) {
 		if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
-		    !NFSHASNFS4ACL(vnode_mount(vp)))) {
+		    !NFSHASNFS4ACL(mp))) {
 			NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACL);
 		} else if (naclp != NULL) {
 			if (vn_lock(vp, LK_SHARED) == 0) {
@@ -2016,7 +2016,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		case NFSATTRBIT_SUPPORTEDATTRS:
 			NFSSETSUPP_ATTRBIT(&attrbits);
 			if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL)
-			    && !NFSHASNFS4ACL(vnode_mount(vp)))) {
+			    && !NFSHASNFS4ACL(mp))) {
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACLSUPPORT);
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACL);
 			}
@@ -2066,9 +2066,9 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		case NFSATTRBIT_FSID:
 			NFSM_BUILD(tl, u_int32_t *, NFSX_V4FSID);
 			*tl++ = 0;
-			*tl++=txdr_unsigned(vfs_statfs(vnode_mount(vp))->f_fsid.val[0]);
+			*tl++ = txdr_unsigned(mp->mnt_stat.f_fsid.val[0]);
 			*tl++ = 0;
-			*tl=txdr_unsigned(vfs_statfs(vnode_mount(vp))->f_fsid.val[1]);
+			*tl = txdr_unsigned(mp->mnt_stat.f_fsid.val[1]);
 			retnum += NFSX_V4FSID;
 			break;
 		case NFSATTRBIT_UNIQUEHANDLES:
@@ -2142,7 +2142,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			 */
 			savuid = p->p_cred->p_ruid;
 			p->p_cred->p_ruid = cred->cr_uid;
-			if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA,USRQUOTA),
+			if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
 			    cred->cr_uid, (caddr_t)&dqb))
 			    freenum = min(dqb.dqb_isoftlimit-dqb.dqb_curinodes,
 				freenum);
@@ -2249,7 +2249,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			 */
 			savuid = p->p_cred->p_ruid;
 			p->p_cred->p_ruid = cred->cr_uid;
-			if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA,USRQUOTA),
+			if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
 			    cred->cr_uid, (caddr_t)&dqb))
 			    freenum = min(dqb.dqb_bhardlimit, freenum);
 			p->p_cred->p_ruid = savuid;
@@ -2273,7 +2273,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			 */
 			savuid = p->p_cred->p_ruid;
 			p->p_cred->p_ruid = cred->cr_uid;
-			if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA,USRQUOTA),
+			if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
 			    cred->cr_uid, (caddr_t)&dqb))
 			    freenum = min(dqb.dqb_bsoftlimit, freenum);
 			p->p_cred->p_ruid = savuid;
@@ -2294,7 +2294,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			 */
 			savuid = p->p_cred->p_ruid;
 			p->p_cred->p_ruid = cred->cr_uid;
-			if (!VFS_QUOTACTL(vnode_mount(vp),QCMD(Q_GETQUOTA,USRQUOTA),
+			if (!VFS_QUOTACTL(mp, QCMD(Q_GETQUOTA,USRQUOTA),
 			    cred->cr_uid, (caddr_t)&dqb))
 			    freenum = dqb.dqb_curblocks;
 			p->p_cred->p_ruid = savuid;
@@ -2390,11 +2390,11 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 			break;
 		case NFSATTRBIT_MOUNTEDONFILEID:
 			NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER);
-			*tl++ = 0;
-			if (nfsrv_atroot(vp, &fid))
-				*tl = txdr_unsigned(fid);
+			if (at_root != 0)
+				uquad = mounted_on_fileno;
 			else
-				*tl = txdr_unsigned(vap->va_fileid);
+				uquad = (u_int64_t)vap->va_fileid;
+			txdr_hyper(uquad, tl);
 			retnum += NFSX_HYPER;
 			break;
 		default:

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 18:17:01 2011	(r221213)
@@ -288,9 +288,9 @@ int nfsrv_mtofh(struct nfsrv_descript *,
 int nfsrv_putattrbit(struct nfsrv_descript *, nfsattrbit_t *);
 void nfsrv_wcc(struct nfsrv_descript *, int, struct nfsvattr *, int,
     struct nfsvattr *);
-int nfsv4_fillattr(struct nfsrv_descript *, vnode_t, NFSACL_T *,
+int nfsv4_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, NFSACL_T *,
     struct vattr *, fhandle_t *, int, nfsattrbit_t *,
-    struct ucred *, NFSPROC_T *, int, int);
+    struct ucred *, NFSPROC_T *, int, int, int, uint64_t);
 void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *);
 void nfsrv_adj(mbuf_t, int, int);
 void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *);
@@ -556,9 +556,9 @@ void nfsvno_open(struct nfsrv_descript *
     struct nfsexstuff *, vnode_t *);
 void nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct ucred *,
     NFSPROC_T *);
-int nfsvno_fillattr(struct nfsrv_descript *, vnode_t,
+int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t,
     struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *,
-    struct ucred *, NFSPROC_T *, int, int);
+    struct ucred *, NFSPROC_T *, int, int, int, uint64_t);
 int nfsrv_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *,
     NFSACL_T *, NFSPROC_T *);
 int nfsv4_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *,

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -803,8 +803,8 @@ nfscl_fillsattr(struct nfsrv_descript *n
 			NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEACCESSSET);
 		if (vap->va_mtime.tv_sec != VNOVAL)
 			NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEMODIFYSET);
-		(void) nfsv4_fillattr(nd, vp, NULL, vap, NULL, 0, &attrbits,
-		    NULL, NULL, 0, 0);
+		(void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0,
+		    &attrbits, NULL, NULL, 0, 0, 0, (uint64_t)0);
 		break;
 	};
 }

Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -4176,8 +4176,8 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucre
 	nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID);
 	NFSZERO_ATTRBIT(&attrbits);
 	NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL);
-	(void) nfsv4_fillattr(nd, vp, aclp, NULL, NULL, 0, &attrbits,
-	    NULL, NULL, 0, 0);
+	(void) nfsv4_fillattr(nd, vnode_mount(vp), vp, aclp, NULL, NULL, 0,
+	    &attrbits, NULL, NULL, 0, 0, 0, (uint64_t)0);
 	error = nfscl_request(nd, vp, p, cred, stuff);
 	if (error)
 		return (error);

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -3061,8 +3061,9 @@ nfscl_docb(struct nfsrv_descript *nd, NF
 					NFSSETBIT_ATTRBIT(&rattrbits,
 					    NFSATTRBIT_CHANGE);
 				}
-				(void) nfsv4_fillattr(nd, NULL, NULL, &va,
-				    NULL, 0, &rattrbits, NULL, NULL, 0, 0);
+				(void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va,
+				    NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0,
+				    (uint64_t)0);
 				if (!ret)
 					vrele(vp);
 			}

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -68,15 +68,15 @@ static uint32_t nfsv4_sysid = 0;
 static int nfssvc_srvcall(struct thread *, struct nfssvc_args *,
     struct ucred *);
 
-static int enable_crossmntpt = 1;
+int nfsrv_enable_crossmntpt = 1;
 static int nfs_commit_blks;
 static int nfs_commit_miss;
 extern int nfsrv_issuedelegs;
 extern int nfsrv_dolocallocks;
 
 SYSCTL_DECL(_vfs_newnfs);
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, mirrormnt, CTLFLAG_RW, &enable_crossmntpt,
-    0, "Enable nfsd to cross mount points");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, mirrormnt, CTLFLAG_RW,
+    &nfsrv_enable_crossmntpt, 0, "Enable nfsd to cross mount points");
 SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_blks, CTLFLAG_RW, &nfs_commit_blks,
     0, "");
 SYSCTL_INT(_vfs_newnfs, OID_AUTO, commit_miss, CTLFLAG_RW, &nfs_commit_miss,
@@ -306,12 +306,12 @@ nfsvno_namei(struct nfsrv_descript *nd, 
 			dp = rootvnode;
 			VREF(dp);
 		}
-	} else if ((enable_crossmntpt == 0 && NFSVNO_EXPORTED(exp)) ||
+	} else if ((nfsrv_enable_crossmntpt == 0 && NFSVNO_EXPORTED(exp)) ||
 	    (nd->nd_flag & ND_NFSV4) == 0) {
 		/*
 		 * Only cross mount points for NFSv4 when doing a
 		 * mount while traversing the file system above
-		 * the mount point, unless enable_crossmntpt is set.
+		 * the mount point, unless nfsrv_enable_crossmntpt is set.
 		 */
 		cnp->cn_flags |= NOCROSSMOUNT;
 		crossmnt = 0;
@@ -1391,14 +1391,15 @@ nfsvno_updfilerev(struct vnode *vp, stru
  * Glue routine to nfsv4_fillattr().
  */
 int
-nfsvno_fillattr(struct nfsrv_descript *nd, struct vnode *vp,
+nfsvno_fillattr(struct nfsrv_descript *nd, struct mount *mp, struct vnode *vp,
     struct nfsvattr *nvap, fhandle_t *fhp, int rderror, nfsattrbit_t *attrbitp,
-    struct ucred *cred, struct thread *p, int isdgram, int reterr)
+    struct ucred *cred, struct thread *p, int isdgram, int reterr, int at_root,
+    uint64_t mounted_on_fileno)
 {
 	int error;
 
-	error = nfsv4_fillattr(nd, vp, NULL, &nvap->na_vattr, fhp, rderror,
-	    attrbitp, cred, p, isdgram, reterr);
+	error = nfsv4_fillattr(nd, mp, vp, NULL, &nvap->na_vattr, fhp, rderror,
+	    attrbitp, cred, p, isdgram, reterr, at_root, mounted_on_fileno);
 	return (error);
 }
 
@@ -1688,8 +1689,9 @@ nfsrvd_readdirplus(struct nfsrv_descript
 	struct uio io;
 	struct iovec iv;
 	struct componentname cn;
-	int not_zfs;
-	struct mount *mp;
+	int at_root, needs_unbusy, not_zfs;
+	struct mount *mp, *new_mp;
+	uint64_t mounted_on_fileno;
 
 	if (nd->nd_repstat) {
 		nfsrv_postopattr(nd, getret, &at);
@@ -1929,6 +1931,10 @@ again:
 			nvp = NULL;
 			refp = NULL;
 			r = 0;
+			at_root = 0;
+			needs_unbusy = 0;
+			new_mp = mp;
+			mounted_on_fileno = (uint64_t)dp->d_fileno;
 			if ((nd->nd_flag & ND_NFSV3) ||
 			    NFSNONZERO_ATTRBIT(&savbits)) {
 				if (nd->nd_flag & ND_NFSV4)
@@ -1980,6 +1986,29 @@ again:
 								    0);
 						}
 					}
+
+					/*
+					 * For NFSv4, check to see if nvp is
+					 * a mount point and get the mount
+					 * point vnode, as required.
+					 */
+					if (r == 0 &&
+					    nfsrv_enable_crossmntpt != 0 &&
+					    (nd->nd_flag & ND_NFSV4) != 0 &&
+					    nvp->v_type == VDIR &&
+					    nvp->v_mountedhere != NULL) {
+						new_mp = nvp->v_mountedhere;
+						r = vfs_busy(new_mp, 0);
+						vput(nvp);
+						nvp = NULL;
+						if (r == 0) {
+							r = VFS_ROOT(new_mp,
+							    LK_SHARED, &nvp);
+							needs_unbusy = 1;
+							if (r == 0)
+								at_root = 1;
+						}
+					}
 				}
 				if (!r) {
 				    if (refp == NULL &&
@@ -1998,6 +2027,8 @@ again:
 					    NFSATTRBIT_RDATTRERROR)) {
 						if (nvp != NULL)
 							vput(nvp);
+						if (needs_unbusy != 0)
+							vfs_unbusy(new_mp);
 						nd->nd_repstat = r;
 						break;
 					}
@@ -2036,21 +2067,27 @@ again:
 					if (nd->nd_repstat) {
 						if (nvp != NULL)
 							vrele(nvp);
+						if (needs_unbusy != 0)
+							vfs_unbusy(new_mp);
 						break;
 					}
 				} else if (r) {
-					dirlen += nfsvno_fillattr(nd, nvp, nvap,
-					    &nfh, r, &rderrbits, nd->nd_cred,
-					    p, isdgram, 0);
+					dirlen += nfsvno_fillattr(nd, new_mp,
+					    nvp, nvap, &nfh, r, &rderrbits,
+					    nd->nd_cred, p, isdgram, 0, at_root,
+					    mounted_on_fileno);
 				} else {
-					dirlen += nfsvno_fillattr(nd, nvp, nvap,
-					    &nfh, r, &attrbits, nd->nd_cred,
-					    p, isdgram, 0);
+					dirlen += nfsvno_fillattr(nd, new_mp,
+					    nvp, nvap, &nfh, r, &attrbits,
+					    nd->nd_cred, p, isdgram, 0, at_root,
+					    mounted_on_fileno);
 				}
 				if (nvp != NULL)
 					vrele(nvp);
 				dirlen += (3 * NFSX_UNSIGNED);
 			}
+			if (needs_unbusy != 0)
+				vfs_unbusy(new_mp);
 			if (dirlen <= cnt)
 				entrycnt++;
 		}

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 29 17:57:35 2011	(r221212)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 29 18:17:01 2011	(r221213)
@@ -52,6 +52,7 @@ extern u_int32_t newnfs_false, newnfs_tr
 extern enum vtype nv34tov_type[8];
 extern struct timeval nfsboottime;
 extern int nfs_rootfhset;
+extern int nfsrv_enable_crossmntpt;
 #endif	/* !APPLEKEXT */
 
 /*
@@ -169,9 +170,13 @@ nfsrvd_getattr(struct nfsrv_descript *nd
 {
 	struct nfsvattr nva;
 	fhandle_t fh;
-	int error = 0;
+	int at_root = 0, error = 0;
 	struct nfsreferral *refp;
 	nfsattrbit_t attrbits;
+	struct mount *mp;
+	struct vnode *tvp = NULL;
+	struct vattr va;
+	uint64_t mounted_on_fileno = 0;
 
 	if (nd->nd_repstat)
 		return (0);
@@ -207,11 +212,46 @@ nfsrvd_getattr(struct nfsrv_descript *nd
 			if (!nd->nd_repstat)
 				nd->nd_repstat = nfsrv_checkgetattr(nd, vp,
 				    &nva, &attrbits, nd->nd_cred, p);
-			NFSVOPUNLOCK(vp, 0, p);
-			if (!nd->nd_repstat)
-				(void) nfsvno_fillattr(nd, vp, &nva, &fh,
-				    0, &attrbits, nd->nd_cred, p, isdgram, 1);
-			vrele(vp);
+			if (nd->nd_repstat == 0) {
+				mp = vp->v_mount;
+				if (nfsrv_enable_crossmntpt != 0 &&
+				    vp->v_type == VDIR &&
+				    (vp->v_vflag & VV_ROOT) != 0 &&
+				    vp != rootvnode) {
+					tvp = mp->mnt_vnodecovered;
+					VREF(tvp);
+					at_root = 1;
+				} else
+					at_root = 0;
+				vfs_ref(mp);
+				VOP_UNLOCK(vp, 0);
+				if (at_root != 0) {
+					if ((nd->nd_repstat =
+					     vn_lock(tvp, LK_SHARED)) == 0) {
+						nd->nd_repstat = VOP_GETATTR(
+						    tvp, &va, nd->nd_cred);
+						vput(tvp);
+					} else
+						vrele(tvp);
+					if (nd->nd_repstat == 0)
+						mounted_on_fileno = (uint64_t)
+						    va.va_fileid;
+					else
+						at_root = 0;
+				}
+				if (nd->nd_repstat == 0)
+					nd->nd_repstat = vfs_busy(mp, 0);
+				vfs_rel(mp);
+				if (nd->nd_repstat == 0) {
+					(void)nfsvno_fillattr(nd, mp, vp, &nva,
+					    &fh, 0, &attrbits, nd->nd_cred, p,
+					    isdgram, 1, at_root,
+					    mounted_on_fileno);
+					vfs_unbusy(mp);
+				}
+				vrele(vp);
+			} else
+				vput(vp);
 		} else {
 			nfsrv_fillattr(nd, &nva);
 			vput(vp);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:20:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F07861065673;
	Fri, 29 Apr 2011 18:20:12 +0000 (UTC)
	(envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D69108FC1E;
	Fri, 29 Apr 2011 18:20:12 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3TIKCS9009885;
	Fri, 29 Apr 2011 18:20:12 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIKCv7009883;
	Fri, 29 Apr 2011 18:20:12 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201104291820.p3TIKCv7009883@svn.freebsd.org>
From: Jung-uk Kim 
Date: Fri, 29 Apr 2011 18:20: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: r221214 - head/sys/x86/x86
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 18:20:13 -0000

Author: jkim
Date: Fri Apr 29 18:20:12 2011
New Revision: 221214
URL: http://svn.freebsd.org/changeset/base/221214

Log:
  Detect VMware guest and set the TSC frequency as reported by the hypervisor.
  VMware products virtualize TSC and it run at fixed frequency in so-called
  "apparent time".  Although virtualized i8254 also runs in apparent time, TSC
  calibration always gives slightly off frequency because of the complicated
  timer emulation and lost-tick correction mechanism.

Modified:
  head/sys/x86/x86/tsc.c

Modified: head/sys/x86/x86/tsc.c
==============================================================================
--- head/sys/x86/x86/tsc.c	Fri Apr 29 18:17:01 2011	(r221213)
+++ head/sys/x86/x86/tsc.c	Fri Apr 29 18:20:12 2011	(r221214)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -90,6 +91,87 @@ static struct timecounter tsc_timecounte
 	800,			/* quality (adjusted in code) */
 };
 
+#define	VMW_HVMAGIC		0x564d5868
+#define	VMW_HVPORT		0x5658
+#define	VMW_HVCMD_GETVERSION	10
+#define	VMW_HVCMD_GETHZ		45
+
+static __inline void
+vmware_hvcall(u_int cmd, u_int *p)
+{
+
+	__asm __volatile("inl (%%dx)"
+	: "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
+	: "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT)
+	: "memory");
+}
+
+static int
+tsc_freq_vmware(void)
+{
+	char hv_sig[13];
+	u_int regs[4];
+	char *p;
+	u_int hv_high;
+	int i;
+
+	/*
+	 * [RFC] CPUID usage for interaction between Hypervisors and Linux.
+	 * http://lkml.org/lkml/2008/10/1/246
+	 *
+	 * KB1009458: Mechanisms to determine if software is running in
+	 * a VMware virtual machine
+	 * http://kb.vmware.com/kb/1009458
+	 */
+	hv_high = 0;
+	if ((cpu_feature2 & CPUID2_HV) != 0) {
+		do_cpuid(0x40000000, regs);
+		hv_high = regs[0];
+		for (i = 1, p = hv_sig; i < 4; i++, p += sizeof(regs) / 4)
+			memcpy(p, ®s[i], sizeof(regs[i]));
+		*p = '\0';
+		if (bootverbose) {
+			/*
+			 * HV vendor	ID string
+			 * ------------+--------------
+			 * KVM		"KVMKVMKVM"
+			 * Microsoft	"Microsoft Hv"
+			 * VMware	"VMwareVMware"
+			 * Xen		"XenVMMXenVMM"
+			 */
+			printf("Hypervisor: Origin = \"%s\"\n", hv_sig);
+		}
+		if (strncmp(hv_sig, "VMwareVMware", 12) != 0)
+			return (0);
+	} else {
+		p = getenv("smbios.system.serial");
+		if (p == NULL)
+			return (0);
+		if (strncmp(p, "VMware-", 7) != 0 &&
+		    strncmp(p, "VMW", 3) != 0) {
+			freeenv(p);
+			return (0);
+		}
+		freeenv(p);
+		vmware_hvcall(VMW_HVCMD_GETVERSION, regs);
+		if (regs[1] != VMW_HVMAGIC)
+			return (0);
+	}
+	if (hv_high >= 0x40000010) {
+		do_cpuid(0x40000010, regs);
+		tsc_freq = regs[0] * 1000;
+	} else {
+		vmware_hvcall(VMW_HVCMD_GETHZ, regs);
+		if (regs[1] != UINT_MAX)
+			tsc_freq = regs[0] | ((uint64_t)regs[1] << 32);
+	}
+	tsc_is_invariant = 1;
+#ifdef SMP
+	smp_tsc = 1;	/* XXX */
+#endif
+	return (1);
+}
+
 static void
 tsc_freq_intel(void)
 {
@@ -102,7 +184,6 @@ tsc_freq_intel(void)
 	/*
 	 * Intel Processor Identification and the CPUID Instruction
 	 * Application Note 485.
-	 *
 	 * http://www.intel.com/assets/pdf/appnote/241618.pdf
 	 */
 	if (cpu_exthigh >= 0x80000004) {
@@ -156,6 +237,25 @@ probe_tsc_freq(void)
 	u_int regs[4];
 	uint64_t tsc1, tsc2;
 
+	if (cpu_high >= 6) {
+		do_cpuid(6, regs);
+		if ((regs[2] & CPUID_PERF_STAT) != 0) {
+			/*
+			 * XXX Some emulators expose host CPUID without actual
+			 * support for these MSRs.  We must test whether they
+			 * really work.
+			 */
+			wrmsr(MSR_MPERF, 0);
+			wrmsr(MSR_APERF, 0);
+			DELAY(10);
+			if (rdmsr(MSR_MPERF) > 0 && rdmsr(MSR_APERF) > 0)
+				tsc_perf_stat = 1;
+		}
+	}
+
+	if (tsc_freq_vmware())
+		return;
+
 	switch (cpu_vendor_id) {
 	case CPU_VENDOR_AMD:
 		if ((amd_pminfo & AMDPM_TSC_INVARIANT) != 0 ||
@@ -181,22 +281,6 @@ probe_tsc_freq(void)
 		break;
 	}
 
-	if (cpu_high >= 6) {
-		do_cpuid(6, regs);
-		if ((regs[2] & CPUID_PERF_STAT) != 0) {
-			/*
-			 * XXX Some emulators expose host CPUID without actual
-			 * support for these MSRs.  We must test whether they
-			 * really work.
-			 */
-			wrmsr(MSR_MPERF, 0);
-			wrmsr(MSR_APERF, 0);
-			DELAY(10);
-			if (rdmsr(MSR_MPERF) > 0 && rdmsr(MSR_APERF) > 0)
-				tsc_perf_stat = 1;
-		}
-	}
-
 	if (tsc_skip_calibration) {
 		if (cpu_vendor_id == CPU_VENDOR_INTEL)
 			tsc_freq_intel();

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:26: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 CA497106566B;
	Fri, 29 Apr 2011 18:26:17 +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 A13F88FC0A;
	Fri, 29 Apr 2011 18:26: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 p3TIQH7G010111;
	Fri, 29 Apr 2011 18:26:17 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIQHFt010109;
	Fri, 29 Apr 2011 18:26:17 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291826.p3TIQHFt010109@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 18:26: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: r221215 - 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: Fri, 29 Apr 2011 18:26:17 -0000

Author: jhb
Date: Fri Apr 29 18:26:17 2011
New Revision: 221215
URL: http://svn.freebsd.org/changeset/base/221215

Log:
  Add the AH_SUPPORT_AR9130 option.

Modified:
  head/sys/conf/options

Modified: head/sys/conf/options
==============================================================================
--- head/sys/conf/options	Fri Apr 29 18:20:12 2011	(r221214)
+++ head/sys/conf/options	Fri Apr 29 18:26:17 2011	(r221215)
@@ -775,6 +775,7 @@ ATH_ENABLE_11N		opt_ah.h
 
 # options for the Atheros hal
 AH_SUPPORT_AR5416	opt_ah.h
+AH_SUPPORT_AR9130	opt_ah.h
 
 AH_DEBUG		opt_ah.h
 AH_ASSERT		opt_ah.h

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:27: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 C0F14106564A;
	Fri, 29 Apr 2011 18:27:50 +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 7A8778FC15;
	Fri, 29 Apr 2011 18:27: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 p3TIRo2l010188;
	Fri, 29 Apr 2011 18:27:50 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIRoqa010186;
	Fri, 29 Apr 2011 18:27:50 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291827.p3TIRoqa010186@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 18:27: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: r221216 - 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: Fri, 29 Apr 2011 18:27:50 -0000

Author: jhb
Date: Fri Apr 29 18:27:50 2011
New Revision: 221216
URL: http://svn.freebsd.org/changeset/base/221216

Log:
  Add the mipsn32eb TARGET_ARCH to the list of mips targets for the
  XLRN32 kernel config.
  
  Reviewed by:	imp, jmallet

Modified:
  head/Makefile

Modified: head/Makefile
==============================================================================
--- head/Makefile	Fri Apr 29 18:26:17 2011	(r221215)
+++ head/Makefile	Fri Apr 29 18:27:50 2011	(r221216)
@@ -325,7 +325,7 @@ toolchains:
 .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets)
 TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
 TARGET_ARCHES_arm?=	arm armeb
-TARGET_ARCHES_mips?=	mipsel mipseb mips64el mips64eb
+TARGET_ARCHES_mips?=	mipsel mipseb mips64el mips64eb mipsn32eb
 TARGET_ARCHES_powerpc?=	powerpc powerpc64
 TARGET_ARCHES_pc98?=	i386
 TARGET_ARCHES_sun4v?=	sparc64

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:30: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 80C14106564A;
	Fri, 29 Apr 2011 18:30:54 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6EB1F8FC13;
	Fri, 29 Apr 2011 18:30: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 p3TIUsTj010340;
	Fri, 29 Apr 2011 18:30:54 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIUst7010329;
	Fri, 29 Apr 2011 18:30:54 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104291830.p3TIUst7010329@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 18:30:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221217 - in stable/8/sys/fs: nfs nfsclient nfsserver
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 18:30:54 -0000

Author: rmacklem
Date: Fri Apr 29 18:30:53 2011
New Revision: 221217
URL: http://svn.freebsd.org/changeset/base/221217

Log:
  MFC: r220648
  Fix the experimental NFSv4 server so that it uses VOP_PATHCONF()
  to determine if a file system supports NFSv4 ACLs. Since
  VOP_PATHCONF() must be called with a locked vnode, the function
  is called before nfsvno_fillattr() and the result is passed in
  as an extra argument.

Modified:
  stable/8/sys/fs/nfs/nfs_commonacl.c
  stable/8/sys/fs/nfs/nfs_commonport.c
  stable/8/sys/fs/nfs/nfs_commonsubs.c
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfs/nfsport.h
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
  stable/8/sys/fs/nfsclient/nfs_clstate.c
  stable/8/sys/fs/nfsserver/nfs_nfsdport.c
  stable/8/sys/fs/nfsserver/nfs_nfsdserv.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/fs/nfs/nfs_commonacl.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonacl.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfs/nfs_commonacl.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -445,7 +445,7 @@ nfsrv_setacl(vnode_t vp, NFSACL_T *aclp,
 {
 	int error;
 
-	if (nfsrv_useacl == 0 || !NFSHASNFS4ACL(vnode_mount(vp)))
+	if (nfsrv_useacl == 0 || nfs_supportsnfsv4acls(vp) == 0)
 		return (NFSERR_ATTRNOTSUPP);
 	/*
 	 * With NFSv4 ACLs, chmod(2) may need to add additional entries.

Modified: stable/8/sys/fs/nfs/nfs_commonport.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonport.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfs/nfs_commonport.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -437,18 +437,18 @@ newnfs_portinit(void)
  * Return 1 if it does, 0 otherwise.
  */
 int
-nfs_supportsnfsv4acls(struct mount *mp)
+nfs_supportsnfsv4acls(struct vnode *vp)
 {
+	int error;
+	register_t retval;
 
-	if (mp->mnt_stat.f_fstypename == NULL)
-		return (0);
-	if (strcmp(mp->mnt_stat.f_fstypename, "ufs") == 0) {
-		/* Not yet */
+	ASSERT_VOP_LOCKED(vp, "nfs supports nfsv4acls");
+
+	if (nfsrv_useacl == 0)
 		return (0);
-	} else if (strcmp(mp->mnt_stat.f_fstypename, "zfs") == 0) {
-		/* Always supports them */
+	error = VOP_PATHCONF(vp, _PC_ACL_NFS4, &retval);
+	if (error == 0 && retval != 0)
 		return (1);
-	}
 	return (0);
 }
 

Modified: stable/8/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfs/nfs_commonsubs.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -1919,7 +1919,7 @@ APPLESTATIC int
 nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
     NFSACL_T *saclp, struct vattr *vap, fhandle_t *fhp, int rderror,
     nfsattrbit_t *attrbitp, struct ucred *cred, NFSPROC_T *p, int isdgram,
-    int reterr, int at_root, uint64_t mounted_on_fileno)
+    int reterr, int supports_nfsv4acls, int at_root, uint64_t mounted_on_fileno)
 {
 	int bitpos, retnum = 0;
 	u_int32_t *tl;
@@ -1974,12 +1974,12 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 	 */
 	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT) &&
 	    (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
-		!NFSHASNFS4ACL(mp)))) {
+		supports_nfsv4acls == 0))) {
 		NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACLSUPPORT);
 	}
 	if (NFSISSET_ATTRBIT(retbitp, NFSATTRBIT_ACL)) {
 		if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL) &&
-		    !NFSHASNFS4ACL(mp))) {
+		    supports_nfsv4acls == 0)) {
 			NFSCLRBIT_ATTRBIT(retbitp, NFSATTRBIT_ACL);
 		} else if (naclp != NULL) {
 			if (vn_lock(vp, LK_SHARED) == 0) {
@@ -2016,7 +2016,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd
 		case NFSATTRBIT_SUPPORTEDATTRS:
 			NFSSETSUPP_ATTRBIT(&attrbits);
 			if (nfsrv_useacl == 0 || ((cred != NULL || p != NULL)
-			    && !NFSHASNFS4ACL(mp))) {
+			    && supports_nfsv4acls == 0)) {
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACLSUPPORT);
 			    NFSCLRBIT_ATTRBIT(&attrbits,NFSATTRBIT_ACL);
 			}

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfs/nfs_var.h	Fri Apr 29 18:30:53 2011	(r221217)
@@ -290,7 +290,7 @@ void nfsrv_wcc(struct nfsrv_descript *, 
     struct nfsvattr *);
 int nfsv4_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, NFSACL_T *,
     struct vattr *, fhandle_t *, int, nfsattrbit_t *,
-    struct ucred *, NFSPROC_T *, int, int, int, uint64_t);
+    struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t);
 void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *);
 void nfsrv_adj(mbuf_t, int, int);
 void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *);
@@ -328,6 +328,7 @@ int nfs_catnap(int, int, const char *);
 struct nfsreferral *nfsv4root_getreferral(vnode_t, vnode_t, u_int32_t);
 int nfsrv_atroot(vnode_t, long *);
 void newnfs_timer(void *);
+int nfs_supportsnfsv4acls(vnode_t);
 
 /* nfs_commonacl.c */
 int nfsrv_dissectace(struct nfsrv_descript *, struct acl_entry *,
@@ -558,7 +559,7 @@ void nfsvno_updfilerev(vnode_t, struct n
     NFSPROC_T *);
 int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t,
     struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *,
-    struct ucred *, NFSPROC_T *, int, int, int, uint64_t);
+    struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t);
 int nfsrv_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *,
     NFSACL_T *, NFSPROC_T *);
 int nfsv4_sattr(struct nfsrv_descript *, struct nfsvattr *, nfsattrbit_t *,

Modified: stable/8/sys/fs/nfs/nfsport.h
==============================================================================
--- stable/8/sys/fs/nfs/nfsport.h	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfs/nfsport.h	Fri Apr 29 18:30:53 2011	(r221217)
@@ -778,12 +778,6 @@ void newnfs_realign(struct mbuf **);
 #define	NFSHASPRIVACY(n)	((n)->nm_flag & NFSMNT_PRIVACY)
 #define	NFSSETWRITEVERF(n)	((n)->nm_state |= NFSSTA_HASWRITEVERF)
 #define	NFSSETHASSETFSID(n)	((n)->nm_state |= NFSSTA_HASSETFSID)
-#ifdef NFS4_ACL_EXTATTR_NAME
-#define	NFSHASNFS4ACL(m)	nfs_supportsnfsv4acls(m)
-int nfs_supportsnfsv4acls(struct mount *);
-#else
-#define	NFSHASNFS4ACL(m)	0
-#endif
 
 /*
  * Gets the stats field out of the mount structure.

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -804,7 +804,7 @@ nfscl_fillsattr(struct nfsrv_descript *n
 		if (vap->va_mtime.tv_sec != VNOVAL)
 			NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMEMODIFYSET);
 		(void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0,
-		    &attrbits, NULL, NULL, 0, 0, 0, (uint64_t)0);
+		    &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0);
 		break;
 	};
 }

Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -4177,7 +4177,7 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucre
 	NFSZERO_ATTRBIT(&attrbits);
 	NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL);
 	(void) nfsv4_fillattr(nd, vnode_mount(vp), vp, aclp, NULL, NULL, 0,
-	    &attrbits, NULL, NULL, 0, 0, 0, (uint64_t)0);
+	    &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0);
 	error = nfscl_request(nd, vp, p, cred, stuff);
 	if (error)
 		return (error);

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -3062,7 +3062,7 @@ nfscl_docb(struct nfsrv_descript *nd, NF
 					    NFSATTRBIT_CHANGE);
 				}
 				(void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va,
-				    NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0,
+				    NULL, 0, &rattrbits, NULL, NULL, 0, 0, 0, 0,
 				    (uint64_t)0);
 				if (!ret)
 					vrele(vp);

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -1393,13 +1393,14 @@ nfsvno_updfilerev(struct vnode *vp, stru
 int
 nfsvno_fillattr(struct nfsrv_descript *nd, struct mount *mp, struct vnode *vp,
     struct nfsvattr *nvap, fhandle_t *fhp, int rderror, nfsattrbit_t *attrbitp,
-    struct ucred *cred, struct thread *p, int isdgram, int reterr, int at_root,
-    uint64_t mounted_on_fileno)
+    struct ucred *cred, struct thread *p, int isdgram, int reterr,
+    int supports_nfsv4acls, int at_root, uint64_t mounted_on_fileno)
 {
 	int error;
 
 	error = nfsv4_fillattr(nd, mp, vp, NULL, &nvap->na_vattr, fhp, rderror,
-	    attrbitp, cred, p, isdgram, reterr, at_root, mounted_on_fileno);
+	    attrbitp, cred, p, isdgram, reterr, supports_nfsv4acls, at_root,
+	    mounted_on_fileno);
 	return (error);
 }
 
@@ -1689,7 +1690,7 @@ nfsrvd_readdirplus(struct nfsrv_descript
 	struct uio io;
 	struct iovec iv;
 	struct componentname cn;
-	int at_root, needs_unbusy, not_zfs;
+	int at_root, needs_unbusy, not_zfs, supports_nfsv4acls;
 	struct mount *mp, *new_mp;
 	uint64_t mounted_on_fileno;
 
@@ -2058,8 +2059,12 @@ again:
 				*tl++ = 0;
 				*tl = txdr_unsigned(*cookiep);
 				dirlen += nfsm_strtom(nd, dp->d_name, nlen);
-				if (nvp != NULL)
+				if (nvp != NULL) {
+					supports_nfsv4acls =
+					    nfs_supportsnfsv4acls(nvp);
 					VOP_UNLOCK(nvp, 0);
+				} else
+					supports_nfsv4acls = 0;
 				if (refp != NULL) {
 					dirlen += nfsrv_putreferralattr(nd,
 					    &savbits, refp, 0,
@@ -2074,12 +2079,14 @@ again:
 				} else if (r) {
 					dirlen += nfsvno_fillattr(nd, new_mp,
 					    nvp, nvap, &nfh, r, &rderrbits,
-					    nd->nd_cred, p, isdgram, 0, at_root,
+					    nd->nd_cred, p, isdgram, 0,
+					    supports_nfsv4acls, at_root,
 					    mounted_on_fileno);
 				} else {
 					dirlen += nfsvno_fillattr(nd, new_mp,
 					    nvp, nvap, &nfh, r, &attrbits,
-					    nd->nd_cred, p, isdgram, 0, at_root,
+					    nd->nd_cred, p, isdgram, 0,
+					    supports_nfsv4acls, at_root,
 					    mounted_on_fileno);
 				}
 				if (nvp != NULL)

Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 29 18:27:50 2011	(r221216)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Apr 29 18:30:53 2011	(r221217)
@@ -170,7 +170,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd
 {
 	struct nfsvattr nva;
 	fhandle_t fh;
-	int at_root = 0, error = 0;
+	int at_root = 0, error = 0, supports_nfsv4acls;
 	struct nfsreferral *refp;
 	nfsattrbit_t attrbits;
 	struct mount *mp;
@@ -213,6 +213,7 @@ nfsrvd_getattr(struct nfsrv_descript *nd
 				nd->nd_repstat = nfsrv_checkgetattr(nd, vp,
 				    &nva, &attrbits, nd->nd_cred, p);
 			if (nd->nd_repstat == 0) {
+				supports_nfsv4acls = nfs_supportsnfsv4acls(vp);
 				mp = vp->v_mount;
 				if (nfsrv_enable_crossmntpt != 0 &&
 				    vp->v_type == VDIR &&
@@ -245,8 +246,8 @@ nfsrvd_getattr(struct nfsrv_descript *nd
 				if (nd->nd_repstat == 0) {
 					(void)nfsvno_fillattr(nd, mp, vp, &nva,
 					    &fh, 0, &attrbits, nd->nd_cred, p,
-					    isdgram, 1, at_root,
-					    mounted_on_fileno);
+					    isdgram, 1, supports_nfsv4acls,
+					    at_root, mounted_on_fileno);
 					vfs_unbusy(mp);
 				}
 				vrele(vp);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:41: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 79A0A1065785;
	Fri, 29 Apr 2011 18:41:21 +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 694F58FC12;
	Fri, 29 Apr 2011 18:41: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 p3TIfLtI010704;
	Fri, 29 Apr 2011 18:41:21 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TIfLTn010695;
	Fri, 29 Apr 2011 18:41:21 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104291841.p3TIfLTn010695@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 18:41: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: r221218 - in head/sys: arm/arm dev/fdt ia64/ia64 kern
	mips/mips mips/rmi x86/x86
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 18:41:21 -0000

Author: jhb
Date: Fri Apr 29 18:41:21 2011
New Revision: 221218
URL: http://svn.freebsd.org/changeset/base/221218

Log:
  Change rman_manage_region() to actually honor the rm_start and rm_end
  constraints on the rman and reject attempts to manage a region that is out
  of range.
  - Fix various places that set rm_end incorrectly (to ~0 or ~0u instead of
    ~0ul).
  - To preserve existing behavior, change rman_init() to set rm_start and
    rm_end to allow managing the full range (0 to ~0ul) if they are not set by
    the caller when rman_init() is called.

Modified:
  head/sys/arm/arm/nexus.c
  head/sys/dev/fdt/fdtbus.c
  head/sys/ia64/ia64/nexus.c
  head/sys/kern/subr_rman.c
  head/sys/mips/mips/mainbus.c
  head/sys/mips/mips/nexus.c
  head/sys/mips/rmi/xlr_pci.c
  head/sys/x86/x86/nexus.c

Modified: head/sys/arm/arm/nexus.c
==============================================================================
--- head/sys/arm/arm/nexus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/arm/arm/nexus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -138,10 +138,10 @@ nexus_attach(device_t dev)
 {
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory addresses";
-	if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0u))
+	if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))
 		panic("nexus_probe mem_rman");
 
 	/*

Modified: head/sys/dev/fdt/fdtbus.c
==============================================================================
--- head/sys/dev/fdt/fdtbus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/dev/fdt/fdtbus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -206,7 +206,7 @@ fdtbus_attach(device_t dev)
 	 * Mem-mapped I/O space rman.
 	 */
 	start = 0;
-	end = ~0u;
+	end = ~0ul;
 	sc->sc_mem.rm_start = start;
 	sc->sc_mem.rm_end = end;
 	sc->sc_mem.rm_type = RMAN_ARRAY;

Modified: head/sys/ia64/ia64/nexus.c
==============================================================================
--- head/sys/ia64/ia64/nexus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/ia64/ia64/nexus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -174,7 +174,7 @@ nexus_probe(device_t dev)
 		panic("nexus_probe port_rman");
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory addresses";
 	if (rman_init(&mem_rman)

Modified: head/sys/kern/subr_rman.c
==============================================================================
--- head/sys/kern/subr_rman.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/kern/subr_rman.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -138,6 +138,8 @@ rman_init(struct rman *rm)
 		mtx_init(&rman_mtx, "rman head", NULL, MTX_DEF);
 	}
 
+	if (rm->rm_start == 0 && rm->rm_end == 0)
+		rm->rm_end = ~0ul;
 	if (rm->rm_type == RMAN_UNINIT)
 		panic("rman_init");
 	if (rm->rm_type == RMAN_GAUGE)
@@ -162,6 +164,8 @@ rman_manage_region(struct rman *rm, u_lo
 
 	DPRINTF(("rman_manage_region: <%s> request: start %#lx, end %#lx\n",
 	    rm->rm_descr, start, end));
+	if (start < rm->rm_start || end > rm->rm_end)
+		return EINVAL;
 	r = int_alloc_resource(M_NOWAIT);
 	if (r == NULL)
 		return ENOMEM;

Modified: head/sys/mips/mips/mainbus.c
==============================================================================
--- head/sys/mips/mips/mainbus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/mips/mips/mainbus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -146,7 +146,7 @@ mainbus_probe(device_t dev)
 		panic("mainbus_probe port_rman");
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory addresses";
 	if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))

Modified: head/sys/mips/mips/nexus.c
==============================================================================
--- head/sys/mips/mips/nexus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/mips/mips/nexus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -151,7 +151,7 @@ nexus_probe(device_t dev)
 	}
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "Memory addresses";
 	if (rman_init(&mem_rman) != 0 ||

Modified: head/sys/mips/rmi/xlr_pci.c
==============================================================================
--- head/sys/mips/rmi/xlr_pci.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/mips/rmi/xlr_pci.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -126,7 +126,7 @@ xlr_pci_init_resources(void)
 		panic("pci_init_resources irq_rman");
 
 	port_rman.rm_start = 0;
-	port_rman.rm_end = ~0u;
+	port_rman.rm_end = ~0ul;
 	port_rman.rm_type = RMAN_ARRAY;
 	port_rman.rm_descr = "I/O ports";
 	if (rman_init(&port_rman)
@@ -134,7 +134,7 @@ xlr_pci_init_resources(void)
 		panic("pci_init_resources port_rman");
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory";
 	if (rman_init(&mem_rman)

Modified: head/sys/x86/x86/nexus.c
==============================================================================
--- head/sys/x86/x86/nexus.c	Fri Apr 29 18:30:53 2011	(r221217)
+++ head/sys/x86/x86/nexus.c	Fri Apr 29 18:41:21 2011	(r221218)
@@ -256,7 +256,7 @@ nexus_init_resources(void)
 		panic("nexus_init_resources port_rman");
 
 	mem_rman.rm_start = 0;
-	mem_rman.rm_end = ~0u;
+	mem_rman.rm_end = ~0ul;
 	mem_rman.rm_type = RMAN_ARRAY;
 	mem_rman.rm_descr = "I/O memory addresses";
 	if (rman_init(&mem_rman)

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 18:49: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 334EC106566C;
	Fri, 29 Apr 2011 18:49:37 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 183698FC18;
	Fri, 29 Apr 2011 18:49: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 p3TIna2U010973;
	Fri, 29 Apr 2011 18:49:36 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TInajJ010967;
	Fri, 29 Apr 2011 18:49:36 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104291849.p3TInajJ010967@svn.freebsd.org>
From: Rick Macklem 
Date: Fri, 29 Apr 2011 18:49: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: r221219 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 18:49:37 -0000

Author: rmacklem
Date: Fri Apr 29 18:49:36 2011
New Revision: 221219
URL: http://svn.freebsd.org/changeset/base/221219

Log:
  MFC: r220683
  Change the experimental NFS client so that it creates nfsiod
  threads in the same manner as the regular NFS client after
  r214026 was committed. This resolves the lors fixed by r214026
  and its predecessors for the regular client.

Modified:
  stable/8/sys/fs/nfs/nfs.h
  stable/8/sys/fs/nfsclient/nfs.h
  stable/8/sys/fs/nfsclient/nfs_clbio.c
  stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
  stable/8/sys/fs/nfsclient/nfs_clsubs.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/fs/nfs/nfs.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs.h	Fri Apr 29 18:41:21 2011	(r221218)
+++ stable/8/sys/fs/nfs/nfs.h	Fri Apr 29 18:49:36 2011	(r221219)
@@ -70,8 +70,9 @@
 #define	NFS_WSIZE	8192		/* Def. write data size <= 8192 */
 #define	NFS_RSIZE	8192		/* Def. read data size <= 8192 */
 #define	NFS_READDIRSIZE	8192		/* Def. readdir size */
-#define	NFS_DEFRAHEAD	0		/* Def. read ahead # blocks */
-#define	NFS_MAXRAHEAD	32		/* Max. read ahead # blocks */
+#define	NFS_DEFRAHEAD	1		/* Def. read ahead # blocks */
+#define	NFS_MAXRAHEAD	16		/* Max. read ahead # blocks */
+#define	NFS_MAXASYNCDAEMON 	64	/* Max. number async_daemons runnable */
 #define	NFS_MAXUIDHASH	64		/* Max. # of hashed uid entries/mp */
 #ifndef	NFSRV_LEASE
 #define	NFSRV_LEASE		120	/* Lease time in seconds for V4 */

Modified: stable/8/sys/fs/nfsclient/nfs.h
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs.h	Fri Apr 29 18:41:21 2011	(r221218)
+++ stable/8/sys/fs/nfsclient/nfs.h	Fri Apr 29 18:49:36 2011	(r221219)
@@ -102,7 +102,8 @@ int ncl_fsinfo(struct nfsmount *, struct
 int ncl_init(struct vfsconf *);
 int ncl_uninit(struct vfsconf *);
 int ncl_mountroot(struct mount *);
-int ncl_nfsiodnew(int);
+void	ncl_nfsiodnew(void);
+void	ncl_nfsiodnew_tq(__unused void *, int);
 
 #endif	/* _KERNEL */
 

Modified: stable/8/sys/fs/nfsclient/nfs_clbio.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clbio.c	Fri Apr 29 18:41:21 2011	(r221218)
+++ stable/8/sys/fs/nfsclient/nfs_clbio.c	Fri Apr 29 18:49:36 2011	(r221219)
@@ -63,8 +63,8 @@ extern int newnfs_directio_allow_mmap;
 extern struct nfsstats newnfsstats;
 extern struct mtx ncl_iod_mutex;
 extern int ncl_numasync;
-extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
-extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
+extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON];
+extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON];
 extern int newnfs_directio_enable;
 
 int ncl_pbuf_freecnt = -1;	/* start out unlimited */
@@ -1359,15 +1359,6 @@ ncl_asyncio(struct nfsmount *nmp, struct
 	int error, error2;
 
 	/*
-	 * Unless iothreadcnt is set > 0, don't bother with async I/O
-	 * threads. For LAN environments, they don't buy any significant
-	 * performance improvement that you can't get with large block
-	 * sizes.
-	 */
-	if (nmp->nm_readahead == 0)
-		return (EPERM);
-
-	/*
 	 * Commits are usually short and sweet so lets save some cpu and
 	 * leave the async daemons for more important rpc's (such as reads
 	 * and writes).
@@ -1395,13 +1386,9 @@ again:
 	/*
 	 * Try to create one if none are free.
 	 */
-	if (!gotiod) {
-		iod = ncl_nfsiodnew(1);
-		if (iod != -1)
-			gotiod = TRUE;
-	}
-
-	if (gotiod) {
+	if (!gotiod)
+		ncl_nfsiodnew();
+	else {
 		/*
 		 * Found one, so wake it up and tell it which
 		 * mount to process.
@@ -1458,11 +1445,7 @@ again:
 			 * We might have lost our iod while sleeping,
 			 * so check and loop if nescessary.
 			 */
-			if (nmp->nm_bufqiods == 0) {
-				NFS_DPF(ASYNCIO,
-					("ncl_asyncio: no iods after mount %p queue was drained, looping\n", nmp));
-				goto again;
-			}
+			goto again;
 		}
 
 		/* We might have lost our nfsiod */

Modified: stable/8/sys/fs/nfsclient/nfs_clnfsiod.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Fri Apr 29 18:41:21 2011	(r221218)
+++ stable/8/sys/fs/nfsclient/nfs_clnfsiod.c	Fri Apr 29 18:49:36 2011	(r221219)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -68,28 +69,32 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-extern struct mtx ncl_iod_mutex;
+extern struct mtx	ncl_iod_mutex;
+extern struct task	ncl_nfsiodnew_task;
 
 int ncl_numasync;
-enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
-struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
+enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON];
+struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON];
 
 static void	nfssvc_iod(void *);
 
-static int nfs_asyncdaemon[NFS_MAXRAHEAD];
+static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
 
 SYSCTL_DECL(_vfs_newnfs);
 
 /* Maximum number of seconds a nfsiod kthread will sleep before exiting */
-static unsigned int ncl_iodmaxidle = 120;
-SYSCTL_UINT(_vfs_newnfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &ncl_iodmaxidle, 0, "");
+static unsigned int nfs_iodmaxidle = 120;
+SYSCTL_UINT(_vfs_newnfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0,
+    "Max number of seconds an nfsiod kthread will sleep before exiting");
 
 /* Maximum number of nfsiod kthreads */
-unsigned int ncl_iodmax = NFS_MAXRAHEAD;
+unsigned int ncl_iodmax = 20;
 
 /* Minimum number of nfsiod kthreads to keep as spares */
 static unsigned int nfs_iodmin = 0;
 
+static int nfs_nfsiodnew_sync(void);
+
 static int
 sysctl_iodmin(SYSCTL_HANDLER_ARGS)
 {
@@ -113,14 +118,14 @@ sysctl_iodmin(SYSCTL_HANDLER_ARGS)
 	 * than the new minimum, create some more.
 	 */
 	for (i = nfs_iodmin - ncl_numasync; i > 0; i--)
-		ncl_nfsiodnew(0);
+		nfs_nfsiodnew_sync();
 out:
 	mtx_unlock(&ncl_iod_mutex);	
 	return (0);
 }
 SYSCTL_PROC(_vfs_newnfs, OID_AUTO, iodmin, CTLTYPE_UINT | CTLFLAG_RW, 0,
-    sizeof (nfs_iodmin), sysctl_iodmin, "IU", "");
-
+    sizeof (nfs_iodmin), sysctl_iodmin, "IU",
+    "Min number of nfsiod kthreads to keep as spares");
 
 static int
 sysctl_iodmax(SYSCTL_HANDLER_ARGS)
@@ -132,7 +137,7 @@ sysctl_iodmax(SYSCTL_HANDLER_ARGS)
 	error = sysctl_handle_int(oidp, &newmax, 0, req);
 	if (error || (req->newptr == NULL))
 		return (error);
-	if (newmax > NFS_MAXRAHEAD)
+	if (newmax > NFS_MAXASYNCDAEMON)
 		return (EINVAL);
 	mtx_lock(&ncl_iod_mutex);
 	ncl_iodmax = newmax;
@@ -155,64 +160,79 @@ out:
 	return (0);
 }
 SYSCTL_PROC(_vfs_newnfs, OID_AUTO, iodmax, CTLTYPE_UINT | CTLFLAG_RW, 0,
-    sizeof (ncl_iodmax), sysctl_iodmax, "IU", "");
+    sizeof (ncl_iodmax), sysctl_iodmax, "IU",
+    "Max number of nfsiod kthreads");
 
-int
-ncl_nfsiodnew(int set_iodwant)
+static int
+nfs_nfsiodnew_sync(void)
 {
 	int error, i;
-	int newiod;
 
-	if (ncl_numasync >= ncl_iodmax)
-		return (-1);
-	newiod = -1;
-	for (i = 0; i < ncl_iodmax; i++)
+	mtx_assert(&ncl_iod_mutex, MA_OWNED);
+	for (i = 0; i < ncl_iodmax; i++) {
 		if (nfs_asyncdaemon[i] == 0) {
-			nfs_asyncdaemon[i]++;
-			newiod = i;
+			nfs_asyncdaemon[i] = 1;
 			break;
 		}
-	if (newiod == -1)
-		return (-1);
-	if (set_iodwant > 0)
-		ncl_iodwant[i] = NFSIOD_CREATED_FOR_NFS_ASYNCIO;
+	}
+	if (i == ncl_iodmax)
+		return (0);
 	mtx_unlock(&ncl_iod_mutex);
-	error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL, RFHIGHPID,
-	    0, "nfsiod %d", newiod);
+	error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL,
+	    RFHIGHPID, 0, "newnfs %d", i);
+	mtx_lock(&ncl_iod_mutex);
+	if (error == 0) {
+		ncl_numasync++;
+		ncl_iodwant[i] = NFSIOD_AVAILABLE;
+	} else
+		nfs_asyncdaemon[i] = 0;
+	return (error);
+}
+
+void
+ncl_nfsiodnew_tq(__unused void *arg, int pending)
+{
+
 	mtx_lock(&ncl_iod_mutex);
-	if (error) {
-		if (set_iodwant > 0)
-			ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
-		return (-1);
+	while (pending > 0) {
+		pending--;
+		nfs_nfsiodnew_sync();
 	}
-	ncl_numasync++;
-	return (newiod);
+	mtx_unlock(&ncl_iod_mutex);
+}
+
+void
+ncl_nfsiodnew(void)
+{
+
+	mtx_assert(&ncl_iod_mutex, MA_OWNED);
+	taskqueue_enqueue(taskqueue_thread, &ncl_nfsiodnew_task);
 }
 
 static void
 nfsiod_setup(void *dummy)
 {
-	int i;
 	int error;
 
 	TUNABLE_INT_FETCH("vfs.newnfs.iodmin", &nfs_iodmin);
 	nfscl_init();
 	mtx_lock(&ncl_iod_mutex);
 	/* Silently limit the start number of nfsiod's */
-	if (nfs_iodmin > NFS_MAXRAHEAD)
-		nfs_iodmin = NFS_MAXRAHEAD;
+	if (nfs_iodmin > NFS_MAXASYNCDAEMON)
+		nfs_iodmin = NFS_MAXASYNCDAEMON;
 
-	for (i = 0; i < nfs_iodmin; i++) {
-		error = ncl_nfsiodnew(0);
+	while (ncl_numasync < nfs_iodmin) {
+		error = nfs_nfsiodnew_sync();
 		if (error == -1)
-			panic("newnfsiod_setup: ncl_nfsiodnew failed");
+			panic("nfsiod_setup: nfs_nfsiodnew failed");
 	}
 	mtx_unlock(&ncl_iod_mutex);
 }
 SYSINIT(newnfsiod, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, nfsiod_setup, NULL);
 
 static int nfs_defect = 0;
-SYSCTL_INT(_vfs_newnfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0, "");
+SYSCTL_INT(_vfs_newnfs, OID_AUTO, defect, CTLFLAG_RW, &nfs_defect, 0,
+    "Allow nfsiods to migrate serving different mounts");
 
 /*
  * Asynchronous I/O daemons for client nfs.
@@ -245,7 +265,7 @@ nfssvc_iod(void *instance)
 		/*
 		 * Always keep at least nfs_iodmin kthreads.
 		 */
-		timo = (myiod < nfs_iodmin) ? 0 : ncl_iodmaxidle * hz;
+		timo = (myiod < nfs_iodmin) ? 0 : nfs_iodmaxidle * hz;
 		error = msleep(&ncl_iodwant[myiod], &ncl_iod_mutex, PWAIT | PCATCH,
 		    "-", timo);
 		if (error) {
@@ -263,7 +283,6 @@ nfssvc_iod(void *instance)
 	    if (error)
 		    break;
 	    while ((bp = TAILQ_FIRST(&nmp->nm_bufq)) != NULL) {
-		    
 		/* Take one off the front of the list */
 		TAILQ_REMOVE(&nmp->nm_bufq, bp, b_freelist);
 		nmp->nm_bufqlen--;

Modified: stable/8/sys/fs/nfsclient/nfs_clsubs.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clsubs.c	Fri Apr 29 18:41:21 2011	(r221218)
+++ stable/8/sys/fs/nfsclient/nfs_clsubs.c	Fri Apr 29 18:49:36 2011	(r221219)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -77,12 +78,14 @@ __FBSDID("$FreeBSD$");
 #include 
 
 extern struct mtx ncl_iod_mutex;
-extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
-extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
+extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON];
+extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON];
 extern int ncl_numasync;
 extern unsigned int ncl_iodmax;
 extern struct nfsstats newnfsstats;
 
+struct task	ncl_nfsiodnew_task;
+
 int
 ncl_uninit(struct vfsconf *vfsp)
 {
@@ -393,10 +396,11 @@ ncl_init(struct vfsconf *vfsp)
 	int i;
 
 	/* Ensure async daemons disabled */
-	for (i = 0; i < NFS_MAXRAHEAD; i++) {
+	for (i = 0; i < NFS_MAXASYNCDAEMON; i++) {
 		ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
 		ncl_iodmount[i] = NULL;
 	}
+	TASK_INIT(&ncl_nfsiodnew_task, 0, ncl_nfsiodnew_tq, NULL);
 	ncl_nhinit();			/* Init the nfsnode table */
 
 	return (0);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 19:00: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 49657106564A
	for ; Fri, 29 Apr 2011 19:00:02 +0000 (UTC)
	(envelope-from markm@FreeBSD.org)
Received: from gromit.grondar.org (grandfather.grondar.org
	[IPv6:2a01:348:0:15:5d59:5c20:0:2])
	by mx1.freebsd.org (Postfix) with ESMTP id 08C598FC14
	for ; Fri, 29 Apr 2011 19:00:02 +0000 (UTC)
Received: from uucp by gromit.grondar.org with local-rmail (Exim 4.73
	(FreeBSD)) (envelope-from ) id 1QFs8m-000AEw-6t
	for svn-src-all@freebsd.org; Fri, 29 Apr 2011 19:10:08 +0100
Received: from localhost ([127.0.0.1] helo=groundzero.grondar.org)
	by groundzero.grondar.org with esmtp (Exim 4.75 (FreeBSD))
	(envelope-from )
	id 1QFs68-0003B2-1S; Fri, 29 Apr 2011 19:07:24 +0100
To: obrien@FreeBSD.org
In-reply-to: <20110426044507.GA8767@dragon.NUXI.org>
References: <201104091402.p39E24bm016157@svn.freebsd.org>
	<20110426044507.GA8767@dragon.NUXI.org>
From: Mark Murray 
Date: Fri, 29 Apr 2011 19:07:23 +0100
Message-Id: 
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r220497 - head/lib/libcrypt
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 19:00:02 -0000

"David O'Brien" writes:
> On Sat, Apr 09, 2011 at 02:02:04PM +0000, Mark Murray wrote:
> > Log:
> >   Add SHA256/512 ($5$ and $6$) to crypt(3). Used in linux-world, doesn't
> >   hurt us.
> 
> Would you mind if I committed this to be a more consistent with the
> existing naming?

Be my guest.

M
--
Mark R V Murray
Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open)
Pi: 132511160


From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 20:05: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 2FA50106566C;
	Fri, 29 Apr 2011 20:05:20 +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 155038FC13;
	Fri, 29 Apr 2011 20:05: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 p3TK5Kp1013278;
	Fri, 29 Apr 2011 20:05:20 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TK5Kd9013273;
	Fri, 29 Apr 2011 20:05:20 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104292005.p3TK5Kd9013273@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 20:05: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: r221220 - in head: share/man/man9 sys/kern 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: Fri, 29 Apr 2011 20:05:20 -0000

Author: jhb
Date: Fri Apr 29 20:05:19 2011
New Revision: 221220
URL: http://svn.freebsd.org/changeset/base/221220

Log:
  Extend the rman(9) API to support altering an existing resource.
  Specifically, these changes allow a resource to back a relocatable and
  resizable resource such as the I/O window decoders in PCI-PCI bridges.
  - rman_adjust_resource() can adjust the start and end address of an
    existing resource.  It only succeeds if the newly requested address
    space is already free.  It also supports shrinking a resource in
    which case the freed space will be marked unallocated in the rman.
  - rman_first_free_region() and rman_last_free_region() return the
    start and end addresses for the first or last unallocated region in
    an rman, respectively.  This can be used to determine by how much
    the resource backing an rman must be adjusted to accomodate an
    allocation request that does not fit into the existing rman.
  
  While here, document the rm_start and rm_end fields in struct rman,
  rman_is_region_manager(), the bound argument to
  rman_reserve_resource_bound(), and rman_init_from_resource().

Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/rman.9
  head/sys/kern/subr_rman.c
  head/sys/sys/rman.h

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Apr 29 18:49:36 2011	(r221219)
+++ head/share/man/man9/Makefile	Fri Apr 29 20:05:19 2011	(r221220)
@@ -967,9 +967,11 @@ MLINKS+=refcount.9 refcount_acquire.9 \
 MLINKS+=resource_int_value.9 resource_long_value.9 \
 	resource_int_value.9 resource_string_value.9
 MLINKS+=rman.9 rman_activate_resource.9 \
+	rman.9 rman_adjust_resource.9 \
 	rman.9 rman_await_resource.9 \
 	rman.9 rman_deactivate_resource.9 \
 	rman.9 rman_fini.9 \
+	rman.9 rman_first_free_region.9 \
 	rman.9 rman_get_bushandle.9 \
 	rman.9 rman_get_bustag.9 \
 	rman.9 rman_get_device.9 \
@@ -980,6 +982,9 @@ MLINKS+=rman.9 rman_activate_resource.9 
 	rman.9 rman_get_start.9 \
 	rman.9 rman_get_virtual.9 \
 	rman.9 rman_init.9 \
+	rman.9 rman_init_from_resource.9 \
+	rman.9 rman_is_region_manager.9 \
+	rman.9 rman_last_free_region.9 \
 	rman.9 rman_make_alignment_flags.9 \
 	rman.9 rman_manage_region.9 \
 	rman.9 rman_release_resource.9 \

Modified: head/share/man/man9/rman.9
==============================================================================
--- head/share/man/man9/rman.9	Fri Apr 29 18:49:36 2011	(r221219)
+++ head/share/man/man9/rman.9	Fri Apr 29 20:05:19 2011	(r221220)
@@ -25,17 +25,22 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 29, 2007
+.Dd April 29, 2011
 .Dt RMAN 9
 .Os
 .Sh NAME
 .Nm rman ,
 .Nm rman_activate_resource ,
+.Nm rman_adjust_resource ,
 .Nm rman_await_resource ,
 .Nm rman_deactivate_resource ,
 .Nm rman_fini ,
 .Nm rman_init ,
+.Nm rman_init_from_resource ,
+.Nm rman_is_region_manager ,
 .Nm rman_manage_region ,
+.Nm rman_first_free_region ,
+.Nm rman_last_free_region ,
 .Nm rman_release_resource ,
 .Nm rman_reserve_resource ,
 .Nm rman_reserve_resource_bound ,
@@ -60,6 +65,8 @@
 .Ft int
 .Fn rman_activate_resource "struct resource *r"
 .Ft int
+.Fn rman_adjust_resource "struct resource *r" "u_long start" "u_long end"
+.Ft int
 .Fn rman_await_resource "struct resource *r" "int pri2" "int timo"
 .Ft int
 .Fn rman_deactivate_resource "struct resource *r"
@@ -68,8 +75,16 @@
 .Ft int
 .Fn rman_init "struct rman *rm"
 .Ft int
+.Fn rman_init_from_resource "struct rman *rm" "struct resource *r"
+.Ft int
+.Fn rman_is_region_manager "struct resource *r" "struct rman *rm"
+.Ft int
 .Fn rman_manage_region "struct rman *rm" "u_long start" "u_long end"
 .Ft int
+.Fn rman_first_free_region "struct rman *rm" "u_long *start" "u_long *end"
+.Ft int
+.Fn rman_last_free_region "struct rman *rm" "u_long *start" "u_long *end"
+.Ft int
 .Fn rman_release_resource "struct resource *r"
 .Ft "struct resource *"
 .Fo rman_reserve_resource
@@ -155,6 +170,14 @@ shall be set to
 The field
 .Va rm_descr
 shall be set to a string that describes the resource to be managed.
+The
+.Va rm_start
+and
+.Va rm_end
+fields may be set to limit the range of acceptable resource addresses.
+If these fields are not set,
+.Fn rman_init
+will initialize them to allow the entire range of resource addresses.
 It also initializes any mutexes associated with the structure.
 If
 .Fn rman_init
@@ -194,12 +217,49 @@ If successful,
 will return 0.
 If the region overlaps with an existing region, it will return
 .Er EBUSY .
+If any part of the region falls outside of the valid address range for
+.Fa rm ,
+it will return
+.Er EINVAL .
 .Er ENOMEM
-will be return when
+will be returned when
 .Fn rman_manage_region
 failed to allocate memory for the region.
 .Pp
 The
+.Fn rman_init_from_resource
+function is a wrapper routine to create a resource manager backed by an
+existing resource.
+It initializes
+.Fa rm
+using
+.Fn rman_init
+and then adds a region to
+.Fa rm
+corresponding to the address range allocated to
+.Fa r
+via
+.Fn rman_manage_region .
+.Pp
+The
+.Fn rman_first_free_region
+and
+.Fn rman_last_free_region
+functions can be used to query a resource manager for its first
+.Pq or last
+unallocated region.
+If
+.Fa rm
+contains no free region,
+these functions will return
+.Er ENOENT .
+Otherwise,
+.Fa *start
+and
+.Fa *end
+are set to the bounds of the free region and zero is returned.
+.Pp
+The
 .Fn rman_reserve_resource_bound
 function is where the bulk of the
 .Nm
@@ -212,8 +272,9 @@ The caller can specify the
 .Fa start
 and
 .Fa end
-of an acceptable range, as well as
-alignment, and the code will attempt to find a free segment which fits.
+of an acceptable range,
+as well as a boundary restriction and required aligment,
+and the code will attempt to find a free segment which fits.
 The
 .Fa start
 argument is the lowest acceptable starting value of the resource.
@@ -225,6 +286,19 @@ Therefore,
 must be \[<=]
 .Fa end
 for any allocation to happen.
+The aligment requirement
+.Pq if any
+is specified in
+.Fa flags .
+The
+.Fa bound
+argument may be set to specify a boundary restriction such that an
+allocated region may cross an address that is a multiple of the
+boundary.
+The
+.Fa bound
+argument must be a power of two.
+It may be set to zero to specify no boundary restriction.
 The default behavior is to allocate an exclusive segment, unless the
 .Dv RF_SHAREABLE
 or
@@ -240,7 +314,7 @@ function is used to reserve resources wi
 It is a simplified interface to
 .Fn rman_reserve_resource_bound
 which passes 0 for the
-.Fa flags
+.Fa bound
 argument.
 .Pp
 The
@@ -251,6 +325,49 @@ This should be used when calling
 .Fn rman_reserve_resource_bound .
 .Pp
 The
+.Fn rman_is_region_manager
+function returns true if the allocated resource
+.Fa r
+was allocated from
+.Fa rm .
+Otherwise,
+it returns false.
+.Pp
+The
+.Fn rman_adjust_resource
+function is used to adjust the reserved address range of an allocated resource
+to reserve
+.Fa start
+through
+.Fa end .
+It can be used to grow or shrink one or both ends of the resource range.
+The current implementation does not support entirely relocating the resource
+and will fail with
+.Er EINVAL
+if the new resource range does not overlap the old resource range.
+If either end of the resource range grows and the new resource range would
+conflict with another allocated resource,
+the function will fail with
+.Er EBUSY .
+The
+.Fn rman_adjust_resource
+function does not support adjusting the resource range for shared resources
+and will fail such attempts with
+.Er EINVAL .
+Upon success,
+the resource
+.Fa r
+will have a start address of
+.Fa start
+and an end address of
+.Fa end
+and the function will return zero.
+Note that none of the constraints of the original allocation request such
+as alignment or boundary restrictions are checked by
+.Fn rman_adjust_resource .
+It is the caller's responsibility to enforce any such requirements.
+.Pp
+The
 .Fn rman_release_resource
 function releases the reserved resource
 .Fa r .

Modified: head/sys/kern/subr_rman.c
==============================================================================
--- head/sys/kern/subr_rman.c	Fri Apr 29 18:49:36 2011	(r221219)
+++ head/sys/kern/subr_rman.c	Fri Apr 29 20:05:19 2011	(r221220)
@@ -272,6 +272,164 @@ rman_fini(struct rman *rm)
 	return 0;
 }
 
+int
+rman_first_free_region(struct rman *rm, u_long *start, u_long *end)
+{
+	struct resource_i *r;
+
+	mtx_lock(rm->rm_mtx);
+	TAILQ_FOREACH(r, &rm->rm_list, r_link) {
+		if (!(r->r_flags & RF_ALLOCATED)) {
+			*start = r->r_start;
+			*end = r->r_end;
+			mtx_unlock(rm->rm_mtx);
+			return (0);
+		}
+	}
+	mtx_unlock(rm->rm_mtx);
+	return (ENOENT);
+}
+
+int
+rman_last_free_region(struct rman *rm, u_long *start, u_long *end)
+{
+	struct resource_i *r;
+
+	mtx_lock(rm->rm_mtx);
+	TAILQ_FOREACH_REVERSE(r, &rm->rm_list, resource_head, r_link) {
+		if (!(r->r_flags & RF_ALLOCATED)) {
+			*start = r->r_start;
+			*end = r->r_end;
+			mtx_unlock(rm->rm_mtx);
+			return (0);
+		}
+	}
+	mtx_unlock(rm->rm_mtx);
+	return (ENOENT);
+}
+
+/* Shrink or extend one or both ends of an allocated resource. */
+int
+rman_adjust_resource(struct resource *rr, u_long start, u_long end)
+{
+	struct	resource_i *r, *s, *t, *new;
+	struct	rman *rm;
+
+	/* Not supported for shared resources. */
+	r = rr->__r_i;
+	if (r->r_flags & (RF_TIMESHARE | RF_SHAREABLE))
+		return (EINVAL);
+
+	/*
+	 * This does not support wholesale moving of a resource.  At
+	 * least part of the desired new range must overlap with the
+	 * existing resource.
+	 */
+	if (end < r->r_start || r->r_end < start)
+		return (EINVAL);
+
+	/*
+	 * Find the two resource regions immediately adjacent to the
+	 * allocated resource.
+	 */
+	rm = r->r_rm;
+	mtx_lock(rm->rm_mtx);
+#ifdef INVARIANTS
+	TAILQ_FOREACH(s, &rm->rm_list, r_link) {
+		if (s == r)
+			break;
+	}
+	if (s == NULL)
+		panic("resource not in list");
+#endif
+	s = TAILQ_PREV(r, resource_head, r_link);
+	t = TAILQ_NEXT(r, r_link);
+	KASSERT(s == NULL || s->r_end + 1 == r->r_start,
+	    ("prev resource mismatch"));
+	KASSERT(t == NULL || r->r_end + 1 == t->r_start,
+	    ("next resource mismatch"));
+
+	/*
+	 * See if the changes are permitted.  Shrinking is always allowed,
+	 * but growing requires sufficient room in the adjacent region.
+	 */
+	if (start < r->r_start && (s == NULL || (s->r_flags & RF_ALLOCATED) ||
+	    s->r_start > start)) {
+		mtx_unlock(rm->rm_mtx);
+		return (EBUSY);
+	}
+	if (end > r->r_end && (t == NULL || (t->r_flags & RF_ALLOCATED) ||
+	    t->r_end < end)) {
+		mtx_unlock(rm->rm_mtx);
+		return (EBUSY);
+	}
+
+	/*
+	 * While holding the lock, grow either end of the resource as
+	 * needed and shrink either end if the shrinking does not require
+	 * allocating a new resource.  We can safely drop the lock and then
+	 * insert a new range to handle the shrinking case afterwards.
+	 */
+	if (start < r->r_start ||
+	    (start > r->r_start && s != NULL && !(s->r_flags & RF_ALLOCATED))) {
+		KASSERT(s->r_flags == 0, ("prev is busy"));
+		r->r_start = start;
+		if (s->r_start == start) {
+			TAILQ_REMOVE(&rm->rm_list, s, r_link);
+			free(s, M_RMAN);
+		} else
+			s->r_end = start - 1;
+	}
+	if (end > r->r_end ||
+	    (end < r->r_end && t != NULL && !(t->r_flags & RF_ALLOCATED))) {
+		KASSERT(t->r_flags == 0, ("next is busy"));
+		r->r_end = end;
+		if (t->r_end == end) {
+			TAILQ_REMOVE(&rm->rm_list, t, r_link);
+			free(t, M_RMAN);
+		} else
+			t->r_start = end + 1;
+	}
+	mtx_unlock(rm->rm_mtx);
+
+	/*
+	 * Handle the shrinking cases that require allocating a new
+	 * resource to hold the newly-free region.  We have to recheck
+	 * if we still need this new region after acquiring the lock.
+	 */
+	if (start > r->r_start) {
+		new = int_alloc_resource(M_WAITOK);
+		new->r_start = r->r_start;
+		new->r_end = start - 1;
+		new->r_rm = rm;
+		mtx_lock(rm->rm_mtx);
+		r->r_start = start;
+		s = TAILQ_PREV(r, resource_head, r_link);
+		if (s != NULL && !(s->r_flags & RF_ALLOCATED)) {
+			s->r_end = start - 1;
+			free(new, M_RMAN);
+		} else
+			TAILQ_INSERT_BEFORE(r, new, r_link);
+		mtx_unlock(rm->rm_mtx);
+	}
+	if (end < r->r_end) {
+		new = int_alloc_resource(M_WAITOK);
+		new->r_start = end + 1;
+		new->r_end = r->r_end;
+		new->r_rm = rm;
+		mtx_lock(rm->rm_mtx);
+		r->r_end = end;
+		t = TAILQ_NEXT(r, r_link);
+		if (t != NULL && !(t->r_flags & RF_ALLOCATED)) {
+			t->r_start = end + 1;
+			free(new, M_RMAN);
+		} else
+			TAILQ_INSERT_AFTER(&rm->rm_list, r, new, r_link);
+		mtx_unlock(rm->rm_mtx);
+	}
+	return (0);
+}
+
 struct resource *
 rman_reserve_resource_bound(struct rman *rm, u_long start, u_long end,
 		      u_long count, u_long bound,  u_int flags,

Modified: head/sys/sys/rman.h
==============================================================================
--- head/sys/sys/rman.h	Fri Apr 29 18:49:36 2011	(r221219)
+++ head/sys/sys/rman.h	Fri Apr 29 20:05:19 2011	(r221220)
@@ -116,7 +116,9 @@ struct rman {
 TAILQ_HEAD(rman_head, rman);
 
 int	rman_activate_resource(struct resource *r);
+int	rman_adjust_resource(struct resource *r, u_long start, u_long end);
 int	rman_await_resource(struct resource *r, int pri, int timo);
+int	rman_first_free_region(struct rman *rm, u_long *start, u_long *end);
 bus_space_handle_t rman_get_bushandle(struct resource *);
 bus_space_tag_t rman_get_bustag(struct resource *);
 u_long	rman_get_end(struct resource *);
@@ -130,6 +132,7 @@ int	rman_deactivate_resource(struct reso
 int	rman_fini(struct rman *rm);
 int	rman_init(struct rman *rm);
 int	rman_init_from_resource(struct rman *rm, struct resource *r);
+int	rman_last_free_region(struct rman *rm, u_long *start, u_long *end);
 uint32_t rman_make_alignment_flags(uint32_t size);
 int	rman_manage_region(struct rman *rm, u_long start, u_long end);
 int	rman_is_region_manager(struct resource *r, struct rman *rm);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 20: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 62575106566B;
	Fri, 29 Apr 2011 20:31:53 +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 50EF08FC19;
	Fri, 29 Apr 2011 20: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 p3TKVrtL014193;
	Fri, 29 Apr 2011 20:31:53 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKVrhb014188;
	Fri, 29 Apr 2011 20:31:53 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292031.p3TKVrhb014188@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:31:53 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221221 - in stable/8/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: Fri, 29 Apr 2011 20:31:53 -0000

Author: dougb
Date: Fri Apr 29 20:31:52 2011
New Revision: 221221
URL: http://svn.freebsd.org/changeset/base/221221

Log:
  MFC r216744 for rc.d/devd:
  
  Add pidfile [1]
  
  While I'm here, don't run the sysctl frob unconditionally, and
  s/sysctl/$SYSCTL/
  
  MFC r220962:
  
  Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
  like, determines the path to a pid file as it is specified in a conf file.
  
  Use the new feature for rc.d/named and rc.d/devd, the 2 services in the
  base that list their pid files in their conf files.
  
  Remove the now-obsolete named_pidfile, and warn users if they have it set.
  
  MFC r220963:
  
  Improve the error handling for the new get_pidfile_from_conf()

Modified:
  stable/8/etc/defaults/rc.conf
  stable/8/etc/rc.d/devd
  stable/8/etc/rc.d/named
  stable/8/etc/rc.subr
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/defaults/rc.conf
==============================================================================
--- stable/8/etc/defaults/rc.conf	Fri Apr 29 20:05:19 2011	(r221220)
+++ stable/8/etc/defaults/rc.conf	Fri Apr 29 20:31:52 2011	(r221221)
@@ -271,7 +271,6 @@ named_enable="NO"		# Run named, the DNS 
 named_program="/usr/sbin/named" # Path to named, if you want a different one.
 named_conf="/etc/namedb/named.conf" 	# Path to the configuration file
 #named_flags=""			# Use this for flags OTHER than -u and -c
-named_pidfile="/var/run/named/pid" # Must set this in named.conf as well
 named_uid="bind" 		# User to run named as
 named_chrootdir="/var/named"	# Chroot directory (or "" not to auto-chroot it)
 named_chroot_autoupdate="YES"	# Automatically install/update chrooted

Modified: stable/8/etc/rc.d/devd
==============================================================================
--- stable/8/etc/rc.d/devd	Fri Apr 29 20:05:19 2011	(r221220)
+++ stable/8/etc/rc.d/devd	Fri Apr 29 20:31:52 2011	(r221221)
@@ -14,10 +14,27 @@ name="devd"
 rcvar=`set_rcvar`
 command="/sbin/${name}"
 
+start_precmd=${name}_prestart
+stop_precmd=find_pidfile
+
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file /etc/devd.conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/${name}.pid"
+	fi
+}
+
+devd_prestart ()
+{
+	find_pidfile
+
+	# If devd is disabled, turn it off in the kernel to avoid memory leaks.
+	if ! checkyesno ${rcvar}; then
+	    $SYSCTL hw.bus.devctl_disable=1
+	fi
+}
+
 load_rc_config $name
 run_rc_command "$1"
-
-# If devd is disabled, turn it off in the kernel to avoid memory leaks.
-if ! checkyesno ${rcvar}; then
-    sysctl hw.bus.devctl_disable=1
-fi

Modified: stable/8/etc/rc.d/named
==============================================================================
--- stable/8/etc/rc.d/named	Fri Apr 29 20:05:19 2011	(r221220)
+++ stable/8/etc/rc.d/named	Fri Apr 29 20:31:52 2011	(r221221)
@@ -112,8 +112,19 @@ named_reload()
 	${command%/named}/rndc reload
 }
 
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file $named_conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/named/pid"
+	fi
+}
+
 named_stop()
 {
+	find_pidfile
+
 	# This duplicates an undesirably large amount of code from the stop
 	# routine in rc.subr in order to use rndc to shut down the process,
 	# and to give it a second chance in case rndc fails.
@@ -156,6 +167,12 @@ create_file () {
 
 named_prestart()
 {
+	find_pidfile
+
+	if [ -n "$named_pidfile" ]; then
+		warn 'named_pidfile: now determined from the conf file'
+	fi
+
 	command_args="-u ${named_uid:=root}"
 
 	if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then
@@ -279,7 +296,6 @@ load_rc_config $name
 #
 required_dirs="$named_chrootdir"	# if it is set, it must exist
 
-pidfile="${named_pidfile:-/var/run/named/pid}"
 named_confdir="${named_chrootdir}${named_conf%/*}"
 
 run_rc_command "$1"

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Fri Apr 29 20:05:19 2011	(r221220)
+++ stable/8/etc/rc.subr	Fri Apr 29 20:31:52 2011	(r221221)
@@ -384,6 +384,49 @@ wait_for_pids()
 }
 
 #
+# get_pidfile_from_conf string file
+#
+#	Takes a string to search for in the specified file.
+#	Ignores lines with traditional comment characters.
+#
+# Example:
+#
+# if get_pidfile_from_conf string file; then
+#	pidfile="$_pidfile_from_conf"
+# else
+#	pidfile='appropriate default'
+# fi
+#
+get_pidfile_from_conf()
+{
+	if [ -z "$1" -o -z "$2" ]; then
+		err 3 "USAGE: get_pidfile_from_conf string file ($name)"
+	fi
+
+	local string file line
+
+	string="$1" ; file="$2"
+
+	if [ ! -s "$file" ]; then
+		err 3 "get_pidfile_from_conf: $file does not exist ($name)"
+	fi
+
+	while read line; do
+		case "$line" in
+		*[#\;]*${string}*)	continue ;;
+		*${string}*)		break ;;
+		esac
+	done < $file
+
+	if [ -n "$line" ]; then
+		line=${line#*/}
+		_pidfile_from_conf="/${line%%[\"\;]*}"
+	else
+		return 1
+	fi
+}
+
+#
 # check_startmsgs
 #	If rc_quiet is set (usually as a result of using faststart at
 #	boot time) check if rc_startmsgs is enabled.

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 20:44: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 3FC671065672;
	Fri, 29 Apr 2011 20:44:40 +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 2E3548FC19;
	Fri, 29 Apr 2011 20:44: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 p3TKierO014692;
	Fri, 29 Apr 2011 20:44:40 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKieag014687;
	Fri, 29 Apr 2011 20:44:40 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292044.p3TKieag014687@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:44:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221222 - in stable/7/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: Fri, 29 Apr 2011 20:44:40 -0000

Author: dougb
Date: Fri Apr 29 20:44:39 2011
New Revision: 221222
URL: http://svn.freebsd.org/changeset/base/221222

Log:
  MFC r216744 for rc.d/devd:
  
  Add pidfile [1]
  
  While I'm here, don't run the sysctl frob unconditionally, and
  s/sysctl/$SYSCTL/
  
  MFC r220962:
  
  Introduce to rc.subr get_pidfile_from_conf(). It does just what it sounds
  like, determines the path to a pid file as it is specified in a conf file.
  
  Use the new feature for rc.d/named and rc.d/devd, the 2 services in the
  base that list their pid files in their conf files.
  
  Remove the now-obsolete named_pidfile, and warn users if they have it set.
  
  MFC r220963:
  
  Improve the error handling for the new get_pidfile_from_conf()

Modified:
  stable/7/etc/defaults/rc.conf
  stable/7/etc/rc.d/devd
  stable/7/etc/rc.d/named
  stable/7/etc/rc.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/defaults/rc.conf
==============================================================================
--- stable/7/etc/defaults/rc.conf	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/defaults/rc.conf	Fri Apr 29 20:44:39 2011	(r221222)
@@ -247,7 +247,6 @@ named_enable="NO"		# Run named, the DNS 
 named_program="/usr/sbin/named" # Path to named, if you want a different one.
 named_conf="/etc/namedb/named.conf" 	# Path to the configuration file
 #named_flags=""			# Use this for flags OTHER than -u and -c
-named_pidfile="/var/run/named/pid" # Must set this in named.conf as well
 named_uid="bind" 		# User to run named as
 named_chrootdir="/var/named"	# Chroot directory (or "" not to auto-chroot it)
 named_chroot_autoupdate="YES"	# Automatically install/update chrooted

Modified: stable/7/etc/rc.d/devd
==============================================================================
--- stable/7/etc/rc.d/devd	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.d/devd	Fri Apr 29 20:44:39 2011	(r221222)
@@ -14,10 +14,27 @@ name="devd"
 rcvar=`set_rcvar`
 command="/sbin/${name}"
 
+start_precmd=${name}_prestart
+stop_precmd=find_pidfile
+
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file /etc/devd.conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/${name}.pid"
+	fi
+}
+
+devd_prestart ()
+{
+	find_pidfile
+
+	# If devd is disabled, turn it off in the kernel to avoid memory leaks.
+	if ! checkyesno ${rcvar}; then
+	    $SYSCTL hw.bus.devctl_disable=1
+	fi
+}
+
 load_rc_config $name
 run_rc_command "$1"
-
-# If devd is disabled, turn it off in the kernel to avoid memory leaks.
-if ! checkyesno ${rcvar}; then
-    sysctl hw.bus.devctl_disable=1
-fi

Modified: stable/7/etc/rc.d/named
==============================================================================
--- stable/7/etc/rc.d/named	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.d/named	Fri Apr 29 20:44:39 2011	(r221222)
@@ -112,8 +112,19 @@ named_reload()
 	${command%/named}/rndc reload
 }
 
+find_pidfile()
+{
+	if get_pidfile_from_conf pid-file $named_conf; then
+		pidfile="$_pidfile_from_conf"
+	else
+		pidfile="/var/run/named/pid"
+	fi
+}
+
 named_stop()
 {
+	find_pidfile
+
 	# This duplicates an undesirably large amount of code from the stop
 	# routine in rc.subr in order to use rndc to shut down the process,
 	# and to give it a second chance in case rndc fails.
@@ -156,6 +167,12 @@ create_file () {
 
 named_prestart()
 {
+	find_pidfile
+
+	if [ -n "$named_pidfile" ]; then
+		warn 'named_pidfile: now determined from the conf file'
+	fi
+
 	command_args="-u ${named_uid:=root}"
 
 	if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then
@@ -279,7 +296,6 @@ load_rc_config $name
 #
 required_dirs="$named_chrootdir"	# if it is set, it must exist
 
-pidfile="${named_pidfile:-/var/run/named/pid}"
 named_confdir="${named_chrootdir}${named_conf%/*}"
 
 run_rc_command "$1"

Modified: stable/7/etc/rc.subr
==============================================================================
--- stable/7/etc/rc.subr	Fri Apr 29 20:31:52 2011	(r221221)
+++ stable/7/etc/rc.subr	Fri Apr 29 20:44:39 2011	(r221222)
@@ -372,6 +372,48 @@ wait_for_pids()
 }
 
 #
+# get_pidfile_from_conf string file
+#
+#	Takes a string to search for in the specified file.
+#	Ignores lines with traditional comment characters.
+#
+# Example:
+#
+# if get_pidfile_from_conf string file; then
+#	pidfile="$_pidfile_from_conf"
+# else
+#	pidfile='appropriate default'
+# fi
+#
+get_pidfile_from_conf()
+{
+	if [ -z "$1" -o -z "$2" ]; then
+		err 3 "USAGE: get_pidfile_from_conf string file ($name)"
+	fi
+
+	local string file line
+
+	string="$1" ; file="$2"
+
+	if [ ! -s "$file" ]; then
+		err 3 "get_pidfile_from_conf: $file does not exist ($name)"
+	fi
+
+	while read line; do
+		case "$line" in
+		*[#\;]*${string}*)	continue ;;
+		*${string}*)		break ;;
+		esac
+	done < $file
+
+	if [ -n "$line" ]; then
+		line=${line#*/}
+		_pidfile_from_conf="/${line%%[\"\;]*}"
+	else
+		return 1
+	fi
+}
+
 # run_rc_command argument
 #	Search for argument in the list of supported commands, which is:
 #		"start stop restart rcvar status poll ${extra_commands}"

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 20:46: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 6C597106564A;
	Fri, 29 Apr 2011 20:46:09 +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 5B85F8FC0C;
	Fri, 29 Apr 2011 20:46: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 p3TKk9C1014788;
	Fri, 29 Apr 2011 20:46:09 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKk9LV014786;
	Fri, 29 Apr 2011 20:46:09 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292046.p3TKk9LV014786@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:46: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: r221223 - stable/8/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, 29 Apr 2011 20:46:09 -0000

Author: dougb
Date: Fri Apr 29 20:46:09 2011
New Revision: 221223
URL: http://svn.freebsd.org/changeset/base/221223

Log:
  MFC 221007:
  
  Create a function for the code from r192246 so that it can be used both
  times mount is called.
  
  Limit the automatic behavior to when AUTO is specified (as it is in
  etc/defaults/rc.conf) and for everything else take advantage of all
  of the goodness in checkyesno.

Modified:
  stable/8/etc/rc.d/tmp
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/rc.d/tmp
==============================================================================
--- stable/8/etc/rc.d/tmp	Fri Apr 29 20:44:39 2011	(r221222)
+++ stable/8/etc/rc.d/tmp	Fri Apr 29 20:46:09 2011	(r221223)
@@ -37,20 +37,20 @@ stop_cmd=':'
 
 load_rc_config $name
 
+mount_tmpmfs ()
+{
+	if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then
+		mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
+		chmod 01777 /tmp
+	fi
+}
+
 # If we do not have a writable /tmp, create a memory
 # filesystem for /tmp.  If /tmp is a symlink (e.g. to /var/tmp,
 # then it should already be writable).
 #
 case "${tmpmfs}" in
-[Yy][Ee][Ss])
-	if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then
-		mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-		chmod 01777 /tmp
-	fi
-	;;
-[Nn][Oo])
-	;;
-*)
+[Aa][Uu][Tt][Oo])
 	if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
 		rmdir ${_tmpdir}
 	else
@@ -59,9 +59,13 @@ case "${tmpmfs}" in
 			echo "dropping into shell, ^D to continue anyway."
 			/bin/sh
 		else
-			mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-			chmod 01777 /tmp
+			mount_tmpmfs
 		fi
 	fi
 	;;
+*)
+	if checkyesno tmpmfs; then
+		mount_tmpmfs
+	fi
+	;;
 esac

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 20:55: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 D9EDF106564A;
	Fri, 29 Apr 2011 20:55:15 +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 C94838FC12;
	Fri, 29 Apr 2011 20:55: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 p3TKtFxU015145;
	Fri, 29 Apr 2011 20:55:15 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TKtFUN015143;
	Fri, 29 Apr 2011 20:55:15 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292055.p3TKtFUN015143@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 20:55:15 +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: r221224 - stable/7/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, 29 Apr 2011 20:55:16 -0000

Author: dougb
Date: Fri Apr 29 20:55:15 2011
New Revision: 221224
URL: http://svn.freebsd.org/changeset/base/221224

Log:
  MFC r192246:
  
  do not create and mount new file systems on top of the old ones on every
  invocation of this script once we already have one
  (in case tmpmfs="YES").
  
  MFC r221007:
  
  Create a function for the code from r192246 so that it can be used both
  times mount is called.
  
  Limit the automatic behavior to when AUTO is specified (as it is in
  etc/defaults/rc.conf) and for everything else take advantage of all
  of the goodness in checkyesno.

Modified:
  stable/7/etc/rc.d/tmp
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.d/tmp
==============================================================================
--- stable/7/etc/rc.d/tmp	Fri Apr 29 20:46:09 2011	(r221223)
+++ stable/7/etc/rc.d/tmp	Fri Apr 29 20:55:15 2011	(r221224)
@@ -37,18 +37,20 @@ stop_cmd=':'
 
 load_rc_config $name
 
+mount_tmpmfs ()
+{
+	if ! /bin/df /tmp | grep -q "^/dev/md[0-9]"; then
+		mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
+		chmod 01777 /tmp
+	fi
+}
+
 # If we do not have a writable /tmp, create a memory
 # filesystem for /tmp.  If /tmp is a symlink (e.g. to /var/tmp,
 # then it should already be writable).
 #
 case "${tmpmfs}" in
-[Yy][Ee][Ss])
-	mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-	chmod 01777 /tmp
-	;;
-[Nn][Oo])
-	;;
-*)
+[Aa][Uu][Tt][Oo])
 	if _tmpdir=$(mktemp -d -q /tmp/.diskless.XXXXXX); then
 		rmdir ${_tmpdir}
 	else
@@ -57,9 +59,13 @@ case "${tmpmfs}" in
 			echo "dropping into shell, ^D to continue anyway."
 			/bin/sh
 		else
-			mount_md ${tmpsize} /tmp "${tmpmfs_flags}"
-			chmod 01777 /tmp
+			mount_tmpmfs
 		fi
 	fi
 	;;
+*)
+	if checkyesno tmpmfs; then
+		mount_tmpmfs
+	fi
+	;;
 esac

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 21:10: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 7AFFA106564A;
	Fri, 29 Apr 2011 21:10:41 +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 6B1088FC16;
	Fri, 29 Apr 2011 21:10: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 p3TLAfKm015736;
	Fri, 29 Apr 2011 21:10:41 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TLAfp4015734;
	Fri, 29 Apr 2011 21:10:41 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <201104292110.p3TLAfp4015734@svn.freebsd.org>
From: Doug Barton 
Date: Fri, 29 Apr 2011 21:10: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: r221227 - 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: Fri, 29 Apr 2011 21:10:41 -0000

Author: dougb
Date: Fri Apr 29 21:10:41 2011
New Revision: 221227
URL: http://svn.freebsd.org/changeset/base/221227

Log:
  Rather than trusting that nothing is going to sneak in before the
  early_late_divider in the second run (and thus be skipped altogether),
  keep a list of the scripts run early, and use that list to skip things
  in the second run.
  
  This has the primary benefit of not skipping a local script that gets
  ordered too early in the second run. It also gives an opportunity to
  clean up/simplify the code a bit.
  
  Use a space-separated list rather than the more traditional colon for
  maximum insurance against creativity in local naming conventions.
  
  Reviewed by:	brooks

Modified:
  head/etc/rc

Modified: head/etc/rc
==============================================================================
--- head/etc/rc	Fri Apr 29 21:09:03 2011	(r221226)
+++ head/etc/rc	Fri Apr 29 21:10:41 2011	(r221227)
@@ -84,8 +84,10 @@ fi
 #
 files=`rcorder ${skip} /etc/rc.d/* 2>/dev/null`
 
+_rc_elem_done=' '
 for _rc_elem in ${files}; do
 	run_rc_script ${_rc_elem} ${_boot}
+	_rc_elem_done="${_rc_elem_done}${_rc_elem} "
 
 	case "$_rc_elem" in
 	*/${early_late_divider})	break ;;
@@ -103,14 +105,9 @@ case ${local_startup} in
 esac
 
 files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null`
-_skip_early=1
 for _rc_elem in ${files}; do
-	case "$_skip_early" in
-	1)	case "$_rc_elem" in
-		*/${early_late_divider})	_skip_early=0 ;;
-		esac
-		continue
-		;;
+	case "$_rc_elem_done" in
+	*" $_rc_elem "*)	continue ;;
 	esac
 
 	run_rc_script ${_rc_elem} ${_boot}

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 21:18: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 8DAA11065673;
	Fri, 29 Apr 2011 21:18:41 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 62A368FC14;
	Fri, 29 Apr 2011 21:18: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 p3TLIfg3016067;
	Fri, 29 Apr 2011 21:18:41 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TLIf56016065;
	Fri, 29 Apr 2011 21:18:41 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104292118.p3TLIf56016065@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Fri, 29 Apr 2011 21:18: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: r221229 - head/sys/dev/md
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 21:18:41 -0000

Author: des
Date: Fri Apr 29 21:18:41 2011
New Revision: 221229
URL: http://svn.freebsd.org/changeset/base/221229

Log:
  Implement BIO_DELETE for vnode devices by simply overwriting the deleted
  sectors with all-zeroes.
  
  The zeroes come from a static buffer; null(4) uses a dynamic buffer for
  the same purpose (for /dev/zero).  It might be a good idea to have a
  static, shared, read-only all-zeroes page somewhere in the kernel that
  md(4), null(4) and any other code that needs zeroes could use.
  
  Reviewed by:	kib
  MFC after:	3 weeks

Modified:
  head/sys/dev/md/md.c

Modified: head/sys/dev/md/md.c
==============================================================================
--- head/sys/dev/md/md.c	Fri Apr 29 21:10:45 2011	(r221228)
+++ head/sys/dev/md/md.c	Fri Apr 29 21:18:41 2011	(r221229)
@@ -205,6 +205,9 @@ struct md_s {
 	vm_object_t object;
 };
 
+/* Used for BIO_DELETE on MD_VNODE */
+static u_char zero[PAGE_SIZE];
+
 static struct indir *
 new_indir(u_int shift)
 {
@@ -514,10 +517,12 @@ mdstart_vnode(struct md_s *sc, struct bi
 	struct mount *mp;
 	struct vnode *vp;
 	struct thread *td;
+	off_t end, zerosize;
 
 	switch (bp->bio_cmd) {
 	case BIO_READ:
 	case BIO_WRITE:
+	case BIO_DELETE:
 	case BIO_FLUSH:
 		break;
 	default:
@@ -548,6 +553,43 @@ mdstart_vnode(struct md_s *sc, struct bi
 
 	bzero(&auio, sizeof(auio));
 
+	/*
+	 * Special case for BIO_DELETE.  On the surface, this is very
+	 * similar to BIO_WRITE, except that we write from our own
+	 * fixed-length buffer, so we have to loop.  The net result is
+	 * that the two cases end up having very little in common.
+	 */
+	if (bp->bio_cmd == BIO_DELETE) {
+		zerosize = sizeof(zero) - (sizeof(zero) % sc->sectorsize);
+		auio.uio_iov = &aiov;
+		auio.uio_iovcnt = 1;
+		auio.uio_offset = (vm_ooffset_t)bp->bio_offset;
+		auio.uio_segflg = UIO_SYSSPACE;
+		auio.uio_rw = UIO_WRITE;
+		auio.uio_td = td;
+		end = bp->bio_offset + bp->bio_length;
+		vfslocked = VFS_LOCK_GIANT(vp->v_mount);
+		(void) vn_start_write(vp, &mp, V_WAIT);
+		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+		error = 0;
+		while (auio.uio_offset < end) {
+			aiov.iov_base = zero;
+			aiov.iov_len = end - auio.uio_offset;
+			if (aiov.iov_len > zerosize)
+				aiov.iov_len = zerosize;
+			auio.uio_resid = aiov.iov_len;
+			error = VOP_WRITE(vp, &auio,
+			    sc->flags & MD_ASYNC ? 0 : IO_SYNC, sc->cred);
+			if (error != 0)
+				break;
+		}
+		VOP_UNLOCK(vp, 0);
+		vn_finished_write(mp);
+		bp->bio_resid = end - auio.uio_offset;
+		VFS_UNLOCK_GIANT(vfslocked);
+		return (error);
+	}
+
 	aiov.iov_base = bp->bio_data;
 	aiov.iov_len = bp->bio_length;
 	auio.uio_iov = &aiov;

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 21:36: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 BA0361065673;
	Fri, 29 Apr 2011 21:36:45 +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 A721B8FC16;
	Fri, 29 Apr 2011 21:36: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 p3TLajbD016699;
	Fri, 29 Apr 2011 21:36:45 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TLajgP016691;
	Fri, 29 Apr 2011 21:36:45 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201104292136.p3TLajgP016691@svn.freebsd.org>
From: John Baldwin 
Date: Fri, 29 Apr 2011 21:36: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: r221231 - in head: share/man/man9 sys/kern 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: Fri, 29 Apr 2011 21:36:45 -0000

Author: jhb
Date: Fri Apr 29 21:36:45 2011
New Revision: 221231
URL: http://svn.freebsd.org/changeset/base/221231

Log:
  Add a new bus method, BUS_ADJUST_RESOURCE() that is intended to be a
  wrapper around rman_adjust_resource().  Include a generic implementation,
  bus_generic_adjust_resource() which passes the request up to the parent
  bus.  There is currently no default implementation.  A
  bus_adjust_resource() wrapper is provided for use in drivers.

Added:
  head/share/man/man9/bus_adjust_resource.9   (contents, props changed)
Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/bus_alloc_resource.9
  head/share/man/man9/rman.9
  head/sys/kern/bus_if.m
  head/sys/kern/subr_bus.c
  head/sys/sys/bus.h

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/share/man/man9/Makefile	Fri Apr 29 21:36:45 2011	(r221231)
@@ -21,6 +21,7 @@ MAN=	accept_filter.9 \
 	BUF_UNLOCK.9 \
 	bus_activate_resource.9 \
 	BUS_ADD_CHILD.9 \
+	bus_adjust_resource.9 \
 	bus_alloc_resource.9 \
 	BUS_BIND_INTR.9 \
 	bus_child_present.9 \

Added: head/share/man/man9/bus_adjust_resource.9
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man9/bus_adjust_resource.9	Fri Apr 29 21:36:45 2011	(r221231)
@@ -0,0 +1,101 @@
+.\" -*- nroff -*-
+.\"
+.\" 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$
+.\"
+.Dd April 29, 2011
+.Dt BUS_ADJUST_RESOURCE 9
+.Os
+.Sh NAME
+.Nm bus_adjust_resource
+.Nd adjust resource allocated from a parent bus
+.Sh SYNOPSIS
+.In sys/param.h
+.In sys/bus.h
+.Pp
+.In machine/bus.h
+.In sys/rman.h
+.In machine/resource.h
+.Ft int
+.Fn bus_adjust_resource "device_t dev" "int type" "struct resource *r" "u_long start" "u_long end"
+.Sh DESCRIPTION
+This function is used to ask the parent bus to adjust the resource range
+assigned to an allocated resource.
+The resource
+.Fa r
+should have been allocated by a previous call to
+.Xr bus_alloc_resource 9 .
+The new resource range must overlap the existing range of
+.Fa r .
+The
+.Fa type
+argument should match the
+.Fa type
+argument passed to
+.Xr bus_alloc_resource 9
+when the resource was initially allocated.
+.Pp
+Note that none of the constraints of the original allocation request such
+as alignment or boundary restrictions are checked by
+.Fn bus_adjust_resource .
+It is the caller's responsibility to enforce any such requirements.
+.Sh RETURN VALUES
+The
+.Fn bus_adjust_resource
+method returns zero on success or an error code on failure.
+.Sh ERRORS
+.Fn bus_adjust_resource
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+The
+.Fa dev
+device does not have a parent device.
+.It Bq Er EINVAL
+The
+.Fa r
+resource is a shared resource.
+.It Bq Er EINVAL
+The new address range does not overlap with the existing address range of
+.Fa r .
+.It Bq Er EBUSY
+The new address range conflicts with another allocated resource.
+.El
+.Sh EXAMPLES
+Grow an existing memory resource by 4096 bytes.
+.Bd -literal
+	struct resource *res;
+	int error;
+
+	error = bus_adjust_resource(dev, SYS_RES_MEMORY, res,
+	    rman_get_start(res), rman_get_end(res) + 0x1000);
+.Ed		
+.Sh SEE ALSO
+.Xr bus_alloc_resource 9 ,
+.Xr bus_release_resource 9 ,
+.Xr device 9 ,
+.Xr driver 9

Modified: head/share/man/man9/bus_alloc_resource.9
==============================================================================
--- head/share/man/man9/bus_alloc_resource.9	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/share/man/man9/bus_alloc_resource.9	Fri Apr 29 21:36:45 2011	(r221231)
@@ -171,6 +171,7 @@ should be saved in the softc of the devi
 .Ed
 .Sh SEE ALSO
 .Xr bus_activate_resource 9 ,
+.Xr bus_adjust_resource 9 ,
 .Xr bus_release_resource 9 ,
 .Xr device 9 ,
 .Xr driver 9

Modified: head/share/man/man9/rman.9
==============================================================================
--- head/share/man/man9/rman.9	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/share/man/man9/rman.9	Fri Apr 29 21:36:45 2011	(r221231)
@@ -462,6 +462,7 @@ function returns a pointer to the device
 .Fa r .
 .Sh SEE ALSO
 .Xr bus_activate_resource 9 ,
+.Xr bus_adjust_resource 9 ,
 .Xr bus_alloc_resource 9 ,
 .Xr bus_release_resource 9 ,
 .Xr bus_set_resource 9 ,

Modified: head/sys/kern/bus_if.m
==============================================================================
--- head/sys/kern/bus_if.m	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/sys/kern/bus_if.m	Fri Apr 29 21:36:45 2011	(r221231)
@@ -297,6 +297,30 @@ METHOD int deactivate_resource {
 };
 
 /**
+ * @brief Adjust a resource
+ *
+ * Adjust the start and/or end of a resource allocated by
+ * BUS_ALLOC_RESOURCE.  At least part of the new address range must overlap
+ * with the existing address range.  If the successful, the resource's range
+ * will be adjusted to [start, end] on return.
+ *
+ * @param _dev		the parent device of @p _child
+ * @param _child	the device which allocated the resource
+ * @param _type		the type of resource
+ * @param _res		the resource to adjust
+ * @param _start	the new starting address of the resource range
+ * @param _end		the new ending address of the resource range
+ */
+METHOD int adjust_resource {
+	device_t	_dev;
+	device_t	_child;
+	int		_type;
+	struct resource *_res;
+	u_long		_start;
+	u_long		_end;
+};
+
+/**
  * @brief Release a resource
  *
  * Free a resource allocated by the BUS_ALLOC_RESOURCE.  The @p _rid

Modified: head/sys/kern/subr_bus.c
==============================================================================
--- head/sys/kern/subr_bus.c	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/sys/kern/subr_bus.c	Fri Apr 29 21:36:45 2011	(r221231)
@@ -3646,6 +3646,23 @@ bus_generic_teardown_intr(device_t dev, 
 }
 
 /**
+ * @brief Helper function for implementing BUS_ADJUST_RESOURCE().
+ *
+ * This simple implementation of BUS_ADJUST_RESOURCE() simply calls the
+ * BUS_ADJUST_RESOURCE() method of the parent of @p dev.
+ */
+int
+bus_generic_adjust_resource(device_t dev, device_t child, int type,
+    struct resource *r, u_long start, u_long end)
+{
+	/* Propagate up the bus hierarchy until someone handles it. */
+	if (dev->parent)
+		return (BUS_ADJUST_RESOURCE(dev->parent, child, type, r, start,
+		    end));
+	return (EINVAL);
+}
+
+/**
  * @brief Helper function for implementing BUS_ALLOC_RESOURCE().
  *
  * This simple implementation of BUS_ALLOC_RESOURCE() simply calls the
@@ -3976,6 +3993,21 @@ bus_alloc_resource(device_t dev, int typ
 }
 
 /**
+ * @brief Wrapper function for BUS_ADJUST_RESOURCE().
+ *
+ * This function simply calls the BUS_ADJUST_RESOURCE() method of the
+ * parent of @p dev.
+ */
+int
+bus_adjust_resource(device_t dev, int type, struct resource *r, u_long start,
+    u_long end)
+{
+	if (dev->parent == NULL)
+		return (EINVAL);
+	return (BUS_ADJUST_RESOURCE(dev->parent, dev, type, r, start, end));
+}
+
+/**
  * @brief Wrapper function for BUS_ACTIVATE_RESOURCE().
  *
  * This function simply calls the BUS_ACTIVATE_RESOURCE() method of the

Modified: head/sys/sys/bus.h
==============================================================================
--- head/sys/sys/bus.h	Fri Apr 29 21:19:30 2011	(r221230)
+++ head/sys/sys/bus.h	Fri Apr 29 21:36:45 2011	(r221231)
@@ -304,6 +304,9 @@ int	bus_generic_activate_resource(device
 device_t
 	bus_generic_add_child(device_t dev, u_int order, const char *name,
 			      int unit);
+int	bus_generic_adjust_resource(device_t bus, device_t child, int type,
+				    struct resource *r, u_long start,
+				    u_long end);
 struct resource *
 	bus_generic_alloc_resource(device_t bus, device_t child, int type,
 				   int *rid, u_long start, u_long end,
@@ -374,6 +377,8 @@ int	bus_alloc_resources(device_t dev, st
 void	bus_release_resources(device_t dev, const struct resource_spec *rs,
 			      struct resource **res);
 
+int	bus_adjust_resource(device_t child, int type, struct resource *r,
+			    u_long start, u_long end);
 struct	resource *bus_alloc_resource(device_t dev, int type, int *rid,
 				     u_long start, u_long end, u_long count,
 				     u_int flags);

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 22:40:12 2011
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 13DB5106564A;
	Fri, 29 Apr 2011 22:40:12 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E819F8FC0A;
	Fri, 29 Apr 2011 22:40: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 p3TMeBcS018589;
	Fri, 29 Apr 2011 22:40:11 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TMeBaK018586;
	Fri, 29 Apr 2011 22:40:11 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104292240.p3TMeBaK018586@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Fri, 29 Apr 2011 22:40: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: r221232 - head/sbin/mdconfig
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 22:40:12 -0000

Author: des
Date: Fri Apr 29 22:40:11 2011
New Revision: 221232
URL: http://svn.freebsd.org/changeset/base/221232

Log:
  Somewhere around the 473rd time I mistyped "mdconfig file" instead of
  "mdconfig -f file", I decided that it would be easier to make mdconfig
  DWIM than to teach my fingers to type the correct command line.
  
  MFC after:	3 weeks

Modified:
  head/sbin/mdconfig/mdconfig.8
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.8
==============================================================================
--- head/sbin/mdconfig/mdconfig.8	Fri Apr 29 21:36:45 2011	(r221231)
+++ head/sbin/mdconfig/mdconfig.8	Fri Apr 29 22:40:11 2011	(r221232)
@@ -68,6 +68,8 @@
 .Op Fl n
 .Op Fl v
 .Op Fl u Ar unit
+.Nm
+.Ar file
 .Sh DESCRIPTION
 The
 .Nm
@@ -185,6 +187,15 @@ Request a specific unit number for the
 .Xr md 4
 device instead of automatic allocation.
 .El
+.Pp
+The last form,
+.Nm
+.Ar file ,
+is provided for convenience as an abbreviation of
+.Nm
+.Fl a
+.Fl t Ar vnode
+.Fl f Ar file .
 .Sh EXAMPLES
 To create a 4 megabyte
 .Xr malloc 9

Modified: head/sbin/mdconfig/mdconfig.c
==============================================================================
--- head/sbin/mdconfig/mdconfig.c	Fri Apr 29 21:36:45 2011	(r221231)
+++ head/sbin/mdconfig/mdconfig.c	Fri Apr 29 22:40:11 2011	(r221232)
@@ -38,6 +38,7 @@ static enum {UNSET, ATTACH, DETACH, LIST
 static int nflag;
 
 static void usage(void);
+static void md_set_file(const char *);
 static int md_find(char *, const char *);
 static int md_query(char *name);
 static int md_list(char *units, int opt);
@@ -59,7 +60,8 @@ usage(void)
 "                [-s size] [-S sectorsize] [-u unit]\n"
 "                [-x sectors/track] [-y heads/cylinder]\n"
 "       mdconfig -d -u unit [-o [no]force]\n"
-"       mdconfig -l [-v] [-n] [-u unit]\n");
+"       mdconfig -l [-v] [-n] [-u unit]\n"
+"       mdconfig file\n");
 	fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n");
 	fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n");
 	fprintf(stderr, "\t\tsize = %%d (512 byte blocks), %%db (B),\n");
@@ -82,10 +84,7 @@ main(int argc, char **argv)
 		err(1, "could not allocate memory");
 	vflag = 0;
 	bzero(mdio.md_file, PATH_MAX);
-	for (;;) {
-		ch = getopt(argc, argv, "ab:df:lno:s:S:t:u:vx:y:");
-		if (ch == -1)
-			break;
+	while ((ch = getopt(argc, argv, "ab:df:lno:s:S:t:u:vx:y:")) != -1) {
 		switch (ch) {
 		case 'a':
 			if (cmdline != 0)
@@ -143,21 +142,7 @@ main(int argc, char **argv)
 			}
 			if (cmdline != 2)
 				usage();
-			if (realpath(optarg, mdio.md_file) == NULL) {
-				err(1, "could not find full path for %s",
-				    optarg);
-			}
-			fd = open(mdio.md_file, O_RDONLY);
-			if (fd < 0)
-				err(1, "could not open %s", optarg);
-			else if (mdio.md_mediasize == 0) {
-				struct stat sb;
-
-				if (fstat(fd, &sb) == -1)
-					err(1, "could not stat %s", optarg);
-				mdio.md_mediasize = sb.st_size;
-			}
-			close(fd);
+			md_set_file(optarg);
 			break;
 		case 'o':
 			if (action == DETACH) {
@@ -267,6 +252,19 @@ main(int argc, char **argv)
 			usage();
 		}
 	}
+
+	argc -= optind;
+	argv += optind;
+	if (action == UNSET) {
+		if (argc != 1)
+			usage();
+		action = ATTACH;
+		mdio.md_type = MD_VNODE;
+		mdio.md_options = MD_CLUSTER | MD_AUTOUNIT | MD_COMPRESS;
+		cmdline = 2;
+		md_set_file(*argv);
+	}
+
 	mdio.md_version = MDIOVERSION;
 
 	if (!kld_isloaded("g_md") && kld_load("geom_md") == -1)
@@ -322,6 +320,26 @@ main(int argc, char **argv)
 	return (0);
 }
 
+static void
+md_set_file(const char *fn)
+{
+	struct stat sb;
+	int fd;
+
+	if (realpath(fn, mdio.md_file) == NULL)
+		err(1, "could not find full path for %s", fn);
+	fd = open(mdio.md_file, O_RDONLY);
+	if (fd < 0)
+		err(1, "could not open %s", fn);
+	if (fstat(fd, &sb) == -1)
+		err(1, "could not stat %s", fn);
+	if (!S_ISREG(sb.st_mode))
+		errx(1, "%s is not a regular file", fn);
+	if (mdio.md_mediasize == 0)
+		mdio.md_mediasize = sb.st_size;
+	close(fd);
+}
+
 /*
  * Lists md(4) disks. Is used also as a query routine, since it handles XML
  * interface. 'units' can be NULL for listing memory disks. It might be

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 23:00: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 8FEAB106566B;
	Fri, 29 Apr 2011 23:00:23 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BD708FC08;
	Fri, 29 Apr 2011 23:00: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 p3TN0Nlj019293;
	Fri, 29 Apr 2011 23:00:23 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TN0N8N019287;
	Fri, 29 Apr 2011 23:00:23 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201104292300.p3TN0N8N019287@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Fri, 29 Apr 2011 23:00: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: r221233 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 23:00:23 -0000

Author: des
Date: Fri Apr 29 23:00:23 2011
New Revision: 221233
URL: http://svn.freebsd.org/changeset/base/221233

Log:
  Add an -E option to mirror newfs's.  The idea is that if you have a system
  that was built before ffs grew support for TRIM, your filesystem will have
  plenty of free blocks that the flash chip doesn't know are free, so it
  can't take advantage of them for wear leveling.  Once you've upgraded your
  kernel, you enable TRIM on the filesystem (tunefs -t enable), then run
  fsck_ffs -E on it before mounting it.
  
  I tested this patch by half-filling an mdconfig'ed filesystem image,
  running fsck_ffs -E on it, then verifying that the contents were not
  damaged by comparing them to a pristine copy using rsync's checksum
  functionality.  There is no reliable way to test it on real hardware.
  
  Many thanks to mckusick@, who provided the tricky parts of this patch and
  reviewed the final version.
  
  Reviewed by:	mckusick@
  MFC after:	3 weeks

Modified:
  head/sbin/fsck_ffs/fsck.h
  head/sbin/fsck_ffs/fsck_ffs.8
  head/sbin/fsck_ffs/fsutil.c
  head/sbin/fsck_ffs/main.c
  head/sbin/fsck_ffs/pass5.c

Modified: head/sbin/fsck_ffs/fsck.h
==============================================================================
--- head/sbin/fsck_ffs/fsck.h	Fri Apr 29 22:40:11 2011	(r221232)
+++ head/sbin/fsck_ffs/fsck.h	Fri Apr 29 23:00:23 2011	(r221233)
@@ -274,6 +274,7 @@ char	yflag;			/* assume a yes response *
 int	bkgrdflag;		/* use a snapshot to run on an active system */
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
+int	Eflag;			/* zero out empty data blocks */
 int	inoopt;			/* trim out unused inodes */
 char	ckclean;		/* only do work if not cleanly unmounted */
 int	cvtlevel;		/* convert to newer file system format */
@@ -337,6 +338,7 @@ char	       *blockcheck(char *name);
 int		blread(int fd, char *buf, ufs2_daddr_t blk, long size);
 void		bufinit(void);
 void		blwrite(int fd, char *buf, ufs2_daddr_t blk, long size);
+void		blerase(int fd, ufs2_daddr_t blk, long size);
 void		cacheino(union dinode *dp, ino_t inumber);
 void		catch(int);
 void		catchquit(int);

Modified: head/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- head/sbin/fsck_ffs/fsck_ffs.8	Fri Apr 29 22:40:11 2011	(r221232)
+++ head/sbin/fsck_ffs/fsck_ffs.8	Fri Apr 29 23:00:23 2011	(r221233)
@@ -29,7 +29,7 @@
 .\"	@(#)fsck.8	8.4 (Berkeley) 5/9/95
 .\" $FreeBSD$
 .\"
-.Dd January 25, 2009
+.Dd April 27, 2011
 .Dt FSCK_FFS 8
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 .Nd file system consistency check and interactive repair
 .Sh SYNOPSIS
 .Nm
-.Op Fl BFfnpry
+.Op Fl BEFfnpry
 .Op Fl b Ar block
 .Op Fl c Ar level
 .Op Fl m Ar mode
@@ -149,6 +149,24 @@ If unexpected errors are found,
 the file system is marked as needing a foreground check and
 .Nm
 exits without attempting any further cleaning.
+.It Fl E
+Clear unallocated blocks, notifying the underlying device that they
+are not used and that their contents may be discarded.
+This is useful for filesystems which have been mounted on systems
+without TRIM support, or with TRIM support disabled, as well as
+filesystems which have been copied from one device to another.
+.Pp
+See the
+.Fl E
+and
+.Fl t
+flags of
+.Xr newfs 8 ,
+and
+the
+.Fl t
+flag of
+.Xr tunefs 8 .
 .It Fl F
 Determine whether the file system needs to be cleaned immediately
 in foreground, or if its cleaning can be deferred to background.

Modified: head/sbin/fsck_ffs/fsutil.c
==============================================================================
--- head/sbin/fsck_ffs/fsutil.c	Fri Apr 29 22:40:11 2011	(r221232)
+++ head/sbin/fsck_ffs/fsutil.c	Fri Apr 29 23:00:23 2011	(r221233)
@@ -39,9 +39,10 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
-#include 
 
 #include 
 #include 
@@ -421,6 +422,20 @@ blwrite(int fd, char *buf, ufs2_daddr_t 
 	return;
 }
 
+void
+blerase(int fd, ufs2_daddr_t blk, long size)
+{
+	off_t ioarg[2];
+
+	if (fd < 0)
+		return;
+	ioarg[0] = blk * dev_bsize;
+	ioarg[1] = size;
+	ioctl(fd, DIOCGDELETE, ioarg);
+	/* we don't really care if we succeed or not */
+	return;
+}
+
 /*
  * Verify cylinder group's magic number and other parameters.  If the
  * test fails, offer an option to rebuild the whole cylinder group.

Modified: head/sbin/fsck_ffs/main.c
==============================================================================
--- head/sbin/fsck_ffs/main.c	Fri Apr 29 22:40:11 2011	(r221232)
+++ head/sbin/fsck_ffs/main.c	Fri Apr 29 23:00:23 2011	(r221233)
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
 	sync();
 	skipclean = 1;
 	inoopt = 0;
-	while ((ch = getopt(argc, argv, "b:Bc:CdfFm:npry")) != -1) {
+	while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npry")) != -1) {
 		switch (ch) {
 		case 'b':
 			skipclean = 0;
@@ -106,6 +106,10 @@ main(int argc, char *argv[])
 			debug++;
 			break;
 
+		case 'E':
+			Eflag++;
+			break;
+
 		case 'f':
 			skipclean = 0;
 			break;
@@ -632,7 +636,7 @@ static void
 usage(void)
 {
 	(void) fprintf(stderr,
-	    "usage: %s [-BFprfny] [-b block] [-c level] [-m mode] "
+	    "usage: %s [-BEFprfny] [-b block] [-c level] [-m mode] "
 			"filesystem ...\n",
 	    getprogname());
 	exit(1);

Modified: head/sbin/fsck_ffs/pass5.c
==============================================================================
--- head/sbin/fsck_ffs/pass5.c	Fri Apr 29 22:40:11 2011	(r221232)
+++ head/sbin/fsck_ffs/pass5.c	Fri Apr 29 23:00:23 2011	(r221233)
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
 
 static void check_maps(u_char *, u_char *, int, ufs2_daddr_t, const char *, int *, int, int);
 
+static void clear_blocks(ufs2_daddr_t start, ufs2_daddr_t end);
+
 void
 pass5(void)
 {
@@ -58,7 +60,7 @@ pass5(void)
 	int inomapsize, blkmapsize;
 	struct fs *fs = &sblock;
 	struct cg *cg = &cgrp;
-	ufs2_daddr_t d, dbase, dmax;
+	ufs2_daddr_t d, dbase, dmax, start;
 	int excessdirs, rewritecg = 0;
 	struct csum *cs;
 	struct csum_total cstotal;
@@ -242,13 +244,21 @@ pass5(void)
 				setbit(cg_inosused(newcg), i);
 				newcg->cg_cs.cs_nifree--;
 			}
+		start = -1;
 		for (i = 0, d = dbase;
 		     d < dmax;
 		     d += fs->fs_frag, i += fs->fs_frag) {
 			frags = 0;
 			for (j = 0; j < fs->fs_frag; j++) {
-				if (testbmap(d + j))
+				if (testbmap(d + j)) {
+					if (Eflag && start != -1) {
+						clear_blocks(start, d + j - 1);
+						start = -1;
+					}
 					continue;
+				}
+				if (start == -1)
+					start = d + j;
 				setbit(cg_blksfree(newcg), i + j);
 				frags++;
 			}
@@ -263,6 +273,8 @@ pass5(void)
 				ffs_fragacct(fs, blk, newcg->cg_frsum, 1);
 			}
 		}
+		if (Eflag && start != -1)
+			clear_blocks(start, d - 1);
 		if (fs->fs_contigsumsize > 0) {
 			int32_t *sump = cg_clustersum(newcg);
 			u_char *mapp = cg_clustersfree(newcg);
@@ -551,3 +563,12 @@ check_maps(
 		}
 	}
 }
+
+static void clear_blocks(ufs2_daddr_t start, ufs2_daddr_t end)
+{
+
+	if (debug)
+		printf("Zero frags %jd to %jd\n", start, end);
+	blerase(fswritefd, fsbtodb(&sblock, start),
+	    lfragtosize(&sblock, end - start + 1));
+}

From owner-svn-src-all@FreeBSD.ORG  Fri Apr 29 23:13: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 BD2061065677;
	Fri, 29 Apr 2011 23:13:43 +0000 (UTC)
	(envelope-from kargl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A8EA08FC17;
	Fri, 29 Apr 2011 23:13: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 p3TNDhVf019726;
	Fri, 29 Apr 2011 23:13:43 GMT (envelope-from kargl@svn.freebsd.org)
Received: (from kargl@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3TNDhD6019720;
	Fri, 29 Apr 2011 23:13:43 GMT (envelope-from kargl@svn.freebsd.org)
Message-Id: <201104292313.p3TNDhD6019720@svn.freebsd.org>
From: Steve Kargl 
Date: Fri, 29 Apr 2011 23:13: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: r221234 - in head/lib/msun: ld128 ld80 src
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 29 Apr 2011 23:13:43 -0000

Author: kargl
Date: Fri Apr 29 23:13:43 2011
New Revision: 221234
URL: http://svn.freebsd.org/changeset/base/221234

Log:
  Improve the accuracy from a max ULP of ~2000 to max ULP < 0.79
  on i386-class hardware for sinl and cosl.  The hand-rolled argument
  reduction have been replaced by e_rem_pio2l() implementations.  To
  preserve history the following commands have been executed:
  
  svn cp src/e_rem_pio2.c ld80/e_rem_pio2l.h
  mv ${HOME}/bde/ld80/e_rem_pio2l.c ld80/e_rem_pio2l.h
  
  svn cp src/e_rem_pio2.c ld128/e_rem_pio2l.h
  mv ${HOME}/bde/ld128/e_rem_pio2l.c ld128/e_rem_pio2l.h
  
  The ld80 version has been tested by bde, das, and kargl over the
  last few years (bde, das) and few months (kargl).  An older ld128
  version was tested by das.  The committed version has only been
  compiled tested via 'make universe'.
  
  Approved by: das (mentor)
  Obtained from: bde

Added:
  head/lib/msun/ld128/e_rem_pio2l.h
     - copied, changed from r221219, head/lib/msun/src/e_rem_pio2.c
  head/lib/msun/ld80/e_rem_pio2l.h
     - copied, changed from r221219, head/lib/msun/src/e_rem_pio2.c
Modified:
  head/lib/msun/src/s_cosl.c
  head/lib/msun/src/s_sinl.c
  head/lib/msun/src/s_tanl.c

Copied and modified: head/lib/msun/ld128/e_rem_pio2l.h (from r221219, head/lib/msun/src/e_rem_pio2.c)
==============================================================================
--- head/lib/msun/src/e_rem_pio2.c	Fri Apr 29 18:49:36 2011	(r221219, copy source)
+++ head/lib/msun/ld128/e_rem_pio2l.h	Fri Apr 29 23:13:43 2011	(r221234)
@@ -1,8 +1,8 @@
-
-/* @(#)e_rem_pio2.c 1.4 95/01/18 */
+/* From: @(#)e_rem_pio2.c 1.4 95/01/18 */
 /*
  * ====================================================
  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans.
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
@@ -16,7 +16,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/* __ieee754_rem_pio2(x,y)
+/* ld128 version of __ieee754_rem_pio2l(x,y)
  * 
  * return the remainder of x rem pi/2 in y[0]+y[1] 
  * use __kernel_rem_pio2()
@@ -26,132 +26,85 @@ __FBSDID("$FreeBSD$");
 
 #include "math.h"
 #include "math_private.h"
+#include "fpmath.h"
+
+#define	BIAS	(LDBL_MAX_EXP - 1)
 
 /*
- * invpio2:  53 bits of 2/pi
- * pio2_1:   first  33 bit of pi/2
+ * XXX need to verify that nonzero integer multiples of pi/2 within the
+ * range get no closer to a long double than 2**-140, or that
+ * ilogb(x) + ilogb(min_delta) < 45 - -140.
+ */
+/*
+ * invpio2:  113 bits of 2/pi
+ * pio2_1:   first  68 bits of pi/2
  * pio2_1t:  pi/2 - pio2_1
- * pio2_2:   second 33 bit of pi/2
+ * pio2_2:   second 68 bits of pi/2
  * pio2_2t:  pi/2 - (pio2_1+pio2_2)
- * pio2_3:   third  33 bit of pi/2
+ * pio2_3:   third  68 bits of pi/2
  * pio2_3t:  pi/2 - (pio2_1+pio2_2+pio2_3)
  */
 
 static const double
 zero =  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
-two24 =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
-invpio2 =  6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
-pio2_1  =  1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
-pio2_1t =  6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
-pio2_2  =  6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
-pio2_2t =  2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
-pio2_3  =  2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
-pio2_3t =  8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
+two24 =  1.67772160000000000000e+07; /* 0x41700000, 0x00000000 */
 
-#ifndef INLINE_REM_PIO2
-extern
+static const long double
+invpio2 =  6.3661977236758134307553505349005747e-01L,	/*  0x145f306dc9c882a53f84eafa3ea6a.0p-113 */
+pio2_1  =  1.5707963267948966192292994253909555e+00L,	/*  0x1921fb54442d18469800000000000.0p-112 */
+pio2_1t =  2.0222662487959507323996846200947577e-21L,	/*  0x13198a2e03707344a4093822299f3.0p-181 */
+pio2_2  =  2.0222662487959507323994779168837751e-21L,	/*  0x13198a2e03707344a400000000000.0p-181 */
+pio2_2t =  2.0670321098263988236496903051604844e-43L,	/*  0x127044533e63a0105df531d89cd91.0p-254 */
+pio2_3  =  2.0670321098263988236499468110329591e-43L,	/*  0x127044533e63a0105e00000000000.0p-254 */
+pio2_3t = -2.5650587247459238361625433492959285e-65L;	/* -0x159c4ec64ddaeb5f78671cbfb2210.0p-327 */
+
+#ifdef INLINE_REM_PIO2L
+static inline __always_inline
 #endif
-__inline int
-__ieee754_rem_pio2(double x, double *y)
+int
+__ieee754_rem_pio2l(long double x, long double *y)
 {
-	double z,w,t,r,fn;
-	double tx[3],ty[2];
-	int32_t e0,i,j,nx,n,ix,hx;
-	u_int32_t low;
-
-	GET_HIGH_WORD(hx,x);		/* high word of x */
-	ix = hx&0x7fffffff;
-#if 0 /* Must be handled in caller. */
-	if(ix<=0x3fe921fb)   /* |x| ~<= pi/4 , no need for reduction */
-	    {y[0] = x; y[1] = 0; return 0;}
-#endif
-	if (ix <= 0x400f6a7a) {		/* |x| ~<= 5pi/4 */
-	    if ((ix & 0xfffff) == 0x921fb)  /* |x| ~= pi/2 or 2pi/2 */
-		goto medium;		/* cancellation -- use medium case */
-	    if (ix <= 0x4002d97c) {	/* |x| ~<= 3pi/4 */
-		if (hx > 0) {
-		    z = x - pio2_1;	/* one round good to 85 bits */
-		    y[0] = z - pio2_1t;
-		    y[1] = (z-y[0])-pio2_1t;
-		    return 1;
-		} else {
-		    z = x + pio2_1;
-		    y[0] = z + pio2_1t;
-		    y[1] = (z-y[0])+pio2_1t;
-		    return -1;
-		}
-	    } else {
-		if (hx > 0) {
-		    z = x - 2*pio2_1;
-		    y[0] = z - 2*pio2_1t;
-		    y[1] = (z-y[0])-2*pio2_1t;
-		    return 2;
-		} else {
-		    z = x + 2*pio2_1;
-		    y[0] = z + 2*pio2_1t;
-		    y[1] = (z-y[0])+2*pio2_1t;
-		    return -2;
-		}
-	    }
-	}
-	if (ix <= 0x401c463b) {		/* |x| ~<= 9pi/4 */
-	    if (ix <= 0x4015fdbc) {	/* |x| ~<= 7pi/4 */
-		if (ix == 0x4012d97c)	/* |x| ~= 3pi/2 */
-		    goto medium;
-		if (hx > 0) {
-		    z = x - 3*pio2_1;
-		    y[0] = z - 3*pio2_1t;
-		    y[1] = (z-y[0])-3*pio2_1t;
-		    return 3;
-		} else {
-		    z = x + 3*pio2_1;
-		    y[0] = z + 3*pio2_1t;
-		    y[1] = (z-y[0])+3*pio2_1t;
-		    return -3;
-		}
-	    } else {
-		if (ix == 0x401921fb)	/* |x| ~= 4pi/2 */
-		    goto medium;
-		if (hx > 0) {
-		    z = x - 4*pio2_1;
-		    y[0] = z - 4*pio2_1t;
-		    y[1] = (z-y[0])-4*pio2_1t;
-		    return 4;
-		} else {
-		    z = x + 4*pio2_1;
-		    y[0] = z + 4*pio2_1t;
-		    y[1] = (z-y[0])+4*pio2_1t;
-		    return -4;
-		}
-	    }
-	}
-	if(ix<0x413921fb) {	/* |x| ~< 2^20*(pi/2), medium size */
-medium:
+	union IEEEl2bits u,u1;
+	long double z,w,t,r,fn;
+	double tx[5],ty[3];
+	int64_t n;
+	int e0,ex,i,j,nx;
+	int16_t expsign;
+
+	u.e = x;
+	expsign = u.xbits.expsign;
+	ex = expsign & 0x7fff;
+	if (ex < BIAS + 45 || ex == BIAS + 45 &&
+	    u.bits.manh < 0x921fb54442d1LL) {
+	    /* |x| ~< 2^45*(pi/2), medium size */
 	    /* Use a specialized rint() to get fn.  Assume round-to-nearest. */
-	    STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52);
-	    fn = fn-0x1.8p52;
-#ifdef HAVE_EFFICIENT_IRINT
-	    n  = irint(fn);
+	    fn = x*invpio2+0x1.8p112;
+	    fn = fn-0x1.8p112;
+#ifdef HAVE_EFFICIENT_I64RINT
+	    n  = i64rint(fn);
 #else
-	    n  = (int32_t)fn;
+	    n  = fn;
 #endif
 	    r  = x-fn*pio2_1;
-	    w  = fn*pio2_1t;	/* 1st round good to 85 bit */
+	    w  = fn*pio2_1t;	/* 1st round good to 180 bit */
 	    {
-	        u_int32_t high;
-	        j  = ix>>20;
+		union IEEEl2bits u2;
+	        int ex1;
+	        j  = ex;
 	        y[0] = r-w; 
-		GET_HIGH_WORD(high,y[0]);
-	        i = j-((high>>20)&0x7ff);
-	        if(i>16) {  /* 2nd iteration needed, good to 118 */
+		u2.e = y[0];
+		ex1 = u2.xbits.expsign & 0x7fff;
+	        i = j-ex1;
+	        if(i>51) {  /* 2nd iteration needed, good to 248 */
 		    t  = r;
 		    w  = fn*pio2_2;	
 		    r  = t-w;
 		    w  = fn*pio2_2t-((t-r)-w);	
 		    y[0] = r-w;
-		    GET_HIGH_WORD(high,y[0]);
-		    i = j-((high>>20)&0x7ff);
-		    if(i>49)  {	/* 3rd iteration need, 151 bits acc */
+		    u2.e = y[0];
+		    ex1 = u2.xbits.expsign & 0x7fff;
+		    i = j-ex1;
+		    if(i>119) {	/* 3rd iteration need, 316 bits acc */
 		    	t  = r;	/* will cover all possible cases */
 		    	w  = fn*pio2_3;	
 		    	r  = t-w;
@@ -166,22 +119,25 @@ medium:
     /* 
      * all other (large) arguments
      */
-	if(ix>=0x7ff00000) {		/* x is inf or NaN */
+	if(ex==0x7fff) {		/* x is inf or NaN */
 	    y[0]=y[1]=x-x; return 0;
 	}
     /* set z = scalbn(|x|,ilogb(x)-23) */
-	GET_LOW_WORD(low,x);
-	SET_LOW_WORD(z,low);
-	e0 	= (ix>>20)-1046;	/* e0 = ilogb(z)-23; */
-	SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
-	for(i=0;i<2;i++) {
+	u1.e = x;
+	e0 = ex - BIAS - 23;		/* e0 = ilogb(|x|)-23; */
+	u1.xbits.expsign = ex - e0;
+	z = u1.e;
+	for(i=0;i<4;i++) {
 		tx[i] = (double)((int32_t)(z));
 		z     = (z-tx[i])*two24;
 	}
-	tx[2] = z;
-	nx = 3;
+	tx[4] = z;
+	nx = 5;
 	while(tx[nx-1]==zero) nx--;	/* skip zero term */
-	n  =  __kernel_rem_pio2(tx,ty,e0,nx,1);
-	if(hx<0) {y[0] = -ty[0]; y[1] = -ty[1]; return -n;}
-	y[0] = ty[0]; y[1] = ty[1]; return n;
+	n  =  __kernel_rem_pio2(tx,ty,e0,nx,3);
+	t = (long double)ty[2] + ty[1];
+	r = t + ty[0];
+	w = ty[0] - (r - t);
+	if(expsign<0) {y[0] = -r; y[1] = -w; return -n;}
+	y[0] = r; y[1] = w; return n;
 }

Copied and modified: head/lib/msun/ld80/e_rem_pio2l.h (from r221219, head/lib/msun/src/e_rem_pio2.c)
==============================================================================
--- head/lib/msun/src/e_rem_pio2.c	Fri Apr 29 18:49:36 2011	(r221219, copy source)
+++ head/lib/msun/ld80/e_rem_pio2l.h	Fri Apr 29 23:13:43 2011	(r221234)
@@ -1,8 +1,8 @@
-
-/* @(#)e_rem_pio2.c 1.4 95/01/18 */
+/* From: @(#)e_rem_pio2.c 1.4 95/01/18 */
 /*
  * ====================================================
  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2008 Steven G. Kargl, David Schultz, Bruce D. Evans.
  *
  * Developed at SunSoft, a Sun Microsystems, Inc. business.
  * Permission to use, copy, modify, and distribute this
@@ -16,7 +16,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/* __ieee754_rem_pio2(x,y)
+/* ld80 version of __ieee754_rem_pio2l(x,y)
  * 
  * return the remainder of x rem pi/2 in y[0]+y[1] 
  * use __kernel_rem_pio2()
@@ -26,132 +26,95 @@ __FBSDID("$FreeBSD$");
 
 #include "math.h"
 #include "math_private.h"
+#include "fpmath.h"
+
+#define	BIAS	(LDBL_MAX_EXP - 1)
 
 /*
- * invpio2:  53 bits of 2/pi
- * pio2_1:   first  33 bit of pi/2
+ * invpio2:  64 bits of 2/pi
+ * pio2_1:   first  39 bits of pi/2
  * pio2_1t:  pi/2 - pio2_1
- * pio2_2:   second 33 bit of pi/2
+ * pio2_2:   second 39 bits of pi/2
  * pio2_2t:  pi/2 - (pio2_1+pio2_2)
- * pio2_3:   third  33 bit of pi/2
+ * pio2_3:   third  39 bits of pi/2
  * pio2_3t:  pi/2 - (pio2_1+pio2_2+pio2_3)
  */
 
 static const double
 zero =  0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
 two24 =  1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
-invpio2 =  6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
-pio2_1  =  1.57079632673412561417e+00, /* 0x3FF921FB, 0x54400000 */
-pio2_1t =  6.07710050650619224932e-11, /* 0x3DD0B461, 0x1A626331 */
-pio2_2  =  6.07710050630396597660e-11, /* 0x3DD0B461, 0x1A600000 */
-pio2_2t =  2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
-pio2_3  =  2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
-pio2_3t =  8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
+pio2_1  =  1.57079632679597125389e+00,	/* 0x3FF921FB, 0x54444000 */
+pio2_2  = -1.07463465549783099519e-12,	/* -0x12e7b967674000.0p-92 */
+pio2_3  =  6.36831716351370313614e-25;	/*  0x18a2e037074000.0p-133 */
+
+#if defined(__amd64__) || defined(__i386__)
+/* Long double constants are slow on these arches, and broken on i386. */
+static const volatile double
+invpio2hi =  6.3661977236758138e-01,	/*  0x145f306dc9c883.0p-53 */
+invpio2lo = -3.9356538861223811e-17,	/* -0x16b00000000000.0p-107 */
+pio2_1thi = -1.0746346554971943e-12,	/* -0x12e7b9676733af.0p-92 */
+pio2_1tlo =  8.8451028997905949e-29,	/*  0x1c080000000000.0p-146 */
+pio2_2thi =  6.3683171635109499e-25,	/*  0x18a2e03707344a.0p-133 */
+pio2_2tlo =  2.3183081793789774e-41,	/*  0x10280000000000.0p-187 */
+pio2_3thi = -2.7529965190440717e-37,	/* -0x176b7ed8fbbacc.0p-174 */
+pio2_3tlo = -4.2006647512740502e-54;	/* -0x19c00000000000.0p-230 */
+#define	invpio2	((long double)invpio2hi + invpio2lo)
+#define	pio2_1t	((long double)pio2_1thi + pio2_1tlo)
+#define	pio2_2t	((long double)pio2_2thi + pio2_2tlo)
+#define	pio2_3t	((long double)pio2_3thi + pio2_3tlo)
+#else
+static const long double
+invpio2 =  6.36619772367581343076e-01L,	/*  0xa2f9836e4e44152a.0p-64 */
+pio2_1t = -1.07463465549719416346e-12L,	/* -0x973dcb3b399d747f.0p-103 */
+pio2_2t =  6.36831716351095013979e-25L,	/*  0xc51701b839a25205.0p-144 */
+pio2_3t = -2.75299651904407171810e-37L;	/* -0xbb5bf6c7ddd660ce.0p-185 */
+#endif
 
-#ifndef INLINE_REM_PIO2
-extern
+#ifdef INLINE_REM_PIO2L
+static inline __always_inline
 #endif
-__inline int
-__ieee754_rem_pio2(double x, double *y)
+int
+__ieee754_rem_pio2l(long double x, long double *y)
 {
-	double z,w,t,r,fn;
+	union IEEEl2bits u,u1;
+	long double z,w,t,r,fn;
 	double tx[3],ty[2];
-	int32_t e0,i,j,nx,n,ix,hx;
-	u_int32_t low;
+	int e0,ex,i,j,nx,n;
+	int16_t expsign;
 
-	GET_HIGH_WORD(hx,x);		/* high word of x */
-	ix = hx&0x7fffffff;
-#if 0 /* Must be handled in caller. */
-	if(ix<=0x3fe921fb)   /* |x| ~<= pi/4 , no need for reduction */
-	    {y[0] = x; y[1] = 0; return 0;}
-#endif
-	if (ix <= 0x400f6a7a) {		/* |x| ~<= 5pi/4 */
-	    if ((ix & 0xfffff) == 0x921fb)  /* |x| ~= pi/2 or 2pi/2 */
-		goto medium;		/* cancellation -- use medium case */
-	    if (ix <= 0x4002d97c) {	/* |x| ~<= 3pi/4 */
-		if (hx > 0) {
-		    z = x - pio2_1;	/* one round good to 85 bits */
-		    y[0] = z - pio2_1t;
-		    y[1] = (z-y[0])-pio2_1t;
-		    return 1;
-		} else {
-		    z = x + pio2_1;
-		    y[0] = z + pio2_1t;
-		    y[1] = (z-y[0])+pio2_1t;
-		    return -1;
-		}
-	    } else {
-		if (hx > 0) {
-		    z = x - 2*pio2_1;
-		    y[0] = z - 2*pio2_1t;
-		    y[1] = (z-y[0])-2*pio2_1t;
-		    return 2;
-		} else {
-		    z = x + 2*pio2_1;
-		    y[0] = z + 2*pio2_1t;
-		    y[1] = (z-y[0])+2*pio2_1t;
-		    return -2;
-		}
-	    }
-	}
-	if (ix <= 0x401c463b) {		/* |x| ~<= 9pi/4 */
-	    if (ix <= 0x4015fdbc) {	/* |x| ~<= 7pi/4 */
-		if (ix == 0x4012d97c)	/* |x| ~= 3pi/2 */
-		    goto medium;
-		if (hx > 0) {
-		    z = x - 3*pio2_1;
-		    y[0] = z - 3*pio2_1t;
-		    y[1] = (z-y[0])-3*pio2_1t;
-		    return 3;
-		} else {
-		    z = x + 3*pio2_1;
-		    y[0] = z + 3*pio2_1t;
-		    y[1] = (z-y[0])+3*pio2_1t;
-		    return -3;
-		}
-	    } else {
-		if (ix == 0x401921fb)	/* |x| ~= 4pi/2 */
-		    goto medium;
-		if (hx > 0) {
-		    z = x - 4*pio2_1;
-		    y[0] = z - 4*pio2_1t;
-		    y[1] = (z-y[0])-4*pio2_1t;
-		    return 4;
-		} else {
-		    z = x + 4*pio2_1;
-		    y[0] = z + 4*pio2_1t;
-		    y[1] = (z-y[0])+4*pio2_1t;
-		    return -4;
-		}
-	    }
-	}
-	if(ix<0x413921fb) {	/* |x| ~< 2^20*(pi/2), medium size */
-medium:
+	u.e = x;
+	expsign = u.xbits.expsign;
+	ex = expsign & 0x7fff;
+	if (ex < BIAS + 25 || ex == BIAS + 25 && u.bits.manh < 0xc90fdaa2) {
+	    /* |x| ~< 2^25*(pi/2), medium size */
 	    /* Use a specialized rint() to get fn.  Assume round-to-nearest. */
-	    STRICT_ASSIGN(double,fn,x*invpio2+0x1.8p52);
-	    fn = fn-0x1.8p52;
+	    fn = x*invpio2+0x1.8p63;
+	    fn = fn-0x1.8p63;
 #ifdef HAVE_EFFICIENT_IRINT
 	    n  = irint(fn);
 #else
-	    n  = (int32_t)fn;
+	    n  = fn;
 #endif
 	    r  = x-fn*pio2_1;
-	    w  = fn*pio2_1t;	/* 1st round good to 85 bit */
+	    w  = fn*pio2_1t;	/* 1st round good to 102 bit */
 	    {
-	        u_int32_t high;
-	        j  = ix>>20;
+		union IEEEl2bits u2;
+	        int ex1;
+	        j  = ex;
 	        y[0] = r-w; 
-		GET_HIGH_WORD(high,y[0]);
-	        i = j-((high>>20)&0x7ff);
-	        if(i>16) {  /* 2nd iteration needed, good to 118 */
+		u2.e = y[0];
+		ex1 = u2.xbits.expsign & 0x7fff;
+	        i = j-ex1;
+	        if(i>22) {  /* 2nd iteration needed, good to 141 */
 		    t  = r;
 		    w  = fn*pio2_2;	
 		    r  = t-w;
 		    w  = fn*pio2_2t-((t-r)-w);	
 		    y[0] = r-w;
-		    GET_HIGH_WORD(high,y[0]);
-		    i = j-((high>>20)&0x7ff);
-		    if(i>49)  {	/* 3rd iteration need, 151 bits acc */
+		    u2.e = y[0];
+		    ex1 = u2.xbits.expsign & 0x7fff;
+		    i = j-ex1;
+		    if(i>61) {	/* 3rd iteration need, 180 bits acc */
 		    	t  = r;	/* will cover all possible cases */
 		    	w  = fn*pio2_3;	
 		    	r  = t-w;
@@ -166,14 +129,14 @@ medium:
     /* 
      * all other (large) arguments
      */
-	if(ix>=0x7ff00000) {		/* x is inf or NaN */
+	if(ex==0x7fff) {		/* x is inf or NaN */
 	    y[0]=y[1]=x-x; return 0;
 	}
     /* set z = scalbn(|x|,ilogb(x)-23) */
-	GET_LOW_WORD(low,x);
-	SET_LOW_WORD(z,low);
-	e0 	= (ix>>20)-1046;	/* e0 = ilogb(z)-23; */
-	SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
+	u1.e = x;
+	e0 = ex - BIAS - 23;		/* e0 = ilogb(|x|)-23; */
+	u1.xbits.expsign = ex - e0;
+	z = u1.e;
 	for(i=0;i<2;i++) {
 		tx[i] = (double)((int32_t)(z));
 		z     = (z-tx[i])*two24;
@@ -181,7 +144,9 @@ medium:
 	tx[2] = z;
 	nx = 3;
 	while(tx[nx-1]==zero) nx--;	/* skip zero term */
-	n  =  __kernel_rem_pio2(tx,ty,e0,nx,1);
-	if(hx<0) {y[0] = -ty[0]; y[1] = -ty[1]; return -n;}
-	y[0] = ty[0]; y[1] = ty[1]; return n;
+	n  =  __kernel_rem_pio2(tx,ty,e0,nx,2);
+	r = (long double)ty[0] + ty[1];
+	w = ty[1] - (r - ty[0]);
+	if(expsign<0) {y[0] = -r; y[1] = -w; return -n;}
+	y[0] = r; y[1] = w; return n;
 }

Modified: head/lib/msun/src/s_cosl.c
==============================================================================
--- head/lib/msun/src/s_cosl.c	Fri Apr 29 23:00:23 2011	(r221233)
+++ head/lib/msun/src/s_cosl.c	Fri Apr 29 23:13:43 2011	(r221234)
@@ -28,7 +28,6 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Compute cos(x) for x where x is reduced to y = x - k * pi / 2.
  * Limited testing on pseudorandom numbers drawn within [-2e8:4e8] shows
  * an accuracy of <= 0.7412 ULP.
  */
@@ -36,27 +35,22 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include "math.h"
+#define INLINE_REM_PIO2L
 #include "math_private.h"
-#include "fpmath.h"
-
 #if LDBL_MANT_DIG == 64
-#define	NX	3
-#define	PREC	2
+#include "../ld80/e_rem_pio2l.h"
 #elif LDBL_MANT_DIG == 113
-#define	NX	5
-#define	PREC	3
+#include "../ld128/e_rem_pio2l.h"
 #else
 #error "Unsupported long double format"
 #endif
 
-static const long double two24 = 1.67772160000000000000e+07L;
-
 long double
 cosl(long double x)
 {
 	union IEEEl2bits z;
-	int i, e0;
-	double xd[NX], yd[PREC];
+	int e0;
+	long double y[2];
 	long double hi, lo;
 
 	z.e = x;
@@ -74,26 +68,9 @@ cosl(long double x)
 	if (z.e < M_PI_4)
 		return (__kernel_cosl(z.e, 0));
 
-	/* Split z.e into a 24-bit representation. */
-	e0 = ilogbl(z.e) - 23;
-	z.e = scalbnl(z.e, -e0);
-	for (i = 0; i < NX; i++) {
-		xd[i] = (double)((int32_t)z.e);
-		z.e = (z.e - xd[i]) * two24;
-	}
-	
-	/* yd contains the pieces of xd rem pi/2 such that |yd| < pi/4. */
-	e0 = __kernel_rem_pio2(xd, yd, e0, NX, PREC);
-
-#if PREC == 2
-	hi = (long double)yd[0] + yd[1];
-	lo = yd[1] - (hi - yd[0]);
-#else /* PREC == 3 */
-	long double t;
-	t = (long double)yd[2] + yd[1];
-	hi = t + yd[0];
-	lo = yd[0] - (hi - t);
-#endif
+	e0 = __ieee754_rem_pio2l(x, y);
+	hi = y[0];
+	lo = y[1];
 
 	switch (e0 & 3) {
 	case 0:

Modified: head/lib/msun/src/s_sinl.c
==============================================================================
--- head/lib/msun/src/s_sinl.c	Fri Apr 29 23:00:23 2011	(r221233)
+++ head/lib/msun/src/s_sinl.c	Fri Apr 29 23:13:43 2011	(r221234)
@@ -27,34 +27,25 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-/*
- * Compute sin(x) for x where x is reduced to y = x - k * pi / 2.
- */
-
 #include 
 
 #include "math.h"
+#define INLINE_REM_PIO2L
 #include "math_private.h"
-#include "fpmath.h"
-
 #if LDBL_MANT_DIG == 64
-#define	NX	3
-#define	PREC	2
+#include "../ld80/e_rem_pio2l.h"
 #elif LDBL_MANT_DIG == 113
-#define	NX	5
-#define	PREC	3
+#include "../ld128/e_rem_pio2l.h"
 #else
 #error "Unsupported long double format"
 #endif
 
-static const long double two24 = 1.67772160000000000000e+07L;
-
 long double
 sinl(long double x)
 {
 	union IEEEl2bits z;
-	int i, e0, s;
-	double xd[NX], yd[PREC];
+	int e0, s;
+	long double y[2];
 	long double hi, lo;
 
 	z.e = x;
@@ -75,26 +66,9 @@ sinl(long double x)
 		return  (s ? -hi : hi);
 	}
 
-	/* Split z.e into a 24-bit representation. */
-	e0 = ilogbl(z.e) - 23;
-	z.e = scalbnl(z.e, -e0);
-	for (i = 0; i < NX; i++) {
-		xd[i] = (double)((int32_t)z.e);
-		z.e = (z.e - xd[i]) * two24;
-	}
-
-	/* yd contains the pieces of xd rem pi/2 such that |yd| < pi/4. */
-	e0 = __kernel_rem_pio2(xd, yd, e0, NX, PREC);
-
-#if PREC == 2
-	hi = (long double)yd[0] + yd[1];
-	lo = yd[1] - (hi - yd[0]);
-#else /* PREC == 3 */
-	long double t;
-	t = (long double)yd[2] + yd[1];
-	hi = t + yd[0];
-	lo = yd[0] - (hi - t);
-#endif
+	e0 = __ieee754_rem_pio2l(x, y);
+	hi = y[0];
+	lo = y[1];
 
 	switch (e0 & 3) {
 	case 0:
@@ -111,5 +85,5 @@ sinl(long double x)
 	    break;
 	}
 	
-	return (s ? -hi : hi);
+	return (hi);
 }

Modified: head/lib/msun/src/s_tanl.c
==============================================================================
--- head/lib/msun/src/s_tanl.c	Fri Apr 29 23:00:23 2011	(r221233)
+++ head/lib/msun/src/s_tanl.c	Fri Apr 29 23:13:43 2011	(r221234)
@@ -28,7 +28,6 @@
 __FBSDID("$FreeBSD$");
 
 /*
- * Compute tan(x) for x where x is reduced to y = x - k * pi / 2.
  * Limited testing on pseudorandom numbers drawn within [0:4e8] shows
  * an accuracy of <= 1.5 ULP where 247024 values of x out of 40 million
  * possibles resulted in tan(x) that exceeded 0.5 ULP (ie., 0.6%).
@@ -37,27 +36,22 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include "math.h"
+#define INLINE_REM_PIO2L
 #include "math_private.h"
-#include "fpmath.h"
-
 #if LDBL_MANT_DIG == 64
-#define	NX	3
-#define	PREC	2
+#include "../ld80/e_rem_pio2l.h"
 #elif LDBL_MANT_DIG == 113
-#define	NX	5
-#define	PREC	3
+#include "../ld128/e_rem_pio2l.h"
 #else
 #error "Unsupported long double format"
 #endif
 
-static const long double two24 = 1.67772160000000000000e+07L;
-
 long double
 tanl(long double x)
 {
 	union IEEEl2bits z;
-	int i, e0, s;
-	double xd[NX], yd[PREC];
+	int e0, s;
+	long double y[2];
 	long double hi, lo;
 
 	z.e = x;
@@ -78,26 +72,9 @@ tanl(long double x)
 		return (s ? -hi : hi);
 	}
 
-	/* Split z.e into a 24-bit representation. */
-	e0 = ilogbl(z.e) - 23;
-	z.e = scalbnl(z.e, -e0);
-	for (i = 0; i < NX; i++) {
-		xd[i] = (double)((int32_t)z.e);
-		z.e = (z.e - xd[i]) * two24;
-	}
-	
-	/* yd contains the pieces of xd rem pi/2 such that |yd| < pi/4. */
-	e0 = __kernel_rem_pio2(xd, yd, e0, NX, PREC);
-
-#if PREC == 2
-	hi = (long double)yd[0] + yd[1];
-	lo = yd[1] - (hi - yd[0]);
-#else /* PREC == 3 */
-	long double t;
-	t = (long double)yd[2] + yd[1];
-	hi = t + yd[0];
-	lo = yd[0] - (hi - t);
-#endif
+	e0 = __ieee754_rem_pio2l(x, y);
+	hi = y[0];
+	lo = y[1];
 
 	switch (e0 & 3) {
 	case 0:
@@ -110,5 +87,5 @@ tanl(long double x)
 	    break;
 	}
 
-	return (s ? -hi : hi);
+	return (hi);
 }

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 01:16: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 952CB106566B;
	Sat, 30 Apr 2011 01:16:20 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 4A8278FC08;
	Sat, 30 Apr 2011 01:16: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 p3U1GKku023399;
	Sat, 30 Apr 2011 01:16:20 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3U1GKM3023397;
	Sat, 30 Apr 2011 01:16:20 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104300116.p3U1GKM3023397@svn.freebsd.org>
From: Rick Macklem 
Date: Sat, 30 Apr 2011 01:16:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r221237 - stable/8/sys/fs/nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 01:16:20 -0000

Author: rmacklem
Date: Sat Apr 30 01:16:19 2011
New Revision: 221237
URL: http://svn.freebsd.org/changeset/base/221237

Log:
  MFC: r220731
  Add mutex locking on the nfs node in ncl_inactive() for the
  experimental NFS client.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clnode.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 30 00:44:17 2011	(r221236)
+++ stable/8/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 30 01:16:19 2011	(r221237)
@@ -202,12 +202,14 @@ ncl_inactive(struct vop_inactive_args *a
 		(void) nfsrpc_close(vp, 1, ap->a_td);
 	}
 
+	mtx_lock(&np->n_mtx);
 	if (vp->v_type != VDIR) {
 		sp = np->n_sillyrename;
 		np->n_sillyrename = NULL;
 	} else
 		sp = NULL;
 	if (sp) {
+		mtx_unlock(&np->n_mtx);
 		(void) ncl_vinvalbuf(vp, 0, ap->a_td, 1);
 		/*
 		 * Remove the silly file that was rename'd earlier
@@ -216,8 +218,10 @@ ncl_inactive(struct vop_inactive_args *a
 		crfree(sp->s_cred);
 		vrele(sp->s_dvp);
 		FREE((caddr_t)sp, M_NEWNFSREQ);
+		mtx_lock(&np->n_mtx);
 	}
 	np->n_flag &= NMODIFIED;
+	mtx_unlock(&np->n_mtx);
 	return (0);
 }
 

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 01: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 5E141106566B;
	Sat, 30 Apr 2011 01:29:19 +0000 (UTC)
	(envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 408338FC13;
	Sat, 30 Apr 2011 01: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 p3U1TJR8023826;
	Sat, 30 Apr 2011 01:29:19 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3U1TJbL023818;
	Sat, 30 Apr 2011 01:29:19 GMT
	(envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201104300129.p3U1TJbL023818@svn.freebsd.org>
From: Rick Macklem 
Date: Sat, 30 Apr 2011 01:29: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: r221238 - in stable/8/sys/fs: nfs nfsclient
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 01:29:19 -0000

Author: rmacklem
Date: Sat Apr 30 01:29:18 2011
New Revision: 221238
URL: http://svn.freebsd.org/changeset/base/221238

Log:
  MFC: r220732
  Add a lktype flags argument to nfscl_nget() and ncl_nget() in the
  experimental NFS client so that its nfs_lookup() function can use
  cn_lkflags in a manner analagous to the regular NFS client.

Modified:
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfsclient/nfs_clnode.c
  stable/8/sys/fs/nfsclient/nfs_clport.c
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
  stable/8/sys/fs/nfsclient/nfs_clvfsops.c
  stable/8/sys/fs/nfsclient/nfs_clvnops.c
  stable/8/sys/fs/nfsclient/nfsnode.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/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfs/nfs_var.h	Sat Apr 30 01:29:18 2011	(r221238)
@@ -487,7 +487,7 @@ void nfscl_cleanup(NFSPROC_T *);
 
 /* nfs_clport.c */
 int nfscl_nget(mount_t, vnode_t, struct nfsfh *,
-    struct componentname *, NFSPROC_T *, struct nfsnode **, void *);
+    struct componentname *, NFSPROC_T *, struct nfsnode **, void *, int);
 NFSPROC_T *nfscl_getparent(NFSPROC_T *);
 void nfscl_start_renewthread(struct nfsclclient *);
 void nfscl_loadsbinfo(struct nfsmount *, struct nfsstatfs *, void *);

Modified: stable/8/sys/fs/nfsclient/nfs_clnode.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfs_clnode.c	Sat Apr 30 01:29:18 2011	(r221238)
@@ -86,7 +86,8 @@ ncl_nhuninit(void)
  * nfsnode structure is returned.
  */
 int
-ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp)
+ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp,
+    int lkflags)
 {
 	struct thread *td = curthread;	/* XXX */
 	struct nfsnode *np;
@@ -106,7 +107,7 @@ ncl_nget(struct mount *mntp, u_int8_t *f
 	    M_NFSFH, M_WAITOK);
 	bcopy(fhp, &nfhp->nfh_fh[0], fhsize);
 	nfhp->nfh_len = fhsize;
-	error = vfs_hash_get(mntp, hash, LK_EXCLUSIVE,
+	error = vfs_hash_get(mntp, hash, lkflags,
 	    td, &nvp, newnfs_vncmpf, nfhp);
 	FREE(nfhp, M_NFSFH);
 	if (error)
@@ -168,7 +169,7 @@ ncl_nget(struct mount *mntp, u_int8_t *f
 		uma_zfree(newnfsnode_zone, np);
 		return (error);
 	}
-	error = vfs_hash_insert(vp, hash, LK_EXCLUSIVE, 
+	error = vfs_hash_insert(vp, hash, lkflags, 
 	    td, &nvp, newnfs_vncmpf, np->n_fhp);
 	if (error)
 		return (error);

Modified: stable/8/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clport.c	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfs_clport.c	Sat Apr 30 01:29:18 2011	(r221238)
@@ -85,7 +85,7 @@ newnfs_vncmpf(struct vnode *vp, void *ar
 int
 nfscl_nget(struct mount *mntp, struct vnode *dvp, struct nfsfh *nfhp,
     struct componentname *cnp, struct thread *td, struct nfsnode **npp,
-    void *stuff)
+    void *stuff, int lkflags)
 {
 	struct nfsnode *np, *dnp;
 	struct vnode *vp, *nvp;
@@ -100,7 +100,7 @@ nfscl_nget(struct mount *mntp, struct vn
 
 	hash = fnv_32_buf(nfhp->nfh_fh, nfhp->nfh_len, FNV1_32_INIT);
 
-	error = vfs_hash_get(mntp, hash, LK_EXCLUSIVE,
+	error = vfs_hash_get(mntp, hash, lkflags,
 	    td, &nvp, newnfs_vncmpf, nfhp);
 	if (error == 0 && nvp != NULL) {
 		/*
@@ -244,7 +244,7 @@ nfscl_nget(struct mount *mntp, struct vn
 		uma_zfree(newnfsnode_zone, np);
 		return (error);
 	}
-	error = vfs_hash_insert(vp, hash, LK_EXCLUSIVE, 
+	error = vfs_hash_insert(vp, hash, lkflags, 
 	    td, &nvp, newnfs_vncmpf, nfhp);
 	if (error)
 		return (error);

Modified: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Sat Apr 30 01:29:18 2011	(r221238)
@@ -3271,7 +3271,7 @@ nfsrpc_readdirplus(vnode_t vp, struct ui
 				    np = dnp;
 				} else {
 				    error = nfscl_nget(vnode_mount(vp), vp,
-				      nfhp, cnp, p, &np, NULL);
+				      nfhp, cnp, p, &np, NULL, LK_EXCLUSIVE);
 				    if (!error) {
 					newvp = NFSTOV(np);
 					unlocknewvp = 1;

Modified: stable/8/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfs_clvfsops.c	Sat Apr 30 01:29:18 2011	(r221238)
@@ -271,7 +271,7 @@ nfs_statfs(struct mount *mp, struct stat
 	error = vfs_busy(mp, MBF_NOWAIT);
 	if (error)
 		return (error);
-	error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np);
+	error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np, LK_EXCLUSIVE);
 	if (error) {
 		vfs_unbusy(mp);
 		return (error);
@@ -1219,7 +1219,8 @@ mountnfs(struct nfs_args *argp, struct m
 		 * by nfs_statfs() before any I/O occurs.
 		 */
 		mp->mnt_stat.f_iosize = NFS_DIRBLKSIZ;
-		error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np);
+		error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np,
+		    LK_EXCLUSIVE);
 		if (error)
 			goto bad;
 		*vpp = NFSTOV(np);
@@ -1334,7 +1335,7 @@ nfs_root(struct mount *mp, int flags, st
 	int error;
 
 	nmp = VFSTONFS(mp);
-	error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np);
+	error = ncl_nget(mp, nmp->nm_fh, nmp->nm_fhsize, &np, flags);
 	if (error)
 		return error;
 	vp = NFSTOV(np);

Modified: stable/8/sys/fs/nfsclient/nfs_clvnops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfs_clvnops.c	Sat Apr 30 01:29:18 2011	(r221238)
@@ -1156,7 +1156,8 @@ nfs_lookup(struct vop_lookup_args *ap)
 			FREE((caddr_t)nfhp, M_NFSFH);
 			return (EISDIR);
 		}
-		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+		    LK_EXCLUSIVE);
 		if (error)
 			return (error);
 		newvp = NFSTOV(np);
@@ -1185,7 +1186,8 @@ nfs_lookup(struct vop_lookup_args *ap)
 				return (error);
 		}
 		VOP_UNLOCK(dvp, 0);
-		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+		    cnp->cn_lkflags);
 		if (error == 0)
 			newvp = NFSTOV(np);
 		vfs_unbusy(mp);
@@ -1213,7 +1215,8 @@ nfs_lookup(struct vop_lookup_args *ap)
 			(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
 			    0, 1);
 	} else {
-		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+		error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+		    cnp->cn_lkflags);
 		if (error)
 			return (error);
 		newvp = NFSTOV(np);
@@ -1395,7 +1398,7 @@ nfs_mknodrpc(struct vnode *dvp, struct v
 			    NULL);
 		if (nfhp)
 			error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
-			    cnp->cn_thread, &np, NULL);
+			    cnp->cn_thread, &np, NULL, LK_EXCLUSIVE);
 	}
 	if (dattrflag)
 		(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
@@ -1497,7 +1500,7 @@ again:
 			    NULL);
 		if (nfhp != NULL)
 			error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
-			    cnp->cn_thread, &np, NULL);
+			    cnp->cn_thread, &np, NULL, LK_EXCLUSIVE);
 	}
 	if (dattrflag)
 		(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
@@ -1920,7 +1923,7 @@ nfs_symlink(struct vop_symlink_args *ap)
 	    &nfsva, &nfhp, &attrflag, &dattrflag, NULL);
 	if (nfhp) {
 		ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread,
-		    &np, NULL);
+		    &np, NULL, LK_EXCLUSIVE);
 		if (!ret)
 			newvp = NFSTOV(np);
 		else if (!error)
@@ -2003,7 +2006,7 @@ nfs_mkdir(struct vop_mkdir_args *ap)
 		dnp->n_attrstamp = 0;
 	if (nfhp) {
 		ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread,
-		    &np, NULL);
+		    &np, NULL, LK_EXCLUSIVE);
 		if (!ret) {
 			newvp = NFSTOV(np);
 			if (attrflag)
@@ -2378,7 +2381,7 @@ printf("replace=%s\n",nnn);
 		    cn.cn_nameptr = name;
 		    cn.cn_namelen = len;
 		    error = nfscl_nget(dvp->v_mount, dvp, nfhp, &cn, td,
-			&np, NULL);
+			&np, NULL, LK_EXCLUSIVE);
 		    if (error)
 			return (error);
 		    newvp = NFSTOV(np);

Modified: stable/8/sys/fs/nfsclient/nfsnode.h
==============================================================================
--- stable/8/sys/fs/nfsclient/nfsnode.h	Sat Apr 30 01:16:19 2011	(r221237)
+++ stable/8/sys/fs/nfsclient/nfsnode.h	Sat Apr 30 01:29:18 2011	(r221238)
@@ -186,7 +186,7 @@ int	ncl_reclaim(struct vop_reclaim_args 
 
 /* other stuff */
 int	ncl_removeit(struct sillyrename *, struct vnode *);
-int	ncl_nget(struct mount *, u_int8_t *, int, struct nfsnode **);
+int	ncl_nget(struct mount *, u_int8_t *, int, struct nfsnode **, int);
 nfsuint64 *ncl_getcookie(struct nfsnode *, off_t, int);
 void	ncl_invaldir(struct vnode *);
 int	ncl_upgrade_vnlock(struct vnode *);

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 01:34: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 DA076106564A;
	Sat, 30 Apr 2011 01:34:17 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id 95CFC8FC12;
	Sat, 30 Apr 2011 01:34:17 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 7C7881FFC5C;
	Sat, 30 Apr 2011 01:16:18 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 3005284571; Sat, 30 Apr 2011 03:16:18 +0200 (CEST)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Rick Macklem 
References: <201104271751.p3RHpp6H081910@svn.freebsd.org>
Date: Sat, 30 Apr 2011 03:16:18 +0200
In-Reply-To: <201104271751.p3RHpp6H081910@svn.freebsd.org> (Rick Macklem's
	message of "Wed, 27 Apr 2011 17:51:51 +0000 (UTC)")
Message-ID: <86y62sfsil.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs
	sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf
	sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
	sys/sun4v/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: Sat, 30 Apr 2011 01:34:17 -0000

Rick Macklem  writes:
> Log:
>   This patch changes head so that the default NFS client is now the new
>   NFS client (which I guess is no longer experimental). The fstype "newnf=
s"
>   is now "nfs" and the regular/old NFS client is now fstype "oldnfs".

Are you going to rename the sysctls as well?

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 02:31: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 093E1106564A;
	Sat, 30 Apr 2011 02:31:57 +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 ECF858FC08;
	Sat, 30 Apr 2011 02:31: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 p3U2VuAF025722;
	Sat, 30 Apr 2011 02:31:56 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3U2Vucq025720;
	Sat, 30 Apr 2011 02:31:56 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104300231.p3U2Vucq025720@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 02:31: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: r221240 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 02:31:57 -0000

Author: adrian
Date: Sat Apr 30 02:31:56 2011
New Revision: 221240
URL: http://svn.freebsd.org/changeset/base/221240

Log:
  Add a missing DDR FIFO method for the ar71xx.

Modified:
  head/sys/mips/atheros/ar71xx_chip.c

Modified: head/sys/mips/atheros/ar71xx_chip.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_chip.c	Sat Apr 30 01:49:36 2011	(r221239)
+++ head/sys/mips/atheros/ar71xx_chip.c	Sat Apr 30 02:31:56 2011	(r221240)
@@ -199,6 +199,12 @@ ar71xx_chip_ddr_flush_ge1(void)
 	ar71xx_ddr_flush(AR71XX_WB_FLUSH_GE1);
 }
 
+static void
+ar71xx_chip_ddr_flush_ip2(void)
+{
+	ar71xx_ddr_flush(AR71XX_WB_FLUSH_PCI);
+}
+
 static uint32_t
 ar71xx_chip_get_eth_pll(unsigned int mac, int speed)
 {
@@ -235,6 +241,6 @@ struct ar71xx_cpu_def ar71xx_chip_def = 
 	&ar71xx_chip_ddr_flush_ge0,
 	&ar71xx_chip_ddr_flush_ge1,
 	&ar71xx_chip_get_eth_pll,
-	NULL,
+	&ar71xx_chip_ddr_flush_ip2,
 	&ar71xx_chip_init_usb_peripheral,
 };

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 05:28: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 5E2B8106567E;
	Sat, 30 Apr 2011 05:28:55 +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 4E6878FC19;
	Sat, 30 Apr 2011 05:28: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 p3U5StZe031261;
	Sat, 30 Apr 2011 05:28:55 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3U5StZN031259;
	Sat, 30 Apr 2011 05:28:55 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201104300528.p3U5StZN031259@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 30 Apr 2011 05:28: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: r221242 -
	stable/8/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: Sat, 30 Apr 2011 05:28:55 -0000

Author: marcel
Date: Sat Apr 30 05:28:54 2011
New Revision: 221242
URL: http://svn.freebsd.org/changeset/base/221242

Log:
  Unbreak non-x86 and in particular ia64, The default stack size
  on ia64 is 32KB. Unconditionally hardcoding a 16KB stack for
  reasons of increasing the stack size on i386 is just wrong. If
  the size was indeed expressed in terms of pages, as the commit
  log suggested, then it would happen to be just right for ia64,
  though only accidentally.
  
  Pointy hat: avg, pjd

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Sat Apr 30 02:44:15 2011	(r221241)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Sat Apr 30 05:28:54 2011	(r221242)
@@ -129,6 +129,7 @@ void
 txg_sync_start(dsl_pool_t *dp)
 {
 	tx_state_t *tx = &dp->dp_tx;
+	size_t stksize = 0;
 
 	mutex_enter(&tx->tx_sync_lock);
 
@@ -146,7 +147,10 @@ txg_sync_start(dsl_pool_t *dp)
 	 * 32-bit x86.  This is due in part to nested pools and
 	 * scrub_visitbp() recursion.
 	 */
-	tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
+#ifdef __i386__
+	stksize = 16 << 10;
+#endif
+	tx->tx_sync_thread = thread_create(NULL, stksize, txg_sync_thread,
 	    dp, 0, &p0, TS_RUN, minclsyspri);
 
 	mutex_exit(&tx->tx_sync_lock);

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 07:27: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 67AB61065670;
	Sat, 30 Apr 2011 07:27:00 +0000 (UTC)
	(envelope-from mavbsd@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 8FCE88FC0A;
	Sat, 30 Apr 2011 07:26:58 +0000 (UTC)
Received: by bwz12 with SMTP id 12so5128545bwz.13
	for ; Sat, 30 Apr 2011 00:26:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:sender:message-id:date:from:user-agent
	:mime-version:to:cc:subject:references:in-reply-to
	:x-enigmail-version:content-type:content-transfer-encoding;
	bh=CC201cNTqnpXrqNLE+caOxXXTLUFXsuuDHYcHNDIfzQ=;
	b=MKbPaCiJ177Qg3SFM56kcUi/RI0RSoFft0hIus/a04nZAECD9nRRwX+gqLlW9bJnVs
	7dnFZbO/kpTTX776opJbOUpdbX3A9JeGt+u6daDA2m9d8h6OWFccNmoeE+8rIF+hoSLa
	plaPffHgqm7TVoUP3Vopts3IaukoL97RtqAOI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject
	:references:in-reply-to:x-enigmail-version:content-type
	:content-transfer-encoding;
	b=PjqhkoP2Tdb8O+LRrVgTb7KKC5tH6rDX3IGCHT1W1JIktRnO0qAGI/sPHtOh3k9TVm
	OpKcE7nZI2xcaBv7b8oss4ghUZP8M3dn8CSqwfJqVmbQ0i6U1FD/6SeVclO3cxWaP9a/
	iiD4x/rN0x64aN7fQ+18pq8kOxQlzaQLGvwvo=
Received: by 10.204.20.147 with SMTP id f19mr849064bkb.163.1304148418172;
	Sat, 30 Apr 2011 00:26:58 -0700 (PDT)
Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226])
	by mx.google.com with ESMTPS id l1sm2024749bkl.1.2011.04.30.00.26.56
	(version=SSLv3 cipher=OTHER); Sat, 30 Apr 2011 00:26:57 -0700 (PDT)
Sender: Alexander Motin 
Message-ID: <4DBBB9B0.5080307@FreeBSD.org>
Date: Sat, 30 Apr 2011 10:26:40 +0300
From: Alexander Motin 
User-Agent: Thunderbird 2.0.0.23 (X11/20091212)
MIME-Version: 1.0
To: Dag-Erling Smorgrav 
References: <201104292300.p3TN0N8N019287@svn.freebsd.org>
In-Reply-To: <201104292300.p3TN0N8N019287@svn.freebsd.org>
X-Enigmail-Version: 0.96.0
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: r221233 - head/sbin/fsck_ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 07:27:00 -0000

Dag-Erling Smorgrav wrote:
> Author: des
> Date: Fri Apr 29 23:00:23 2011
> New Revision: 221233
> URL: http://svn.freebsd.org/changeset/base/221233
> 
> Log:
>   Add an -E option to mirror newfs's.  The idea is that if you have a system
>   that was built before ffs grew support for TRIM, your filesystem will have
>   plenty of free blocks that the flash chip doesn't know are free, so it
>   can't take advantage of them for wear leveling.  Once you've upgraded your
>   kernel, you enable TRIM on the filesystem (tunefs -t enable), then run
>   fsck_ffs -E on it before mounting it.
>   
>   I tested this patch by half-filling an mdconfig'ed filesystem image,
>   running fsck_ffs -E on it, then verifying that the contents were not
>   damaged by comparing them to a pristine copy using rsync's checksum
>   functionality.  There is no reliable way to test it on real hardware.
>   
>   Many thanks to mckusick@, who provided the tricky parts of this patch and
>   reviewed the final version.
>   
>   Reviewed by:	mckusick@
>   MFC after:	3 weeks

Thank you!

Not exactly scientific test, but my laptop survived it fine with 10% and
50% of free space. And it indeed restored the write speed, respecting
that I had no kernel TRIM support enabled there before. For additional
check of the drive's block remapper behavior I've written all free space
with file of zeroes and deleted it -- after reboot I am still here. :)

-- 
Alexander Motin

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 10:55: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 A17EC106566C;
	Sat, 30 Apr 2011 10:55:15 +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 8C9288FC16;
	Sat, 30 Apr 2011 10:55: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 p3UAtF3g042384;
	Sat, 30 Apr 2011 10:55:15 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UAtFK2042377;
	Sat, 30 Apr 2011 10:55:15 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201104301055.p3UAtFK2042377@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 30 Apr 2011 10:55:15 +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: r221243 - in vendor/ncurses/dist: . Ada95 Ada95/gen
	Ada95/include Ada95/samples Ada95/src c++ doc/html
	doc/html/ada doc/html/ada/files doc/html/ada/funcs
	doc/html/man form include man m...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 10:55:15 -0000

Author: ed
Date: Sat Apr 30 10:55:14 2011
New Revision: 221243
URL: http://svn.freebsd.org/changeset/base/221243

Log:
  Import a stock copy of ncurses 5.8 into the vendor space.
  
  It seems both local changes we made to 5.7 have already been fixed
  upstream properly, so there is no need to preserve the changes. Also,
  with SVN we import full source trees. Unlike CVS, where we removed
  unneeded cruft.

Added:
  vendor/ncurses/dist/Ada95/
  vendor/ncurses/dist/Ada95/Makefile.in
  vendor/ncurses/dist/Ada95/README
  vendor/ncurses/dist/Ada95/TODO
  vendor/ncurses/dist/Ada95/aclocal.m4
  vendor/ncurses/dist/Ada95/configure   (contents, props changed)
  vendor/ncurses/dist/Ada95/configure.in
  vendor/ncurses/dist/Ada95/gen/
  vendor/ncurses/dist/Ada95/gen/Makefile.in
  vendor/ncurses/dist/Ada95/gen/adacurses-config.in
  vendor/ncurses/dist/Ada95/gen/gen.c
  vendor/ncurses/dist/Ada95/gen/html.m4
  vendor/ncurses/dist/Ada95/gen/normal.m4
  vendor/ncurses/dist/Ada95/gen/table.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-aux.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-menus.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-mouse.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-panels.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-trace.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.adb.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.ads.m4
  vendor/ncurses/dist/Ada95/include/
  vendor/ncurses/dist/Ada95/include/MKncurses_def.sh   (contents, props changed)
  vendor/ncurses/dist/Ada95/include/Makefile.in
  vendor/ncurses/dist/Ada95/include/ncurses_cfg.hin
  vendor/ncurses/dist/Ada95/include/ncurses_defs
  vendor/ncurses/dist/Ada95/make-tar.sh   (contents, props changed)
  vendor/ncurses/dist/Ada95/mk-1st.awk
  vendor/ncurses/dist/Ada95/samples/
  vendor/ncurses/dist/Ada95/samples/Makefile.in
  vendor/ncurses/dist/Ada95/samples/README
  vendor/ncurses/dist/Ada95/samples/explain.txt
  vendor/ncurses/dist/Ada95/samples/ncurses.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-acs_and_scroll.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-acs_and_scroll.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-acs_display.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-acs_display.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-attr_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-attr_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-color_edit.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-color_edit.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-color_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-color_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_forms.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_forms.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_pad.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_pad.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_panels.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_panels.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-flushinp_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-flushinp_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-genericputs.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-genericputs.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-getch.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-getch_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-getch_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-getopt.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-getopt.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-m.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-m.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-menu_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-menu_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-overlap_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-overlap_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-slk_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-slk_test.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-test_sgr_attributes.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-test_sgr_attributes.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-trace_set.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-trace_set.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2-util.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-util.ads
  vendor/ncurses/dist/Ada95/samples/ncurses2.ads
  vendor/ncurses/dist/Ada95/samples/rain.adb
  vendor/ncurses/dist/Ada95/samples/rain.ads
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo-attributes.adb
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo-attributes.ads
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo-mouse.adb
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo-mouse.ads
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo.ads
  vendor/ncurses/dist/Ada95/samples/sample-explanation.adb
  vendor/ncurses/dist/Ada95/samples/sample-explanation.ads
  vendor/ncurses/dist/Ada95/samples/sample-form_demo-aux.adb
  vendor/ncurses/dist/Ada95/samples/sample-form_demo-aux.ads
  vendor/ncurses/dist/Ada95/samples/sample-form_demo-handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-form_demo-handler.ads
  vendor/ncurses/dist/Ada95/samples/sample-form_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-form_demo.ads
  vendor/ncurses/dist/Ada95/samples/sample-function_key_setting.adb
  vendor/ncurses/dist/Ada95/samples/sample-function_key_setting.ads
  vendor/ncurses/dist/Ada95/samples/sample-header_handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-header_handler.ads
  vendor/ncurses/dist/Ada95/samples/sample-helpers.adb
  vendor/ncurses/dist/Ada95/samples/sample-helpers.ads
  vendor/ncurses/dist/Ada95/samples/sample-keyboard_handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-keyboard_handler.ads
  vendor/ncurses/dist/Ada95/samples/sample-manifest.ads
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo-aux.adb
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo-aux.ads
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo-handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo-handler.ads
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo.ads
  vendor/ncurses/dist/Ada95/samples/sample-my_field_type.adb
  vendor/ncurses/dist/Ada95/samples/sample-my_field_type.ads
  vendor/ncurses/dist/Ada95/samples/sample-text_io_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-text_io_demo.ads
  vendor/ncurses/dist/Ada95/samples/sample.adb
  vendor/ncurses/dist/Ada95/samples/sample.ads
  vendor/ncurses/dist/Ada95/samples/status.adb
  vendor/ncurses/dist/Ada95/samples/status.ads
  vendor/ncurses/dist/Ada95/samples/tour.adb
  vendor/ncurses/dist/Ada95/samples/tour.ads
  vendor/ncurses/dist/Ada95/src/
  vendor/ncurses/dist/Ada95/src/Makefile.in
  vendor/ncurses/dist/Ada95/src/library.gpr
  vendor/ncurses/dist/Ada95/src/modules
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-aux.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_user_data.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-form_user_data.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-menus-item_user_data.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-menus-menu_user_data.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-menus.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-mouse.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-panels-user_data.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-panels.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-putwin.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-putwin.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-termcap.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-termcap.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-terminfo.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-terminfo.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-aux.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-aux.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-complex_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-complex_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-decimal_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-decimal_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-fixed_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-fixed_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-float_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-float_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-integer_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-integer_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-modular_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io-modular_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-trace.adb_p
  vendor/ncurses/dist/Ada95/src/terminal_interface.ads
  vendor/ncurses/dist/README.MinGW
  vendor/ncurses/dist/c++/
  vendor/ncurses/dist/c++/Makefile.in
  vendor/ncurses/dist/c++/NEWS
  vendor/ncurses/dist/c++/PROBLEMS
  vendor/ncurses/dist/c++/README-first
  vendor/ncurses/dist/c++/cursesapp.cc
  vendor/ncurses/dist/c++/cursesapp.h
  vendor/ncurses/dist/c++/cursesf.cc
  vendor/ncurses/dist/c++/cursesf.h
  vendor/ncurses/dist/c++/cursesm.cc
  vendor/ncurses/dist/c++/cursesm.h
  vendor/ncurses/dist/c++/cursesmain.cc
  vendor/ncurses/dist/c++/cursesp.cc
  vendor/ncurses/dist/c++/cursesp.h
  vendor/ncurses/dist/c++/cursespad.cc
  vendor/ncurses/dist/c++/cursesw.cc
  vendor/ncurses/dist/c++/cursesw.h
  vendor/ncurses/dist/c++/cursslk.cc
  vendor/ncurses/dist/c++/cursslk.h
  vendor/ncurses/dist/c++/demo.cc
  vendor/ncurses/dist/c++/edit_cfg.sh   (contents, props changed)
  vendor/ncurses/dist/c++/etip.h.in
  vendor/ncurses/dist/c++/headers
  vendor/ncurses/dist/c++/internal.h
  vendor/ncurses/dist/c++/modules
  vendor/ncurses/dist/doc/html/Ada95.html
  vendor/ncurses/dist/doc/html/ada/
  vendor/ncurses/dist/doc/html/ada/files/
  vendor/ncurses/dist/doc/html/ada/files.htm
  vendor/ncurses/dist/doc/html/ada/files/T.htm
  vendor/ncurses/dist/doc/html/ada/funcs/
  vendor/ncurses/dist/doc/html/ada/funcs.htm
  vendor/ncurses/dist/doc/html/ada/funcs/A.htm
  vendor/ncurses/dist/doc/html/ada/funcs/B.htm
  vendor/ncurses/dist/doc/html/ada/funcs/C.htm
  vendor/ncurses/dist/doc/html/ada/funcs/D.htm
  vendor/ncurses/dist/doc/html/ada/funcs/E.htm
  vendor/ncurses/dist/doc/html/ada/funcs/F.htm
  vendor/ncurses/dist/doc/html/ada/funcs/G.htm
  vendor/ncurses/dist/doc/html/ada/funcs/H.htm
  vendor/ncurses/dist/doc/html/ada/funcs/I.htm
  vendor/ncurses/dist/doc/html/ada/funcs/K.htm
  vendor/ncurses/dist/doc/html/ada/funcs/L.htm
  vendor/ncurses/dist/doc/html/ada/funcs/M.htm
  vendor/ncurses/dist/doc/html/ada/funcs/N.htm
  vendor/ncurses/dist/doc/html/ada/funcs/O.htm
  vendor/ncurses/dist/doc/html/ada/funcs/P.htm
  vendor/ncurses/dist/doc/html/ada/funcs/Q.htm
  vendor/ncurses/dist/doc/html/ada/funcs/R.htm
  vendor/ncurses/dist/doc/html/ada/funcs/S.htm
  vendor/ncurses/dist/doc/html/ada/funcs/T.htm
  vendor/ncurses/dist/doc/html/ada/funcs/U.htm
  vendor/ncurses/dist/doc/html/ada/funcs/V.htm
  vendor/ncurses/dist/doc/html/ada/funcs/W.htm
  vendor/ncurses/dist/doc/html/ada/index.htm
  vendor/ncurses/dist/doc/html/ada/main.htm
  vendor/ncurses/dist/doc/html/ada/table.html
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-aux__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-aux__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-mouse__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-mouse__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-panels__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-panels__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-putwin__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-putwin__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-termcap__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-termcap__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-terminfo__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-terminfo__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-trace__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-trace__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface__ads.htm
  vendor/ncurses/dist/doc/html/index.html
  vendor/ncurses/dist/doc/html/man/
  vendor/ncurses/dist/doc/html/man/adacurses-config.1.html
  vendor/ncurses/dist/doc/html/man/captoinfo.1m.html
  vendor/ncurses/dist/doc/html/man/clear.1.html
  vendor/ncurses/dist/doc/html/man/curs_add_wch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_add_wchstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_addch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_addchstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_addstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_addwstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_attr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_beep.3x.html
  vendor/ncurses/dist/doc/html/man/curs_bkgd.3x.html
  vendor/ncurses/dist/doc/html/man/curs_bkgrnd.3x.html
  vendor/ncurses/dist/doc/html/man/curs_border.3x.html
  vendor/ncurses/dist/doc/html/man/curs_border_set.3x.html
  vendor/ncurses/dist/doc/html/man/curs_clear.3x.html
  vendor/ncurses/dist/doc/html/man/curs_color.3x.html
  vendor/ncurses/dist/doc/html/man/curs_delch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_deleteln.3x.html
  vendor/ncurses/dist/doc/html/man/curs_extend.3x.html
  vendor/ncurses/dist/doc/html/man/curs_get_wch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_get_wstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_getcchar.3x.html
  vendor/ncurses/dist/doc/html/man/curs_getch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_getstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_getyx.3x.html
  vendor/ncurses/dist/doc/html/man/curs_in_wch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_in_wchstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_inch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_inchstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_initscr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_inopts.3x.html
  vendor/ncurses/dist/doc/html/man/curs_ins_wch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_ins_wstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_insch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_insstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_instr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_inwstr.3x.html
  vendor/ncurses/dist/doc/html/man/curs_kernel.3x.html
  vendor/ncurses/dist/doc/html/man/curs_legacy.3x.html
  vendor/ncurses/dist/doc/html/man/curs_memleaks.3x.html
  vendor/ncurses/dist/doc/html/man/curs_mouse.3x.html
  vendor/ncurses/dist/doc/html/man/curs_move.3x.html
  vendor/ncurses/dist/doc/html/man/curs_opaque.3x.html
  vendor/ncurses/dist/doc/html/man/curs_outopts.3x.html
  vendor/ncurses/dist/doc/html/man/curs_overlay.3x.html
  vendor/ncurses/dist/doc/html/man/curs_pad.3x.html
  vendor/ncurses/dist/doc/html/man/curs_print.3x.html
  vendor/ncurses/dist/doc/html/man/curs_printw.3x.html
  vendor/ncurses/dist/doc/html/man/curs_refresh.3x.html
  vendor/ncurses/dist/doc/html/man/curs_scanw.3x.html
  vendor/ncurses/dist/doc/html/man/curs_scr_dump.3x.html
  vendor/ncurses/dist/doc/html/man/curs_scroll.3x.html
  vendor/ncurses/dist/doc/html/man/curs_slk.3x.html
  vendor/ncurses/dist/doc/html/man/curs_sp_funcs.3x.html
  vendor/ncurses/dist/doc/html/man/curs_termattrs.3x.html
  vendor/ncurses/dist/doc/html/man/curs_termcap.3x.html
  vendor/ncurses/dist/doc/html/man/curs_terminfo.3x.html
  vendor/ncurses/dist/doc/html/man/curs_threads.3x.html
  vendor/ncurses/dist/doc/html/man/curs_touch.3x.html
  vendor/ncurses/dist/doc/html/man/curs_trace.3x.html
  vendor/ncurses/dist/doc/html/man/curs_util.3x.html
  vendor/ncurses/dist/doc/html/man/curs_variables.3x.html
  vendor/ncurses/dist/doc/html/man/curs_window.3x.html
  vendor/ncurses/dist/doc/html/man/default_colors.3x.html
  vendor/ncurses/dist/doc/html/man/define_key.3x.html
  vendor/ncurses/dist/doc/html/man/form.3x.html
  vendor/ncurses/dist/doc/html/man/form_cursor.3x.html
  vendor/ncurses/dist/doc/html/man/form_data.3x.html
  vendor/ncurses/dist/doc/html/man/form_driver.3x.html
  vendor/ncurses/dist/doc/html/man/form_field.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_attributes.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_buffer.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_info.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_just.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_new.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_opts.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_userptr.3x.html
  vendor/ncurses/dist/doc/html/man/form_field_validation.3x.html
  vendor/ncurses/dist/doc/html/man/form_fieldtype.3x.html
  vendor/ncurses/dist/doc/html/man/form_hook.3x.html
  vendor/ncurses/dist/doc/html/man/form_new.3x.html
  vendor/ncurses/dist/doc/html/man/form_new_page.3x.html
  vendor/ncurses/dist/doc/html/man/form_opts.3x.html
  vendor/ncurses/dist/doc/html/man/form_page.3x.html
  vendor/ncurses/dist/doc/html/man/form_post.3x.html
  vendor/ncurses/dist/doc/html/man/form_requestname.3x.html
  vendor/ncurses/dist/doc/html/man/form_userptr.3x.html
  vendor/ncurses/dist/doc/html/man/form_variables.3x.html
  vendor/ncurses/dist/doc/html/man/form_win.3x.html
  vendor/ncurses/dist/doc/html/man/index.html
  vendor/ncurses/dist/doc/html/man/infocmp.1m.html
  vendor/ncurses/dist/doc/html/man/infotocap.1m.html
  vendor/ncurses/dist/doc/html/man/key_defined.3x.html
  vendor/ncurses/dist/doc/html/man/keybound.3x.html
  vendor/ncurses/dist/doc/html/man/keyok.3x.html
  vendor/ncurses/dist/doc/html/man/legacy_coding.3x.html
  vendor/ncurses/dist/doc/html/man/menu.3x.html
  vendor/ncurses/dist/doc/html/man/menu_attributes.3x.html
  vendor/ncurses/dist/doc/html/man/menu_cursor.3x.html
  vendor/ncurses/dist/doc/html/man/menu_driver.3x.html
  vendor/ncurses/dist/doc/html/man/menu_format.3x.html
  vendor/ncurses/dist/doc/html/man/menu_hook.3x.html
  vendor/ncurses/dist/doc/html/man/menu_items.3x.html
  vendor/ncurses/dist/doc/html/man/menu_mark.3x.html
  vendor/ncurses/dist/doc/html/man/menu_new.3x.html
  vendor/ncurses/dist/doc/html/man/menu_opts.3x.html
  vendor/ncurses/dist/doc/html/man/menu_pattern.3x.html
  vendor/ncurses/dist/doc/html/man/menu_post.3x.html
  vendor/ncurses/dist/doc/html/man/menu_requestname.3x.html
  vendor/ncurses/dist/doc/html/man/menu_spacing.3x.html
  vendor/ncurses/dist/doc/html/man/menu_userptr.3x.html
  vendor/ncurses/dist/doc/html/man/menu_win.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_current.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_name.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_new.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_opts.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_userptr.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_value.3x.html
  vendor/ncurses/dist/doc/html/man/mitem_visible.3x.html
  vendor/ncurses/dist/doc/html/man/ncurses.3x.html
  vendor/ncurses/dist/doc/html/man/ncurses5-config.1.html
  vendor/ncurses/dist/doc/html/man/panel.3x.html
  vendor/ncurses/dist/doc/html/man/resizeterm.3x.html
  vendor/ncurses/dist/doc/html/man/tabs.1.html
  vendor/ncurses/dist/doc/html/man/term.5.html
  vendor/ncurses/dist/doc/html/man/term.7.html
  vendor/ncurses/dist/doc/html/man/term_variables.3x.html
  vendor/ncurses/dist/doc/html/man/terminfo.5.html
  vendor/ncurses/dist/doc/html/man/tic.1m.html
  vendor/ncurses/dist/doc/html/man/toe.1m.html
  vendor/ncurses/dist/doc/html/man/tput.1.html
  vendor/ncurses/dist/doc/html/man/tset.1.html
  vendor/ncurses/dist/doc/html/man/wresize.3x.html
  vendor/ncurses/dist/form/fty_generic.c
  vendor/ncurses/dist/form/llib-lformt
  vendor/ncurses/dist/form/llib-lformtw
  vendor/ncurses/dist/include/nc_mingw.h
  vendor/ncurses/dist/include/ncurses_dll.h.in
  vendor/ncurses/dist/include/ncurses_mingw.h
  vendor/ncurses/dist/man/MKada_config.in
  vendor/ncurses/dist/man/MKncu_config.in
  vendor/ncurses/dist/man/curs_sp_funcs.3x
  vendor/ncurses/dist/man/curs_variables.3x
  vendor/ncurses/dist/man/form_variables.3x
  vendor/ncurses/dist/man/tabs.1
  vendor/ncurses/dist/man/term_variables.3x
  vendor/ncurses/dist/menu/llib-lmenut
  vendor/ncurses/dist/menu/llib-lmenutw
  vendor/ncurses/dist/misc/gen-pkgconfig.in
  vendor/ncurses/dist/mk-dlls.sh.in
  vendor/ncurses/dist/ncurses/base/lib_driver.c
  vendor/ncurses/dist/ncurses/build.priv.h
  vendor/ncurses/dist/ncurses/llib-lncursestw
  vendor/ncurses/dist/ncurses/tinfo/make_hash.c
  vendor/ncurses/dist/ncurses/tinfo/tinfo_driver.c
  vendor/ncurses/dist/ncurses/wcwidth.h
  vendor/ncurses/dist/ncurses/win32con/
  vendor/ncurses/dist/ncurses/win32con/gettimeofday.c
  vendor/ncurses/dist/ncurses/win32con/wcwidth.c
  vendor/ncurses/dist/ncurses/win32con/win_driver.c
  vendor/ncurses/dist/panel/llib-lpanelt
  vendor/ncurses/dist/panel/llib-lpaneltw
  vendor/ncurses/dist/progs/tabs.c
  vendor/ncurses/dist/progs/transform.c
  vendor/ncurses/dist/test/
  vendor/ncurses/dist/test/Makefile.in
  vendor/ncurses/dist/test/README
  vendor/ncurses/dist/test/aclocal.m4
  vendor/ncurses/dist/test/background.c
  vendor/ncurses/dist/test/blue.c
  vendor/ncurses/dist/test/bs.6
  vendor/ncurses/dist/test/bs.c
  vendor/ncurses/dist/test/bulgarian-utf8.txt   (contents, props changed)
  vendor/ncurses/dist/test/cardfile.c
  vendor/ncurses/dist/test/cardfile.dat
  vendor/ncurses/dist/test/chgat.c
  vendor/ncurses/dist/test/clip_printw.c
  vendor/ncurses/dist/test/color_set.c
  vendor/ncurses/dist/test/configure   (contents, props changed)
  vendor/ncurses/dist/test/configure.in
  vendor/ncurses/dist/test/demo_altkeys.c
  vendor/ncurses/dist/test/demo_defkey.c
  vendor/ncurses/dist/test/demo_forms.c
  vendor/ncurses/dist/test/demo_keyok.c
  vendor/ncurses/dist/test/demo_menus.c
  vendor/ncurses/dist/test/demo_panels.c
  vendor/ncurses/dist/test/demo_termcap.c
  vendor/ncurses/dist/test/demo_terminfo.c
  vendor/ncurses/dist/test/ditto.c
  vendor/ncurses/dist/test/dots.c
  vendor/ncurses/dist/test/dots_mvcur.c
  vendor/ncurses/dist/test/echochar.c
  vendor/ncurses/dist/test/edit_field.c
  vendor/ncurses/dist/test/edit_field.h
  vendor/ncurses/dist/test/filter.c
  vendor/ncurses/dist/test/firework.c
  vendor/ncurses/dist/test/firstlast.c
  vendor/ncurses/dist/test/foldkeys.c
  vendor/ncurses/dist/test/gdc.6
  vendor/ncurses/dist/test/gdc.c
  vendor/ncurses/dist/test/hanoi.c
  vendor/ncurses/dist/test/hashtest.c
  vendor/ncurses/dist/test/inch_wide.c
  vendor/ncurses/dist/test/inchs.c
  vendor/ncurses/dist/test/ins_wide.c
  vendor/ncurses/dist/test/insdelln.c
  vendor/ncurses/dist/test/inserts.c
  vendor/ncurses/dist/test/key_names.c
  vendor/ncurses/dist/test/keynames.c
  vendor/ncurses/dist/test/knight.c
  vendor/ncurses/dist/test/linedata.h
  vendor/ncurses/dist/test/linux-color.dat
  vendor/ncurses/dist/test/listused.sh   (contents, props changed)
  vendor/ncurses/dist/test/lrtest.c
  vendor/ncurses/dist/test/make-tar.sh   (contents, props changed)
  vendor/ncurses/dist/test/mk-test.awk
  vendor/ncurses/dist/test/modules
  vendor/ncurses/dist/test/movewindow.c
  vendor/ncurses/dist/test/ncurses.c
  vendor/ncurses/dist/test/ncurses_tst.hin
  vendor/ncurses/dist/test/newdemo.c
  vendor/ncurses/dist/test/programs
  vendor/ncurses/dist/test/railroad.c
  vendor/ncurses/dist/test/rain.c
  vendor/ncurses/dist/test/redraw.c
  vendor/ncurses/dist/test/savescreen.c
  vendor/ncurses/dist/test/savescreen.sh   (contents, props changed)
  vendor/ncurses/dist/test/tclock.c
  vendor/ncurses/dist/test/test.priv.h
  vendor/ncurses/dist/test/test_add_wchstr.c
  vendor/ncurses/dist/test/test_addchstr.c
  vendor/ncurses/dist/test/test_addstr.c
  vendor/ncurses/dist/test/test_addwstr.c
  vendor/ncurses/dist/test/test_arrays.c
  vendor/ncurses/dist/test/test_get_wstr.c
  vendor/ncurses/dist/test/test_getstr.c
  vendor/ncurses/dist/test/test_instr.c
  vendor/ncurses/dist/test/test_inwstr.c
  vendor/ncurses/dist/test/test_opaque.c
  vendor/ncurses/dist/test/testaddch.c
  vendor/ncurses/dist/test/testcurs.c
  vendor/ncurses/dist/test/testscanw.c
  vendor/ncurses/dist/test/tracemunch   (contents, props changed)
  vendor/ncurses/dist/test/view.c
  vendor/ncurses/dist/test/widechars-utf8.txt   (contents, props changed)
  vendor/ncurses/dist/test/worm.c
  vendor/ncurses/dist/test/xmas.c
  vendor/ncurses/dist/test/xterm-16color.dat
  vendor/ncurses/dist/test/xterm-256color.dat
  vendor/ncurses/dist/test/xterm-88color.dat
Deleted:
  vendor/ncurses/dist/include/ncurses_dll.h
  vendor/ncurses/dist/misc/jpf-indent
  vendor/ncurses/dist/misc/ncu-indent
  vendor/ncurses/dist/mkdirs.sh
  vendor/ncurses/dist/tar-copy.sh
Modified:
  vendor/ncurses/dist/ANNOUNCE
  vendor/ncurses/dist/INSTALL
  vendor/ncurses/dist/MANIFEST
  vendor/ncurses/dist/Makefile.in
  vendor/ncurses/dist/NEWS
  vendor/ncurses/dist/TO-DO
  vendor/ncurses/dist/aclocal.m4
  vendor/ncurses/dist/announce.html.in
  vendor/ncurses/dist/config.guess
  vendor/ncurses/dist/config.sub
  vendor/ncurses/dist/configure
  vendor/ncurses/dist/configure.in
  vendor/ncurses/dist/dist.mk
  vendor/ncurses/dist/doc/html/announce.html
  vendor/ncurses/dist/doc/html/hackguide.html
  vendor/ncurses/dist/doc/html/ncurses-intro.html
  vendor/ncurses/dist/form/Makefile.in
  vendor/ncurses/dist/form/f_trace.c
  vendor/ncurses/dist/form/fld_arg.c
  vendor/ncurses/dist/form/fld_attr.c
  vendor/ncurses/dist/form/fld_current.c
  vendor/ncurses/dist/form/fld_def.c
  vendor/ncurses/dist/form/fld_dup.c
  vendor/ncurses/dist/form/fld_ftchoice.c
  vendor/ncurses/dist/form/fld_ftlink.c
  vendor/ncurses/dist/form/fld_info.c
  vendor/ncurses/dist/form/fld_just.c
  vendor/ncurses/dist/form/fld_link.c
  vendor/ncurses/dist/form/fld_max.c
  vendor/ncurses/dist/form/fld_move.c
  vendor/ncurses/dist/form/fld_newftyp.c
  vendor/ncurses/dist/form/fld_opts.c
  vendor/ncurses/dist/form/fld_pad.c
  vendor/ncurses/dist/form/fld_page.c
  vendor/ncurses/dist/form/fld_stat.c
  vendor/ncurses/dist/form/fld_type.c
  vendor/ncurses/dist/form/fld_user.c
  vendor/ncurses/dist/form/form.h
  vendor/ncurses/dist/form/form.priv.h
  vendor/ncurses/dist/form/frm_cursor.c
  vendor/ncurses/dist/form/frm_data.c
  vendor/ncurses/dist/form/frm_def.c
  vendor/ncurses/dist/form/frm_driver.c
  vendor/ncurses/dist/form/frm_hook.c
  vendor/ncurses/dist/form/frm_opts.c
  vendor/ncurses/dist/form/frm_page.c
  vendor/ncurses/dist/form/frm_post.c
  vendor/ncurses/dist/form/frm_req_name.c
  vendor/ncurses/dist/form/frm_scale.c
  vendor/ncurses/dist/form/frm_sub.c
  vendor/ncurses/dist/form/frm_user.c
  vendor/ncurses/dist/form/frm_win.c
  vendor/ncurses/dist/form/fty_alnum.c
  vendor/ncurses/dist/form/fty_alpha.c
  vendor/ncurses/dist/form/fty_enum.c
  vendor/ncurses/dist/form/fty_int.c
  vendor/ncurses/dist/form/fty_ipv4.c
  vendor/ncurses/dist/form/fty_num.c
  vendor/ncurses/dist/form/fty_regex.c
  vendor/ncurses/dist/form/llib-lform
  vendor/ncurses/dist/form/llib-lformw
  vendor/ncurses/dist/form/modules
  vendor/ncurses/dist/include/Caps
  vendor/ncurses/dist/include/Caps.aix4
  vendor/ncurses/dist/include/Caps.hpux11
  vendor/ncurses/dist/include/Caps.keys
  vendor/ncurses/dist/include/Caps.osf1r5
  vendor/ncurses/dist/include/Caps.uwin
  vendor/ncurses/dist/include/MKterm.h.awk.in
  vendor/ncurses/dist/include/Makefile.in
  vendor/ncurses/dist/include/capdefaults.c
  vendor/ncurses/dist/include/curses.h.in
  vendor/ncurses/dist/include/curses.tail
  vendor/ncurses/dist/include/curses.wide
  vendor/ncurses/dist/include/headers
  vendor/ncurses/dist/include/nc_alloc.h
  vendor/ncurses/dist/include/nc_panel.h
  vendor/ncurses/dist/include/nc_tparm.h
  vendor/ncurses/dist/include/ncurses_defs
  vendor/ncurses/dist/include/term_entry.h
  vendor/ncurses/dist/include/tic.h
  vendor/ncurses/dist/include/unctrl.h.in
  vendor/ncurses/dist/man/Makefile.in
  vendor/ncurses/dist/man/captoinfo.1m
  vendor/ncurses/dist/man/clear.1
  vendor/ncurses/dist/man/curs_add_wch.3x
  vendor/ncurses/dist/man/curs_add_wchstr.3x
  vendor/ncurses/dist/man/curs_addch.3x
  vendor/ncurses/dist/man/curs_addchstr.3x
  vendor/ncurses/dist/man/curs_addstr.3x
  vendor/ncurses/dist/man/curs_addwstr.3x
  vendor/ncurses/dist/man/curs_attr.3x
  vendor/ncurses/dist/man/curs_beep.3x
  vendor/ncurses/dist/man/curs_bkgd.3x
  vendor/ncurses/dist/man/curs_bkgrnd.3x
  vendor/ncurses/dist/man/curs_border.3x
  vendor/ncurses/dist/man/curs_border_set.3x
  vendor/ncurses/dist/man/curs_clear.3x
  vendor/ncurses/dist/man/curs_color.3x
  vendor/ncurses/dist/man/curs_delch.3x
  vendor/ncurses/dist/man/curs_deleteln.3x
  vendor/ncurses/dist/man/curs_extend.3x
  vendor/ncurses/dist/man/curs_get_wch.3x
  vendor/ncurses/dist/man/curs_get_wstr.3x
  vendor/ncurses/dist/man/curs_getcchar.3x
  vendor/ncurses/dist/man/curs_getch.3x
  vendor/ncurses/dist/man/curs_getstr.3x
  vendor/ncurses/dist/man/curs_getyx.3x
  vendor/ncurses/dist/man/curs_in_wch.3x
  vendor/ncurses/dist/man/curs_in_wchstr.3x
  vendor/ncurses/dist/man/curs_inch.3x
  vendor/ncurses/dist/man/curs_inchstr.3x
  vendor/ncurses/dist/man/curs_initscr.3x
  vendor/ncurses/dist/man/curs_inopts.3x
  vendor/ncurses/dist/man/curs_ins_wch.3x
  vendor/ncurses/dist/man/curs_ins_wstr.3x
  vendor/ncurses/dist/man/curs_insch.3x
  vendor/ncurses/dist/man/curs_insstr.3x
  vendor/ncurses/dist/man/curs_instr.3x
  vendor/ncurses/dist/man/curs_inwstr.3x
  vendor/ncurses/dist/man/curs_kernel.3x
  vendor/ncurses/dist/man/curs_legacy.3x
  vendor/ncurses/dist/man/curs_memleaks.3x
  vendor/ncurses/dist/man/curs_mouse.3x
  vendor/ncurses/dist/man/curs_move.3x
  vendor/ncurses/dist/man/curs_opaque.3x
  vendor/ncurses/dist/man/curs_outopts.3x
  vendor/ncurses/dist/man/curs_overlay.3x
  vendor/ncurses/dist/man/curs_pad.3x
  vendor/ncurses/dist/man/curs_print.3x
  vendor/ncurses/dist/man/curs_printw.3x
  vendor/ncurses/dist/man/curs_refresh.3x
  vendor/ncurses/dist/man/curs_scanw.3x
  vendor/ncurses/dist/man/curs_scr_dump.3x
  vendor/ncurses/dist/man/curs_scroll.3x
  vendor/ncurses/dist/man/curs_slk.3x
  vendor/ncurses/dist/man/curs_termattrs.3x
  vendor/ncurses/dist/man/curs_termcap.3x
  vendor/ncurses/dist/man/curs_terminfo.3x
  vendor/ncurses/dist/man/curs_threads.3x
  vendor/ncurses/dist/man/curs_touch.3x
  vendor/ncurses/dist/man/curs_trace.3x
  vendor/ncurses/dist/man/curs_util.3x
  vendor/ncurses/dist/man/curs_window.3x
  vendor/ncurses/dist/man/default_colors.3x
  vendor/ncurses/dist/man/define_key.3x
  vendor/ncurses/dist/man/form.3x
  vendor/ncurses/dist/man/form_cursor.3x
  vendor/ncurses/dist/man/form_data.3x
  vendor/ncurses/dist/man/form_driver.3x
  vendor/ncurses/dist/man/form_field.3x
  vendor/ncurses/dist/man/form_field_attributes.3x
  vendor/ncurses/dist/man/form_field_buffer.3x
  vendor/ncurses/dist/man/form_field_info.3x
  vendor/ncurses/dist/man/form_field_just.3x
  vendor/ncurses/dist/man/form_field_new.3x
  vendor/ncurses/dist/man/form_field_opts.3x
  vendor/ncurses/dist/man/form_field_userptr.3x
  vendor/ncurses/dist/man/form_field_validation.3x
  vendor/ncurses/dist/man/form_fieldtype.3x
  vendor/ncurses/dist/man/form_hook.3x
  vendor/ncurses/dist/man/form_new.3x
  vendor/ncurses/dist/man/form_new_page.3x
  vendor/ncurses/dist/man/form_opts.3x
  vendor/ncurses/dist/man/form_page.3x
  vendor/ncurses/dist/man/form_post.3x
  vendor/ncurses/dist/man/form_requestname.3x
  vendor/ncurses/dist/man/form_userptr.3x
  vendor/ncurses/dist/man/form_win.3x
  vendor/ncurses/dist/man/infocmp.1m
  vendor/ncurses/dist/man/infotocap.1m
  vendor/ncurses/dist/man/key_defined.3x
  vendor/ncurses/dist/man/keybound.3x
  vendor/ncurses/dist/man/keyok.3x
  vendor/ncurses/dist/man/legacy_coding.3x
  vendor/ncurses/dist/man/man_db.renames
  vendor/ncurses/dist/man/menu.3x
  vendor/ncurses/dist/man/menu_attributes.3x
  vendor/ncurses/dist/man/menu_cursor.3x
  vendor/ncurses/dist/man/menu_driver.3x
  vendor/ncurses/dist/man/menu_format.3x
  vendor/ncurses/dist/man/menu_hook.3x
  vendor/ncurses/dist/man/menu_items.3x
  vendor/ncurses/dist/man/menu_mark.3x
  vendor/ncurses/dist/man/menu_new.3x
  vendor/ncurses/dist/man/menu_opts.3x
  vendor/ncurses/dist/man/menu_pattern.3x
  vendor/ncurses/dist/man/menu_post.3x
  vendor/ncurses/dist/man/menu_requestname.3x
  vendor/ncurses/dist/man/menu_spacing.3x
  vendor/ncurses/dist/man/menu_userptr.3x
  vendor/ncurses/dist/man/menu_win.3x
  vendor/ncurses/dist/man/mitem_current.3x
  vendor/ncurses/dist/man/mitem_name.3x
  vendor/ncurses/dist/man/mitem_new.3x
  vendor/ncurses/dist/man/mitem_opts.3x
  vendor/ncurses/dist/man/mitem_userptr.3x
  vendor/ncurses/dist/man/mitem_value.3x
  vendor/ncurses/dist/man/mitem_visible.3x
  vendor/ncurses/dist/man/ncurses.3x
  vendor/ncurses/dist/man/panel.3x
  vendor/ncurses/dist/man/resizeterm.3x
  vendor/ncurses/dist/man/term.5
  vendor/ncurses/dist/man/term.7
  vendor/ncurses/dist/man/terminfo.head
  vendor/ncurses/dist/man/terminfo.tail
  vendor/ncurses/dist/man/tic.1m
  vendor/ncurses/dist/man/toe.1m
  vendor/ncurses/dist/man/tput.1
  vendor/ncurses/dist/man/tset.1
  vendor/ncurses/dist/man/wresize.3x
  vendor/ncurses/dist/menu/Makefile.in
  vendor/ncurses/dist/menu/llib-lmenu
  vendor/ncurses/dist/menu/llib-lmenuw
  vendor/ncurses/dist/menu/m_attribs.c
  vendor/ncurses/dist/menu/m_cursor.c
  vendor/ncurses/dist/menu/m_driver.c
  vendor/ncurses/dist/menu/m_format.c
  vendor/ncurses/dist/menu/m_global.c
  vendor/ncurses/dist/menu/m_hook.c
  vendor/ncurses/dist/menu/m_item_cur.c
  vendor/ncurses/dist/menu/m_item_nam.c
  vendor/ncurses/dist/menu/m_item_new.c
  vendor/ncurses/dist/menu/m_item_opt.c
  vendor/ncurses/dist/menu/m_item_top.c
  vendor/ncurses/dist/menu/m_item_use.c
  vendor/ncurses/dist/menu/m_item_val.c
  vendor/ncurses/dist/menu/m_item_vis.c
  vendor/ncurses/dist/menu/m_items.c
  vendor/ncurses/dist/menu/m_new.c
  vendor/ncurses/dist/menu/m_opts.c
  vendor/ncurses/dist/menu/m_pad.c
  vendor/ncurses/dist/menu/m_pattern.c
  vendor/ncurses/dist/menu/m_post.c
  vendor/ncurses/dist/menu/m_req_name.c
  vendor/ncurses/dist/menu/m_scale.c
  vendor/ncurses/dist/menu/m_spacing.c
  vendor/ncurses/dist/menu/m_sub.c
  vendor/ncurses/dist/menu/m_trace.c
  vendor/ncurses/dist/menu/m_userptr.c
  vendor/ncurses/dist/menu/m_win.c
  vendor/ncurses/dist/menu/menu.h
  vendor/ncurses/dist/menu/menu.priv.h
  vendor/ncurses/dist/menu/modules
  vendor/ncurses/dist/misc/Makefile.in
  vendor/ncurses/dist/misc/ncurses-config.in
  vendor/ncurses/dist/misc/run_tic.in
  vendor/ncurses/dist/misc/terminfo.src
  vendor/ncurses/dist/mk-0th.awk
  vendor/ncurses/dist/mk-1st.awk
  vendor/ncurses/dist/mk-hdr.awk
  vendor/ncurses/dist/ncurses/Makefile.in
  vendor/ncurses/dist/ncurses/README
  vendor/ncurses/dist/ncurses/base/MKkeyname.awk
  vendor/ncurses/dist/ncurses/base/MKlib_gen.sh
  vendor/ncurses/dist/ncurses/base/MKunctrl.awk
  vendor/ncurses/dist/ncurses/base/define_key.c
  vendor/ncurses/dist/ncurses/base/key_defined.c
  vendor/ncurses/dist/ncurses/base/keybound.c
  vendor/ncurses/dist/ncurses/base/keyok.c
  vendor/ncurses/dist/ncurses/base/legacy_coding.c
  vendor/ncurses/dist/ncurses/base/lib_addch.c
  vendor/ncurses/dist/ncurses/base/lib_addstr.c
  vendor/ncurses/dist/ncurses/base/lib_beep.c
  vendor/ncurses/dist/ncurses/base/lib_bkgd.c
  vendor/ncurses/dist/ncurses/base/lib_box.c
  vendor/ncurses/dist/ncurses/base/lib_chgat.c
  vendor/ncurses/dist/ncurses/base/lib_clear.c
  vendor/ncurses/dist/ncurses/base/lib_clearok.c
  vendor/ncurses/dist/ncurses/base/lib_clrbot.c
  vendor/ncurses/dist/ncurses/base/lib_clreol.c
  vendor/ncurses/dist/ncurses/base/lib_color.c
  vendor/ncurses/dist/ncurses/base/lib_colorset.c
  vendor/ncurses/dist/ncurses/base/lib_delch.c
  vendor/ncurses/dist/ncurses/base/lib_delwin.c
  vendor/ncurses/dist/ncurses/base/lib_dft_fgbg.c
  vendor/ncurses/dist/ncurses/base/lib_echo.c
  vendor/ncurses/dist/ncurses/base/lib_endwin.c
  vendor/ncurses/dist/ncurses/base/lib_erase.c
  vendor/ncurses/dist/ncurses/base/lib_flash.c
  vendor/ncurses/dist/ncurses/base/lib_freeall.c
  vendor/ncurses/dist/ncurses/base/lib_getch.c
  vendor/ncurses/dist/ncurses/base/lib_getstr.c
  vendor/ncurses/dist/ncurses/base/lib_hline.c
  vendor/ncurses/dist/ncurses/base/lib_immedok.c
  vendor/ncurses/dist/ncurses/base/lib_inchstr.c
  vendor/ncurses/dist/ncurses/base/lib_initscr.c
  vendor/ncurses/dist/ncurses/base/lib_insch.c
  vendor/ncurses/dist/ncurses/base/lib_insdel.c
  vendor/ncurses/dist/ncurses/base/lib_insnstr.c
  vendor/ncurses/dist/ncurses/base/lib_instr.c
  vendor/ncurses/dist/ncurses/base/lib_isendwin.c
  vendor/ncurses/dist/ncurses/base/lib_leaveok.c
  vendor/ncurses/dist/ncurses/base/lib_mouse.c
  vendor/ncurses/dist/ncurses/base/lib_move.c
  vendor/ncurses/dist/ncurses/base/lib_mvwin.c
  vendor/ncurses/dist/ncurses/base/lib_newterm.c
  vendor/ncurses/dist/ncurses/base/lib_newwin.c
  vendor/ncurses/dist/ncurses/base/lib_nl.c
  vendor/ncurses/dist/ncurses/base/lib_overlay.c
  vendor/ncurses/dist/ncurses/base/lib_pad.c
  vendor/ncurses/dist/ncurses/base/lib_printw.c
  vendor/ncurses/dist/ncurses/base/lib_redrawln.c
  vendor/ncurses/dist/ncurses/base/lib_refresh.c
  vendor/ncurses/dist/ncurses/base/lib_restart.c
  vendor/ncurses/dist/ncurses/base/lib_scanw.c
  vendor/ncurses/dist/ncurses/base/lib_screen.c
  vendor/ncurses/dist/ncurses/base/lib_scroll.c
  vendor/ncurses/dist/ncurses/base/lib_scrollok.c
  vendor/ncurses/dist/ncurses/base/lib_scrreg.c
  vendor/ncurses/dist/ncurses/base/lib_set_term.c
  vendor/ncurses/dist/ncurses/base/lib_slk.c
  vendor/ncurses/dist/ncurses/base/lib_slkatr_set.c
  vendor/ncurses/dist/ncurses/base/lib_slkatrof.c
  vendor/ncurses/dist/ncurses/base/lib_slkatron.c
  vendor/ncurses/dist/ncurses/base/lib_slkatrset.c
  vendor/ncurses/dist/ncurses/base/lib_slkattr.c
  vendor/ncurses/dist/ncurses/base/lib_slkclear.c
  vendor/ncurses/dist/ncurses/base/lib_slkcolor.c
  vendor/ncurses/dist/ncurses/base/lib_slkinit.c
  vendor/ncurses/dist/ncurses/base/lib_slklab.c
  vendor/ncurses/dist/ncurses/base/lib_slkrefr.c
  vendor/ncurses/dist/ncurses/base/lib_slkset.c
  vendor/ncurses/dist/ncurses/base/lib_slktouch.c
  vendor/ncurses/dist/ncurses/base/lib_touch.c
  vendor/ncurses/dist/ncurses/base/lib_ungetch.c
  vendor/ncurses/dist/ncurses/base/lib_vline.c
  vendor/ncurses/dist/ncurses/base/lib_wattroff.c
  vendor/ncurses/dist/ncurses/base/lib_wattron.c
  vendor/ncurses/dist/ncurses/base/lib_winch.c
  vendor/ncurses/dist/ncurses/base/lib_window.c
  vendor/ncurses/dist/ncurses/base/nc_panel.c
  vendor/ncurses/dist/ncurses/base/resizeterm.c
  vendor/ncurses/dist/ncurses/base/safe_sprintf.c
  vendor/ncurses/dist/ncurses/base/tries.c
  vendor/ncurses/dist/ncurses/base/use_window.c
  vendor/ncurses/dist/ncurses/base/wresize.c
  vendor/ncurses/dist/ncurses/curses.priv.h
  vendor/ncurses/dist/ncurses/llib-lncurses
  vendor/ncurses/dist/ncurses/llib-lncursest
  vendor/ncurses/dist/ncurses/llib-lncursesw
  vendor/ncurses/dist/ncurses/modules
  vendor/ncurses/dist/ncurses/tinfo/MKcaptab.sh
  vendor/ncurses/dist/ncurses/tinfo/MKcodes.awk
  vendor/ncurses/dist/ncurses/tinfo/MKfallback.sh
  vendor/ncurses/dist/ncurses/tinfo/MKnames.awk
  vendor/ncurses/dist/ncurses/tinfo/access.c
  vendor/ncurses/dist/ncurses/tinfo/add_tries.c
  vendor/ncurses/dist/ncurses/tinfo/alloc_entry.c
  vendor/ncurses/dist/ncurses/tinfo/alloc_ttype.c
  vendor/ncurses/dist/ncurses/tinfo/captoinfo.c
  vendor/ncurses/dist/ncurses/tinfo/comp_expand.c
  vendor/ncurses/dist/ncurses/tinfo/comp_hash.c
  vendor/ncurses/dist/ncurses/tinfo/comp_parse.c
  vendor/ncurses/dist/ncurses/tinfo/comp_scan.c
  vendor/ncurses/dist/ncurses/tinfo/db_iterator.c
  vendor/ncurses/dist/ncurses/tinfo/entries.c
  vendor/ncurses/dist/ncurses/tinfo/free_ttype.c
  vendor/ncurses/dist/ncurses/tinfo/hashed_db.c
  vendor/ncurses/dist/ncurses/tinfo/home_terminfo.c
  vendor/ncurses/dist/ncurses/tinfo/init_keytry.c
  vendor/ncurses/dist/ncurses/tinfo/lib_acs.c
  vendor/ncurses/dist/ncurses/tinfo/lib_baudrate.c
  vendor/ncurses/dist/ncurses/tinfo/lib_cur_term.c
  vendor/ncurses/dist/ncurses/tinfo/lib_data.c
  vendor/ncurses/dist/ncurses/tinfo/lib_has_cap.c
  vendor/ncurses/dist/ncurses/tinfo/lib_kernel.c
  vendor/ncurses/dist/ncurses/tinfo/lib_longname.c
  vendor/ncurses/dist/ncurses/tinfo/lib_napms.c
  vendor/ncurses/dist/ncurses/tinfo/lib_options.c
  vendor/ncurses/dist/ncurses/tinfo/lib_print.c
  vendor/ncurses/dist/ncurses/tinfo/lib_raw.c
  vendor/ncurses/dist/ncurses/tinfo/lib_setup.c
  vendor/ncurses/dist/ncurses/tinfo/lib_termcap.c
  vendor/ncurses/dist/ncurses/tinfo/lib_termname.c
  vendor/ncurses/dist/ncurses/tinfo/lib_ti.c
  vendor/ncurses/dist/ncurses/tinfo/lib_tparm.c
  vendor/ncurses/dist/ncurses/tinfo/lib_tputs.c
  vendor/ncurses/dist/ncurses/tinfo/lib_ttyflags.c
  vendor/ncurses/dist/ncurses/tinfo/make_keys.c
  vendor/ncurses/dist/ncurses/tinfo/name_match.c
  vendor/ncurses/dist/ncurses/tinfo/parse_entry.c
  vendor/ncurses/dist/ncurses/tinfo/read_entry.c
  vendor/ncurses/dist/ncurses/tinfo/read_termcap.c
  vendor/ncurses/dist/ncurses/tinfo/setbuf.c
  vendor/ncurses/dist/ncurses/tinfo/trim_sgr0.c
  vendor/ncurses/dist/ncurses/tinfo/use_screen.c
  vendor/ncurses/dist/ncurses/tinfo/write_entry.c
  vendor/ncurses/dist/ncurses/trace/lib_trace.c
  vendor/ncurses/dist/ncurses/trace/lib_traceatr.c
  vendor/ncurses/dist/ncurses/trace/lib_tracebits.c
  vendor/ncurses/dist/ncurses/trace/lib_tracechr.c
  vendor/ncurses/dist/ncurses/trace/lib_tracedmp.c
  vendor/ncurses/dist/ncurses/trace/lib_tracemse.c
  vendor/ncurses/dist/ncurses/trace/trace_buf.c
  vendor/ncurses/dist/ncurses/trace/trace_tries.c
  vendor/ncurses/dist/ncurses/trace/trace_xnames.c
  vendor/ncurses/dist/ncurses/trace/varargs.c
  vendor/ncurses/dist/ncurses/trace/visbuf.c
  vendor/ncurses/dist/ncurses/tty/MKexpanded.sh
  vendor/ncurses/dist/ncurses/tty/hardscroll.c
  vendor/ncurses/dist/ncurses/tty/hashmap.c
  vendor/ncurses/dist/ncurses/tty/lib_mvcur.c
  vendor/ncurses/dist/ncurses/tty/lib_tstp.c
  vendor/ncurses/dist/ncurses/tty/lib_twait.c
  vendor/ncurses/dist/ncurses/tty/lib_vidattr.c
  vendor/ncurses/dist/ncurses/tty/tty_update.c
  vendor/ncurses/dist/ncurses/widechar/lib_add_wch.c
  vendor/ncurses/dist/ncurses/widechar/lib_box_set.c
  vendor/ncurses/dist/ncurses/widechar/lib_cchar.c
  vendor/ncurses/dist/ncurses/widechar/lib_erasewchar.c
  vendor/ncurses/dist/ncurses/widechar/lib_get_wch.c
  vendor/ncurses/dist/ncurses/widechar/lib_get_wstr.c
  vendor/ncurses/dist/ncurses/widechar/lib_hline_set.c
  vendor/ncurses/dist/ncurses/widechar/lib_in_wch.c
  vendor/ncurses/dist/ncurses/widechar/lib_in_wchnstr.c
  vendor/ncurses/dist/ncurses/widechar/lib_ins_wch.c
  vendor/ncurses/dist/ncurses/widechar/lib_inwstr.c
  vendor/ncurses/dist/ncurses/widechar/lib_pecho_wchar.c
  vendor/ncurses/dist/ncurses/widechar/lib_unget_wch.c
  vendor/ncurses/dist/ncurses/widechar/lib_vid_attr.c
  vendor/ncurses/dist/ncurses/widechar/lib_vline_set.c
  vendor/ncurses/dist/ncurses/widechar/lib_wacs.c
  vendor/ncurses/dist/ncurses/widechar/lib_wunctrl.c
  vendor/ncurses/dist/panel/Makefile.in
  vendor/ncurses/dist/panel/llib-lpanel
  vendor/ncurses/dist/panel/llib-lpanelw
  vendor/ncurses/dist/panel/modules
  vendor/ncurses/dist/panel/p_above.c
  vendor/ncurses/dist/panel/p_below.c
  vendor/ncurses/dist/panel/p_bottom.c
  vendor/ncurses/dist/panel/p_delete.c
  vendor/ncurses/dist/panel/p_hidden.c
  vendor/ncurses/dist/panel/p_hide.c
  vendor/ncurses/dist/panel/p_move.c
  vendor/ncurses/dist/panel/p_new.c
  vendor/ncurses/dist/panel/p_replace.c
  vendor/ncurses/dist/panel/p_show.c
  vendor/ncurses/dist/panel/p_top.c
  vendor/ncurses/dist/panel/p_update.c
  vendor/ncurses/dist/panel/p_user.c
  vendor/ncurses/dist/panel/p_win.c
  vendor/ncurses/dist/panel/panel.c
  vendor/ncurses/dist/panel/panel.h
  vendor/ncurses/dist/panel/panel.priv.h
  vendor/ncurses/dist/progs/Makefile.in
  vendor/ncurses/dist/progs/dump_entry.c
  vendor/ncurses/dist/progs/infocmp.c
  vendor/ncurses/dist/progs/modules
  vendor/ncurses/dist/progs/tic.c
  vendor/ncurses/dist/progs/toe.c
  vendor/ncurses/dist/progs/tput.c
  vendor/ncurses/dist/progs/tset.c

Modified: vendor/ncurses/dist/ANNOUNCE
==============================================================================
--- vendor/ncurses/dist/ANNOUNCE	Sat Apr 30 05:28:54 2011	(r221242)
+++ vendor/ncurses/dist/ANNOUNCE	Sat Apr 30 10:55:14 2011	(r221243)
@@ -1,4 +1,4 @@
-                            Announcing ncurses 5.7
+                            Announcing ncurses 5.8
 
    The  ncurses  (new  curses)  library  is  a free software emulation of
    curses  in  System  V  Release 4.0, and more. It uses terminfo format,
@@ -27,217 +27,393 @@
                                  Release Notes
 
    This  release  is  designed  to  be upward compatible from ncurses 5.0
-   through   5.6;  very  few  applications  will  require  recompilation,
+   through   5.7;  very  few  applications  will  require  recompilation,
    depending   on  the  platform.  These  are  the  highlights  from  the
-   change-log since ncurses 5.6 release.
+   change-log since ncurses 5.7 release.
 
-   Interface changes:
-     * generate linkable stubs for some macros:
-       getattrs
-
-   New features and improvements:
-     * library
-          + new  flavor  of  the  ncurses  library  provides  rudimentary
-            support  for  POSIX threads. Several functions are reentrant,
-            but most require either a window-level or screen-level mutex.
-            (This  is  API-compatible,  but  not  ABI-compatible with the
-            normal library).
-          + add  NCURSES_OPAQUE  symbol  to  curses.h,  will  use to make
-            structs opaque in selected configurations.
-          + add   NCURSES_EXT_FUNCS  and  NCURSES_EXT_COLORS  symbols  to
-            curses.h to make it simpler to tell if the extended functions
-            and/or colors are declared.
-          + add wresize() to C++ binding
-          + eliminate fixed-buffer vsprintf() calls in C++ binding.
-          + add  several  functions to C++ binding which wrap C functions
-            that pass a WINDOW* parameter.
-          + adapt mouse-handling code from menu library in form-library
-          + improve  tracing  for  form  library,  showing created forms,
-            fields, etc.
-          + make $NCURSES_NO_PADDING feature work for termcap interface .
-          + add  check  to  trace-file  open,  if  the  given  name  is a
-            directory, add ".log" to the name and try again.
-          + several   new   manpages:  curs_legacy.3x,  curs_memleaks.3x,
-            curs_opaque.3x and curs_threads.3x
-     * programs:
-          + modified  three  test-programs  to  demonstrate the threading
-            support in this version: ditto, rain, worm.
-          + several    new    test-programs:   demo_panels,   dots_mvcur,
-            inch_wide,    inchs,    key_name,    key_names,   savescreen,
-            savescreen.sh    test_arrays,   test_get_wstr,   test_getstr,
-            test_instr, test_inwstr and test_opaque.
-          + add adacurses-config to the Ada95 install.
-          + modify  tic  -f option to format spaces as \s to prevent them
-            from  being  lost  when  that  is  read  back  in unformatted
-            strings.
-          + The tack program is now distributed separately from ncurses.
-     * terminal database
-          + added entries:
-               o Eterm-256color, Eterm-88color and rxvt-88color
-               o aterm
-               o konsole-256color
-               o mrxvt
-               o screen.mlterm
-               o screen.rxvt
-               o teraterm4.59  is now the primary primary teraterm entry,
-                 renamed original to teraterm2.3
-               o 9term terminal
-               o Newbury Data entries
-          + updated/improved entries:
-               o gnome to version 2.22.3
-               o h19, z100
-               o konsole to version 1.6.6
-               o mlterm, mlterm+pcfkeys
-               o xterm, and building-blocks for function-keys to [3]xterm
-                 patch #230.
-
-   Major bug fixes:
-     * add   logic   to   tic  for  cancelling  strings  in  user-defined
-       capabilities (this is needed for current konsole terminfo entry).
-     * modify  mk-1st.awk  so the generated makefile rules for linking or
-       installing  shared  libraries  do not first remove the library, in
-       case it is in use, e.g., libncurses.so by /bin/sh.
-     * correct check for notimeout() in wgetch().
-     * fix a sign-extension bug in infocmp's repair_acsc() function.
-     * change winnstr() to stop at the end of the line.
-     * make Ada95 demo_panels() example work.
-     * fix for adding a non-spacing character at the beginning of a line.
-     * fill   in   extended-color   pair   to   make   colors   work  for
-       wide-characters using extended-colors.
-     * improve  refresh  of  window  on  top  of multi-column characters,
-       taking   into   account  split  characters  on  left/right  window
-       boundaries.
-     * modify  win_wchnstr()  to ensure that only a base cell is returned
-       for each multi-column character.
-     * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by
-       using  unctrl()  to  display  illegal  bytes rather than trying to
-       append further bytes to make up a valid sequence.
-     * restore curs_set() state after endwin()/refresh()
-     * modify  keyname() to use "^X" form only if meta() has been called,
-       or  if  keyname() is called without initializing curses, e.g., via
-       initscr() or newterm().
-     * modify  unctrl() to check codes in 128-255 range versus isprint().
-       If  they  are not printable, and locale was set, use a "M-" or "~"
-       sequence.
-     * improve  resizeterm()  by  moving ripped-off lines, and repainting
-       the soft-keys.
-     * modify  form  library to accept control characters such as newline
-       in set_field_buffer(), which is compatible with Solaris.
-     * use  NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc.,
-       to   make   those   work   properly  with  the  --enable-ext-mouse
-       configuration
-     * correct  some  functions  in Ada95 binding which were using return
-       value from C where none was returned.
-     * reviewed/fixed issues reported by Coverity and Klocwork tools.
+Interface changes
 
-   Portability:
-     * configure script:
-          + new options:
+     * turn on _XOPEN_CURSES definition in curses.h.
+     * change  _nc_has_mouse  to  has_mouse,  reflect  its use in C++ and
+       Ada95.
+     * add is_pad and is_subwin functions for opaque access to the WINDOW
+       structure.
+     * add tiparm, based on review of X/Open Curses Issue 7.
+
+New features and improvements
+
+  Library Improvements
+
+     * add  a terminal driver for Windows console, which supports a MinGW
+       port to Windows.
+     * add  extended  functions  which  specify  the  SCREEN  pointer for
+       several curses functions which use the global SP.
+     * improve  the  NCURSES_NO_UTF8_ACS feature by adding a check for an
+       extended terminfo capability U8.
+     * improve  performance of tigetstr, etc., by using hashing code from
+       tic.
+     * add  WACS_xxx  definitions  to  wide-character  configuration  for
+       thick- and double-lines.
+     * modify  init_pair  to  allow  caller  to  create extra color pairs
+       beyond the color_pairs limit, which use default colors.
+
+  Improvements to Programs
+
+     * add tabs program.
+     * modify  tic's  -I/-C  dump to reformat acsc strings into canonical
+       form (sorted, unique mapping).
+     * add  checks  in tic for inconsistent cursor-movement controls, and
+       for inconsistent printer-controls.
+     * add  special  case  to  _nc_infotocap (used by tic and infocmp) to
+       recognize   the   setaf/setab   strings  from  xterm+256color  and
+       xterm+88color,  and  provide  a  reduced  version which works with
+       termcap.
+
+  Terminal Database
+
+     * added entries:
+          + bterm terminfo entry, based on bogl 0.1.18
+          + cons25-debian entry
+          + eterm-color entry
+          + linux-16color
+          + mlterm+256color entry, for mlterm 3.0.0
+          + several screen-bce.xxx entries
+          + screen.Eterm terminfo entry
+          + vwmterm entry
+          + xterm-utf8 entry as a demo of the U8 feature
+     * updated/improved entries:
+          + use extended capabilities:
+               o add  U8 feature to denote entries for terminal emulators
+                 which  do  not support VT100 SI/SO when processing UTF-8
+                 encoding
+               o add  XT capability to entries for terminals that support
+                 both  xterm-style  mouse- and title-controls, for screen
+                 which special-cases TERM beginning with xterm or rxvt
+          + improvements based on new checks in tic:
+          +
+               o fill  in  no-parameter  forms of cursor-movement where a
+                 parameterized form is available
+               o fill  in  missing  cursor controls where the form of the
+                 controls is ANSI
+               o add parameterized cursor-controls to linux-basic
+               o modify  nsterm,  xnuppc  and  tek4115  to  make sgr/sgr0
+                 consistent
+               o change  several  terminfo entries to make consistent use
+                 of ANSI clear-all-tabs
+          + extend  ansi.sys  pfkey capability from kf1-kf10 to kf1-kf48,
+            moving   function   key   definitions   from   emx-base   for
+            consistency.
+          + correct   missing   final   'p'   in   pfkey   capability  of
+            ansi.sys-old.
+          + rename   atari   and  st52  terminfo  entries  to  atari-old,
+            st52-old, use newer entries from FreeMiNT.
+          + repurpose  gnome  terminfo  entries  as  vte, retaining gnome
+            variants  for  compatibility, but generally deprecating those
+            since  the  VTE library is what actually defines the behavior
+            of "gnome", etc., since 2003.
+          + improve  interix  smso  terminfo  capability by using reverse
+            rather than bold.
+          + correct  initc  capability  of  linux-c-nc end-of-range, make
+            similar change for dg+ccc and dgunix+ccc.
+          + update minix terminfo entry.
+          + updated nsterm* entries.
+          + remove unnecessary kcan assignment to ^C from putty.
+          + suppress  ncv  in  screen  and konsole-base entries, allowing
+            underline.
+          + change ncv and op capabilities in sun-color terminfo entry to
+            match Sun's entry for this.
+          + fix typo in rmso for tek4106 entry.
+          + improve acsc string for vt52, show arrow keys.
+          + add  hard-reset  for  rs2 to wsvt25 to help ensure that reset
+            ends the alternate character set.
+          + add ccc and initc capabilities to xterm-16color.
+
+Major bug fixes
+
+     * ncurses library
+          + wide character support
+               o modify length returned by getcchar to count the trailing
+                 null which is documented in X/Open.
+               o fix  an  infinite  recursion when adding a legacy-coding
+                 8-bit value using insch.
+               o improve  a  workaround in adding wide-characters, when a
+                 control  character  is found. The library uses unctrl to
+                 obtain a printable version of the control character, but
+                 was not passing color or video attributes.
+               o modify  waddch_literal,  updating  line-pointer  after a
+                 multicolumn character is found to not fit on the current
+                 row,  and  wrapping  is done. Since the line-pointer was
+                 not  updated,  the  wrapped  multicolumn  character  was
+                 written to the beginning of the current row.
+               o fixes in wins_nwstr and related functions to ensure that
+                 special characters, i.e., control characters are handled
+                 properly with the wide-character configuration.
+               o correct  internal  _nc_insert_ch  to  use _nc_insert_wch
+                 when  inserting  wide  characters,  since  the  wins_wch
+                 function   that  it  used  did  not  update  the  cursor
+                 position.
+          + mouse
+               o add  check  if Gpm_Open returns a -2, e.g., for "xterm".
+                 This  is normally suppressed but can be overridden using
+                 $NCURSES_GPM_TERMS.  Ensure  that Gpm_Close is called in
+                 this case.
+               o add  check  in mouse-driver to disable connection if GPM
+                 returns  a  zero,  indicating  that  the  connection  is
+                 closed.
+               o modify  getmouse  to  act  as its documentation implied,
+                 returning  on  each  call the preceding event until none
+                 are  left.  When  no  more events remain, it will return
+                 ERR.
+          + miscellaneous
+               o improve  handling  of color-pairs embedded in attributes
+                 for the extended-colors configuration.
+               o add check for failure to open hashed-database needed for
+                 db4.6.
+               o modify  use of $CC environment variable which is defined
+                 by X/Open as a curses feature, to ignore it if it is not
+                 a single character.
+               o modify  declaration  of  cur_term  when broken-linker is
+                 used, but enable-reentrant is not, to match pre-5.7.
+               o correct limit-checks in derwin.
+               o remove  old  check  in mvderwin which prevented moving a
+                 derived  window  whose  origin happened to coincide with
+                 its parent's origin.
+               o correct  limit-checks  in newwin, to ensure that windows
+                 have nonzero size.
+               o modify  set_curterm  to make broken-linker configuration
+                 work with changes from 20090228.
+               o modify  wgetch to ensure it checks SIGWINCH when it gets
+                 an error in non-blocking mode.
+               o correct   limit-check   in   wredrawln,  accounting  for
+                 begy/begx values.
+               o fix   a   null-pointer   check   in  _nc_format_slks  in
+                 lib_slk.c, from 20070704 changes.
+               o correct  translation  of  "^"  in _nc_infotocap, used to
+                 transform terminfo to termcap strings.
+               o modify  _nc_wgetch  to check for a -1 in the fifo, e.g.,
+                 after  a  SIGWINCH,  and  discard  that  value, to avoid
+                 confusing application.
+     * other libraries
+          + correct   transfer  of  multicolumn  characters  in  multirow
+            field_buffer,  which  stopped at the end of the first row due
+            to filling of unused entries in a cchar_t array with nulls.
+          + correct buffer-size after internal resizing of wide-character
+            set_field_buffer, broken in 20081018 changes.
+          + correct  layout  of  working  window  used to extract data in
+            wide-character configured by set_field_buffer
 
-              --disable-big-strings
-                      control  whether static string tables are generated
-                      as   single   large  strings  (to  improve  startup
-                      performance), or as array of individual strings.
-
-              --disable-relink
-                      control   whether  shared  libraries  are  relinked
-                      (during install) when rpath is enabled.
-
-              --disable-tic-depends
-                      make   explicit  whether  tic  library  depends  on
-                      ncurses/ncursesw library.
-
-              --enable-mixed-case
-                      override   the  configure  script's  check  if  the
-                      filesystem   supports  mixed-case  filenames.  This
-                      allows  one  to  control  how the terminal database
-                      maps to the filesystem. For filesystems that do not
-                      support   mixed-case,  the  library  uses  generate
-                      2-character (hexadecimal) codes for the lower-level
-                      of the filesystem terminfo database
-
-              --enable-reentrant
-                      builds  a  different  flavor of the ncurses library
-                      (ncursest)  which  improves  reentrant  use  of the
-                      library  by  reducing  global  and static variables
-                      (see  the  "--with-pthread" option for the threaded
-                      support).
-
-              --enable-weak-symbols
-                      use  weak-symbols  for  linking to the POSIX thread
-                      library,  and  use  the same soname for the ncurses
-                      shared  library  as the normal library (caveat: the
-                      ABI is for the threaded library, which makes global
-                      data accessed via functions).
-
-              --with-pthread
-                      build  with  the  POSIX thread library (tested with
-                      AIX,   Linux,   FreeBSD,   OpenBSD,  HPUX,  IRIX64,
-                      Solaris, Tru64).
-
-              --with-ticlib
-                      build/install   the   tic-support  functions  in  a
-                      separate library
-
-          + improved options:
+Portability
 
-              --enable-ext-colors
-                      requires the wide-character configuration.
+     * configure script:
+          + new options:
 
-              --with-chtype
-                      ignore  option  value "unsigned" is always added to
-                      the   type   in   curses.h;   do   the   same   for
-                      --with-mmask-t.
-
-              --with-dmalloc
-                      build-fix for redefinition of strndup.
-
-              --with-hashed-db
-                      accepts  a parameter which is the install-prefix of
-                      a given Berkeley Database.
-
-              --with-hashed-db
-                      the $LIBS environment variable overrides the search
-                      for the db library.
+              --disable-libtool-version
+                      use  the  "-version-number" feature which was added
+                      in  libtool  1.5.  The default value for the option
+                      uses  the  newer  feature,  which  makes  libraries
+                      generated   using   libtool   compatible  with  the
+                      standard builds of ncurses.
+
+              --disable-rpath-hack
+                      disable  a  feature  which  adds  rpath options for
+                      libraries in unusual places.
+
+              --enable-interop
+                      integrate  changes  for  generic/interop support to
+                      form-library.
+
+              --enable-pc-files
+                      generate ".pc" files for each of the libraries, and
+                      install them in pkg-config's library directory.
+
+              --enable-pthreads-eintr
+                      control  whether to allow EINTR to interrupt a read
+                      operation  in  wgetch.  This  applies  only  to the
+                      pthread configuration
+
+              --enable-sp-funcs
+                      compile-in  support  for  extended  functions which
+                      accept  a  SCREEN  pointer,  reducing  the need for
+                      juggling  the  global  SP  value  with set_term and
+                      delscreen.
+
+              --enable-term-driver
+                      compile  with  terminal-driver. That is used in the
+                      MinGW  port,  and (being somewhat more complicated)
+                      is  an experimental alternative to the conventional
+                      termlib   internals.  Currently,  it  requires  the
+                      sp-funcs feature to be enabled.
+
+              --with-ncurses-wrap-prefix
+                      allows  setting  the  prefix  for functions used to
+                      wrap  global  variables  to  something  other  than
+                      "_nc_".
+
+              --with-pkg-config=[DIR]
+                      check  for  pkg-config,  optionally  specifying its
+                      path.
+
+              --without-manpages
+                      tells  the configure script to suppress the install
+                      of ncurses' manpages.
 
-              --without-hashed-db
-                      assumed when "--disable-database" is used.
+              --without-tests
+                      suppress building test programs.
 
+          + improved options:
+               o correct logic for --with-database, which was coded as an
+                 enable-type switch.
+               o omit    the   opaque-functions   from   lib_gen.o   when
+                 --disable-ext-funcs is used.
+     * packaging:
+          + *-config scripts:
+               o modify  adacurses-config to look for ".ali" files in the
+                 adalib directory.
+               o correct  install  for  the  Ada95  tree,  which  omitted
+                 libAdaCurses.a used in adacurses-config.
+               o change   install   for   adacurses-config   to   provide
+                 additional   flavors   such  as  adacursesw-config,  for
+                 ncursesw.
+               o modify  scripts to generate ncurses*-config and pc-files
+                 to add dependency for tinfo library.
+               o use    ncurses*-config    scripts   if   available   for
+                 test/configure.
+               o correct name for termlib in ncurses*-config, e.g., if it
+                 is renamed to provide a single file for ncurses/ncursesw
+                 libraries.
+               o generate manpages for the *-config scripts, adapted from
+                 help2man.
+               o modify   install-rule  for  manpages  so  that  *-config
+                 manpages will install when building with --srcdir.
+               o build-fixes   for   OpenSolaris   aka  Solaris  11,  for
+                 wide-character   configuration  as  well  as  for  rpath
+                 feature in *-config scripts.
+               o use  $includedir  symbol  in misc/ncurses-config.in, add
+                 --includedir option.
+               o improve install-rules for pc-files.
+               o create the pkg-config library directory if needed.
+               o fix  typo  "==" where "=" is needed in ncurses-config.in
+                 and gen-pkgconfig.in files.
+               o modify  gen-pkgconfig.in  to  eliminate  a dependency on
+                 rpath  when  deciding  whether  to  add  $LIBS to --libs
+                 output;  that  should be shown for the ncurses and tinfo
+                 libraries without taking rpath into account.
+               o modify  handling  of  $PKG_CONFIG_LIBDIR to use only the
+                 first item in a possibly colon-separated list.
+          + other packaging issues
+               o add make-tar.sh scripts to Ada95 and test subdirectories
+                 to help with making those separately distributable.
+               o add  Ada95/configure  script, to use in tar-file created
+                 by Ada95/make-tar.sh.
+               o remove   tar-copy.sh   and   related  configure/Makefile
+                 chunks,  since  the Ada95 binding is now installed using
+                 rules in Ada95/src.
+     * cross-compiling:
+          + improve  configure  checks  for  location  of tic and infocmp
+            programs  used  for  installing  database  and for generating
+            fallback data, e.g., for cross-compiling.
+          + modify  #define's  for  build-compiler  to  suppress  cchar_t
+            symbol  from  compile  of  make_hash and make_keys, improving
+            cross-compilation of ncursesw.
+          + simplify  include-dependencies of make_hash and make_keys, to
+            reduce the need for setting BUILD_CPPFLAGS in cross-compiling
+            when the build- and target-machines differ.
+          + correct cross-compiling configure check for CF_MKSTEMP macro,
+            by adding a check cache variable set by AC_CHECK_FUNC.
+     * library dependencies:
+          + revise  wadd_wch  and  wecho_wchar to eliminate dependency on
+            unctrl.
+          + adjust  configure  script so that "t" is not added to library
+            suffix  when  weak-symbols  are  used,  allowing  the pthread
+            configuration to more closely match the non-thread naming.
+     * building the Ada95 tree:
+          + changes to use gnatmake project files in the Ada95 tree.
+          + add/use   configure  check  to  turn  on  project  rules  for
+            Ada95/src.
+          + old   gnatmake   (3.15)  does  not  produce  libraries  using
+            project-file;  work  around  by  adding  script  to  generate
+            alternate makefile.
+          + add  configure --with-ada-sharedlib option, for the test_make
+            rule.
+          + move  Ada95-related  logic  into aclocal.m4, since additional
+            checks  will be needed to distinguish old/new implementations
+            of gnat.
+          + add test_make / test_clean / test_install rules in Ada95/src
+          + change    install-path    for    adainclude    directory   to
+            /usr/share/ada (was /usr/lib/ada).
      * other configure/build issues:
-          + build-fixes for LynxOS
-          + modify  shared-library  rules  to  allow  FreeBSD  3.x to use
-            rpath.
-          + build-fix for FreeBSD "contemporary" TTY interface.
-          + build-fixes for AIX with libtool.
-          + build-fixes for Darwin and libtool.
-          + modify BeOS-specific ifdef's to build on Haiku.
-          + corrected  gcc  options  for  building  shared  libraries  on
-            Solaris and IRIX64.
-          + change  shared-library  configuration for OpenBSD, make rpath
-            work.
-          + build-fixes for using libutf8, e.g., on OpenBSD 3.7
-          + add   "-e"  option  in  ncurses/Makefile.in  when  generating
-            source-files  to  force earlier exit if the build environment
-            fails unexpectedly.
-          + add support for shared libraries for QNX.
-          + change  delimiter  in  MKlib_gen.sh from '%' to '@', to avoid
-            substitution  by  IBM xlc to '#' as part of its extensions to
-            digraphs.
-     * library:
-          + rewrite  wrapper  for  wcrtomb(),  making it work on Solaris.
-            This  is  used in the form library to determine the length of
-            the buffer needed by field_buffer.
-          + add/use  configure  script  macro  CF_SIG_ATOMIC_T,  use  the
-            corresponding type for data manipulated by signal handlers.
-          + set locale in misc/ncurses-config.in since it uses a range
-          + disable  GPM  mouse  support  when  $TERM  does not happen to
-            contain  "linux",  since  Gpm_Open()  no  longer  limits  its
-            assertion  to  terminals  that  it might handle, e.g., within
-            "screen" in xterm.
-          + reset mouse file-descriptor when unloading GPM library.
+          + make CCHARW_MAX value configurable, noting that changing this
+            would   change   the   size   of   cchar_t,   and   would  be
+            ABI-incompatible.
+          + improve  comparison of program-names when checking for linked
+            flavors such as "reset" by ignoring the executable suffix.
+          + drop mkdirs.sh, use "mkdir -p".
+          + drop  misc/ncu-indent  and misc/jpf-indent; they are provided
+            by an external package [3]cindent.
+          + change  makefiles  to  use  $ARFLAGS  rather  than  $AR_OPTS,
+            provide  a  configure check to detect whether a "-" is needed
+            before "ar" options.
+          + modify   CF_DISABLE_LEAKS   configure   macro   so  that  the
+            --enable-leaks option is not the same as --disable-leaks.
+          + improve    configure   script   macros   CF_HEADER_PATH   and
+            CF_LIBRARY_PATH  by adding CFLAGS, CPPFLAGS and LDFLAGS, LIBS
+            values to the search-lists.
+          + improve  configure  macros CF_GCC_VERSION and CF_GCC_WARNINGS
+            to  work  with  gcc  4.x's  c89  alias,  which  gives warning
+            messages  for  cases  where  older  versions would produce an
+            error.
+          + modify  CF_WITH_LIBTOOL  configure  check to allow unreleased
+            libtool version numbers (e.g. which include alphabetic chars,
+            as well as digits, after the final '.').
+          + improve  use  of  symbolic  links  in makefiles by using "-f"
+            option  if it is supported, to eliminate temporary removal of
+            the target
+          + add  a  configure-time  check  to  pick  a suitable value for
+            CC_SHARED_OPTS for Solaris.
+          + add  -shared option to MK_SHARED_LIB when -Bsharable is used,
+            for  *BSD's,  without which "main" might be one of the shared
+            library's dependencies.
+          + modify  configure  script  to allow building shared libraries
+            with gcc on AIX 5 or 6.
+          + suppress  configure check for static/dynamic linker flags for
+            gcc on Solaris 10, since gcc is confused by absence of static
+            libc,  and  does  not  switch  back  to  dynamic  mode before
+            finishing the libraries.
+          + suppress  configure check for static/dynamic linker flags for
+            gcc on Darwin.
+          + modify  misc/run_tic.in  to  create parent directory, in case
+            this is a new install of hashed database.
+          + modify  configure  check for tic program, used for fallbacks,
+            to  a  warning  if  not  found.  This makes it simpler to use
+            additonal  scripts  to bootstrap the fallbacks code using tic
+            from the build tree.
      * test programs:
-          + update  test  programs to build/work with various UNIX curses
-            for comparisons.
+          + add test/demo_terminfo, for comparison with demo_termcap.
+          + improve test/ncurses.c 'F' test, show combining characters in
+            color.
+          + fix logic for 'V' in test/ncurses.c tests f/F.
+          + improve  test/ncurses.c 'a test to put mouse droppings in the
+            proper window.
+          + modify  ncurses  'F'  test  to  demo wborder_set with colored
+            lines.
+          + modify ncurses 'f' test to demo wborder with colored lines.
+          + improve   test/ncurses.c   'a'   test,   using   unctrl  more
+            consistently to display meta-characters.
+          + correct  use  of  key_name  in test/ncurses.c 'A' test, which
+            only displays wide-characters, not key-codes since 20070612.
+          + add  test/clip_printw.c  to  illustrate  how  to  use  printw
+            without wrapping.
+          + modify  test-programs,  e.g,.  test/view.c, to address subtle
+            differences   between  Tru64/Solaris  and  HPUX/AIX  getcchar
+            return values.
+          + add  some  test programs (and make these use the same special
+            keys  by  sharing  linedata.h  functions): test/test_addstr.c
+            test/test_addwstr.c                      test/test_addchstr.c
+            test/test_add_wchstr.c
+          + add test/xterm-256color.dat
+          + modify  test  programs  to allow them to be built with NetBSD
+            curses.
+          + fixes for test programs to build/work on HPUX and AIX, etc.
 
                               Features of Ncurses
 
@@ -274,15 +450,15 @@
      * Support  for mouse event reporting with X Window xterm and FreeBSD
        and OS/2 console windows.
      * Extended mouse support via Alessandro Rubini's gpm package.
-     * The  function  wresize()  allows you to resize windows, preserving
+     * The  function  wresize  allows  you  to resize windows, preserving
        their data.
-     * The function use_default_colors() allows you to use the terminal's
+     * The  function  use_default_colors allows you to use the terminal's
        default colors for the default color pair, achieving the effect of
        transparent colors.
-     * The functions keyok() and define_key() allow you to better control
-       the  use  of function keys, e.g., disabling the ncurses KEY_MOUSE,
-       or  by  defining  more than one control sequence to map to a given
-       key code.
+     * The functions keyok and define_key allow you to better control the
+       use of function keys, e.g., disabling the ncurses KEY_MOUSE, or by
+       defining  more  than  one  control  sequence to map to a given key
+       code.
      * Support  for  256-color  terminals,  such  as  modern  xterm, when
        configured using the --enable-ext-colors option.
      * Support for 16-color terminals, such as aixterm and modern xterm.
@@ -293,7 +469,7 @@
        incorporates  a novel, simple, and cheap algorithm that enables it
        to  make  optimal  use  of hardware scrolling, line-insertion, and
        line-deletion  for  screen-line  movements. This algorithm is more
-       powerful than the 4.4BSD curses quickch() routine.
+       powerful than the 4.4BSD curses quickch routine.
      * Real  support  for  terminals  with  the  magic-cookie glitch. The
        screen-update  code  will  refrain from drawing a highlight if the
        magic-   cookie  unattributed  spaces  required  just  before  the
@@ -374,7 +550,7 @@
 
    Midnight Commander
           file manager
-          [9]http://www.ibiblio.org/mc/
+          [9]http://www.midnight-commander.org/
 
    mutt
           mail utility
@@ -387,7 +563,7 @@
    nvi
           New vi versions 1.50 are able to use ncurses versions 1.9.7 and
           later.
-          [12]http://www.bostic.com/vi/
+          [12]https://sites.google.com/a/bostic.com/keithbostic/nvi
 
    pinfo
           Lynx-like info browser.
@@ -412,7 +588,7 @@
 Who's Who and What's What
 
    Zeyd  Ben-Halim started it from a previous package pcurses, written by
-   Pavel  Curtis.  Eric  S. Raymond continued development. Jürgen Pfeifer
+   Pavel  Curtis.  Eric S. Raymond continued development. Juergen Pfeifer
    wrote  most of the form and menu libraries. Ongoing work is being done
    by  [17]Thomas  Dickey.  Thomas  Dickey acts as the maintainer for the
    Free  Software  Foundation,  which  holds  the  copyright  on ncurses.
@@ -452,16 +628,16 @@ References
 
    1. ftp://ftp.gnu.org/gnu/ncurses/
    2. ftp://invisible-island.net/ncurses/
-   3. http://invisible-island.net/xterm/xterm.log.html#xterm_230
+   3. http://invisible-island.net/cindent/cindent.html
    4. http://invisible-island.net/cdk/
    5. http://www.vexus.ca/products/CDK/
    6. http://invisible-island.net/ded/
    7. http://invisible-island.net/dialog/
    8. http://lynx.isc.org/release/
-   9. http://www.ibiblio.org/mc/
+   9. http://www.midnight-commander.org/
   10. http://www.mutt.org/
   11. http://www.ncftp.com/
-  12. http://www.bostic.com/vi/
+  12. https://sites.google.com/a/bostic.com/keithbostic/nvi
   13. https://alioth.debian.org/projects/pinfo/
   14. http://www.tin.org/
   15. http://alioth.debian.org/projects/minicom/
@@ -470,4 +646,4 @@ References
   18. mailto:bug-ncurses@gnu.org
   19. ftp://invisible-island.net/ncurses/
   20. http://www.catb.org/~esr/terminfo/
-  21. http://www.cs.utk.edu/~shuford/terminal_index.html
+  21. http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal

Added: vendor/ncurses/dist/Ada95/Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ncurses/dist/Ada95/Makefile.in	Sat Apr 30 10:55:14 2011	(r221243)
@@ -0,0 +1,81 @@
+# $Id: Makefile.in,v 1.21 2010/11/27 21:45:27 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2003,2010 Free Software Foundation, Inc.                #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+#
+#  Author:  Juergen Pfeifer, 1996
+#
+#  Version Control
+#  $Revision: 1.21 $
+#
+SHELL		= /bin/sh
+VPATH		= @srcdir@
+THIS		= Makefile
+
+SUBDIRS         = @ADA_SUBDIRS@
+
+CF_MFLAGS 	= @cf_cv_makeflags@
+@SET_MAKE@
+
+all \
+libs \
+sources \
+install \
+install.libs \
+uninstall \
+uninstall.libs ::
+	for d in $(SUBDIRS); do \
+		(cd $$d ; $(MAKE) $(CF_MFLAGS) $@) ;\
+	done
+
+clean \
+mostlyclean ::
+	for d in $(SUBDIRS); do \
+		(cd $$d ; $(MAKE) $(CF_MFLAGS) $@) ;\
+	done
+
+distclean \
+realclean ::
+	for d in $(SUBDIRS); do \
+		(cd $$d ; $(MAKE) $(CF_MFLAGS) $@) ;\
+	done
+	rm -rf lib
+	for lib_kind in static dynamic; do \
+		rm -rf $${lib_kind}-ali; \
+		rm -rf $${lib_kind}-obj; \
+	done
+	-rm -f config.cache config.log config.status include/ncurses_cfg.h
+	-rm -f Makefile
+
+tags :
+	@
+
+preinstall :
+	@
+
+install.data :
+	@

Added: vendor/ncurses/dist/Ada95/README
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ncurses/dist/Ada95/README	Sat Apr 30 10:55:14 2011	(r221243)
@@ -0,0 +1,33 @@
+-------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                         --
+--                                                                           --
+-- Permission is hereby granted, free of charge, to any person obtaining a   --
+-- copy of this software and associated documentation files (the             --
+-- "Software"), to deal in the Software without restriction, including       --
+-- without limitation the rights to use, copy, modify, merge, publish,       --
+-- distribute, distribute with modifications, sublicense, and/or sell copies --
+-- of the Software, and to permit persons to whom the Software is furnished  --
+-- to do so, subject to the following conditions:                            --
+--                                                                           --
+-- The above copyright notice and this permission notice shall be included   --
+-- in all copies or substantial portions of the Software.                    --
+--                                                                           --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
+-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
+-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
+--                                                                           --
+-- Except as contained in this notice, the name(s) of the above copyright    --
+-- holders shall not be used in advertising or otherwise to promote the      --
+-- sale, use or other dealings in this Software without prior written        --
+-- authorization.                                                            --
+-------------------------------------------------------------------------------
+
+--  Author:  Juergen Pfeifer, 1996
+
+The documentation is provided in HTML format in the ./html 
+subdirectory. The main document is named index.html
+

Added: vendor/ncurses/dist/Ada95/TODO
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ncurses/dist/Ada95/TODO	Sat Apr 30 10:55:14 2011	(r221243)
@@ -0,0 +1,55 @@
+-------------------------------------------------------------------------------
+-- Copyright (c) 1998-1999,2006 Free Software Foundation, Inc.               --
+--                                                                           --
+-- Permission is hereby granted, free of charge, to any person obtaining a   --
+-- copy of this software and associated documentation files (the             --
+-- "Software"), to deal in the Software without restriction, including       --
+-- without limitation the rights to use, copy, modify, merge, publish,       --
+-- distribute, distribute with modifications, sublicense, and/or sell copies --
+-- of the Software, and to permit persons to whom the Software is furnished  --
+-- to do so, subject to the following conditions:                            --
+--                                                                           --
+-- The above copyright notice and this permission notice shall be included   --
+-- in all copies or substantial portions of the Software.                    --
+--                                                                           --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
+-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
+-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
+--                                                                           --
+-- Except as contained in this notice, the name(s) of the above copyright    --
+-- holders shall not be used in advertising or otherwise to promote the      --
+-- sale, use or other dealings in this Software without prior written        --
+-- authorization.                                                            --
+-------------------------------------------------------------------------------
+-- $Id: TODO,v 1.5 2006/04/22 22:23:21 tom Exp $
+-------------------------------------------------------------------------------
+
+--  Intensive testing
+    Perhaps the delivery of the Beta will help a bit.
+
+--  Documentation
+    Like most WEB pages: under continuous construction
+
+--  Style cleanup
+    	
+--  Alternate functions for procedures with out params
+    Comfort purpose
+
+--  Sample program
+    Under continuous construction (and it's not a WEB page!!!)
+
+--  Make the binding objects a shared library
+    They are rather large, so it would make sense, otherwise Ada95
+    would look too large, although the generated code is as compact
+    as C or C++. I'll wait a bit until the GNAT people provide some
+    better support to construct shared libraries.
+
+--  Think about more inlining
+
+--  Check for memory leaks.
+    Oh I would like it so much if the GNAT guys would put an optional
+    GC into their system.

Added: vendor/ncurses/dist/Ada95/aclocal.m4
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ vendor/ncurses/dist/Ada95/aclocal.m4	Sat Apr 30 10:55:14 2011	(r221243)
@@ -0,0 +1,3458 @@
+dnl***************************************************************************
+dnl Copyright (c) 2010,2011 Free Software Foundation, Inc.                   *
+dnl                                                                          *
+dnl Permission is hereby granted, free of charge, to any person obtaining a  *
+dnl copy of this software and associated documentation files (the            *
+dnl "Software"), to deal in the Software without restriction, including      *
+dnl without limitation the rights to use, copy, modify, merge, publish,      *
+dnl distribute, distribute with modifications, sublicense, and/or sell       *
+dnl copies of the Software, and to permit persons to whom the Software is    *
+dnl furnished to do so, subject to the following conditions:                 *
+dnl                                                                          *
+dnl The above copyright notice and this permission notice shall be included  *
+dnl in all copies or substantial portions of the Software.                   *
+dnl                                                                          *
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+dnl                                                                          *
+dnl Except as contained in this notice, the name(s) of the above copyright   *
+dnl holders shall not be used in advertising or otherwise to promote the     *
+dnl sale, use or other dealings in this Software without prior written       *
+dnl authorization.                                                           *
+dnl***************************************************************************
+dnl
+dnl Author: Thomas E. Dickey
+dnl
+dnl $Id: aclocal.m4,v 1.20 2011/01/22 19:46:50 tom Exp $
+dnl Macros used in NCURSES Ada95 auto-configuration script.
+dnl
+dnl These macros are maintained separately from NCURSES.  The copyright on
+dnl this file applies to the aggregation of macros and does not affect use of
+dnl these macros in other applications.
+dnl
+dnl See http://invisible-island.net/autoconf/ for additional information.
+dnl
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
+dnl -------------------
+dnl Construct the list of include-options for the C programs in the Ada95
+dnl binding.
+AC_DEFUN([CF_ADA_INCLUDE_DIRS],
+[
+ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
+if test "$srcdir" != "."; then
+	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
+fi
+if test "$GCC" != yes; then
+	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+elif test "$includedir" != "/usr/include"; then
+	if test "$includedir" = '${prefix}/include' ; then
+		if test $prefix != /usr ; then
+			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+		fi
+	else
+		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
+	fi
+fi
+AC_SUBST(ACPPFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_ADAFLAGS version: 1 updated: 2010/06/19 15:22:18
+dnl ---------------
+dnl Add to $ADAFLAGS, which is substituted into makefile and scripts.
+AC_DEFUN([CF_ADD_ADAFLAGS],[
+ 	ADAFLAGS="$ADAFLAGS $1"
+	AC_SUBST(ADAFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
+dnl -------------
+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
+dnl The second parameter if given makes this macro verbose.
+dnl
+dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
+dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
+dnl confused by the quotes (which require backslashes to keep them usable).
+AC_DEFUN([CF_ADD_CFLAGS],
+[
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $1
+do
+case $cf_fix_cppflags in
+no)
+	case $cf_add_cflags in #(vi
+	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+				&& test -z "${cf_tst_cflags}" \
+				&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
+		case "$CPPFLAGS" in
+		*$cf_add_cflags) #(vi
+			;;
+		*) #(vi
+			case $cf_add_cflags in #(vi
+			-D*)
+				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+				CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
+				;;
+			esac
+			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+			;;
+		esac
+		;;
+	*)
+		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+		;;
+	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 10:56: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 5E40D106566C;
	Sat, 30 Apr 2011 10:56:09 +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 33BC08FC14;
	Sat, 30 Apr 2011 10:56: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 p3UAu9pH042449;
	Sat, 30 Apr 2011 10:56:09 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UAu9TK042448;
	Sat, 30 Apr 2011 10:56:09 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201104301056.p3UAu9TK042448@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 30 Apr 2011 10:56:09 +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: r221244 - vendor/ncurses/5.8-20110226
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 10:56:09 -0000

Author: ed
Date: Sat Apr 30 10:56:08 2011
New Revision: 221244
URL: http://svn.freebsd.org/changeset/base/221244

Log:
  Tag ncurses 5.8.

Added:
  vendor/ncurses/5.8-20110226/
     - copied from r221243, vendor/ncurses/dist/

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 10:59: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 095A4106564A;
	Sat, 30 Apr 2011 10:59:18 +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 E928C8FC0C;
	Sat, 30 Apr 2011 10:59: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 p3UAxHO7042566;
	Sat, 30 Apr 2011 10:59:17 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UAxHpc042561;
	Sat, 30 Apr 2011 10:59:17 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201104301059.p3UAxHpc042561@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 30 Apr 2011 10:59:17 +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: r221245 - in vendor/ncurses/dist: . Ada95 Ada95/doc
	Ada95/gen Ada95/include Ada95/package Ada95/package/debian
	Ada95/package/debian/source Ada95/samples Ada95/src doc/html
	doc/html/ada ...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 10:59:18 -0000

Author: ed
Date: Sat Apr 30 10:59:17 2011
New Revision: 221245
URL: http://svn.freebsd.org/changeset/base/221245

Log:
  Import ncurses 5.9.

Added:
  vendor/ncurses/dist/Ada95/doc/
  vendor/ncurses/dist/Ada95/doc/Makefile.in
  vendor/ncurses/dist/Ada95/package/
  vendor/ncurses/dist/Ada95/package/AdaCurses-doc.spec
  vendor/ncurses/dist/Ada95/package/AdaCurses.spec
  vendor/ncurses/dist/Ada95/package/debian/
  vendor/ncurses/dist/Ada95/package/debian/compat
  vendor/ncurses/dist/Ada95/package/debian/control
  vendor/ncurses/dist/Ada95/package/debian/copyright
  vendor/ncurses/dist/Ada95/package/debian/docs
  vendor/ncurses/dist/Ada95/package/debian/rules   (contents, props changed)
  vendor/ncurses/dist/Ada95/package/debian/source/
  vendor/ncurses/dist/Ada95/package/debian/source/format
  vendor/ncurses/dist/Ada95/package/debian/watch
  vendor/ncurses/dist/Ada95/src/c_varargs_to_ada.c
  vendor/ncurses/dist/Ada95/src/c_varargs_to_ada.h
  vendor/ncurses/dist/Ada95/src/ncurses_compat.c
  vendor/ncurses/dist/test/package/
  vendor/ncurses/dist/test/package/debian/
  vendor/ncurses/dist/test/package/debian/compat
  vendor/ncurses/dist/test/package/debian/control
  vendor/ncurses/dist/test/package/debian/copyright
  vendor/ncurses/dist/test/package/debian/docs
  vendor/ncurses/dist/test/package/debian/rules   (contents, props changed)
  vendor/ncurses/dist/test/package/debian/source/
  vendor/ncurses/dist/test/package/debian/source/format
  vendor/ncurses/dist/test/package/debian/watch
  vendor/ncurses/dist/test/package/ncurses-examples.spec
Modified:
  vendor/ncurses/dist/ANNOUNCE
  vendor/ncurses/dist/Ada95/aclocal.m4
  vendor/ncurses/dist/Ada95/configure
  vendor/ncurses/dist/Ada95/configure.in
  vendor/ncurses/dist/Ada95/gen/Makefile.in
  vendor/ncurses/dist/Ada95/gen/gen.c
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-aux.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses-mouse.ads.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.adb.m4
  vendor/ncurses/dist/Ada95/gen/terminal_interface-curses.ads.m4
  vendor/ncurses/dist/Ada95/include/Makefile.in
  vendor/ncurses/dist/Ada95/make-tar.sh
  vendor/ncurses/dist/Ada95/samples/Makefile.in
  vendor/ncurses/dist/Ada95/samples/explain.txt
  vendor/ncurses/dist/Ada95/samples/ncurses2-acs_and_scroll.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_forms.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_pad.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-demo_panels.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-getopt.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-menu_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-overlap_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-slk_test.adb
  vendor/ncurses/dist/Ada95/samples/ncurses2-trace_set.adb
  vendor/ncurses/dist/Ada95/samples/sample-curses_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-explanation.adb
  vendor/ncurses/dist/Ada95/samples/sample-form_demo-aux.ads
  vendor/ncurses/dist/Ada95/samples/sample-form_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-function_key_setting.adb
  vendor/ncurses/dist/Ada95/samples/sample-function_key_setting.ads
  vendor/ncurses/dist/Ada95/samples/sample-header_handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-helpers.adb
  vendor/ncurses/dist/Ada95/samples/sample-helpers.ads
  vendor/ncurses/dist/Ada95/samples/sample-keyboard_handler.adb
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo-aux.ads
  vendor/ncurses/dist/Ada95/samples/sample-menu_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample-text_io_demo.adb
  vendor/ncurses/dist/Ada95/samples/sample.adb
  vendor/ncurses/dist/Ada95/src/Makefile.in
  vendor/ncurses/dist/Ada95/src/library.gpr
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types-user.ads
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms-field_types.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-forms.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-menus.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-text_io.adb
  vendor/ncurses/dist/Ada95/src/terminal_interface-curses-trace.adb_p
  vendor/ncurses/dist/INSTALL
  vendor/ncurses/dist/MANIFEST
  vendor/ncurses/dist/NEWS
  vendor/ncurses/dist/TO-DO
  vendor/ncurses/dist/aclocal.m4
  vendor/ncurses/dist/announce.html.in
  vendor/ncurses/dist/configure
  vendor/ncurses/dist/configure.in
  vendor/ncurses/dist/dist.mk
  vendor/ncurses/dist/doc/html/ada/funcs/A.htm
  vendor/ncurses/dist/doc/html/ada/funcs/B.htm
  vendor/ncurses/dist/doc/html/ada/funcs/C.htm
  vendor/ncurses/dist/doc/html/ada/funcs/D.htm
  vendor/ncurses/dist/doc/html/ada/funcs/E.htm
  vendor/ncurses/dist/doc/html/ada/funcs/F.htm
  vendor/ncurses/dist/doc/html/ada/funcs/G.htm
  vendor/ncurses/dist/doc/html/ada/funcs/H.htm
  vendor/ncurses/dist/doc/html/ada/funcs/I.htm
  vendor/ncurses/dist/doc/html/ada/funcs/K.htm
  vendor/ncurses/dist/doc/html/ada/funcs/L.htm
  vendor/ncurses/dist/doc/html/ada/funcs/M.htm
  vendor/ncurses/dist/doc/html/ada/funcs/N.htm
  vendor/ncurses/dist/doc/html/ada/funcs/O.htm
  vendor/ncurses/dist/doc/html/ada/funcs/P.htm
  vendor/ncurses/dist/doc/html/ada/funcs/R.htm
  vendor/ncurses/dist/doc/html/ada/funcs/S.htm
  vendor/ncurses/dist/doc/html/ada/funcs/T.htm
  vendor/ncurses/dist/doc/html/ada/funcs/U.htm
  vendor/ncurses/dist/doc/html/ada/funcs/V.htm
  vendor/ncurses/dist/doc/html/ada/funcs/W.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-aux__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-aux__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-forms__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-menus__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-mouse__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-mouse__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-putwin__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-termcap__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-terminfo__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-text_io__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-trace__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses-trace__ads.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses__adb.htm
  vendor/ncurses/dist/doc/html/ada/terminal_interface-curses__ads.htm
  vendor/ncurses/dist/doc/html/announce.html
  vendor/ncurses/dist/doc/html/man/adacurses-config.1.html
  vendor/ncurses/dist/doc/html/man/captoinfo.1m.html
  vendor/ncurses/dist/doc/html/man/clear.1.html
  vendor/ncurses/dist/doc/html/man/form.3x.html
  vendor/ncurses/dist/doc/html/man/infocmp.1m.html
  vendor/ncurses/dist/doc/html/man/infotocap.1m.html
  vendor/ncurses/dist/doc/html/man/menu.3x.html
  vendor/ncurses/dist/doc/html/man/ncurses.3x.html
  vendor/ncurses/dist/doc/html/man/ncurses5-config.1.html
  vendor/ncurses/dist/doc/html/man/panel.3x.html
  vendor/ncurses/dist/doc/html/man/tabs.1.html
  vendor/ncurses/dist/doc/html/man/terminfo.5.html
  vendor/ncurses/dist/doc/html/man/tic.1m.html
  vendor/ncurses/dist/doc/html/man/toe.1m.html
  vendor/ncurses/dist/doc/html/man/tput.1.html
  vendor/ncurses/dist/doc/html/man/tset.1.html
  vendor/ncurses/dist/include/ncurses_defs
  vendor/ncurses/dist/man/MKada_config.in
  vendor/ncurses/dist/misc/ncurses-config.in
  vendor/ncurses/dist/ncurses/base/lib_newwin.c
  vendor/ncurses/dist/ncurses/base/lib_slk.c
  vendor/ncurses/dist/ncurses/widechar/lib_add_wch.c
  vendor/ncurses/dist/test/aclocal.m4
  vendor/ncurses/dist/test/configure
  vendor/ncurses/dist/test/configure.in
  vendor/ncurses/dist/test/make-tar.sh
  vendor/ncurses/dist/test/tclock.c
  vendor/ncurses/dist/test/test.priv.h

Modified: vendor/ncurses/dist/ANNOUNCE
==============================================================================
--- vendor/ncurses/dist/ANNOUNCE	Sat Apr 30 10:56:08 2011	(r221244)
+++ vendor/ncurses/dist/ANNOUNCE	Sat Apr 30 10:59:17 2011	(r221245)
@@ -1,4 +1,4 @@
-                            Announcing ncurses 5.8
+                            Announcing ncurses 5.9
 
    The  ncurses  (new  curses)  library  is  a free software emulation of
    curses  in  System  V  Release 4.0, and more. It uses terminfo format,
@@ -27,393 +27,30 @@
                                  Release Notes
 
    This  release  is  designed  to  be upward compatible from ncurses 5.0
-   through   5.7;  very  few  applications  will  require  recompilation,
+   through   5.8;  very  few  applications  will  require  recompilation,
    depending   on  the  platform.  These  are  the  highlights  from  the
-   change-log since ncurses 5.7 release.
+   change-log since ncurses 5.8 release.
 
-Interface changes
+   This  is  a  bug-fix  release,  correcting  a  small  number of urgent
+   problems in the ncurses library from the 5.8 release.
 
-     * turn on _XOPEN_CURSES definition in curses.h.
-     * change  _nc_has_mouse  to  has_mouse,  reflect  its use in C++ and
-       Ada95.
-     * add is_pad and is_subwin functions for opaque access to the WINDOW
-       structure.
-     * add tiparm, based on review of X/Open Curses Issue 7.
-
-New features and improvements
-
-  Library Improvements
-
-     * add  a terminal driver for Windows console, which supports a MinGW
-       port to Windows.
-     * add  extended  functions  which  specify  the  SCREEN  pointer for
-       several curses functions which use the global SP.
-     * improve  the  NCURSES_NO_UTF8_ACS feature by adding a check for an
-       extended terminfo capability U8.
-     * improve  performance of tigetstr, etc., by using hashing code from
-       tic.
-     * add  WACS_xxx  definitions  to  wide-character  configuration  for
-       thick- and double-lines.
-     * modify  init_pair  to  allow  caller  to  create extra color pairs
-       beyond the color_pairs limit, which use default colors.
-
-  Improvements to Programs
-
-     * add tabs program.
-     * modify  tic's  -I/-C  dump to reformat acsc strings into canonical
-       form (sorted, unique mapping).
-     * add  checks  in tic for inconsistent cursor-movement controls, and
-       for inconsistent printer-controls.
-     * add  special  case  to  _nc_infotocap (used by tic and infocmp) to
-       recognize   the   setaf/setab   strings  from  xterm+256color  and
-       xterm+88color,  and  provide  a  reduced  version which works with
-       termcap.
-
-  Terminal Database
-
-     * added entries:
-          + bterm terminfo entry, based on bogl 0.1.18
-          + cons25-debian entry
-          + eterm-color entry
-          + linux-16color
-          + mlterm+256color entry, for mlterm 3.0.0
-          + several screen-bce.xxx entries
-          + screen.Eterm terminfo entry
-          + vwmterm entry
-          + xterm-utf8 entry as a demo of the U8 feature
-     * updated/improved entries:
-          + use extended capabilities:
-               o add  U8 feature to denote entries for terminal emulators
-                 which  do  not support VT100 SI/SO when processing UTF-8
-                 encoding
-               o add  XT capability to entries for terminals that support
-                 both  xterm-style  mouse- and title-controls, for screen
-                 which special-cases TERM beginning with xterm or rxvt
-          + improvements based on new checks in tic:
-          +
-               o fill  in  no-parameter  forms of cursor-movement where a
-                 parameterized form is available
-               o fill  in  missing  cursor controls where the form of the
-                 controls is ANSI
-               o add parameterized cursor-controls to linux-basic
-               o modify  nsterm,  xnuppc  and  tek4115  to  make sgr/sgr0
-                 consistent
-               o change  several  terminfo entries to make consistent use
-                 of ANSI clear-all-tabs
-          + extend  ansi.sys  pfkey capability from kf1-kf10 to kf1-kf48,
-            moving   function   key   definitions   from   emx-base   for
-            consistency.
-          + correct   missing   final   'p'   in   pfkey   capability  of
-            ansi.sys-old.
-          + rename   atari   and  st52  terminfo  entries  to  atari-old,
-            st52-old, use newer entries from FreeMiNT.
-          + repurpose  gnome  terminfo  entries  as  vte, retaining gnome
-            variants  for  compatibility, but generally deprecating those
-            since  the  VTE library is what actually defines the behavior
-            of "gnome", etc., since 2003.
-          + improve  interix  smso  terminfo  capability by using reverse
-            rather than bold.
-          + correct  initc  capability  of  linux-c-nc end-of-range, make
-            similar change for dg+ccc and dgunix+ccc.
-          + update minix terminfo entry.
-          + updated nsterm* entries.
-          + remove unnecessary kcan assignment to ^C from putty.
-          + suppress  ncv  in  screen  and konsole-base entries, allowing
-            underline.
-          + change ncv and op capabilities in sun-color terminfo entry to
-            match Sun's entry for this.
-          + fix typo in rmso for tek4106 entry.
-          + improve acsc string for vt52, show arrow keys.
-          + add  hard-reset  for  rs2 to wsvt25 to help ensure that reset
-            ends the alternate character set.
-          + add ccc and initc capabilities to xterm-16color.
-
-Major bug fixes
-
-     * ncurses library
-          + wide character support
-               o modify length returned by getcchar to count the trailing
-                 null which is documented in X/Open.
-               o fix  an  infinite  recursion when adding a legacy-coding
-                 8-bit value using insch.
-               o improve  a  workaround in adding wide-characters, when a
-                 control  character  is found. The library uses unctrl to
-                 obtain a printable version of the control character, but
-                 was not passing color or video attributes.
-               o modify  waddch_literal,  updating  line-pointer  after a
-                 multicolumn character is found to not fit on the current
-                 row,  and  wrapping  is done. Since the line-pointer was
-                 not  updated,  the  wrapped  multicolumn  character  was
-                 written to the beginning of the current row.
-               o fixes in wins_nwstr and related functions to ensure that
-                 special characters, i.e., control characters are handled
-                 properly with the wide-character configuration.
-               o correct  internal  _nc_insert_ch  to  use _nc_insert_wch
-                 when  inserting  wide  characters,  since  the  wins_wch
-                 function   that  it  used  did  not  update  the  cursor
-                 position.
-          + mouse
-               o add  check  if Gpm_Open returns a -2, e.g., for "xterm".
-                 This  is normally suppressed but can be overridden using
-                 $NCURSES_GPM_TERMS.  Ensure  that Gpm_Close is called in
-                 this case.
-               o add  check  in mouse-driver to disable connection if GPM
-                 returns  a  zero,  indicating  that  the  connection  is
-                 closed.
-               o modify  getmouse  to  act  as its documentation implied,
-                 returning  on  each  call the preceding event until none
-                 are  left.  When  no  more events remain, it will return
-                 ERR.
-          + miscellaneous
-               o improve  handling  of color-pairs embedded in attributes
-                 for the extended-colors configuration.
-               o add check for failure to open hashed-database needed for
-                 db4.6.
-               o modify  use of $CC environment variable which is defined
-                 by X/Open as a curses feature, to ignore it if it is not
-                 a single character.
-               o modify  declaration  of  cur_term  when broken-linker is
-                 used, but enable-reentrant is not, to match pre-5.7.
-               o correct limit-checks in derwin.
-               o remove  old  check  in mvderwin which prevented moving a
-                 derived  window  whose  origin happened to coincide with
-                 its parent's origin.
-               o correct  limit-checks  in newwin, to ensure that windows
-                 have nonzero size.
-               o modify  set_curterm  to make broken-linker configuration
-                 work with changes from 20090228.
-               o modify  wgetch to ensure it checks SIGWINCH when it gets
-                 an error in non-blocking mode.
-               o correct   limit-check   in   wredrawln,  accounting  for
-                 begy/begx values.
-               o fix   a   null-pointer   check   in  _nc_format_slks  in
-                 lib_slk.c, from 20070704 changes.
-               o correct  translation  of  "^"  in _nc_infotocap, used to
-                 transform terminfo to termcap strings.
-               o modify  _nc_wgetch  to check for a -1 in the fifo, e.g.,
-                 after  a  SIGWINCH,  and  discard  that  value, to avoid
-                 confusing application.
-     * other libraries
-          + correct   transfer  of  multicolumn  characters  in  multirow
-            field_buffer,  which  stopped at the end of the first row due
-            to filling of unused entries in a cchar_t array with nulls.
-          + correct buffer-size after internal resizing of wide-character
-            set_field_buffer, broken in 20081018 changes.
-          + correct  layout  of  working  window  used to extract data in
-            wide-character configured by set_field_buffer
-
-Portability
-
-     * configure script:
-          + new options:
-
-              --disable-libtool-version
-                      use  the  "-version-number" feature which was added
-                      in  libtool  1.5.  The default value for the option
-                      uses  the  newer  feature,  which  makes  libraries
-                      generated   using   libtool   compatible  with  the
-                      standard builds of ncurses.
-
-              --disable-rpath-hack
-                      disable  a  feature  which  adds  rpath options for
-                      libraries in unusual places.
-
-              --enable-interop
-                      integrate  changes  for  generic/interop support to
-                      form-library.
-
-              --enable-pc-files
-                      generate ".pc" files for each of the libraries, and
-                      install them in pkg-config's library directory.
-
-              --enable-pthreads-eintr
-                      control  whether to allow EINTR to interrupt a read
-                      operation  in  wgetch.  This  applies  only  to the
-                      pthread configuration
-
-              --enable-sp-funcs
-                      compile-in  support  for  extended  functions which
-                      accept  a  SCREEN  pointer,  reducing  the need for
-                      juggling  the  global  SP  value  with set_term and
-                      delscreen.
-
-              --enable-term-driver
-                      compile  with  terminal-driver. That is used in the
-                      MinGW  port,  and (being somewhat more complicated)
-                      is  an experimental alternative to the conventional
-                      termlib   internals.  Currently,  it  requires  the
-                      sp-funcs feature to be enabled.
-
-              --with-ncurses-wrap-prefix
-                      allows  setting  the  prefix  for functions used to
-                      wrap  global  variables  to  something  other  than
-                      "_nc_".
-
-              --with-pkg-config=[DIR]
-                      check  for  pkg-config,  optionally  specifying its
-                      path.
-
-              --without-manpages
-                      tells  the configure script to suppress the install
-                      of ncurses' manpages.
-
-              --without-tests
-                      suppress building test programs.
-
-          + improved options:
-               o correct logic for --with-database, which was coded as an
-                 enable-type switch.
-               o omit    the   opaque-functions   from   lib_gen.o   when
-                 --disable-ext-funcs is used.
-     * packaging:
-          + *-config scripts:
-               o modify  adacurses-config to look for ".ali" files in the
-                 adalib directory.
-               o correct  install  for  the  Ada95  tree,  which  omitted
-                 libAdaCurses.a used in adacurses-config.
-               o change   install   for   adacurses-config   to   provide
-                 additional   flavors   such  as  adacursesw-config,  for
-                 ncursesw.
-               o modify  scripts to generate ncurses*-config and pc-files
-                 to add dependency for tinfo library.
-               o use    ncurses*-config    scripts   if   available   for
-                 test/configure.
-               o correct name for termlib in ncurses*-config, e.g., if it
-                 is renamed to provide a single file for ncurses/ncursesw
-                 libraries.
-               o generate manpages for the *-config scripts, adapted from
-                 help2man.
-               o modify   install-rule  for  manpages  so  that  *-config
-                 manpages will install when building with --srcdir.
-               o build-fixes   for   OpenSolaris   aka  Solaris  11,  for
-                 wide-character   configuration  as  well  as  for  rpath
-                 feature in *-config scripts.
-               o use  $includedir  symbol  in misc/ncurses-config.in, add
-                 --includedir option.
-               o improve install-rules for pc-files.
-               o create the pkg-config library directory if needed.
-               o fix  typo  "==" where "=" is needed in ncurses-config.in
-                 and gen-pkgconfig.in files.
-               o modify  gen-pkgconfig.in  to  eliminate  a dependency on
-                 rpath  when  deciding  whether  to  add  $LIBS to --libs
-                 output;  that  should be shown for the ncurses and tinfo
-                 libraries without taking rpath into account.
-               o modify  handling  of  $PKG_CONFIG_LIBDIR to use only the
-                 first item in a possibly colon-separated list.
-          + other packaging issues
-               o add make-tar.sh scripts to Ada95 and test subdirectories
-                 to help with making those separately distributable.
-               o add  Ada95/configure  script, to use in tar-file created
-                 by Ada95/make-tar.sh.
-               o remove   tar-copy.sh   and   related  configure/Makefile
-                 chunks,  since  the Ada95 binding is now installed using
-                 rules in Ada95/src.
-     * cross-compiling:
-          + improve  configure  checks  for  location  of tic and infocmp
-            programs  used  for  installing  database  and for generating
-            fallback data, e.g., for cross-compiling.
-          + modify  #define's  for  build-compiler  to  suppress  cchar_t
-            symbol  from  compile  of  make_hash and make_keys, improving
-            cross-compilation of ncursesw.
-          + simplify  include-dependencies of make_hash and make_keys, to
-            reduce the need for setting BUILD_CPPFLAGS in cross-compiling
-            when the build- and target-machines differ.
-          + correct cross-compiling configure check for CF_MKSTEMP macro,
-            by adding a check cache variable set by AC_CHECK_FUNC.
-     * library dependencies:
-          + revise  wadd_wch  and  wecho_wchar to eliminate dependency on
-            unctrl.
-          + adjust  configure  script so that "t" is not added to library
-            suffix  when  weak-symbols  are  used,  allowing  the pthread
-            configuration to more closely match the non-thread naming.
-     * building the Ada95 tree:
-          + changes to use gnatmake project files in the Ada95 tree.
-          + add/use   configure  check  to  turn  on  project  rules  for
-            Ada95/src.
-          + old   gnatmake   (3.15)  does  not  produce  libraries  using
-            project-file;  work  around  by  adding  script  to  generate
-            alternate makefile.
-          + add  configure --with-ada-sharedlib option, for the test_make
-            rule.
-          + move  Ada95-related  logic  into aclocal.m4, since additional
-            checks  will be needed to distinguish old/new implementations
-            of gnat.
-          + add test_make / test_clean / test_install rules in Ada95/src
-          + change    install-path    for    adainclude    directory   to
-            /usr/share/ada (was /usr/lib/ada).
-     * other configure/build issues:
-          + make CCHARW_MAX value configurable, noting that changing this
-            would   change   the   size   of   cchar_t,   and   would  be
-            ABI-incompatible.
-          + improve  comparison of program-names when checking for linked
-            flavors such as "reset" by ignoring the executable suffix.
-          + drop mkdirs.sh, use "mkdir -p".
-          + drop  misc/ncu-indent  and misc/jpf-indent; they are provided
-            by an external package [3]cindent.
-          + change  makefiles  to  use  $ARFLAGS  rather  than  $AR_OPTS,
-            provide  a  configure check to detect whether a "-" is needed
-            before "ar" options.
-          + modify   CF_DISABLE_LEAKS   configure   macro   so  that  the
-            --enable-leaks option is not the same as --disable-leaks.
-          + improve    configure   script   macros   CF_HEADER_PATH   and
-            CF_LIBRARY_PATH  by adding CFLAGS, CPPFLAGS and LDFLAGS, LIBS
-            values to the search-lists.
-          + improve  configure  macros CF_GCC_VERSION and CF_GCC_WARNINGS
-            to  work  with  gcc  4.x's  c89  alias,  which  gives warning
-            messages  for  cases  where  older  versions would produce an
-            error.
-          + modify  CF_WITH_LIBTOOL  configure  check to allow unreleased
-            libtool version numbers (e.g. which include alphabetic chars,
-            as well as digits, after the final '.').
-          + improve  use  of  symbolic  links  in makefiles by using "-f"
-            option  if it is supported, to eliminate temporary removal of
-            the target
-          + add  a  configure-time  check  to  pick  a suitable value for
-            CC_SHARED_OPTS for Solaris.
-          + add  -shared option to MK_SHARED_LIB when -Bsharable is used,
-            for  *BSD's,  without which "main" might be one of the shared
-            library's dependencies.
-          + modify  configure  script  to allow building shared libraries
-            with gcc on AIX 5 or 6.
-          + suppress  configure check for static/dynamic linker flags for
-            gcc on Solaris 10, since gcc is confused by absence of static
-            libc,  and  does  not  switch  back  to  dynamic  mode before
-            finishing the libraries.
-          + suppress  configure check for static/dynamic linker flags for
-            gcc on Darwin.
-          + modify  misc/run_tic.in  to  create parent directory, in case
-            this is a new install of hashed database.
-          + modify  configure  check for tic program, used for fallbacks,
-            to  a  warning  if  not  found.  This makes it simpler to use
-            additonal  scripts  to bootstrap the fallbacks code using tic
-            from the build tree.
-     * test programs:
-          + add test/demo_terminfo, for comparison with demo_termcap.
-          + improve test/ncurses.c 'F' test, show combining characters in
-            color.
-          + fix logic for 'V' in test/ncurses.c tests f/F.
-          + improve  test/ncurses.c 'a test to put mouse droppings in the
-            proper window.
-          + modify  ncurses  'F'  test  to  demo wborder_set with colored
-            lines.
-          + modify ncurses 'f' test to demo wborder with colored lines.
-          + improve   test/ncurses.c   'a'   test,   using   unctrl  more
-            consistently to display meta-characters.
-          + correct  use  of  key_name  in test/ncurses.c 'A' test, which
-            only displays wide-characters, not key-codes since 20070612.
-          + add  test/clip_printw.c  to  illustrate  how  to  use  printw
-            without wrapping.
-          + modify  test-programs,  e.g,.  test/view.c, to address subtle
-            differences   between  Tru64/Solaris  and  HPUX/AIX  getcchar
-            return values.
-          + add  some  test programs (and make these use the same special
-            keys  by  sharing  linedata.h  functions): test/test_addstr.c
-            test/test_addwstr.c                      test/test_addchstr.c
-            test/test_add_wchstr.c
-          + add test/xterm-256color.dat
-          + modify  test  programs  to allow them to be built with NetBSD
-            curses.
-          + fixes for test programs to build/work on HPUX and AIX, etc.
+   It also improves the Ada95 binding:
+     * fixes  a  longstanding  portability  problem  with  its use of the
+       [3]set_field_type    function.    Because   that   function   uses
+       variable-length  argument  lists, its interface with gnat does not
+       work with certain platforms.
+     * improves  configurability and portability, particularly when built
+       separately  from the main ncurses tree. The 5.8 release introduced
+       scripts  which  can be used to construct separate tarballs for the
+       Ada95 and ncurses examples.
+       Those  were a proof of concept. For the 5.9 release, those scripts
+       are  augmented  with  rpm-  and  dpkg-scripts  used in test builds
+       against  a  variety of gnat- and system ncurses versions as old as
+       gnat  3.15  and  ncurses  5.4  (see  snapshots  and systems tested
+       [4]here.
+     * additional  improvements  were made for portability of the ncurses
+       examples,  adding  rpm-  and  dpkg-scripts  for  test-builds.  See
+       [5]this page for snapshots and other information.
 
                               Features of Ncurses
 
@@ -532,55 +169,55 @@ Portability
 
    cdk
           Curses Development Kit
-          [4]http://invisible-island.net/cdk/
-          [5]http://www.vexus.ca/products/CDK/
+          [6]http://invisible-island.net/cdk/
+          [7]http://www.vexus.ca/products/CDK/
 
    ded
           directory-editor
-          [6]http://invisible-island.net/ded/
+          [8]http://invisible-island.net/ded/
 
    dialog
           the  underlying  application used in Slackware's setup, and the
           basis for similar applications on GNU/Linux.
-          [7]http://invisible-island.net/dialog/
+          [9]http://invisible-island.net/dialog/
 
    lynx
           the character-screen WWW browser
-          [8]http://lynx.isc.org/release/
+          [10]http://lynx.isc.org/release/
 
    Midnight Commander
           file manager
-          [9]http://www.midnight-commander.org/
+          [11]http://www.midnight-commander.org/
 
    mutt
           mail utility
-          [10]http://www.mutt.org/
+          [12]http://www.mutt.org/
 
    ncftp
           file-transfer utility
-          [11]http://www.ncftp.com/
+          [13]http://www.ncftp.com/
 
    nvi
           New vi versions 1.50 are able to use ncurses versions 1.9.7 and
           later.
-          [12]https://sites.google.com/a/bostic.com/keithbostic/nvi
+          [14]https://sites.google.com/a/bostic.com/keithbostic/nvi
 
    pinfo
           Lynx-like info browser.
-          [13]https://alioth.debian.org/projects/pinfo/
+          [15]https://alioth.debian.org/projects/pinfo/
 
    tin
-          newsreader, supporting color, MIME [14]http://www.tin.org/
+          newsreader, supporting color, MIME [16]http://www.tin.org/
 
    as well as some that use ncurses for the terminfo support alone:
 
    minicom
           terminal emulator
-          [15]http://alioth.debian.org/projects/minicom/
+          [17]http://alioth.debian.org/projects/minicom/
 
    vile
           vi-like-emacs
-          [16]http://invisible-island.net/vile/
+          [18]http://invisible-island.net/vile/
 
    The  ncurses  distribution  includes  a  selection  of  test  programs
    (including a few games).
@@ -590,9 +227,9 @@ Who's Who and What's What
    Zeyd  Ben-Halim started it from a previous package pcurses, written by
    Pavel  Curtis.  Eric S. Raymond continued development. Juergen Pfeifer
    wrote  most of the form and menu libraries. Ongoing work is being done
-   by  [17]Thomas  Dickey.  Thomas  Dickey acts as the maintainer for the
+   by  [19]Thomas  Dickey.  Thomas  Dickey acts as the maintainer for the
    Free  Software  Foundation,  which  holds  the  copyright  on ncurses.
-   Contact the current maintainers at [18]bug-ncurses@gnu.org.
+   Contact the current maintainers at [20]bug-ncurses@gnu.org.
 
    To   join   the   ncurses   mailing   list,   please  write  email  to
    bug-ncurses-request@gnu.org containing the line:
@@ -602,7 +239,7 @@ Who's Who and What's What
    and testing of this package.
 
    Beta  versions  of ncurses and patches to the current release are made
-   available at [19]ftp://invisible-island.net/ncurses/ .
+   available at [21]ftp://invisible-island.net/ncurses/ .
 
 Future Plans
 
@@ -616,34 +253,36 @@ Future Plans
 Other Related Resources
 
    The  distribution  provides  a  newer  version  of the terminfo-format
-   terminal description file once maintained by [20]Eric Raymond . Unlike
+   terminal description file once maintained by [22]Eric Raymond . Unlike
    the  older  version, the termcap and terminfo data are provided in the
    same  file,  and provides several user-definable extensions beyond the
    X/Open specification.
 
    You  can  find  lots  of  information  on  terminal-related topics not
-   covered in the terminfo file at [21]Richard Shuford's archive .
+   covered in the terminfo file at [23]Richard Shuford's archive .
 
 References
 
    1. ftp://ftp.gnu.org/gnu/ncurses/
    2. ftp://invisible-island.net/ncurses/
-   3. http://invisible-island.net/cindent/cindent.html
-   4. http://invisible-island.net/cdk/
-   5. http://www.vexus.ca/products/CDK/
-   6. http://invisible-island.net/ded/
-   7. http://invisible-island.net/dialog/
-   8. http://lynx.isc.org/release/
-   9. http://www.midnight-commander.org/
-  10. http://www.mutt.org/
-  11. http://www.ncftp.com/
-  12. https://sites.google.com/a/bostic.com/keithbostic/nvi
-  13. https://alioth.debian.org/projects/pinfo/
-  14. http://www.tin.org/
-  15. http://alioth.debian.org/projects/minicom/
-  16. http://invisible-island.net/vile/
-  17. mailto:dickey@invisible-island.net
-  18. mailto:bug-ncurses@gnu.org
-  19. ftp://invisible-island.net/ncurses/
-  20. http://www.catb.org/~esr/terminfo/
-  21. http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal
+   3. http://invisible-island.net/ncurses/man/form_fieldtype.3x
+   4. http://invisible-island.net/ncurses/ncurses-Ada95.html
+   5. http://invisible-island.net/ncurses/ncurses-examples.html
+   6. http://invisible-island.net/cdk/
+   7. http://www.vexus.ca/products/CDK/
+   8. http://invisible-island.net/ded/
+   9. http://invisible-island.net/dialog/
+  10. http://lynx.isc.org/release/
+  11. http://www.midnight-commander.org/
+  12. http://www.mutt.org/
+  13. http://www.ncftp.com/
+  14. https://sites.google.com/a/bostic.com/keithbostic/nvi
+  15. https://alioth.debian.org/projects/pinfo/
+  16. http://www.tin.org/
+  17. http://alioth.debian.org/projects/minicom/
+  18. http://invisible-island.net/vile/
+  19. mailto:dickey@invisible-island.net
+  20. mailto:bug-ncurses@gnu.org
+  21. ftp://invisible-island.net/ncurses/
+  22. http://www.catb.org/~esr/terminfo/
+  23. http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal

Modified: vendor/ncurses/dist/Ada95/aclocal.m4
==============================================================================
--- vendor/ncurses/dist/Ada95/aclocal.m4	Sat Apr 30 10:56:08 2011	(r221244)
+++ vendor/ncurses/dist/Ada95/aclocal.m4	Sat Apr 30 10:59:17 2011	(r221245)
@@ -28,7 +28,7 @@ dnl*************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.20 2011/01/22 19:46:50 tom Exp $
+dnl $Id: aclocal.m4,v 1.24 2011/03/31 23:32:36 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -1040,10 +1040,12 @@ rm -rf conftest*
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18
+dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
 dnl ----------------
 AC_DEFUN([CF_GNAT_GENERICS],
 [
+AC_REQUIRE([CF_GNAT_VERSION])
+
 AC_MSG_CHECKING(if GNAT supports generics)
 case $cf_gnat_version in #(vi
 3.[[1-9]]*|[[4-9]].*) #(vi
@@ -1068,6 +1070,53 @@ AC_SUBST(cf_compile_generics)
 AC_SUBST(cf_generic_objects)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
+dnl --------------
+dnl Check if gnat supports SIGINT, and presumably tasking.  For the latter, it
+dnl is noted that gnat may compile a tasking unit even for configurations which
+dnl fail at runtime.
+AC_DEFUN([CF_GNAT_SIGINT],[
+AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
+CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
+
+package ConfTest is
+
+   pragma Warnings (Off);  --  the next pragma exists since 3.11p
+   pragma Unreserve_All_Interrupts;
+   pragma Warnings (On);
+
+   protected Process is
+      procedure Stop;
+      function Continue return Boolean;
+      pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
+   private
+      Done : Boolean := False;
+   end Process;
+
+end ConfTest;],
+[package body ConfTest is
+   protected body Process is
+      procedure Stop is
+      begin
+         Done := True;
+      end Stop;
+      function Continue return Boolean is
+      begin
+         return not Done;
+      end Continue;
+   end Process;
+end ConfTest;],
+	[cf_cv_gnat_sigint=yes],
+	[cf_cv_gnat_sigint=no])])
+
+if test $cf_cv_gnat_sigint = yes ; then
+	USE_GNAT_SIGINT=""
+else
+	USE_GNAT_SIGINT="#"
+fi
+AC_SUBST(USE_GNAT_SIGINT)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
 dnl --------------------
 dnl Check if the gnat pragma "Unreferenced" works.
@@ -1097,28 +1146,92 @@ fi
 AC_SUBST(PRAGMA_UNREF)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18
+dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41
 dnl ----------------
+dnl GNAT projects are configured with ".gpr" project files.
+dnl GNAT libraries are a further development, using the project feature.
 AC_DEFUN([CF_GNAT_PROJECTS],
 [
+AC_REQUIRE([CF_GNAT_VERSION])
+
+cf_gnat_libraries=no
+cf_gnat_projects=no
+
 AC_MSG_CHECKING(if GNAT supports project files)
 case $cf_gnat_version in #(vi
 3.[[0-9]]*) #(vi
-	cf_gnat_projects=no
 	;;
 *)
 	case $cf_cv_system_name in #(vi
 	cygwin*) #(vi
-		cf_gnat_projects=no
 		;;
 	*)
-		cf_gnat_projects=yes
+		mkdir conftest.src conftest.bin conftest.lib
+		cd conftest.src
+		rm -rf conftest* *~conftest*
+		cat >>library.gpr <>confpackage.ads <>confpackage.adb <&AC_FD_CC 2>&1 ) ; then
+			cf_gnat_projects=yes
+		fi
+		cd ..
+		if test -f conftest.lib/confpackage.ali
+		then
+			cf_gnat_libraries=yes
+		fi
+		rm -rf conftest* *~conftest*
 		;;
 	esac
 	;;
 esac
 AC_MSG_RESULT($cf_gnat_projects)
 
+if test $cf_gnat_projects = yes
+then
+	AC_MSG_CHECKING(if GNAT supports libraries)
+	AC_MSG_RESULT($cf_gnat_libraries)
+fi
+
 if test "$cf_gnat_projects" = yes
 then
 	USE_OLD_MAKERULES="#"
@@ -1128,11 +1241,19 @@ else
 	USE_GNAT_PROJECTS="#"
 fi
 
+if test "$cf_gnat_libraries" = yes
+then
+	USE_GNAT_LIBRARIES=""
+else
+	USE_GNAT_LIBRARIES="#"
+fi
+
 AC_SUBST(USE_OLD_MAKERULES)
 AC_SUBST(USE_GNAT_PROJECTS)
+AC_SUBST(USE_GNAT_LIBRARIES)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37
+dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45
 dnl ----------------
 dnl Verify that a test program compiles/links with GNAT.
 dnl $cf_ada_make is set to the program that compiles/links
@@ -1144,7 +1265,7 @@ dnl $3 is the shell command to execute i
 dnl $4 is the shell command to execute if not successful
 AC_DEFUN([CF_GNAT_TRY_LINK],
 [
-rm -rf conftest*
+rm -rf conftest* *~conftest*
 cat >>conftest.ads <>conftest.ads </dev/null | sed -e 's,[[ 	]]*$,,'`
+		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ 	]]*$,,'`
 		case "$cf_result" in
 		.*k)
 			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
@@ -1914,7 +2032,7 @@ AC_DEFUN([CF_MSG_LOG],[
 echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_ADDON version: 3 updated: 2010/10/23 15:54:49
+dnl CF_NCURSES_ADDON version: 4 updated: 2011/03/27 17:10:13
 dnl ----------------
 dnl Configure an ncurses add-on, built outside the ncurses tree.
 AC_DEFUN([CF_NCURSES_ADDON],[
@@ -1939,8 +2057,8 @@ if test "$NCURSES_CONFIG" != none ; then
 cf_version=`$NCURSES_CONFIG --version`
 
 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
-NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.//' -e 's/\..*//'`
-NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.[[0-9]]\+\.//'`
+NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.//' -e 's/\..*//'`
+NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.//'`
 
 # ABI version is not available from headers
 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
@@ -1956,10 +2074,10 @@ CF_EOF
 	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
 	AC_TRY_EVAL(cf_try)
 	if test -f conftest.out ; then
-		cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ 	]]\+//"`
-		eval NCURSES_$cf_name=$cf_result
-		cat conftest.$ac_ext
-		cat conftest.out
+		cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ 	]][[ 	]]*//"`
+		eval NCURSES_$cf_name=\"$cf_result\"
+		# cat conftest.$ac_ext
+		# cat conftest.out
 	fi
 done
 
@@ -2428,7 +2546,7 @@ case ".[$]$1" in #(vi
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09
+dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24
 dnl -------------
 dnl Check for the package-config program, unless disabled by command-line.
 AC_DEFUN([CF_PKG_CONFIG],
@@ -2445,7 +2563,7 @@ no) #(vi
 	PKG_CONFIG=none
 	;;
 yes) #(vi
-	AC_PATH_PROG(PKG_CONFIG, pkg-config, none)
+	AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
 	;;
 *)
 	PKG_CONFIG=$withval
@@ -3355,7 +3473,7 @@ if test "$with_pthread" != no ; then
 fi
 ])
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42
+dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
 dnl ---------------
 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
 dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -3374,6 +3492,9 @@ case $host_os in #(vi
 aix[[456]]*) #(vi
 	cf_xopen_source="-D_ALL_SOURCE"
 	;;
+cygwin) #(vi
+	cf_XOPEN_SOURCE=600
+	;;
 darwin[[0-8]].*) #(vi
 	cf_xopen_source="-D_APPLE_C_SOURCE"
 	;;

Modified: vendor/ncurses/dist/Ada95/configure
==============================================================================
--- vendor/ncurses/dist/Ada95/configure	Sat Apr 30 10:56:08 2011	(r221244)
+++ vendor/ncurses/dist/Ada95/configure	Sat Apr 30 10:59:17 2011	(r221245)
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in Revision: 1.21 .
+# From configure.in Revision: 1.30 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20101001.
+# Generated by Autoconf 2.52.20101002.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -657,9 +657,11 @@ Build-Tools Needed to Compile Temporary 
   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
 Options to Specify the Libraries Built/Used:
+  --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
   --enable-widec          compile with wide-char/UTF-8 code
   --with-curses-dir=DIR   directory in which (n)curses is installed
   --with-shlib-version=X  Specify rel or abi version for shared libs
+  --enable-rpath-link     link sample programs with rpath option
 Fine-Tuning Your Configuration:
   --enable-broken_linker  compile with broken-linker support code
   --disable-largefile     omit support for large files
@@ -755,7 +757,7 @@ This file contains any messages produced
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.52.20101001.  Invocation command line was
+generated by GNU Autoconf 2.52.20101002.  Invocation command line was
 
   $ $0 $@
 
@@ -879,7 +881,7 @@ if test -z "$CONFIG_SITE"; then
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
-    { echo "$as_me:882: loading site script $ac_site_file" >&5
+    { echo "$as_me:884: loading site script $ac_site_file" >&5
 echo "$as_me: loading site script $ac_site_file" >&6;}
     cat "$ac_site_file" >&5
     . "$ac_site_file"
@@ -890,7 +892,7 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { echo "$as_me:893: loading cache $cache_file" >&5
+    { echo "$as_me:895: loading cache $cache_file" >&5
 echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -898,7 +900,7 @@ echo "$as_me: loading cache $cache_file"
     esac
   fi
 else
-  { echo "$as_me:901: creating cache $cache_file" >&5
+  { echo "$as_me:903: creating cache $cache_file" >&5
 echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
@@ -914,21 +916,21 @@ for ac_var in `(set) 2>&1 |
   eval ac_new_val="\$ac_env_${ac_var}_value"
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:917: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+      { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:921: error: \`$ac_var' was not set in the previous run" >&5
+      { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5
 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:927: error: \`$ac_var' has changed since the previous run:" >&5
+        { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5
 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:929:   former value:  $ac_old_val" >&5
+        { echo "$as_me:931:   former value:  $ac_old_val" >&5
 echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:931:   current value: $ac_new_val" >&5
+        { echo "$as_me:933:   current value: $ac_new_val" >&5
 echo "$as_me:   current value: $ac_new_val" >&2;}
         ac_cache_corrupted=:
       fi;;
@@ -947,9 +949,9 @@ echo "$as_me:   current value: $ac_new_v

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 10:59: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 259E6106564A;
	Sat, 30 Apr 2011 10:59:56 +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 AD98A8FC1B;
	Sat, 30 Apr 2011 10: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 p3UAxtq4042620;
	Sat, 30 Apr 2011 10:59:55 GMT (envelope-from ed@svn.freebsd.org)
Received: (from ed@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UAxtnG042619;
	Sat, 30 Apr 2011 10:59:55 GMT (envelope-from ed@svn.freebsd.org)
Message-Id: <201104301059.p3UAxtnG042619@svn.freebsd.org>
From: Ed Schouten 
Date: Sat, 30 Apr 2011 10:59:55 +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: r221246 - vendor/ncurses/5.9-20110405
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 10:59:56 -0000

Author: ed
Date: Sat Apr 30 10:59:55 2011
New Revision: 221246
URL: http://svn.freebsd.org/changeset/base/221246

Log:
  Tag ncurses 5.9.

Added:
  vendor/ncurses/5.9-20110405/
     - copied from r221245, vendor/ncurses/dist/

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:04: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 41037106564A;
	Sat, 30 Apr 2011 11:04:35 +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 305058FC0C;
	Sat, 30 Apr 2011 11:04: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 p3UB4ZgJ042833;
	Sat, 30 Apr 2011 11:04:35 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UB4ZuC042830;
	Sat, 30 Apr 2011 11:04:35 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301104.p3UB4ZuC042830@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 11:04: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: r221247 - in head/sys: netinet 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: Sat, 30 Apr 2011 11:04:35 -0000

Author: bz
Date: Sat Apr 30 11:04:34 2011
New Revision: 221247
URL: http://svn.freebsd.org/changeset/base/221247

Log:
  Make the PCB code compile without INET support by adding #ifdef INETs
  and correcting few #includes.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/netinet/in_pcb.c
  head/sys/netinet6/in6_pcb.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Sat Apr 30 10:59:55 2011	(r221246)
+++ head/sys/netinet/in_pcb.c	Sat Apr 30 11:04:34 2011	(r221247)
@@ -65,17 +65,22 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#if defined(INET) || defined(INET6)
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#endif
+#ifdef INET
+#include 
+#endif
 #ifdef INET6
 #include 
-#include 
 #include 
+#include 
+#include 
 #endif /* INET6 */
 
 
@@ -117,12 +122,13 @@ static VNET_DEFINE(int, ipport_tcplastco
 
 #define	V_ipport_tcplastcount		VNET(ipport_tcplastcount)
 
+static void	in_pcbremlists(struct inpcb *inp);
+
+#ifdef INET
 #define RANGECHK(var, min, max) \
 	if ((var) < (min)) { (var) = (min); } \
 	else if ((var) > (max)) { (var) = (max); }
 
-static void	in_pcbremlists(struct inpcb *inp);
-
 static int
 sysctl_net_ipport_check(SYSCTL_HANDLER_ARGS)
 {
@@ -179,6 +185,7 @@ SYSCTL_VNET_INT(_net_inet_ip_portrange, 
 	&VNET_NAME(ipport_randomtime), 0,
 	"Minimum time to keep sequental port "
 	"allocation before switching to a random one");
+#endif
 
 /*
  * in_pcb.c: manage the Protocol Control Blocks.
@@ -291,6 +298,7 @@ out:
 	return (error);
 }
 
+#ifdef INET
 int
 in_pcbbind(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred)
 {
@@ -316,6 +324,7 @@ in_pcbbind(struct inpcb *inp, struct soc
 		inp->inp_flags |= INP_ANONPORT;
 	return (0);
 }
+#endif
 
 #if defined(INET) || defined(INET6)
 int
@@ -396,6 +405,7 @@ in_pcb_lport(struct inpcb *inp, struct i
 		laddr = *laddrp;
 	}
 #endif
+	tmpinp = NULL;	/* Make compiler happy. */
 	lport = *lportp;
 
 	if (dorandom)
@@ -435,6 +445,7 @@ in_pcb_lport(struct inpcb *inp, struct i
 }
 #endif /* INET || INET6 */
 
+#ifdef INET
 /*
  * Set up a bind operation on a PCB, performing port allocation
  * as required, but do not actually modify the PCB. Callers can
@@ -998,6 +1009,7 @@ in_pcbdisconnect(struct inpcb *inp)
 	inp->inp_fport = 0;
 	in_pcbrehash(inp);
 }
+#endif
 
 /*
  * in_pcbdetach() is responsibe for disassociating a socket from an inpcb.
@@ -1046,8 +1058,10 @@ in_pcbfree_internal(struct inpcb *inp)
 #endif
 	if (inp->inp_options)
 		(void)m_free(inp->inp_options);
+#ifdef INET
 	if (inp->inp_moptions != NULL)
 		inp_freemoptions(inp->inp_moptions);
+#endif
 	inp->inp_vflag = 0;
 	crfree(inp->inp_cred);
 
@@ -1164,6 +1178,7 @@ in_pcbdrop(struct inpcb *inp)
 	}
 }
 
+#ifdef INET
 /*
  * Common routines to return the socket addresses associated with inpcbs.
  */
@@ -1527,6 +1542,7 @@ in_pcblookup_hash(struct inpcbinfo *pcbi
 
 	return (NULL);
 }
+#endif /* INET */
 
 /*
  * Insert PCB onto various hash lists.

Modified: head/sys/netinet6/in6_pcb.c
==============================================================================
--- head/sys/netinet6/in6_pcb.c	Sat Apr 30 10:59:55 2011	(r221246)
+++ head/sys/netinet6/in6_pcb.c	Sat Apr 30 11:04:34 2011	(r221247)
@@ -204,6 +204,7 @@ in6_pcbbind(register struct inpcb *inp, 
 				      == 0) && (inp->inp_cred->cr_uid !=
 				     t->inp_cred->cr_uid))
 					return (EADDRINUSE);
+#ifdef INET
 				if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 &&
 				    IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
 					struct sockaddr_in sin;
@@ -222,6 +223,7 @@ in6_pcbbind(register struct inpcb *inp, 
 					     t->inp_cred->cr_uid))
 						return (EADDRINUSE);
 				}
+#endif
 			}
 			t = in6_pcblookup_local(pcbinfo, &sin6->sin6_addr,
 			    lport, wild, cred);
@@ -229,6 +231,7 @@ in6_pcbbind(register struct inpcb *inp, 
 			    intotw(t)->tw_so_options :
 			    t->inp_socket->so_options)) == 0)
 				return (EADDRINUSE);
+#ifdef INET
 			if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 &&
 			    IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
 				struct sockaddr_in sin;
@@ -252,6 +255,7 @@ in6_pcbbind(register struct inpcb *inp, 
 				     INP_SOCKAF(t->inp_socket)))
 					return (EADDRINUSE);
 			}
+#endif
 		}
 		inp->in6p_laddr = sin6->sin6_addr;
 	}
@@ -496,11 +500,14 @@ in6_mapped_sockaddr(struct socket *so, s
 	inp = sotoinpcb(so);
 	KASSERT(inp != NULL, ("in6_mapped_sockaddr: inp == NULL"));
 
+#ifdef INET
 	if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) {
 		error = in_getsockaddr(so, nam);
 		if (error == 0)
 			in6_sin_2_v4mapsin6_in_sock(nam);
-	} else {
+	} else
+#endif
+	{
 		/* scope issues will be handled in in6_getsockaddr(). */
 		error = in6_getsockaddr(so, nam);
 	}
@@ -517,11 +524,13 @@ in6_mapped_peeraddr(struct socket *so, s
 	inp = sotoinpcb(so);
 	KASSERT(inp != NULL, ("in6_mapped_peeraddr: inp == NULL"));
 
+#ifdef INET
 	if ((inp->inp_vflag & (INP_IPV4 | INP_IPV6)) == INP_IPV4) {
 		error = in_getpeeraddr(so, nam);
 		if (error == 0)
 			in6_sin_2_v4mapsin6_in_sock(nam);
 	} else
+#endif
 	/* scope issues will be handled in in6_getpeeraddr(). */
 	error = in6_getpeeraddr(so, nam);
 

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:17: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 824441065672;
	Sat, 30 Apr 2011 11:17:00 +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 7108B8FC17;
	Sat, 30 Apr 2011 11:17: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 p3UBH0JS043239;
	Sat, 30 Apr 2011 11:17:00 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBH0Au043235;
	Sat, 30 Apr 2011 11:17:00 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301117.p3UBH0Au043235@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 11:17: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: r221248 - in head/sys: conf netinet 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: Sat, 30 Apr 2011 11:17:00 -0000

Author: bz
Date: Sat Apr 30 11:17:00 2011
New Revision: 221248
URL: http://svn.freebsd.org/changeset/base/221248

Log:
  Make the UDP code compile without INET.  Expose udp_usrreq.c to IPv6 only
  as well compiling out most functions adding or extending #ifdef INET
  coverage.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/conf/files
  head/sys/netinet/udp_usrreq.c
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Apr 30 11:04:34 2011	(r221247)
+++ head/sys/conf/files	Sat Apr 30 11:17:00 2011	(r221248)
@@ -2770,7 +2770,7 @@ netinet/tcp_syncache.c		optional inet
 netinet/tcp_timer.c		optional inet
 netinet/tcp_timewait.c		optional inet
 netinet/tcp_usrreq.c		optional inet
-netinet/udp_usrreq.c		optional inet
+netinet/udp_usrreq.c		optional inet | inet6
 netinet/libalias/alias.c	optional libalias inet | netgraph_nat inet
 netinet/libalias/alias_db.c	optional libalias inet | netgraph_nat inet
 netinet/libalias/alias_mod.c	optional libalias | netgraph_nat

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Sat Apr 30 11:04:34 2011	(r221247)
+++ head/sys/netinet/udp_usrreq.c	Sat Apr 30 11:17:00 2011	(r221248)
@@ -35,6 +35,7 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_ipfw.h"
+#include "opt_inet.h"
 #include "opt_inet6.h"
 #include "opt_ipsec.h"
 
@@ -143,9 +144,12 @@ SYSCTL_VNET_STRUCT(_net_inet_udp, UDPCTL
     &VNET_NAME(udpstat), udpstat,
     "UDP statistics (struct udpstat, netinet/udp_var.h)");
 
+#ifdef INET
 static void	udp_detach(struct socket *so);
 static int	udp_output(struct inpcb *, struct mbuf *, struct sockaddr *,
 		    struct mbuf *, struct thread *);
+#endif
+
 #ifdef IPSEC
 #ifdef IPSEC_NAT_T
 #define	UF_ESPINUDP_ALL	(UF_ESPINUDP_NON_IKE|UF_ESPINUDP)
@@ -229,6 +233,7 @@ udp_destroy(void)
 }
 #endif
 
+#ifdef INET
 /*
  * Subroutine of udp_input(), which appends the provided mbuf chain to the
  * passed pcb/socket.  The caller must provide a sockaddr_in via udp_in that
@@ -272,7 +277,6 @@ udp_append(struct inpcb *inp, struct ip 
 		return;
 	}
 #ifdef IPSEC_NAT_T
-#ifdef INET
 	up = intoudpcb(inp);
 	KASSERT(up != NULL, ("%s: udpcb NULL", __func__));
 	if (up->u_flags & UF_ESPINUDP_ALL) {	/* IPSec UDP encaps. */
@@ -280,7 +284,6 @@ udp_append(struct inpcb *inp, struct ip 
 		if (n == NULL)				/* Consumed. */
 			return;
 	}
-#endif /* INET */
 #endif /* IPSEC_NAT_T */
 #endif /* IPSEC */
 #ifdef MAC
@@ -288,14 +291,14 @@ udp_append(struct inpcb *inp, struct ip 
 		m_freem(n);
 		return;
 	}
-#endif
+#endif /* MAC */
 	if (inp->inp_flags & INP_CONTROLOPTS ||
 	    inp->inp_socket->so_options & (SO_TIMESTAMP | SO_BINTIME)) {
 #ifdef INET6
 		if (inp->inp_vflag & INP_IPV6)
 			(void)ip6_savecontrol_v4(inp, n, &opts, NULL);
 		else
-#endif
+#endif /* INET6 */
 			ip_savecontrol(inp, &opts, ip, n);
 	}
 #ifdef INET6
@@ -306,7 +309,7 @@ udp_append(struct inpcb *inp, struct ip 
 		in6_sin_2_v4mapsin6(udp_in, &udp_in6);
 		append_sa = (struct sockaddr *)&udp_in6;
 	} else
-#endif
+#endif /* INET6 */
 		append_sa = (struct sockaddr *)udp_in;
 	m_adj(n, off);
 
@@ -598,6 +601,7 @@ badheadlocked:
 badunlocked:
 	m_freem(m);
 }
+#endif /* INET */
 
 /*
  * Notify a udp user of an asynchronous error; just wake up so that they can
@@ -621,6 +625,7 @@ udp_notify(struct inpcb *inp, int errno)
 	return (inp);
 }
 
+#ifdef INET
 void
 udp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
 {
@@ -666,6 +671,7 @@ udp_ctlinput(int cmd, struct sockaddr *s
 		in_pcbnotifyall(&V_udbinfo, faddr, inetctlerrmap[cmd],
 		    udp_notify);
 }
+#endif /* INET */
 
 static int
 udp_pcblist(SYSCTL_HANDLER_ARGS)
@@ -778,6 +784,7 @@ SYSCTL_PROC(_net_inet_udp, UDPCTL_PCBLIS
     CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0,
     udp_pcblist, "S,xinpcb", "List of active UDP sockets");
 
+#ifdef INET
 static int
 udp_getcred(SYSCTL_HANDLER_ARGS)
 {
@@ -817,6 +824,7 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_net_inet_udp, OID_AUTO, getcred,
     CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0,
     udp_getcred, "S,xucred", "Get the xucred of a UDP connection");
+#endif /* INET */
 
 int
 udp_ctloutput(struct socket *so, struct sockopt *sopt)
@@ -835,11 +843,15 @@ udp_ctloutput(struct socket *so, struct 
 		if (INP_CHECK_SOCKAF(so, AF_INET6)) {
 			INP_WUNLOCK(inp);
 			error = ip6_ctloutput(so, sopt);
-		} else {
+		}
+#endif
+#if defined(INET) && defined(INET6)
+		else
 #endif
+#ifdef INET
+		{
 			INP_WUNLOCK(inp);
 			error = ip_ctloutput(so, sopt);
-#ifdef INET6
 		}
 #endif
 		return (error);
@@ -911,6 +923,7 @@ udp_ctloutput(struct socket *so, struct 
 	return (error);
 }
 
+#ifdef INET
 static int
 udp_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr,
     struct mbuf *control, struct thread *td)
@@ -1223,7 +1236,6 @@ release:
 
 
 #if defined(IPSEC) && defined(IPSEC_NAT_T)
-#ifdef INET
 /*
  * Potentially decap ESP in UDP frame.  Check for an ESP header
  * and optional marker; if present, strip the UDP header and
@@ -1355,7 +1367,6 @@ udp4_espdecap(struct inpcb *inp, struct 
 	(void) ipsec4_common_input(m, iphlen, ip->ip_p);
 	return (NULL);			/* NB: consumed, bypass processing. */
 }
-#endif /* INET */
 #endif /* defined(IPSEC) && defined(IPSEC_NAT_T) */
 
 static void
@@ -1410,6 +1421,7 @@ udp_attach(struct socket *so, int proto,
 	INP_INFO_WUNLOCK(&V_udbinfo);
 	return (0);
 }
+#endif /* INET */
 
 int
 udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f)
@@ -1432,6 +1444,7 @@ udp_set_kernel_tunneling(struct socket *
 	return (0);
 }
 
+#ifdef INET
 static int
 udp_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
 {
@@ -1553,6 +1566,7 @@ udp_send(struct socket *so, int flags, s
 	KASSERT(inp != NULL, ("udp_send: inp == NULL"));
 	return (udp_output(inp, m, addr, control, td));
 }
+#endif /* INET */
 
 int
 udp_shutdown(struct socket *so)
@@ -1567,6 +1581,7 @@ udp_shutdown(struct socket *so)
 	return (0);
 }
 
+#ifdef INET
 struct pr_usrreqs udp_usrreqs = {
 	.pru_abort =		udp_abort,
 	.pru_attach =		udp_attach,
@@ -1584,3 +1599,4 @@ struct pr_usrreqs udp_usrreqs = {
 	.pru_sosetlabel =	in_pcbsosetlabel,
 	.pru_close =		udp_close,
 };
+#endif /* INET */

Modified: head/sys/netinet6/udp6_usrreq.c
==============================================================================
--- head/sys/netinet6/udp6_usrreq.c	Sat Apr 30 11:04:34 2011	(r221247)
+++ head/sys/netinet6/udp6_usrreq.c	Sat Apr 30 11:17:00 2011	(r221248)
@@ -849,6 +849,7 @@ udp6_bind(struct socket *so, struct sock
 
 		if (IN6_IS_ADDR_UNSPECIFIED(&sin6_p->sin6_addr))
 			inp->inp_vflag |= INP_IPV4;
+#ifdef INET
 		else if (IN6_IS_ADDR_V4MAPPED(&sin6_p->sin6_addr)) {
 			struct sockaddr_in sin;
 
@@ -859,10 +860,13 @@ udp6_bind(struct socket *so, struct sock
 			    td->td_ucred);
 			goto out;
 		}
+#endif
 	}
 
 	error = in6_pcbbind(inp, nam, td->td_ucred);
+#ifdef INET
 out:
+#endif
 	INP_WUNLOCK(inp);
 	INP_INFO_WUNLOCK(&V_udbinfo);
 	return (error);
@@ -909,6 +913,7 @@ udp6_connect(struct socket *so, struct s
 
 	INP_INFO_WLOCK(&V_udbinfo);
 	INP_WLOCK(inp);
+#ifdef INET
 	if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) {
 		struct sockaddr_in sin;
 
@@ -932,6 +937,7 @@ udp6_connect(struct socket *so, struct s
 			soisconnected(so);
 		goto out;
 	}
+#endif
 	if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) {
 		error = EISCONN;
 		goto out;

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:18: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 AD747106566C;
	Sat, 30 Apr 2011 11:18:16 +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 9BFAF8FC1A;
	Sat, 30 Apr 2011 11:18: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 p3UBIGVL043322;
	Sat, 30 Apr 2011 11:18:16 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBIGVE043318;
	Sat, 30 Apr 2011 11:18:16 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201104301118.p3UBIGVE043318@svn.freebsd.org>
From: Michael Tuexen 
Date: Sat, 30 Apr 2011 11:18: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: r221249 - in head/sys: netinet 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: Sat, 30 Apr 2011 11:18:16 -0000

Author: tuexen
Date: Sat Apr 30 11:18:16 2011
New Revision: 221249
URL: http://svn.freebsd.org/changeset/base/221249

Log:
  Improve compilation of SCTP code without INET support.
  Some bugs where fixed while doing this:
  * ASCONF-ACK messages might use wrong port number when using
    IPv6.
  * Checking for additional addresses takes the correct address
    into account and also does not do more comparisons than
    necessary.
  
  This patch is based on one received from bz@ who was
  sponsored by The FreeBSD Foundation and iXsystems.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_asconf.c
  head/sys/netinet/sctp_bsd_addr.c
  head/sys/netinet/sctp_input.c
  head/sys/netinet/sctp_os_bsd.h
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_pcb.c
  head/sys/netinet/sctp_sysctl.c
  head/sys/netinet/sctp_usrreq.c
  head/sys/netinet/sctp_var.h
  head/sys/netinet/sctputil.c
  head/sys/netinet6/sctp6_usrreq.c

Modified: head/sys/netinet/sctp_asconf.c
==============================================================================
--- head/sys/netinet/sctp_asconf.c	Sat Apr 30 11:17:00 2011	(r221248)
+++ head/sys/netinet/sctp_asconf.c	Sat Apr 30 11:18:16 2011	(r221249)
@@ -57,41 +57,51 @@ static void
 sctp_asconf_get_source_ip(struct mbuf *m, struct sockaddr *sa)
 {
 	struct ip *iph;
+
+#ifdef INET
 	struct sockaddr_in *sin;
 
+#endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
 
 #endif
 
 	iph = mtod(m, struct ip *);
-	if (iph->ip_v == IPVERSION) {
-		/* IPv4 source */
-		sin = (struct sockaddr_in *)sa;
-		bzero(sin, sizeof(*sin));
-		sin->sin_family = AF_INET;
-		sin->sin_len = sizeof(struct sockaddr_in);
-		sin->sin_port = 0;
-		sin->sin_addr.s_addr = iph->ip_src.s_addr;
-		return;
-	}
+	switch (iph->ip_v) {
+#ifdef INET
+	case IPVERSION:
+		{
+			/* IPv4 source */
+			sin = (struct sockaddr_in *)sa;
+			bzero(sin, sizeof(*sin));
+			sin->sin_family = AF_INET;
+			sin->sin_len = sizeof(struct sockaddr_in);
+			sin->sin_port = 0;
+			sin->sin_addr.s_addr = iph->ip_src.s_addr;
+			break;
+		}
+#endif
 #ifdef INET6
-	else if (iph->ip_v == (IPV6_VERSION >> 4)) {
-		/* IPv6 source */
-		struct ip6_hdr *ip6;
+	case (IPV6_VERSION >> 4):
+		{
+			/* IPv6 source */
+			struct ip6_hdr *ip6;
 
-		sin6 = (struct sockaddr_in6 *)sa;
-		bzero(sin6, sizeof(*sin6));
-		sin6->sin6_family = AF_INET6;
-		sin6->sin6_len = sizeof(struct sockaddr_in6);
-		sin6->sin6_port = 0;
-		ip6 = mtod(m, struct ip6_hdr *);
-		sin6->sin6_addr = ip6->ip6_src;
-		return;
-	}
+			sin6 = (struct sockaddr_in6 *)sa;
+			bzero(sin6, sizeof(*sin6));
+			sin6->sin6_family = AF_INET6;
+			sin6->sin6_len = sizeof(struct sockaddr_in6);
+			sin6->sin6_port = 0;
+			ip6 = mtod(m, struct ip6_hdr *);
+			sin6->sin6_addr = ip6->ip6_src;
+			break;
+		}
 #endif				/* INET6 */
-	else
-		return;
+	default:
+		break;
+	}
+	return;
 }
 
 /*
@@ -192,33 +202,36 @@ sctp_process_asconf_add_ip(struct mbuf *
 {
 	struct mbuf *m_reply = NULL;
 	struct sockaddr_storage sa_source, sa_store;
-	struct sctp_ipv4addr_param *v4addr;
+	struct sctp_paramhdr *ph;
 	uint16_t param_type, param_length, aparam_length;
 	struct sockaddr *sa;
-	struct sockaddr_in *sin;
 	int zero_address = 0;
 
+#ifdef INET
+	struct sockaddr_in *sin;
+	struct sctp_ipv4addr_param *v4addr;
+
+#endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
 	struct sctp_ipv6addr_param *v6addr;
 
-#endif				/* INET6 */
+#endif
 
 	aparam_length = ntohs(aph->ph.param_length);
-	v4addr = (struct sctp_ipv4addr_param *)(aph + 1);
-#ifdef INET6
-	v6addr = (struct sctp_ipv6addr_param *)(aph + 1);
-#endif				/* INET6 */
-	param_type = ntohs(v4addr->ph.param_type);
-	param_length = ntohs(v4addr->ph.param_length);
+	ph = (struct sctp_paramhdr *)(aph + 1);
+	param_type = ntohs(ph->param_type);
+	param_length = ntohs(ph->param_length);
 
 	sa = (struct sockaddr *)&sa_store;
 	switch (param_type) {
+#ifdef INET
 	case SCTP_IPV4_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv4addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
+		v4addr = (struct sctp_ipv4addr_param *)ph;
 		sin = (struct sockaddr_in *)&sa_store;
 		bzero(sin, sizeof(*sin));
 		sin->sin_family = AF_INET;
@@ -230,12 +243,14 @@ sctp_process_asconf_add_ip(struct mbuf *
 		SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: adding ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
 		break;
-	case SCTP_IPV6_ADDRESS:
+#endif
 #ifdef INET6
+	case SCTP_IPV6_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv6addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
+		v6addr = (struct sctp_ipv6addr_param *)ph;
 		sin6 = (struct sockaddr_in6 *)&sa_store;
 		bzero(sin6, sizeof(*sin6));
 		sin6->sin6_family = AF_INET6;
@@ -247,18 +262,13 @@ sctp_process_asconf_add_ip(struct mbuf *
 			zero_address = 1;
 		SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: adding ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-#else
-		/* IPv6 not enabled! */
-		/* FIX ME: currently sends back an invalid param error */
-		m_reply = sctp_asconf_error_response(aph->correlation_id,
-		    SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, aparam_length);
-		SCTPDBG(SCTP_DEBUG_ASCONF1,
-		    "process_asconf_add_ip: v6 disabled- skipping ");
-		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-		return m_reply;
-#endif
 		break;
+#endif
 	default:
+		/*
+		 * XXX: Is this the correct error cause? Maybe
+		 * SCTP_CAUSE_INVALID_PARAM is a better choice.
+		 */
 		m_reply = sctp_asconf_error_response(aph->correlation_id,
 		    SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph,
 		    aparam_length);
@@ -293,7 +303,6 @@ sctp_process_asconf_add_ip(struct mbuf *
 		sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep,
 		    stcb, NULL);
 	}
-
 	return m_reply;
 }
 
@@ -331,37 +340,40 @@ sctp_process_asconf_delete_ip(struct mbu
 {
 	struct mbuf *m_reply = NULL;
 	struct sockaddr_storage sa_source, sa_store;
-	struct sctp_ipv4addr_param *v4addr;
+	struct sctp_paramhdr *ph;
 	uint16_t param_type, param_length, aparam_length;
 	struct sockaddr *sa;
-	struct sockaddr_in *sin;
 	int zero_address = 0;
 	int result;
 
+#ifdef INET
+	struct sockaddr_in *sin;
+	struct sctp_ipv4addr_param *v4addr;
+
+#endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
 	struct sctp_ipv6addr_param *v6addr;
 
-#endif				/* INET6 */
+#endif
 
 	/* get the source IP address for src and 0.0.0.0/::0 delete checks */
 	sctp_asconf_get_source_ip(m, (struct sockaddr *)&sa_source);
 
 	aparam_length = ntohs(aph->ph.param_length);
-	v4addr = (struct sctp_ipv4addr_param *)(aph + 1);
-#ifdef INET6
-	v6addr = (struct sctp_ipv6addr_param *)(aph + 1);
-#endif				/* INET6 */
-	param_type = ntohs(v4addr->ph.param_type);
-	param_length = ntohs(v4addr->ph.param_length);
+	ph = (struct sctp_paramhdr *)(aph + 1);
+	param_type = ntohs(ph->param_type);
+	param_length = ntohs(ph->param_length);
 
 	sa = (struct sockaddr *)&sa_store;
 	switch (param_type) {
+#ifdef INET
 	case SCTP_IPV4_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv4addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
+		v4addr = (struct sctp_ipv4addr_param *)ph;
 		sin = (struct sockaddr_in *)&sa_store;
 		bzero(sin, sizeof(*sin));
 		sin->sin_family = AF_INET;
@@ -374,12 +386,14 @@ sctp_process_asconf_delete_ip(struct mbu
 		    "process_asconf_delete_ip: deleting ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
 		break;
+#endif
+#ifdef INET6
 	case SCTP_IPV6_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv6addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
-#ifdef INET6
+		v6addr = (struct sctp_ipv6addr_param *)ph;
 		sin6 = (struct sockaddr_in6 *)&sa_store;
 		bzero(sin6, sizeof(*sin6));
 		sin6->sin6_family = AF_INET6;
@@ -392,15 +406,8 @@ sctp_process_asconf_delete_ip(struct mbu
 		SCTPDBG(SCTP_DEBUG_ASCONF1,
 		    "process_asconf_delete_ip: deleting ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-#else
-		/* IPv6 not enabled!  No "action" needed; just ack it */
-		SCTPDBG(SCTP_DEBUG_ASCONF1,
-		    "process_asconf_delete_ip: v6 disabled- ignoring: ");
-		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-		/* just respond with a "success" ASCONF-ACK */
-		return NULL;
-#endif
 		break;
+#endif
 	default:
 		m_reply = sctp_asconf_error_response(aph->correlation_id,
 		    SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph,
@@ -466,33 +473,36 @@ sctp_process_asconf_set_primary(struct m
 {
 	struct mbuf *m_reply = NULL;
 	struct sockaddr_storage sa_source, sa_store;
-	struct sctp_ipv4addr_param *v4addr;
+	struct sctp_paramhdr *ph;
 	uint16_t param_type, param_length, aparam_length;
 	struct sockaddr *sa;
-	struct sockaddr_in *sin;
 	int zero_address = 0;
 
+#ifdef INET
+	struct sockaddr_in *sin;
+	struct sctp_ipv4addr_param *v4addr;
+
+#endif
 #ifdef INET6
 	struct sockaddr_in6 *sin6;
 	struct sctp_ipv6addr_param *v6addr;
 
-#endif				/* INET6 */
+#endif
 
 	aparam_length = ntohs(aph->ph.param_length);
-	v4addr = (struct sctp_ipv4addr_param *)(aph + 1);
-#ifdef INET6
-	v6addr = (struct sctp_ipv6addr_param *)(aph + 1);
-#endif				/* INET6 */
-	param_type = ntohs(v4addr->ph.param_type);
-	param_length = ntohs(v4addr->ph.param_length);
+	ph = (struct sctp_paramhdr *)(aph + 1);
+	param_type = ntohs(ph->param_type);
+	param_length = ntohs(ph->param_length);
 
 	sa = (struct sockaddr *)&sa_store;
 	switch (param_type) {
+#ifdef INET
 	case SCTP_IPV4_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv4addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
+		v4addr = (struct sctp_ipv4addr_param *)ph;
 		sin = (struct sockaddr_in *)&sa_store;
 		bzero(sin, sizeof(*sin));
 		sin->sin_family = AF_INET;
@@ -503,12 +513,14 @@ sctp_process_asconf_set_primary(struct m
 		SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_set_primary: ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
 		break;
+#endif
+#ifdef INET6
 	case SCTP_IPV6_ADDRESS:
 		if (param_length != sizeof(struct sctp_ipv6addr_param)) {
 			/* invalid param size */
 			return NULL;
 		}
-#ifdef INET6
+		v6addr = (struct sctp_ipv6addr_param *)ph;
 		sin6 = (struct sockaddr_in6 *)&sa_store;
 		bzero(sin6, sizeof(*sin6));
 		sin6->sin6_family = AF_INET6;
@@ -519,15 +531,8 @@ sctp_process_asconf_set_primary(struct m
 			zero_address = 1;
 		SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_set_primary: ");
 		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-#else
-		/* IPv6 not enabled!  No "action" needed; just ack it */
-		SCTPDBG(SCTP_DEBUG_ASCONF1,
-		    "process_asconf_set_primary: v6 disabled- ignoring: ");
-		SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, sa);
-		/* just respond with a "success" ASCONF-ACK */
-		return NULL;
-#endif
 		break;
+#endif
 	default:
 		m_reply = sctp_asconf_error_response(aph->correlation_id,
 		    SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph,
@@ -655,7 +660,7 @@ sctp_handle_asconf(struct mbuf *m, unsig
 
 	if (first) {
 		/* delete old cache */
-		SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: Now processing firstASCONF. Try to delte old cache\n");
+		SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: Now processing first ASCONF. Try to delete old cache\n");
 
 		TAILQ_FOREACH_SAFE(ack, &asoc->asconf_ack_sent, next, ack_next) {
 			if (ack->serial_number == serial_num)
@@ -825,10 +830,8 @@ send_reply:
 	ack->last_sent_to = NULL;
 	ack->data = m_ack;
 	ack->len = 0;
-	n = m_ack;
-	while (n) {
+	for (n = m_ack; n != NULL; n = SCTP_BUF_NEXT(n)) {
 		ack->len += SCTP_BUF_LEN(n);
-		n = SCTP_BUF_NEXT(n);
 	}
 	TAILQ_INSERT_TAIL(&stcb->asoc.asconf_ack_sent, ack, next);
 
@@ -846,12 +849,13 @@ send_reply:
 		SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: looking up net for IP source address\n");
 		/* pullup already done, IP options already stripped */
 		iph = mtod(m, struct ip *);
-		sh = (struct sctphdr *)((caddr_t)iph + sizeof(*iph));
 		switch (iph->ip_v) {
+#ifdef INET
 		case IPVERSION:
 			{
 				struct sockaddr_in *from4;
 
+				sh = (struct sctphdr *)((caddr_t)iph + sizeof(*iph));
 				from4 = (struct sockaddr_in *)&from_store;
 				bzero(from4, sizeof(*from4));
 				from4->sin_family = AF_INET;
@@ -860,6 +864,7 @@ send_reply:
 				from4->sin_port = sh->src_port;
 				break;
 			}
+#endif
 #ifdef INET6
 		case IPV6_VERSION >> 4:
 			{
@@ -867,6 +872,7 @@ send_reply:
 				struct sockaddr_in6 *from6;
 
 				ip6 = mtod(m, struct ip6_hdr *);
+				sh = (struct sctphdr *)((caddr_t)ip6 + sizeof(*ip6));
 				from6 = (struct sockaddr_in6 *)&from_store;
 				bzero(from6, sizeof(*from6));
 				from6->sin6_family = AF_INET6;
@@ -908,28 +914,36 @@ send_reply:
 static uint32_t
 sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa)
 {
+	switch (sa->sa_family) {
 #ifdef INET6
-	if (sa->sa_family == AF_INET6) {
-		/* IPv6 sa address */
-		/* XXX scopeid */
-		struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
-
-		if ((aa->ap.addrp.ph.param_type == SCTP_IPV6_ADDRESS) &&
-		    (memcmp(&aa->ap.addrp.addr, &sin6->sin6_addr,
-		    sizeof(struct in6_addr)) == 0)) {
-			return (1);
+	case AF_INET6:
+		{
+			/* XXX scopeid */
+			struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
+
+			if ((aa->ap.addrp.ph.param_type == SCTP_IPV6_ADDRESS) &&
+			    (memcmp(&aa->ap.addrp.addr, &sin6->sin6_addr,
+			    sizeof(struct in6_addr)) == 0)) {
+				return (1);
+			}
+			break;
 		}
-	} else
-#endif				/* INET6 */
-	if (sa->sa_family == AF_INET) {
-		/* IPv4 sa address */
-		struct sockaddr_in *sin = (struct sockaddr_in *)sa;
-
-		if ((aa->ap.addrp.ph.param_type == SCTP_IPV4_ADDRESS) &&
-		    (memcmp(&aa->ap.addrp.addr, &sin->sin_addr,
-		    sizeof(struct in_addr)) == 0)) {
-			return (1);
+#endif
+#ifdef INET
+	case AF_INET:
+		{
+			struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+
+			if ((aa->ap.addrp.ph.param_type == SCTP_IPV4_ADDRESS) &&
+			    (memcmp(&aa->ap.addrp.addr, &sin->sin_addr,
+			    sizeof(struct in_addr)) == 0)) {
+				return (1);
+			}
+			break;
 		}
+#endif
+	default:
+		break;
 	}
 	return (0);
 }
@@ -938,43 +952,48 @@ sctp_asconf_addr_match(struct sctp_ascon
  * does the address match? returns 0 if not, 1 if so
  */
 static uint32_t
-sctp_addr_match(
-    struct sctp_ipv6addr_param *v6addr,
-    struct sockaddr *sa)
+sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa)
 {
 	uint16_t param_type, param_length;
-	struct sctp_ipv4addr_param *v4addr = (struct sctp_ipv4addr_param *)v6addr;
 
+	param_type = ntohs(ph->param_type);
+	param_length = ntohs(ph->param_length);
+	switch (sa->sa_family) {
 #ifdef INET6
-	if (sa->sa_family == AF_INET6) {
-		/* IPv6 sa address */
-		/* XXX scopeid */
-		struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
-
-		param_type = ntohs(v6addr->ph.param_type);
-		param_length = ntohs(v6addr->ph.param_length);
-
-		if ((param_type == SCTP_IPV6_ADDRESS) &&
-		    param_length == sizeof(struct sctp_ipv6addr_param) &&
-		    (memcmp(&v6addr->addr, &sin6->sin6_addr,
-		    sizeof(struct in6_addr)) == 0)) {
-			return (1);
+	case AF_INET6:
+		{
+			/* XXX scopeid */
+			struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
+			struct sctp_ipv6addr_param *v6addr;
+
+			v6addr = (struct sctp_ipv6addr_param *)ph;
+			if ((param_type == SCTP_IPV6_ADDRESS) &&
+			    param_length == sizeof(struct sctp_ipv6addr_param) &&
+			    (memcmp(&v6addr->addr, &sin6->sin6_addr,
+			    sizeof(struct in6_addr)) == 0)) {
+				return (1);
+			}
+			break;
 		}
-	}
 #endif
-	if (sa->sa_family == AF_INET) {
-		/* IPv4 sa address */
-		struct sockaddr_in *sin = (struct sockaddr_in *)sa;
-
-		param_type = ntohs(v4addr->ph.param_type);
-		param_length = ntohs(v4addr->ph.param_length);
-
-		if ((param_type == SCTP_IPV4_ADDRESS) &&
-		    param_length == sizeof(struct sctp_ipv4addr_param) &&
-		    (memcmp(&v4addr->addr, &sin->sin_addr,
-		    sizeof(struct in_addr)) == 0)) {
-			return (1);
+#ifdef INET
+	case AF_INET:
+		{
+			struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+			struct sctp_ipv4addr_param *v4addr;
+
+			v4addr = (struct sctp_ipv4addr_param *)ph;
+			if ((param_type == SCTP_IPV4_ADDRESS) &&
+			    param_length == sizeof(struct sctp_ipv4addr_param) &&
+			    (memcmp(&v4addr->addr, &sin->sin_addr,
+			    sizeof(struct in_addr)) == 0)) {
+				return (1);
+			}
+			break;
 		}
+#endif
+	default:
+		break;
 	}
 	return (0);
 }
@@ -1179,17 +1198,25 @@ sctp_path_check_and_react(struct sctp_tc
 			continue;
 
 		changed = 0;
-		if (net->ro._l_addr.sa.sa_family == AF_INET) {
-			if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *) & net->ro))
+		switch (net->ro._l_addr.sa.sa_family) {
+#ifdef INET
+		case AF_INET:
+			if (sctp_v4src_match_nexthop(newifa, (sctp_route_t *) & net->ro)) {
 				changed = 1;
-		}
+			}
+			break;
+#endif
 #ifdef INET6
-		if (net->ro._l_addr.sa.sa_family == AF_INET6) {
+		case AF_INET6:
 			if (sctp_v6src_match_nexthop(
-			    &newifa->address.sin6, (sctp_route_t *) & net->ro))
+			    &newifa->address.sin6, (sctp_route_t *) & net->ro)) {
 				changed = 1;
-		}
+			}
+			break;
 #endif
+		default:
+			break;
+		}
 		/*
 		 * if the newly added address does not relate routing
 		 * information, we skip.
@@ -1316,31 +1343,40 @@ sctp_asconf_queue_mgmt(struct sctp_tcb *
 	aa->ifa = ifa;
 	atomic_add_int(&ifa->refcount, 1);
 	/* correlation_id filled in during send routine later... */
-	if (ifa->address.sa.sa_family == AF_INET6) {
-		/* IPv6 address */
-		struct sockaddr_in6 *sin6;
+	switch (ifa->address.sa.sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		{
+			struct sockaddr_in6 *sin6;
 
-		sin6 = (struct sockaddr_in6 *)&ifa->address.sa;
-		sa = (struct sockaddr *)sin6;
-		aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS;
-		aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param));
-		aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
-		    sizeof(struct sctp_ipv6addr_param);
-		memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr,
-		    sizeof(struct in6_addr));
-	} else if (ifa->address.sa.sa_family == AF_INET) {
-		/* IPv4 address */
-		struct sockaddr_in *sin;
+			sin6 = (struct sockaddr_in6 *)&ifa->address.sa;
+			sa = (struct sockaddr *)sin6;
+			aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS;
+			aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param));
+			aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
+			    sizeof(struct sctp_ipv6addr_param);
+			memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr,
+			    sizeof(struct in6_addr));
+			break;
+		}
+#endif
+#ifdef INET
+	case AF_INET:
+		{
+			struct sockaddr_in *sin;
 
-		sin = (struct sockaddr_in *)&ifa->address.sa;
-		sa = (struct sockaddr *)sin;
-		aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS;
-		aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param));
-		aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
-		    sizeof(struct sctp_ipv4addr_param);
-		memcpy(&aa->ap.addrp.addr, &sin->sin_addr,
-		    sizeof(struct in_addr));
-	} else {
+			sin = (struct sockaddr_in *)&ifa->address.sa;
+			sa = (struct sockaddr *)sin;
+			aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS;
+			aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param));
+			aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) +
+			    sizeof(struct sctp_ipv4addr_param);
+			memcpy(&aa->ap.addrp.addr, &sin->sin_addr,
+			    sizeof(struct in_addr));
+			break;
+		}
+#endif
+	default:
 		/* invalid family! */
 		SCTP_FREE(aa, SCTP_M_ASC_ADDR);
 		sctp_free_ifa(ifa);
@@ -1522,26 +1558,37 @@ sctp_asconf_queue_sa_delete(struct sctp_
 	if (ifa)
 		atomic_add_int(&ifa->refcount, 1);
 	/* correlation_id filled in during send routine later... */
-	if (sa->sa_family == AF_INET6) {
-		/* IPv6 address */
-		struct sockaddr_in6 *sin6;
+	switch (sa->sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		{
+			/* IPv6 address */
+			struct sockaddr_in6 *sin6;
 
-		sin6 = (struct sockaddr_in6 *)sa;
-		aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS;
-		aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param));
-		aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv6addr_param);
-		memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr,
-		    sizeof(struct in6_addr));
-	} else if (sa->sa_family == AF_INET) {
-		/* IPv4 address */
-		struct sockaddr_in *sin = (struct sockaddr_in *)sa;
+			sin6 = (struct sockaddr_in6 *)sa;
+			aa->ap.addrp.ph.param_type = SCTP_IPV6_ADDRESS;
+			aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv6addr_param));
+			aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv6addr_param);
+			memcpy(&aa->ap.addrp.addr, &sin6->sin6_addr,
+			    sizeof(struct in6_addr));
+			break;
+		}
+#endif
+#ifdef INET
+	case AF_INET:
+		{
+			/* IPv4 address */
+			struct sockaddr_in *sin = (struct sockaddr_in *)sa;
 
-		aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS;
-		aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param));
-		aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv4addr_param);
-		memcpy(&aa->ap.addrp.addr, &sin->sin_addr,
-		    sizeof(struct in_addr));
-	} else {
+			aa->ap.addrp.ph.param_type = SCTP_IPV4_ADDRESS;
+			aa->ap.addrp.ph.param_length = (sizeof(struct sctp_ipv4addr_param));
+			aa->ap.aph.ph.param_length = sizeof(struct sctp_asconf_paramhdr) + sizeof(struct sctp_ipv4addr_param);
+			memcpy(&aa->ap.addrp.addr, &sin->sin_addr,
+			    sizeof(struct in_addr));
+			break;
+		}
+#endif
+	default:
 		/* invalid family! */
 		SCTP_FREE(aa, SCTP_M_ASC_ADDR);
 		if (ifa)
@@ -1923,10 +1970,19 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *
 	 */
 
 	/* first, make sure it's a good address family */
-	if (ifa->address.sa.sa_family != AF_INET6 &&
-	    ifa->address.sa.sa_family != AF_INET) {
+	switch (ifa->address.sa.sa_family) {
+#ifdef INET6
+	case AF_INET6:
+		break;
+#endif
+#ifdef INET
+	case AF_INET:
+		break;
+#endif
+	default:
 		return;
 	}
+#ifdef INET6
 	/* make sure we're "allowed" to add this type of addr */
 	if (ifa->address.sa.sa_family == AF_INET6) {
 		/* invalid if we're not a v6 endpoint */
@@ -1937,6 +1993,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *
 			return;
 		}
 	}
+#endif
 	/* put this address on the "pending/do not use yet" list */
 	sctp_add_local_addr_restricted(stcb, ifa);
 	/*
@@ -1971,6 +2028,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *
 			break;
 		}
 #endif
+#ifdef INET
 	case AF_INET:
 		{
 			struct sockaddr_in *sin;
@@ -1993,6 +2051,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *
 			}
 			break;
 		}
+#endif
 	default:
 		/* else, not AF_INET or AF_INET6, so skip */
 		return;
@@ -2036,35 +2095,38 @@ sctp_asconf_iterator_ep(struct sctp_inpc
 	asc = (struct sctp_asconf_iterator *)ptr;
 	LIST_FOREACH(l, &asc->list_of_work, sctp_nxt_addr) {
 		ifa = l->ifa;
-		if (ifa->address.sa.sa_family == AF_INET6) {
+		switch (ifa->address.sa.sa_family) {
+#ifdef INET6
+		case AF_INET6:
 			/* invalid if we're not a v6 endpoint */
 			if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) {
 				cnt_invalid++;
 				if (asc->cnt == cnt_invalid)
 					return (1);
-				else
-					continue;
 			}
-		} else if (ifa->address.sa.sa_family == AF_INET) {
-			/* invalid if we are a v6 only endpoint */
-			struct in6pcb *inp6;
+			break;
+#endif
+#ifdef INET
+		case AF_INET:
+			{
+				/* invalid if we are a v6 only endpoint */
+				struct in6pcb *inp6;
 
-			inp6 = (struct in6pcb *)&inp->ip_inp.inp;
-			if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
-			    SCTP_IPV6_V6ONLY(inp6)) {
-				cnt_invalid++;
-				if (asc->cnt == cnt_invalid)
-					return (1);
-				else
-					continue;
+				inp6 = (struct in6pcb *)&inp->ip_inp.inp;
+				if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) &&
+				    SCTP_IPV6_V6ONLY(inp6)) {
+					cnt_invalid++;
+					if (asc->cnt == cnt_invalid)
+						return (1);
+				}
+				break;
 			}
-		} else {
+#endif
+		default:
 			/* invalid address family */
 			cnt_invalid++;
 			if (asc->cnt == cnt_invalid)
 				return (1);
-			else
-				continue;
 		}
 	}
 	return (0);
@@ -2153,6 +2215,7 @@ sctp_asconf_iterator_stcb(struct sctp_in
 				break;
 			}
 #endif
+#ifdef INET
 		case AF_INET:
 			{
 				/* invalid if we are a v6 only endpoint */
@@ -2184,6 +2247,7 @@ sctp_asconf_iterator_stcb(struct sctp_in
 				}
 				break;
 			}
+#endif
 		default:
 			/* invalid address family */
 			cnt_invalid++;
@@ -2374,7 +2438,7 @@ sctp_is_addr_pending(struct sctp_tcb *st
 	struct sctp_asconf_chunk *acp;
 	struct sctp_asconf_paramhdr *aph;
 	uint8_t aparam_buf[SCTP_PARAM_BUFFER_SIZE];
-	struct sctp_ipv6addr_param *p_addr;
+	struct sctp_paramhdr *ph;
 	int add_cnt, del_cnt;
 	uint16_t last_param_type;
 
@@ -2389,12 +2453,12 @@ sctp_is_addr_pending(struct sctp_tcb *st
 		acp = mtod(chk->data, struct sctp_asconf_chunk *);
 		offset += sizeof(struct sctp_asconf_chunk);
 		asconf_limit = ntohs(acp->ch.chunk_length);
-		p_addr = (struct sctp_ipv6addr_param *)sctp_m_getptr(chk->data, offset, sizeof(struct sctp_paramhdr), aparam_buf);
-		if (p_addr == NULL) {
+		ph = (struct sctp_paramhdr *)sctp_m_getptr(chk->data, offset, sizeof(struct sctp_paramhdr), aparam_buf);
+		if (ph == NULL) {
 			SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get lookup addr!\n");
 			continue;
 		}
-		offset += ntohs(p_addr->ph.param_length);
+		offset += ntohs(ph->param_length);
 
 		aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(chk->data, offset, sizeof(struct sctp_asconf_paramhdr), aparam_buf);
 		if (aph == NULL) {
@@ -2423,8 +2487,8 @@ sctp_is_addr_pending(struct sctp_tcb *st
 				SCTPDBG(SCTP_DEBUG_ASCONF1, "is_addr_pending: couldn't get entire param\n");
 				break;
 			}
-			p_addr = (struct sctp_ipv6addr_param *)(aph + 1);
-			if (sctp_addr_match(p_addr, &sctp_ifa->address.sa) != 0) {
+			ph = (struct sctp_paramhdr *)(aph + 1);
+			if (sctp_addr_match(ph, &sctp_ifa->address.sa) != 0) {
 				switch (param_type) {
 				case SCTP_ADD_IP_ADDRESS:
 					add_cnt++;
@@ -2480,52 +2544,72 @@ sctp_find_valid_localaddr(struct sctp_tc
 			continue;
 		}
 		LIST_FOREACH(sctp_ifa, &sctp_ifn->ifalist, next_ifa) {
-			if (sctp_ifa->address.sa.sa_family == AF_INET &&
-			    stcb->asoc.ipv4_addr_legal) {
-				struct sockaddr_in *sin;
+			switch (sctp_ifa->address.sa.sa_family) {
+#ifdef INET
+			case AF_INET:
+				if (stcb->asoc.ipv4_addr_legal) {
+					struct sockaddr_in *sin;
+
+					sin = (struct sockaddr_in *)&sctp_ifa->address.sa;
+					if (sin->sin_addr.s_addr == 0) {
+						/* skip unspecifed addresses */
+						continue;
+					}
+					if (stcb->asoc.ipv4_local_scope == 0 &&
+					    IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))
+						continue;
 
-				sin = (struct sockaddr_in *)&sctp_ifa->address.sa;
-				if (sin->sin_addr.s_addr == 0) {
-					/* skip unspecifed addresses */
-					continue;
+					if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
+					    (!sctp_is_addr_pending(stcb, sctp_ifa)))
+						continue;
+					/*
+					 * found a valid local v4 address to
+					 * use
+					 */
+					if (addr_locked == SCTP_ADDR_NOT_LOCKED)
+						SCTP_IPI_ADDR_RUNLOCK();
+					return (&sctp_ifa->address.sa);
 				}
-				if (stcb->asoc.ipv4_local_scope == 0 &&
-				    IN4_ISPRIVATE_ADDRESS(&sin->sin_addr))
-					continue;
+				break;
+#endif
+#ifdef INET6
+			case AF_INET6:
+				if (stcb->asoc.ipv6_addr_legal) {
+					struct sockaddr_in6 *sin6;
 
-				if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
-				    (!sctp_is_addr_pending(stcb, sctp_ifa)))
-					continue;
-				/* found a valid local v4 address to use */
-				if (addr_locked == SCTP_ADDR_NOT_LOCKED)
-					SCTP_IPI_ADDR_RUNLOCK();
-				return (&sctp_ifa->address.sa);
-			} else if (sctp_ifa->address.sa.sa_family == AF_INET6 &&
-			    stcb->asoc.ipv6_addr_legal) {
-				struct sockaddr_in6 *sin6;
+					if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) {
+						continue;
+					}
+					sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa;
+					if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
+						/*
+						 * we skip unspecifed
+						 * addresses
+						 */
+						continue;
+					}
+					if (stcb->asoc.local_scope == 0 &&
+					    IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
+						continue;
+					if (stcb->asoc.site_scope == 0 &&
+					    IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))
+						continue;
 
-				if (sctp_ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) {
-					continue;
-				}
-				sin6 = (struct sockaddr_in6 *)&sctp_ifa->address.sa;
-				if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
-					/* we skip unspecifed addresses */
-					continue;
+					if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
+					    (!sctp_is_addr_pending(stcb, sctp_ifa)))
+						continue;
+					/*
+					 * found a valid local v6 address to
+					 * use
+					 */
+					if (addr_locked == SCTP_ADDR_NOT_LOCKED)
+						SCTP_IPI_ADDR_RUNLOCK();
+					return (&sctp_ifa->address.sa);
 				}
-				if (stcb->asoc.local_scope == 0 &&
-				    IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
-					continue;
-				if (stcb->asoc.site_scope == 0 &&
-				    IN6_IS_ADDR_SITELOCAL(&sin6->sin6_addr))
-					continue;
-
-				if (sctp_is_addr_restricted(stcb, sctp_ifa) &&
-				    (!sctp_is_addr_pending(stcb, sctp_ifa)))
-					continue;
-				/* found a valid local v6 address to use */
-				if (addr_locked == SCTP_ADDR_NOT_LOCKED)
-					SCTP_IPI_ADDR_RUNLOCK();
-				return (&sctp_ifa->address.sa);
+				break;
+#endif
+			default:
+				break;
 			}
 		}
 	}
@@ -2697,7 +2781,9 @@ sctp_compose_asconf(struct sctp_tcb *stc
 
 		lookup = (struct sctp_ipv6addr_param *)lookup_ptr;
 		if (found_addr != NULL) {
-			if (found_addr->sa_family == AF_INET6) {
+			switch (found_addr->sa_family) {
+#ifdef INET6
+			case AF_INET6:
 				/* copy IPv6 address */
 				lookup->ph.param_type =
 				    htons(SCTP_IPV6_ADDRESS);
@@ -2705,7 +2791,10 @@ sctp_compose_asconf(struct sctp_tcb *stc
 				addr_size = sizeof(struct in6_addr);
 				addr_ptr = (caddr_t)&((struct sockaddr_in6 *)
 				    found_addr)->sin6_addr;
-			} else {
+				break;
+#endif
+#ifdef INET
+			case AF_INET:
 				/* copy IPv4 address */
 				lookup->ph.param_type =
 				    htons(SCTP_IPV4_ADDRESS);
@@ -2713,6 +2802,13 @@ sctp_compose_asconf(struct sctp_tcb *stc
 				addr_size = sizeof(struct in_addr);
 				addr_ptr = (caddr_t)&((struct sockaddr_in *)
 				    found_addr)->sin_addr;
+				break;
+#endif
+			default:
+				p_size = 0;
+				addr_size = 0;
+				addr_ptr = NULL;
+				break;
 			}
 			lookup->ph.param_length = htons(SCTP_SIZE32(p_size));
 			memcpy(lookup->addr, addr_ptr, addr_size);
@@ -2722,7 +2818,7 @@ sctp_compose_asconf(struct sctp_tcb *stc
 			/* uh oh... don't have any address?? */
 			SCTPDBG(SCTP_DEBUG_ASCONF1,
 			    "compose_asconf: no lookup addr!\n");
-			/* for now, we send a IPv4 address of 0.0.0.0 */
+			/* XXX for now, we send a IPv4 address of 0.0.0.0 */
 			lookup->ph.param_type = htons(SCTP_IPV4_ADDRESS);
 			lookup->ph.param_length = htons(SCTP_SIZE32(sizeof(struct sctp_ipv4addr_param)));
 			bzero(lookup->addr, sizeof(struct in_addr));
@@ -2754,8 +2850,15 @@ sctp_process_initack_addresses(struct sc
 	uint16_t plen, ptype;
 	struct sctp_ifa *sctp_ifa;
 	struct sctp_ipv6addr_param addr_store;
+
+#ifdef INET6
 	struct sockaddr_in6 sin6;
+
+#endif
+#ifdef INET
 	struct sockaddr_in sin;
+
+#endif

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:21: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 6EF89106566C;
	Sat, 30 Apr 2011 11:21:29 +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 5D8998FC16;
	Sat, 30 Apr 2011 11:21: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 p3UBLTeC043453;
	Sat, 30 Apr 2011 11:21:29 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBLTBX043445;
	Sat, 30 Apr 2011 11:21:29 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301121.p3UBLTBX043445@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 11:21: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: r221250 - in head/sys: conf 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: Sat, 30 Apr 2011 11:21:29 -0000

Author: bz
Date: Sat Apr 30 11:21:29 2011
New Revision: 221250
URL: http://svn.freebsd.org/changeset/base/221250

Log:
  Make the TCP code compile without INET.  Sort #includes and add #ifdef INETs.
  Add some comments at #endifs given more nestedness.  To make the compiler
  happy, some default initializations were added in accordance with the style
  on the files.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/conf/files
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_output.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_timewait.c
  head/sys/netinet/tcp_usrreq.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/conf/files	Sat Apr 30 11:21:29 2011	(r221250)
@@ -2740,8 +2740,8 @@ netinet/ip_mroute.c		optional mrouting i
 netinet/ip_options.c		optional inet
 netinet/ip_output.c		optional inet
 netinet/raw_ip.c		optional inet
-netinet/cc/cc.c			optional inet
-netinet/cc/cc_newreno.c		optional inet
+netinet/cc/cc.c			optional inet | inet6
+netinet/cc/cc_newreno.c		optional inet | inet6
 netinet/sctp_asconf.c		optional inet sctp
 netinet/sctp_auth.c		optional inet sctp
 netinet/sctp_bsd_addr.c		optional inet sctp
@@ -2758,18 +2758,18 @@ netinet/sctp_timer.c		optional inet sctp
 netinet/sctp_usrreq.c		optional inet sctp
 netinet/sctputil.c		optional inet sctp
 netinet/tcp_debug.c		optional tcpdebug
-netinet/tcp_hostcache.c		optional inet
-netinet/tcp_input.c		optional inet
-netinet/tcp_lro.c		optional inet
-netinet/tcp_output.c		optional inet
-netinet/tcp_offload.c		optional inet
-netinet/tcp_reass.c		optional inet
-netinet/tcp_sack.c		optional inet
-netinet/tcp_subr.c		optional inet
-netinet/tcp_syncache.c		optional inet
-netinet/tcp_timer.c		optional inet
-netinet/tcp_timewait.c		optional inet
-netinet/tcp_usrreq.c		optional inet
+netinet/tcp_hostcache.c		optional inet | inet6
+netinet/tcp_input.c		optional inet | inet6
+netinet/tcp_lro.c		optional inet | inet6
+netinet/tcp_output.c		optional inet | inet6
+netinet/tcp_offload.c		optional inet | inet6
+netinet/tcp_reass.c		optional inet | inet6
+netinet/tcp_sack.c		optional inet | inet6
+netinet/tcp_subr.c		optional inet | inet6
+netinet/tcp_syncache.c		optional inet | inet6
+netinet/tcp_timer.c		optional inet | inet6
+netinet/tcp_timewait.c		optional inet | inet6
+netinet/tcp_usrreq.c		optional inet | inet6
 netinet/udp_usrreq.c		optional inet | inet6
 netinet/libalias/alias.c	optional libalias inet | netgraph_nat inet
 netinet/libalias/alias_db.c	optional libalias inet | netgraph_nat inet

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_input.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -367,12 +367,13 @@ cc_conn_init(struct tcpcb *tp)
 		tp->snd_cwnd = min(4 * tp->t_maxseg,
 		    max(2 * tp->t_maxseg, 4380));
 #ifdef INET6
-	else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
-		 (!isipv6 && in_localaddr(inp->inp_faddr)))
-#else
-	else if (in_localaddr(inp->inp_faddr))
+	else if (isipv6 && in6_localaddr(&inp->in6p_faddr))
+		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
 #endif
+#if defined(INET) || defined(INET6)
+	else if (in_localaddr(inp->inp_faddr))
 		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
+#endif
 	else
 		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz;
 
@@ -542,37 +543,46 @@ tcp6_input(struct mbuf **mp, int *offp, 
 	tcp_input(m, *offp);
 	return IPPROTO_DONE;
 }
-#endif
+#endif /* INET6 */
 
 void
 tcp_input(struct mbuf *m, int off0)
 {
-	struct tcphdr *th;
+	struct tcphdr *th = NULL;
 	struct ip *ip = NULL;
+#ifdef INET
 	struct ipovly *ipov;
+#endif
 	struct inpcb *inp = NULL;
 	struct tcpcb *tp = NULL;
 	struct socket *so = NULL;
 	u_char *optp = NULL;
 	int optlen = 0;
-	int len, tlen, off;
+#ifdef INET
+	int len;
+#endif
+	int tlen = 0, off;
 	int drop_hdrlen;
 	int thflags;
 	int rstreason = 0;	/* For badport_bandlim accounting purposes */
-	uint8_t iptos;
 #ifdef TCP_SIGNATURE
 	uint8_t sig_checked = 0;
 #endif
+	uint8_t iptos = 0;
+#ifdef INET
 #ifdef IPFIREWALL_FORWARD
 	struct m_tag *fwd_tag;
 #endif
+#endif /* INET */
 #ifdef INET6
 	struct ip6_hdr *ip6 = NULL;
 	int isipv6;
 #else
 	const void *ip6 = NULL;
+#if (defined(INET) && defined(IPFIREWALL_FORWARD)) || defined(TCPDEBUG)
 	const int isipv6 = 0;
 #endif
+#endif /* INET6 */
 	struct tcpopt to;		/* options in this segment */
 	char *s = NULL;			/* address and port logging */
 	int ti_locked;
@@ -597,8 +607,8 @@ tcp_input(struct mbuf *m, int off0)
 	to.to_flags = 0;
 	TCPSTAT_INC(tcps_rcvtotal);
 
-	if (isipv6) {
 #ifdef INET6
+	if (isipv6) {
 		/* IP6_EXTHDR_CHECK() is already done at tcp6_input(). */
 		ip6 = mtod(m, struct ip6_hdr *);
 		tlen = sizeof(*ip6) + ntohs(ip6->ip6_plen) - off0;
@@ -620,10 +630,13 @@ tcp_input(struct mbuf *m, int off0)
 			/* XXX stat */
 			goto drop;
 		}
-#else
-		th = NULL;		/* XXX: Avoid compiler warning. */
+	}
 #endif
-	} else {
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
+	{
 		/*
 		 * Get IP and TCP header together in first mbuf.
 		 * Note: IP leaves IP header in first mbuf.
@@ -675,13 +688,18 @@ tcp_input(struct mbuf *m, int off0)
 		/* Re-initialization for later version check */
 		ip->ip_v = IPVERSION;
 	}
+#endif /* INET */
 
 #ifdef INET6
 	if (isipv6)
 		iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
+#endif
+#if defined(INET) && defined(INET6)
 	else
 #endif
+#ifdef INET
 		iptos = ip->ip_tos;
+#endif
 
 	/*
 	 * Check that TCP offset makes sense,
@@ -694,13 +712,18 @@ tcp_input(struct mbuf *m, int off0)
 	}
 	tlen -= off;	/* tlen is used instead of ti->ti_len */
 	if (off > sizeof (struct tcphdr)) {
-		if (isipv6) {
 #ifdef INET6
+		if (isipv6) {
 			IP6_EXTHDR_CHECK(m, off0, off, );
 			ip6 = mtod(m, struct ip6_hdr *);
 			th = (struct tcphdr *)((caddr_t)ip6 + off0);
+		}
 #endif
-		} else {
+#if defined(INET) && defined(INET6)
+		else
+#endif
+#ifdef INET
+		{
 			if (m->m_len < sizeof(struct ip) + off) {
 				if ((m = m_pullup(m, sizeof (struct ip) + off))
 				    == NULL) {
@@ -712,6 +735,7 @@ tcp_input(struct mbuf *m, int off0)
 				th = (struct tcphdr *)((caddr_t)ip + off0);
 			}
 		}
+#endif
 		optlen = off - sizeof (struct tcphdr);
 		optp = (u_char *)(th + 1);
 	}
@@ -754,6 +778,7 @@ findpcb:
 		panic("%s: findpcb ti_locked %d\n", __func__, ti_locked);
 #endif
 
+#ifdef INET
 #ifdef IPFIREWALL_FORWARD
 	/*
 	 * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain.
@@ -787,21 +812,26 @@ findpcb:
 		m_tag_delete(m, fwd_tag);
 	} else
 #endif /* IPFIREWALL_FORWARD */
+#endif /* INET */
 	{
-		if (isipv6) {
 #ifdef INET6
+		if (isipv6)
 			inp = in6_pcblookup_hash(&V_tcbinfo,
 						 &ip6->ip6_src, th->th_sport,
 						 &ip6->ip6_dst, th->th_dport,
 						 INPLOOKUP_WILDCARD,
 						 m->m_pkthdr.rcvif);
 #endif
-		} else
+#if defined(INET) && defined(INET6)
+		else
+#endif
+#ifdef INET
 			inp = in_pcblookup_hash(&V_tcbinfo,
 						ip->ip_src, th->th_sport,
 						ip->ip_dst, th->th_dport,
 						INPLOOKUP_WILDCARD,
 						m->m_pkthdr.rcvif);
+#endif
 	}
 
 	/*
@@ -989,7 +1019,7 @@ relocked:
 			bcopy((char *)ip, (char *)tcp_saveipgen, sizeof(*ip));
 		tcp_savetcp = *th;
 	}
-#endif
+#endif /* TCPDEBUG */
 	/*
 	 * When the socket is accepting connections (the INPCB is in LISTEN
 	 * state) we look into the SYN cache if this is a new connection
@@ -1224,7 +1254,7 @@ relocked:
 			}
 			ifa_free(&ia6->ia_ifa);
 		}
-#endif
+#endif /* INET6 */
 		/*
 		 * Basic sanity checks on incoming SYN requests:
 		 *   Don't respond if the destination is a link layer
@@ -1243,8 +1273,8 @@ relocked:
 				"link layer address ignored\n", s, __func__);
 			goto dropunlock;
 		}
-		if (isipv6) {
 #ifdef INET6
+		if (isipv6) {
 			if (th->th_dport == th->th_sport &&
 			    IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &ip6->ip6_src)) {
 				if ((s = tcp_log_addrs(&inc, th, NULL, NULL)))
@@ -1261,8 +1291,13 @@ relocked:
 					"address ignored\n", s, __func__);
 				goto dropunlock;
 			}
+		}
 #endif
-		} else {
+#if defined(INET) && defined(INET6)
+		else
+#endif
+#ifdef INET
+		{
 			if (th->th_dport == th->th_sport &&
 			    ip->ip_dst.s_addr == ip->ip_src.s_addr) {
 				if ((s = tcp_log_addrs(&inc, th, NULL, NULL)))
@@ -1283,6 +1318,7 @@ relocked:
 				goto dropunlock;
 			}
 		}
+#endif
 		/*
 		 * SYN appears to be valid.  Create compressed TCP state
 		 * for syncache.
@@ -3020,7 +3056,9 @@ static void
 tcp_dropwithreset(struct mbuf *m, struct tcphdr *th, struct tcpcb *tp,
     int tlen, int rstreason)
 {
+#ifdef INET
 	struct ip *ip;
+#endif
 #ifdef INET6
 	struct ip6_hdr *ip6;
 #endif
@@ -3039,8 +3077,12 @@ tcp_dropwithreset(struct mbuf *m, struct
 		    IN6_IS_ADDR_MULTICAST(&ip6->ip6_src))
 			goto drop;
 		/* IPv6 anycast check is done at tcp6_input() */
-	} else
+	}
 #endif
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
 	{
 		ip = mtod(m, struct ip *);
 		if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
@@ -3049,6 +3091,7 @@ tcp_dropwithreset(struct mbuf *m, struct
 		    in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
 			goto drop;
 	}
+#endif
 
 	/* Perform bandwidth limiting. */
 	if (badport_bandlim(rstreason) < 0)
@@ -3308,8 +3351,8 @@ void
 tcp_mss_update(struct tcpcb *tp, int offer,
     struct hc_metrics_lite *metricptr, int *mtuflags)
 {
-	int mss;
-	u_long maxmtu;
+	int mss = 0;
+	u_long maxmtu = 0;
 	struct inpcb *inp = tp->t_inpcb;
 	struct hc_metrics_lite metrics;
 	int origoffer = offer;
@@ -3329,12 +3372,17 @@ tcp_mss_update(struct tcpcb *tp, int off
 	if (isipv6) {
 		maxmtu = tcp_maxmtu6(&inp->inp_inc, mtuflags);
 		tp->t_maxopd = tp->t_maxseg = V_tcp_v6mssdflt;
-	} else
+	}
 #endif
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
 	{
 		maxmtu = tcp_maxmtu(&inp->inp_inc, mtuflags);
 		tp->t_maxopd = tp->t_maxseg = V_tcp_mssdflt;
 	}
+#endif
 
 	/*
 	 * No route to sender, stay with default mss and return.
@@ -3395,14 +3443,19 @@ tcp_mss_update(struct tcpcb *tp, int off
 			if (!V_path_mtu_discovery &&
 			    !in6_localaddr(&inp->in6p_faddr))
 				mss = min(mss, V_tcp_v6mssdflt);
-		} else
+		}
 #endif
+#if defined(INET) && defined(INET6)
+		else
+#endif
+#ifdef INET
 		{
 			mss = maxmtu - min_protoh;
 			if (!V_path_mtu_discovery &&
 			    !in_localaddr(inp->inp_faddr))
 				mss = min(mss, V_tcp_mssdflt);
 		}
+#endif
 		/*
 		 * XXX - The above conditional (mss = maxmtu - min_protoh)
 		 * probably violates the TCP spec.
@@ -3540,14 +3593,19 @@ tcp_mssopt(struct in_conninfo *inc)
 		maxmtu = tcp_maxmtu6(inc, NULL);
 		thcmtu = tcp_hc_getmtu(inc); /* IPv4 and IPv6 */
 		min_protoh = sizeof(struct ip6_hdr) + sizeof(struct tcphdr);
-	} else
+	}
+#endif
+#if defined(INET) && defined(INET6)
+	else
 #endif
+#ifdef INET
 	{
 		mss = V_tcp_mssdflt;
 		maxmtu = tcp_maxmtu(inc, NULL);
 		thcmtu = tcp_hc_getmtu(inc); /* IPv4 and IPv6 */
 		min_protoh = sizeof(struct tcpiphdr);
 	}
+#endif
 	if (maxmtu && thcmtu)
 		mss = min(maxmtu, thcmtu) - min_protoh;
 	else if (maxmtu || thcmtu)

Modified: head/sys/netinet/tcp_output.c
==============================================================================
--- head/sys/netinet/tcp_output.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_output.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -173,7 +173,7 @@ tcp_output(struct tcpcb *tp)
 {
 	struct socket *so = tp->t_inpcb->inp_socket;
 	long len, recwin, sendwin;
-	int off, flags, error;
+	int off, flags, error = 0;	/* Keep compiler happy */
 	struct mbuf *m;
 	struct ip *ip = NULL;
 	struct ipovly *ipov = NULL;
@@ -659,7 +659,7 @@ send:
 		hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr);
 	else
 #endif
-	hdrlen = sizeof (struct tcpiphdr);
+		hdrlen = sizeof (struct tcpiphdr);
 
 	/*
 	 * Compute options for segment.
@@ -866,7 +866,7 @@ send:
 				goto out;
 			}
 		}
-#endif
+#endif /* notyet */
 		/*
 		 * If we're sending everything we've got, set PUSH.
 		 * (This will keep happy those implementations which only
@@ -1189,7 +1189,7 @@ timer:
 #endif
 		ipov->ih_len = save;
 	}
-#endif
+#endif /* TCPDEBUG */
 
 	/*
 	 * Fill in IP length and desired time to live and
@@ -1216,8 +1216,12 @@ timer:
 			    tp->t_inpcb->in6p_outputopts, NULL,
 			    ((so->so_options & SO_DONTROUTE) ?
 			    IP_ROUTETOIF : 0), NULL, NULL, tp->t_inpcb);
-	} else
+	}
 #endif /* INET6 */
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
     {
 	ip->ip_len = m->m_pkthdr.len;
 #ifdef INET6
@@ -1239,6 +1243,7 @@ timer:
 	    ((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0,
 	    tp->t_inpcb);
     }
+#endif /* INET */
 	if (error) {
 
 		/*

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_subr.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -66,23 +66,20 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
 #ifdef INET6
 #include 
-#endif
-#include 
-#ifdef INET6
 #include 
-#endif
-#include 
-#include 
-#ifdef INET6
 #include 
 #include 
 #include 
 #endif
-#include 
+
 #include 
 #include 
 #include 
@@ -96,7 +93,9 @@ __FBSDID("$FreeBSD$");
 #ifdef TCPDEBUG
 #include 
 #endif
+#ifdef INET6
 #include 
+#endif
 
 #ifdef IPSEC
 #include 
@@ -160,7 +159,7 @@ SYSCTL_VNET_PROC(_net_inet_tcp, TCPCTL_V
     CTLTYPE_INT|CTLFLAG_RW, &VNET_NAME(tcp_v6mssdflt), 0,
     &sysctl_net_inet_tcp_mss_v6_check, "I",
    "Default TCP Maximum Segment Size for IPv6");
-#endif
+#endif /* INET6 */
 
 /*
  * Minimum MSS we accept and use. This prevents DoS attacks where
@@ -414,8 +413,12 @@ tcpip_fillheaders(struct inpcb *inp, voi
 		ip6->ip6_plen = htons(sizeof(struct tcphdr));
 		ip6->ip6_src = inp->in6p_laddr;
 		ip6->ip6_dst = inp->in6p_faddr;
-	} else
+	}
+#endif /* INET6 */
+#if defined(INET6) && defined(INET)
+	else
 #endif
+#ifdef INET
 	{
 		struct ip *ip;
 
@@ -432,6 +435,7 @@ tcpip_fillheaders(struct inpcb *inp, voi
 		ip->ip_src = inp->inp_laddr;
 		ip->ip_dst = inp->inp_faddr;
 	}
+#endif /* INET */
 	th->th_sport = inp->inp_lport;
 	th->th_dport = inp->inp_fport;
 	th->th_seq = 0;
@@ -493,7 +497,7 @@ tcp_respond(struct tcpcb *tp, void *ipge
 	KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL"));
 
 #ifdef INET6
-	isipv6 = ((struct ip *)ipgen)->ip_v == 6;
+	isipv6 = ((struct ip *)ipgen)->ip_v == (IPV6_VERSION >> 4);
 	ip6 = ipgen;
 #endif /* INET6 */
 	ip = ipgen;
@@ -574,8 +578,12 @@ tcp_respond(struct tcpcb *tp, void *ipge
 		ip6->ip6_plen = htons((u_short)(sizeof (struct tcphdr) +
 						tlen));
 		tlen += sizeof (struct ip6_hdr) + sizeof (struct tcphdr);
-	} else
+	}
 #endif
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
 	{
 		tlen += sizeof (struct tcpiphdr);
 		ip->ip_len = tlen;
@@ -583,6 +591,7 @@ tcp_respond(struct tcpcb *tp, void *ipge
 		if (V_path_mtu_discovery)
 			ip->ip_off |= IP_DF;
 	}
+#endif
 	m->m_len = tlen;
 	m->m_pkthdr.len = tlen;
 	m->m_pkthdr.rcvif = NULL;
@@ -620,14 +629,19 @@ tcp_respond(struct tcpcb *tp, void *ipge
 					tlen - sizeof(struct ip6_hdr));
 		ip6->ip6_hlim = in6_selecthlim(tp != NULL ? tp->t_inpcb :
 		    NULL, NULL);
-	} else
+	}
 #endif /* INET6 */
+#if defined(INET6) && defined(INET)
+	else
+#endif
+#ifdef INET
 	{
 		nth->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		    htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p)));
 		m->m_pkthdr.csum_flags = CSUM_TCP;
 		m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
 	}
+#endif /* INET */
 #ifdef TCPDEBUG
 	if (tp == NULL || (inp->inp_socket->so_options & SO_DEBUG))
 		tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0);
@@ -635,9 +649,13 @@ tcp_respond(struct tcpcb *tp, void *ipge
 #ifdef INET6
 	if (isipv6)
 		(void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp);
-	else
 #endif /* INET6 */
-	(void) ip_output(m, NULL, NULL, ipflags, NULL, inp);
+#if defined(INET) && defined(INET6)
+	else
+#endif
+#ifdef INET
+		(void) ip_output(m, NULL, NULL, ipflags, NULL, inp);
+#endif
 }
 
 /*
@@ -1200,6 +1218,7 @@ SYSCTL_PROC(_net_inet_tcp, TCPCTL_PCBLIS
     CTLTYPE_OPAQUE | CTLFLAG_RD, NULL, 0,
     tcp_pcblist, "S,xtcpcb", "List of active TCP connections");
 
+#ifdef INET
 static int
 tcp_getcred(SYSCTL_HANDLER_ARGS)
 {
@@ -1239,6 +1258,7 @@ tcp_getcred(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_net_inet_tcp, OID_AUTO, getcred,
     CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0,
     tcp_getcred, "S,xucred", "Get the xucred of a TCP connection");
+#endif /* INET */
 
 #ifdef INET6
 static int
@@ -1247,7 +1267,10 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 	struct xucred xuc;
 	struct sockaddr_in6 addrs[2];
 	struct inpcb *inp;
-	int error, mapped = 0;
+	int error;
+#ifdef INET
+	int mapped = 0;
+#endif
 
 	error = priv_check(req->td, PRIV_NETINET_GETCRED);
 	if (error)
@@ -1260,13 +1283,16 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 		return (error);
 	}
 	if (IN6_IS_ADDR_V4MAPPED(&addrs[0].sin6_addr)) {
+#ifdef INET
 		if (IN6_IS_ADDR_V4MAPPED(&addrs[1].sin6_addr))
 			mapped = 1;
 		else
+#endif
 			return (EINVAL);
 	}
 
 	INP_INFO_RLOCK(&V_tcbinfo);
+#ifdef INET
 	if (mapped == 1)
 		inp = in_pcblookup_hash(&V_tcbinfo,
 			*(struct in_addr *)&addrs[1].sin6_addr.s6_addr[12],
@@ -1275,6 +1301,7 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 			addrs[0].sin6_port,
 			0, NULL);
 	else
+#endif
 		inp = in6_pcblookup_hash(&V_tcbinfo,
 			&addrs[1].sin6_addr, addrs[1].sin6_port,
 			&addrs[0].sin6_addr, addrs[0].sin6_port, 0, NULL);
@@ -1300,9 +1327,10 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_net_inet6_tcp6, OID_AUTO, getcred,
     CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0,
     tcp6_getcred, "S,xucred", "Get the xucred of a TCP6 connection");
-#endif
+#endif /* INET6 */
 
 
+#ifdef INET
 void
 tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
 {
@@ -1415,6 +1443,7 @@ tcp_ctlinput(int cmd, struct sockaddr *s
 	} else
 		in_pcbnotifyall(&V_tcbinfo, faddr, inetctlerrmap[cmd], notify);
 }
+#endif /* INET */
 
 #ifdef INET6
 void
@@ -1694,6 +1723,7 @@ tcp_mtudisc(struct inpcb *inp, int errno
 	return (inp);
 }
 
+#ifdef INET
 /*
  * Look-up the routing entry to the peer of this inpcb.  If no route
  * is found and it cannot be allocated, then return 0.  This routine
@@ -1735,6 +1765,7 @@ tcp_maxmtu(struct in_conninfo *inc, int 
 	}
 	return (maxmtu);
 }
+#endif /* INET */
 
 #ifdef INET6
 u_long
@@ -1858,11 +1889,15 @@ tcp_signature_compute(struct mbuf *m, in
     u_char *buf, u_int direction)
 {
 	union sockaddr_union dst;
+#ifdef INET
 	struct ippseudo ippseudo;
+#endif
 	MD5_CTX ctx;
 	int doff;
 	struct ip *ip;
+#ifdef INET
 	struct ipovly *ipovly;
+#endif
 	struct secasvar *sav;
 	struct tcphdr *th;
 #ifdef INET6
@@ -1884,12 +1919,14 @@ tcp_signature_compute(struct mbuf *m, in
 	ip6 = NULL;	/* Make the compiler happy. */
 #endif
 	switch (ip->ip_v) {
+#ifdef INET
 	case IPVERSION:
 		dst.sa.sa_len = sizeof(struct sockaddr_in);
 		dst.sa.sa_family = AF_INET;
 		dst.sin.sin_addr = (direction == IPSEC_DIR_INBOUND) ?
 		    ip->ip_src : ip->ip_dst;
 		break;
+#endif
 #ifdef INET6
 	case (IPV6_VERSION >> 4):
 		ip6 = mtod(m, struct ip6_hdr *);
@@ -1929,6 +1966,7 @@ tcp_signature_compute(struct mbuf *m, in
 	 * tcp_output(), the underlying ip_len member has not yet been set.
 	 */
 	switch (ip->ip_v) {
+#ifdef INET
 	case IPVERSION:
 		ipovly = (struct ipovly *)ip;
 		ippseudo.ippseudo_src = ipovly->ih_src;
@@ -1942,6 +1980,7 @@ tcp_signature_compute(struct mbuf *m, in
 		th = (struct tcphdr *)((u_char *)ip + sizeof(struct ip));
 		doff = sizeof(struct ip) + sizeof(struct tcphdr) + optlen;
 		break;
+#endif
 #ifdef INET6
 	/*
 	 * RFC 2385, 2.0  Proposal
@@ -2122,6 +2161,7 @@ sysctl_drop(SYSCTL_HANDLER_ARGS)
 			return (error);
 		break;
 #endif
+#ifdef INET
 	case AF_INET:
 		fin = (struct sockaddr_in *)&addrs[0];
 		lin = (struct sockaddr_in *)&addrs[1];
@@ -2129,6 +2169,7 @@ sysctl_drop(SYSCTL_HANDLER_ARGS)
 		    lin->sin_len != sizeof(struct sockaddr_in))
 			return (EINVAL);
 		break;
+#endif
 	default:
 		return (EINVAL);
 	}
@@ -2141,10 +2182,12 @@ sysctl_drop(SYSCTL_HANDLER_ARGS)
 		    NULL);
 		break;
 #endif
+#ifdef INET
 	case AF_INET:
 		inp = in_pcblookup_hash(&V_tcbinfo, fin->sin_addr,
 		    fin->sin_port, lin->sin_addr, lin->sin_port, 0, NULL);
 		break;
+#endif
 	}
 	if (inp != NULL) {
 		INP_WLOCK(inp);
@@ -2272,6 +2315,7 @@ tcp_log_addr(struct in_conninfo *inc, st
 		sp = s + strlen(s);
 		sprintf(sp, "]:%i", ntohs(th->th_dport));
 #endif /* INET6 */
+#ifdef INET
 	} else if (ip && th) {
 		inet_ntoa_r(ip->ip_src, sp);
 		sp = s + strlen(s);
@@ -2280,6 +2324,7 @@ tcp_log_addr(struct in_conninfo *inc, st
 		inet_ntoa_r(ip->ip_dst, sp);
 		sp = s + strlen(s);
 		sprintf(sp, "]:%i", ntohs(th->th_dport));
+#endif /* INET */
 	} else {
 		free(s, M_TCPLOG);
 		return (NULL);

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_syncache.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -742,8 +742,12 @@ syncache_socket(struct syncache *sc, str
 		/* Override flowlabel from in6_pcbconnect. */
 		inp->inp_flow &= ~IPV6_FLOWLABEL_MASK;
 		inp->inp_flow |= sc->sc_flowlabel;
-	} else
+	}
+#endif /* INET6 */
+#if defined(INET) && defined(INET6)
+	else
 #endif
+#ifdef INET
 	{
 		struct in_addr laddr;
 		struct sockaddr_in sin;
@@ -775,6 +779,7 @@ syncache_socket(struct syncache *sc, str
 			goto abort;
 		}
 	}
+#endif /* INET */
 	tp = intotcpcb(inp);
 	tp->t_state = TCPS_SYN_RECEIVED;
 	tp->iss = sc->sc_iss;
@@ -1067,7 +1072,11 @@ _syncache_add(struct in_conninfo *inc, s
 #ifdef INET6
 	if (!(inc->inc_flags & INC_ISIPV6))
 #endif
+#ifdef INET
 		ipopts = (m) ? ip_srcroute(m) : NULL;
+#else
+		ipopts = NULL;
+#endif
 
 	/*
 	 * See if we already have an entry for this connection.
@@ -1301,8 +1310,8 @@ syncache_respond(struct syncache *sc)
 {
 	struct ip *ip = NULL;
 	struct mbuf *m;
-	struct tcphdr *th;
-	int optlen, error;
+	struct tcphdr *th = NULL;
+	int optlen, error = 0;	/* Make compiler happy */
 	u_int16_t hlen, tlen, mssopt;
 	struct tcpopt to;
 #ifdef INET6
@@ -1350,8 +1359,12 @@ syncache_respond(struct syncache *sc)
 		ip6->ip6_flow |= sc->sc_flowlabel;
 
 		th = (struct tcphdr *)(ip6 + 1);
-	} else
+	}
 #endif
+#if defined(INET6) && defined(INET)
+	else
+#endif
+#ifdef INET
 	{
 		ip = mtod(m, struct ip *);
 		ip->ip_v = IPVERSION;
@@ -1378,6 +1391,7 @@ syncache_respond(struct syncache *sc)
 
 		th = (struct tcphdr *)(ip + 1);
 	}
+#endif /* INET */
 	th->th_sport = sc->sc_inc.inc_lport;
 	th->th_dport = sc->sc_inc.inc_fport;
 
@@ -1445,8 +1459,12 @@ syncache_respond(struct syncache *sc)
 				       tlen + optlen - hlen);
 		ip6->ip6_hlim = in6_selecthlim(NULL, NULL);
 		error = ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL);
-	} else
+	}
 #endif
+#if defined(INET6) && defined(INET)
+	else
+#endif
+#ifdef INET
 	{
 		th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		    htons(tlen + optlen - hlen + IPPROTO_TCP));
@@ -1454,6 +1472,7 @@ syncache_respond(struct syncache *sc)
 		m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
 		error = ip_output(m, sc->sc_ipopts, NULL, 0, NULL, NULL);
 	}
+#endif
 	return (error);
 }
 

Modified: head/sys/netinet/tcp_timewait.c
==============================================================================
--- head/sys/netinet/tcp_timewait.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_timewait.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -57,23 +57,19 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
 #ifdef INET6
 #include 
-#endif
-#include 
-#ifdef INET6
 #include 
-#endif
-#include 
-#include 
-#ifdef INET6
 #include 
 #include 
 #include 
 #endif
-#include 
 #include 
 #include 
 #include 
@@ -86,7 +82,9 @@ __FBSDID("$FreeBSD$");
 #ifdef TCPDEBUG
 #include 
 #endif
+#ifdef INET6
 #include 
+#endif
 
 #include 
 
@@ -202,15 +200,31 @@ tcp_twstart(struct tcpcb *tp)
 	struct inpcb *inp = tp->t_inpcb;
 	int acknow;
 	struct socket *so;
+#ifdef INET6
+	int isipv6 = inp->inp_inc.inc_flags & INC_ISIPV6;
+#endif
 
 	INP_INFO_WLOCK_ASSERT(&V_tcbinfo);	/* tcp_tw_2msl_reset(). */
 	INP_WLOCK_ASSERT(inp);
 
-	if (V_nolocaltimewait && in_localip(inp->inp_faddr)) {
-		tp = tcp_close(tp);
-		if (tp != NULL)
-			INP_WUNLOCK(inp);
-		return;
+	if (V_nolocaltimewait) {
+		int error = 0;
+#ifdef INET6
+		if (isipv6)
+			error = in6_localaddr(&inp->in6p_faddr);
+#endif
+#if defined(INET6) && defined(INET)
+		else
+#endif
+#ifdef INET
+			error = in_localip(inp->inp_faddr);
+#endif
+		if (error) {
+			tp = tcp_close(tp);
+			if (tp != NULL)
+				INP_WUNLOCK(inp);
+			return;
+		}
 	}
 
 	tw = uma_zalloc(V_tcptw_zone, M_NOWAIT);
@@ -488,11 +502,15 @@ int
 tcp_twrespond(struct tcptw *tw, int flags)
 {
 	struct inpcb *inp = tw->tw_inpcb;
-	struct tcphdr *th;
+#if defined(INET6) || defined(INET)
+	struct tcphdr *th = NULL;
+#endif
 	struct mbuf *m;
+#ifdef INET
 	struct ip *ip = NULL;
+#endif
 	u_int hdrlen, optlen;
-	int error;
+	int error = 0;			/* Keep compiler happy */
 	struct tcpopt to;
 #ifdef INET6
 	struct ip6_hdr *ip6 = NULL;
@@ -516,14 +534,19 @@ tcp_twrespond(struct tcptw *tw, int flag
 		ip6 = mtod(m, struct ip6_hdr *);
 		th = (struct tcphdr *)(ip6 + 1);
 		tcpip_fillheaders(inp, ip6, th);
-	} else
+	}
 #endif
+#if defined(INET6) && defined(INET)
+	else
+#endif
+#ifdef INET
 	{
 		hdrlen = sizeof(struct tcpiphdr);
 		ip = mtod(m, struct ip *);
 		th = (struct tcphdr *)(ip + 1);
 		tcpip_fillheaders(inp, ip, th);
 	}
+#endif
 	to.to_flags = 0;
 
 	/*
@@ -555,8 +578,12 @@ tcp_twrespond(struct tcptw *tw, int flag
 		ip6->ip6_hlim = in6_selecthlim(inp, NULL);
 		error = ip6_output(m, inp->in6p_outputopts, NULL,
 		    (tw->tw_so_options & SO_DONTROUTE), NULL, NULL, inp);
-	} else
+	}
 #endif
+#if defined(INET6) && defined(INET)
+	else
+#endif
+#ifdef INET
 	{
 		th->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		    htons(sizeof(struct tcphdr) + optlen + IPPROTO_TCP));
@@ -569,6 +596,7 @@ tcp_twrespond(struct tcptw *tw, int flag
 		    ((tw->tw_so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0),
 		    NULL, inp);
 	}
+#endif
 	if (flags & TH_ACK)
 		TCPSTAT_INC(tcps_sndacks);
 	else

Modified: head/sys/netinet/tcp_usrreq.c
==============================================================================
--- head/sys/netinet/tcp_usrreq.c	Sat Apr 30 11:18:16 2011	(r221249)
+++ head/sys/netinet/tcp_usrreq.c	Sat Apr 30 11:21:29 2011	(r221250)
@@ -64,17 +64,13 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
-#ifdef INET6

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:22: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 E111A1065680;
	Sat, 30 Apr 2011 11:22:30 +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 960CB8FC22;
	Sat, 30 Apr 2011 11:22: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 p3UBMUIw043536;
	Sat, 30 Apr 2011 11:22:30 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBMUdb043534;
	Sat, 30 Apr 2011 11:22:30 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201104301122.p3UBMUdb043534@svn.freebsd.org>
From: Michael Tuexen 
Date: Sat, 30 Apr 2011 11:22: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: r221251 - 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: Sat, 30 Apr 2011 11:22:31 -0000

Author: tuexen
Date: Sat Apr 30 11:22:30 2011
New Revision: 221251
URL: http://svn.freebsd.org/changeset/base/221251

Log:
  Remove some leftover debug code.
  
  MFC after: 1 week

Modified:
  head/sys/netinet/sctp_os_bsd.h

Modified: head/sys/netinet/sctp_os_bsd.h
==============================================================================
--- head/sys/netinet/sctp_os_bsd.h	Sat Apr 30 11:21:29 2011	(r221250)
+++ head/sys/netinet/sctp_os_bsd.h	Sat Apr 30 11:22:30 2011	(r221251)
@@ -39,9 +39,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_ipsec.h"
 #include "opt_compat.h"
 #include "opt_inet6.h"
-#if 1
 #include "opt_inet.h"
-#endif
 #include "opt_sctp.h"
 
 #include 

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:28: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 5C0D9106566B;
	Sat, 30 Apr 2011 11:28:22 +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 4B9BB8FC16;
	Sat, 30 Apr 2011 11:28: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 p3UBSMvb043741;
	Sat, 30 Apr 2011 11:28:22 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBSMSv043738;
	Sat, 30 Apr 2011 11:28:22 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301128.p3UBSMSv043738@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 11:28: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: r221252 - in head/sys/mips: atheros 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: Sat, 30 Apr 2011 11:28:22 -0000

Author: adrian
Date: Sat Apr 30 11:28:21 2011
New Revision: 221252
URL: http://svn.freebsd.org/changeset/base/221252

Log:
  In preparation for the AR724x PCIe bus code, make the AR71xx PCI bus
  glue require 'device ar71xx_pci' .
  
  Users of the AR71xx board configs will now require this for functioning
  PCI:
  
  device pci
  device ar71xx_pci

Modified:
  head/sys/mips/atheros/files.ar71xx
  head/sys/mips/conf/AR71XX

Modified: head/sys/mips/atheros/files.ar71xx
==============================================================================
--- head/sys/mips/atheros/files.ar71xx	Sat Apr 30 11:22:30 2011	(r221251)
+++ head/sys/mips/atheros/files.ar71xx	Sat Apr 30 11:28:21 2011	(r221252)
@@ -5,7 +5,7 @@ mips/atheros/ar71xx_gpio.c	optional gpio
 mips/atheros/ar71xx_machdep.c	standard
 mips/atheros/ar71xx_ehci.c	optional ehci
 mips/atheros/ar71xx_ohci.c	optional ohci
-mips/atheros/ar71xx_pci.c	optional pci
+mips/atheros/ar71xx_pci.c	optional ar71xx_pci pci
 mips/atheros/ar71xx_pci_bus_space.c	optional pci
 mips/atheros/ar71xx_spi.c	optional ar71xx_spi
 mips/atheros/pcf2123_rtc.c	optional pcf2123_rtc ar71xx_spi

Modified: head/sys/mips/conf/AR71XX
==============================================================================
--- head/sys/mips/conf/AR71XX	Sat Apr 30 11:22:30 2011	(r221251)
+++ head/sys/mips/conf/AR71XX	Sat Apr 30 11:28:21 2011	(r221252)
@@ -45,6 +45,7 @@ options		BOOTP_COMPAT
 options		ROOTDEVNAME=\"nfs:192.168.10.1:/mnt/bsd\"
 
 device		pci
+device		ar71xx_pci
 
 # Wireless NIC cards
 options		IEEE80211_DEBUG

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:30: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 037C410656B8;
	Sat, 30 Apr 2011 11:30:43 +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 E79C58FC08;
	Sat, 30 Apr 2011 11:30: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 p3UBUgJS043851;
	Sat, 30 Apr 2011 11:30:42 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBUght043849;
	Sat, 30 Apr 2011 11:30:42 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301130.p3UBUght043849@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 11:30: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: r221253 - 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: Sat, 30 Apr 2011 11:30:43 -0000

Author: adrian
Date: Sat Apr 30 11:30:42 2011
New Revision: 221253
URL: http://svn.freebsd.org/changeset/base/221253

Log:
  Add UPDATING entry for the AR71xx config changes

Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Sat Apr 30 11:28:21 2011	(r221252)
+++ head/UPDATING	Sat Apr 30 11:30:42 2011	(r221253)
@@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20110430:
+	Users of the Atheros AR71xx SoC code now need to add 'device ar71xx_pci'
+	into their kernel configurations along with 'device pci'.
+
 20110427:
 	The default NFS client is now the new NFS client, so fstype "newnfs"
 	is now "nfs" and the regular/old NFS client is now fstype "oldnfs".

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:36: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 73CC6106564A;
	Sat, 30 Apr 2011 11:36:16 +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 61F798FC18;
	Sat, 30 Apr 2011 11:36: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 p3UBaGdk044053;
	Sat, 30 Apr 2011 11:36:16 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBaGNp044050;
	Sat, 30 Apr 2011 11:36:16 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301136.p3UBaGNp044050@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 11:36: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: r221254 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 11:36:16 -0000

Author: adrian
Date: Sat Apr 30 11:36:16 2011
New Revision: 221254
URL: http://svn.freebsd.org/changeset/base/221254

Log:
  Add some initial PCIe bridge support for the AR724x chipsets.
  
  This is reported to work on the AR7240 based Ubiquiti Rocket M5
  but I haven't tested it on that hardware. I also don't yet have
  it fully working on the AR7242 based development board here;
  probe/attach functions but the register space resource looks like
  the endian-ness is wrong (0x10000000 instead of 0x00001000).o
  
  Further digging will be required.
  
  Submitted by:	Luiz Otavio O Souza

Added:
  head/sys/mips/atheros/ar724x_pci.c   (contents, props changed)
Modified:
  head/sys/mips/atheros/ar724xreg.h
  head/sys/mips/atheros/files.ar71xx

Added: head/sys/mips/atheros/ar724x_pci.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/mips/atheros/ar724x_pci.c	Sat Apr 30 11:36:16 2011	(r221254)
@@ -0,0 +1,613 @@
+/*-
+ * Copyright (c) 2009, Oleksandr Tymoshenko 
+ * Copyright (c) 2011, Luiz Otavio O Souza.
+ * 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 unmodified, 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.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include "pcib_if.h"
+
+#include 
+#include 
+#include 
+#include 		/* XXX */
+#include 	/* XXX */
+
+#include 
+
+#define	AR724X_PCI_DEBUG
+#ifdef AR724X_PCI_DEBUG
+#define dprintf printf
+#else
+#define dprintf(x, arg...)
+#endif
+
+struct ar71xx_pci_softc {
+	device_t		sc_dev;
+
+	int			sc_busno;
+	struct rman		sc_mem_rman;
+	struct rman		sc_irq_rman;
+
+	struct intr_event	*sc_eventstab[AR71XX_PCI_NIRQS];	
+	mips_intrcnt_t		sc_intr_counter[AR71XX_PCI_NIRQS];	
+	struct resource		*sc_irq;
+	void			*sc_ih;
+};
+
+static int ar724x_pci_setup_intr(device_t, device_t, struct resource *, int, 
+		    driver_filter_t *, driver_intr_t *, void *, void **);
+static int ar724x_pci_teardown_intr(device_t, device_t, struct resource *,
+		    void *);
+static int ar724x_pci_intr(void *);
+
+static void
+ar724x_pci_write(uint32_t reg, uint32_t offset, uint32_t data, int bytes)
+{
+	uint32_t val, mask, shift;
+
+	/* Register access is 32-bit aligned */
+	shift = 8 * (offset & (bytes % 4));
+	if (bytes % 4)
+		mask = (1 << (bytes * 8)) - 1;
+	else
+		mask = 0xffffffff;
+
+	val = ATH_READ_REG(reg + (offset & ~3));
+	val &= ~(mask << shift);
+	val |= ((data & mask) << shift);
+	ATH_WRITE_REG(reg + (offset & ~3), val);
+
+	dprintf("%s: %#x/%#x addr=%#x, data=%#x(%#x), bytes=%d\n", __func__, 
+	    reg, reg + (offset & ~3), offset, data, val, bytes);
+}
+
+static uint32_t
+ar724x_pci_read_config(device_t dev, u_int bus, u_int slot, u_int func, 
+    u_int reg, int bytes)
+{
+	uint32_t cmd, data, shift, mask;
+
+	/* Register access is 32-bit aligned */
+	shift = (reg & 3) * 8;
+	if (shift)
+		mask = (1 << shift) - 1;
+	else
+		mask = 0xffffffff;
+
+	dprintf("%s: tag (%x, %x, %x) reg %d(%d)\n", __func__, bus, slot,
+	    func, reg, bytes);
+
+	if ((bus == 0) && (slot == 0) && (func == 0)) {
+		data = ATH_READ_REG(AR724X_PCI_CFG_BASE + (reg & ~3));
+		/*
+		 * WAR for BAR issue - We are unable to access the PCI device
+		 * space if we set the BAR with proper base address.
+		 */
+		if (reg == PCIR_BAR(0) && bytes == 4) {
+			cmd = (ar71xx_soc == AR71XX_SOC_AR7240) ?
+			    0xffff : 0x1000ffff;
+			ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, cmd, bytes);
+		}
+	} else
+		data = -1;
+
+	/* Get request bytes from 32-bit word */
+	data = (data >> shift) & mask;
+
+	dprintf("%s: read 0x%x\n", __func__, data);
+
+	return (data);
+}
+
+static void
+ar724x_pci_write_config(device_t dev, u_int bus, u_int slot, u_int func, 
+    u_int reg, uint32_t data, int bytes)
+{
+
+	dprintf("%s: tag (%x, %x, %x) reg %d(%d): %x\n", __func__, bus, slot, 
+	    func, reg, bytes, data);
+
+	if ((bus != 0) || (slot != 0) || (func != 0))
+		return;
+
+	ar724x_pci_write(AR724X_PCI_CFG_BASE, reg, data, bytes);
+	/*
+	 * WAR for BAR issue - We are unable to access the PCI device space
+	 * if we set the BAR with proper base address.
+	 * Force a flush here (at register writing).
+	 */
+	if (reg == PCIR_BAR(0) && bytes == 4)
+		(void)ar724x_pci_read_config(dev, bus, slot, func, reg, bytes);
+}
+
+static void 
+ar724x_pci_mask_irq(void *source)
+{
+	uint32_t reg;
+	unsigned int irq = (unsigned int)source;
+
+	/* XXX - Only one interrupt ? Only one device ? */
+	if (irq != AR71XX_PCI_IRQ_START)
+		return;
+
+	/* Update the interrupt mask reg */
+	reg = ATH_READ_REG(AR724X_PCI_INTR_MASK);
+	ATH_WRITE_REG(AR724X_PCI_INTR_MASK,
+	    reg & ~AR724X_PCI_INTR_DEV0);
+
+	/* Clear any pending interrupt */
+	reg = ATH_READ_REG(AR724X_PCI_INTR_STATUS);
+	ATH_WRITE_REG(AR724X_PCI_INTR_STATUS,
+	    reg | AR724X_PCI_INTR_DEV0);
+}
+
+static void 
+ar724x_pci_unmask_irq(void *source)
+{
+	uint32_t reg;
+	unsigned int irq = (unsigned int)source;
+
+	/* XXX */
+	if (irq != AR71XX_PCI_IRQ_START)
+		return;
+
+	/* Update the interrupt mask reg */
+	reg = ATH_READ_REG(AR724X_PCI_INTR_MASK);
+	ATH_WRITE_REG(AR724X_PCI_INTR_MASK,
+	    reg | AR724X_PCI_INTR_DEV0);
+}
+
+static int
+ar724x_pci_setup(device_t dev)
+{
+	uint32_t reg;
+
+	/* setup COMMAND register */
+	reg = PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN | PCIM_CMD_SERRESPEN |
+	    PCIM_CMD_BACKTOBACK | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN;
+
+	ar724x_pci_write(AR724X_PCI_CRP_BASE, PCIR_COMMAND, reg, 2);
+	ar724x_pci_write(AR724X_PCI_CRP_BASE, 0x20, 0x1ff01000, 4);
+	ar724x_pci_write(AR724X_PCI_CRP_BASE, 0x24, 0x1ff01000, 4);
+
+	reg = ATH_READ_REG(AR724X_PCI_RESET);
+	if (reg != 0x7) {
+		DELAY(100000);
+		ATH_WRITE_REG(AR724X_PCI_RESET, 0);
+		DELAY(100);
+		ATH_WRITE_REG(AR724X_PCI_RESET, 4);
+		DELAY(100000);
+	}
+
+	if (ar71xx_soc == AR71XX_SOC_AR7240)
+		reg = AR724X_PCI_APP_LTSSM_ENABLE;
+	else
+		reg = 0x1ffc1;
+	ATH_WRITE_REG(AR724X_PCI_APP, reg);
+	DELAY(1000);
+
+	reg = ATH_READ_REG(AR724X_PCI_RESET);
+	if ((reg & AR724X_PCI_RESET_LINK_UP) == 0) {
+		device_printf(dev, "no PCIe controller found\n");
+		return (ENXIO);
+	}
+
+	if (ar71xx_soc == AR71XX_SOC_AR7241 ||
+	    ar71xx_soc == AR71XX_SOC_AR7242) {
+		reg = ATH_READ_REG(AR724X_PCI_APP);
+		reg |= (1 << 16);
+		ATH_WRITE_REG(AR724X_PCI_APP, reg);
+	}
+
+	return (0);
+}
+
+#define	AR5416_EEPROM_MAGIC		0xa55a
+
+/*
+ * XXX - This should not be here ! And this looks like Atheros (if_ath) only.
+ */
+static void
+ar724x_load_eeprom_data(device_t dev)
+{
+	uint32_t	bar0, hint, reg, val;
+	uint16_t	*data = NULL;
+
+	/* Search for a hint of eeprom data offset */
+	if (resource_int_value(device_get_name(dev),
+	    device_get_unit(dev), "eepromdata", &hint) != 0)
+		return;
+
+	device_printf(dev, "Loading the eeprom fixup data from %#x\n", hint);
+	data = (uint16_t *)MIPS_PHYS_TO_KSEG1(hint);
+
+	if (*data != AR5416_EEPROM_MAGIC) {
+		device_printf(dev, "Invalid calibration data from %#x\n", hint);
+		return;
+	}
+
+	/* Save bar(0) address - just to flush bar(0) (SoC WAR) ? */
+	bar0 = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_BAR(0), 4);
+
+	val = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_COMMAND, 2);
+	val |= (PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN);
+	ar724x_pci_write_config(dev, 0, 0, 0, PCIR_COMMAND, val, 2); 
+
+	/* set pointer to first reg address */
+	data += 3;
+	while (*data != 0xffff) {
+		reg = *data++;
+		val = *data++;
+		val |= (*data++) << 16;
+
+		/* Write eeprom fixup data to device memory */
+		ATH_WRITE_REG(AR71XX_PCI_MEM_BASE + reg, val);
+		DELAY(100);
+	}
+
+	val = ar724x_pci_read_config(dev, 0, 0, 0, PCIR_COMMAND, 2);
+	val &= ~(PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN);
+	ar724x_pci_write_config(dev, 0, 0, 0, PCIR_COMMAND, val, 2); 
+
+	/* Write the saved bar(0) address */
+	ar724x_pci_write_config(dev, 0, 0, 0, PCIR_BAR(0), bar0, 4);
+}
+
+#undef	AR5416_EEPROM_MAGIC
+
+static int
+ar724x_pci_probe(device_t dev)
+{
+
+	return (0);
+}
+
+static int
+ar724x_pci_attach(device_t dev)
+{
+	struct ar71xx_pci_softc *sc = device_get_softc(dev);
+	int busno = 0;
+	int rid = 0;
+
+	sc->sc_mem_rman.rm_type = RMAN_ARRAY;
+	sc->sc_mem_rman.rm_descr = "ar724x PCI memory window";
+	if (rman_init(&sc->sc_mem_rman) != 0 || 
+	    rman_manage_region(&sc->sc_mem_rman, AR71XX_PCI_MEM_BASE, 
+		AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE - 1) != 0) {
+		panic("ar724x_pci_attach: failed to set up I/O rman");
+	}
+
+	sc->sc_irq_rman.rm_type = RMAN_ARRAY;
+	sc->sc_irq_rman.rm_descr = "ar724x PCI IRQs";
+	if (rman_init(&sc->sc_irq_rman) != 0 ||
+	    rman_manage_region(&sc->sc_irq_rman, AR71XX_PCI_IRQ_START, 
+	        AR71XX_PCI_IRQ_END) != 0)
+		panic("ar724x_pci_attach: failed to set up IRQ rman");
+
+	/* Disable interrupts */
+	ATH_WRITE_REG(AR724X_PCI_INTR_STATUS, 0);
+	ATH_WRITE_REG(AR724X_PCI_INTR_MASK, 0);
+
+	/* Hook up our interrupt handler. */
+	if ((sc->sc_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+	    RF_SHAREABLE | RF_ACTIVE)) == NULL) {
+		device_printf(dev, "unable to allocate IRQ resource\n");
+		return (ENXIO);
+	}
+
+	if ((bus_setup_intr(dev, sc->sc_irq, INTR_TYPE_MISC,
+			    ar724x_pci_intr, NULL, sc, &sc->sc_ih))) {
+		device_printf(dev, 
+		    "WARNING: unable to register interrupt handler\n");
+		return (ENXIO);
+	}
+
+	/* Reset PCIe core and PCIe PHY */
+	ar71xx_device_stop(AR724X_RESET_PCIE);
+	ar71xx_device_stop(AR724X_RESET_PCIE_PHY);
+	ar71xx_device_stop(AR724X_RESET_PCIE_PHY_SERIAL);
+	DELAY(100);
+
+	ar71xx_device_start(AR724X_RESET_PCIE_PHY_SERIAL);
+	DELAY(100);
+	ar71xx_device_start(AR724X_RESET_PCIE_PHY);
+	ar71xx_device_start(AR724X_RESET_PCIE);
+
+	if (ar724x_pci_setup(dev))
+		return (ENXIO);
+
+	/* XXX - Load eeprom fixup data */
+	ar724x_load_eeprom_data(dev);
+
+	/* Fixup internal PCI bridge */
+	ar724x_pci_write_config(dev, 0, 0, 0, PCIR_COMMAND, 
+            PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN 
+	    | PCIM_CMD_SERRESPEN | PCIM_CMD_BACKTOBACK
+	    | PCIM_CMD_PERRESPEN | PCIM_CMD_MWRICEN, 2);
+
+	device_add_child(dev, "pci", busno);
+	return (bus_generic_attach(dev));
+}
+
+static int
+ar724x_pci_read_ivar(device_t dev, device_t child, int which, uintptr_t *result)
+{
+	struct ar71xx_pci_softc *sc = device_get_softc(dev);
+
+	switch (which) {
+	case PCIB_IVAR_DOMAIN:
+		*result = 0;
+		return (0);
+	case PCIB_IVAR_BUS:
+		*result = sc->sc_busno;
+		return (0);
+	}
+
+	return (ENOENT);
+}
+
+static int
+ar724x_pci_write_ivar(device_t dev, device_t child, int which, uintptr_t result)
+{
+	struct ar71xx_pci_softc * sc = device_get_softc(dev);
+
+	switch (which) {
+	case PCIB_IVAR_BUS:
+		sc->sc_busno = result;
+		return (0);
+	}
+
+	return (ENOENT);
+}
+
+static struct resource *
+ar724x_pci_alloc_resource(device_t bus, device_t child, int type, int *rid,
+    u_long start, u_long end, u_long count, u_int flags)
+{
+	struct ar71xx_pci_softc *sc = device_get_softc(bus);	
+	struct resource *rv;
+	struct rman *rm;
+
+	switch (type) {
+	case SYS_RES_IRQ:
+		rm = &sc->sc_irq_rman;
+		break;
+	case SYS_RES_MEMORY:
+		rm = &sc->sc_mem_rman;
+		break;
+	default:
+		return (NULL);
+	}
+
+	rv = rman_reserve_resource(rm, start, end, count, flags, child);
+
+	if (rv == NULL)
+		return (NULL);
+
+	rman_set_rid(rv, *rid);
+
+	if (flags & RF_ACTIVE) {
+		if (bus_activate_resource(child, type, *rid, rv)) {
+			rman_release_resource(rv);
+			return (NULL);
+		}
+	} 
+
+
+	return (rv);
+}
+
+static int
+ar724x_pci_activate_resource(device_t bus, device_t child, int type, int rid,
+    struct resource *r)
+{
+	int res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus),
+	    child, type, rid, r));
+
+	if (!res) {
+		switch(type) {
+		case SYS_RES_MEMORY:
+		case SYS_RES_IOPORT:
+
+			/* XXX */
+			//rman_set_bustag(r, ar71xx_bus_space_pcimem);
+			//rman_set_bustag(r, mips_bus_space_generic);
+			rman_set_bustag(r, ar71xx_bus_space_reversed);
+			break;
+		}
+	}
+
+	return (res);
+}
+
+static int
+ar724x_pci_setup_intr(device_t bus, device_t child, struct resource *ires,
+		int flags, driver_filter_t *filt, driver_intr_t *handler,
+		void *arg, void **cookiep)
+{
+	struct ar71xx_pci_softc *sc = device_get_softc(bus);
+	struct intr_event *event;
+	int irq, error;
+
+	irq = rman_get_start(ires);
+	if (irq > AR71XX_PCI_IRQ_END)
+		panic("%s: bad irq %d", __func__, irq);
+
+	event = sc->sc_eventstab[irq];
+	if (event == NULL) {
+		error = intr_event_create(&event, (void *)irq, 0, irq, 
+		    ar724x_pci_mask_irq, ar724x_pci_unmask_irq, NULL, NULL,
+		    "pci intr%d:", irq);
+
+		if (error == 0) {
+			sc->sc_eventstab[irq] = event;
+			sc->sc_intr_counter[irq] =
+			    mips_intrcnt_create(event->ie_name);
+		}
+		else
+			return error;
+	}
+
+	intr_event_add_handler(event, device_get_nameunit(child), filt,
+	    handler, arg, intr_priority(flags), flags, cookiep);
+	mips_intrcnt_setname(sc->sc_intr_counter[irq], event->ie_fullname);
+
+	ar724x_pci_unmask_irq((void*)irq);
+
+	return (0);
+}
+
+static int
+ar724x_pci_teardown_intr(device_t dev, device_t child, struct resource *ires,
+    void *cookie)
+{
+	struct ar71xx_pci_softc *sc = device_get_softc(dev);
+	int irq, result;
+
+	irq = rman_get_start(ires);
+	if (irq > AR71XX_PCI_IRQ_END)
+		panic("%s: bad irq %d", __func__, irq);
+
+	if (sc->sc_eventstab[irq] == NULL)
+		panic("Trying to teardown unoccupied IRQ");
+
+	ar724x_pci_mask_irq((void*)irq);
+
+	result = intr_event_remove_handler(cookie);
+	if (!result)
+		sc->sc_eventstab[irq] = NULL;
+
+	return (result);
+}
+
+static int
+ar724x_pci_intr(void *arg)
+{
+	struct ar71xx_pci_softc *sc = arg;
+	struct intr_event *event;
+	uint32_t reg, irq, mask;
+
+	ar71xx_device_ddr_flush_ip2();
+
+	reg = ATH_READ_REG(AR724X_PCI_INTR_STATUS);
+	mask = ATH_READ_REG(AR724X_PCI_INTR_MASK);
+	/*
+	 * Handle only unmasked interrupts
+	 */
+	reg &= mask;
+	if (reg & AR724X_PCI_INTR_DEV0) {
+
+		irq = AR71XX_PCI_IRQ_START;
+		event = sc->sc_eventstab[irq];
+		if (!event || TAILQ_EMPTY(&event->ie_handlers)) {
+			printf("Stray IRQ %d\n", irq);
+			return (FILTER_STRAY);
+		}
+
+		/* TODO: frame instead of NULL? */
+		intr_event_handle(event, NULL);
+		mips_intrcnt_inc(sc->sc_intr_counter[irq]);
+	}
+
+	return (FILTER_HANDLED);
+}
+
+static int
+ar724x_pci_maxslots(device_t dev)
+{
+
+	return (PCI_SLOTMAX);
+}
+
+static int
+ar724x_pci_route_interrupt(device_t pcib, device_t device, int pin)
+{
+
+	return (pci_get_slot(device));
+}
+
+static device_method_t ar724x_pci_methods[] = {
+	/* Device interface */
+	DEVMETHOD(device_probe,		ar724x_pci_probe),
+	DEVMETHOD(device_attach,	ar724x_pci_attach),
+	DEVMETHOD(device_shutdown,	bus_generic_shutdown),
+	DEVMETHOD(device_suspend,	bus_generic_suspend),
+	DEVMETHOD(device_resume,	bus_generic_resume),
+
+	/* Bus interface */
+	DEVMETHOD(bus_print_child,	bus_generic_print_child),
+	DEVMETHOD(bus_read_ivar,	ar724x_pci_read_ivar),
+	DEVMETHOD(bus_write_ivar,	ar724x_pci_write_ivar),
+	DEVMETHOD(bus_alloc_resource,	ar724x_pci_alloc_resource),
+	DEVMETHOD(bus_release_resource,	bus_generic_release_resource),
+	DEVMETHOD(bus_activate_resource, ar724x_pci_activate_resource),
+	DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+	DEVMETHOD(bus_setup_intr,	ar724x_pci_setup_intr),
+	DEVMETHOD(bus_teardown_intr,	ar724x_pci_teardown_intr),
+
+	/* pcib interface */
+	DEVMETHOD(pcib_maxslots,	ar724x_pci_maxslots),
+	DEVMETHOD(pcib_read_config,	ar724x_pci_read_config),
+	DEVMETHOD(pcib_write_config,	ar724x_pci_write_config),
+	DEVMETHOD(pcib_route_interrupt,	ar724x_pci_route_interrupt),
+
+	{0, 0}
+};
+
+static driver_t ar724x_pci_driver = {
+	"pcib",
+	ar724x_pci_methods,
+	sizeof(struct ar71xx_pci_softc),
+};
+
+static devclass_t ar724x_pci_devclass;
+
+DRIVER_MODULE(ar724x_pci, nexus, ar724x_pci_driver, ar724x_pci_devclass, 0, 0);

Modified: head/sys/mips/atheros/ar724xreg.h
==============================================================================
--- head/sys/mips/atheros/ar724xreg.h	Sat Apr 30 11:30:42 2011	(r221253)
+++ head/sys/mips/atheros/ar724xreg.h	Sat Apr 30 11:36:16 2011	(r221254)
@@ -49,24 +49,44 @@
 
 #define	AR724X_DDR_REG_FLUSH_GE0	(AR71XX_DDR_CONFIG + 0x7c)
 #define	AR724X_DDR_REG_FLUSH_GE1	(AR71XX_DDR_CONFIG + 0x80)
+#define	AR724X_DDR_REG_FLUSH_USB	(AR71XX_DDR_CONFIG + 0x84)
+#define	AR724X_DDR_REG_FLUSH_PCIE	(AR71XX_DDR_CONFIG + 0x88)
 
 #define	AR724X_RESET_REG_RESET_MODULE	AR71XX_RST_BLOCK_BASE + 0x1c
 #define	AR724X_RESET_USB_HOST			(1 << 5)
 #define	AR724X_RESET_USB_PHY			(1 << 4)
 #define	AR724X_RESET_MODULE_USB_OHCI_DLL	(1 << 3)
 
+#define	AR724X_RESET_GE1_MDIO			(1 << 23)
+#define	AR724X_RESET_GE0_MDIO			(1 << 22)
+#define	AR724X_RESET_PCIE_PHY_SERIAL		(1 << 10)
+#define	AR724X_RESET_PCIE_PHY			(1 << 7)
+#define	AR724X_RESET_PCIE			(1 << 6)
+#define	AR724X_RESET_USB_HOST			(1 << 5)
+#define	AR724X_RESET_USB_PHY			(1 << 4)
+#define	AR724X_RESET_USBSUS_OVERRIDE		(1 << 3)
+
 /* XXX so USB requires different init code? -adrian */
 #define	AR7240_OHCI_BASE		0x1b000000
 #define	AR7240_OHCI_SIZE		0x01000000
-#define	AR724X_DDR_REG_FLUSH_USB	(AR71XX_DDR_CONFIG + 0x84)
-#define	AR724X_DDR_REG_FLUSH_PCIE	(AR71XX_DDR_CONFIG + 0x88)
 
 #define	AR724X_PCI_CRP_BASE		(AR71XX_APB_BASE + 0x000C0000)
 #define	AR724X_PCI_CRP_SIZE		0x100
+#define	AR724X_PCI_CFG_BASE		0x14000000
+#define	AR724X_PCI_CFG_SIZE		0x1000
 
 #define	AR724X_PCI_CTRL_BASE		(AR71XX_APB_BASE + 0x000F0000)
 #define	AR724X_PCI_CTRL_SIZE		0x100
 
+/* PCI config registers */
+#define	AR724X_PCI_APP			0x180f0000
+#define	AR724X_PCI_APP_LTSSM_ENABLE	(1 << 0)
+#define	AR724X_PCI_RESET		0x180f0018
+#define	AR724X_PCI_RESET_LINK_UP	(1 << 0)
+#define	AR724X_PCI_INTR_STATUS		0x180f004c
+#define	AR724X_PCI_INTR_MASK		0x180f0050
+#define	AR724X_PCI_INTR_DEV0		(1 << 14)
+
 #define	AR724X_GPIO_FUNC_GE0_MII_CLK_EN		(1 >> 19)
 #define	AR724X_GPIO_FUNC_SPI_EN			(1 >> 18)
 #define	AR724X_GPIO_FUNC_SPI_CS_EN2		(1 >> 14)

Modified: head/sys/mips/atheros/files.ar71xx
==============================================================================
--- head/sys/mips/atheros/files.ar71xx	Sat Apr 30 11:30:42 2011	(r221253)
+++ head/sys/mips/atheros/files.ar71xx	Sat Apr 30 11:36:16 2011	(r221254)
@@ -6,6 +6,7 @@ mips/atheros/ar71xx_machdep.c	standard
 mips/atheros/ar71xx_ehci.c	optional ehci
 mips/atheros/ar71xx_ohci.c	optional ohci
 mips/atheros/ar71xx_pci.c	optional ar71xx_pci pci
+mips/atheros/ar724x_pci.c	optional ar724x_pci pci
 mips/atheros/ar71xx_pci_bus_space.c	optional pci
 mips/atheros/ar71xx_spi.c	optional ar71xx_spi
 mips/atheros/pcf2123_rtc.c	optional pcf2123_rtc ar71xx_spi

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:40: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 5093D106564A;
	Sat, 30 Apr 2011 11:40:32 +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 408198FC0C;
	Sat, 30 Apr 2011 11:40: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 p3UBeW1R044210;
	Sat, 30 Apr 2011 11:40:32 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBeWKR044208;
	Sat, 30 Apr 2011 11:40:32 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301140.p3UBeWKR044208@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 11:40: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: r221255 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 11:40:32 -0000

Author: adrian
Date: Sat Apr 30 11:40:31 2011
New Revision: 221255
URL: http://svn.freebsd.org/changeset/base/221255

Log:
  Flip off debugging for now.

Modified:
  head/sys/mips/atheros/ar724x_pci.c

Modified: head/sys/mips/atheros/ar724x_pci.c
==============================================================================
--- head/sys/mips/atheros/ar724x_pci.c	Sat Apr 30 11:36:16 2011	(r221254)
+++ head/sys/mips/atheros/ar724x_pci.c	Sat Apr 30 11:40:31 2011	(r221255)
@@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#define	AR724X_PCI_DEBUG
+#undef	AR724X_PCI_DEBUG
 #ifdef AR724X_PCI_DEBUG
 #define dprintf printf
 #else

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 11:56: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 21BA5106564A;
	Sat, 30 Apr 2011 11:56: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 115F88FC14;
	Sat, 30 Apr 2011 11:56: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 p3UBu4lN044691;
	Sat, 30 Apr 2011 11:56:04 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UBu49l044689;
	Sat, 30 Apr 2011 11:56:04 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301156.p3UBu49l044689@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 11:56: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: r221256 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 11:56:05 -0000

Author: adrian
Date: Sat Apr 30 11:56:04 2011
New Revision: 221256
URL: http://svn.freebsd.org/changeset/base/221256

Log:
  Call the DDR FIFO flush method when IP2 interrupts occur.

Modified:
  head/sys/mips/atheros/ar71xx_pci.c

Modified: head/sys/mips/atheros/ar71xx_pci.c
==============================================================================
--- head/sys/mips/atheros/ar71xx_pci.c	Sat Apr 30 11:40:31 2011	(r221255)
+++ head/sys/mips/atheros/ar71xx_pci.c	Sat Apr 30 11:56:04 2011	(r221256)
@@ -500,6 +500,9 @@ ar71xx_pci_intr(void *arg)
 				continue;
 			}
 
+			/* Flush DDR FIFO for IP2 */
+			ar71xx_device_ddr_flush_ip2();
+
 			/* TODO: frame instead of NULL? */
 			intr_event_handle(event, NULL);
 			mips_intrcnt_inc(sc->sc_intr_counter[irq]);

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 12:07: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 1DAB2106566C;
	Sat, 30 Apr 2011 12:07:16 +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 0D3328FC0A;
	Sat, 30 Apr 2011 12:07: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 p3UC7Fli045047;
	Sat, 30 Apr 2011 12:07:15 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UC7FEr045045;
	Sat, 30 Apr 2011 12:07:15 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301207.p3UC7FEr045045@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 12:07: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: r221257 - head/sys/mips/atheros
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 12:07:16 -0000

Author: adrian
Date: Sat Apr 30 12:07:15 2011
New Revision: 221257
URL: http://svn.freebsd.org/changeset/base/221257

Log:
  The AR724x SoC's require the irq status line to be acked/cleared.
  
  This allows console IO to occur correctly once the kernel is in multi-user
  mode.
  
  Submitted by:	Luiz Otavio O Souza

Modified:
  head/sys/mips/atheros/apb.c

Modified: head/sys/mips/atheros/apb.c
==============================================================================
--- head/sys/mips/atheros/apb.c	Sat Apr 30 11:56:04 2011	(r221256)
+++ head/sys/mips/atheros/apb.c	Sat Apr 30 12:07:15 2011	(r221257)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 
 #undef APB_DEBUG
 #ifdef APB_DEBUG
@@ -337,6 +338,20 @@ apb_intr(void *arg)
 	reg = ATH_READ_REG(AR71XX_MISC_INTR_STATUS);
 	for (irq = 0; irq < APB_NIRQS; irq++) {
 		if (reg & (1 << irq)) {
+
+			switch (ar71xx_soc) {
+			case AR71XX_SOC_AR7240:
+			case AR71XX_SOC_AR7241:
+			case AR71XX_SOC_AR7242:
+				/* Ack/clear the irq on status register for AR724x */
+				ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS,
+				    reg & ~(1 << irq));
+				break;
+			default:
+				/* fallthrough */
+				break;
+			}
+
 			event = sc->sc_eventstab[irq];
 			if (!event || TAILQ_EMPTY(&event->ie_handlers)) {
 				/* Ignore timer interrupts */

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 12:07: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 663A81065742;
	Sat, 30 Apr 2011 12:07:31 +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 55BBD8FC0A;
	Sat, 30 Apr 2011 12:07: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 p3UC7Vce045090;
	Sat, 30 Apr 2011 12:07:31 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UC7V9Y045088;
	Sat, 30 Apr 2011 12:07:31 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301207.p3UC7V9Y045088@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 12:07: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: r221258 - 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: Sat, 30 Apr 2011 12:07:31 -0000

Author: bz
Date: Sat Apr 30 12:07:31 2011
New Revision: 221258
URL: http://svn.freebsd.org/changeset/base/221258

Log:
  Add some more missing optional dependencies on inet6, not only inet,
  to get the files for an IPv6 only kernel as well, remove extra inet6
  option where not needed.
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Apr 30 12:07:15 2011	(r221257)
+++ head/sys/conf/files	Sat Apr 30 12:07:31 2011	(r221258)
@@ -2516,7 +2516,7 @@ net/bpf_jitter.c		optional bpf_jitter
 net/bpf_filter.c		optional bpf | netgraph_bpf
 net/bpf_zerocopy.c		optional bpf
 net/bridgestp.c			optional bridge | if_bridge
-net/flowtable.c			optional flowtable inet
+net/flowtable.c			optional flowtable inet | flowtable inet6
 net/ieee8023ad_lacp.c		optional lagg
 net/if.c			standard
 net/if_arcsubr.c		optional arcnet
@@ -2736,10 +2736,10 @@ netinet/ipfw/ip_fw_nat.c	optional inet i
 netinet/ip_icmp.c		optional inet | inet6
 netinet/ip_input.c		optional inet
 netinet/ip_ipsec.c		optional inet ipsec
-netinet/ip_mroute.c		optional mrouting inet | mrouting inet6
+netinet/ip_mroute.c		optional mrouting inet
 netinet/ip_options.c		optional inet
 netinet/ip_output.c		optional inet
-netinet/raw_ip.c		optional inet
+netinet/raw_ip.c		optional inet | inet6
 netinet/cc/cc.c			optional inet | inet6
 netinet/cc/cc_newreno.c		optional inet | inet6
 netinet/sctp_asconf.c		optional inet sctp
@@ -3207,7 +3207,7 @@ security/mac/mac_atalk.c	optional mac ne
 security/mac/mac_audit.c	optional mac audit
 security/mac/mac_cred.c		optional mac
 security/mac/mac_framework.c	optional mac
-security/mac/mac_inet.c		optional mac inet
+security/mac/mac_inet.c		optional mac inet | inet6
 security/mac/mac_inet6.c	optional mac inet6
 security/mac/mac_label.c	optional mac
 security/mac/mac_net.c		optional mac

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 12:22: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 08DEA106564A;
	Sat, 30 Apr 2011 12:22:39 +0000 (UTC)
	(envelope-from rmacklem@uoguelph.ca)
Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca
	[131.104.91.36])
	by mx1.freebsd.org (Postfix) with ESMTP id 7EE3F8FC13;
	Sat, 30 Apr 2011 12:22:38 +0000 (UTC)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApwEAJX+u02DaFvO/2dsb2JhbACEUaI9iHGpRZAlgSqDVYEBBI55hnyHQg
X-IronPort-AV: E=Sophos;i="4.64,292,1301889600"; d="scan'208";a="119171608"
Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca)
	([131.104.91.206])
	by esa-annu-pri.mail.uoguelph.ca with ESMTP; 30 Apr 2011 08:22:37 -0400
Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1])
	by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 90C1AB3F22;
	Sat, 30 Apr 2011 08:22:37 -0400 (EDT)
Date: Sat, 30 Apr 2011 08:22:37 -0400 (EDT)
From: Rick Macklem 
To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
Message-ID: <738601084.807794.1304166157585.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <86y62sfsil.fsf@ds4.des.no>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Originating-IP: [172.17.91.201]
X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE7 (Win)/6.0.10_GA_2692)
Cc: svn-src-head@freebsd.org, Rick Macklem ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs
 sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf sys/nfsclient
 sys/pc98/conf sys/powerpc/conf sys/sparc64/conf sys/sun4v/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: Sat, 30 Apr 2011 12:22:39 -0000

> Rick Macklem  writes:
> > Log:
> >   This patch changes head so that the default NFS client is now the
> >   new
> >   NFS client (which I guess is no longer experimental). The fstype
> >   "newnfs"
> >   is now "nfs" and the regular/old NFS client is now fstype
> >   "oldnfs".
> 
> Are you going to rename the sysctls as well?
> 
I was not planning on it, but it the "collective" thinks it's a good
idea, I could do so.

For the new NFS, the sysctls all live under vfs.newnfs (a lot of the
code is shared between client and server, so it would be difficult to
separate them out). Ones that are common with the old NFS use the
same names, but there are also a bunch of new ones that have different
names.

rick

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 12:25: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 6FA71106566B;
	Sat, 30 Apr 2011 12:25: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 5274A8FC20;
	Sat, 30 Apr 2011 12:25: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 p3UCPABh045687;
	Sat, 30 Apr 2011 12:25:10 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UCPAlL045685;
	Sat, 30 Apr 2011 12:25:10 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201104301225.p3UCPAlL045685@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 30 Apr 2011 12:25: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: r221259 - head/sys/mips/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: Sat, 30 Apr 2011 12:25:10 -0000

Author: adrian
Date: Sat Apr 30 12:25:09 2011
New Revision: 221259
URL: http://svn.freebsd.org/changeset/base/221259

Log:
  An example configuration file for the Atheros PB92.
  
  TODO:
  
  * pcie doesn't yet work properly, I'm working on it.
  * if_arge doesn't work - it's likely the phy mask is wrong; again I'm working on it.

Added:
  head/sys/mips/conf/PB92   (contents, props changed)
  head/sys/mips/conf/PB92.hints   (contents, props changed)

Added: head/sys/mips/conf/PB92
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/mips/conf/PB92	Sat Apr 30 12:25:09 2011	(r221259)
@@ -0,0 +1,100 @@
+#
+# PB92 -- Kernel configuration file for FreeBSD/mips for Atheros PB92 reference
+#         board (AR7242)
+#
+# $FreeBSD$
+#
+
+ident		PB92
+makeoptions	KERNLOADADDR=0x80050000
+options		HZ=1000
+
+hints		"PB92.hints"
+include		"../atheros/std.ar71xx"
+
+makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
+makeoptions	MODULES_OVERRIDE=""
+
+options		DDB
+options		KDB
+
+options		SCHED_4BSD		#4BSD scheduler
+options		INET			#InterNETworking
+options		INET6
+options		NFSCLIENT		#Network Filesystem Client
+options		PSEUDOFS		#Pseudo-filesystem framework
+options		_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
+options		ALQ
+
+# options		NFS_LEGACYRPC
+#options		NFS_DEBUG
+
+# Debugging for use in -current
+options		DEADLKRES
+options		INVARIANTS
+options		INVARIANT_SUPPORT
+options		WITNESS
+options		WITNESS_SKIPSPIN
+options         FFS                     #Berkeley Fast Filesystem
+#options         SOFTUPDATES             #Enable FFS soft updates support
+#options         UFS_ACL                 #Support for access control lists
+#options         UFS_DIRHASH             #Improve performance on big directories
+
+options		MD_ROOT
+options		MD_ROOT_SIZE=5120
+device		geom_uzip
+options		GEOM_UZIP
+options		ROOTDEVNAME=\"ufs:/dev/md0.uzip\"
+
+device		pci
+device		ar724x_pci
+
+# Wireless NIC cards
+options		IEEE80211_DEBUG
+options		IEEE80211_SUPPORT_MESH
+options		IEEE80211_SUPPORT_TDMA
+device		wlan            # 802.11 support
+device		wlan_wep        # 802.11 WEP support
+device		wlan_ccmp       # 802.11 CCMP support
+device		wlan_tkip       # 802.11 TKIP support
+device		wlan_xauth	# 802.11 hostap support
+
+device		ath		# Atheros pci/cardbus NIC's
+device		ath_pci		# PCI/PCIe bus glue
+options 	ATH_DEBUG
+options		ATH_ENABLE_11N
+options		ATH_DIAGAPI
+
+device		ath_hal
+options		AH_SUPPORT_AR5416
+options		AH_DEBUG
+options		AH_DEBUG_ALQ
+
+device		ath_rate_sample
+
+device		mii
+device		arge
+
+device		usb
+options		USB_EHCI_BIG_ENDIAN_DESC        # handle big-endian byte order
+options		USB_DEBUG
+options		USB_HOST_ALIGN=32
+device		ehci
+
+device		gpio
+device		gpioled
+
+device		spibus
+device		ar71xx_spi
+device		mx25l
+
+device		ar71xx_wdog
+
+device		uart
+
+device		loop
+device		ether
+device		md
+device		bpf
+device		random
+device		if_bridge

Added: head/sys/mips/conf/PB92.hints
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/mips/conf/PB92.hints	Sat Apr 30 12:25:09 2011	(r221259)
@@ -0,0 +1,65 @@
+# $FreeBSD$
+hint.apb.0.at="nexus0"
+hint.apb.0.irq=4
+
+# uart0
+hint.uart.0.at="apb0"
+# see atheros/uart_cpu_ar71xx.c why +3
+hint.uart.0.maddr=0x18020003
+hint.uart.0.msize=0x18
+hint.uart.0.irq=3
+
+# ohci
+#hint.ohci.0.at="apb0"
+#hint.ohci.0.maddr=0x1b000000
+#hint.ohci.0.msize=0x01000000
+#hint.ohci.0.irq=1
+
+#ehci - note the 0x100 offset for the AR913x/AR724x
+hint.ehci.0.at="nexus0"
+hint.ehci.0.maddr=0x1b000100
+hint.ehci.0.msize=0x00ffff00
+hint.ehci.0.irq=1
+
+# pci
+hint.pcib.0.at="nexus0"
+hint.pcib.0.irq=0
+
+# arge0
+hint.arge.0.at="nexus0"
+hint.arge.0.maddr=0x19000000
+hint.arge.0.msize=0x1000
+hint.arge.0.irq=2
+hint.arge.0.phymask=0x1
+
+# GPIO
+hint.gpio.0.at="apb0"
+hint.gpio.0.maddr=0x18040000
+hint.gpio.0.msize=0x1000
+hint.gpio.0.irq=2
+
+# Signal leds
+hint.gpioled.0.at="gpiobus0"
+hint.gpioled.0.name="sig1"
+hint.gpioled.0.pins=0x0001	# pin 0
+hint.gpioled.1.at="gpiobus0"
+hint.gpioled.1.name="sig2"
+hint.gpioled.1.pins=0x0002	# pin 1
+hint.gpioled.2.at="gpiobus0"
+hint.gpioled.2.name="sig3"
+hint.gpioled.2.pins=0x0800	# pin 11
+hint.gpioled.3.at="gpiobus0"
+hint.gpioled.3.name="sig4"
+hint.gpioled.3.pins=0x0080	# pin 7
+
+# SPI controller/bus
+hint.spi.0.at="nexus0"
+hint.spi.0.maddr=0x1f000000
+hint.spi.0.msize=0x10
+
+# SPI flash
+hint.mx25l.0.at="spibus0"
+hint.mx25l.0.cs=0
+
+# Watchdog
+hint.ar71xx_wdog.0.at="nexus0"

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 12:39: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 1BF461065670;
	Sat, 30 Apr 2011 12:39:48 +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 E3FAE8FC1C;
	Sat, 30 Apr 2011 12:39: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 p3UCdlZT046111;
	Sat, 30 Apr 2011 12:39:47 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UCdlRO046109;
	Sat, 30 Apr 2011 12:39:47 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301239.p3UCdlRO046109@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 12:39: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: r221260 - 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: Sat, 30 Apr 2011 12:39:48 -0000

Author: bz
Date: Sat Apr 30 12:39:47 2011
New Revision: 221260
URL: http://svn.freebsd.org/changeset/base/221260

Log:
  After r221249 allow SCTP to be compiled in an IPv6 only environment as well.
  
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	10 days

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Apr 30 12:25:09 2011	(r221259)
+++ head/sys/conf/files	Sat Apr 30 12:39:47 2011	(r221260)
@@ -2742,21 +2742,21 @@ netinet/ip_output.c		optional inet
 netinet/raw_ip.c		optional inet | inet6
 netinet/cc/cc.c			optional inet | inet6
 netinet/cc/cc_newreno.c		optional inet | inet6
-netinet/sctp_asconf.c		optional inet sctp
-netinet/sctp_auth.c		optional inet sctp
-netinet/sctp_bsd_addr.c		optional inet sctp
-netinet/sctp_cc_functions.c	optional inet sctp
-netinet/sctp_crc32.c		optional inet sctp
-netinet/sctp_indata.c		optional inet sctp
-netinet/sctp_input.c		optional inet sctp
-netinet/sctp_output.c		optional inet sctp
-netinet/sctp_pcb.c		optional inet sctp
-netinet/sctp_peeloff.c		optional inet sctp
-netinet/sctp_ss_functions.c	optional inet sctp
-netinet/sctp_sysctl.c		optional inet sctp
-netinet/sctp_timer.c		optional inet sctp
-netinet/sctp_usrreq.c		optional inet sctp
-netinet/sctputil.c		optional inet sctp
+netinet/sctp_asconf.c		optional inet sctp | inet6 sctp
+netinet/sctp_auth.c		optional inet sctp | inet6 sctp
+netinet/sctp_bsd_addr.c		optional inet sctp | inet6 sctp
+netinet/sctp_cc_functions.c	optional inet sctp | inet6 sctp
+netinet/sctp_crc32.c		optional inet sctp | inet6 sctp
+netinet/sctp_indata.c		optional inet sctp | inet6 sctp
+netinet/sctp_input.c		optional inet sctp | inet6 sctp
+netinet/sctp_output.c		optional inet sctp | inet6 sctp
+netinet/sctp_pcb.c		optional inet sctp | inet6 sctp
+netinet/sctp_peeloff.c		optional inet sctp | inet6 sctp
+netinet/sctp_ss_functions.c	optional inet sctp | inet6 sctp
+netinet/sctp_sysctl.c		optional inet sctp | inet6 sctp
+netinet/sctp_timer.c		optional inet sctp | inet6 sctp
+netinet/sctp_usrreq.c		optional inet sctp | inet6 sctp
+netinet/sctputil.c		optional inet sctp | inet6 sctp
 netinet/tcp_debug.c		optional tcpdebug
 netinet/tcp_hostcache.c		optional inet | inet6
 netinet/tcp_input.c		optional inet | inet6

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 13:04: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 90E151065670;
	Sat, 30 Apr 2011 13:04:55 +0000 (UTC) (envelope-from des@des.no)
Received: from smtp.des.no (smtp.des.no [194.63.250.102])
	by mx1.freebsd.org (Postfix) with ESMTP id 488A28FC13;
	Sat, 30 Apr 2011 13:04:55 +0000 (UTC)
Received: from ds4.des.no (des.no [84.49.246.2])
	by smtp.des.no (Postfix) with ESMTP id 5179A1FFC35;
	Sat, 30 Apr 2011 13:04:54 +0000 (UTC)
Received: by ds4.des.no (Postfix, from userid 1001)
	id 1AB48844D9; Sat, 30 Apr 2011 15:04:54 +0200 (CEST)
From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= 
To: Rick Macklem 
References: <738601084.807794.1304166157585.JavaMail.root@erie.cs.uoguelph.ca>
Date: Sat, 30 Apr 2011 15:04:53 +0200
In-Reply-To: <738601084.807794.1304166157585.JavaMail.root@erie.cs.uoguelph.ca>
	(Rick Macklem's message of "Sat, 30 Apr 2011 08:22:37 -0400 (EDT)")
Message-ID: <86mxj7gaa2.fsf@ds4.des.no>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-head@freebsd.org, Rick Macklem ,
	svn-src-all@freebsd.org, src-committers@freebsd.org
Subject: Re: svn commit: r221124 - in head: . sbin/mount sbin/mount_nfs
	sys/amd64/conf sys/fs/nfsclient sys/i386/conf sys/ia64/conf
	sys/nfsclient sys/pc98/conf sys/powerpc/conf sys/sparc64/conf
	sys/sun4v/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: Sat, 30 Apr 2011 13:04:55 -0000

Rick Macklem  writes:
> "Dag-Erling Sm=C3=B8rgrav"  writes:
> > Are you going to rename the sysctls as well?
> I was not planning on it, but it the "collective" thinks it's a good
> idea, I could do so.

Yes, please.  The change from vfs.nfs to vfs.newnfs breaks scripts.

Ideally, both the old and the new NFS stack would use the same fstypes
and sysctl names, but I don't know if there's any way we can prevent
someone from compiling both into the kernel at the same time, or loading
both modules.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 13:13: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 E79C7106566B;
	Sat, 30 Apr 2011 13:13:14 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25])
	by mx1.freebsd.org (Postfix) with ESMTP id 9B6348FC14;
	Sat, 30 Apr 2011 13:13:14 +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 84B9F25D385D;
	Sat, 30 Apr 2011 13:13:13 +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 A706F159E12B;
	Sat, 30 Apr 2011 13:13:12 +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 y9J+8GTdPb7w; Sat, 30 Apr 2011 13:13:11 +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 7DD21159E0AC;
	Sat, 30 Apr 2011 13:05:42 +0000 (UTC)
Date: Sat, 30 Apr 2011 13:05:41 +0000 (UTC)
From: "Bjoern A. Zeeb" 
To: Michael Tuexen 
In-Reply-To: <201104301118.p3UBIGVE043318@svn.freebsd.org>
Message-ID: 
References: <201104301118.p3UBIGVE043318@svn.freebsd.org>
X-OpenPGP-Key: 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: r221249 - in head/sys: netinet 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: Sat, 30 Apr 2011 13:13:15 -0000

On Sat, 30 Apr 2011, Michael Tuexen wrote:

> Author: tuexen
> Date: Sat Apr 30 11:18:16 2011
> New Revision: 221249
> URL: http://svn.freebsd.org/changeset/base/221249
>
> Log:
>  Improve compilation of SCTP code without INET support.
>  Some bugs where fixed while doing this:
>  * ASCONF-ACK messages might use wrong port number when using
>    IPv6.
>  * Checking for additional addresses takes the correct address
>    into account and also does not do more comparisons than
>    necessary.
>
>  This patch is based on one received from bz@ who was
>  sponsored by The FreeBSD Foundation and iXsystems.

Huge thanks for going through all this, reviewing, integrating it
into the SCTP tree and fixing things!  Very much appreciated!

I'll let you know once the kernel infrastructure is all there (soon)
so you can re-test compiling and properly test in a true IPv6 only
kernel environment.


Bjoern

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 13:49: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 9D880106566B;
	Sat, 30 Apr 2011 13:49:03 +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 899FA8FC0A;
	Sat, 30 Apr 2011 13:49: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 p3UDn3uE048139;
	Sat, 30 Apr 2011 13:49:03 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UDn3w5048136;
	Sat, 30 Apr 2011 13:49:03 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201104301349.p3UDn3w5048136@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 30 Apr 2011 13:49: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: r221261 - in head/sys: fs/ext2fs ufs/ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 13:49:03 -0000

Author: kib
Date: Sat Apr 30 13:49:03 2011
New Revision: 221261
URL: http://svn.freebsd.org/changeset/base/221261

Log:
  Clarify the comment.
  
  MFC after:	1 week

Modified:
  head/sys/fs/ext2fs/ext2_readwrite.c
  head/sys/ufs/ffs/ffs_vnops.c

Modified: head/sys/fs/ext2fs/ext2_readwrite.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_readwrite.c	Sat Apr 30 12:39:47 2011	(r221260)
+++ head/sys/fs/ext2fs/ext2_readwrite.c	Sat Apr 30 13:49:03 2011	(r221261)
@@ -166,7 +166,8 @@ READ(ap)
 			/*
 			 * If it's VMIO or direct I/O, then we don't
 			 * need the buf, mark it available for
-			 * freeing. If it's VMIO, the VM has the data.
+			 * freeing. If it's non-direct VMIO, the VM has
+			 * the data.
 			 */
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);

Modified: head/sys/ufs/ffs/ffs_vnops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vnops.c	Sat Apr 30 12:39:47 2011	(r221260)
+++ head/sys/ufs/ffs/ffs_vnops.c	Sat Apr 30 13:49:03 2011	(r221261)
@@ -591,7 +591,8 @@ ffs_read(ap)
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
-			 * for freeing. The VM has the data.
+			 * for freeing.  For non-direct VMIO reads, he VM
+			 * has the data.
 			 */
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);
@@ -985,7 +986,8 @@ ffs_extread(struct vnode *vp, struct uio
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
-			 * for freeing. The VM has the data.
+			 * for freeing.  For non-direct VMIO reads, The VM
+			 * has the data.
 			 */
 			bp->b_flags |= B_RELBUF;
 			brelse(bp);

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 14:22: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 8E06C106564A;
	Sat, 30 Apr 2011 14:22:45 +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 7BC448FC0A;
	Sat, 30 Apr 2011 14:22: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 p3UEMjUP049288;
	Sat, 30 Apr 2011 14:22:45 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UEMjH4049286;
	Sat, 30 Apr 2011 14:22:45 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301422.p3UEMjH4049286@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 14:22: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: r221262 - 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: Sat, 30 Apr 2011 14:22:45 -0000

Author: bz
Date: Sat Apr 30 14:22:45 2011
New Revision: 221262
URL: http://svn.freebsd.org/changeset/base/221262

Log:
  Fis a problem with r221258 that mac is still needed in case for ient6 only
  for mac_inet.c.
  
  Reported by:	Luiz Otavio O Souza (lists.br gmail.com)
  MFC after:	4 days

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Apr 30 13:49:03 2011	(r221261)
+++ head/sys/conf/files	Sat Apr 30 14:22:45 2011	(r221262)
@@ -3207,7 +3207,7 @@ security/mac/mac_atalk.c	optional mac ne
 security/mac/mac_audit.c	optional mac audit
 security/mac/mac_cred.c		optional mac
 security/mac/mac_framework.c	optional mac
-security/mac/mac_inet.c		optional mac inet | inet6
+security/mac/mac_inet.c		optional mac inet | mac inet6
 security/mac/mac_inet6.c	optional mac inet6
 security/mac/mac_label.c	optional mac
 security/mac/mac_net.c		optional mac

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 14:52: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 EFAE11065670;
	Sat, 30 Apr 2011 14:52:49 +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 D28DC8FC15;
	Sat, 30 Apr 2011 14:52: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 p3UEqnjE050163;
	Sat, 30 Apr 2011 14:52:49 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UEqneY050160;
	Sat, 30 Apr 2011 14:52:49 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201104301452.p3UEqneY050160@svn.freebsd.org>
From: Martin Matuska 
Date: Sat, 30 Apr 2011 14:52: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: r221263 - 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: Sat, 30 Apr 2011 14:52:50 -0000

Author: mm
Date: Sat Apr 30 14:52:49 2011
New Revision: 221263
URL: http://svn.freebsd.org/changeset/base/221263

Log:
  Fix deduplicated zfs receive
  (dmu_recv_stream builds incomplete guid_to_ds_map)
  
  Illumos-gate changeset:	13329:c48b8bf84ab7
  MFC together with v28
  
  Approved by:	pjd
  Obtained from:	Illumos (Bug #755)

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Sat Apr 30 14:22:45 2011	(r221262)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c	Sat Apr 30 14:52:49 2011	(r221263)
@@ -21,6 +21,9 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
 
 #include 
 #include 
@@ -851,61 +854,6 @@ guid_compare(const void *arg1, const voi
 	return (0);
 }
 
-/*
- * This function is a callback used by dmu_objset_find() (which
- * enumerates the object sets) to build an avl tree that maps guids
- * to datasets.  The resulting table is used when processing DRR_WRITE_BYREF
- * send stream records.  These records, which are used in dedup'ed
- * streams, do not contain data themselves, but refer to a copy
- * of the data block that has already been written because it was
- * earlier in the stream.  That previous copy is identified by the
- * guid of the dataset with the referenced data.
- */
-int
-find_ds_by_guid(const char *name, void *arg)
-{
-	avl_tree_t *guid_map = arg;
-	dsl_dataset_t *ds, *snapds;
-	guid_map_entry_t *gmep;
-	dsl_pool_t *dp;
-	int err;
-	uint64_t lastobj, firstobj;
-
-	if (dsl_dataset_hold(name, FTAG, &ds) != 0)
-		return (0);
-
-	dp = ds->ds_dir->dd_pool;
-	rw_enter(&dp->dp_config_rwlock, RW_READER);
-	firstobj = ds->ds_dir->dd_phys->dd_origin_obj;
-	lastobj = ds->ds_phys->ds_prev_snap_obj;
-
-	while (lastobj != firstobj) {
-		err = dsl_dataset_hold_obj(dp, lastobj, guid_map, &snapds);
-		if (err) {
-			/*
-			 * Skip this snapshot and move on. It's not
-			 * clear why this would ever happen, but the
-			 * remainder of the snapshot streadm can be
-			 * processed.
-			 */
-			rw_exit(&dp->dp_config_rwlock);
-			dsl_dataset_rele(ds, FTAG);
-			return (0);
-		}
-
-		gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP);
-		gmep->guid = snapds->ds_phys->ds_guid;
-		gmep->gme_ds = snapds;
-		avl_add(guid_map, gmep);
-		lastobj = snapds->ds_phys->ds_prev_snap_obj;
-	}
-
-	rw_exit(&dp->dp_config_rwlock);
-	dsl_dataset_rele(ds, FTAG);
-
-	return (0);
-}
-
 static void
 free_guid_map_onexit(void *arg)
 {
@@ -1413,9 +1361,6 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, 
 			avl_create(ra.guid_to_ds_map, guid_compare,
 			    sizeof (guid_map_entry_t),
 			    offsetof(guid_map_entry_t, avlnode));
-			(void) dmu_objset_find(drc->drc_top_ds, find_ds_by_guid,
-			    (void *)ra.guid_to_ds_map,
-			    DS_FIND_CHILDREN);
 			ra.err = zfs_onexit_add_cb(minor,
 			    free_guid_map_onexit, ra.guid_to_ds_map,
 			    action_handlep);
@@ -1427,6 +1372,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, 
 			if (ra.err)
 				goto out;
 		}
+
+		drc->drc_guid_to_ds_map = ra.guid_to_ds_map;
 	}
 
 	/*
@@ -1565,6 +1512,30 @@ recv_end_sync(void *arg1, void *arg2, dm
 }
 
 static int
+add_ds_to_guidmap(avl_tree_t *guid_map, dsl_dataset_t *ds)
+{
+	dsl_pool_t *dp = ds->ds_dir->dd_pool;
+	uint64_t snapobj = ds->ds_phys->ds_prev_snap_obj;
+	dsl_dataset_t *snapds;
+	guid_map_entry_t *gmep;
+	int err;
+
+	ASSERT(guid_map != NULL);
+
+	rw_enter(&dp->dp_config_rwlock, RW_READER);
+	err = dsl_dataset_hold_obj(dp, snapobj, guid_map, &snapds);
+	if (err == 0) {
+		gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP);
+		gmep->guid = snapds->ds_phys->ds_guid;
+		gmep->gme_ds = snapds;
+		avl_add(guid_map, gmep);
+	}
+
+	rw_exit(&dp->dp_config_rwlock);
+	return (err);
+}
+
+static int
 dmu_recv_existing_end(dmu_recv_cookie_t *drc)
 {
 	struct recvendsyncarg resa;
@@ -1604,6 +1575,8 @@ dmu_recv_existing_end(dmu_recv_cookie_t 
 
 out:
 	mutex_exit(&ds->ds_recvlock);
+	if (err == 0 && drc->drc_guid_to_ds_map != NULL)
+		(void) add_ds_to_guidmap(drc->drc_guid_to_ds_map, ds);
 	dsl_dataset_disown(ds, dmu_recv_tag);
 	(void) dsl_dataset_destroy(drc->drc_real_ds, dmu_recv_tag, B_FALSE);
 	return (err);
@@ -1633,6 +1606,8 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc)
 		/* clean up the fs we just recv'd into */
 		(void) dsl_dataset_destroy(ds, dmu_recv_tag, B_FALSE);
 	} else {
+		if (drc->drc_guid_to_ds_map != NULL)
+			(void) add_ds_to_guidmap(drc->drc_guid_to_ds_map, ds);
 		/* release the hold from dmu_recv_begin */
 		dsl_dataset_disown(ds, dmu_recv_tag);
 	}

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Sat Apr 30 14:22:45 2011	(r221262)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Sat Apr 30 14:52:49 2011	(r221263)
@@ -21,6 +21,9 @@
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
 
 /* Portions Copyright 2010 Robert Milkowski */
 
@@ -718,6 +721,7 @@ typedef struct dmu_recv_cookie {
 	char *drc_top_ds;
 	boolean_t drc_newfs;
 	boolean_t drc_force;
+	struct avl_tree *drc_guid_to_ds_map;
 } dmu_recv_cookie_t;
 
 int dmu_recv_begin(char *tofs, char *tosnap, char *topds, struct drr_begin *,

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 16:30: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 2F71610656AD;
	Sat, 30 Apr 2011 16:30:19 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 1D1A88FC1B;
	Sat, 30 Apr 2011 16:30: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 p3UGUIhA052985;
	Sat, 30 Apr 2011 16:30:18 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UGUImC052983;
	Sat, 30 Apr 2011 16:30:18 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301630.p3UGUImC052983@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 16:30: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: r221264 - 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: Sat, 30 Apr 2011 16:30:19 -0000

Author: bz
Date: Sat Apr 30 16:30:18 2011
New Revision: 221264
URL: http://svn.freebsd.org/changeset/base/221264

Log:
  Fix a mismerge from p4 in that in_localaddr() is not available without INET.
  
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	4 days

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Sat Apr 30 14:52:49 2011	(r221263)
+++ head/sys/netinet/tcp_input.c	Sat Apr 30 16:30:18 2011	(r221264)
@@ -370,7 +370,11 @@ cc_conn_init(struct tcpcb *tp)
 	else if (isipv6 && in6_localaddr(&inp->in6p_faddr))
 		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
 #endif
-#if defined(INET) || defined(INET6)
+#if defined(INET) && defined(INET6)
+	else if (!isipv6 && in_localaddr(inp->inp_faddr))
+		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
+#endif
+#ifdef INET
 	else if (in_localaddr(inp->inp_faddr))
 		tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local;
 #endif

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 17:51: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 B2F45106564A;
	Sat, 30 Apr 2011 17:51:39 +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 685D68FC0C;
	Sat, 30 Apr 2011 17:51: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 p3UHpdhP056334;
	Sat, 30 Apr 2011 17:51:39 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UHpdrB056332;
	Sat, 30 Apr 2011 17:51:39 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301751.p3UHpdrB056332@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 17:51: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: r221265 - 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: Sat, 30 Apr 2011 17:51:39 -0000

Author: bz
Date: Sat Apr 30 17:51:39 2011
New Revision: 221265
URL: http://svn.freebsd.org/changeset/base/221265

Log:
  Allow MKMODULESENV being preset from other sources like makeoptions
  kernel configurations to apply WITH_* WITHOUT_* knobs we use for
  module building as well to restrict or control opt_*.h flags.
  
  Reviewed by:	imp, +
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	2 weeks

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Sat Apr 30 16:30:18 2011	(r221264)
+++ head/sys/conf/kern.pre.mk	Sat Apr 30 17:51:39 2011	(r221265)
@@ -149,7 +149,7 @@ SYSTEM_DEP+= ${LDSCRIPT}
 # MKMODULESENV is set here so that port makefiles can augment
 # them.
 
-MKMODULESENV=	MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
+MKMODULESENV+=	MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR}
 MKMODULESENV+=	MACHINE_CPUARCH=${MACHINE_CPUARCH}
 .if (${KERN_IDENT} == LINT)
 MKMODULESENV+=	ALL_MODULES=LINT

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 17:58: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 B9B0B106566B;
	Sat, 30 Apr 2011 17:58:28 +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 A72B78FC14;
	Sat, 30 Apr 2011 17:58: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 p3UHwSPE056585;
	Sat, 30 Apr 2011 17:58:28 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UHwSqm056580;
	Sat, 30 Apr 2011 17:58:28 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301758.p3UHwSqm056580@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 17:58: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: r221266 - in head: share/man/man5 share/mk
	tools/build/options
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 17:58:28 -0000

Author: bz
Date: Sat Apr 30 17:58:28 2011
New Revision: 221266
URL: http://svn.freebsd.org/changeset/base/221266

Log:
  Introduce two new options MK_INET and MK_INET_SUPPORT analogically
  with INET6 equivalents. Patch reather than re-genenerating src.conf
  (given the current problem with the script that does the re-gen).
  
  Reviewed by:	gnn
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	2 weeks

Added:
  head/tools/build/options/WITHOUT_INET   (contents, props changed)
  head/tools/build/options/WITHOUT_INET_SUPPORT   (contents, props changed)
Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/bsd.own.mk

Modified: head/share/man/man5/src.conf.5
==============================================================================
--- head/share/man/man5/src.conf.5	Sat Apr 30 17:51:39 2011	(r221265)
+++ head/share/man/man5/src.conf.5	Sat Apr 30 17:58:28 2011	(r221266)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: head/tools/build/options/makeman 188848 2009-02-20 11:09:55Z mtm
+.\" from FreeBSD: head/tools/build/options/makeman 221161 2011-04-28 11:21:49Z des
 .\" $FreeBSD$
-.Dd April  6, 2011
+.Dd April 30, 2011
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -397,6 +397,15 @@ This code is patented in the USA and man
 It is
 .Em "YOUR RESPONSIBILITY"
 to determine if you can legally use IDEA.
+.It Va WITHOUT_INET
+.\" $FreeBSD$
+Set to not build programs and libraries related to IPv4 networking.
+When set, it also enforces the following options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITHOUT_INET_SUPPORT
+.El
 .It Va WITHOUT_INET6
 .\" from FreeBSD: head/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru
 Set to not build
@@ -410,6 +419,9 @@ When set, it also enforces the following
 .It Va WITHOUT_INET6_SUPPORT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru
 Set to build libraries, programs, and kernel modules without IPv6 support.
+.It Va WITHOUT_INET_SUPPORT
+.\" $FreeBSD$
+Set to build libraries, programs, and kernel modules without IPv4 support.
 .It Va WITHOUT_INFO
 .\" from FreeBSD: head/tools/build/options/WITHOUT_INFO 156932 2006-03-21 07:50:50Z ru
 Set to not make or install

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Sat Apr 30 17:51:39 2011	(r221265)
+++ head/share/mk/bsd.own.mk	Sat Apr 30 17:58:28 2011	(r221266)
@@ -326,6 +326,7 @@ __DEFAULT_YES_OPTIONS = \
     GPIO \
     GROFF \
     HTML \
+    INET \
     INET6 \
     INFO \
     INSTALLLIB \
@@ -546,6 +547,7 @@ MK_GDB:=	no
 .for var in \
     BZIP2 \
     GNU \
+    INET \
     INET6 \
     IPX \
     KERBEROS \

Added: head/tools/build/options/WITHOUT_INET
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_INET	Sat Apr 30 17:58:28 2011	(r221266)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build programs and libraries related to IPv4 networking.

Added: head/tools/build/options/WITHOUT_INET_SUPPORT
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_INET_SUPPORT	Sat Apr 30 17:58:28 2011	(r221266)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to build libraries, programs, and kernel modules without IPv4 support.

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 17: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 1ECB41065670;
	Sat, 30 Apr 2011 17:59:55 +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 E6E6D8FC13;
	Sat, 30 Apr 2011 17:59: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 p3UHxsrQ056659;
	Sat, 30 Apr 2011 17:59:54 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UHxsL9056656;
	Sat, 30 Apr 2011 17:59:54 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <201104301759.p3UHxsL9056656@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Sat, 30 Apr 2011 17:59: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: r221267 - in head/sys/modules: . if_carp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 17:59:55 -0000

Author: bz
Date: Sat Apr 30 17:59:54 2011
New Revision: 221267
URL: http://svn.freebsd.org/changeset/base/221267

Log:
  Update carp, gre and pf module builds to be depenent on INET and/or
  INET6_SUPPORT.
  
  Reviewed by:	gnn (slightly earlier version without pf)
  Sponsored by:	The FreeBSD Foundation
  Sponsored by:	iXsystems
  MFC after:	2 weeks

Modified:
  head/sys/modules/Makefile
  head/sys/modules/if_carp/Makefile

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Sat Apr 30 17:58:28 2011	(r221266)
+++ head/sys/modules/Makefile	Sat Apr 30 17:59:54 2011	(r221267)
@@ -116,14 +116,14 @@ SUBDIR=	${_3dfx} \
 	${_ida} \
 	${_ie} \
 	if_bridge \
-	if_carp \
+	${_if_carp} \
 	if_disc \
 	if_edsc \
 	if_ef \
 	if_epair \
 	if_faith \
 	if_gif \
-	if_gre \
+	${_if_gre} \
 	if_lagg \
 	${_if_ndis} \
 	if_stf \
@@ -358,6 +358,15 @@ _random=	random
 .endif
 .endif
 
+.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
+_if_gre=	if_gre
+.endif
+
+.if (${MK_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
+	defined(ALL_MODULES)
+_if_carp=	if_carp
+.endif
+
 .if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
 _ipfilter=	ipfilter
 .endif
@@ -366,7 +375,8 @@ _ipfilter=	ipfilter
 _netgraph=	netgraph
 .endif
 
-.if ${MK_PF} != "no" || defined(ALL_MODULES)
+.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
+	${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
 _pf=		pf
 _pflog=		pflog
 .endif

Modified: head/sys/modules/if_carp/Makefile
==============================================================================
--- head/sys/modules/if_carp/Makefile	Sat Apr 30 17:58:28 2011	(r221266)
+++ head/sys/modules/if_carp/Makefile	Sat Apr 30 17:59:54 2011	(r221267)
@@ -9,8 +9,10 @@ SRCS=	ip_carp.c
 SRCS+=	opt_carp.h opt_bpf.h opt_inet.h opt_inet6.h vnode_if.h
 
 .if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
 opt_inet.h:
 	@echo "#define INET 1" > ${.TARGET}
+.endif
 
 .if ${MK_INET6_SUPPORT} != "no"
 opt_inet6.h:

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 20:16: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 5275F106566B;
	Sat, 30 Apr 2011 20:16:50 +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 3E77A8FC08;
	Sat, 30 Apr 2011 20:16: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 p3UKGoWi060698;
	Sat, 30 Apr 2011 20:16:50 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UKGohj060695;
	Sat, 30 Apr 2011 20:16:50 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201104302016.p3UKGohj060695@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 30 Apr 2011 20:16: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: r221269 - in head/sys/boot/ia64: common efi
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 20:16:50 -0000

Author: marcel
Date: Sat Apr 30 20:16:49 2011
New Revision: 221269
URL: http://svn.freebsd.org/changeset/base/221269

Log:
  Turn PBVM page table entries into PTEs so that they can be inserted
  into the TLB as-is.
  
  While here, have ia64_platform_alloc() return ~0UL on failure.

Modified:
  head/sys/boot/ia64/common/copy.c
  head/sys/boot/ia64/efi/efimd.c

Modified: head/sys/boot/ia64/common/copy.c
==============================================================================
--- head/sys/boot/ia64/common/copy.c	Sat Apr 30 20:14:20 2011	(r221268)
+++ head/sys/boot/ia64/common/copy.c	Sat Apr 30 20:16:49 2011	(r221269)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 
 #include "libia64.h"
 
@@ -40,6 +41,7 @@ uint32_t ia64_pgtblsz;
 static int
 pgtbl_extend(u_int idx)
 {
+	vm_paddr_t pa;
 	uint64_t *pgtbl;
 	uint32_t pgtblsz;
 	u_int pot;
@@ -65,9 +67,10 @@ pgtbl_extend(u_int idx)
 		pgtblsz <<= 1;
 
 	/* Allocate naturally aligned memory. */
-	pgtbl = (void *)ia64_platform_alloc(0, pgtblsz);
-	if (pgtbl == NULL)
+	pa = ia64_platform_alloc(0, pgtblsz);
+	if (pa == ~0UL)
 		return (ENOMEM);
+	pgtbl = (void *)pa;
 
 	/* Initialize new page table. */
 	if (ia64_pgtbl != NULL && ia64_pgtbl != pgtbl)
@@ -85,7 +88,7 @@ pgtbl_extend(u_int idx)
 void *
 ia64_va2pa(vm_offset_t va, size_t *len)
 {
-	uint64_t pa;
+	uint64_t pa, pte;
 	u_int idx, ofs;
 	int error;
 
@@ -111,16 +114,18 @@ ia64_va2pa(vm_offset_t va, size_t *len)
 	}
 
 	ofs = va & IA64_PBVM_PAGE_MASK;
-	pa = ia64_pgtbl[idx];
-	if (pa == 0) {
+	pte = ia64_pgtbl[idx];
+	if ((pte & PTE_PRESENT) == 0) {
 		pa = ia64_platform_alloc(va - ofs, IA64_PBVM_PAGE_SIZE);
-		if (pa == 0) {
+		if (pa == ~0UL) {
 			error = ENOMEM;
 			goto fail;
 		}
-		ia64_pgtbl[idx] = pa;
+		pte = PTE_AR_RWX | PTE_DIRTY | PTE_ACCESSED | PTE_PRESENT;
+		pte |= (pa & PTE_PPN_MASK);
+		ia64_pgtbl[idx] = pte;
 	}
-	pa += ofs;
+	pa = (pte & PTE_PPN_MASK) + ofs;
 
 	/* We can not cross page boundaries (in general). */
 	if (*len + ofs > IA64_PBVM_PAGE_SIZE)

Modified: head/sys/boot/ia64/efi/efimd.c
==============================================================================
--- head/sys/boot/ia64/efi/efimd.c	Sat Apr 30 20:14:20 2011	(r221268)
+++ head/sys/boot/ia64/efi/efimd.c	Sat Apr 30 20:16:49 2011	(r221269)
@@ -90,6 +90,10 @@ ia64_efi_memmap_update(void)
 	return (TRUE);
 }
 
+/*
+ * Returns 0 on failure. Successful allocations return an address
+ * larger or equal to IA64_EFI_ALLOC_BOUNDARY.
+ */
 static vm_paddr_t
 ia64_efi_alloc(vm_size_t sz)
 {
@@ -144,11 +148,12 @@ ia64_efi_alloc(vm_size_t sz)
 vm_paddr_t
 ia64_platform_alloc(vm_offset_t va, vm_size_t sz)
 {
+	vm_paddr_t pa;
 
 	if (va == 0) {
 		/* Page table itself. */
 		if (sz > IA64_EFI_PGTBLSZ_MAX)
-			return (0);
+			return (~0UL);
 		if (ia64_efi_pgtbl == 0)
 			ia64_efi_pgtbl = ia64_efi_alloc(IA64_EFI_PGTBLSZ_MAX);
 		if (ia64_efi_pgtbl != 0)
@@ -156,7 +161,7 @@ ia64_platform_alloc(vm_offset_t va, vm_s
 		return (ia64_efi_pgtbl);
 	} else if (va < IA64_PBVM_BASE) {
 		/* Should not happen. */
-		return (0);
+		return (~0UL);
 	}
 
 	/* Loader virtual memory page. */
@@ -169,7 +174,8 @@ ia64_platform_alloc(vm_offset_t va, vm_s
 		return (ia64_efi_chunk + va);
 
 	/* Allocate a page at a time when we go beyond the chunk. */
-	return (ia64_efi_alloc(sz));
+	pa = ia64_efi_alloc(sz);
+	return ((pa == 0) ? ~0UL : pa);
 }
 
 void

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 20: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 1D0B5106566B;
	Sat, 30 Apr 2011 20:34:53 +0000 (UTC)
	(envelope-from thompsa@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A1428FC14;
	Sat, 30 Apr 2011 20: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 p3UKYqT6061269;
	Sat, 30 Apr 2011 20:34:52 GMT (envelope-from thompsa@svn.freebsd.org)
Received: (from thompsa@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UKYqOq061267;
	Sat, 30 Apr 2011 20:34:52 GMT (envelope-from thompsa@svn.freebsd.org)
Message-Id: <201104302034.p3UKYqOq061267@svn.freebsd.org>
From: Andrew Thompson 
Date: Sat, 30 Apr 2011 20: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: r221270 - 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: Sat, 30 Apr 2011 20:34:53 -0000

Author: thompsa
Date: Sat Apr 30 20:34:52 2011
New Revision: 221270
URL: http://svn.freebsd.org/changeset/base/221270

Log:
  LACP frames must not be send VLAN-tagged, check for that before processing.
  
  PR:		kern/156743
  Submitted by:	Dmitrij Tejblum
  MFC after:	1 week

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Sat Apr 30 20:16:49 2011	(r221269)
+++ head/sys/net/if_lagg.c	Sat Apr 30 20:34:52 2011	(r221270)
@@ -1794,7 +1794,7 @@ lagg_lacp_input(struct lagg_softc *sc, s
 	etype = ntohs(eh->ether_type);
 
 	/* Tap off LACP control messages */
-	if (etype == ETHERTYPE_SLOW) {
+	if ((m->m_flags & M_VLANTAG) == 0 && etype == ETHERTYPE_SLOW) {
 		m = lacp_input(lp, m);
 		if (m == NULL)
 			return (NULL);

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 20:49: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 5E810106564A;
	Sat, 30 Apr 2011 20:49:01 +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 49DB28FC0A;
	Sat, 30 Apr 2011 20:49: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 p3UKn1WO061699;
	Sat, 30 Apr 2011 20:49:01 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UKn1GO061687;
	Sat, 30 Apr 2011 20:49:01 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201104302049.p3UKn1GO061687@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Sat, 30 Apr 2011 20:49: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: r221271 - in head/sys: conf ia64/ia64 ia64/include
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 20:49:01 -0000

Author: marcel
Date: Sat Apr 30 20:49:00 2011
New Revision: 221271
URL: http://svn.freebsd.org/changeset/base/221271

Log:
  Stop linking against a direct-mapped virtual address and instead
  use the PBVM. This eliminates the implied hardcoding of the
  physical address at which the kernel needs to be loaded. Using the
  PBVM makes it possible to load the kernel irrespective of the
  physical memory organization and allows us to replicate kernel text
  on NUMA machines.
  
  While here, reduce the direct-mapped page size to the kernel's
  page size so that we can support memory attributes better.

Added:
  head/sys/ia64/ia64/mp_locore.S   (contents, props changed)
Modified:
  head/sys/conf/files.ia64
  head/sys/conf/ldscript.ia64
  head/sys/ia64/ia64/efi.c
  head/sys/ia64/ia64/exception.S
  head/sys/ia64/ia64/genassym.c
  head/sys/ia64/ia64/locore.S
  head/sys/ia64/ia64/machdep.c
  head/sys/ia64/ia64/mp_machdep.c
  head/sys/ia64/ia64/pmap.c
  head/sys/ia64/ia64/sal.c
  head/sys/ia64/include/ia64_cpu.h
  head/sys/ia64/include/smp.h
  head/sys/ia64/include/vmparam.h

Modified: head/sys/conf/files.ia64
==============================================================================
--- head/sys/conf/files.ia64	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/conf/files.ia64	Sat Apr 30 20:49:00 2011	(r221271)
@@ -92,6 +92,7 @@ ia64/ia64/locore.S		standard	no-obj
 ia64/ia64/machdep.c		standard
 ia64/ia64/mca.c			standard
 ia64/ia64/mem.c			optional	mem
+ia64/ia64/mp_locore.S		optional	smp
 ia64/ia64/mp_machdep.c		optional	smp
 ia64/ia64/nexus.c		standard
 ia64/ia64/pal.S			standard

Modified: head/sys/conf/ldscript.ia64
==============================================================================
--- head/sys/conf/ldscript.ia64	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/conf/ldscript.ia64	Sat Apr 30 20:49:00 2011	(r221271)
@@ -3,7 +3,7 @@ OUTPUT_FORMAT("elf64-ia64-freebsd", "elf
 OUTPUT_ARCH(ia64)
 ENTRY(__start)
 SEARCH_DIR(/usr/lib);
-kernel_text = 0xe000000004000000;
+kernel_text = 0x9ffc000000000000;
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
@@ -11,10 +11,10 @@ SECTIONS
   .interp         : { *(.interp) }
 
   PROVIDE (btext = .);
-  .ivt		  : { *(.ivt) }
   .text           :
   {
-    *(.text.ivt)
+    *(.ivt)
+    *(.ivt.text)
     *(.text .stub .text.* .gnu.linkonce.t.*)
     /* .gnu.warning sections are handled specially by elf32.em.  */
     *(.gnu.warning)
@@ -60,9 +60,11 @@ SECTIONS
      page in the loader virtual memory. */
   . = ALIGN(65536);
 
+  PROVIDE (bdata = .);
   .data           :
   {
-    *(.data.kstack .data .data.* .gnu.linkonce.d.*)
+    *(.ivt.data)
+    *(.data .data.* .gnu.linkonce.d.*)
     SORT(CONSTRUCTORS)
   }
   .data1          : { *(.data1) }

Modified: head/sys/ia64/ia64/efi.c
==============================================================================
--- head/sys/ia64/ia64/efi.c	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/efi.c	Sat Apr 30 20:49:00 2011	(r221271)
@@ -129,7 +129,7 @@ efi_boot_minimal(uint64_t systbl)
 	setvirt = (void *)IA64_PHYS_TO_RR7((u_long)efi_runtime->rt_setvirtual);
 	status = ia64_efi_physical(setvirt, bootinfo->bi_memmap_size,
 	    bootinfo->bi_memdesc_size, bootinfo->bi_memdesc_version,
-	    bootinfo->bi_memmap);
+	    ia64_tpa(bootinfo->bi_memmap));
 	return ((status < 0) ? EFAULT : 0);
 }
 
@@ -164,7 +164,7 @@ efi_md_first(void)
 
 	if (bootinfo->bi_memmap == 0)
 		return (NULL);
-	return ((struct efi_md *)IA64_PHYS_TO_RR7(bootinfo->bi_memmap));
+	return ((struct efi_md *)bootinfo->bi_memmap);
 }
 
 struct efi_md *
@@ -172,7 +172,7 @@ efi_md_next(struct efi_md *md)
 {
 	uint64_t plim;
 
-	plim = IA64_PHYS_TO_RR7(bootinfo->bi_memmap + bootinfo->bi_memmap_size);
+	plim = bootinfo->bi_memmap + bootinfo->bi_memmap_size;
 	md = (struct efi_md *)((uintptr_t)md + bootinfo->bi_memdesc_size);
 	return ((md >= (struct efi_md *)plim) ? NULL : md);
 }

Modified: head/sys/ia64/ia64/exception.S
==============================================================================
--- head/sys/ia64/ia64/exception.S	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/exception.S	Sat Apr 30 20:49:00 2011	(r221271)
@@ -48,9 +48,16 @@ __FBSDID("$FreeBSD$");
  * ar.k4 = PCPU data
  */
 
+	.section .ivt.data, "aw"
+
+	.global pmap_ptc_g_sem
+pmap_ptc_g_sem:	data8	0
+
+	.global ia64_kptdir
+ia64_kptdir:	data8	0
+
 #ifdef EXCEPTION_TRACING
 
-	.data
 	.global xtrace, xhead
 xtrace:	.space	1024*5*8
 xhead:	data8	xtrace
@@ -101,7 +108,7 @@ xhead:	data8	xtrace
 
 #endif
 
-	.section .text.ivt, "ax"
+	.section .ivt.text, "ax"
 
 /*
  * exception_save: save interrupted state
@@ -129,7 +136,7 @@ ENTRY_NOPROFILE(exception_save, 0)
 	;;
 }
 {	.mmi
-	cmp.le		p14,p15=5,r31
+	cmp.le		p14,p15=IA64_VM_MINKERN_REGION,r31
 	;;
 (p15)	mov		r23=ar.k7		// kernel memory stack
 (p14)	mov		r23=sp
@@ -233,7 +240,7 @@ exception_save_restart:
 {	.mmi
 	st8		[r30]=r19,16		// rnat
 	st8		[r31]=r0,16		// __spare
-	cmp.le		p12,p13=5,r24
+	cmp.le		p12,p13=IA64_VM_MINKERN_REGION,r24
 	;;
 }
 {	.mmi
@@ -602,7 +609,7 @@ ENTRY_NOPROFILE(exception_restore, 0)
 {	.mmi
 	ld8.fill	r1=[r30],16		// gp
 	ld8		r27=[r31],16		// ndirty
-	cmp.le		p14,p15=5,r28
+	cmp.le		p14,p15=IA64_VM_MINKERN_REGION,r28
 	;;
 }
 {	.mmi
@@ -915,7 +922,7 @@ IVT_ENTRY(Alternate_Instruction_TLB, 0x0
 	extr.u	r17=r16,61,3		// get region number
 	mov	r19=PTE_PRESENT+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+PTE_AR_RWX
 	;;
-	cmp.eq	p13,p0=4,r17		// RR4?
+	cmp.eq	p13,p0=IA64_PBVM_RR,r17		// RR4?
 (p13)	br.cond.sptk.few	4f
 	;;
 	cmp.ge	p13,p0=5,r17		// RR0-RR5?
@@ -958,7 +965,7 @@ IVT_ENTRY(Alternate_Data_TLB, 0x1000)
 	extr.u	r17=r16,61,3		// get region number
 	mov	r19=PTE_PRESENT+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+PTE_AR_RWX
 	;;
-	cmp.eq	p13,p0=4,r17		// RR4?
+	cmp.eq	p13,p0=IA64_PBVM_RR,r17		// RR4?
 (p13)	br.cond.sptk.few	4f
 	;;
 	cmp.ge	p13,p0=5,r17		// RR0-RR5?
@@ -1007,21 +1014,22 @@ IVT_ENTRY(Data_Nested_TLB, 0x1400)
 	// double nested faults. Since all virtual addresses we encounter
 	// here are direct mapped region 7 addresses, we have no problem
 	// constructing physical addresses.
+
 {	.mlx
-	rsm		psr.dt
+	nop		0
 	movl		r27=ia64_kptdir
 	;;
 }
 {	.mii
-	srlz.d
-	dep		r27=0,r27,61,3
-	;;
+	ld8		r27=[r27]
 	extr.u		r28=r30,3*PAGE_SHIFT-8, PAGE_SHIFT-3	// dir L0 index
-}
-{	.mii
-	ld8		r27=[r27]				// dir L0 page
 	extr.u		r26=r30,2*PAGE_SHIFT-5, PAGE_SHIFT-3	// dir L1 index
 	;;
+}
+{	.mmi
+	rsm		psr.dt
+	;;
+	srlz.d
 	dep		r27=0,r27,61,3
 	;;
 }

Modified: head/sys/ia64/ia64/genassym.c
==============================================================================
--- head/sys/ia64/ia64/genassym.c	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/genassym.c	Sat Apr 30 20:49:00 2011	(r221271)
@@ -77,13 +77,13 @@ ASSYM(ERESTART,		ERESTART);
 
 ASSYM(FRAME_SYSCALL,	FRAME_SYSCALL);
 
-ASSYM(IA64_ID_PAGE_SHIFT, IA64_ID_PAGE_SHIFT);
-
 ASSYM(IA64_PBVM_BASE,	IA64_PBVM_BASE);
 ASSYM(IA64_PBVM_PAGE_SHIFT, IA64_PBVM_PAGE_SHIFT);
 ASSYM(IA64_PBVM_PGTBL,	IA64_PBVM_PGTBL);
 ASSYM(IA64_PBVM_RR,	IA64_PBVM_RR);
 
+ASSYM(IA64_VM_MINKERN_REGION, IA64_VM_MINKERN_REGION);
+
 ASSYM(KSTACK_PAGES,	KSTACK_PAGES);
 
 ASSYM(MC_PRESERVED,	offsetof(mcontext_t, mc_preserved));

Modified: head/sys/ia64/ia64/locore.S
==============================================================================
--- head/sys/ia64/ia64/locore.S	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/locore.S	Sat Apr 30 20:49:00 2011	(r221271)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (c) 2001-2011 Marcel Moolenaar
  * Copyright (c) 1998 Doug Rabson
  * All rights reserved.
  *
@@ -26,12 +27,10 @@
  * $FreeBSD$
  */
 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 /*
@@ -40,7 +39,7 @@
  */
 #define	FW_STACK_SIZE	3*PAGE_SIZE
 
-	.section .data.kstack, "aw"
+	.section .ivt.data, "aw"
 	.align	PAGE_SIZE
 	.global	kstack
 kstack:	.space	FW_STACK_SIZE
@@ -82,7 +81,7 @@ ENTRY_NOPROFILE(__start, 1)
 }
 {	.mlx
 	mov	ar.bspstore=r16		// switch backing store
-	movl	r16=pa_bootinfo
+	movl	r16=bootinfo
 	;;
 }
 {	.mmi
@@ -187,124 +186,6 @@ enter_userland:
 }
 END(fork_trampoline)
 
-#ifdef SMP
-/*
- * AP wake-up entry point. The handoff state is similar as for the BSP,
- * as described on page 3-9 of the IPF SAL Specification. The difference
- * lies in the contents of register b0. For APs this register holds the
- * return address into the SAL rendezvous routine.
- *
- * Note that we're responsible for clearing the IRR bit by reading cr.ivr
- * and issuing the EOI to the local SAPIC.
- */
-	.align	32
-ENTRY_NOPROFILE(os_boot_rendez,0)
-	mov	r16=cr.ivr	// clear IRR bit
-	;;
-	srlz.d
-	mov	cr.eoi=r0	// ACK the wake-up
-	;;
-	srlz.d
-	rsm	IA64_PSR_IC|IA64_PSR_I
-	;;
-	mov	r16 = (5<<8)|(PAGE_SHIFT<<2)|1
-	movl	r17 = 5<<61
-	;;
-	mov	rr[r17] = r16
-	;;
-	srlz.d
-	mov	r16 = (6<<8)|(IA64_ID_PAGE_SHIFT<<2)
-	movl	r17 = 6<<61
-	;;
-	mov	rr[r17] = r16
-	;;
-	srlz.d
-	mov	r16 = (7<<8)|(IA64_ID_PAGE_SHIFT<<2)
-	movl	r17 = 7<<61
-	;;
-	mov	rr[r17] = r16
-	;;
-	srlz.d
-	mov	r18 = 28<<2
-	movl	r16 = PTE_PRESENT+PTE_MA_WB+PTE_ACCESSED+PTE_DIRTY+ \
-			PTE_PL_KERN+PTE_AR_RWX+PTE_ED
-	;;
-	mov	cr.ifa = r17
-	mov	cr.itir = r18
-	ptr.d	r17, r18
-	ptr.i	r17, r18
-	;;
-	srlz.i
-	;;
-	itr.d	dtr[r0] = r16
-	mov	r18 = IA64_DCR_DEFAULT
-	;;
-	itr.i	itr[r0] = r16
-	mov	cr.dcr = r18
-	;;
-	srlz.i
-	;;
-1:	mov	r16 = ip
-	add	r17 = 2f-1b, r17
-	movl	r18 = (IA64_PSR_AC|IA64_PSR_BN|IA64_PSR_DFH|IA64_PSR_DT|IA64_PSR_IC|IA64_PSR_IT|IA64_PSR_RT)
-	;;
-	add	r17 = r17, r16
-	mov	cr.ipsr = r18
-	mov	cr.ifs = r0
-	;;
-	mov	cr.iip = r17
-	;;
-	rfi
-
-	.align	32
-2:
-{	.mlx
-	mov	ar.rsc = 0
-	movl	r16 = ia64_vector_table			// set up IVT early
-	;;
-}
-{	.mlx
-	mov	cr.iva = r16
-	movl	r16 = ap_stack
-	;;
-}
-{	.mmi
-	srlz.i
-	;;
-	ld8	r16 = [r16]
-	mov	r18 = KSTACK_PAGES*PAGE_SIZE-SIZEOF_PCB-SIZEOF_TRAPFRAME-16
-	;;
-}
-{	.mlx
-	mov	ar.bspstore = r16
-	movl	gp = __gp
-	;;
-}
-{	.mmi
-	loadrs
-	;;
-	alloc	r17 = ar.pfs, 0, 0, 0, 0
-	add	sp = r18, r16
-	;;
-}
-{	.mib
-	mov	ar.rsc = 3
-	nop	0
-	br.call.sptk.few rp = ia64_ap_startup
-	;;
-}
-	/* NOT REACHED */
-9:
-{	.mib
-	nop	0
-	nop	0
-	br.sptk	9b
-	;;
-}
-END(os_boot_rendez)
-
-#endif /* !SMP */
-
 /*
  * Create a default interrupt name table. The first entry (vector 0) is
  * hardwaired to the clock interrupt.

Modified: head/sys/ia64/ia64/machdep.c
==============================================================================
--- head/sys/ia64/ia64/machdep.c	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/machdep.c	Sat Apr 30 20:49:00 2011	(r221271)
@@ -115,7 +115,6 @@ SYSCTL_UINT(_hw_freq, OID_AUTO, itc, CTL
 
 int cold = 1;
 
-u_int64_t pa_bootinfo;
 struct bootinfo *bootinfo;
 
 struct pcpu pcpu0;
@@ -128,8 +127,9 @@ extern u_int64_t epc_sigtramp[];
 
 struct fpswa_iface *fpswa_iface;
 
-u_int64_t ia64_pal_base;
-u_int64_t ia64_port_base;
+vm_size_t ia64_pal_size;
+vm_paddr_t ia64_pal_base;
+vm_offset_t ia64_port_base;
 
 u_int64_t ia64_lapic_addr = PAL_PIB_DEFAULT_ADDR;
 
@@ -548,15 +548,15 @@ map_vhpt(uintptr_t vhpt)
 	pte |= vhpt & PTE_PPN_MASK;
 
 	__asm __volatile("ptr.d %0,%1" :: "r"(vhpt),
-	    "r"(IA64_ID_PAGE_SHIFT<<2));
+	    "r"(pmap_vhpt_log2size << 2));
 
 	__asm __volatile("mov   %0=psr" : "=r"(psr));
 	__asm __volatile("rsm   psr.ic|psr.i");
 	ia64_srlz_i();
 	ia64_set_ifa(vhpt);
-	ia64_set_itir(IA64_ID_PAGE_SHIFT << 2);
+	ia64_set_itir(pmap_vhpt_log2size << 2);
 	ia64_srlz_d();
-	__asm __volatile("itr.d dtr[%0]=%1" :: "r"(2), "r"(pte));
+	__asm __volatile("itr.d dtr[%0]=%1" :: "r"(3), "r"(pte));
 	__asm __volatile("mov   psr.l=%0" :: "r" (psr));
 	ia64_srlz_i();
 }
@@ -565,25 +565,36 @@ void
 map_pal_code(void)
 {
 	pt_entry_t pte;
+	vm_offset_t va;
+	vm_size_t sz;
 	uint64_t psr;
+	u_int shft;
 
-	if (ia64_pal_base == 0)
+	if (ia64_pal_size == 0)
 		return;
 
+	va = IA64_PHYS_TO_RR7(ia64_pal_base);
+
+	sz = ia64_pal_size;
+	shft = 0;
+	while (sz > 1) {
+		shft++;
+		sz >>= 1;
+	}
+
 	pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY |
 	    PTE_PL_KERN | PTE_AR_RWX;
 	pte |= ia64_pal_base & PTE_PPN_MASK;
 
-	__asm __volatile("ptr.d %0,%1; ptr.i %0,%1" ::
-	    "r"(IA64_PHYS_TO_RR7(ia64_pal_base)), "r"(IA64_ID_PAGE_SHIFT<<2));
+	__asm __volatile("ptr.d %0,%1; ptr.i %0,%1" :: "r"(va), "r"(shft<<2));
 
 	__asm __volatile("mov	%0=psr" : "=r"(psr));
 	__asm __volatile("rsm	psr.ic|psr.i");
 	ia64_srlz_i();
-	ia64_set_ifa(IA64_PHYS_TO_RR7(ia64_pal_base));
-	ia64_set_itir(IA64_ID_PAGE_SHIFT << 2);
+	ia64_set_ifa(va);
+	ia64_set_itir(shft << 2);
 	ia64_srlz_d();
-	__asm __volatile("itr.d	dtr[%0]=%1" :: "r"(1), "r"(pte));
+	__asm __volatile("itr.d	dtr[%0]=%1" :: "r"(4), "r"(pte));
 	ia64_srlz_d();
 	__asm __volatile("itr.i	itr[%0]=%1" :: "r"(1), "r"(pte));
 	__asm __volatile("mov	psr.l=%0" :: "r" (psr));
@@ -598,7 +609,7 @@ map_gateway_page(void)
 
 	pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY |
 	    PTE_PL_KERN | PTE_AR_X_RX;
-	pte |= (uint64_t)ia64_gateway_page & PTE_PPN_MASK;
+	pte |= ia64_tpa((uint64_t)ia64_gateway_page) & PTE_PPN_MASK;
 
 	__asm __volatile("ptr.d %0,%1; ptr.i %0,%1" ::
 	    "r"(VM_MAXUSER_ADDRESS), "r"(PAGE_SHIFT << 2));
@@ -609,9 +620,9 @@ map_gateway_page(void)
 	ia64_set_ifa(VM_MAXUSER_ADDRESS);
 	ia64_set_itir(PAGE_SHIFT << 2);
 	ia64_srlz_d();
-	__asm __volatile("itr.d	dtr[%0]=%1" :: "r"(3), "r"(pte));
+	__asm __volatile("itr.d	dtr[%0]=%1" :: "r"(5), "r"(pte));
 	ia64_srlz_d();
-	__asm __volatile("itr.i	itr[%0]=%1" :: "r"(3), "r"(pte));
+	__asm __volatile("itr.i	itr[%0]=%1" :: "r"(2), "r"(pte));
 	__asm __volatile("mov	psr.l=%0" :: "r" (psr));
 	ia64_srlz_i();
 
@@ -681,17 +692,6 @@ ia64_init(void)
 	 */
 
 	/*
-	 * pa_bootinfo is the physical address of the bootinfo block as
-	 * passed to us by the loader and set in locore.s.
-	 */
-	bootinfo = (struct bootinfo *)(IA64_PHYS_TO_RR7(pa_bootinfo));
-
-	if (bootinfo->bi_magic != BOOTINFO_MAGIC || bootinfo->bi_version != 1) {
-		bzero(bootinfo, sizeof(*bootinfo));
-		bootinfo->bi_kernend = (vm_offset_t)round_page(_end);
-	}
-
-	/*
 	 * Look for the I/O ports first - we need them for console
 	 * probing.
 	 */
@@ -702,6 +702,7 @@ ia64_init(void)
 			    md->md_pages * EFI_PAGE_SIZE);
 			break;
 		case EFI_MD_TYPE_PALCODE:
+			ia64_pal_size = md->md_pages * EFI_PAGE_SIZE;
 			ia64_pal_base = md->md_phys;
 			break;
 		}
@@ -742,6 +743,25 @@ ia64_init(void)
 		kernend = round_page(bootinfo->bi_kernend);
 
 	/*
+	 * Region 6 is direct mapped UC and region 7 is direct mapped
+	 * WC. The details of this is controlled by the Alt {I,D}TLB
+	 * handlers. Here we just make sure that they have the largest
+	 * possible page size to minimise TLB usage.
+	 */
+	ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (PAGE_SHIFT << 2));
+	ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (PAGE_SHIFT << 2));
+	ia64_srlz_d();
+
+	/*
+	 * Wire things up so we can call the firmware.
+	 */
+	map_pal_code();
+	efi_boot_minimal(bootinfo->bi_systab);
+	ia64_xiv_init();
+	ia64_sal_init();
+	calculate_frequencies();
+
+	/*
 	 * Setup the PCPU data for the bootstrap processor. It is needed
 	 * by printf(). Also, since printf() has critical sections, we
 	 * need to initialize at least pc_curthread.
@@ -750,6 +770,7 @@ ia64_init(void)
 	ia64_set_k4((u_int64_t)pcpup);
 	pcpu_init(pcpup, 0, sizeof(pcpu0));
 	dpcpu_init((void *)kernend, 0);
+	PCPU_SET(md.lid, ia64_get_lid());
 	kernend += DPCPU_SIZE;
 	PCPU_SET(curthread, &thread0);
 
@@ -760,26 +781,6 @@ ia64_init(void)
 
 	/* OUTPUT NOW ALLOWED */
 
-	if (ia64_pal_base != 0) {
-		ia64_pal_base &= ~IA64_ID_PAGE_MASK;
-		/*
-		 * We use a TR to map the first 256M of memory - this might
-		 * cover the palcode too.
-		 */
-		if (ia64_pal_base == 0)
-			printf("PAL code mapped by the kernel's TR\n");
-	} else
-		printf("PAL code not found\n");
-
-	/*
-	 * Wire things up so we can call the firmware.
-	 */
-	map_pal_code();
-	efi_boot_minimal(bootinfo->bi_systab);
-	ia64_xiv_init();
-	ia64_sal_init();
-	calculate_frequencies();
-
 	if (metadata_missing)
 		printf("WARNING: loader(8) metadata is missing!\n");
 

Added: head/sys/ia64/ia64/mp_locore.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/ia64/ia64/mp_locore.S	Sat Apr 30 20:49:00 2011	(r221271)
@@ -0,0 +1,275 @@
+/*-
+ * Copyright (c) 2011 Marcel Moolenaar
+ * 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$
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+/*
+ * AP wake-up entry point. The handoff state is similar as for the BSP,
+ * as described on page 3-9 of the IPF SAL Specification. The difference
+ * lies in the contents of register b0. For APs this register holds the
+ * return address into the SAL rendezvous routine.
+ *
+ * Note that we're responsible for clearing the IRR bit by reading cr.ivr
+ * and issuing the EOI to the local SAPIC.
+ */
+	.align	32
+ENTRY_NOPROFILE(os_boot_rendez,0)
+{	.mmi
+	st8	[gp] = gp		// trace = 0x00
+	mov	r8 = cr.ivr		// clear IRR bit
+	add	r2 = 8, gp
+	;;
+}
+{	.mmi
+	srlz.d
+	mov	cr.eoi = r0		// ACK the wake-up
+	add	r3 = 16, gp
+	;;
+}
+{	.mmi
+	srlz.d
+	rsm	IA64_PSR_IC | IA64_PSR_I
+	mov	r16 = (IA64_PBVM_RR << 8) | (IA64_PBVM_PAGE_SHIFT << 2)
+	;;
+}
+{	.mmi
+	srlz.d
+	st8	[gp] = r2		// trace = 0x08
+	dep.z	r17 = IA64_PBVM_RR, 61, 3
+	;;
+}
+{	.mlx
+	mov     rr[r17] = r16
+	movl	r18 = IA64_PBVM_PGTBL
+	;;
+}
+{	.mmi
+	srlz.i
+	;;
+	st8	[gp] = r3		// trace = 0x10
+	nop	0
+	;;
+}
+{	.mmi
+	ld8	r16 = [r2], 16		// as_pgtbl_pte
+	ld8	r17 = [r3], 16		// as_pgtbl_itir
+	nop	0
+	;;
+}
+{	.mmi
+	mov	cr.itir = r17
+	mov	cr.ifa = r18
+	nop	0
+	;;
+}
+{	.mmi
+	srlz.d
+	ptr.d	r18, r17
+	nop	0
+	;;
+}
+{	.mmi
+	srlz.d
+	st8	[gp] = r2		// trace = 0x18
+	mov	r8 = r0
+	;;
+}
+{	.mmi
+	itr.d	dtr[r8] = r16
+	;;
+	srlz.d
+	mov	r9 = r0
+	;;
+}
+{	.mmi
+	ld8	r16 = [r2], 16		// as_text_va
+	st8	[gp] = r3		// trace = 0x20
+	add	r8 = 1, r8
+	;;
+}
+{	.mmi
+	ld8	r17 = [r3], 16		// as_text_pte
+	ld8	r18 = [r2], 16		// as_text_itir
+	nop	0
+	;;
+}
+{	.mmi
+	mov	cr.ifa = r16
+	mov	cr.itir = r18
+	nop	0
+	;;
+}
+{	.mmi
+	srlz.d
+	ptr.d	r16, r18
+	nop	0
+	;;
+}
+{	.mmi
+	srlz.d
+	st8	[gp] = r3		// trace = 0x30
+	nop	0
+	;;
+}
+{	.mmi
+	itr.d	dtr[r8] = r17
+	;;
+	srlz.d
+	nop	0
+}
+{	.mmi
+	st8	[gp] = r2		// trace = 0x38
+	ptr.i	r16, r18
+	add	r8 = 1, r8
+	;;
+}
+{	.mmi
+	srlz.i
+	;;
+	itr.i	itr[r9] = r17
+	nop	0
+	;;
+}
+{	.mmi
+	srlz.i
+	;;
+	ld8	r16 = [r3], 16          // as_data_va
+	add	r9 = 1, r9
+	;;
+}
+{	.mmi
+	st8	[gp] = r3		// trace = 0x40
+	ld8	r17 = [r2], 16		// as_data_pte
+	nop	0
+	;;
+}
+{	.mmi
+	mov	cr.ifa = r16
+	ld8	r18 = [r3], 16		// as_data_itir
+	nop	0
+	;;
+}
+{	.mmi
+	mov	cr.itir = r18
+	;;
+	srlz.d
+	nop	0
+	;;
+}
+{	.mmi
+	ptr.d	r16, r18
+	;;
+	srlz.d
+	mov	r19 = IA64_DCR_DEFAULT
+	;;
+}
+{	.mmi
+	itr.d	dtr[r8] = r17
+	;;
+	srlz.d
+	add	r8 = 1, r8
+	;;
+}
+{	.mmi
+	st8	[gp] = r2		// trace = 0x48
+	;;
+	ld8	r16 = [r2], 16		// as_kstack
+	nop	0
+}
+{	.mmi
+	ld8	r17 = [r3], 16		// as_kstack_top
+	mov	cr.dcr = r19
+	nop	0
+	;;
+}
+{	.mlx
+	srlz.i
+	movl	r18 = IA64_PSR_BN | IA64_PSR_IT | IA64_PSR_DT | IA64_PSR_IC | \
+			IA64_PSR_RT | IA64_PSR_DFH
+	;;
+}
+{	.mlx
+	mov	cr.ipsr = r18
+	movl	r19 = ia64_vector_table		// set up IVT early
+	;;
+}
+{	.mlx
+	mov	cr.iva = r19
+	movl	r18 = 1f
+	;;
+}
+{	.mmi
+	mov	cr.iip = r18
+	mov	cr.ifs = r0
+	nop	0
+	;;
+}
+{	.mmb
+	srlz.d
+	st8	[gp] = r2		// trace = 0x58
+	rfi
+	;;
+}
+
+	.align	32
+1:
+{	.mlx
+	mov	ar.bspstore = r16
+	movl	gp = __gp
+	;;
+}
+{	.mmi
+	loadrs
+	add	sp = -16, r17
+	nop	0
+	;;
+}
+{	.mmi
+	mov	ar.rsc = 3
+	;;
+	alloc	r18 = ar.pfs, 0, 0, 0, 0
+	;;
+}
+{	.mib
+	nop	0
+	nop	0
+	br.call.sptk.few rp = ia64_ap_startup
+	;;
+}
+	/* NOT REACHED */
+9:
+{	.mib
+	nop	0
+	nop	0
+	br.sptk	9b
+	;;
+}
+END(os_boot_rendez)

Modified: head/sys/ia64/ia64/mp_machdep.c
==============================================================================
--- head/sys/ia64/ia64/mp_machdep.c	Sat Apr 30 20:34:52 2011	(r221270)
+++ head/sys/ia64/ia64/mp_machdep.c	Sat Apr 30 20:49:00 2011	(r221271)
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -62,22 +63,18 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+extern uint64_t bdata[];
+
 MALLOC_DEFINE(M_SMP, "SMP", "SMP related allocations");
 
 void ia64_ap_startup(void);
 
-#define	LID_SAPIC(x)		((u_int)((x) >> 16))
-#define	LID_SAPIC_ID(x)		((u_int)((x) >> 24) & 0xff)
-#define	LID_SAPIC_EID(x)	((u_int)((x) >> 16) & 0xff)
-#define	LID_SAPIC_SET(id,eid)	(((id & 0xff) << 8 | (eid & 0xff)) << 16);
-#define	LID_SAPIC_MASK		0xffff0000UL
-
-/* Variables used by os_boot_rendez and ia64_ap_startup */
-struct pcpu *ap_pcpu;
-void *ap_stack;
-volatile int ap_delay;
-volatile int ap_awake;
-volatile int ap_spin;
+#define	SAPIC_ID_GET_ID(x)	((u_int)((x) >> 8) & 0xff)
+#define	SAPIC_ID_GET_EID(x)	((u_int)(x) & 0xff)
+#define	SAPIC_ID_SET(id, eid)	((u_int)(((id) & 0xff) << 8) | ((eid) & 0xff))
+
+/* State used to wake and bootstrap APs. */
+struct ia64_ap_state ia64_ap_state;
 
 int ia64_ipi_ast;
 int ia64_ipi_highfp;
@@ -87,6 +84,21 @@ int ia64_ipi_rndzvs;
 int ia64_ipi_stop;
 
 static u_int
+sz2shft(uint64_t sz)
+{
+	uint64_t s;
+	u_int shft;
+
+	shft = 12;      /* Start with 4K */
+	s = 1 << shft;
+	while (s < sz) {
+		shft++;
+		s <<= 1;
+	}
+	return (shft);
+}
+
+static u_int
 ia64_ih_ast(struct thread *td, u_int xiv, struct trapframe *tf)
 {
 
@@ -180,16 +192,27 @@ ia64_ap_startup(void)
 {
 	uint64_t vhpt;
 
-	pcpup = ap_pcpu;
+	ia64_ap_state.as_trace = 0x100;
+
+	ia64_set_rr(IA64_RR_BASE(5), (5 << 8) | (PAGE_SHIFT << 2) | 1);
+	ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (PAGE_SHIFT << 2));
+	ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (PAGE_SHIFT << 2));
+	ia64_srlz_d();
+
+	pcpup = ia64_ap_state.as_pcpu;
 	ia64_set_k4((intptr_t)pcpup);
 
+	ia64_ap_state.as_trace = 0x108;
+
 	vhpt = PCPU_GET(md.vhpt);
 	map_vhpt(vhpt);
 	ia64_set_pta(vhpt + (1 << 8) + (pmap_vhpt_log2size << 2) + 1);
 	ia64_srlz_i();
 
-	ap_awake = 1;
-	ap_delay = 0;
+	ia64_ap_state.as_trace = 0x110;
+
+	ia64_ap_state.as_awake = 1;
+	ia64_ap_state.as_delay = 0;
 
 	map_pal_code();
 	map_gateway_page();
@@ -197,14 +220,14 @@ ia64_ap_startup(void)
 	ia64_set_fpsr(IA64_FPSR_DEFAULT);
 
 	/* Wait until it's time for us to be unleashed */
-	while (ap_spin)
+	while (ia64_ap_state.as_spin)
 		cpu_spinwait();
 
 	/* Initialize curthread. */
 	KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
 	PCPU_SET(curthread, PCPU_GET(idlethread));
 
-	atomic_add_int(&ap_awake, 1);
+	atomic_add_int(&ia64_ap_state.as_awake, 1);
 	while (!smp_started)
 		cpu_spinwait();
 
@@ -253,18 +276,18 @@ cpu_mp_probe(void)
 }
 
 void
-cpu_mp_add(u_int acpiid, u_int apicid, u_int apiceid)
+cpu_mp_add(u_int acpi_id, u_int id, u_int eid)
 {
 	struct pcpu *pc;
-	u_int64_t lid;
 	void *dpcpu;
-	u_int cpuid;
+	u_int cpuid, sapic_id;
 
-	lid = LID_SAPIC_SET(apicid, apiceid);
-	cpuid = ((ia64_get_lid() & LID_SAPIC_MASK) == lid) ? 0 : smp_cpus++;
+	sapic_id = SAPIC_ID_SET(id, eid);
+	cpuid = (IA64_LID_GET_SAPIC_ID(ia64_get_lid()) == sapic_id)
+	    ? 0 : smp_cpus++;
 
 	KASSERT((all_cpus & (1UL << cpuid)) == 0,
-	    ("%s: cpu%d already in CPU map", __func__, acpiid));
+	    ("%s: cpu%d already in CPU map", __func__, acpi_id));
 
 	if (cpuid != 0) {
 		pc = (struct pcpu *)malloc(sizeof(*pc), M_SMP, M_WAITOK);
@@ -274,23 +297,26 @@ cpu_mp_add(u_int acpiid, u_int apicid, u
 	} else
 		pc = pcpup;
 
-	pc->pc_acpi_id = acpiid;
-	pc->pc_md.lid = lid;
-	all_cpus |= (1UL << cpuid);
+	pc->pc_acpi_id = acpi_id;
+	pc->pc_md.lid = IA64_LID_SET_SAPIC_ID(sapic_id);
+
+	all_cpus |= (1UL << pc->pc_cpuid);
 }
 
 void
 cpu_mp_announce()
 {
 	struct pcpu *pc;
+	uint32_t sapic_id;
 	int i;
 
 	for (i = 0; i <= mp_maxid; i++) {
 		pc = pcpu_find(i);
 		if (pc != NULL) {
+			sapic_id = IA64_LID_GET_SAPIC_ID(pc->pc_md.lid);
 			printf("cpu%d: ACPI Id=%x, SAPIC Id=%x, SAPIC Eid=%x",
-			    i, pc->pc_acpi_id, LID_SAPIC_ID(pc->pc_md.lid),
-			    LID_SAPIC_EID(pc->pc_md.lid));
+			    i, pc->pc_acpi_id, SAPIC_ID_GET_ID(sapic_id),
+			    SAPIC_ID_GET_EID(sapic_id));
 			if (i == 0)
 				printf(" (BSP)\n");
 			else

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 22:07: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 3F52D106566C;
	Sat, 30 Apr 2011 22:07:05 +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 27B0C8FC0A;
	Sat, 30 Apr 2011 22:07: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 p3UM75Lw064163;
	Sat, 30 Apr 2011 22:07:05 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UM74JH064153;
	Sat, 30 Apr 2011 22:07:04 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201104302207.p3UM74JH064153@svn.freebsd.org>
From: Martin Matuska 
Date: Sat, 30 Apr 2011 22:07:04 +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: r221274 - in stable/8: contrib/gcc
	contrib/gcc/config/i386 contrib/gcc/config/mips
	contrib/gcc/config/rs6000 contrib/gcc/config/s390
	contrib/gcc/cp contrib/gcc/doc contrib/libstdc++ con...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 22:07:05 -0000

Author: mm
Date: Sat Apr 30 22:07:04 2011
New Revision: 221274
URL: http://svn.freebsd.org/changeset/base/221274

Log:
  MFC 219374, 219376, 219639, 219640, 219697, 219711, 220150:
  
  MFC r219374:
  Backport Intel Core 2 and AMD Geode CPU types from gcc-4.3 (GPLv2)
  These options are supported in this shape in all newer GCC versions.
  
  Source:	gcc-4_3-branch (rev. 118090, 118973, 120846; GPLv2)
  
  MFC r219376:
  Add AMD Geode CPU type to bsd.cpu.mk and examples/etc/make.conf
  For CPUTYPE=core2 use -march=core2
  
  MFC r219639:
  Backport SSSE3 instruction set support to base gcc.
  Enabled by default for -march=core2
  
  Source:	gcc-4_3-branch (rev. 117958, 121687, 121726, 123639; GPLv2)
  
  MFC r219640:
  Add ssse3 capability for CPUTYPE=core2 to MACHINE_CPU in bsd.cpu.mk
  
  MFC r219697:
  Fix -march/-mtune=native autodetection for Intel Core 2 CPUs
  
  Source:	gcc-4_3-branch (partial rev. 119454; GPLv2)
  
  MFC r219711:
  Backport missing tunings for -march=core2:
  - enable extra 80387 mathematical constants (ext_80387_constants)
  - enable compare and exchange 16 bytes (cmpxchg16b)
  
  Verified against llvm-gcc (and apple gcc)
  Source:	gcc-4_3-branch (ref. svn revs. 119260, 121140; GPLv2)
  
  MFC r220150:
  Upgrade of base gcc and libstdc++ to the last GPLv2-licensed revision
  (rev. 127959 of gcc-4_2-branch).
  
  Resolved GCC bugs:
  	c++: 17763, 29365, 30535, 30917, 31337, 31941, 32108, 32112, 32346,
  	     32898, 32992
  	debug: 32610, 32914
  	libstdc++: 33084, 33128
  	middle-end: 32563
  	rtl-optimization: 33148
  	tree-optimization: 25413, 32723
  	target: 32218
  
  Source:	gcc-4_2-branch (up to rev. 127959)
  
  Obtained from:	gcc (var. revs of gcc-4_2-branch and gcc-4_3-branch; GPLv2)
  PR:		gnu/153298, gnu/153959, gnu/154385, gnu/155308

Added:
  stable/8/contrib/gcc/config/i386/geode.md
     - copied unchanged from r219374, head/contrib/gcc/config/i386/geode.md
  stable/8/contrib/gcc/config/i386/tmmintrin.h
     - copied unchanged from r219639, head/contrib/gcc/config/i386/tmmintrin.h
Modified:
  stable/8/contrib/gcc/BASE-VER
  stable/8/contrib/gcc/ChangeLog
  stable/8/contrib/gcc/DATESTAMP
  stable/8/contrib/gcc/DEV-PHASE
  stable/8/contrib/gcc/config.gcc
  stable/8/contrib/gcc/config/i386/driver-i386.c
  stable/8/contrib/gcc/config/i386/i386.c
  stable/8/contrib/gcc/config/i386/i386.h
  stable/8/contrib/gcc/config/i386/i386.md
  stable/8/contrib/gcc/config/i386/i386.opt
  stable/8/contrib/gcc/config/i386/sse.md
  stable/8/contrib/gcc/config/i386/xmmintrin.h
  stable/8/contrib/gcc/config/mips/predicates.md
  stable/8/contrib/gcc/config/rs6000/rs6000.c
  stable/8/contrib/gcc/config/s390/s390.md
  stable/8/contrib/gcc/cp/ChangeLog
  stable/8/contrib/gcc/cp/call.c
  stable/8/contrib/gcc/cp/cp-tree.h
  stable/8/contrib/gcc/cp/cxx-pretty-print.c
  stable/8/contrib/gcc/cp/decl.c
  stable/8/contrib/gcc/cp/decl2.c
  stable/8/contrib/gcc/cp/error.c
  stable/8/contrib/gcc/cp/lex.c
  stable/8/contrib/gcc/cp/name-lookup.c
  stable/8/contrib/gcc/cp/pt.c
  stable/8/contrib/gcc/cp/semantics.c
  stable/8/contrib/gcc/cp/typeck.c
  stable/8/contrib/gcc/doc/contrib.texi
  stable/8/contrib/gcc/doc/extend.texi
  stable/8/contrib/gcc/doc/gcc.1
  stable/8/contrib/gcc/doc/invoke.texi
  stable/8/contrib/gcc/dwarf2out.c
  stable/8/contrib/gcc/expr.c
  stable/8/contrib/gcc/fold-const.c
  stable/8/contrib/gcc/gimplify.c
  stable/8/contrib/gcc/reload1.c
  stable/8/contrib/gcc/simplify-rtx.c
  stable/8/contrib/gcc/target-def.h
  stable/8/contrib/gcc/target.h
  stable/8/contrib/gcc/targhooks.c
  stable/8/contrib/gcc/targhooks.h
  stable/8/contrib/gcc/tree-if-conv.c
  stable/8/contrib/gcc/tree-ssa-structalias.c
  stable/8/contrib/gcc/tree-vect-analyze.c
  stable/8/contrib/gcc/tree-vect-patterns.c
  stable/8/contrib/gcc/tree.c
  stable/8/contrib/gcc/tree.h
  stable/8/contrib/libstdc++/ChangeLog
  stable/8/contrib/libstdc++/include/std/std_valarray.h
  stable/8/contrib/libstdc++/include/tr1/random
  stable/8/share/examples/etc/make.conf
  stable/8/share/mk/bsd.cpu.mk
Directory Properties:
  stable/8/contrib/gcc/   (props changed)
  stable/8/contrib/libstdc++/   (props changed)
  stable/8/share/examples/   (props changed)
  stable/8/share/examples/cvsup/   (props changed)
  stable/8/share/mk/   (props changed)

Modified: stable/8/contrib/gcc/BASE-VER
==============================================================================
--- stable/8/contrib/gcc/BASE-VER	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/BASE-VER	Sat Apr 30 22:07:04 2011	(r221274)
@@ -1 +1 @@
-4.2.1
+4.2.2

Modified: stable/8/contrib/gcc/ChangeLog
==============================================================================
--- stable/8/contrib/gcc/ChangeLog	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/ChangeLog	Sat Apr 30 22:07:04 2011	(r221274)
@@ -1,3 +1,121 @@
+2007-08-31  Jakub Jelinek  
+
+	PR rtl-optimization/33148
+	* simplify-rtx.c (simplify_unary_operation_1): Only optimize
+	(neg (lt X 0)) if X has scalar int mode.
+
+	PR debug/32914
+	* dwarf2out.c (rtl_for_decl_init): If vector decl has CONSTRUCTOR
+	initializer, use build_vector_from_ctor if possible to create
+	VECTOR_CST out of it.  If vector initializer is not VECTOR_CST
+	even after this, return NULL.
+
+2007-08-27  Jason Merrill  
+
+	PR c++/31337
+	* gimplify.c (gimplify_modify_expr): Discard the assignment of 
+	zero-sized types after calling gimplify_modify_expr_rhs.
+
+2007-08-24  Jakub Jelinek  
+
+	PR debug/32610
+	* dwarf2out.c (gen_decl_die): Don't call
+	gen_tagged_type_instantiation_die if decl doesn't have tagged type.
+
+2007-08-24  Richard Guenther  
+
+	* expr.c (get_inner_reference): Remove unused variable.
+
+2007-08-24  Richard Guenther  
+
+	* expr.c (get_inner_reference): Do computation of bitoffset
+	from offset in a way we can detect overflow reliably.
+
+2007-08-22  Richard Guenther  
+
+	PR middle-end/32563
+	* tree.c (host_integerp): Treat sizetype as signed as it is
+	sign-extended.
+
+2007-08-20  Adam Nemet  
+
+	* config/mips/predicates.md (const_call_insn_operand): Invoke
+	SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs.
+
+2007-08-17  Chen liqin  
+
+        * config/score/score.md : Update pattern tablejump.
+        * config/score/score.c : Update score_initialize_trampoline 
+        function.
+        * config/score/score.h (TRAMPOLINE_TEMPLATE): Added macro.
+        (TRAMPOLINE_INSNS, TRAMPOLINE_SIZE) Update macro.
+        * doc/contrib.texi: Add my entry.
+
+2007-08-02  Andreas Krebbel  
+
+	* config/s390/s390.md ("*xordi3_cconly"): Change xr to xg.
+
+2007-08-01  Andreas Krebbel  
+
+	* config/s390/s390.md (TF in GPR splitter): Change operand_subword
+	parameter to TFmode.
+
+2007-07-30  Mark Mitchell  
+
+	* BASE-VER: Bump.
+	* DEV-PHASE: Mark as prerelease.
+
+2007-07-25  Steve Ellcey  
+
+	PR target/32218
+	* tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type.
+
+2007-07-25  Dorit Nuzman  
+	    Devang Patel  
+
+	PR tree-optimization/25413
+	* targhooks.c (default_builtin_vector_alignment_reachable): New.
+	* targhooks.h (default_builtin_vector_alignment_reachable): New.
+	* tree.h (contains_packed_reference): New.
+	* expr.c (contains_packed_reference): New.
+	* tree-vect-analyze.c (vector_alignment_reachable_p): New.
+	(vect_enhance_data_refs_alignment): Call
+	vector_alignment_reachable_p.
+	* target.h (vector_alignment_reachable): New builtin.
+	* target-def.h (TARGET_VECTOR_ALIGNMENT_REACHABLE): New.
+	* config/rs6000/rs6000.c (rs6000_vector_alignment_reachable): New.
+	(TARGET_VECTOR_ALIGNMENT_REACHABLE): Define.
+
+2007-07-24  Richard Guenther  
+
+	Backport from mainline:
+	2007-07-16  Richard Guenther  
+		    Uros Bizjak  
+
+	* tree-if-conv.c (find_phi_replacement_condition): Unshare "*cond"
+	before forcing it to gimple operand.
+
+2007-07-24  Richard Guenther  
+
+	PR tree-optimization/32723
+	Backport from mainline:
+	2007-03-09  Daniel Berlin  
+
+        * tree-ssa-structalias.c (shared_bitmap_info_t): New structure.
+        (shared_bitmap_table): New variable.
+        (shared_bitmap_hash): New function.
+        (shared_bitmap_eq): Ditto
+        (shared_bitmap_lookup): Ditto.
+        (shared_bitmap_add): Ditto.
+        (find_what_p_points_to): Rewrite to use shared bitmap hashtable.
+        (init_alias_vars): Init shared bitmap hashtable.
+        (delete_points_to_sets): Delete shared bitmap hashtable.
+
+2007-07-23  Bernd Schmidt  
+
+	* reload1.c (choose_reload_regs): Set reload_spill_index for regs
+	chosen during find_reloads.
+
 2007-07-19  Release Manager
 
 	* GCC 4.2.1 released.

Modified: stable/8/contrib/gcc/DATESTAMP
==============================================================================
--- stable/8/contrib/gcc/DATESTAMP	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/DATESTAMP	Sat Apr 30 22:07:04 2011	(r221274)
@@ -1 +1 @@
-20070719
+20070831

Modified: stable/8/contrib/gcc/DEV-PHASE
==============================================================================
--- stable/8/contrib/gcc/DEV-PHASE	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/DEV-PHASE	Sat Apr 30 22:07:04 2011	(r221274)
@@ -0,0 +1 @@
+prerelease

Modified: stable/8/contrib/gcc/config.gcc
==============================================================================
--- stable/8/contrib/gcc/config.gcc	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/config.gcc	Sat Apr 30 22:07:04 2011	(r221274)
@@ -268,11 +268,13 @@ xscale-*-*)
 	;;
 i[34567]86-*-*)
 	cpu_type=i386
-	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h"
+	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
+		       pmmintrin.h tmmintrin.h"
 	;;
 x86_64-*-*)
 	cpu_type=i386
-	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h"
+	extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h
+		       pmmintrin.h tmmintrin.h"
 	need_64bit_hwint=yes
 	;;
 ia64-*-*)
@@ -1207,14 +1209,14 @@ i[34567]86-*-solaris2*)
 		# FIXME: -m64 for i[34567]86-*-* should be allowed just
 		# like -m32 for x86_64-*-*.
 		case X"${with_cpu}" in
-		Xgeneric|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx)
+		Xgeneric|Xcore2|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx)
 			;;
 		X)
 			with_cpu=generic
 			;;
 		*)
 			echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
-			echo "generic nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2
+			echo "generic core2 nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2
 			exit 1
 			;;
 		esac
@@ -2537,6 +2539,9 @@ if test x$with_cpu = x ; then
         nocona-*)
           with_cpu=nocona
           ;;
+	core2-*)
+	  with_cpu=core2
+	  ;;
         pentium_m-*)
           with_cpu=pentium-m
           ;;
@@ -2556,6 +2561,9 @@ if test x$with_cpu = x ; then
         nocona-*)
           with_cpu=nocona
           ;;
+	core2-*)
+	  with_cpu=core2
+	  ;;
         *)
           with_cpu=generic
           ;;
@@ -2787,7 +2795,7 @@ case "${target}" in
 				esac
 				# OK
 				;;
-			"" | k8 | opteron | athlon64 | athlon-fx | nocona | generic)
+			"" | k8 | opteron | athlon64 | athlon-fx | nocona | core2 | generic)
 				# OK
 				;;
 			*)

Modified: stable/8/contrib/gcc/config/i386/driver-i386.c
==============================================================================
--- stable/8/contrib/gcc/config/i386/driver-i386.c	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/config/i386/driver-i386.c	Sat Apr 30 22:07:04 2011	(r221274)
@@ -39,6 +39,7 @@ const char *host_detect_local_cpu (int a
 #define bit_SSE2 (1 << 26)
 
 #define bit_SSE3 (1 << 0)
+#define bit_SSSE3 (1 << 9)
 #define bit_CMPXCHG16B (1 << 13)
 
 #define bit_3DNOW (1 << 31)
@@ -66,7 +67,7 @@ const char *host_detect_local_cpu (int a
   unsigned int vendor;
   unsigned int ext_level;
   unsigned char has_mmx = 0, has_3dnow = 0, has_3dnowp = 0, has_sse = 0;
-  unsigned char has_sse2 = 0, has_sse3 = 0, has_cmov = 0;
+  unsigned char has_sse2 = 0, has_sse3 = 0, has_ssse3 = 0, has_cmov = 0;
   unsigned char has_longmode = 0, has_cmpxchg8b = 0;
   unsigned char is_amd = 0;
   unsigned int family = 0;
@@ -107,6 +108,7 @@ const char *host_detect_local_cpu (int a
   has_sse = !!(edx & bit_SSE);
   has_sse2 = !!(edx & bit_SSE2);
   has_sse3 = !!(ecx & bit_SSE3);
+  has_ssse3 = !!(ecx & bit_SSSE3);
   /* We don't care for extended family.  */
   family = (eax >> 8) & ~(1 << 4);
 
@@ -148,7 +150,9 @@ const char *host_detect_local_cpu (int a
 	  /* We have no idea.  Use something reasonable.  */
 	  if (arch)
 	    {
-	      if (has_sse3)
+	      if (has_ssse3)
+		cpu = "core2";
+	      else if (has_sse3)
 		{
 		  if (has_longmode)
 		    cpu = "nocona";
@@ -230,6 +234,9 @@ const char *host_detect_local_cpu (int a
 	  cpu = "generic";
 	}
       break;
+    case PROCESSOR_GEODE:
+      cpu = "geode";
+      break;
     case PROCESSOR_K6:
       if (has_3dnow)
         cpu = "k6-3";

Copied: stable/8/contrib/gcc/config/i386/geode.md (from r219374, head/contrib/gcc/config/i386/geode.md)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/8/contrib/gcc/config/i386/geode.md	Sat Apr 30 22:07:04 2011	(r221274, copy of r219374, head/contrib/gcc/config/i386/geode.md)
@@ -0,0 +1,153 @@
+;; Geode Scheduling
+;; Copyright (C) 2006
+;; Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+;;
+;; The Geode architecture is one insn issue processor.
+;;
+;; This description is based on data from the following documents:
+;;
+;;    "AMD Geode GX Processor Data Book"
+;;    Advanced Micro Devices, Inc., Aug 2005.
+;;
+;;    "AMD Geode LX Processor Data Book"
+;;    Advanced Micro Devices, Inc., Jan 2006.
+;;
+;;
+;; CPU execution units of the Geode:
+;;
+;; issue	describes the issue pipeline.
+;; alu		describes the Integer unit
+;; fpu		describes the FP unit
+;;
+;; The fp unit is out of order execution unit with register renaming.
+;; There is also memory management unit and execution pipeline for
+;; load/store operations.  We ignore it and difference between insns
+;; using memory and registers.
+
+(define_automaton "geode")
+
+(define_cpu_unit "geode_issue,geode_alu,geode_fpu" "geode")
+
+(define_insn_reservation "alu" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "alu,alu1,negnot,icmp,lea,test,imov,imovx,icmov,incdec,setcc"))
+			 "geode_issue,geode_alu")
+
+(define_insn_reservation "shift" 2
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "ishift,ishift1,rotate,rotate1,cld"))
+			 "geode_issue,geode_alu*2")
+
+(define_insn_reservation "imul" 7
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "imul"))
+			 "geode_issue,geode_alu*7")
+
+(define_insn_reservation "idiv" 40
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "idiv"))
+			 "geode_issue,geode_alu*40")
+
+;; The branch unit.
+(define_insn_reservation "call" 2
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "call,callv"))
+			 "geode_issue,geode_alu*2")
+
+(define_insn_reservation "geode_branch" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "ibr"))
+			 "geode_issue,geode_alu")
+
+(define_insn_reservation "geode_pop_push" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "pop,push"))
+			 "geode_issue,geode_alu")
+
+(define_insn_reservation "geode_leave" 2
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "leave"))
+			 "geode_issue,geode_alu*2")
+
+(define_insn_reservation "geode_load_str" 4
+			 (and (eq_attr "cpu" "geode")
+			      (and (eq_attr "type" "str")
+				   (eq_attr "memory" "load,both")))
+			 "geode_issue,geode_alu*4")
+
+(define_insn_reservation "geode_store_str" 2
+			 (and (eq_attr "cpu" "geode")
+			      (and (eq_attr "type" "str")
+				   (eq_attr "memory" "store")))
+			 "geode_issue,geode_alu*2")
+
+;; Be optimistic
+(define_insn_reservation "geode_unknown" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "multi,other"))
+			 "geode_issue,geode_alu")
+
+;; FPU
+
+(define_insn_reservation "geode_fop" 6
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fop,fcmp"))
+			 "geode_issue,geode_fpu*6")
+
+(define_insn_reservation "geode_fsimple" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fmov,fcmov,fsgn,fxch"))
+			 "geode_issue,geode_fpu")
+
+(define_insn_reservation "geode_fist" 4
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fistp,fisttp"))
+			 "geode_issue,geode_fpu*4")
+
+(define_insn_reservation "geode_fmul" 10
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fmul"))
+			 "geode_issue,geode_fpu*10")
+
+(define_insn_reservation "geode_fdiv" 47
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fdiv"))
+			 "geode_issue,geode_fpu*47")
+
+;; We use minimal latency (fsin) here
+(define_insn_reservation "geode_fpspc" 54
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "fpspc"))
+			 "geode_issue,geode_fpu*54")
+
+(define_insn_reservation "geode_frndint" 12
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "frndint"))
+			 "geode_issue,geode_fpu*12")
+
+(define_insn_reservation "geode_mmxmov" 1
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "mmxmov"))
+			 "geode_issue,geode_fpu")
+
+(define_insn_reservation "geode_mmx" 2
+			 (and (eq_attr "cpu" "geode")
+			      (eq_attr "type" "mmx,mmxadd,mmxmul,mmxcmp,mmxcvt,mmxshft"))
+			 "geode_issue,geode_fpu*2")

Modified: stable/8/contrib/gcc/config/i386/i386.c
==============================================================================
--- stable/8/contrib/gcc/config/i386/i386.c	Sat Apr 30 21:55:08 2011	(r221273)
+++ stable/8/contrib/gcc/config/i386/i386.c	Sat Apr 30 22:07:04 2011	(r221274)
@@ -336,6 +336,60 @@ struct processor_costs pentiumpro_cost =
 };
 
 static const
+struct processor_costs geode_cost = {
+  COSTS_N_INSNS (1),			/* cost of an add instruction */
+  COSTS_N_INSNS (1),			/* cost of a lea instruction */
+  COSTS_N_INSNS (2),			/* variable shift costs */
+  COSTS_N_INSNS (1),			/* constant shift costs */
+  {COSTS_N_INSNS (3),			/* cost of starting multiply for QI */
+   COSTS_N_INSNS (4),			/*                               HI */
+   COSTS_N_INSNS (7),			/*                               SI */
+   COSTS_N_INSNS (7),			/*                               DI */
+   COSTS_N_INSNS (7)},			/*                               other */
+  0,					/* cost of multiply per each bit set */
+  {COSTS_N_INSNS (15),			/* cost of a divide/mod for QI */
+   COSTS_N_INSNS (23),			/*                          HI */
+   COSTS_N_INSNS (39),			/*                          SI */
+   COSTS_N_INSNS (39),			/*                          DI */
+   COSTS_N_INSNS (39)},			/*                          other */
+  COSTS_N_INSNS (1),			/* cost of movsx */
+  COSTS_N_INSNS (1),			/* cost of movzx */
+  8,					/* "large" insn */
+  4,					/* MOVE_RATIO */
+  1,					/* cost for loading QImode using movzbl */
+  {1, 1, 1},				/* cost of loading integer registers
+					   in QImode, HImode and SImode.
+					   Relative to reg-reg move (2).  */
+  {1, 1, 1},				/* cost of storing integer registers */
+  1,					/* cost of reg,reg fld/fst */
+  {1, 1, 1},				/* cost of loading fp registers
+					   in SFmode, DFmode and XFmode */
+  {4, 6, 6},				/* cost of storing fp registers
+					   in SFmode, DFmode and XFmode */
+
+  1,					/* cost of moving MMX register */
+  {1, 1},				/* cost of loading MMX registers
+					   in SImode and DImode */
+  {1, 1},				/* cost of storing MMX registers
+					   in SImode and DImode */
+  1,					/* cost of moving SSE register */
+  {1, 1, 1},				/* cost of loading SSE registers
+					   in SImode, DImode and TImode */
+  {1, 1, 1},				/* cost of storing SSE registers
+					   in SImode, DImode and TImode */
+  1,					/* MMX or SSE register to integer */
+  32,					/* size of prefetch block */
+  1,					/* number of parallel prefetches */
+  1,					/* Branch cost */
+  COSTS_N_INSNS (6),			/* cost of FADD and FSUB insns.  */
+  COSTS_N_INSNS (11),			/* cost of FMUL instruction.  */
+  COSTS_N_INSNS (47),			/* cost of FDIV instruction.  */
+  COSTS_N_INSNS (1),			/* cost of FABS instruction.  */
+  COSTS_N_INSNS (1),			/* cost of FCHS instruction.  */
+  COSTS_N_INSNS (54),			/* cost of FSQRT instruction.  */
+};
+
+static const
 struct processor_costs k6_cost = {
   COSTS_N_INSNS (1),			/* cost of an add instruction */
   COSTS_N_INSNS (2),			/* cost of a lea instruction */
@@ -600,6 +654,58 @@ struct processor_costs nocona_cost = {
   COSTS_N_INSNS (44),			/* cost of FSQRT instruction.  */
 };
 
+static const
+struct processor_costs core2_cost = {
+  COSTS_N_INSNS (1),			/* cost of an add instruction */
+  COSTS_N_INSNS (1) + 1,		/* cost of a lea instruction */
+  COSTS_N_INSNS (1),			/* variable shift costs */
+  COSTS_N_INSNS (1),			/* constant shift costs */
+  {COSTS_N_INSNS (3),			/* cost of starting multiply for QI */
+   COSTS_N_INSNS (3),			/*                               HI */
+   COSTS_N_INSNS (3),			/*                               SI */
+   COSTS_N_INSNS (3),			/*                               DI */
+   COSTS_N_INSNS (3)},			/*                               other */
+  0,					/* cost of multiply per each bit set */
+  {COSTS_N_INSNS (22),			/* cost of a divide/mod for QI */
+   COSTS_N_INSNS (22),			/*                          HI */
+   COSTS_N_INSNS (22),			/*                          SI */
+   COSTS_N_INSNS (22),			/*                          DI */
+   COSTS_N_INSNS (22)},			/*                          other */
+  COSTS_N_INSNS (1),			/* cost of movsx */
+  COSTS_N_INSNS (1),			/* cost of movzx */
+  8,					/* "large" insn */
+  16,					/* MOVE_RATIO */
+  2,					/* cost for loading QImode using movzbl */
+  {6, 6, 6},				/* cost of loading integer registers
+					   in QImode, HImode and SImode.
+					   Relative to reg-reg move (2).  */
+  {4, 4, 4},				/* cost of storing integer registers */
+  2,					/* cost of reg,reg fld/fst */
+  {6, 6, 6},				/* cost of loading fp registers
+					   in SFmode, DFmode and XFmode */
+  {4, 4, 4},				/* cost of loading integer registers */
+  2,					/* cost of moving MMX register */
+  {6, 6},				/* cost of loading MMX registers
+					   in SImode and DImode */
+  {4, 4},				/* cost of storing MMX registers
+					   in SImode and DImode */
+  2,					/* cost of moving SSE register */
+  {6, 6, 6},				/* cost of loading SSE registers
+					   in SImode, DImode and TImode */
+  {4, 4, 4},				/* cost of storing SSE registers
+					   in SImode, DImode and TImode */
+  2,					/* MMX or SSE register to integer */
+  128,					/* size of prefetch block */
+  8,					/* number of parallel prefetches */
+  3,					/* Branch cost */
+  COSTS_N_INSNS (3),			/* cost of FADD and FSUB insns.  */
+  COSTS_N_INSNS (5),			/* cost of FMUL instruction.  */
+  COSTS_N_INSNS (32),			/* cost of FDIV instruction.  */
+  COSTS_N_INSNS (1),			/* cost of FABS instruction.  */
+  COSTS_N_INSNS (1),			/* cost of FCHS instruction.  */
+  COSTS_N_INSNS (58),			/* cost of FSQRT instruction.  */
+};
+
 /* Generic64 should produce code tuned for Nocona and K8.  */
 static const
 struct processor_costs generic64_cost = {
@@ -721,38 +827,41 @@ const struct processor_costs *ix86_cost 
 #define m_486 (1<mask, d->name, type, d->code);
     }
 
+  /* Add all builtins that are more or less simple operations on 1 operand.  */
+  for (i = 0, d = bdesc_1arg; i < ARRAY_SIZE (bdesc_1arg); i++, d++)
+    {
+      enum machine_mode mode;
+      tree type;
+
+      if (d->name == 0)
+	continue;
+      mode = insn_data[d->icode].operand[1].mode;
+
+      switch (mode)
+	{
+	case V16QImode:
+	  type = v16qi_ftype_v16qi;
+	  break;
+	case V8HImode:
+	  type = v8hi_ftype_v8hi;
+	  break;
+	case V4SImode:
+	  type = v4si_ftype_v4si;
+	  break;
+	case V2DFmode:
+	  type = v2df_ftype_v2df;
+	  break;
+	case V4SFmode:
+	  type = v4sf_ftype_v4sf;
+	  break;
+	case V8QImode:
+	  type = v8qi_ftype_v8qi;
+	  break;
+	case V4HImode:
+	  type = v4hi_ftype_v4hi;
+	  break;
+	case V2SImode:
+	  type = v2si_ftype_v2si;
+	  break;
+
+	default:
+	  abort ();
+	}
+
+      def_builtin (d->mask, d->name, type, d->code);
+    }
+
   /* Add the remaining MMX insns with somewhat more complicated types.  */
   def_builtin (MASK_MMX, "__builtin_ia32_emms", void_ftype_void, IX86_BUILTIN_EMMS);
   def_builtin (MASK_MMX, "__builtin_ia32_psllw", v4hi_ftype_v4hi_di, IX86_BUILTIN_PSLLW);
@@ -15531,6 +15798,12 @@ ix86_init_mmx_sse_builtins (void)
   def_builtin (MASK_SSE3, "__builtin_ia32_lddqu",
 	       v16qi_ftype_pcchar, IX86_BUILTIN_LDDQU);
 
+  /* SSSE3.  */
+  def_builtin (MASK_SSSE3, "__builtin_ia32_palignr128",
+	       v2di_ftype_v2di_v2di_int, IX86_BUILTIN_PALIGNR128);
+  def_builtin (MASK_SSSE3, "__builtin_ia32_palignr", di_ftype_di_di_int,
+	       IX86_BUILTIN_PALIGNR);
+
   /* Access to the vec_init patterns.  */
   ftype = build_function_type_list (V2SI_type_node, integer_type_node,
 				    integer_type_node, NULL_TREE);
@@ -16029,7 +16302,7 @@ ix86_expand_builtin (tree exp, rtx targe
   tree arglist = TREE_OPERAND (exp, 1);
   tree arg0, arg1, arg2;
   rtx op0, op1, op2, pat;
-  enum machine_mode tmode, mode0, mode1, mode2;
+  enum machine_mode tmode, mode0, mode1, mode2, mode3;
   unsigned int fcode = DECL_FUNCTION_CODE (fndecl);
 
   switch (fcode)
@@ -16499,6 +16772,52 @@ ix86_expand_builtin (tree exp, rtx targe
       return ix86_expand_unop_builtin (CODE_FOR_sse3_lddqu, arglist,
 				       target, 1);
 
+    case IX86_BUILTIN_PALIGNR:
+    case IX86_BUILTIN_PALIGNR128:
+      if (fcode == IX86_BUILTIN_PALIGNR)
+	{
+	  icode = CODE_FOR_ssse3_palignrdi;
+	  mode = DImode;
+	}
+      else
+	{
+	  icode = CODE_FOR_ssse3_palignrti;
+	  mode = V2DImode;
+	}
+      arg0 = TREE_VALUE (arglist);
+      arg1 = TREE_VALUE (TREE_CHAIN (arglist));
+      arg2 = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
+      op0 = expand_expr (arg0, NULL_RTX, VOIDmode, 0);
+      op1 = expand_expr (arg1, NULL_RTX, VOIDmode, 0);
+      op2 = expand_expr (arg2, NULL_RTX, VOIDmode, 0);
+      tmode = insn_data[icode].operand[0].mode;
+      mode1 = insn_data[icode].operand[1].mode;
+      mode2 = insn_data[icode].operand[2].mode;

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

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 22:15: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 1C27E1065676;
	Sat, 30 Apr 2011 22:15:15 +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 08B808FC0A;
	Sat, 30 Apr 2011 22:15: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 p3UMFExg064446;
	Sat, 30 Apr 2011 22:15:14 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UMFEA3064444;
	Sat, 30 Apr 2011 22:15:14 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201104302215.p3UMFEA3064444@svn.freebsd.org>
From: Martin Matuska 
Date: Sat, 30 Apr 2011 22:15:14 +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: r221275 - stable/8/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: Sat, 30 Apr 2011 22:15:15 -0000

Author: mm
Date: Sat Apr 30 22:15:14 2011
New Revision: 221275
URL: http://svn.freebsd.org/changeset/base/221275

Log:
  Bump __FreeBSD_version for the gcc MFC (r220150)

Modified:
  stable/8/sys/sys/param.h

Modified: stable/8/sys/sys/param.h
==============================================================================
--- stable/8/sys/sys/param.h	Sat Apr 30 22:07:04 2011	(r221274)
+++ stable/8/sys/sys/param.h	Sat Apr 30 22:15:14 2011	(r221275)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 802502	/* Master, propagated to newvers */
+#define __FreeBSD_version 802503	/* Master, propagated to newvers */
 
 #ifdef _KERNEL
 #define	P_OSREL_SIGSEGV		700004

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 22:46: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 973E6106566C;
	Sat, 30 Apr 2011 22:46:02 +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 82FAF8FC0A;
	Sat, 30 Apr 2011 22:46: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 p3UMk285065659;
	Sat, 30 Apr 2011 22:46:02 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UMk27N065657;
	Sat, 30 Apr 2011 22:46:02 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201104302246.p3UMk27N065657@svn.freebsd.org>
From: Konstantin Belousov 
Date: Sat, 30 Apr 2011 22:46: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: r221281 - head/sys/ufs/ffs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 22:46:02 -0000

Author: kib
Date: Sat Apr 30 22:46:02 2011
New Revision: 221281
URL: http://svn.freebsd.org/changeset/base/221281

Log:
  Fix typos.
  
  Noted by:	Fabian Keil 
  Pointy hat to:	kib
  MFC after:	1 week

Modified:
  head/sys/ufs/ffs/ffs_vnops.c

Modified: head/sys/ufs/ffs/ffs_vnops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vnops.c	Sat Apr 30 22:34:44 2011	(r221280)
+++ head/sys/ufs/ffs/ffs_vnops.c	Sat Apr 30 22:46:02 2011	(r221281)
@@ -591,7 +591,7 @@ ffs_read(ap)
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
-			 * for freeing.  For non-direct VMIO reads, he VM
+			 * for freeing.  For non-direct VMIO reads, the VM
 			 * has the data.
 			 */
 			bp->b_flags |= B_RELBUF;
@@ -986,7 +986,7 @@ ffs_extread(struct vnode *vp, struct uio
 			/*
 			 * If there are no dependencies, and it's VMIO,
 			 * then we don't need the buf, mark it available
-			 * for freeing.  For non-direct VMIO reads, The VM
+			 * for freeing.  For non-direct VMIO reads, the VM
 			 * has the data.
 			 */
 			bp->b_flags |= B_RELBUF;

From owner-svn-src-all@FreeBSD.ORG  Sat Apr 30 23:00: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 D2AB41065676;
	Sat, 30 Apr 2011 23:00: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 BD0F58FC1B;
	Sat, 30 Apr 2011 23:00: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 p3UN0f0S066152;
	Sat, 30 Apr 2011 23:00:41 GMT (envelope-from mm@svn.freebsd.org)
Received: (from mm@localhost)
	by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3UN0fIU066151;
	Sat, 30 Apr 2011 23:00:41 GMT (envelope-from mm@svn.freebsd.org)
Message-Id: <201104302300.p3UN0fIU066151@svn.freebsd.org>
From: Martin Matuska 
Date: Sat, 30 Apr 2011 23:00: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: r221282 - head/contrib/gcc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages 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, 30 Apr 2011 23:00:41 -0000

Author: mm
Date: Sat Apr 30 23:00:41 2011
New Revision: 221282
URL: http://svn.freebsd.org/changeset/base/221282

Log:
  Add ChangeLog.gcc43 for backported changes from gcc 4.3
  
  MFC after:	3 days

Added:
  head/contrib/gcc/ChangeLog.gcc43

Added: head/contrib/gcc/ChangeLog.gcc43
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/gcc/ChangeLog.gcc43	Sat Apr 30 23:00:41 2011	(r221282)
@@ -0,0 +1,163 @@
+2007-05-01  Dwarakanath Rajagopal  (r124339)
+ 
+	* config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3 
+	and athlon64-sse3 as improved versions of k8, opteron and athlon64 
+	with SSE3 instruction set support.
+	* doc/invoke.texi: Likewise.
+
+2007-04-07  H.J. Lu   (r123639)
+
+	* config/i386/i386.c (ix86_handle_option): Handle SSSE3.
+
+2007-02-08  Harsha Jagasia   (r121726)
+
+	* config/i386/xmmintrin.h: Make inclusion of emmintrin.h
+	conditional to __SSE2__.
+	(Entries below should have been added to first ChangeLog
+	entry for amdfam10 dated 2007-02-05)
+	* config/i386/emmintrin.h: Generate #error if __SSE2__ is not
+	defined.
+	* config/i386/pmmintrin.h: Generate #error if __SSE3__ is not
+	defined.
+	* config/i386/tmmintrin.h: Generate #error if __SSSE3__ is not
+	defined.
+
+2007-02-07  Jakub Jelinek   (r121687)
+
+	* config/i386/i386.c (override_options): Set PTA_SSSE3 for core2.
+
+2007-01-17  Eric Christopher   (r120846)
+
+	* config.gcc: Support core2 processor.
+
+2006-12-02  H.J. Lu   (r119454 - partial)
+
+	PR target/30040
+	* config/i386/driver-i386.c (bit_SSSE3): New.
+
+2006-11-18  Vladimir Makarov   (r118973)
+
+	* doc/invoke.texi (core2): Add item.
+
+	* config/i386/i386.h (TARGET_CORE2, TARGET_CPU_DEFAULT_core2): New
+	macros.
+	(TARGET_CPU_CPP_BUILTINS): Add code for core2.
+	(TARGET_CPU_DEFAULT_generic): Change value.
+	(TARGET_CPU_DEFAULT_NAMES): Add core2.
+	(processor_type): Add new constant PROCESSOR_CORE2.
+
+	* config/i386/i386.md (cpu): Add core2.
+
+	* config/i386/i386.c (core2_cost): New initialized variable.
+	(m_CORE2): New macro.
+	(x86_use_leave, x86_push_memory, x86_movx, x86_unroll_strlen,
+	x86_deep_branch, x86_partial_reg_stall, x86_use_simode_fiop,
+	x86_use_cltd, x86_promote_QImode, x86_sub_esp_4, x86_sub_esp_8,
+	x86_add_esp_4, x86_add_esp_8, x86_integer_DFmode_moves,
+	x86_partial_reg_dependency, x86_memory_mismatch_stall,
+	x86_accumulate_outgoing_args, x86_prologue_using_move,
+	x86_epilogue_using_move, x86_arch_always_fancy_math_387,
+	x86_sse_partial_reg_dependency, x86_rep_movl_optimal,
+	x86_use_incdec, x86_four_jump_limit, x86_schedule,
+	x86_pad_returns): Add m_CORE2.
+	(override_options): Add entries for Core2.
+	(ix86_issue_rate): Add case for Core2.
+	
+2006-10-27  Vladimir Makarov   (r118090)
+
+	* config/i386/i386.h (TARGET_GEODE):
+	(TARGET_CPU_CPP_BUILTINS): Add code for geode.
+	(TARGET_CPU_DEFAULT_geode): New macro.
+	(TARGET_CPU_DEFAULT_k6, TARGET_CPU_DEFAULT_k6_2,
+	TARGET_CPU_DEFAULT_k6_3, TARGET_CPU_DEFAULT_athlon,
+	TARGET_CPU_DEFAULT_athlon_sse, TARGET_CPU_DEFAULT_k8,
+	TARGET_CPU_DEFAULT_pentium_m, TARGET_CPU_DEFAULT_prescott,
+	TARGET_CPU_DEFAULT_nocona, TARGET_CPU_DEFAULT_generic): Increase
+	the macro values.
+	(TARGET_CPU_DEFAULT_NAMES): Add geode.
+	(processor_type): Add PROCESSOR_GEODE.
+
+	* config/i386/i386.md: Include geode.md.
+	(cpu): Add geode.
+
+	* config/i386/i386.c (geode_cost): New initialized global
+	variable.
+	(m_GEODE, m_K6_GEODE): New macros.
+	(x86_use_leave, x86_push_memory, x86_deep_branch, x86_use_sahf,
+	x86_use_himode_fiop, x86_promote_QImode, x86_add_esp_4,
+	x86_add_esp_8, x86_rep_movl_optimal, x86_ext_80387_constants,
+	x86_schedule): Use m_K6_GEODE instead of m_K6.
+	(x86_movx, x86_cmove): Set up m_GEODE.
+	(x86_integer_DFmode_moves): Clear m_GEODE.
+	(processor_target_table): Add entry for geode.
+	(processor_alias_table): Ditto.
+
+	* config/i386/geode.md: New file.
+
+	* doc/invoke.texi: Add entry about geode processor.
+    
+2006-10-22  H.J. Lu   (r117958)
+
+	* config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers.
+	(x86_64-*-*): Likewise.
+
+	* config/i386/i386.c (pta_flags): Add PTA_SSSE3.
+	(override_options): Check SSSE3.
+	(ix86_builtins): Add IX86_BUILTIN_PHADDW, IX86_BUILTIN_PHADDD,
+	IX86_BUILTIN_PHADDSW, IX86_BUILTIN_PHSUBW, IX86_BUILTIN_PHSUBD,
+	IX86_BUILTIN_PHSUBSW, IX86_BUILTIN_PMADDUBSW,
+	IX86_BUILTIN_PMULHRSW, IX86_BUILTIN_PSHUFB,
+	IX86_BUILTIN_PSIGNB, IX86_BUILTIN_PSIGNW, IX86_BUILTIN_PSIGND,
+	IX86_BUILTIN_PALIGNR, IX86_BUILTIN_PABSB, IX86_BUILTIN_PABSW,
+	IX86_BUILTIN_PABSD, IX86_BUILTIN_PHADDW128,
+	IX86_BUILTIN_PHADDD128, IX86_BUILTIN_PHADDSW128,
+	IX86_BUILTIN_PHSUBW128, IX86_BUILTIN_PHSUBD128,
+	IX86_BUILTIN_PHSUBSW128, IX86_BUILTIN_PMADDUBSW128,
+	IX86_BUILTIN_PMULHRSW128, IX86_BUILTIN_PSHUFB128,
+	IX86_BUILTIN_PSIGNB128, IX86_BUILTIN_PSIGNW128,
+	IX86_BUILTIN_PSIGND128, IX86_BUILTIN_PALIGNR128,
+	IX86_BUILTIN_PABSB128, IX86_BUILTIN_PABSW128 and
+	IX86_BUILTIN_PABSD128.
+	(bdesc_2arg): Add SSSE3.
+	(bdesc_1arg): Likewise.
+	(ix86_init_mmx_sse_builtins): Support SSSE3.
+	(ix86_expand_builtin): Likewise.
+	* config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): Likewise.
+
+	* config/i386/i386.md (UNSPEC_PSHUFB): New.
+	(UNSPEC_PSIGN): Likewise.
+	(UNSPEC_PALIGNR): Likewise.
+	Include mmx.md before sse.md.
+
+	* config/i386/i386.opt: Add -mssse3.
+
+	* config/i386/sse.md (ssse3_phaddwv8hi3): New pattern for SSSE3.
+	(ssse3_phaddwv4hi3): Likewise.
+	(ssse3_phadddv4si3): Likewise.
+	(ssse3_phadddv2si3): Likewise.
+	(ssse3_phaddswv8hi3): Likewise.
+	(ssse3_phaddswv4hi3): Likewise.
+	(ssse3_phsubwv8hi3): Likewise.
+	(ssse3_phsubwv4hi3): Likewise.
+	(ssse3_phsubdv4si3): Likewise.
+	(ssse3_phsubdv2si3): Likewise.
+	(ssse3_phsubswv8hi3): Likewise.
+	(ssse3_phsubswv4hi3): Likewise.
+	(ssse3_pmaddubswv8hi3): Likewise.
+	(ssse3_pmaddubswv4hi3): Likewise.
+	(ssse3_pmulhrswv8hi3): Likewise.
+	(ssse3_pmulhrswv4hi3): Likewise.
+	(ssse3_pshufbv16qi3): Likewise.
+	(ssse3_pshufbv8qi3): Likewise.
+	(ssse3_psign3): Likewise.
+	(ssse3_psign3): Likewise.
+	(ssse3_palignrti): Likewise.
+	(ssse3_palignrdi): Likewise.
+	(abs2): Likewise.
+	(abs2): Likewise.
+
+	* config/i386/tmmintrin.h: New file.
+
+	* doc/extend.texi: Document SSSE3 built-in functions.
+
+	* doc/invoke.texi: Document -mssse3/-mno-ssse3 switches.