From owner-svn-src-stable@freebsd.org Sun May 14 00:12:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9907CD6BEF1; Sun, 14 May 2017 00:12:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 655251583; Sun, 14 May 2017 00:12:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E0CTJJ019644; Sun, 14 May 2017 00:12:29 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E0CT2S019643; Sun, 14 May 2017 00:12:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705140012.v4E0CT2S019643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 14 May 2017 00:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318260 - stable/11/sys/fs/nfsclient X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 00:12:30 -0000 Author: rmacklem Date: Sun May 14 00:12:29 2017 New Revision: 318260 URL: https://svnweb.freebsd.org/changeset/base/318260 Log: MFC: r317576 Modify the NFSv4.1/pNFS client to ask for a maximum length of layout. The code specified the length of a layout as INT64_MAX instead of UINT64_MAX. This could result in getting a layout for less than the full file for extremely large files. Although having little practical effect, this patch corrects this in the code. Detected during recent testing of the pNFS server. Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sat May 13 22:36:54 2017 (r318259) +++ stable/11/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:12:29 2017 (r318260) @@ -5238,7 +5238,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = stateidp->other[1]; stateid.other[2] = stateidp->other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX, + nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } else { @@ -5248,7 +5248,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = lyp->nfsly_stateid.other[1]; stateid.other[2] = lyp->nfsly_stateid.other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, off, INT64_MAX, + nfhp->nfh_len, iomode, off, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } From owner-svn-src-stable@freebsd.org Sun May 14 00:23:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3271D6135E; Sun, 14 May 2017 00:23:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE0E1C0B; Sun, 14 May 2017 00:23:28 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4E0NRmA024041; Sun, 14 May 2017 00:23:27 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4E0NRMm024040; Sun, 14 May 2017 00:23:27 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201705140023.v4E0NRMm024040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 14 May 2017 00:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318261 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 00:23:28 -0000 Author: rmacklem Date: Sun May 14 00:23:27 2017 New Revision: 318261 URL: https://svnweb.freebsd.org/changeset/base/318261 Log: MFC: r317576 Modify the NFSv4.1/pNFS client to ask for a maximum length of layout. The code specified the length of a layout as INT64_MAX instead of UINT64_MAX. This could result in getting a layout for less than the full file for extremely large files. Although having little practical effect, this patch corrects this in the code. Detected during recent testing of the pNFS server. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:12:29 2017 (r318260) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sun May 14 00:23:27 2017 (r318261) @@ -5235,7 +5235,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = stateidp->other[1]; stateid.other[2] = stateidp->other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, (uint64_t)0, INT64_MAX, + nfhp->nfh_len, iomode, (uint64_t)0, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } else { @@ -5245,7 +5245,7 @@ nfsrpc_getlayout(struct nfsmount *nmp, v stateid.other[1] = lyp->nfsly_stateid.other[1]; stateid.other[2] = lyp->nfsly_stateid.other[2]; error = nfsrpc_layoutget(nmp, nfhp->nfh_fh, - nfhp->nfh_len, iomode, off, INT64_MAX, + nfhp->nfh_len, iomode, off, UINT64_MAX, (uint64_t)0, layoutlen, &stateid, &retonclose, &flh, cred, p, NULL); } From owner-svn-src-stable@freebsd.org Sun May 14 10:15:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 655E9D69BD1; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CAC289D; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAF5L6065529; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAF5Qd065528; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705141015.v4EAF5Qd065528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 14 May 2017 10:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318264 - in stable: 10/release/scripts 11/release/scripts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:15:06 -0000 Author: gjb Date: Sun May 14 10:15:04 2017 New Revision: 318264 URL: https://svnweb.freebsd.org/changeset/base/318264 Log: MFC r318190: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/scripts/atlas-upload.sh Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/release/scripts/atlas-upload.sh Directory Properties: stable/11/ (props changed) Modified: stable/10/release/scripts/atlas-upload.sh ============================================================================== --- stable/10/release/scripts/atlas-upload.sh Sun May 14 09:07:13 2017 (r318263) +++ stable/10/release/scripts/atlas-upload.sh Sun May 14 10:15:04 2017 (r318264) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-stable@freebsd.org Sun May 14 10:15:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4EF8D69BD7; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C63889E; Sun, 14 May 2017 10:15:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAF5jY065536; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAF59u065535; Sun, 14 May 2017 10:15:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705141015.v4EAF59u065535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 14 May 2017 10:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318264 - in stable: 10/release/scripts 11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:15:06 -0000 Author: gjb Date: Sun May 14 10:15:04 2017 New Revision: 318264 URL: https://svnweb.freebsd.org/changeset/base/318264 Log: MFC r318190: Update release/scripts/atlas-upload.sh to account for API changes made recently by Atlas Hashicorp. The data returned from GET and POST requests has changed, which caused a number of regex patterns to fail to be properly identified as 'success' or 'failure', which ended up in upload/publish failures. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/scripts/atlas-upload.sh Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/release/scripts/atlas-upload.sh Directory Properties: stable/10/ (props changed) Modified: stable/11/release/scripts/atlas-upload.sh ============================================================================== --- stable/11/release/scripts/atlas-upload.sh Sun May 14 09:07:13 2017 (r318263) +++ stable/11/release/scripts/atlas-upload.sh Sun May 14 10:15:04 2017 (r318264) @@ -132,20 +132,20 @@ main () { echo "Failed to get the token from the API" exit 2; fi - echo ${TOKENRESULT} | grep "\"token\":" > /dev/null + echo ${TOKENRESULT} | grep -E "\"(token|upload_path)\":" > /dev/null if [ $? != 0 ]; then echo "No token found from the API" exit 2 else - TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/".*//') + TOKEN=$(echo $TOKENRESULT | sed -e 's/.*token":"//' -e 's/.*upload_path":"//' -e 's/}$//g' -e 's/"//g') echo "Uploading to Atlas" - UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${ATLAS_UPLOAD_URL}/${TOKEN}) + UPLOADRESULT=$(/usr/local/bin/curl -s -X PUT --upload-file ${FILE} ${TOKEN}) # Validate the Upload echo "Validating" VALIDRESULT=$(/usr/local/bin/curl -s "https://atlas.hashicorp.com/api/v1/box/${USERNAME}/${BOX}/version/${VERSION}/provider/${PROVIDER}?access_token=${KEY}") - HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*hosted_token":"//' -e 's/".*//') - if [ ! -z ${HOSTED_TOKEN} -a ! -z ${TOKEN} -a ${HOSTED_TOKEN} != ${TOKEN} ]; then + HOSTED_TOKEN=$(echo $VALIDRESULT | sed -e 's/.*"hosted"://' -e 's/,.*$//') + if [ ! -z ${TOKEN} -a "${HOSTED_TOKEN}" != "true" ]; then echo "Upload failed, try again." exit 2 fi From owner-svn-src-stable@freebsd.org Sun May 14 10:48:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D6DD6C69D; Sun, 14 May 2017 10:48:48 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885F41B02; Sun, 14 May 2017 10:48:48 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EAmlJ1077678; Sun, 14 May 2017 10:48:47 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EAmlON077677; Sun, 14 May 2017 10:48:47 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201705141048.v4EAmlON077677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 14 May 2017 10:48:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318265 - stable/11/sbin/mksnap_ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 10:48:49 -0000 Author: sobomax Date: Sun May 14 10:48:47 2017 New Revision: 318265 URL: https://svnweb.freebsd.org/changeset/base/318265 Log: MFC r316718, r316738: make mksnap_ffs functional in the chroot'ed environment. Modified: stable/11/sbin/mksnap_ffs/mksnap_ffs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/mksnap_ffs/mksnap_ffs.c ============================================================================== --- stable/11/sbin/mksnap_ffs/mksnap_ffs.c Sun May 14 10:15:04 2017 (r318264) +++ stable/11/sbin/mksnap_ffs/mksnap_ffs.c Sun May 14 10:48:47 2017 (r318265) @@ -58,6 +58,33 @@ usage(void) errx(EX_USAGE, "usage: mksnap_ffs snapshot_name"); } +static int +isdir(const char *path, struct stat *stbufp) +{ + + if (stat(path, stbufp) < 0) + return (-1); + if (!S_ISDIR(stbufp->st_mode)) + return (0); + return (1); +} + +static int +issamefs(const char *path, struct statfs *stfsp) +{ + struct statfs stfsbuf; + struct stat stbuf; + + if (isdir(path, &stbuf) != 1) + return (-1); + if (statfs(path, &stfsbuf) < 0) + return (-1); + if ((stfsbuf.f_fsid.val[0] != stfsp->f_fsid.val[0]) || + (stfsbuf.f_fsid.val[1] != stfsp->f_fsid.val[1])) + return (0); + return (1); +} + int main(int argc, char **argv) { @@ -96,16 +123,33 @@ main(int argc, char **argv) } if (statfs(path, &stfsbuf) < 0) err(1, "%s", path); - if (stat(path, &stbuf) < 0) + switch (isdir(path, &stbuf)) { + case -1: err(1, "%s", path); - if (!S_ISDIR(stbuf.st_mode)) + case 0: errx(1, "%s: Not a directory", path); + default: + break; + } if (access(path, W_OK) < 0) err(1, "Lack write permission in %s", path); if ((stbuf.st_mode & S_ISTXT) && stbuf.st_uid != getuid()) errx(1, "Lack write permission in %s: Sticky bit set", path); /* + * Work around an issue when mksnap_ffs is started in chroot'ed + * environment and f_mntonname contains absolute path within + * real root. + */ + for (cp = stfsbuf.f_mntonname; issamefs(cp, &stfsbuf) != 1; + cp = strchrnul(cp + 1, '/')) { + if (cp[0] == '\0') + errx(1, "%s: Not a mount point", stfsbuf.f_mntonname); + } + if (cp != stfsbuf.f_mntonname) + strlcpy(stfsbuf.f_mntonname, cp, sizeof(stfsbuf.f_mntonname)); + + /* * Having verified access to the directory in which the * snapshot is to be built, proceed with creating it. */ From owner-svn-src-stable@freebsd.org Sun May 14 11:51:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D045D6CB6A; Sun, 14 May 2017 11:51:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20C461C0B; Sun, 14 May 2017 11:51:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EBpVlU002793; Sun, 14 May 2017 11:51:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EBpVIY002792; Sun, 14 May 2017 11:51:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705141151.v4EBpVIY002792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 May 2017 11:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318266 - stable/11/sys/ufs/ffs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 11:51:32 -0000 Author: kib Date: Sun May 14 11:51:30 2017 New Revision: 318266 URL: https://svnweb.freebsd.org/changeset/base/318266 Log: MFC r317908: Remove spl() calls from UFS code. Modified: stable/11/sys/ufs/ffs/ffs_rawread.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_rawread.c Sun May 14 10:48:47 2017 (r318265) +++ stable/11/sys/ufs/ffs/ffs_rawread.c Sun May 14 11:51:30 2017 (r318266) @@ -270,7 +270,6 @@ ffs_rawread_main(struct vnode *vp, int error, nerror; struct buf *bp, *nbp, *tbp; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -330,10 +329,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -400,9 +396,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-stable@freebsd.org Sun May 14 12:00:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B44A4D6104A; Sun, 14 May 2017 12:00:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DAFF1F1E; Sun, 14 May 2017 12:00:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EC00Wg005985; Sun, 14 May 2017 12:00:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EC00uq005984; Sun, 14 May 2017 12:00:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705141200.v4EC00uq005984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 14 May 2017 12:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318267 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 12:00:01 -0000 Author: kib Date: Sun May 14 12:00:00 2017 New Revision: 318267 URL: https://svnweb.freebsd.org/changeset/base/318267 Log: MFC r317908: Remove spl() calls from UFS code. Modified: stable/10/sys/ufs/ffs/ffs_rawread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_rawread.c Sun May 14 11:51:30 2017 (r318266) +++ stable/10/sys/ufs/ffs/ffs_rawread.c Sun May 14 12:00:00 2017 (r318267) @@ -274,7 +274,6 @@ ffs_rawread_main(struct vnode *vp, struct buf *bp, *nbp, *tbp; caddr_t sa, nsa, tsa; u_int iolen; - int spl; caddr_t udata; long resid; off_t offset; @@ -339,10 +338,7 @@ ffs_rawread_main(struct vnode *vp, } } - spl = splbio(); bwait(bp, PRIBIO, "rawrd"); - splx(spl); - vunmapbuf(bp); iolen = bp->b_bcount - bp->b_resid; @@ -415,9 +411,7 @@ ffs_rawread_main(struct vnode *vp, relpbuf(bp, &ffsrawbufcnt); } if (nbp != NULL) { /* Run down readahead buffer */ - spl = splbio(); bwait(nbp, PRIBIO, "rawrd"); - splx(spl); vunmapbuf(nbp); pbrelvp(nbp); relpbuf(nbp, &ffsrawbufcnt); From owner-svn-src-stable@freebsd.org Sun May 14 12:42:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33020D6C590; Sun, 14 May 2017 12:42:00 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBB601A31; Sun, 14 May 2017 12:41:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ECfwmc026106; Sun, 14 May 2017 12:41:58 GMT (envelope-from sobomax@FreeBSD.org) Received: (from sobomax@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ECfwgE026105; Sun, 14 May 2017 12:41:58 GMT (envelope-from sobomax@FreeBSD.org) Message-Id: <201705141241.v4ECfwgE026105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sobomax set sender to sobomax@FreeBSD.org using -f From: Maxim Sobolev Date: Sun, 14 May 2017 12:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318268 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 12:42:00 -0000 Author: sobomax Date: Sun May 14 12:41:58 2017 New Revision: 318268 URL: https://svnweb.freebsd.org/changeset/base/318268 Log: MFC r316874: restore ability to shutdown(2) datagram sockets. Modified: stable/11/sys/kern/uipc_socket.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/uipc_socket.c ============================================================================== --- stable/11/sys/kern/uipc_socket.c Sun May 14 12:00:00 2017 (r318267) +++ stable/11/sys/kern/uipc_socket.c Sun May 14 12:41:58 2017 (r318268) @@ -2342,13 +2342,27 @@ int soshutdown(struct socket *so, int how) { struct protosw *pr = so->so_proto; - int error; + int error, soerror_enotconn; if (!(how == SHUT_RD || how == SHUT_WR || how == SHUT_RDWR)) return (EINVAL); + + soerror_enotconn = 0; if ((so->so_state & - (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) - return (ENOTCONN); + (SS_ISCONNECTED | SS_ISCONNECTING | SS_ISDISCONNECTING)) == 0) { + /* + * POSIX mandates us to return ENOTCONN when shutdown(2) is + * invoked on a datagram sockets, however historically we would + * actually tear socket down. This is known to be leveraged by + * some applications to unblock process waiting in recvXXX(2) + * by other process that it shares that socket with. Try to meet + * both backward-compatibility and POSIX requirements by forcing + * ENOTCONN but still asking protocol to perform pru_shutdown(). + */ + if (so->so_type != SOCK_DGRAM) + return (ENOTCONN); + soerror_enotconn = 1; + } CURVNET_SET(so->so_vnet); if (pr->pr_usrreqs->pru_flush != NULL) @@ -2359,11 +2373,12 @@ soshutdown(struct socket *so, int how) error = (*pr->pr_usrreqs->pru_shutdown)(so); wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (error); + return ((error == 0 && soerror_enotconn) ? ENOTCONN : error); } wakeup(&so->so_timeo); CURVNET_RESTORE(); - return (0); + + return (soerror_enotconn ? ENOTCONN : 0); } void From owner-svn-src-stable@freebsd.org Sun May 14 13:59:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66883D6CAEE; Sun, 14 May 2017 13:59:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32F876CF; Sun, 14 May 2017 13:59:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EDxbjF055847; Sun, 14 May 2017 13:59:37 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EDxbks055846; Sun, 14 May 2017 13:59:37 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141359.v4EDxbks055846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 13:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318270 - stable/11/sbin/ipfw X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:59:38 -0000 Author: marius Date: Sun May 14 13:59:36 2017 New Revision: 318270 URL: https://svnweb.freebsd.org/changeset/base/318270 Log: MFC: r317343 In fill_ip6(), the value of the pointer av changes before it is free(3)ed. Thus, introduce a new variable to track the original value. Modified: stable/11/sbin/ipfw/ipv6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipv6.c ============================================================================== --- stable/11/sbin/ipfw/ipv6.c Sun May 14 13:14:19 2017 (r318269) +++ stable/11/sbin/ipfw/ipv6.c Sun May 14 13:59:36 2017 (r318270) @@ -339,6 +339,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -365,7 +366,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -446,7 +447,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); } From owner-svn-src-stable@freebsd.org Sun May 14 13:59:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EEBAD6CB21; Sun, 14 May 2017 13:59:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5ECB26DD; Sun, 14 May 2017 13:59:41 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EDxeo7055896; Sun, 14 May 2017 13:59:40 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EDxeeg055895; Sun, 14 May 2017 13:59:40 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141359.v4EDxeeg055895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 13:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318271 - stable/10/sbin/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 13:59:41 -0000 Author: marius Date: Sun May 14 13:59:40 2017 New Revision: 318271 URL: https://svnweb.freebsd.org/changeset/base/318271 Log: MFC: r317343 In fill_ip6(), the value of the pointer av changes before it is free(3)ed. Thus, introduce a new variable to track the original value. Modified: stable/10/sbin/ipfw/ipv6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ipfw/ipv6.c ============================================================================== --- stable/10/sbin/ipfw/ipv6.c Sun May 14 13:59:36 2017 (r318270) +++ stable/10/sbin/ipfw/ipv6.c Sun May 14 13:59:40 2017 (r318271) @@ -338,6 +338,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i { int len = 0; struct in6_addr *d = &(cmd->addr6); + char *oav; /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd @@ -375,7 +376,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i return (1); } - av = strdup(av); + oav = av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, @@ -451,7 +452,7 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, i if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; - free(av); + free(oav); return (1); } From owner-svn-src-stable@freebsd.org Sun May 14 14:04:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F1BAD6CD65; Sun, 14 May 2017 14:04:27 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE53ACC0; Sun, 14 May 2017 14:04:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EE4PwP059856; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EE4PJ0059855; Sun, 14 May 2017 14:04:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141404.v4EE4PJ0059855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318272 - stable/11/sys/sparc64/pci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:04:27 -0000 Author: marius Date: Sun May 14 14:04:25 2017 New Revision: 318272 URL: https://svnweb.freebsd.org/changeset/base/318272 Log: MFC: r317578 Fix a bug introduced as part of r287726; use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 [1] Submitted by: Yoshihiko Iwama [1] Modified: stable/11/sys/sparc64/pci/psycho.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sparc64/pci/psycho.c ============================================================================== --- stable/11/sys/sparc64/pci/psycho.c Sun May 14 13:59:40 2017 (r318271) +++ stable/11/sys/sparc64/pci/psycho.c Sun May 14 14:04:25 2017 (r318272) @@ -942,14 +942,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; From owner-svn-src-stable@freebsd.org Sun May 14 14:04:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95E74D6CD9B; Sun, 14 May 2017 14:04:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C88CCF1; Sun, 14 May 2017 14:04:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EE4WaS059917; Sun, 14 May 2017 14:04:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EE4WHq059916; Sun, 14 May 2017 14:04:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141404.v4EE4WHq059916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318273 - stable/10/sys/sparc64/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:04:33 -0000 Author: marius Date: Sun May 14 14:04:32 2017 New Revision: 318273 URL: https://svnweb.freebsd.org/changeset/base/318273 Log: MFC: r317578 Fix a bug introduced as part of r287726 (MFCed to stable/10 in r292789); use the right device_t for determining the softc of the bridge in psycho_route_interrupt(). [1] While at it, update the corresponding comment that the code in question is also necessary for U30s in addition to E450s (a fact that has been known for ages). PR: 218478 [1] Submitted by: Yoshihiko Iwama [1] Modified: stable/10/sys/sparc64/pci/psycho.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sparc64/pci/psycho.c ============================================================================== --- stable/10/sys/sparc64/pci/psycho.c Sun May 14 14:04:25 2017 (r318272) +++ stable/10/sys/sparc64/pci/psycho.c Sun May 14 14:04:32 2017 (r318273) @@ -943,14 +943,14 @@ psycho_route_interrupt(device_t bridge, if (pin > 4) return (pin); /* - * Guess the INO; we always assume that this is a non-OBIO - * device, and that pin is a "real" intpin number. Determine - * the mapping register to be used by the slot number. - * We only need to do this on E450s, it seems; here, the slot numbers - * for bus A are one-based, while those for bus B seemingly have an - * offset of 2 (hence the factor of 3 below). + * Guess the INO; we always assume that this is a non-OBIO device, + * and that pin is a "real" intpin number. Determine the mapping + * register to be used by the slot number. + * We only need to do this on E450s and U30s, though; here, the + * slot numbers for bus A are one-based, while those for bus B + * seemingly have an offset of 2 (hence the factor of 3 below). */ - sc = device_get_softc(dev); + sc = device_get_softc(bridge); intrmap = PSR_PCIA0_INT_MAP + 8 * (pci_get_slot(dev) - 1 + 3 * sc->sc_half); mintr = INTINO(PSYCHO_READ8(sc, intrmap)) + pin - 1; From owner-svn-src-stable@freebsd.org Sun May 14 14:21:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAE7BD6C563; Sun, 14 May 2017 14:21:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F431866; Sun, 14 May 2017 14:21:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EEL94k064959; Sun, 14 May 2017 14:21:09 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EEL9eW064956; Sun, 14 May 2017 14:21:09 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141421.v4EEL9eW064956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318274 - in stable/11/sys: kern sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:21:11 -0000 Author: marius Date: Sun May 14 14:21:09 2017 New Revision: 318274 URL: https://svnweb.freebsd.org/changeset/base/318274 Log: MFC: r317982 - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: stable/11/sys/kern/subr_kobj.c stable/11/sys/sys/kobj.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_kobj.c ============================================================================== --- stable/11/sys/kern/subr_kobj.c Sun May 14 14:04:32 2017 (r318273) +++ stable/11/sys/kern/subr_kobj.c Sun May 14 14:21:09 2017 (r318274) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: stable/11/sys/sys/kobj.h ============================================================================== --- stable/11/sys/sys/kobj.h Sun May 14 14:04:32 2017 (r318273) +++ stable/11/sys/sys/kobj.h Sun May 14 14:21:09 2017 (r318274) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-stable@freebsd.org Sun May 14 14:21:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52EA8D6C577; Sun, 14 May 2017 14:21:13 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08435186D; Sun, 14 May 2017 14:21:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EELC8G065008; Sun, 14 May 2017 14:21:12 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EELBeA065006; Sun, 14 May 2017 14:21:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705141421.v4EELBeA065006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 14 May 2017 14:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318275 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 14:21:13 -0000 Author: marius Date: Sun May 14 14:21:11 2017 New Revision: 318275 URL: https://svnweb.freebsd.org/changeset/base/318275 Log: MFC: r317982 - Also outside of the KOBJOPLOOKUP macro - which in turn is used by the code auto-generated for *.m - kobj_lookup_method(9) is useful; for example in back-ends or base class device drivers in order to determine whether a default method has been overridden. Thus, allow for the kobj_method_t pointer argument - used by KOBJOPLOOKUP in order to update the cache entry - of kobj_lookup_method(9), to be NULL. Actually, that pointer is redundant as it's just set to the same kobj_method_t that the kobj_lookup_method(9) function returns in the first place, but probably it serves to reduce the number of instructions generated for KOBJOPLOOKUP. - For the same reason, move updating kobj_lookup_{hits,misses} (if KOBJ_STATS is defined) from kobj_lookup_method(9) to KOBJOPLOOKUP. As a side-effect, this gets rid of the convoluted approach of always incrementing kobj_lookup_hits in KOBJOPLOOKUP and then in case of a cache miss, decrementing it in kobj_lookup_method(9) again. Modified: stable/10/sys/kern/subr_kobj.c stable/10/sys/sys/kobj.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_kobj.c ============================================================================== --- stable/10/sys/kern/subr_kobj.c Sun May 14 14:21:09 2017 (r318274) +++ stable/10/sys/kern/subr_kobj.c Sun May 14 14:21:11 2017 (r318275) @@ -213,19 +213,11 @@ kobj_lookup_method(kobj_class_t cls, { kobj_method_t *ce; -#ifdef KOBJ_STATS - /* - * Correct for the 'hit' assumption in KOBJOPLOOKUP and record - * a 'miss'. - */ - kobj_lookup_hits--; - kobj_lookup_misses++; -#endif - ce = kobj_lookup_method_mi(cls, desc); if (!ce) ce = &desc->deflt; - *cep = ce; + if (cep) + *cep = ce; return ce; } Modified: stable/10/sys/sys/kobj.h ============================================================================== --- stable/10/sys/sys/kobj.h Sun May 14 14:21:09 2017 (r318274) +++ stable/10/sys/sys/kobj.h Sun May 14 14:21:11 2017 (r318275) @@ -226,10 +226,12 @@ extern u_int kobj_lookup_misses; kobj_method_t **_cep = \ &OPS->cache[_desc->id & (KOBJ_CACHE_SIZE-1)]; \ kobj_method_t *_ce = *_cep; \ - kobj_lookup_hits++; /* assume hit */ \ - if (_ce->desc != _desc) \ + if (_ce->desc != _desc) { \ _ce = kobj_lookup_method(OPS->cls, \ _cep, _desc); \ + kobj_lookup_misses++; \ + } else \ + kobj_lookup_hits++; \ _m = _ce->func; \ } while(0) #else From owner-svn-src-stable@freebsd.org Sun May 14 17:10:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58186D6C8C7; Sun, 14 May 2017 17:10:57 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28011BA3; Sun, 14 May 2017 17:10:57 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EHAuwP032858; Sun, 14 May 2017 17:10:56 GMT (envelope-from jasone@FreeBSD.org) Received: (from jasone@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EHAuGg032848; Sun, 14 May 2017 17:10:56 GMT (envelope-from jasone@FreeBSD.org) Message-Id: <201705141710.v4EHAuGg032848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jasone set sender to jasone@FreeBSD.org using -f From: Jason Evans Date: Sun, 14 May 2017 17:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318277 - stable/11/lib/libthr/thread X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 17:10:57 -0000 Author: jasone Date: Sun May 14 17:10:55 2017 New Revision: 318277 URL: https://svnweb.freebsd.org/changeset/base/318277 Log: MFC r318254: Fix __pthread_mutex_trylock() to call THR_CRITICAL_LEAVE() on failure rather than on success. This regression was introduced by r300043 (Add implementation of robust mutexes...). Modified: stable/11/lib/libthr/thread/thr_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libthr/thread/thr_mutex.c ============================================================================== --- stable/11/lib/libthr/thread/thr_mutex.c Sun May 14 14:27:59 2017 (r318276) +++ stable/11/lib/libthr/thread/thr_mutex.c Sun May 14 17:10:55 2017 (r318277) @@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t } /* else {} */ if (robust) _mutex_leave_robust(curthread, m); - if ((ret == 0 || ret == EOWNERDEAD) && + if (ret != 0 && ret != EOWNERDEAD && (m->m_flags & PMUTEX_FLAG_PRIVATE) != 0) THR_CRITICAL_LEAVE(curthread); return (ret); From owner-svn-src-stable@freebsd.org Sun May 14 20:17:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4FD6D42B; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9371C96; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EKHplk011011; Sun, 14 May 2017 20:17:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EKHop0011008; Sun, 14 May 2017 20:17:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705142017.v4EKHop0011008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 14 May 2017 20:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318279 - in stable/11/bin/sh: . tests/builtins X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 20:17:52 -0000 Author: jilles Date: Sun May 14 20:17:50 2017 New Revision: 318279 URL: https://svnweb.freebsd.org/changeset/base/318279 Log: MFC r317912: sh: Fix INTOFF leak after a builtin with different locale settings. After executing a builtin with different locale settings such as LC_ALL=C true SIGINT handling was left disabled indefinitely. Added: stable/11/bin/sh/tests/builtins/locale2.0 - copied unchanged from r317912, head/bin/sh/tests/builtins/locale2.0 Modified: stable/11/bin/sh/tests/builtins/Makefile stable/11/bin/sh/var.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/11/bin/sh/tests/builtins/Makefile Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/tests/builtins/Makefile Sun May 14 20:17:50 2017 (r318279) @@ -117,6 +117,7 @@ ${PACKAGE}FILES+= local7.0 .if ${MK_NLS} != "no" ${PACKAGE}FILES+= locale1.0 .endif +${PACKAGE}FILES+= locale2.0 ${PACKAGE}FILES+= printf1.0 ${PACKAGE}FILES+= printf2.0 ${PACKAGE}FILES+= printf3.0 Copied: stable/11/bin/sh/tests/builtins/locale2.0 (from r317912, head/bin/sh/tests/builtins/locale2.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/bin/sh/tests/builtins/locale2.0 Sun May 14 20:17:50 2017 (r318279, copy of r317912, head/bin/sh/tests/builtins/locale2.0) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +$SH -c 'LC_ALL=C true; kill -INT $$; echo continued' +r=$? +[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ] Modified: stable/11/bin/sh/var.c ============================================================================== --- stable/11/bin/sh/var.c Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/var.c Sun May 14 20:17:50 2017 (r318279) @@ -512,7 +512,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON; From owner-svn-src-stable@freebsd.org Mon May 15 13:05:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B4BD6D59F; Mon, 15 May 2017 13:05:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A216BC8; Mon, 15 May 2017 13:05:03 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FD521J018324; Mon, 15 May 2017 13:05:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FD522V018323; Mon, 15 May 2017 13:05:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151305.v4FD522V018323@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318286 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:05:03 -0000 Author: emaste Date: Mon May 15 13:05:02 2017 New Revision: 318286 URL: https://svnweb.freebsd.org/changeset/base/318286 Log: MFC r316706: makeman: don't copy $FreeBSD$ tags from source files into output Copying the source VCS ID from WITH_/WITHOUT_* into the generated src.conf.5 is not necessary, as it is generally possible to determine the same information using the VCS to examine commit metadata. The individual source files also match the name of the option recorded in the generated file, so it is clear from where the content originated. The copied IDs generate extraneous, non-content noise in the generated src.conf.5 in some cases, including the first time the file is generated on a stable branch. In addition, the source file $FreeBSD$ tags are not expanded by git or other non-Subversion VCSs, which means that makeman previously could not be used in a non-Subversion working tree. I accept that there's some desire to keep these, but on balance believe there is more benefit in removing them. Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 15 10:02:45 2017 (r318285) +++ stable/11/tools/build/options/makeman Mon May 15 13:05:02 2017 (r318286) @@ -1,12 +1,12 @@ #!/bin/sh # # This file is in the public domain. +# +# $FreeBSD$ set -o errexit export LC_ALL=C -ident='$FreeBSD$' - t=$(mktemp -d -t makeman) trap 'test -d $t && rm -rf $t' exit @@ -119,12 +119,9 @@ show() main() { - ident=${ident#$} - ident=${ident% $} fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A29FDD6D0D5; Mon, 15 May 2017 13:41:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 726F01DF; Mon, 15 May 2017 13:41:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FDfchG031842; Mon, 15 May 2017 13:41:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FDfcln031841; Mon, 15 May 2017 13:41:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151341.v4FDfcln031841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318288 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:41:39 -0000 Author: emaste Date: Mon May 15 13:41:38 2017 New Revision: 318288 URL: https://svnweb.freebsd.org/changeset/base/318288 Log: MFC r317156: makeman: add a comment describing purpose and invocation Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/makeman Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/makeman ============================================================================== --- stable/11/tools/build/options/makeman Mon May 15 13:14:13 2017 (r318287) +++ stable/11/tools/build/options/makeman Mon May 15 13:41:38 2017 (r318288) @@ -1,8 +1,22 @@ #!/bin/sh # # This file is in the public domain. -# # $FreeBSD$ +# +# This script is used to create the src.conf.5 man page, using template text +# contained herein and the contents of the WITH_* and WITHOUT_* files in the +# same directory. Each WITH_* and WITHOUT_* file documents the effect of the +# /etc/src.conf knob with the same name. +# +# This script invokes "make showconfig" for each supported architecture in +# order to determine, for each option, whether the default setting is always +# WITH, always WITHOUT, or is architecture-dependent. It also determines +# and describes dependencies between options. +# +# Usage: +# +# cd tools/build/options +# sh makeman > ../../../share/man/man5/src.conf.5 set -o errexit export LC_ALL=C @@ -121,7 +135,7 @@ main() fbsdid='$'FreeBSD'$' cat < Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE5C9D6D4D2; Mon, 15 May 2017 13:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1B8B05; Mon, 15 May 2017 13:50:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FDoLAS035535; Mon, 15 May 2017 13:50:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FDoLVU035534; Mon, 15 May 2017 13:50:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151350.v4FDoLVU035534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 13:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318289 - stable/11/tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 13:50:22 -0000 Author: emaste Date: Mon May 15 13:50:21 2017 New Revision: 318289 URL: https://svnweb.freebsd.org/changeset/base/318289 Log: MFC r310271 (gjb): Comment the RCSID (in WITH_REPRODUCIBLE_BUILD) Sponsored by: The FreeBSD Foundation Modified: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD ============================================================================== --- stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Mon May 15 13:41:38 2017 (r318288) +++ stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD Mon May 15 13:50:21 2017 (r318289) @@ -1,4 +1,4 @@ -$FreeBSD$ +.\" $FreeBSD$ Set to exclude build metadata (such as the build time, user, or host) from the kernel, boot loaders, and uname output, so that builds produce bit-for-bit identical output. From owner-svn-src-stable@freebsd.org Mon May 15 14:11:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 514B0D6DBFE; Mon, 15 May 2017 14:11:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2C518E9; Mon, 15 May 2017 14:11:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEBJiL046484; Mon, 15 May 2017 14:11:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEBJRP046483; Mon, 15 May 2017 14:11:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151411.v4FEBJRP046483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318290 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:11:20 -0000 Author: emaste Date: Mon May 15 14:11:18 2017 New Revision: 318290 URL: https://svnweb.freebsd.org/changeset/base/318290 Log: Regenerate src.conf.5 after r318286 r318286 removed the $FreeBSD$ tags copied from the source WITH_/WITHOUT_ description snippets. Regenerate src.conf.5 now so that only relevant changes appear in it when it is next regenerated after an MFC. Sponsored by: The FreeBSD Foundation Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Mon May 15 13:50:21 2017 (r318289) +++ stable/11/share/man/man5/src.conf.5 Mon May 15 14:11:18 2017 (r318290) @@ -1,7 +1,6 @@ -.\" DO NOT EDIT-- this file is automatically generated. -.\" from FreeBSD: stable/11/tools/build/options/makeman 292283 2015-12-15 18:42:30Z bdrewery +.\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd April 2, 2017 +.Dd May 15, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -94,56 +93,45 @@ The following list provides a name and s that can be used for source builds. .Bl -tag -width indent .It Va WITHOUT_ACCT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACCT 223201 2011-06-17 20:47:44Z ed Set to not build process accounting tools such as .Xr accton 8 and .Xr sa 8 . .It Va WITHOUT_ACPI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ACPI 156932 2006-03-21 07:50:50Z ru Set to not build .Xr acpiconf 8 , .Xr acpidump 8 and related programs. .It Va WITHOUT_AMD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AMD 183242 2008-09-21 22:02:26Z sam Set to not build .Xr amd 8 , and related programs. .It Va WITHOUT_APM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_APM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr apm 8 , .Xr apmd 8 and related programs. .It Va WITHOUT_ASSERT_DEBUG -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ASSERT_DEBUG 162215 2006-09-11 13:55:27Z ru Set to compile programs and libraries without the .Xr assert 3 checks. .It Va WITHOUT_AT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AT 183242 2008-09-21 22:02:26Z sam Set to not build .Xr at 1 and related utilities. .It Va WITHOUT_ATM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ATM 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to ATM networking. .It Va WITHOUT_AUDIT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUDIT 156932 2006-03-21 07:50:50Z ru Set to not build audit support into system programs. .It Va WITHOUT_AUTHPF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . .It Va WITHOUT_AUTOFS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_AUTOFS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr autofs 5 related programs, libraries, and kernel modules. .It Va WITH_AUTO_OBJ -.\" from FreeBSD: stable/11/tools/build/options/WITH_AUTO_OBJ 284708 2015-06-22 20:21:57Z sjg Enable automatic creation of objdirs. .Pp This must be set in the environment, make command line, or @@ -151,14 +139,12 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_BHYVE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BHYVE 277727 2015-01-26 06:44:48Z ngie Set to not build or install .Xr bhyve 8 , associated utilities, and examples. .Pp This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS 286332 2015-08-05 18:30:00Z emaste Set to not build or install binutils (as, ld, objcopy, and objdump ) as part of the normal system build. The resulting system cannot build programs from source. @@ -166,14 +152,12 @@ The resulting system cannot build progra It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS -.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS 295491 2016-02-11 00:14:00Z emaste Set to build and install binutils (as, ld, objcopy, and objdump) as part of the normal system build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BINUTILS_BOOTSTRAP 295490 2016-02-10 23:57:09Z emaste Set to not build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Bf -symbolic @@ -184,14 +168,12 @@ toolchain is provided. It is a default setting on arm64/aarch64. .It Va WITH_BINUTILS_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_BINUTILS_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set build binutils (as, ld, objcopy and objdump) as part of the bootstrap process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BLACKLIST -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST 301554 2016-06-07 16:35:55Z lidl Set this if you do not want to build blacklistd / blacklistctl. When set, it also enforces the following options: .Pp @@ -200,7 +182,6 @@ When set, it also enforces the following .Va WITHOUT_BLACKLIST_SUPPORT .El .It Va WITHOUT_BLACKLIST_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLACKLIST_SUPPORT 301554 2016-06-07 16:35:55Z lidl Set to build some programs without blacklistd support, like .Xr fingerd 8 , .Xr ftpd 8 , @@ -209,39 +190,30 @@ Set to build some programs without black and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. .It Va WITHOUT_BOOTPARAMD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootparamd 8 . .It Va WITHOUT_BOOTPD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie Set to not build .Xr bsdinstall 8 , .Xr sade 8 , and related programs. .It Va WITHOUT_BSD_CPIO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on .Xr libarchive 3 . .It Va WITH_BSD_GREP -.\" from FreeBSD: stable/11/tools/build/options/WITH_BSD_GREP 222273 2011-05-25 01:04:12Z obrien Install BSD-licensed grep as '[ef]grep' instead of GNU grep. .It Va WITHOUT_BSNMP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BSNMP 183306 2008-09-23 16:15:42Z sam Set to not build or install .Xr bsnmpd 1 and related libraries and data files. .It Va WITHOUT_BZIP2 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2 174550 2007-12-12 16:43:17Z ru Set to not build contributed bzip2 software as a part of the base system. .Bf -symbolic The option has no effect yet. @@ -253,14 +225,11 @@ When set, it also enforces the following .Va WITHOUT_BZIP2_SUPPORT .El .It Va WITHOUT_BZIP2_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_BZIP2_SUPPORT 166255 2007-01-26 10:19:08Z delphij Set to build some programs without optional bzip2 support. .It Va WITHOUT_CALENDAR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . .It Va WITHOUT_CAPSICUM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. When set, it also enforces the following options: .Pp @@ -269,10 +238,8 @@ When set, it also enforces the following .Va WITHOUT_CASPER .El .It Va WITHOUT_CASPER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CASPER 258838 2013-12-02 08:21:28Z pjd Set to not build Casper program and related libraries. .It Va WITH_CCACHE_BUILD -.\" from FreeBSD: stable/11/tools/build/options/WITH_CCACHE_BUILD 297436 2016-03-30 23:53:12Z bdrewery Set to use .Xr ccache 1 for the build. @@ -312,12 +279,10 @@ See .Xr ccache 1 for more configuration options. .It Va WITHOUT_CCD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CCD 277678 2015-01-25 04:52:48Z ngie Set to not build .Xr geom_ccd 4 and related utilities. .It Va WITHOUT_CDDL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. When set, it also enforces the following options: .Pp @@ -328,7 +293,6 @@ When set, it also enforces the following .Va WITHOUT_ZFS .El .It Va WITHOUT_CLANG -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG 264660 2014-04-18 17:03:58Z imp Set to not build the Clang C/C++ compiler during the regular phase of the build. .Pp It is a default setting on @@ -342,13 +306,11 @@ When set, it also enforces the following .Va WITHOUT_CLANG_FULL .El .It Va WITH_CLANG -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build the Clang C/C++ compiler during the bootstrap phase of the build. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -357,30 +319,25 @@ XCC. It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build the Clang C/C++ compiler during the bootstrap phase of the build. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_CLANG_EXTRAS -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_EXTRAS 231057 2012-02-05 23:56:22Z dim Set to build additional clang and llvm tools, such as bugpoint. .It Va WITHOUT_CLANG_FULL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on sparc64/sparc64. .It Va WITH_CLANG_FULL -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_FULL 246259 2013-02-02 22:28:29Z dim Set to build the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc and powerpc/powerpc64. .It Va WITHOUT_CLANG_IS_CC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CLANG_IS_CC 242629 2012-11-05 21:53:23Z brooks Set to install the GCC compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -390,7 +347,6 @@ and It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_CLANG_IS_CC -.\" from FreeBSD: stable/11/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 16:12:36Z gjb Set to install the Clang C/C++ compiler as .Pa /usr/bin/cc , .Pa /usr/bin/c++ @@ -400,11 +356,9 @@ and It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_CPP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CPP 156932 2006-03-21 07:50:50Z ru Set to not build .Xr cpp 1 . .It Va WITHOUT_CROSS_COMPILER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CROSS_COMPILER 275138 2014-11-26 20:43:09Z gjb Set to not build any cross compiler in the cross-tools stage of buildworld. If you are compiling a different version of .Fx @@ -430,7 +384,6 @@ When set, it also enforces the following .Va WITHOUT_GCC_BOOTSTRAP .El .It Va WITHOUT_CRYPT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CRYPT 156932 2006-03-21 07:50:50Z ru Set to not build any crypto code. When set, it also enforces the following options: .Pp @@ -454,20 +407,16 @@ When set, the following options are also is set explicitly) .El .It Va WITH_CTF -.\" from FreeBSD: stable/11/tools/build/options/WITH_CTF 228159 2011-11-30 18:22:44Z fjoe Set to compile with CTF (Compact C Type Format) data. CTF data encapsulates a reduced form of debugging information similar to DWARF and the venerable stabs and is required for DTrace. .It Va WITHOUT_CTM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CTM 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ctm 1 and related utilities. .It Va WITHOUT_CUSE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CUSE 270171 2014-08-19 15:40:26Z hselasky Set to not build CUSE-related programs and libraries. .It Va WITHOUT_CXX -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_CXX 281053 2015-04-03 23:55:04Z bdrewery Set to not build .Xr c++ 1 and related libraries. @@ -490,14 +439,11 @@ When set, it also enforces the following .Va WITHOUT_GROFF .El .It Va WITHOUT_DEBUG_FILES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DEBUG_FILES 290059 2015-10-27 20:49:56Z emaste Set to avoid building or installing standalone debug files for each executable binary and shared library. .It Va WITHOUT_DICT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. .It Va WITH_DIRDEPS_BUILD -.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_BUILD 298007 2016-04-14 22:00:49Z bdrewery This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. @@ -577,7 +523,6 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_DIRDEPS_CACHE -.\" from FreeBSD: stable/11/tools/build/options/WITH_DIRDEPS_CACHE 290816 2015-11-14 03:24:48Z sjg Cache result of dirdeps.mk which can save significant time for subsequent builds. Depends on @@ -588,47 +533,38 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITHOUT_DMAGENT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 13:05:23Z bapt Set to not build dma Mail Transport Agent .It Va WITHOUT_DOCCOMPRESS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DOCCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed system documentation. Only the uncompressed version will be installed. .It Va WITH_DTRACE_TESTS -.\" from FreeBSD: stable/11/tools/build/options/WITH_DTRACE_TESTS 286174 2015-08-02 00:37:33Z markj Set to build and install the DTrace test suite in .Pa /usr/tests/cddl/usr.sbin/dtrace . This test suite is considered experimental on architectures other than amd64/amd64 and running it may cause system instability. .It Va WITHOUT_DYNAMICROOT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_DYNAMICROOT 156932 2006-03-21 07:50:50Z ru Set this if you do not want to link .Pa /bin and .Pa /sbin dynamically. .It Va WITHOUT_ED_CRYPTO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ED_CRYPTO 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ed 1 without support for encryption/decryption. .It Va WITHOUT_EE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EE 277663 2015-01-25 00:03:44Z ngie Set to not build and install .Xr edit 1 , .Xr ee 1 , and related programs. .It Va WITH_EISA -.\" from FreeBSD: stable/11/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. .It Va WITHOUT_ELFCOPY_AS_OBJCOPY -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFCOPY_AS_OBJCOPY 296193 2016-02-29 16:39:38Z emaste Set to build and install .Xr objcopy 1 from GNU Binutils, instead of the one from ELF Tool Chain. This option is provided as a transition aid and will be removed in due time. .It Va WITHOUT_ELFTOOLCHAIN_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ELFTOOLCHAIN_BOOTSTRAP 295491 2016-02-11 00:14:00Z emaste Set to not build ELF Tool Chain tools (addr2line, nm, size, strings and strip) as part of the bootstrap process. @@ -636,76 +572,60 @@ as part of the bootstrap process. An alternate bootstrap tool chain must be provided. .Ef .It Va WITHOUT_EXAMPLES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to .Pa /usr/share/examples/ . .It Va WITH_EXTRA_TCP_STACKS -.\" from FreeBSD: stable/11/tools/build/options/WITH_EXTRA_TCP_STACKS 302247 2016-06-28 13:37:01Z jtl Set to build extra TCP stack modules. .It Va WITHOUT_FDT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. .It Va WITHOUT_FILE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie Set to not build .Xr file 1 and related programs. .It Va WITHOUT_FINGER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr finger 1 and .Xr fingerd 8 . .It Va WITHOUT_FLOPPY -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs for operating floppy disk driver. .It Va WITHOUT_FMTREE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 21:37:43Z brooks Set to not build and install .Pa /usr/sbin/fmtree . .It Va WITHOUT_FORMAT_EXTENSIONS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORMAT_EXTENSIONS 250658 2013-05-15 13:04:10Z brooks Set to not enable .Fl fformat-extensions when compiling the kernel. Also disables all format checking. .It Va WITHOUT_FORTH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FORTH 156932 2006-03-21 07:50:50Z ru Set to build bootloaders without Forth support. .It Va WITHOUT_FP_LIBC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FP_LIBC 156932 2006-03-21 07:50:50Z ru Set to build .Nm libc without floating-point support. .It Va WITHOUT_FREEBSD_UPDATE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . .It Va WITHOUT_FTP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr ftp 1 and .Xr ftpd 8 . .It Va WITHOUT_GAMES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. .It Va WITHOUT_GCC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC 264660 2014-04-18 17:03:58Z imp Set to not build and install gcc and g++ as part of the normal build process. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC -.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC 255326 2013-09-06 20:49:48Z zeising Set to build and install gcc and g++. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCC_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCC_BOOTSTRAP 273177 2014-10-16 18:28:11Z skreuzer Set to not build gcc and g++ as part of the bootstrap process. You must enable either gcc or clang bootstrap to be able to build the system, unless an alternative compiler is provided via @@ -714,32 +634,27 @@ XCC. It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GCC_BOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_GCC_BOOTSTRAP 264660 2014-04-18 17:03:58Z imp Set to build gcc and g++ as part of the bootstrap process. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GCOV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GCOV 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr gcov 1 tool. .It Va WITHOUT_GDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GDB 156932 2006-03-21 07:50:50Z ru Set to not build .Xr gdb 1 . .Pp It is a default setting on arm64/aarch64. .It Va WITH_GDB -.\" from FreeBSD: stable/11/tools/build/options/WITH_GDB 295493 2016-02-11 00:30:51Z emaste Set to build .Xr gdb 1 . .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU 174550 2007-12-12 16:43:17Z ru Set to not build contributed GNU software as a part of the base system. This option can be useful if the system built must not contain any code covered by the GNU Public License due to legal reasons. @@ -753,37 +668,30 @@ When set, it also enforces the following .Va WITHOUT_GNU_SUPPORT .El .It Va WITHOUT_GNUCXX -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNUCXX 255321 2013-09-06 20:08:03Z theraven Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITH_GNUCXX -.\" from FreeBSD: stable/11/tools/build/options/WITH_GNUCXX 255321 2013-09-06 20:08:03Z theraven Build the GNU C++ stack (g++, libstdc++). This is the default on platforms where gcc is the system compiler. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_GNU_GREP_COMPAT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_GREP_COMPAT 273421 2014-10-21 20:44:33Z emaste Set this option to omit the gnu extensions to grep from being included in BSD grep. .It Va WITHOUT_GNU_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GNU_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without optional GNU support. .It Va WITHOUT_GPIO -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPIO 228081 2011-11-28 17:54:34Z dim Set to not build .Xr gpioctl 8 as part of the base system. .It Va WITHOUT_GPL_DTC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GPL_DTC 264515 2014-04-15 20:41:55Z imp Set to build the BSD licensed version of the device tree compiler, instead of the GPL'd one from elinux.org. .It Va WITHOUT_GROFF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build .Xr groff 1 and @@ -791,27 +699,20 @@ and You should consider installing the textproc/groff port to not break .Xr man 1 . .It Va WITHOUT_GSSAPI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. .It Va WITHOUT_HAST -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HAST 277725 2015-01-26 06:27:07Z ngie Set to not build .Xr hastd 8 and related utilities. .It Va WITH_HESIOD -.\" from FreeBSD: stable/11/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. .It Va WITHOUT_HTML -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_HYPERV 271493 2014-09-13 02:15:31Z delphij Set to not build or install HyperV utilities. .It Va WITHOUT_ICONV -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ICONV 254919 2013-08-26 17:15:56Z antoine Set to not build iconv as part of libc. .It Va WITHOUT_INCLUDES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INCLUDES 275138 2014-11-26 20:43:09Z gjb Set to not install header files. This option used to be spelled .Va NO_INCS . @@ -819,7 +720,6 @@ This option used to be spelled The option does not work for build targets. .Ef .It Va WITHOUT_INET -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET 221266 2011-04-30 17:58:28Z bz Set to not build programs and libraries related to IPv4 networking. When set, it also enforces the following options: .Pp @@ -828,7 +728,6 @@ When set, it also enforces the following .Va WITHOUT_INET_SUPPORT .El .It Va WITHOUT_INET6 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET6 156932 2006-03-21 07:50:50Z ru Set to not build programs and libraries related to IPv6 networking. When set, it also enforces the following options: @@ -838,17 +737,13 @@ When set, it also enforces the following .Va WITHOUT_INET6_SUPPORT .El .It Va WITHOUT_INET6_SUPPORT -.\" from FreeBSD: stable/11/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_INETD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie Set to not build .Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. .It Va WITHOUT_INSTALLLIB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_INSTALLLIB 297941 2016-04-13 21:01:58Z bdrewery Set this if you do not want to install optional libraries. For example when creating a .Xr nanobsd 8 @@ -857,7 +752,6 @@ image. The option does not work for build targets. .Ef .It Va WITH_INSTALL_AS_USER -.\" from FreeBSD: stable/11/tools/build/options/WITH_INSTALL_AS_USER 238021 2012-07-02 20:24:01Z marcel Set to make install targets succeed for non-root users by installing files with owner and group attributes set to that of the user running the @@ -867,13 +761,10 @@ The user still has to set the .Va DESTDIR variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFILTER 156932 2006-03-21 07:50:50Z ru Set to not build IP Filter package. .It Va WITHOUT_IPFW -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPFW 183242 2008-09-21 22:02:26Z sam Set to not build IPFW tools. .It Va WITHOUT_IPSEC_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_IPSEC_SUPPORT 316250 2017-03-30 06:09:39Z ngie Set to not build the kernel with .Xr ipsec 4 support. @@ -882,22 +773,18 @@ This option is needed for and .Xr tcpmd5 4 . .It Va WITHOUT_ISCSI -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ISCSI 277675 2015-01-25 04:20:11Z ngie Set to not build .Xr iscid 8 and related utilities. .It Va WITHOUT_JAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and .Xr truss 1 . .It Va WITHOUT_KERBEROS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS 174549 2007-12-12 16:42:03Z ru Set this if you do not want to build Kerberos 5 (KTH Heimdal). When set, it also enforces the following options: .Pp @@ -915,7 +802,6 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERBEROS_SUPPORT 251794 2013-06-15 20:29:07Z eadler Set to build some programs without Kerberos support, like .Xr ssh 1 , .Xr telnet 1 , @@ -923,13 +809,11 @@ Set to build some programs without Kerbe and .Xr telnetd 8 . .It Va WITHOUT_KERNEL_SYMBOLS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KERNEL_SYMBOLS 222189 2011-05-22 18:23:17Z imp Set to not install kernel symbol files. .Bf -symbolic This option is recommended for those people who have small root partitions. .Ef .It Va WITHOUT_KVM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM 174550 2007-12-12 16:43:17Z ru Set to not build the .Nm libkvm library as a part of the base system. @@ -943,12 +827,10 @@ When set, it also enforces the following .Va WITHOUT_KVM_SUPPORT .El .It Va WITHOUT_KVM_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_KVM_SUPPORT 170644 2007-06-13 02:08:04Z sepotvin Set to build some programs without optional .Nm libkvm support. .It Va WITHOUT_LDNS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LDNS 255591 2013-09-15 13:11:13Z des Setting this variable will prevent the LDNS library from being built. When set, it also enforces the following options: .Pp @@ -959,27 +841,22 @@ When set, it also enforces the following .Va WITHOUT_UNBOUND .El .It Va WITHOUT_LDNS_UTILS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LDNS_UTILS 255850 2013-09-24 14:33:31Z des Setting this variable will prevent building the LDNS utilities .Xr drill 1 and .Xr host 1 . .It Va WITHOUT_LEGACY_CONSOLE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LEGACY_CONSOLE 296264 2016-03-01 11:36:10Z trasz Set to not build programs that support a legacy PC console; e.g., .Xr kbdcontrol 1 and .Xr vidcontrol 1 . .It Va WITHOUT_LIB32 -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIB32 274664 2014-11-18 17:06:48Z imp On 64-bit platforms, set to not build 32-bit library set and a .Nm ld-elf32.so.1 runtime linker. .It Va WITHOUT_LIBCPLUSPLUS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 2013-02-02 22:42:46Z dim Set to avoid building libcxxrt and libc++. .It Va WITHOUT_LIBPTHREAD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBPTHREAD 188848 2009-02-20 11:09:55Z mtm Set to not build the .Nm libpthread providing library, @@ -991,17 +868,14 @@ When set, it also enforces the following .Va WITHOUT_LIBTHR .El .It Va WITH_LIBSOFT -.\" from FreeBSD: stable/11/tools/build/options/WITH_LIBSOFT 300325 2016-05-20 19:23:07Z bdrewery On armv6 only, set to enable soft float ABI compatibility libraries. This option is for transitioning to the new hard float ABI. .It Va WITHOUT_LIBTHR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LIBTHR 156932 2006-03-21 07:50:50Z ru Set to not build the .Nm libthr (1:1 threading) library. .It Va WITHOUT_LLD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLD 310618 2016-12-26 20:36:37Z dim Set to not build LLVM's lld linker. .Pp It is a default setting on @@ -1013,31 +887,26 @@ When set, it also enforces the following .Va WITHOUT_LLD_IS_LD .El .It Va WITH_LLD -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLD 310618 2016-12-26 20:36:37Z dim Set to build LLVM's lld linker. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm64/aarch64, i386/i386 and pc98/i386. .It Va WITHOUT_LLDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLDB 289275 2015-10-14 00:23:31Z emaste Set to not build the LLDB debugger. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLDB -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLDB 255722 2013-09-20 01:52:02Z emaste Set to build the LLDB debugger. .Pp It is a default setting on amd64/amd64 and arm64/aarch64. .It Va WITHOUT_LLD_IS_LD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLD_IS_LD 316423 2017-04-02 17:24:58Z dim Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLD_IS_LD -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLD_IS_LD 316423 2017-04-02 17:24:58Z dim Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. .Pp It is a default setting on @@ -1051,41 +920,33 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_LLVM_LIBUNWIND -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp It is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_LLVM_LIBUNWIND -.\" from FreeBSD: stable/11/tools/build/options/WITH_LLVM_LIBUNWIND 293450 2016-01-09 00:42:07Z emaste Set to use LLVM's libunwind stack unwinder (instead of GCC's unwinder). .Pp It is a default setting on arm64/aarch64. .It Va WITHOUT_LOCALES -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCALES 156932 2006-03-21 07:50:50Z ru Set to not build localization files; see .Xr locale 1 . .It Va WITHOUT_LOCATE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LOCATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr locate 1 and related programs. .It Va WITHOUT_LPR -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LPR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr lpr 1 and related programs. .It Va WITHOUT_LS_COLORS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LS_COLORS 235660 2012-05-19 20:05:27Z marcel Set to build .Xr ls 1 without support for colors to distinguish file types. .It Va WITHOUT_LZMA_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_LZMA_SUPPORT 245171 2013-01-08 18:37:12Z obrien Set to build some programs without optional lzma compression support. .It Va WITHOUT_MAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAIL 183242 2008-09-21 22:02:26Z sam Set to not build any mail support (MUA or MTA). When set, it also enforces the following options: .Pp @@ -1098,17 +959,14 @@ When set, it also enforces the following .Va WITHOUT_SENDMAIL .El .It Va WITHOUT_MAILWRAPPER -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAILWRAPPER 156932 2006-03-21 07:50:50Z ru Set to not build the .Xr mailwrapper 8 MTA selector. .It Va WITHOUT_MAKE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAKE 183242 2008-09-21 22:02:26Z sam Set to not install .Xr make 1 and related support files. .It Va WITHOUT_MAN -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN 156932 2006-03-21 07:50:50Z ru Set to not build manual pages. When set, the following options are also in effect: .Pp @@ -1119,11 +977,9 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_MANCOMPRESS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANCOMPRESS 266752 2014-05-27 15:52:27Z gjb Set to not to install compressed man pages. Only the uncompressed versions will be installed. .It Va WITHOUT_MANDOCDB -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MANDOCDB 311528 2017-01-06 18:08:42Z emaste Use the version of .Xr makewhatis 1 introduced in @@ -1133,7 +989,6 @@ instead of the database and utilities from .Xr mandoc 1 . .It Va WITHOUT_MAN_UTILS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 00:07:21Z jkim Set to not build utilities for manual pages, .Xr apropos 1 , .Xr catman 1 , @@ -1143,7 +998,6 @@ Set to not build utilities for manual pa .Xr manctl 8 , and related support files. .It Va WITH_META_MODE -.\" from FreeBSD: stable/11/tools/build/options/WITH_META_MODE 301889 2016-06-14 16:20:25Z bdrewery Creates .Xr make 1 meta files when building, which can provide a reliable incremental build when @@ -1211,19 +1065,15 @@ This must be set in the environment, mak not .Pa /etc/src.conf . .It Va WITH_NAND -.\" from FreeBSD: stable/11/tools/build/options/WITH_NAND 235537 2012-05-17 10:11:18Z gber Set to build the NAND Flash components. .It Va WITHOUT_NDIS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NDIS 183242 2008-09-21 22:02:26Z sam Set to not build programs and libraries related to NDIS emulation support. .It Va WITHOUT_NETCAT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETCAT 156932 2006-03-21 07:50:50Z ru Set to not build .Xr nc 1 utility. .It Va WITHOUT_NETGRAPH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH 183242 2008-09-21 22:02:26Z sam Set to not build applications to support .Xr netgraph 4 . When set, it also enforces the following options: @@ -1237,10 +1087,8 @@ When set, it also enforces the following .Va WITHOUT_NETGRAPH_SUPPORT .El .It Va WITHOUT_NETGRAPH_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NETGRAPH_SUPPORT 183305 2008-09-23 16:11:15Z sam Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NIS 156932 2006-03-21 07:50:50Z ru Set to not build .Xr NIS 8 support and related programs. @@ -1250,14 +1098,11 @@ and remove .Sq nis entries. .It Va WITHOUT_NLS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalogs. .It Va WITHOUT_NLS_CATALOGS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NLS_CATALOGS 156932 2006-03-21 07:50:50Z ru Set to not build NLS catalog support for .Xr csh 1 . .It Va WITHOUT_NS_CACHING -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NS_CACHING 172803 2007-10-19 14:01:25Z ru Set to disable name caching in the .Pa nsswitch subsystem. @@ -1265,23 +1110,18 @@ The generic caching daemon, .Xr nscd 8 , will not be built either if this option is set. .It Va WITHOUT_NTP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_NTP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ntpd 8 and related programs. .It Va WITH_OFED -.\" from FreeBSD: stable/11/tools/build/options/WITH_OFED 228081 2011-11-28 17:54:34Z dim Set to build the .Dq "OpenFabrics Enterprise Distribution" Infiniband software stack. .It Va WITH_OPENLDAP -.\" from FreeBSD: stable/11/tools/build/options/WITH_OPENLDAP 264902 2014-04-24 23:17:31Z imp Enable building openldap support for kerberos. .It Va WITHOUT_OPENSSH -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITHOUT_OPENSSL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_OPENSSL 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSL. When set, it also enforces the following options: .Pp @@ -1303,7 +1143,6 @@ When set, the following options are also is set explicitly) .El .It Va WITHOUT_PAM -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PAM 174550 2007-12-12 16:43:17Z ru Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. @@ -1315,18 +1154,15 @@ When set, it also enforces the following .Va WITHOUT_PAM_SUPPORT .El .It Va WITHOUT_PAM_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PAM_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without PAM support, particularly .Xr ftpd 8 and .Xr ppp 8 . .It Va WITHOUT_PC_SYSINSTALL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PC_SYSINSTALL 245606 2013-01-18 15:57:09Z eadler Set to not build .Xr pc-sysinstall 8 and related programs. .It Va WITHOUT_PF -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PF 156932 2006-03-21 07:50:50Z ru Set to not build PF firewall package. When set, it also enforces the following options: .Pp @@ -1335,45 +1171,36 @@ When set, it also enforces the following .Va WITHOUT_AUTHPF .El .It Va WITHOUT_PKGBOOTSTRAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PKGBOOTSTRAP 258924 2013-12-04 15:58:42Z bdrewery Set to not build .Xr pkg 7 bootstrap tool. .It Va WITHOUT_PMC -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PMC 183242 2008-09-21 22:02:26Z sam Set to not build .Xr pmccontrol 8 and related programs. .It Va WITHOUT_PORTSNAP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PORTSNAP 183242 2008-09-21 22:02:26Z sam Set to not build or install .Xr portsnap 8 and related files. .It Va WITHOUT_PPP -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PPP 183242 2008-09-21 22:02:26Z sam Set to not build .Xr ppp 8 and related programs. .It Va WITHOUT_PROFILE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_PROFILE 228196 2011-12-02 09:09:54Z fjoe Set to avoid compiling profiled libraries. .It Va WITHOUT_QUOTAS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_QUOTAS 296264 2016-03-01 11:36:10Z trasz Set to not build .Xr quota 1 and related programs. .It Va WITHOUT_RADIUS_SUPPORT -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RADIUS_SUPPORT 278182 2015-02-04 06:53:45Z ngie Set to not build radius support into various applications, like .Xr pam_radius 8 and .Xr ppp 8 . .It Va WITHOUT_RBOOTD -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RBOOTD 278192 2015-02-04 10:19:32Z ngie Set to not build or install .Xr rbootd 8 . .It Va WITHOUT_RCMDS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the .Bx r-commands. @@ -1382,53 +1209,43 @@ This includes .Xr rsh 1 , etc. .It Va WITHOUT_RCS -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RCS 275138 2014-11-26 20:43:09Z gjb Set to not build .Xr rcs 1 , .Xr etcupdate 8 , and related utilities. .It Va WITH_REPRODUCIBLE_BUILD -from FreeBSD: stable/11/tools/build/options/WITH_REPRODUCIBLE_BUILD 312730 2017-01-25 01:04:51Z emaste Set to exclude build metadata (such as the build time, user, or host) from the kernel, boot loaders, and uname output, so that builds produce bit-for-bit identical output. .It Va WITHOUT_RESCUE -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_RESCUE 156932 2006-03-21 07:50:50Z ru Set to not build .Xr rescue 8 . .It Va WITHOUT_ROUTED -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_ROUTED 183242 2008-09-21 22:02:26Z sam Set to not build .Xr routed 8 utility. .It Va WITHOUT_SENDMAIL -.\" from FreeBSD: stable/11/tools/build/options/WITHOUT_SENDMAIL 156932 2006-03-21 07:50:50Z ru Set to not build .Xr sendmail 8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon May 15 14:22:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 973F9D6E322; Mon, 15 May 2017 14:22:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65306B7D; Mon, 15 May 2017 14:22:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEM3xl049085; Mon, 15 May 2017 14:22:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEM3VR049084; Mon, 15 May 2017 14:22:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151422.v4FEM3VR049084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318291 - stable/11/release/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:22:04 -0000 Author: emaste Date: Mon May 15 14:22:03 2017 New Revision: 318291 URL: https://svnweb.freebsd.org/changeset/base/318291 Log: MFC r317376: Add sysutils/tmux to the DVD package set The zsh + tmux combination is commonly wanted. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/scripts/pkg-stage.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/release/scripts/pkg-stage.sh ============================================================================== --- stable/11/release/scripts/pkg-stage.sh Mon May 15 14:11:18 2017 (r318290) +++ stable/11/release/scripts/pkg-stage.sh Mon May 15 14:22:03 2017 (r318291) @@ -24,6 +24,7 @@ shells/bash shells/zsh security/sudo sysutils/screen +sysutils/tmux www/firefox www/links x11-drivers/xf86-video-vmware From owner-svn-src-stable@freebsd.org Mon May 15 14:23:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49861D6E3D3; Mon, 15 May 2017 14:23:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24930D7C; Mon, 15 May 2017 14:23:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FENsFZ051867; Mon, 15 May 2017 14:23:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FENrt1051858; Mon, 15 May 2017 14:23:53 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151423.v4FENrt1051858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318292 - in stable/11/sys: conf modules/linux modules/linux64 modules/svr4 modules/vmm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:23:55 -0000 Author: emaste Date: Mon May 15 14:23:53 2017 New Revision: 318292 URL: https://svnweb.freebsd.org/changeset/base/318292 Log: MFC r314054: Exclude -flto when building *genassym.o The build process generates *assym.h using nm from *genassym.o (which is in turn created from *genassym.c). When compiling with link-time optimization (LTO) using -flto, .o files are LLVM bitcode, not ELF objects. This is not usable by genassym.sh, so remove -flto from those ${CC} invocations. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 stable/11/sys/conf/kern.post.mk stable/11/sys/conf/kmod.mk stable/11/sys/modules/linux/Makefile stable/11/sys/modules/linux64/Makefile stable/11/sys/modules/svr4/Makefile stable/11/sys/modules/vmm/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/files.amd64 Mon May 15 14:23:53 2017 (r318292) @@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o optional compat_ # linux32_genassym.o optional compat_linux32 \ dependency "$S/amd64/linux32/linux32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" # @@ -58,7 +58,7 @@ linux32_vdso.so optional compat_linux32 # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/files.i386 Mon May 15 14:23:53 2017 (r318292) @@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o optional compat_ # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # @@ -45,7 +45,7 @@ linux_vdso.so optional compat_linux \ # svr4_genassym.o optional compat_svr4 \ dependency "$S/i386/svr4/svr4_genassym.c" \ - compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "svr4_genassym.o" # Modified: stable/11/sys/conf/kern.post.mk ============================================================================== --- stable/11/sys/conf/kern.post.mk Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/kern.post.mk Mon May 15 14:23:53 2017 (r318292) @@ -189,7 +189,7 @@ assym.s: $S/kern/genassym.sh genassym.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c - ${CC} -c ${CFLAGS:N-fno-common} $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h Modified: stable/11/sys/conf/kmod.mk ============================================================================== --- stable/11/sys/conf/kmod.mk Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/conf/kmod.mk Mon May 15 14:23:53 2017 (r318292) @@ -462,7 +462,7 @@ assym.s: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c .endif Modified: stable/11/sys/modules/linux/Makefile ============================================================================== --- stable/11/sys/modules/linux/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/linux/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -71,7 +71,7 @@ ${VDSO}.so: linux${SFX}_locore.o .endif linux${SFX}_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(KTR) Modified: stable/11/sys/modules/linux64/Makefile ============================================================================== --- stable/11/sys/modules/linux64/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/linux64/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -44,7 +44,7 @@ linux_support.o: assym.s linux_assym.h ${.IMPSRC} -o ${.TARGET} linux_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(DEBUG) Modified: stable/11/sys/modules/svr4/Makefile ============================================================================== --- stable/11/sys/modules/svr4/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/svr4/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -22,7 +22,7 @@ svr4_locore.o: svr4_locore.s svr4_assym. ${.IMPSRC} -o ${.TARGET} svr4_genassym.o: svr4_genassym.c svr4.h - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .if !defined(KERNBUILDDIR) && defined(DEBUG) opt_svr4.h: Modified: stable/11/sys/modules/vmm/Makefile ============================================================================== --- stable/11/sys/modules/vmm/Makefile Mon May 15 14:22:03 2017 (r318291) +++ stable/11/sys/modules/vmm/Makefile Mon May 15 14:23:53 2017 (r318292) @@ -71,9 +71,9 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} svm_genassym.o: - ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} .include From owner-svn-src-stable@freebsd.org Mon May 15 14:41:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2267D6E93D; Mon, 15 May 2017 14:41:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C21811E12; Mon, 15 May 2017 14:41:48 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FEflkt059640; Mon, 15 May 2017 14:41:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FEflD1059639; Mon, 15 May 2017 14:41:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705151441.v4FEflD1059639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 15 May 2017 14:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318293 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 14:41:49 -0000 Author: emaste Date: Mon May 15 14:41:47 2017 New Revision: 318293 URL: https://svnweb.freebsd.org/changeset/base/318293 Log: MFC r315685: tighten buffer bounds in imgact_binmisc_populate_interp We must ensure there's space for the terminating null in the temporary buffer in imgact_binmisc_populate_interp(). Note that there's no buffer overflow here because xbe->xbe_interpreter's length and null termination is checked in imgact_binmisc_add_entry() before imgact_binmisc_populate_interp() is called. However, the latter should correctly enforce its own bounds. Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/kern/imgact_binmisc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/imgact_binmisc.c ============================================================================== --- stable/11/sys/kern/imgact_binmisc.c Mon May 15 14:23:53 2017 (r318292) +++ stable/11/sys/kern/imgact_binmisc.c Mon May 15 14:41:47 2017 (r318293) @@ -120,7 +120,7 @@ imgact_binmisc_populate_interp(char *str sp = str; tp = t; while (*sp != '\0') { if (*sp == ' ' || *sp == '\t') { - if (++len > IBE_INTERP_LEN_MAX) + if (++len >= IBE_INTERP_LEN_MAX) break; *tp++ = ' '; argc++; From owner-svn-src-stable@freebsd.org Mon May 15 15:28:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B319D6D7DF; Mon, 15 May 2017 15:28:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 167281CF2; Mon, 15 May 2017 15:28:01 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FFS06q077011; Mon, 15 May 2017 15:28:00 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FFS0k9077007; Mon, 15 May 2017 15:28:00 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705151528.v4FFS0k9077007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 15 May 2017 15:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318295 - in stable/10: lib/libmt usr.bin/mt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 15:28:01 -0000 Author: ken Date: Mon May 15 15:27:59 2017 New Revision: 318295 URL: https://svnweb.freebsd.org/changeset/base/318295 Log: MFC r318185: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. Sponsored by: Spectra Logic Modified: stable/10/lib/libmt/mtlib.c stable/10/usr.bin/mt/mt.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libmt/mtlib.c ============================================================================== --- stable/10/lib/libmt/mtlib.c Mon May 15 15:18:36 2017 (r318294) +++ stable/10/lib/libmt/mtlib.c Mon May 15 15:27:59 2017 (r318295) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: stable/10/usr.bin/mt/mt.1 ============================================================================== --- stable/10/usr.bin/mt/mt.1 Mon May 15 15:18:36 2017 (r318294) +++ stable/10/usr.bin/mt/mt.1 Mon May 15 15:27:59 2017 (r318295) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-stable@freebsd.org Mon May 15 15:28:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 070B5D6D7E7; Mon, 15 May 2017 15:28:03 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B440B1CF6; Mon, 15 May 2017 15:28:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FFS1ZV077062; Mon, 15 May 2017 15:28:01 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FFS1Df077060; Mon, 15 May 2017 15:28:01 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201705151528.v4FFS1Df077060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 15 May 2017 15:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318296 - in stable/11: lib/libmt usr.bin/mt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 15:28:03 -0000 Author: ken Date: Mon May 15 15:28:01 2017 New Revision: 318296 URL: https://svnweb.freebsd.org/changeset/base/318296 Log: MFC r318185: Add LTO-8 density codes. lib/libmt/mtlib.c: Add the LTO-8 density code to the density table in libmt. usr.bin/mt/mt.1: Add the LTO-8 density code, tracks, bpmm, and bpi to the density table in the mt(1) man page. Sponsored by: Spectra Logic Modified: stable/11/lib/libmt/mtlib.c stable/11/usr.bin/mt/mt.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libmt/mtlib.c ============================================================================== --- stable/11/lib/libmt/mtlib.c Mon May 15 15:27:59 2017 (r318295) +++ stable/11/lib/libmt/mtlib.c Mon May 15 15:28:01 2017 (r318296) @@ -644,6 +644,7 @@ static struct densities { { 0x58, 15142, 384607, "LTO-5" }, { 0x5A, 15142, 384607, "LTO-6" }, { 0x5C, 19107, 485318, "LTO-7" }, + { 0x5E, 20669, 524993, "LTO-8" }, { 0x71, 11800, 299720, "3592A1 (encrypted)" }, { 0x72, 11800, 299720, "3592A2 (encrypted)" }, { 0x73, 13452, 341681, "3592A3 (encrypted)" }, Modified: stable/11/usr.bin/mt/mt.1 ============================================================================== --- stable/11/usr.bin/mt/mt.1 Mon May 15 15:27:59 2017 (r318295) +++ stable/11/usr.bin/mt/mt.1 Mon May 15 15:28:01 2017 (r318296) @@ -29,7 +29,7 @@ .\" @(#)mt.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 5, 2017 +.Dd May 11, 2017 .Dt MT 1 .Os .Sh NAME @@ -521,6 +521,7 @@ Value Width Tracks Density 0x58 12.7 (0.5) 1280 15,142 (384,607) C LTO-5 0x5A 12.7 (0.5) 2176 15,142 (384,607) C LTO-6 0x5C 12.7 (0.5) 3584 19,107 (485,318) C LTO-7 +0x5E 12.7 (0.5) 6656 20,669 (524,993) C LTO-8 0x71 12.7 (0.5) 512 11,800 (299,720) C 3592A1 (encrypted) 0x72 12.7 (0.5) 896 11,800 (299,720) C 3592A2 (encrypted) 0x73 12.7 (0.5) 1152 13,452 (341,681) C 3592A3 (encrypted) From owner-svn-src-stable@freebsd.org Mon May 15 17:45:07 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2613ED6DE67; Mon, 15 May 2017 17:45:07 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004361088; Mon, 15 May 2017 17:45:06 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHj5g1040384; Mon, 15 May 2017 17:45:05 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHj5UV040382; Mon, 15 May 2017 17:45:05 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151745.v4FHj5UV040382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 17:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318300 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:45:07 -0000 Author: davidcs Date: Mon May 15 17:45:05 2017 New Revision: 318300 URL: https://svnweb.freebsd.org/changeset/base/318300 Log: MFC r318126 llh_func_filter needs to be configured for 100G Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:34:17 2017 (r318299) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:45:05 2017 (r318300) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-stable@freebsd.org Mon May 15 17:48:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9263ED6E130; Mon, 15 May 2017 17:48:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CEA715C0; Mon, 15 May 2017 17:48:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FHmwup040983; Mon, 15 May 2017 17:48:58 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FHmwHv040982; Mon, 15 May 2017 17:48:58 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151748.v4FHmwHv040982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 17:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318301 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:48:59 -0000 Author: davidcs Date: Mon May 15 17:48:58 2017 New Revision: 318301 URL: https://svnweb.freebsd.org/changeset/base/318301 Log: MFC r318126 llh_func_filter needs to be configured for 100G Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:45:05 2017 (r318300) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c Mon May 15 17:48:58 2017 (r318301) @@ -1986,6 +1986,15 @@ static enum _ecore_status_t ecore_hw_ini } } #endif + /* Add an LLH filter with the primary MAC address. */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) { + rc = ecore_llh_add_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); + if (rc != ECORE_SUCCESS) + DP_NOTICE(p_hwfn, false, + "Failed to add an LLH filter with the primary MAC\n"); + } + if (b_hw_start) { /* enable interrupts */ rc = ecore_int_igu_enable(p_hwfn, p_ptt, int_mode); @@ -2473,6 +2482,11 @@ enum _ecore_status_t ecore_hw_stop(struc rc2 = ECORE_UNKNOWN_ERROR; } } + + /* remove the LLH filter with the primary MAC addres */ + if (p_hwfn->p_dev->num_hwfns > 1 && IS_LEAD_HWFN(p_hwfn)) + ecore_llh_remove_mac_filter(p_hwfn, p_ptt, + p_hwfn->hw_info.hw_mac_addr); } /* hwfn loop */ if (IS_PF(p_dev)) { @@ -4569,7 +4583,7 @@ enum _ecore_status_t ecore_llh_add_mac_f } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx is added at LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); @@ -4651,7 +4665,7 @@ void ecore_llh_remove_mac_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from %d\n", + "MAC: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx was removed from LLH entry %d\n", p_filter[0], p_filter[1], p_filter[2], p_filter[3], p_filter[4], p_filter[5], entry_num); } @@ -4760,37 +4774,37 @@ ecore_llh_add_protocol_filter(struct eco switch (type) { case ECORE_LLH_FILTER_ETHERTYPE: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "ETH type %x is added at %d\n", + "ETH type %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src port %x is added at %d\n", + "TCP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src port %x is added at %d\n", + "UDP src port %x is added at LLH entry %d\n", source_port_or_eth_type, entry_num); break; case ECORE_LLH_FILTER_TCP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP dst port %x is added at %d\n", + "TCP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP dst port %x is added at %d\n", + "UDP dst port %x is added at LLH entry %d\n", dest_port, entry_num); break; case ECORE_LLH_FILTER_TCP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "TCP src/dst ports %x/%x are added at %d\n", + "TCP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; case ECORE_LLH_FILTER_UDP_SRC_AND_DEST_PORT: DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "UDP src/dst ports %x/%x are added at %d\n", + "UDP src/dst ports %x/%x are added at LLH entry %d\n", source_port_or_eth_type, dest_port, entry_num); break; } @@ -4917,7 +4931,7 @@ ecore_llh_remove_protocol_filter(struct } DP_VERBOSE(p_hwfn, ECORE_MSG_HW, - "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from %d\n", + "Protocol filter [type %d, source_port_or_eth_type 0x%x, dest_port 0x%x] was removed from LLH entry %d\n", type, source_port_or_eth_type, dest_port, entry_num); } From owner-svn-src-stable@freebsd.org Mon May 15 18:07:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32CCAD6EE97; Mon, 15 May 2017 18:07:59 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9FE5F42; Mon, 15 May 2017 18:07:58 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FI7vb0050044; Mon, 15 May 2017 18:07:57 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FI7vPJ050040; Mon, 15 May 2017 18:07:57 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151807.v4FI7vPJ050040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318306 - stable/11/sys/dev/qlxgbe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:07:59 -0000 Author: davidcs Date: Mon May 15 18:07:57 2017 New Revision: 318306 URL: https://svnweb.freebsd.org/changeset/base/318306 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/11/sys/dev/qlxgbe/ql_isr.c stable/11/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:02:13 2017 (r318305) +++ stable/11/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:07:57 2017 (r318306) @@ -987,7 +987,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/11/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/11/sys/dev/qlxgbe/ql_os.c Mon May 15 18:02:13 2017 (r318305) +++ stable/11/sys/dev/qlxgbe/ql_os.c Mon May 15 18:07:57 2017 (r318306) @@ -925,7 +925,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1031,20 +1033,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1529,9 +1527,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1922,8 +1920,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1943,6 +1939,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-stable@freebsd.org Mon May 15 18:21:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D70D9D6E68D; Mon, 15 May 2017 18:21:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 991E91DC7; Mon, 15 May 2017 18:21:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FILaaL056193; Mon, 15 May 2017 18:21:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FILaWg056191; Mon, 15 May 2017 18:21:36 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151821.v4FILaWg056191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318308 - stable/10/sys/dev/qlxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:21:38 -0000 Author: davidcs Date: Mon May 15 18:21:36 2017 New Revision: 318308 URL: https://svnweb.freebsd.org/changeset/base/318308 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/10/sys/dev/qlxgbe/ql_isr.c stable/10/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:18:32 2017 (r318307) +++ stable/10/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:21:36 2017 (r318308) @@ -988,7 +988,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/10/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_os.c Mon May 15 18:18:32 2017 (r318307) +++ stable/10/sys/dev/qlxgbe/ql_os.c Mon May 15 18:21:36 2017 (r318308) @@ -930,7 +930,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1036,20 +1038,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1534,9 +1532,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1927,8 +1925,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1948,6 +1944,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-stable@freebsd.org Mon May 15 18:24:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDCAED6E8C3; Mon, 15 May 2017 18:24:15 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B32156; Mon, 15 May 2017 18:24:15 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIOELb059616; Mon, 15 May 2017 18:24:14 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIOEWi059614; Mon, 15 May 2017 18:24:14 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201705151824.v4FIOEWi059614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Mon, 15 May 2017 18:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318309 - stable/9/sys/dev/qlxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:24:16 -0000 Author: davidcs Date: Mon May 15 18:24:14 2017 New Revision: 318309 URL: https://svnweb.freebsd.org/changeset/base/318309 Log: MFC r317996 Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Modified: stable/9/sys/dev/qlxgbe/ql_isr.c stable/9/sys/dev/qlxgbe/ql_os.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/qlxgbe/ql_isr.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:21:36 2017 (r318308) +++ stable/9/sys/dev/qlxgbe/ql_isr.c Mon May 15 18:24:14 2017 (r318309) @@ -983,7 +983,8 @@ ql_isr(void *arg) fp = &ha->tx_fp[idx]; - if (fp->fp_taskqueue != NULL) + if ((fp->fp_taskqueue != NULL) && + (ifp->if_drv_flags & IFF_DRV_RUNNING)) taskqueue_enqueue(fp->fp_taskqueue, &fp->fp_task); return; Modified: stable/9/sys/dev/qlxgbe/ql_os.c ============================================================================== --- stable/9/sys/dev/qlxgbe/ql_os.c Mon May 15 18:21:36 2017 (r318308) +++ stable/9/sys/dev/qlxgbe/ql_os.c Mon May 15 18:24:14 2017 (r318309) @@ -930,7 +930,9 @@ qla_set_multi(qla_host_t *ha, uint32_t a if_maddr_runlock(ifp); QLA_LOCK(ha); - ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + ret = ql_hw_set_multi(ha, mta, mcnt, add_multi); + } QLA_UNLOCK(ha); return (ret); @@ -1036,20 +1038,16 @@ qla_ioctl(struct ifnet *ifp, u_long cmd, QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCADDMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 1)) - ret = EINVAL; - } + if (qla_set_multi(ha, 1)) + ret = EINVAL; break; case SIOCDELMULTI: QL_DPRINT4(ha, (ha->pci_dev, "%s: %s (0x%lx)\n", __func__, "SIOCDELMULTI", cmd)); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if (qla_set_multi(ha, 0)) - ret = EINVAL; - } + if (qla_set_multi(ha, 0)) + ret = EINVAL; break; case SIOCSIFMEDIA: @@ -1550,9 +1548,9 @@ qla_stop(qla_host_t *ha) ha->flags.qla_interface_up = 0; + QLA_UNLOCK(ha); qla_drain_fp_taskqueues(ha); - - ql_hw_stop_rcv(ha); + QLA_LOCK(ha); ql_del_hw_if(ha); @@ -1943,8 +1941,6 @@ qla_error_recovery(void *context, int pe ha->hw.imd_compl = 1; qla_mdelay(__func__, 300); - ql_hw_stop_rcv(ha); - ifp->if_drv_flags &= ~(IFF_DRV_OACTIVE | IFF_DRV_RUNNING); for (i = 0; i < ha->hw.num_sds_rings; i++) { @@ -1964,6 +1960,8 @@ qla_error_recovery(void *context, int pe QLA_UNLOCK(ha); + qla_drain_fp_taskqueues(ha); + if ((ha->pci_func & 0x1) == 0) { if (!ha->msg_from_peer) { From owner-svn-src-stable@freebsd.org Mon May 15 18:38:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54CEED6EDD5; Mon, 15 May 2017 18:38:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26416F14; Mon, 15 May 2017 18:38:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIc1dV065217; Mon, 15 May 2017 18:38:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIc1UW065216; Mon, 15 May 2017 18:38:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705151838.v4FIc1UW065216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 15 May 2017 18:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318310 - stable/11/usr.bin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:38:02 -0000 Author: bdrewery Date: Mon May 15 18:38:01 2017 New Revision: 318310 URL: https://svnweb.freebsd.org/changeset/base/318310 Log: MFC r317658: Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean' Modified: stable/11/usr.bin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Mon May 15 18:24:14 2017 (r318309) +++ stable/11/usr.bin/Makefile Mon May 15 18:38:01 2017 (r318310) @@ -303,6 +303,12 @@ SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVNLITE}+= svn +# These are normally only handled for build-tools. +.if make(clean*) +SUBDIR+= mkcsmapper_static +SUBDIR+= mkesdb_static +.endif + .include SUBDIR:= ${SUBDIR:O:u} From owner-svn-src-stable@freebsd.org Mon May 15 18:41:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4471ED6EF1D; Mon, 15 May 2017 18:41:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FCE01445; Mon, 15 May 2017 18:41:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FIfDsv069165; Mon, 15 May 2017 18:41:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FIfDYF069164; Mon, 15 May 2017 18:41:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705151841.v4FIfDYF069164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 15 May 2017 18:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318311 - stable/10/usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 18:41:14 -0000 Author: bdrewery Date: Mon May 15 18:41:12 2017 New Revision: 318311 URL: https://svnweb.freebsd.org/changeset/base/318311 Log: MFC r317658: Redo r288270: Hookup mkcsmapper_static and mkesdb_static for 'make clean' Modified: stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Mon May 15 18:38:01 2017 (r318310) +++ stable/10/usr.bin/Makefile Mon May 15 18:41:12 2017 (r318311) @@ -403,6 +403,12 @@ SUBDIR+= who SUBDIR+= svn .endif +# These are normally only handled for build-tools. +.if make(clean*) +SUBDIR+= mkcsmapper_static +SUBDIR+= mkesdb_static +.endif + .include SUBDIR:= ${SUBDIR:O} From owner-svn-src-stable@freebsd.org Mon May 15 22:41:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FBAFD6E6CC; Mon, 15 May 2017 22:41:03 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0343E1164; Mon, 15 May 2017 22:41:02 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMf2uS068259; Mon, 15 May 2017 22:41:02 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMf1dQ068257; Mon, 15 May 2017 22:41:01 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152241.v4FMf1dQ068257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 22:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318322 - in stable/11: contrib/netbsd-tests/lib/libc/rpc lib/libc/rpc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:41:03 -0000 Author: brooks Date: Mon May 15 22:41:01 2017 New Revision: 318322 URL: https://svnweb.freebsd.org/changeset/base/318322 Log: MFC r317660, r317710 r317660: Support clnt_raw's use of FD_SETSIZE as a fake file descriptor. Accomplish this by allocating space for it in __svc_xports and allowing it to be registered. The failure to allocate space was causing an out-of-bounds read in svc_getreq_common(). The failure to register caused PR 211804. The bug was found with CHERI bounds checking. PR: 211804 Obtained from: CheriBSD Sponsored by: DARPA, AFRL Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10528 r317710: Remove expected failure now that it was fixed in r317660. PR: 211804 Reviewed by: ngie Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10576 Modified: stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/11/lib/libc/rpc/svc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 21:58:36 2017 (r318321) +++ stable/11/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 22:41:01 2017 (r318322) @@ -325,10 +325,6 @@ ATF_TC_HEAD(raw, tc) ATF_TC_BODY(raw, tc) { -#ifdef __FreeBSD__ - atf_tc_expect_fail("fails with: clnt_call: " - "RPC: Can't decode result -- PR # 211804"); -#endif rawtest(NULL); } Modified: stable/11/lib/libc/rpc/svc.c ============================================================================== --- stable/11/lib/libc/rpc/svc.c Mon May 15 21:58:36 2017 (r318321) +++ stable/11/lib/libc/rpc/svc.c Mon May 15 22:41:01 2017 (r318322) @@ -108,18 +108,19 @@ xprt_register(SVCXPRT *xprt) rwlock_wrlock(&svc_fd_lock); if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) - mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); + mem_alloc((FD_SETSIZE + 1) * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { rwlock_unlock(&svc_fd_lock); return; } - memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); + memset(__svc_xports, '\0', (FD_SETSIZE + 1) * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { __svc_xports[sock] = xprt; FD_SET(sock, &svc_fdset); svc_maxfd = max(svc_maxfd, sock); - } + } else if (sock == FD_SETSIZE) + __svc_xports[sock] = xprt; rwlock_unlock(&svc_fd_lock); } @@ -157,7 +158,8 @@ __xprt_do_unregister(SVCXPRT *xprt, bool if (__svc_xports[svc_maxfd]) break; } - } + } else if ((sock == FD_SETSIZE) && (__svc_xports[sock] == xprt)) + __svc_xports[sock] = NULL; if (dolock) rwlock_unlock(&svc_fd_lock); } From owner-svn-src-stable@freebsd.org Mon May 15 22:50:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C29B7D6EA3E; Mon, 15 May 2017 22:50:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D6BF1783; Mon, 15 May 2017 22:50:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMotI8072850; Mon, 15 May 2017 22:50:55 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMoshm072840; Mon, 15 May 2017 22:50:54 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152250.v4FMoshm072840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 22:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318323 - in stable/10: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:50:56 -0000 Author: brooks Date: Mon May 15 22:50:54 2017 New Revision: 318323 URL: https://svnweb.freebsd.org/changeset/base/318323 Log: MFC r317845-r317846 r317845: Provide a freebsd32 implementation of sigqueue() The previous misuse of sys_sigqueue() was sending random register or stack garbage to 64-bit targets. The freebsd32 implementation preserves the sival_int member of value when signaling a 64-bit process. Document the mixed ABI implementation of union sigval and the incompability of sival_ptr with pointer integrity schemes. Reviewed by: kib, wblock Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10605 r317846: Regen post r317845. MFC with: r317845 Sponsored by: DARPA, AFRL Modified: stable/10/lib/libc/sys/sigqueue.2 stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c stable/10/sys/compat/freebsd32/syscalls.master stable/10/sys/kern/kern_sig.c stable/10/sys/sys/syscallsubr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/sigqueue.2 ============================================================================== --- stable/10/lib/libc/sys/sigqueue.2 Mon May 15 22:41:01 2017 (r318322) +++ stable/10/lib/libc/sys/sigqueue.2 Mon May 15 22:50:54 2017 (r318323) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2012 +.Dd May 5, 2017 .Dt SIGQUEUE 2 .Os .Sh NAME @@ -129,7 +129,6 @@ does not exist. .Xr kill 2 , .Xr sigaction 2 , .Xr sigpending 2 , -.Xr sigqueue 2 , .Xr sigsuspend 2 , .Xr sigtimedwait 2 , .Xr sigwait 2 , @@ -147,3 +146,18 @@ Support for .Tn POSIX realtime signal queue first appeared in .Fx 7.0 . +.Sh CAVEATS +When using +.Nm +to send signals to a process which might have a different ABI +(for instance, one is 32-bit and the other 64-bit), +the +.Va sival_int +member of +.Fa value +can be delivered reliably, but the +.Va sival_ptr +may be truncated in endian dependent ways and must not be relied on. +Further, many pointer integrity schemes disallow sending pointers to other +processes, and this technique should not be used in programs intended to +be portable. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Mon May 15 22:50:54 2017 (r318323) @@ -2581,6 +2581,32 @@ siginfo_to_siginfo32(const siginfo_t *sr dst->si_overrun = src->si_overrun; } +#ifndef _FREEBSD32_SYSPROTO_H_ +struct freebsd32_sigqueue_args { + pid_t pid; + int signum; + /* union sigval32 */ int value; +}; +#endif +int +freebsd32_sigqueue(struct thread *td, struct freebsd32_sigqueue_args *uap) +{ + union sigval sv; + + /* + * On 32-bit ABIs, sival_int and sival_ptr are the same. + * On 64-bit little-endian ABIs, the low bits are the same. + * In 64-bit big-endian ABIs, sival_int overlaps with + * sival_ptr's HIGH bits. We choose to support sival_int + * rather than sival_ptr in this case as it seems to be + * more common. + */ + bzero(&sv, sizeof(sv)); + sv.sival_int = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + int freebsd32_sigtimedwait(struct thread *td, struct freebsd32_sigtimedwait_args *uap) { Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Mon May 15 22:50:54 2017 (r318323) @@ -395,6 +395,11 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_sigqueue_args { + char pid_l_[PADL_(pid_t)]; pid_t pid; char pid_r_[PADR_(pid_t)]; + char signum_l_[PADL_(int)]; int signum; char signum_r_[PADR_(int)]; + char value_l_[PADL_(int)]; int value; char value_r_[PADR_(int)]; +}; struct freebsd32_kmq_open_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; @@ -785,6 +790,7 @@ int freebsd32_ksem_timedwait(struct thre int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_sigqueue(struct thread *, struct freebsd32_sigqueue_args *); int freebsd32_kmq_open(struct thread *, struct freebsd32_kmq_open_args *); int freebsd32_kmq_setattr(struct thread *, struct freebsd32_kmq_setattr_args *); int freebsd32_kmq_timedreceive(struct thread *, struct freebsd32_kmq_timedreceive_args *); @@ -1216,6 +1222,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_sigqueue AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_open AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_setattr AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kmq_timedreceive AUE_NULL Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Mon May 15 22:50:54 2017 (r318323) @@ -359,7 +359,7 @@ #define FREEBSD32_SYS_auditctl 453 #define FREEBSD32_SYS_freebsd32_umtx_op 454 #define FREEBSD32_SYS_freebsd32_thr_new 455 -#define FREEBSD32_SYS_sigqueue 456 +#define FREEBSD32_SYS_freebsd32_sigqueue 456 #define FREEBSD32_SYS_freebsd32_kmq_open 457 #define FREEBSD32_SYS_freebsd32_kmq_setattr 458 #define FREEBSD32_SYS_freebsd32_kmq_timedreceive 459 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Mon May 15 22:50:54 2017 (r318323) @@ -465,7 +465,7 @@ const char *freebsd32_syscallnames[] = { "auditctl", /* 453 = auditctl */ "freebsd32_umtx_op", /* 454 = freebsd32_umtx_op */ "freebsd32_thr_new", /* 455 = freebsd32_thr_new */ - "sigqueue", /* 456 = sigqueue */ + "freebsd32_sigqueue", /* 456 = freebsd32_sigqueue */ "freebsd32_kmq_open", /* 457 = freebsd32_kmq_open */ "freebsd32_kmq_setattr", /* 458 = freebsd32_kmq_setattr */ "freebsd32_kmq_timedreceive", /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Mon May 15 22:50:54 2017 (r318323) @@ -502,7 +502,7 @@ struct sysent freebsd32_sysent[] = { { AS(auditctl_args), (sy_call_t *)sys_auditctl, AUE_AUDITCTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 453 = auditctl */ { AS(freebsd32_umtx_op_args), (sy_call_t *)freebsd32_umtx_op, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 454 = freebsd32_umtx_op */ { AS(freebsd32_thr_new_args), (sy_call_t *)freebsd32_thr_new, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 455 = freebsd32_thr_new */ - { AS(sigqueue_args), (sy_call_t *)sys_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = sigqueue */ + { AS(freebsd32_sigqueue_args), (sy_call_t *)freebsd32_sigqueue, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 456 = freebsd32_sigqueue */ { AS(freebsd32_kmq_open_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 457 = freebsd32_kmq_open */ { AS(freebsd32_kmq_setattr_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 458 = freebsd32_kmq_setattr */ { AS(freebsd32_kmq_timedreceive_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 459 = freebsd32_kmq_timedreceive */ Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Mon May 15 22:50:54 2017 (r318323) @@ -2397,12 +2397,12 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: { - struct sigqueue_args *p = params; + struct freebsd32_sigqueue_args *p = params; iarg[0] = p->pid; /* pid_t */ iarg[1] = p->signum; /* int */ - uarg[2] = (intptr_t) p->value; /* void * */ + iarg[2] = p->value; /* int */ *n_args = 3; break; } @@ -7206,7 +7206,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: switch(ndx) { case 0: @@ -7216,7 +7216,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "void *"; + p = "int"; break; default: break; @@ -10366,7 +10366,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* sigqueue */ + /* freebsd32_sigqueue */ case 456: if (ndx == 0 || ndx == 1) p = "int"; Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/compat/freebsd32/syscalls.master Mon May 15 22:50:54 2017 (r318323) @@ -816,8 +816,8 @@ 455 AUE_NULL STD { int freebsd32_thr_new( \ struct thr_param32 *param, \ int param_size); } -456 AUE_NULL NOPROTO { int sigqueue(pid_t pid, int signum, \ - void *value); } +456 AUE_NULL STD { int freebsd32_sigqueue(pid_t pid, \ + int signum, int value); } 457 AUE_NULL NOSTD { int freebsd32_kmq_open( \ const char *path, int flags, mode_t mode, \ const struct mq_attr32 *attr); } Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/kern/kern_sig.c Mon May 15 22:50:54 2017 (r318323) @@ -1846,33 +1846,43 @@ struct sigqueue_args { int sys_sigqueue(struct thread *td, struct sigqueue_args *uap) { + union sigval sv; + + sv.sival_ptr = uap->value; + + return (kern_sigqueue(td, uap->pid, uap->signum, &sv)); +} + +int +kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value) +{ ksiginfo_t ksi; struct proc *p; int error; - if ((u_int)uap->signum > _SIG_MAXSIG) + if ((u_int)signum > _SIG_MAXSIG) return (EINVAL); /* * Specification says sigqueue can only send signal to * single process. */ - if (uap->pid <= 0) + if (pid <= 0) return (EINVAL); - if ((p = pfind(uap->pid)) == NULL) { - if ((p = zpfind(uap->pid)) == NULL) + if ((p = pfind(pid)) == NULL) { + if ((p = zpfind(pid)) == NULL) return (ESRCH); } - error = p_cansignal(td, p, uap->signum); - if (error == 0 && uap->signum != 0) { + error = p_cansignal(td, p, signum); + if (error == 0 && signum != 0) { ksiginfo_init(&ksi); ksi.ksi_flags = KSI_SIGQ; - ksi.ksi_signo = uap->signum; + ksi.ksi_signo = signum; ksi.ksi_code = SI_QUEUE; ksi.ksi_pid = td->td_proc->p_pid; ksi.ksi_uid = td->td_ucred->cr_ruid; - ksi.ksi_value.sival_ptr = uap->value; + ksi.ksi_value = *value; error = pksignal(p, ksi.ksi_signo, &ksi); } PROC_UNLOCK(p); Modified: stable/10/sys/sys/syscallsubr.h ============================================================================== --- stable/10/sys/sys/syscallsubr.h Mon May 15 22:41:01 2017 (r318322) +++ stable/10/sys/sys/syscallsubr.h Mon May 15 22:50:54 2017 (r318323) @@ -242,6 +242,8 @@ int kern_sigtimedwait(struct thread *td, struct ksiginfo *ksi, struct timespec *timeout); int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp); +int kern_sigqueue(struct thread *td, pid_t pid, int signum, + union sigval *value); int kern_statat(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp); int kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, From owner-svn-src-stable@freebsd.org Mon May 15 22:51:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 652C7D6EAAD; Mon, 15 May 2017 22:51:24 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 288071938; Mon, 15 May 2017 22:51:24 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FMpNMJ073647; Mon, 15 May 2017 22:51:23 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FMpNp9073645; Mon, 15 May 2017 22:51:23 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201705152251.v4FMpNp9073645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Mon, 15 May 2017 22:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318324 - stable/11/sys/compat/linux X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 22:51:24 -0000 Author: avatar Date: Mon May 15 22:51:22 2017 New Revision: 318324 URL: https://svnweb.freebsd.org/changeset/base/318324 Log: MFC 316658: Adding SIOCGIFNAME support in Linuxulator. This should silence the console warning associated with linux-opera: linux: pid 23492 (opera): ioctl fd=5, cmd=0x8910 ('\M^I',16) is not implemented linux: pid 23492 (opera): ioctl fd=28, cmd=0x8910 ('\M^I',16) is not implemented ... Reviewed by: kib, marcel, dchagin Tested with: linux-opera-12.16_3 Modified: stable/11/sys/compat/linux/linux_ioctl.c stable/11/sys/compat/linux/linux_ioctl.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.c Mon May 15 22:50:54 2017 (r318323) +++ stable/11/sys/compat/linux/linux_ioctl.c Mon May 15 22:51:22 2017 (r318324) @@ -2173,6 +2173,49 @@ ifname_linux_to_bsd(struct thread *td, c } /* + * Implement the SIOCGIFNAME ioctl + */ + +static int +linux_ioctl_ifname(struct thread *td, struct l_ifreq *uifr) +{ + struct l_ifreq ifr; + struct ifnet *ifp; + int error, ethno, index; + + error = copyin(uifr, &ifr, sizeof(ifr)); + if (error != 0) + return (error); + + CURVNET_SET(TD_TO_VNET(curthread)); + IFNET_RLOCK(); + index = 1; /* ifr.ifr_ifindex starts from 1 */ + ethno = 0; + error = ENODEV; + TAILQ_FOREACH(ifp, &V_ifnet, if_link) { + if (ifr.ifr_ifindex == index) { + if (IFP_IS_ETH(ifp)) + snprintf(ifr.ifr_name, LINUX_IFNAMSIZ, + "eth%d", ethno); + else + strlcpy(ifr.ifr_name, ifp->if_xname, + LINUX_IFNAMSIZ); + error = 0; + break; + } + if (IFP_IS_ETH(ifp)) + ethno++; + index++; + } + IFNET_RUNLOCK(); + if (error == 0) + error = copyout(&ifr, uifr, sizeof(ifr)); + CURVNET_RESTORE(); + + return (error); +} + +/* * Implement the SIOCGIFCONF ioctl */ @@ -2399,6 +2442,7 @@ linux_ioctl_socket(struct thread *td, st case LINUX_SIOCADDMULTI: case LINUX_SIOCATMARK: case LINUX_SIOCDELMULTI: + case LINUX_SIOCGIFNAME: case LINUX_SIOCGIFCONF: case LINUX_SIOCGPGRP: case LINUX_SIOCSPGRP: @@ -2484,6 +2528,10 @@ linux_ioctl_socket(struct thread *td, st /* LINUX_SIOCGSTAMP */ + case LINUX_SIOCGIFNAME: + error = linux_ioctl_ifname(td, (struct l_ifreq *)args->arg); + break; + case LINUX_SIOCGIFCONF: error = linux_ifconf(td, (struct ifconf *)args->arg); break; Modified: stable/11/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/11/sys/compat/linux/linux_ioctl.h Mon May 15 22:50:54 2017 (r318323) +++ stable/11/sys/compat/linux/linux_ioctl.h Mon May 15 22:51:22 2017 (r318324) @@ -226,6 +226,7 @@ #define LINUX_SIOCGPGRP 0x8904 #define LINUX_SIOCATMARK 0x8905 #define LINUX_SIOCGSTAMP 0x8906 +#define LINUX_SIOCGIFNAME 0x8910 #define LINUX_SIOCGIFCONF 0x8912 #define LINUX_SIOCGIFFLAGS 0x8913 #define LINUX_SIOCGIFADDR 0x8915 From owner-svn-src-stable@freebsd.org Mon May 15 23:13:51 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 749E9D6E00D; Mon, 15 May 2017 23:13:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36E13892; Mon, 15 May 2017 23:13:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4FNDolB084304; Mon, 15 May 2017 23:13:50 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4FNDoJU084302; Mon, 15 May 2017 23:13:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201705152313.v4FNDoJU084302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 15 May 2017 23:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318327 - in stable/10: contrib/netbsd-tests/lib/libc/rpc lib/libc/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 23:13:51 -0000 Author: brooks Date: Mon May 15 23:13:49 2017 New Revision: 318327 URL: https://svnweb.freebsd.org/changeset/base/318327 Log: MFC r317660, r317710 r317660: Support clnt_raw's use of FD_SETSIZE as a fake file descriptor. Accomplish this by allocating space for it in __svc_xports and allowing it to be registered. The failure to allocate space was causing an out-of-bounds read in svc_getreq_common(). The failure to register caused PR 211804. The bug was found with CHERI bounds checking. PR: 211804 Obtained from: CheriBSD Sponsored by: DARPA, AFRL Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D10528 r317710: Remove expected failure now that it was fixed in r317660. PR: 211804 Reviewed by: ngie Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10576 Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c stable/10/lib/libc/rpc/svc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 23:12:04 2017 (r318326) +++ stable/10/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c Mon May 15 23:13:49 2017 (r318327) @@ -335,9 +335,6 @@ ATF_TC_BODY(raw, tc) #ifdef __FreeBSD_bug_216954__ atf_tc_expect_signal(SIGSEGV, "fails with SIGSEGV only on ^/stable/10 -- bug # 216954"); -#else - atf_tc_expect_fail("fails with: clnt_call: " - "RPC: Can't decode result -- PR # 211804"); #endif #endif rawtest(NULL); Modified: stable/10/lib/libc/rpc/svc.c ============================================================================== --- stable/10/lib/libc/rpc/svc.c Mon May 15 23:12:04 2017 (r318326) +++ stable/10/lib/libc/rpc/svc.c Mon May 15 23:13:49 2017 (r318327) @@ -108,18 +108,19 @@ xprt_register(SVCXPRT *xprt) rwlock_wrlock(&svc_fd_lock); if (__svc_xports == NULL) { __svc_xports = (SVCXPRT **) - mem_alloc(FD_SETSIZE * sizeof(SVCXPRT *)); + mem_alloc((FD_SETSIZE + 1) * sizeof(SVCXPRT *)); if (__svc_xports == NULL) { rwlock_unlock(&svc_fd_lock); return; } - memset(__svc_xports, '\0', FD_SETSIZE * sizeof(SVCXPRT *)); + memset(__svc_xports, '\0', (FD_SETSIZE + 1) * sizeof(SVCXPRT *)); } if (sock < FD_SETSIZE) { __svc_xports[sock] = xprt; FD_SET(sock, &svc_fdset); svc_maxfd = max(svc_maxfd, sock); - } + } else if (sock == FD_SETSIZE) + __svc_xports[sock] = xprt; rwlock_unlock(&svc_fd_lock); } @@ -157,7 +158,8 @@ __xprt_do_unregister(SVCXPRT *xprt, bool if (__svc_xports[svc_maxfd]) break; } - } + } else if ((sock == FD_SETSIZE) && (__svc_xports[sock] == xprt)) + __svc_xports[sock] = NULL; if (dolock) rwlock_unlock(&svc_fd_lock); } From owner-svn-src-stable@freebsd.org Tue May 16 00:21:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A61BD6C656; Tue, 16 May 2017 00:21:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E67D3AE7; Tue, 16 May 2017 00:21:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0L3rc009543; Tue, 16 May 2017 00:21:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0L3kO009541; Tue, 16 May 2017 00:21:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160021.v4G0L3kO009541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318328 - stable/11/sys/dev/uart X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:21:05 -0000 Author: mav Date: Tue May 16 00:21:03 2017 New Revision: 318328 URL: https://svnweb.freebsd.org/changeset/base/318328 Log: MFC r317659, r317752: Make some UART consoles to not spin wait for data to be sent. At least with Tx FIFO enabled it shows me ~10% reduction of verbose boot time with serial console at 115200 baud. Modified: stable/11/sys/dev/uart/uart_dev_lpc.c stable/11/sys/dev/uart/uart_dev_ns8250.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_dev_lpc.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_lpc.c Mon May 15 23:13:49 2017 (r318327) +++ stable/11/sys/dev/uart/uart_dev_lpc.c Tue May 16 00:21:03 2017 (r318328) @@ -345,9 +345,6 @@ lpc_ns8250_putc(struct uart_bas *bas, in DELAY(4); uart_setreg(bas, REG_DATA, c); uart_barrier(bas); - limit = 250000; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) - DELAY(4); } static int @@ -890,8 +887,13 @@ lpc_ns8250_bus_transmit(struct uart_soft bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) - ; + if (sc->sc_txdatasz > 1) { + if ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0) + lpc_ns8250_drain(bas, UART_DRAIN_TRANSMITTER); + } else { + while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) + DELAY(4); + } for (i = 0; i < sc->sc_txdatasz; i++) { uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); uart_barrier(bas); Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_ns8250.c Mon May 15 23:13:49 2017 (r318327) +++ stable/11/sys/dev/uart/uart_dev_ns8250.c Tue May 16 00:21:03 2017 (r318328) @@ -335,9 +335,6 @@ ns8250_putc(struct uart_bas *bas, int c) DELAY(4); uart_setreg(bas, REG_DATA, c); uart_barrier(bas); - limit = 250000; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) - DELAY(4); } static int @@ -968,8 +965,13 @@ ns8250_bus_transmit(struct uart_softc *s bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) - ; + if (sc->sc_txdatasz > 1) { + if ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0) + ns8250_drain(bas, UART_DRAIN_TRANSMITTER); + } else { + while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) + DELAY(4); + } for (i = 0; i < sc->sc_txdatasz; i++) { uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); uart_barrier(bas); From owner-svn-src-stable@freebsd.org Tue May 16 00:30:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF8BD6CC94; Tue, 16 May 2017 00:30:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED53913E6; Tue, 16 May 2017 00:30:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0UfVM013085; Tue, 16 May 2017 00:30:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0UfVX013083; Tue, 16 May 2017 00:30:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160030.v4G0UfVX013083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318329 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:30:42 -0000 Author: mav Date: Tue May 16 00:30:40 2017 New Revision: 318329 URL: https://svnweb.freebsd.org/changeset/base/318329 Log: MFC r317696, r317723, r317836: Introduce sleepable locks into if_lagg. Before this change if_lagg was using nonsleepable rmlocks to protect its internal state. This patch introduces another sx lock to protect code paths that require sleeping, while still uses old rmlock to protect hot nonsleepable data paths. This change allows to remove taskqueue decoupling used before to change interface addresses without holding the lock. Instead it uses sx lock to protect direct if_ioctl() calls. As another bonus, the new code synchronizes enabled capabilities of member interfaces, and allows to control them with ifconfig laggX, that was impossible before. This part should fix interoperation with if_bridge, that may need to disable some capabilities, such as TXCSUM or LRO, to allow bridging with noncapable interfaces. Modified: stable/11/sys/net/if_lagg.c stable/11/sys/net/if_lagg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_lagg.c ============================================================================== --- stable/11/sys/net/if_lagg.c Tue May 16 00:21:03 2017 (r318328) +++ stable/11/sys/net/if_lagg.c Tue May 16 00:30:40 2017 (r318329) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -98,10 +99,7 @@ static VNET_DEFINE(struct if_clone *, la #define V_lagg_cloner VNET(lagg_cloner) static const char laggname[] = "lagg"; -static void lagg_lladdr(struct lagg_softc *, uint8_t *); static void lagg_capabilities(struct lagg_softc *); -static void lagg_port_lladdr(struct lagg_port *, uint8_t *, lagg_llqtype); -static void lagg_port_setlladdr(void *, int); static int lagg_port_create(struct lagg_softc *, struct ifnet *); static int lagg_port_destroy(struct lagg_port *, int); static struct mbuf *lagg_input(struct ifnet *, struct mbuf *); @@ -118,8 +116,9 @@ static void lagg_port2req(struct lagg_po static void lagg_init(void *); static void lagg_stop(struct lagg_softc *); static int lagg_ioctl(struct ifnet *, u_long, caddr_t); -static int lagg_ether_setmulti(struct lagg_softc *); -static int lagg_ether_cmdmulti(struct lagg_port *, int); +static int lagg_setmulti(struct lagg_port *); +static int lagg_clrmulti(struct lagg_port *); +static int lagg_setcaps(struct lagg_port *, int cap); static int lagg_setflag(struct lagg_port *, int, int, int (*func)(struct ifnet *, int)); static int lagg_setflags(struct lagg_port *, int status); @@ -311,6 +310,7 @@ static void lagg_proto_attach(struct lagg_softc *sc, lagg_proto pr) { + LAGG_XLOCK_ASSERT(sc); KASSERT(sc->sc_proto == LAGG_PROTO_NONE, ("%s: sc %p has proto", __func__, sc)); @@ -327,8 +327,8 @@ lagg_proto_detach(struct lagg_softc *sc) { lagg_proto pr; + LAGG_XLOCK_ASSERT(sc); LAGG_WLOCK_ASSERT(sc); - pr = sc->sc_proto; sc->sc_proto = LAGG_PROTO_NONE; @@ -427,15 +427,14 @@ lagg_register_vlan(void *arg, struct ifn { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_config, lp->lp_ifp, vtag); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } /* @@ -447,15 +446,14 @@ lagg_unregister_vlan(void *arg, struct i { struct lagg_softc *sc = ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; if (ifp->if_softc != arg) /* Not our event */ return; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) EVENTHANDLER_INVOKE(vlan_unconfig, lp->lp_ifp, vtag); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } static int @@ -471,7 +469,10 @@ lagg_clone_create(struct if_clone *ifc, free(sc, M_DEVBUF); return (ENOSPC); } + LAGG_LOCK_INIT(sc); + LAGG_SX_INIT(sc); + LAGG_XLOCK(sc); if (V_def_use_flowid) sc->sc_opts |= LAGG_OPT_USE_FLOWID; sc->flowid_shift = V_def_flowid_shift; @@ -481,9 +482,7 @@ lagg_clone_create(struct if_clone *ifc, lagg_proto_attach(sc, LAGG_PROTO_DEFAULT); - LAGG_LOCK_INIT(sc); SLIST_INIT(&sc->sc_ports); - TASK_INIT(&sc->sc_lladdr_task, 0, lagg_port_setlladdr, sc); /* Initialise pseudo media types */ ifmedia_init(&sc->sc_media, 0, lagg_media_change, @@ -516,6 +515,7 @@ lagg_clone_create(struct if_clone *ifc, LAGG_LIST_LOCK(); SLIST_INSERT_HEAD(&V_lagg_list, sc, sc_entries); LAGG_LIST_UNLOCK(); + LAGG_XUNLOCK(sc); return (0); } @@ -526,8 +526,8 @@ lagg_clone_destroy(struct ifnet *ifp) struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; - LAGG_WLOCK(sc); - + LAGG_XLOCK(sc); + sc->sc_destroying = 1; lagg_stop(sc); ifp->if_flags &= ~IFF_UP; @@ -535,15 +535,15 @@ lagg_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(vlan_unconfig, sc->vlan_detach); /* Shutdown and remove lagg ports */ - while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) { - lp->lp_detaching = LAGG_CLONE_DESTROY; + while ((lp = SLIST_FIRST(&sc->sc_ports)) != NULL) lagg_port_destroy(lp, 1); - } + /* Unhook the aggregation protocol */ + LAGG_WLOCK(sc); lagg_proto_detach(sc); LAGG_UNLOCK_ASSERT(sc); + LAGG_XUNLOCK(sc); - taskqueue_drain(taskqueue_swi, &sc->sc_lladdr_task); ifmedia_removeall(&sc->sc_media); ether_ifdetach(ifp); if_free(ifp); @@ -552,47 +552,11 @@ lagg_clone_destroy(struct ifnet *ifp) SLIST_REMOVE(&V_lagg_list, sc, lagg_softc, sc_entries); LAGG_LIST_UNLOCK(); + LAGG_SX_DESTROY(sc); LAGG_LOCK_DESTROY(sc); free(sc, M_DEVBUF); } -/* - * Set link-layer address on the lagg interface itself. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_lladdr(struct lagg_softc *sc, uint8_t *lladdr) -{ - struct ifnet *ifp = sc->sc_ifp; - struct lagg_port lp; - - if (memcmp(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN) == 0) - return; - - LAGG_WLOCK_ASSERT(sc); - /* - * Set the link layer address on the lagg interface. - * lagg_proto_lladdr() notifies the MAC change to - * the aggregation protocol. iflladdr_event handler which - * may trigger gratuitous ARPs for INET will be handled in - * a taskqueue. - */ - bcopy(lladdr, IF_LLADDR(ifp), ETHER_ADDR_LEN); - lagg_proto_lladdr(sc); - - /* - * Send notification request for lagg interface - * itself. Note that new lladdr is already set. - */ - bzero(&lp, sizeof(lp)); - lp.lp_ifp = sc->sc_ifp; - lp.lp_softc = sc; - - /* Do not request lladdr change */ - lagg_port_lladdr(&lp, lladdr, LAGG_LLQTYPE_VIRT); -} - static void lagg_capabilities(struct lagg_softc *sc) { @@ -601,7 +565,7 @@ lagg_capabilities(struct lagg_softc *sc) u_long hwa = ~0UL; struct ifnet_hw_tsomax hw_tsomax; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); memset(&hw_tsomax, 0, sizeof(hw_tsomax)); @@ -629,97 +593,10 @@ lagg_capabilities(struct lagg_softc *sc) if_printf(sc->sc_ifp, "capabilities 0x%08x enabled 0x%08x\n", cap, ena); } -} - -/* - * Enqueue interface lladdr notification. - * If request is already queued, it is updated. - * If setting lladdr is also desired, @do_change has to be set to 1. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_port_lladdr(struct lagg_port *lp, uint8_t *lladdr, lagg_llqtype llq_type) -{ - struct lagg_softc *sc = lp->lp_softc; - struct ifnet *ifp = lp->lp_ifp; - struct lagg_llq *llq; - - LAGG_WLOCK_ASSERT(sc); - - /* - * Do not enqueue requests where lladdr is the same for - * "physical" interfaces (e.g. ports in lagg) - */ - if (llq_type == LAGG_LLQTYPE_PHYS && - memcmp(IF_LLADDR(ifp), lladdr, ETHER_ADDR_LEN) == 0) - return; - - /* Check to make sure its not already queued to be changed */ - SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp) { - /* Update lladdr, it may have changed */ - bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); - return; - } - } - - llq = malloc(sizeof(struct lagg_llq), M_DEVBUF, M_NOWAIT | M_ZERO); - if (llq == NULL) /* XXX what to do */ - return; - - if_ref(ifp); - llq->llq_ifp = ifp; - llq->llq_type = llq_type; - bcopy(lladdr, llq->llq_lladdr, ETHER_ADDR_LEN); - /* XXX: We should insert to tail */ - SLIST_INSERT_HEAD(&sc->sc_llq_head, llq, llq_entries); - - taskqueue_enqueue(taskqueue_swi, &sc->sc_lladdr_task); -} - -/* - * Set the interface MAC address from a taskqueue to avoid a LOR. - * - * Set noinline to be dtrace-friendly - */ -static __noinline void -lagg_port_setlladdr(void *arg, int pending) -{ - struct lagg_softc *sc = (struct lagg_softc *)arg; - struct lagg_llq *llq, *head; - struct ifnet *ifp; - - /* Grab a local reference of the queue and remove it from the softc */ - LAGG_WLOCK(sc); - head = SLIST_FIRST(&sc->sc_llq_head); - SLIST_FIRST(&sc->sc_llq_head) = NULL; - LAGG_WUNLOCK(sc); - - /* - * Traverse the queue and set the lladdr on each ifp. It is safe to do - * unlocked as we have the only reference to it. - */ - for (llq = head; llq != NULL; llq = head) { - ifp = llq->llq_ifp; - CURVNET_SET(ifp->if_vnet); - - /* - * Set the link layer address on the laggport interface. - * Note that if_setlladdr() or iflladdr_event handler - * may result in arp transmission / lltable updates. - */ - if (llq->llq_type == LAGG_LLQTYPE_PHYS) - if_setlladdr(ifp, llq->llq_lladdr, - ETHER_ADDR_LEN); - else - EVENTHANDLER_INVOKE(iflladdr_event, ifp); - CURVNET_RESTORE(); - head = SLIST_NEXT(llq, llq_entries); - if_rele(ifp); - free(llq, M_DEVBUF); - } + /* Apply unified capabilities back to the lagg ports. */ + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) + lagg_setcaps(lp, ena); } static int @@ -730,7 +607,7 @@ lagg_port_create(struct lagg_softc *sc, int error, i; uint64_t *pval; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); /* Limit the maximal number of lagg ports */ if (sc->sc_count >= LAGG_MAX_PORTS) @@ -758,9 +635,8 @@ lagg_port_create(struct lagg_softc *sc, return (EINVAL); } - if ((lp = malloc(sizeof(struct lagg_port), - M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) - return (ENOMEM); + lp = malloc(sizeof(struct lagg_port), M_DEVBUF, M_WAITOK|M_ZERO); + lp->lp_softc = sc; /* Check if port is a stacked lagg */ LAGG_LIST_LOCK(); @@ -783,6 +659,26 @@ lagg_port_create(struct lagg_softc *sc, } LAGG_LIST_UNLOCK(); + if_ref(ifp); + lp->lp_ifp = ifp; + + bcopy(IF_LLADDR(ifp), lp->lp_lladdr, ETHER_ADDR_LEN); + lp->lp_ifcapenable = ifp->if_capenable; + if (SLIST_EMPTY(&sc->sc_ports)) { + LAGG_WLOCK(sc); + bcopy(IF_LLADDR(ifp), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); + LAGG_WUNLOCK(sc); + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); + } else { + if_setlladdr(ifp, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + } + lagg_setflags(lp, 1); + + LAGG_WLOCK(sc); + if (SLIST_EMPTY(&sc->sc_ports)) + sc->sc_primary = lp; + /* Change the interface type */ lp->lp_iftype = ifp->if_type; ifp->if_type = IFT_IEEE8023ADLAG; @@ -792,25 +688,10 @@ lagg_port_create(struct lagg_softc *sc, lp->lp_output = ifp->if_output; ifp->if_output = lagg_port_output; - if_ref(ifp); - lp->lp_ifp = ifp; - lp->lp_softc = sc; - - /* Save port link layer address */ - bcopy(IF_LLADDR(ifp), lp->lp_lladdr, ETHER_ADDR_LEN); - - if (SLIST_EMPTY(&sc->sc_ports)) { - sc->sc_primary = lp; - /* First port in lagg. Update/notify lagg lladdress */ - lagg_lladdr(sc, IF_LLADDR(ifp)); - } else { - - /* - * Update link layer address for this port and - * send notifications to other subsystems. - */ - lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp), LAGG_LLQTYPE_PHYS); - } + /* Read port counters */ + pval = lp->port_counters.val; + for (i = 0; i < IFCOUNTERS; i++, pval++) + *pval = ifp->if_get_counter(ifp, i); /* * Insert into the list of ports. @@ -831,24 +712,21 @@ lagg_port_create(struct lagg_softc *sc, SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); sc->sc_count++; - /* Update lagg capabilities */ - lagg_capabilities(sc); - lagg_linkstate(sc); - - /* Read port counters */ - pval = lp->port_counters.val; - for (i = 0; i < IFCOUNTERS; i++, pval++) - *pval = ifp->if_get_counter(ifp, i); - /* Add multicast addresses and interface flags to this port */ - lagg_ether_cmdmulti(lp, 1); - lagg_setflags(lp, 1); + lagg_setmulti(lp); if ((error = lagg_proto_addport(sc, lp)) != 0) { /* Remove the port, without calling pr_delport. */ lagg_port_destroy(lp, 0); + LAGG_UNLOCK_ASSERT(sc); return (error); } + LAGG_WUNLOCK(sc); + + /* Update lagg capabilities */ + lagg_capabilities(sc); + lagg_linkstate(sc); + return (0); } @@ -860,8 +738,7 @@ lagg_port_checkstacking(struct lagg_soft struct lagg_port *lp; int m = 0; - LAGG_WLOCK_ASSERT(sc); - + LAGG_SXLOCK_ASSERT(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (lp->lp_flags & LAGG_PORT_STACK) { sc_ptr = (struct lagg_softc *)lp->lp_ifp->if_softc; @@ -878,25 +755,20 @@ lagg_port_destroy(struct lagg_port *lp, { struct lagg_softc *sc = lp->lp_softc; struct lagg_port *lp_ptr, *lp0; - struct lagg_llq *llq; struct ifnet *ifp = lp->lp_ifp; uint64_t *pval, vdiff; int i; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); - if (rundelport) + if (rundelport) { + LAGG_WLOCK(sc); lagg_proto_delport(sc, lp); + } else + LAGG_WLOCK_ASSERT(sc); - /* - * Remove multicast addresses and interface flags from this port and - * reset the MAC address, skip if the interface is being detached. - */ - if (lp->lp_detaching == 0) { - lagg_ether_cmdmulti(lp, 0); - lagg_setflags(lp, 0); - lagg_port_lladdr(lp, lp->lp_lladdr, LAGG_LLQTYPE_PHYS); - } + if (lp->lp_detaching == 0) + lagg_clrmulti(lp); /* Restore interface */ ifp->if_type = lp->lp_iftype; @@ -919,43 +791,37 @@ lagg_port_destroy(struct lagg_port *lp, if (lp == sc->sc_primary) { uint8_t lladdr[ETHER_ADDR_LEN]; - if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) { + if ((lp0 = SLIST_FIRST(&sc->sc_ports)) == NULL) bzero(&lladdr, ETHER_ADDR_LEN); - } else { - bcopy(lp0->lp_lladdr, - lladdr, ETHER_ADDR_LEN); - } - if (lp->lp_detaching != LAGG_CLONE_DESTROY) - lagg_lladdr(sc, lladdr); - - /* Mark lp0 as new primary */ + else + bcopy(lp0->lp_lladdr, lladdr, ETHER_ADDR_LEN); sc->sc_primary = lp0; + if (sc->sc_destroying == 0) { + bcopy(lladdr, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); + lagg_proto_lladdr(sc); + LAGG_WUNLOCK(sc); + EVENTHANDLER_INVOKE(iflladdr_event, sc->sc_ifp); + } else + LAGG_WUNLOCK(sc); /* - * Enqueue lladdr update/notification for each port - * (new primary needs update as well, to switch from - * old lladdr to its 'real' one). + * Update lladdr for each port (new primary needs update + * as well, to switch from old lladdr to its 'real' one) */ SLIST_FOREACH(lp_ptr, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp_ptr, lladdr, LAGG_LLQTYPE_PHYS); - } - - /* Remove any pending lladdr changes from the queue */ - if (lp->lp_detaching != 0) { - SLIST_FOREACH(llq, &sc->sc_llq_head, llq_entries) { - if (llq->llq_ifp == ifp) { - SLIST_REMOVE(&sc->sc_llq_head, llq, lagg_llq, - llq_entries); - if_rele(llq->llq_ifp); - free(llq, M_DEVBUF); - break; /* Only appears once */ - } - } - } + if_setlladdr(lp_ptr->lp_ifp, lladdr, ETHER_ADDR_LEN); + } else + LAGG_WUNLOCK(sc); if (lp->lp_ifflags) if_printf(ifp, "%s: lp_ifflags unclean\n", __func__); + if (lp->lp_detaching == 0) { + lagg_setflags(lp, 0); + lagg_setcaps(lp, lp->lp_ifcapenable); + if_setlladdr(ifp, lp->lp_lladdr, ETHER_ADDR_LEN); + } + if_rele(ifp); free(lp, M_DEVBUF); @@ -973,7 +839,6 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon struct lagg_softc *sc; struct lagg_port *lp = NULL; int error = 0; - struct rm_priotracker tracker; /* Should be checked by the caller */ if (ifp->if_type != IFT_IEEE8023ADLAG || @@ -988,15 +853,15 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon break; } - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if ((lp = ifp->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; case SIOCSIFCAP: @@ -1009,9 +874,9 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon break; /* Update lagg interface capabilities */ - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); lagg_capabilities(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCSIFMTU: @@ -1121,10 +986,10 @@ lagg_port_ifdetach(void *arg __unused, s sc = lp->lp_softc; - LAGG_WLOCK(sc); - lp->lp_detaching = LAGG_PORT_DETACH; + LAGG_XLOCK(sc); + lp->lp_detaching = 1; lagg_port_destroy(lp, 1); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } static void @@ -1174,10 +1039,11 @@ lagg_init(void *xsc) struct ifnet *ifp = sc->sc_ifp; struct lagg_port *lp; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + LAGG_XLOCK(sc); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + LAGG_XUNLOCK(sc); return; - - LAGG_WLOCK(sc); + } ifp->if_drv_flags |= IFF_DRV_RUNNING; @@ -1186,12 +1052,15 @@ lagg_init(void *xsc) * This might be if_setlladdr() notification * that lladdr has been changed. */ - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - lagg_port_lladdr(lp, IF_LLADDR(ifp), LAGG_LLQTYPE_PHYS); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (memcmp(IF_LLADDR(ifp), IF_LLADDR(lp->lp_ifp), + ETHER_ADDR_LEN) != 0) + if_setlladdr(lp->lp_ifp, IF_LLADDR(ifp), ETHER_ADDR_LEN); + } lagg_proto_init(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } static void @@ -1199,7 +1068,7 @@ lagg_stop(struct lagg_softc *sc) { struct ifnet *ifp = sc->sc_ifp; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return; @@ -1223,22 +1092,14 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd struct thread *td = curthread; char *buf, *outbuf; int count, buflen, len, error = 0; - struct rm_priotracker tracker; bzero(&rpbuf, sizeof(rpbuf)); switch (cmd) { case SIOCGLAGG: - LAGG_RLOCK(sc, &tracker); - count = 0; - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) - count++; - buflen = count * sizeof(struct lagg_reqport); - LAGG_RUNLOCK(sc, &tracker); - + LAGG_SLOCK(sc); + buflen = sc->sc_count * sizeof(struct lagg_reqport); outbuf = malloc(buflen, M_TEMP, M_WAITOK | M_ZERO); - - LAGG_RLOCK(sc, &tracker); ra->ra_proto = sc->sc_proto; lagg_proto_request(sc, &ra->ra_psc); count = 0; @@ -1254,7 +1115,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd buf += sizeof(rpbuf); len -= sizeof(rpbuf); } - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); ra->ra_ports = count; ra->ra_size = count * sizeof(rpbuf); error = copyout(outbuf, ra->ra_port, ra->ra_size); @@ -1269,12 +1130,15 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } + LAGG_XLOCK(sc); LAGG_WLOCK(sc); lagg_proto_detach(sc); LAGG_UNLOCK_ASSERT(sc); lagg_proto_attach(sc, ra->ra_proto); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGOPTS: + LAGG_SLOCK(sc); ro->ro_opts = sc->sc_opts; if (sc->sc_proto == LAGG_PROTO_LACP) { struct lacp_softc *lsc; @@ -1298,6 +1162,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd ro->ro_bkt = sc->sc_bkt; ro->ro_flapping = sc->sc_flapping; ro->ro_flowid_shift = sc->flowid_shift; + LAGG_SUNLOCK(sc); break; case SIOCSLAGGOPTS: if (sc->sc_proto == LAGG_PROTO_ROUNDROBIN) { @@ -1339,13 +1204,13 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); if (valid == 0 || (lacp == 1 && sc->sc_proto != LAGG_PROTO_LACP)) { /* Invalid combination of options specified. */ error = EINVAL; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; /* Return from SIOCSLAGGOPTS. */ } /* @@ -1400,18 +1265,18 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } } - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGFLAGS: rf->rf_flags = 0; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if (sc->sc_flags & MBUF_HASHFLAG_L2) rf->rf_flags |= LAGG_F_HASHL2; if (sc->sc_flags & MBUF_HASHFLAG_L3) rf->rf_flags |= LAGG_F_HASHL3; if (sc->sc_flags & MBUF_HASHFLAG_L4) rf->rf_flags |= LAGG_F_HASHL4; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); break; case SIOCSLAGGHASH: error = priv_check(td, PRIV_NET_LAGG); @@ -1421,7 +1286,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd error = EINVAL; break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); sc->sc_flags = 0; if (rf->rf_flags & LAGG_F_HASHL2) sc->sc_flags |= MBUF_HASHFLAG_L2; @@ -1429,7 +1294,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd sc->sc_flags |= MBUF_HASHFLAG_L3; if (rf->rf_flags & LAGG_F_HASHL4) sc->sc_flags |= MBUF_HASHFLAG_L4; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); break; case SIOCGLAGGPORT: if (rp->rp_portname[0] == '\0' || @@ -1438,17 +1303,17 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); if_rele(tpif); break; } lagg_port2req(lp, rp); - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); if_rele(tpif); break; case SIOCSLAGGPORT: @@ -1480,9 +1345,9 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd tpif->if_xname); } #endif - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); error = lagg_port_create(sc, tpif); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; case SIOCSLAGGDELPORT: @@ -1495,26 +1360,25 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; } - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); if ((lp = (struct lagg_port *)tpif->if_lagg) == NULL || lp->lp_softc != sc) { error = ENOENT; - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; } error = lagg_port_destroy(lp, 1); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); if_rele(tpif); break; case SIOCSIFFLAGS: /* Set flags on ports too */ - LAGG_WLOCK(sc); + LAGG_XLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { lagg_setflags(lp, 1); } - LAGG_WUNLOCK(sc); if (!(ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { @@ -1522,23 +1386,28 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd * If interface is marked down and it is running, * then stop and disable it. */ - LAGG_WLOCK(sc); lagg_stop(sc); - LAGG_WUNLOCK(sc); + LAGG_XUNLOCK(sc); } else if ((ifp->if_flags & IFF_UP) && !(ifp->if_drv_flags & IFF_DRV_RUNNING)) { /* * If interface is marked up and it is stopped, then * start it. */ + LAGG_XUNLOCK(sc); (*ifp->if_init)(sc); - } + } else + LAGG_XUNLOCK(sc); break; case SIOCADDMULTI: case SIOCDELMULTI: LAGG_WLOCK(sc); - error = lagg_ether_setmulti(sc); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + lagg_clrmulti(lp); + lagg_setmulti(lp); + } LAGG_WUNLOCK(sc); + error = 0; break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -1546,8 +1415,18 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd break; case SIOCSIFCAP: + LAGG_XLOCK(sc); + SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (lp->lp_ioctl != NULL) + (*lp->lp_ioctl)(lp->lp_ifp, cmd, data); + } + lagg_capabilities(sc); + LAGG_XUNLOCK(sc); + error = 0; + break; + case SIOCSIFMTU: - /* Do not allow the MTU or caps to be directly changed */ + /* Do not allow the MTU to be directly changed */ error = EINVAL; break; @@ -1559,67 +1438,69 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd } static int -lagg_ether_setmulti(struct lagg_softc *sc) +lagg_setmulti(struct lagg_port *lp) { - struct lagg_port *lp; + struct lagg_softc *sc = lp->lp_softc; + struct ifnet *ifp = lp->lp_ifp; + struct ifnet *scifp = sc->sc_ifp; + struct lagg_mc *mc; + struct ifmultiaddr *ifma; + int error; LAGG_WLOCK_ASSERT(sc); - - SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { - /* First, remove any existing filter entries. */ - lagg_ether_cmdmulti(lp, 0); - /* copy all addresses from the lagg interface to the port */ - lagg_ether_cmdmulti(lp, 1); + IF_ADDR_WLOCK(scifp); + TAILQ_FOREACH(ifma, &scifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); + if (mc == NULL) { + IF_ADDR_WUNLOCK(scifp); + return (ENOMEM); + } + bcopy(ifma->ifma_addr, &mc->mc_addr, + ifma->ifma_addr->sa_len); + mc->mc_addr.sdl_index = ifp->if_index; + mc->mc_ifma = NULL; + SLIST_INSERT_HEAD(&lp->lp_mc_head, mc, mc_entries); + } + IF_ADDR_WUNLOCK(scifp); + SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) { + error = if_addmulti(ifp, + (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma); + if (error) + return (error); } return (0); } static int -lagg_ether_cmdmulti(struct lagg_port *lp, int set) +lagg_clrmulti(struct lagg_port *lp) { - struct lagg_softc *sc = lp->lp_softc; - struct ifnet *ifp = lp->lp_ifp; - struct ifnet *scifp = sc->sc_ifp; struct lagg_mc *mc; - struct ifmultiaddr *ifma; - int error; - LAGG_WLOCK_ASSERT(sc); - - if (set) { - IF_ADDR_WLOCK(scifp); - TAILQ_FOREACH(ifma, &scifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - mc = malloc(sizeof(struct lagg_mc), M_DEVBUF, M_NOWAIT); - if (mc == NULL) { - IF_ADDR_WUNLOCK(scifp); - return (ENOMEM); - } - bcopy(ifma->ifma_addr, &mc->mc_addr, - ifma->ifma_addr->sa_len); - mc->mc_addr.sdl_index = ifp->if_index; - mc->mc_ifma = NULL; - SLIST_INSERT_HEAD(&lp->lp_mc_head, mc, mc_entries); - } - IF_ADDR_WUNLOCK(scifp); - SLIST_FOREACH (mc, &lp->lp_mc_head, mc_entries) { - error = if_addmulti(ifp, - (struct sockaddr *)&mc->mc_addr, &mc->mc_ifma); - if (error) - return (error); - } - } else { - while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { - SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); - if (mc->mc_ifma && lp->lp_detaching == 0) - if_delmulti_ifma(mc->mc_ifma); - free(mc, M_DEVBUF); - } + LAGG_WLOCK_ASSERT(lp->lp_softc); + while ((mc = SLIST_FIRST(&lp->lp_mc_head)) != NULL) { + SLIST_REMOVE(&lp->lp_mc_head, mc, lagg_mc, mc_entries); + if (mc->mc_ifma && lp->lp_detaching == 0) + if_delmulti_ifma(mc->mc_ifma); + free(mc, M_DEVBUF); } return (0); } +static int +lagg_setcaps(struct lagg_port *lp, int cap) +{ + struct ifreq ifr; + + if (lp->lp_ifp->if_capenable == cap) + return (0); + if (lp->lp_ioctl == NULL) + return (ENXIO); + ifr.ifr_reqcap = cap; + return ((*lp->lp_ioctl)(lp->lp_ifp, SIOCSIFCAP, (caddr_t)&ifr)); +} + /* Handle a ref counted flag that should be set on the lagg port as well */ static int lagg_setflag(struct lagg_port *lp, int flag, int status, @@ -1630,7 +1511,7 @@ lagg_setflag(struct lagg_port *lp, int f struct ifnet *ifp = lp->lp_ifp; int error; - LAGG_WLOCK_ASSERT(sc); + LAGG_XLOCK_ASSERT(sc); status = status ? (scifp->if_flags & flag) : 0; /* Now "status" contains the flag value or 0 */ @@ -1764,17 +1645,16 @@ lagg_media_status(struct ifnet *ifp, str { struct lagg_softc *sc = (struct lagg_softc *)ifp->if_softc; struct lagg_port *lp; - struct rm_priotracker tracker; imr->ifm_status = IFM_AVALID; imr->ifm_active = IFM_ETHER | IFM_AUTO; - LAGG_RLOCK(sc, &tracker); + LAGG_SLOCK(sc); SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { if (LAGG_PORTACTIVE(lp)) imr->ifm_status |= IFM_ACTIVE; } - LAGG_RUNLOCK(sc, &tracker); + LAGG_SUNLOCK(sc); } static void @@ -1784,6 +1664,8 @@ lagg_linkstate(struct lagg_softc *sc) int new_link = LINK_STATE_DOWN; uint64_t speed; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue May 16 00:33:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5E8DD6CF38; Tue, 16 May 2017 00:33:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0FE418EF; Tue, 16 May 2017 00:33:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0XkBV016756; Tue, 16 May 2017 00:33:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0Xk9D016755; Tue, 16 May 2017 00:33:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160033.v4G0Xk9D016755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:33:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318330 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:33:47 -0000 Author: mav Date: Tue May 16 00:33:46 2017 New Revision: 318330 URL: https://svnweb.freebsd.org/changeset/base/318330 Log: MFC r317547: Allow some control over enabled capabilities for if_vlan. It improves interoperability with if_bridge, which may need to disable some capabilities not supported by other members. IMHO there is still open question about LRO capability, which may need to be disabled on physical interface. Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Tue May 16 00:30:40 2017 (r318329) +++ stable/11/sys/net/if_vlan.c Tue May 16 00:33:46 2017 (r318330) @@ -112,6 +112,7 @@ struct ifvlan { #define PARENT(ifv) ((ifv)->ifv_trunk->parent) void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ + int ifv_capenable; struct ifv_linkmib { int ifvm_encaplen; /* encapsulation length */ int ifvm_mtufudge; /* MTU fudged by this much */ @@ -1286,6 +1287,7 @@ exists: ifv->ifv_encaplen = ETHER_VLAN_ENCAP_LEN; ifv->ifv_mintu = ETHERMIN; ifv->ifv_pflags = 0; + ifv->ifv_capenable = -1; /* * If the parent supports the VLAN_MTU capability, @@ -1537,9 +1539,14 @@ vlan_capabilities(struct ifvlan *ifv) struct ifnet *p = PARENT(ifv); struct ifnet *ifp = ifv->ifv_ifp; struct ifnet_hw_tsomax hw_tsomax; + int cap = 0, ena = 0, mena; + u_long hwa = 0; TRUNK_LOCK_ASSERT(TRUNK(ifv)); + /* Mask parent interface enabled capabilities disabled by user. */ + mena = p->if_capenable & ifv->ifv_capenable; + /* * If the parent interface can do checksum offloading * on VLANs, then propagate its hardware-assisted @@ -1547,20 +1554,18 @@ vlan_capabilities(struct ifvlan *ifv) * offloading requires hardware VLAN tagging. */ if (p->if_capabilities & IFCAP_VLAN_HWCSUM) - ifp->if_capabilities = - p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - + cap |= p->if_capabilities & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); if (p->if_capenable & IFCAP_VLAN_HWCSUM && p->if_capenable & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable = - p->if_capenable & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP | CSUM_TCP_IPV6 | CSUM_UDP_IPV6 | - CSUM_SCTP_IPV6); - } else { - ifp->if_capenable = 0; - ifp->if_hwassist = 0; + ena |= mena & (IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); + if (ena & IFCAP_TXCSUM) + hwa |= p->if_hwassist & (CSUM_IP | CSUM_TCP | + CSUM_UDP | CSUM_SCTP); + if (ena & IFCAP_TXCSUM_IPV6) + hwa |= p->if_hwassist & (CSUM_TCP_IPV6 | + CSUM_UDP_IPV6 | CSUM_SCTP_IPV6); } + /* * If the parent interface can do TSO on VLANs then * propagate the hardware-assisted flag. TSO on VLANs @@ -1570,13 +1575,11 @@ vlan_capabilities(struct ifvlan *ifv) if_hw_tsomax_common(p, &hw_tsomax); if_hw_tsomax_update(ifp, &hw_tsomax); if (p->if_capabilities & IFCAP_VLAN_HWTSO) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TSO; + cap |= p->if_capabilities & IFCAP_TSO; if (p->if_capenable & IFCAP_VLAN_HWTSO) { - ifp->if_capenable |= p->if_capenable & IFCAP_TSO; - ifp->if_hwassist |= p->if_hwassist & CSUM_TSO; - } else { - ifp->if_capenable &= ~(p->if_capenable & IFCAP_TSO); - ifp->if_hwassist &= ~(p->if_hwassist & CSUM_TSO); + ena |= mena & IFCAP_TSO; + if (ena & IFCAP_TSO) + hwa |= p->if_hwassist & CSUM_TSO; } /* @@ -1589,11 +1592,22 @@ vlan_capabilities(struct ifvlan *ifv) */ #define IFCAP_VLAN_TOE IFCAP_TOE if (p->if_capabilities & IFCAP_VLAN_TOE) - ifp->if_capabilities |= p->if_capabilities & IFCAP_TOE; + cap |= p->if_capabilities & IFCAP_TOE; if (p->if_capenable & IFCAP_VLAN_TOE) { TOEDEV(ifp) = TOEDEV(p); - ifp->if_capenable |= p->if_capenable & IFCAP_TOE; + ena |= mena & IFCAP_TOE; } + + /* + * If the parent interface supports dynamic link state, so does the + * VLAN interface. + */ + cap |= (p->if_capabilities & IFCAP_LINKSTATE); + ena |= (mena & IFCAP_LINKSTATE); + + ifp->if_capabilities = cap; + ifp->if_capenable = ena; + ifp->if_hwassist = hwa; } static void @@ -1797,6 +1811,18 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd vlan_tag_recalculate(ifv); break; + case SIOCSIFCAP: + VLAN_LOCK(); + ifv->ifv_capenable = ifr->ifr_reqcap; + trunk = TRUNK(ifv); + if (trunk != NULL) { + TRUNK_LOCK(trunk); + vlan_capabilities(ifv); + TRUNK_UNLOCK(trunk); + } + VLAN_UNLOCK(); + break; + default: error = EINVAL; break; From owner-svn-src-stable@freebsd.org Tue May 16 00:34:54 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F2E6D6D011; Tue, 16 May 2017 00:34:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 510371A7F; Tue, 16 May 2017 00:34:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G0YrBq016851; Tue, 16 May 2017 00:34:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G0YreL016850; Tue, 16 May 2017 00:34:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201705160034.v4G0YreL016850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 16 May 2017 00:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318331 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 00:34:54 -0000 Author: mav Date: Tue May 16 00:34:53 2017 New Revision: 318331 URL: https://svnweb.freebsd.org/changeset/base/318331 Log: MFC r317585: Propagate IFCAP_LRO from trunk to vlan interface. False positive here cost nothing, while false negative may lead to some confusions. Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Tue May 16 00:33:46 2017 (r318330) +++ stable/11/sys/net/if_vlan.c Tue May 16 00:34:53 2017 (r318331) @@ -1583,6 +1583,16 @@ vlan_capabilities(struct ifvlan *ifv) } /* + * If the parent interface can do LRO and checksum offloading on + * VLANs, then guess it may do LRO on VLANs. False positive here + * cost nothing, while false negative may lead to some confusions. + */ + if (p->if_capabilities & IFCAP_VLAN_HWCSUM) + cap |= p->if_capabilities & IFCAP_LRO; + if (p->if_capenable & IFCAP_VLAN_HWCSUM) + ena |= p->if_capenable & IFCAP_LRO; + + /* * If the parent interface can offload TCP connections over VLANs then * propagate its TOE capability to the VLAN interface. * From owner-svn-src-stable@freebsd.org Tue May 16 02:23:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 556B8D6F796; Tue, 16 May 2017 02:23:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2678E1DFE; Tue, 16 May 2017 02:23:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G2Nslx060902; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G2Nsjb060901; Tue, 16 May 2017 02:23:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705160223.v4G2Nsjb060901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 16 May 2017 02:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318332 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 02:23:55 -0000 Author: bdrewery Date: Tue May 16 02:23:54 2017 New Revision: 318332 URL: https://svnweb.freebsd.org/changeset/base/318332 Log: MFC r318092: PROGS+META_MODE: Avoid rebuilding common sources when recursing. Modified: stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Tue May 16 00:34:53 2017 (r318331) +++ stable/11/share/mk/bsd.progs.mk Tue May 16 02:23:54 2017 (r318332) @@ -87,11 +87,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) -# tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install - -# Find common sources among the PROGS and depend on them before building +# Find common sources among the PROGS to depend on them before building # anything. This allows parallelization without them each fighting over # the same objects. _PROGS_COMMON_SRCS= @@ -110,6 +106,20 @@ _PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS .if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) _PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} .endif +.endif + +# When recursing, ensure common sources are not rebuilt in META_MODE. +.if defined(_RECURSING_PROGS) && !empty(_PROGS_COMMON_OBJS) && \ + !empty(.MAKE.MODE:Mmeta) +${_PROGS_COMMON_OBJS}: .NOMETA +.endif + +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) +# tell progs.mk we might want to install things +PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install + +# Ensure common objects are built before recursing. +.if !empty(_PROGS_COMMON_OBJS) ${PROGS}: ${_PROGS_COMMON_OBJS} .endif From owner-svn-src-stable@freebsd.org Tue May 16 07:22:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C238AD6F836; Tue, 16 May 2017 07:22:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 910CC15C8; Tue, 16 May 2017 07:22:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G7Mfp3081766; Tue, 16 May 2017 07:22:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G7MfTf081765; Tue, 16 May 2017 07:22:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705160722.v4G7MfTf081765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 16 May 2017 07:22:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318338 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 07:22:42 -0000 Author: hselasky Date: Tue May 16 07:22:41 2017 New Revision: 318338 URL: https://svnweb.freebsd.org/changeset/base/318338 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/9/share/man/man4/usb.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/usb.4 ============================================================================== --- stable/9/share/man/man4/usb.4 Tue May 16 05:10:15 2017 (r318337) +++ stable/9/share/man/man4/usb.4 Tue May 16 07:22:41 2017 (r318338) @@ -144,7 +144,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr axge 4 , From owner-svn-src-stable@freebsd.org Tue May 16 07:24:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F26DCD6F8C6; Tue, 16 May 2017 07:24:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3B431710; Tue, 16 May 2017 07:24:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G7O9aF081873; Tue, 16 May 2017 07:24:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G7O9Ak081872; Tue, 16 May 2017 07:24:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705160724.v4G7O9Ak081872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 16 May 2017 07:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r318339 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 07:24:11 -0000 Author: hselasky Date: Tue May 16 07:24:09 2017 New Revision: 318339 URL: https://svnweb.freebsd.org/changeset/base/318339 Log: MFC r317584: Correct manual page link to usbdi(9). Modified: stable/8/share/man/man4/usb.4 Directory Properties: stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/usb.4 ============================================================================== --- stable/8/share/man/man4/usb.4 Tue May 16 07:22:41 2017 (r318338) +++ stable/8/share/man/man4/usb.4 Tue May 16 07:24:09 2017 (r318339) @@ -170,7 +170,7 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.Xr usbdi 4 , +.Xr usbdi 9 , .Xr aue 4 , .Xr axe 4 , .Xr cue 4 , From owner-svn-src-stable@freebsd.org Tue May 16 09:39:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A72ED6E095; Tue, 16 May 2017 09:39:22 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CB49F6; Tue, 16 May 2017 09:39:22 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4G9dLL0035335; Tue, 16 May 2017 09:39:21 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4G9dKIY035331; Tue, 16 May 2017 09:39:20 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705160939.v4G9dKIY035331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 16 May 2017 09:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318347 - in stable/11/sys: dev/xen/evtchn x86/xen xen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 09:39:22 -0000 Author: royger Date: Tue May 16 09:39:20 2017 New Revision: 318347 URL: https://svnweb.freebsd.org/changeset/base/318347 Log: MCF r310418: xen: fix IPI setup with EARLY_AP_STARTUP Sponsored by: Citrix Systems R&D Modified: stable/11/sys/dev/xen/evtchn/evtchn_dev.c stable/11/sys/x86/xen/xen_apic.c stable/11/sys/x86/xen/xen_intr.c stable/11/sys/xen/xen_intr.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- stable/11/sys/dev/xen/evtchn/evtchn_dev.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/dev/xen/evtchn/evtchn_dev.c Tue May 16 09:39:20 2017 (r318347) @@ -373,9 +373,9 @@ evtchn_bind_user_port(struct per_user_da mtx_lock(&u->bind_mutex); RB_INSERT(evtchn_tree, &u->evtchns, evtchn); mtx_unlock(&u->bind_mutex); - error = xen_intr_add_handler(evtchn_dev, evtchn_filter, - evtchn_interrupt, evtchn, INTR_TYPE_MISC | INTR_MPSAFE, - evtchn->handle); + error = xen_intr_add_handler(device_get_nameunit(evtchn_dev), + evtchn_filter, evtchn_interrupt, evtchn, + INTR_TYPE_MISC | INTR_MPSAFE, evtchn->handle); if (error != 0) { xen_intr_unbind(&evtchn->handle); mtx_lock(&u->bind_mutex); Modified: stable/11/sys/x86/xen/xen_apic.c ============================================================================== --- stable/11/sys/x86/xen/xen_apic.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/x86/xen/xen_apic.c Tue May 16 09:39:20 2017 (r318347) @@ -500,12 +500,9 @@ xen_cpu_ipi_init(int cpu) { xen_intr_handle_t *ipi_handle; const struct xen_ipi_handler *ipi; - device_t dev; int idx, rc; ipi_handle = DPCPU_ID_GET(cpu, ipi_handle); - dev = pcpu_find(cpu)->pc_device; - KASSERT((dev != NULL), ("NULL pcpu device_t")); for (ipi = xen_ipis, idx = 0; idx < nitems(xen_ipis); ipi++, idx++) { @@ -514,7 +511,7 @@ xen_cpu_ipi_init(int cpu) continue; } - rc = xen_intr_alloc_and_bind_ipi(dev, cpu, ipi->filter, + rc = xen_intr_alloc_and_bind_ipi(cpu, ipi->filter, INTR_TYPE_TTY, &ipi_handle[idx]); if (rc != 0) panic("Unable to allocate a XEN IPI port"); Modified: stable/11/sys/x86/xen/xen_intr.c ============================================================================== --- stable/11/sys/x86/xen/xen_intr.c Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/x86/xen/xen_intr.c Tue May 16 09:39:20 2017 (r318347) @@ -392,7 +392,7 @@ xen_intr_release_isrc(struct xenisrc *is */ static int xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port, - enum evtchn_type type, device_t intr_owner, driver_filter_t filter, + enum evtchn_type type, const char *intr_owner, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t *port_handlep) { @@ -401,8 +401,8 @@ xen_intr_bind_isrc(struct xenisrc **isrc *isrcp = NULL; if (port_handlep == NULL) { - device_printf(intr_owner, - "xen_intr_bind_isrc: Bad event handle\n"); + printf("%s: xen_intr_bind_isrc: Bad event handle\n", + intr_owner); return (EINVAL); } @@ -1174,8 +1174,9 @@ xen_intr_bind_local_port(device_t dev, e struct xenisrc *isrc; int error; - error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT, dev, - filter, handler, arg, flags, port_handlep); + error = xen_intr_bind_isrc(&isrc, local_port, EVTCHN_TYPE_PORT, + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); if (error != 0) return (error); @@ -1209,8 +1210,8 @@ xen_intr_alloc_and_bind_local_port(devic } error = xen_intr_bind_isrc(&isrc, alloc_unbound.port, EVTCHN_TYPE_PORT, - dev, filter, handler, arg, flags, - port_handlep); + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); if (error != 0) { evtchn_close_t close = { .port = alloc_unbound.port }; if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close)) @@ -1244,8 +1245,8 @@ xen_intr_bind_remote_port(device_t dev, } error = xen_intr_bind_isrc(&isrc, bind_interdomain.local_port, - EVTCHN_TYPE_PORT, dev, filter, handler, - arg, flags, port_handlep); + EVTCHN_TYPE_PORT, device_get_nameunit(dev), filter, handler, arg, + flags, port_handlep); if (error) { evtchn_close_t close = { .port = bind_interdomain.local_port }; if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close)) @@ -1284,8 +1285,9 @@ xen_intr_bind_virq(device_t dev, u_int v return (-error); } - error = xen_intr_bind_isrc(&isrc, bind_virq.port, EVTCHN_TYPE_VIRQ, dev, - filter, handler, arg, flags, port_handlep); + error = xen_intr_bind_isrc(&isrc, bind_virq.port, EVTCHN_TYPE_VIRQ, + device_get_nameunit(dev), filter, handler, arg, flags, + port_handlep); #ifdef SMP if (error == 0) @@ -1324,14 +1326,15 @@ xen_intr_bind_virq(device_t dev, u_int v } int -xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, - driver_filter_t filter, enum intr_type flags, - xen_intr_handle_t *port_handlep) +xen_intr_alloc_and_bind_ipi(u_int cpu, driver_filter_t filter, + enum intr_type flags, xen_intr_handle_t *port_handlep) { #ifdef SMP int vcpu_id = pcpu_find(cpu)->pc_vcpu_id; struct xenisrc *isrc; struct evtchn_bind_ipi bind_ipi = { .vcpu = vcpu_id }; + /* Same size as the one used by intr_handler->ih_name. */ + char name[MAXCOMLEN + 1]; int error; /* Ensure the target CPU is ready to handle evtchn interrupts. */ @@ -1347,12 +1350,10 @@ xen_intr_alloc_and_bind_ipi(device_t dev return (-error); } - error = xen_intr_bind_isrc(&isrc, bind_ipi.port, EVTCHN_TYPE_IPI, - dev, filter, NULL, NULL, flags, - port_handlep); - if (error == 0) - error = intr_event_bind(isrc->xi_intsrc.is_event, cpu); + snprintf(name, sizeof(name), "cpu%u", cpu); + error = xen_intr_bind_isrc(&isrc, bind_ipi.port, EVTCHN_TYPE_IPI, + name, filter, NULL, NULL, flags, port_handlep); if (error != 0) { evtchn_close_t close = { .port = bind_ipi.port }; @@ -1541,7 +1542,7 @@ xen_intr_port(xen_intr_handle_t handle) } int -xen_intr_add_handler(device_t dev, driver_filter_t filter, +xen_intr_add_handler(const char *name, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t handle) { @@ -1552,12 +1553,12 @@ xen_intr_add_handler(device_t dev, drive if (isrc == NULL || isrc->xi_cookie != NULL) return (EINVAL); - error = intr_add_handler(device_get_nameunit(dev), isrc->xi_vector, - filter, handler, arg, flags|INTR_EXCL, &isrc->xi_cookie); + error = intr_add_handler(name, isrc->xi_vector,filter, handler, arg, + flags|INTR_EXCL, &isrc->xi_cookie); if (error != 0) { - device_printf(dev, - "xen_intr_add_handler: intr_add_handler failed: %d\n", - error); + printf( + "%s: xen_intr_add_handler: intr_add_handler failed: %d\n", + name, error); } return (error); Modified: stable/11/sys/xen/xen_intr.h ============================================================================== --- stable/11/sys/xen/xen_intr.h Tue May 16 09:24:18 2017 (r318346) +++ stable/11/sys/xen/xen_intr.h Tue May 16 09:39:20 2017 (r318347) @@ -143,7 +143,6 @@ int xen_intr_bind_virq(device_t dev, u_i * interupts and, if successful, associate the port with the specified * interrupt handler. * - * \param dev The device making this bind request. * \param cpu The cpu receiving the IPI. * \param filter The interrupt filter servicing this IPI. * \param irqflags Interrupt handler flags. See sys/bus.h. @@ -152,7 +151,7 @@ int xen_intr_bind_virq(device_t dev, u_i * * \returns 0 on success, otherwise an errno. */ -int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, +int xen_intr_alloc_and_bind_ipi(u_int cpu, driver_filter_t filter, enum intr_type irqflags, xen_intr_handle_t *handlep); @@ -259,7 +258,7 @@ int xen_release_msi(int vector); * * \returns 0 on success, otherwise an errno. */ -int xen_intr_add_handler(device_t dev, driver_filter_t filter, +int xen_intr_add_handler(const char *name, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, xen_intr_handle_t handle); From owner-svn-src-stable@freebsd.org Tue May 16 17:49:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D719D70643; Tue, 16 May 2017 17:49:18 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC4E01DE1; Tue, 16 May 2017 17:49:17 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GHnGEs043992; Tue, 16 May 2017 17:49:16 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GHnFvb043981; Tue, 16 May 2017 17:49:15 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705161749.v4GHnFvb043981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 16 May 2017 17:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318357 - in stable/11/sys: amd64/conf conf dev/ixl modules/ixl modules/ixlv X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:49:18 -0000 Author: erj Date: Tue May 16 17:49:15 2017 New Revision: 318357 URL: https://svnweb.freebsd.org/changeset/base/318357 Log: MFC r313497: ixl(4): Update to 1.7.12-k. Refresh upstream driver before impending conversion to iflib. Major new features: - Support for Fortville-based 25G adapters - Support for I2C reads/writes (To prevent getting or sending corrupt data, you should set dev.ixl.0.debug.disable_fw_link_management=1 when using I2C [this will disable link!], then set it to 0 when done. The driver implements the SIOCGI2C ioctl, so ifconfig -v works for reading I2C data, but there are read_i2c and write_i2c sysctls under the .debug sysctl tree [the latter being useful for upper page support in QSFP+]). - Addition of an iWARP client interface (so the future iWARP driver for X722 devices can communicate with the base driver). - Add "options IXL_IW" to kernel config to enable this option. Sponsored by: Intel Corporation Added: stable/11/sys/dev/ixl/ixl_iw.c - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.c stable/11/sys/dev/ixl/ixl_iw.h - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw.h stable/11/sys/dev/ixl/ixl_iw_int.h - copied unchanged from r313497, head/sys/dev/ixl/ixl_iw_int.h stable/11/sys/dev/ixl/ixl_pf_i2c.c - copied unchanged from r313497, head/sys/dev/ixl/ixl_pf_i2c.c Modified: stable/11/sys/amd64/conf/NOTES stable/11/sys/conf/files.amd64 stable/11/sys/conf/options.amd64 stable/11/sys/dev/ixl/i40e_adminq.c stable/11/sys/dev/ixl/i40e_adminq_cmd.h stable/11/sys/dev/ixl/i40e_common.c stable/11/sys/dev/ixl/i40e_devids.h stable/11/sys/dev/ixl/i40e_lan_hmc.c stable/11/sys/dev/ixl/i40e_nvm.c stable/11/sys/dev/ixl/i40e_osdep.c stable/11/sys/dev/ixl/i40e_osdep.h stable/11/sys/dev/ixl/i40e_prototype.h stable/11/sys/dev/ixl/i40e_type.h stable/11/sys/dev/ixl/i40e_virtchnl.h stable/11/sys/dev/ixl/if_ixl.c stable/11/sys/dev/ixl/if_ixlv.c stable/11/sys/dev/ixl/ixl.h stable/11/sys/dev/ixl/ixl_pf.h stable/11/sys/dev/ixl/ixl_pf_iov.c stable/11/sys/dev/ixl/ixl_pf_iov.h stable/11/sys/dev/ixl/ixl_pf_main.c stable/11/sys/dev/ixl/ixl_txrx.c stable/11/sys/dev/ixl/ixlv.h stable/11/sys/dev/ixl/ixlvc.c stable/11/sys/modules/ixl/Makefile stable/11/sys/modules/ixlv/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/conf/NOTES ============================================================================== --- stable/11/sys/amd64/conf/NOTES Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/amd64/conf/NOTES Tue May 16 17:49:15 2017 (r318357) @@ -341,6 +341,7 @@ device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel XL710 40Gbe PCIE Ethernet +options IXL_IW # Enable iWARP Client Interface in ixl(4) device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlxen # Mellanox ConnectX HCA Ethernet Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/conf/files.amd64 Tue May 16 17:49:15 2017 (r318357) @@ -249,6 +249,10 @@ dev/ixl/ixl_pf_qmgr.c optional ixl pci compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixl_pf_iov.c optional ixl pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_pf_i2c.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" +dev/ixl/ixl_iw.c optional ixl pci \ + compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/if_ixlv.c optional ixlv pci \ compile-with "${NORMAL_C} -I$S/dev/ixl" dev/ixl/ixlvc.c optional ixlv pci \ Modified: stable/11/sys/conf/options.amd64 ============================================================================== --- stable/11/sys/conf/options.amd64 Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/conf/options.amd64 Tue May 16 17:49:15 2017 (r318357) @@ -49,6 +49,9 @@ AGP_DEBUG opt_agp.h ATKBD_DFLT_KEYMAP opt_atkbd.h +# iWARP client interface support in ixl +IXL_IW opt_ixl.h + # ------------------------------- # EOF # ------------------------------- Modified: stable/11/sys/dev/ixl/i40e_adminq.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_adminq.c Tue May 16 17:49:15 2017 (r318357) @@ -1020,11 +1020,11 @@ enum i40e_status_code i40e_clean_arq_ele desc = I40E_ADMINQ_DESC(hw->aq.arq, ntc); desc_idx = ntc; + hw->aq.arq_last_status = + (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); flags = LE16_TO_CPU(desc->flags); if (flags & I40E_AQ_FLAG_ERR) { ret_code = I40E_ERR_ADMIN_QUEUE_ERROR; - hw->aq.arq_last_status = - (enum i40e_admin_queue_err)LE16_TO_CPU(desc->retval); i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQRX: Event received with error 0x%X.\n", Modified: stable/11/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- stable/11/sys/dev/ixl/i40e_adminq_cmd.h Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_adminq_cmd.h Tue May 16 17:49:15 2017 (r318357) @@ -154,6 +154,7 @@ enum i40e_admin_queue_opc { /* WoL commands */ i40e_aqc_opc_set_wol_filter = 0x0120, i40e_aqc_opc_get_wake_reason = 0x0121, + i40e_aqc_opc_clear_all_wol_filters = 0x025E, /* internal switch commands */ i40e_aqc_opc_get_switch_config = 0x0200, @@ -535,7 +536,8 @@ struct i40e_aqc_mac_address_read { #define I40E_AQC_PORT_ADDR_VALID 0x40 #define I40E_AQC_WOL_ADDR_VALID 0x80 #define I40E_AQC_MC_MAG_EN_VALID 0x100 -#define I40E_AQC_ADDR_VALID_MASK 0x1F0 +#define I40E_AQC_WOL_PRESERVE_STATUS 0x200 +#define I40E_AQC_ADDR_VALID_MASK 0x3F0 u8 reserved[6]; __le32 addr_high; __le32 addr_low; @@ -556,6 +558,7 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_a struct i40e_aqc_mac_address_write { __le16 command_flags; #define I40E_AQC_MC_MAG_EN 0x0100 +#define I40E_AQC_WOL_PRESERVE_ON_PFR 0x0200 #define I40E_AQC_WRITE_TYPE_LAA_ONLY 0x0000 #define I40E_AQC_WRITE_TYPE_LAA_WOL 0x4000 #define I40E_AQC_WRITE_TYPE_PORT 0x8000 @@ -594,6 +597,7 @@ struct i40e_aqc_set_wol_filter { __le16 cmd_flags; #define I40E_AQC_SET_WOL_FILTER 0x8000 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000 +#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR 0 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET 1 __le16 valid_flags; @@ -1757,6 +1761,8 @@ struct i40e_aq_get_phy_abilities_resp { #define I40E_AQ_PHY_LINK_ENABLED 0x08 #define I40E_AQ_PHY_AN_ENABLED 0x10 #define I40E_AQ_PHY_FLAG_MODULE_QUAL 0x20 +#define I40E_AQ_PHY_FEC_ABILITY_KR 0x40 +#define I40E_AQ_PHY_FEC_ABILITY_RS 0x80 __le16 eee_capability; #define I40E_AQ_EEE_100BASE_TX 0x0002 #define I40E_AQ_EEE_1000BASE_T 0x0004 @@ -1768,11 +1774,20 @@ struct i40e_aq_get_phy_abilities_resp { u8 d3_lpan; #define I40E_AQ_SET_PHY_D3_LPAN_ENA 0x01 u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 +#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0x01 +#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0x02 #define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 #define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 mod_type_ext; + u8 fec_cfg_curr_mod_ext_info; +#define I40E_AQ_ENABLE_FEC_KR 0x01 +#define I40E_AQ_ENABLE_FEC_RS 0x02 +#define I40E_AQ_REQUEST_FEC_KR 0x04 +#define I40E_AQ_REQUEST_FEC_RS 0x08 +#define I40E_AQ_ENABLE_FEC_AUTO 0x10 +#define I40E_AQ_FEC +#define I40E_AQ_MODULE_TYPE_EXT_MASK 0xE0 +#define I40E_AQ_MODULE_TYPE_EXT_SHIFT 5 + u8 ext_comp_code; u8 phy_id[4]; u8 module_type[3]; @@ -1796,11 +1811,15 @@ struct i40e_aq_set_phy_config { /* same __le32 eeer; u8 low_power_ctrl; u8 phy_type_ext; -#define I40E_AQ_PHY_TYPE_EXT_25G_KR 0X01 -#define I40E_AQ_PHY_TYPE_EXT_25G_CR 0X02 -#define I40E_AQ_PHY_TYPE_EXT_25G_SR 0x04 -#define I40E_AQ_PHY_TYPE_EXT_25G_LR 0x08 - u8 reserved[2]; + u8 fec_config; +#define I40E_AQ_SET_FEC_ABILITY_KR BIT(0) +#define I40E_AQ_SET_FEC_ABILITY_RS BIT(1) +#define I40E_AQ_SET_FEC_REQUEST_KR BIT(2) +#define I40E_AQ_SET_FEC_REQUEST_RS BIT(3) +#define I40E_AQ_SET_FEC_AUTO BIT(4) +#define I40E_AQ_PHY_FEC_CONFIG_SHIFT 0x0 +#define I40E_AQ_PHY_FEC_CONFIG_MASK (0x1F << I40E_AQ_PHY_FEC_CONFIG_SHIFT) + u8 reserved; }; I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config); @@ -1890,6 +1909,8 @@ struct i40e_aqc_get_link_status { u8 loopback; /* use defines from i40e_aqc_set_lb_mode */ __le16 max_frame_size; u8 config; +#define I40E_AQ_CONFIG_FEC_KR_ENA 0x01 +#define I40E_AQ_CONFIG_FEC_RS_ENA 0x02 #define I40E_AQ_CONFIG_CRC_ENA 0x04 #define I40E_AQ_CONFIG_PACING_MASK 0x78 u8 power_desc; Modified: stable/11/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_common.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_common.c Tue May 16 17:49:15 2017 (r318357) @@ -78,7 +78,6 @@ enum i40e_status_code i40e_set_mac_type( hw->mac.type = I40E_MAC_X722; break; case I40E_DEV_ID_X722_VF: - case I40E_DEV_ID_X722_VF_HV: case I40E_DEV_ID_X722_A0_VF: hw->mac.type = I40E_MAC_X722_VF; break; @@ -1088,7 +1087,8 @@ enum i40e_status_code i40e_get_mac_addr( status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL); if (flags & I40E_AQC_LAN_ADDR_VALID) - memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac)); + i40e_memcpy(mac_addr, &addrs.pf_lan_mac, sizeof(addrs.pf_lan_mac), + I40E_NONDMA_TO_NONDMA); return status; } @@ -1111,7 +1111,8 @@ enum i40e_status_code i40e_get_port_mac_ return status; if (flags & I40E_AQC_PORT_ADDR_VALID) - memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac)); + i40e_memcpy(mac_addr, &addrs.port_mac, sizeof(addrs.port_mac), + I40E_NONDMA_TO_NONDMA); else status = I40E_ERR_INVALID_MAC_ADDR; @@ -1224,6 +1225,8 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_1000BASE_LX: case I40E_PHY_TYPE_40GBASE_SR4: case I40E_PHY_TYPE_40GBASE_LR4: + case I40E_PHY_TYPE_25GBASE_LR: + case I40E_PHY_TYPE_25GBASE_SR: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1238,6 +1241,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_SFPP_CU: case I40E_PHY_TYPE_40GBASE_AOC: case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_CR: media = I40E_MEDIA_TYPE_DA; break; case I40E_PHY_TYPE_1000BASE_KX: @@ -1245,6 +1249,7 @@ static enum i40e_media_type i40e_get_med case I40E_PHY_TYPE_10GBASE_KR: case I40E_PHY_TYPE_40GBASE_KR4: case I40E_PHY_TYPE_20GBASE_KR2: + case I40E_PHY_TYPE_25GBASE_KR: media = I40E_MEDIA_TYPE_BACKPLANE; break; case I40E_PHY_TYPE_SGMII: @@ -1725,10 +1730,13 @@ enum i40e_status_code i40e_set_fc(struct config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK; /* Copy over all the old settings */ config.phy_type = abilities.phy_type; + config.phy_type_ext = abilities.phy_type_ext; config.link_speed = abilities.link_speed; config.eee_capability = abilities.eee_capability; config.eeer = abilities.eeer_val; config.low_power_ctrl = abilities.d3_lpan; + config.fec_config = abilities.fec_cfg_curr_mod_ext_info & + I40E_AQ_PHY_FEC_CONFIG_MASK; status = i40e_aq_set_phy_config(hw, &config, NULL); if (status) @@ -1888,6 +1896,8 @@ enum i40e_status_code i40e_aq_get_link_i hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->link_speed; hw_link_info->link_info = resp->link_info; hw_link_info->an_info = resp->an_info; + hw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA | + I40E_AQ_CONFIG_FEC_RS_ENA); hw_link_info->ext_info = resp->ext_info; hw_link_info->loopback = resp->loopback; hw_link_info->max_frame_size = LE16_TO_CPU(resp->max_frame_size); @@ -1910,12 +1920,13 @@ enum i40e_status_code i40e_aq_get_link_i else hw_link_info->crc_enable = FALSE; - if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_ENABLE)) + if (resp->command_flags & CPU_TO_LE16(I40E_AQ_LSE_IS_ENABLED)) hw_link_info->lse_enable = TRUE; else hw_link_info->lse_enable = FALSE; - if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && + if ((hw->mac.type == I40E_MAC_XL710) && + (hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 && hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; @@ -2280,6 +2291,43 @@ enum i40e_status_code i40e_aq_set_vsi_mu } /** +* i40e_aq_set_vsi_full_promiscuous +* @hw: pointer to the hw struct +* @seid: VSI number +* @set: set promiscuous enable/disable +* @cmd_details: pointer to command details structure or NULL +**/ +enum i40e_status_code i40e_aq_set_vsi_full_promiscuous(struct i40e_hw *hw, + u16 seid, bool set, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (set) + flags = I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST | + I40E_AQC_SET_VSI_PROMISC_MULTICAST | + I40E_AQC_SET_VSI_PROMISC_BROADCAST); + + cmd->seid = CPU_TO_LE16(seid); + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number @@ -2348,6 +2396,40 @@ enum i40e_status_code i40e_aq_set_vsi_uc } /** + * i40e_aq_set_vsi_bc_promisc_on_vlan + * @hw: pointer to the hw struct + * @seid: vsi number + * @enable: set broadcast promiscuous enable/disable for a given VLAN + * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag + * @cmd_details: pointer to command details structure or NULL + **/ +enum i40e_status_code i40e_aq_set_vsi_bc_promisc_on_vlan(struct i40e_hw *hw, + u16 seid, bool enable, u16 vid, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + struct i40e_aqc_set_vsi_promiscuous_modes *cmd = + (struct i40e_aqc_set_vsi_promiscuous_modes *)&desc.params.raw; + enum i40e_status_code status; + u16 flags = 0; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_set_vsi_promiscuous_modes); + + if (enable) + flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST; + + cmd->promiscuous_flags = CPU_TO_LE16(flags); + cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_BROADCAST); + cmd->seid = CPU_TO_LE16(seid); + cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + +/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number @@ -2680,14 +2762,17 @@ enum i40e_status_code i40e_update_link_i if (status) return status; - if (hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) { + /* extra checking needed to ensure link info to user is timely */ + if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { status = i40e_aq_get_phy_capabilities(hw, FALSE, false, &abilities, NULL); if (status) return status; - memcpy(hw->phy.link_info.module_type, &abilities.module_type, - sizeof(hw->phy.link_info.module_type)); + i40e_memcpy(hw->phy.link_info.module_type, &abilities.module_type, + sizeof(hw->phy.link_info.module_type), I40E_NONDMA_TO_NONDMA); } return status; } @@ -3537,6 +3622,14 @@ static void i40e_parse_discover_capabili break; case I40E_AQ_CAP_ID_MNG_MODE: p->management_mode = number; + if (major_rev > 1) { + p->mng_protocols_over_mctp = logical_id; + i40e_debug(hw, I40E_DEBUG_INIT, + "HW Capability: Protocols over MCTP = %d\n", + p->mng_protocols_over_mctp); + } else { + p->mng_protocols_over_mctp = 0; + } i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: Management Mode = %d\n", p->management_mode); @@ -3765,7 +3858,6 @@ static void i40e_parse_discover_capabili else p->acpi_prog_method = I40E_ACPI_PROGRAMMING_METHOD_HW_FVL; p->proxy_support = (phys_id & I40E_PROXY_SUPPORT_MASK) ? 1 : 0; - p->proxy_support = p->proxy_support; i40e_debug(hw, I40E_DEBUG_INIT, "HW Capability: WOL proxy filters = %d\n", hw->num_wol_proxy_filters); @@ -3806,8 +3898,10 @@ static void i40e_parse_discover_capabili /* partition id is 1-based, and functions are evenly spread * across the ports as partitions */ - hw->partition_id = (hw->pf_id / hw->num_ports) + 1; - hw->num_partitions = num_functions / hw->num_ports; + if (hw->num_ports != 0) { + hw->partition_id = (hw->pf_id / hw->num_ports) + 1; + hw->num_partitions = num_functions / hw->num_ports; + } /* additional HW specific goodies that might * someday be HW version specific @@ -4292,11 +4386,15 @@ enum i40e_status_code i40e_aq_start_stop /** * i40e_aq_add_udp_tunnel * @hw: pointer to the hw struct - * @udp_port: the UDP port to add + * @udp_port: the UDP port to add in Host byte order * @header_len: length of the tunneling header length in DWords * @protocol_index: protocol index type * @filter_index: pointer to filter index * @cmd_details: pointer to command details structure or NULL + * + * Note: Firmware expects the udp_port value to be in Little Endian format, + * and this function will call CPU_TO_LE16 to convert from Host byte order to + * Little Endian order. **/ enum i40e_status_code i40e_aq_add_udp_tunnel(struct i40e_hw *hw, u16 udp_port, u8 protocol_index, @@ -5905,9 +6003,6 @@ enum i40e_status_code i40e_aq_configure_ desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); - if (bwd_size > I40E_AQ_LARGE_BUF) - desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - desc.datalen = CPU_TO_LE16(bwd_size); status = i40e_asq_send_command(hw, &desc, bw_data, bwd_size, cmd_details); @@ -5916,7 +6011,92 @@ enum i40e_status_code i40e_aq_configure_ } /** - * i40e_read_phy_register + * i40e_read_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + if (status) { + i40e_debug(hw, I40E_DEBUG_PHY, + "PHY: Can't write command to external PHY.\n"); + } else { + command = rd32(hw, I40E_GLGEN_MSRWD(port_num)); + *value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >> + I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT; + } + + return status; +} + +/** + * i40e_write_phy_register_clause22 + * @hw: pointer to the HW structure + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes specified PHY register value + **/ +enum i40e_status_code i40e_write_phy_register_clause22(struct i40e_hw *hw, + u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status = I40E_ERR_TIMEOUT; + u8 port_num = (u8)hw->func_caps.mdio_port_num; + u32 command = 0; + u16 retry = 1000; + + command = value << I40E_GLGEN_MSRWD_MDIWRDATA_SHIFT; + wr32(hw, I40E_GLGEN_MSRWD(port_num), command); + + command = (reg << I40E_GLGEN_MSCA_DEVADD_SHIFT) | + (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | + (I40E_MDIO_CLAUSE22_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE22_STCODE_MASK) | + (I40E_GLGEN_MSCA_MDICMD_MASK); + + wr32(hw, I40E_GLGEN_MSCA(port_num), command); + do { + command = rd32(hw, I40E_GLGEN_MSCA(port_num)); + if (!(command & I40E_GLGEN_MSCA_MDICMD_MASK)) { + status = I40E_SUCCESS; + break; + } + i40e_usec_delay(10); + retry--; + } while (retry); + + return status; +} + +/** + * i40e_read_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -5925,9 +6105,8 @@ enum i40e_status_code i40e_aq_configure_ * * Reads specified PHY register value **/ -enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 *value) +enum i40e_status_code i40e_read_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -5937,8 +6116,8 @@ enum i40e_status_code i40e_read_phy_regi command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -5960,8 +6139,8 @@ enum i40e_status_code i40e_read_phy_regi command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_READ) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_READ_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -5991,7 +6170,7 @@ phy_read_end: } /** - * i40e_write_phy_register + * i40e_write_phy_register_clause45 * @hw: pointer to the HW structure * @page: registers page number * @reg: register address in the page @@ -6000,9 +6179,8 @@ phy_read_end: * * Writes value to specified PHY register **/ -enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, - u8 page, u16 reg, u8 phy_addr, - u16 value) +enum i40e_status_code i40e_write_phy_register_clause45(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) { enum i40e_status_code status = I40E_ERR_TIMEOUT; u32 command = 0; @@ -6012,8 +6190,8 @@ enum i40e_status_code i40e_write_phy_reg command = (reg << I40E_GLGEN_MSCA_MDIADD_SHIFT) | (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_ADDRESS) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_ADDRESS_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); wr32(hw, I40E_GLGEN_MSCA(port_num), command); @@ -6037,8 +6215,8 @@ enum i40e_status_code i40e_write_phy_reg command = (page << I40E_GLGEN_MSCA_DEVADD_SHIFT) | (phy_addr << I40E_GLGEN_MSCA_PHYADD_SHIFT) | - (I40E_MDIO_OPCODE_WRITE) | - (I40E_MDIO_STCODE) | + (I40E_MDIO_CLAUSE45_OPCODE_WRITE_MASK) | + (I40E_MDIO_CLAUSE45_STCODE_MASK) | (I40E_GLGEN_MSCA_MDICMD_MASK) | (I40E_GLGEN_MSCA_MDIINPROGEN_MASK); status = I40E_ERR_TIMEOUT; @@ -6059,6 +6237,78 @@ phy_write_end: } /** + * i40e_write_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Writes value to specified PHY register + **/ +enum i40e_status_code i40e_write_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_write_phy_register_clause22(hw, + reg, phy_addr, value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_write_phy_register_clause45(hw, + page, reg, phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** + * i40e_read_phy_register + * @hw: pointer to the HW structure + * @page: registers page number + * @reg: register address in the page + * @phy_adr: PHY address on MDIO interface + * @value: PHY register value + * + * Reads specified PHY register value + **/ +enum i40e_status_code i40e_read_phy_register(struct i40e_hw *hw, + u8 page, u16 reg, u8 phy_addr, u16 *value) +{ + enum i40e_status_code status; + + switch (hw->device_id) { + case I40E_DEV_ID_1G_BASE_T_X722: + status = i40e_read_phy_register_clause22(hw, reg, phy_addr, + value); + break; + case I40E_DEV_ID_10G_BASE_T: + case I40E_DEV_ID_10G_BASE_T4: + case I40E_DEV_ID_10G_BASE_T_X722: + case I40E_DEV_ID_25G_B: + case I40E_DEV_ID_25G_SFP28: + status = i40e_read_phy_register_clause45(hw, page, reg, + phy_addr, value); + break; + default: + status = I40E_ERR_UNKNOWN_PHY; + break; + } + + return status; +} + +/** * i40e_get_phy_address * @hw: pointer to the HW structure * @dev_num: PHY port num that address we want @@ -6100,14 +6350,16 @@ enum i40e_status_code i40e_blink_phy_lin for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, led_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + &led_reg); if (status) goto phy_blinking_end; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_reg); @@ -6119,20 +6371,18 @@ enum i40e_status_code i40e_blink_phy_lin if (time > 0 && interval > 0) { for (i = 0; i < time * 1000; i += interval) { - status = i40e_read_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - &led_reg); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (led_reg & I40E_PHY_LED_MANUAL_ON) led_reg = 0; else led_reg = I40E_PHY_LED_MANUAL_ON; - status = i40e_write_phy_register(hw, - I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, - led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; i40e_msec_delay(interval); @@ -6140,8 +6390,9 @@ enum i40e_status_code i40e_blink_phy_lin } restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); phy_blinking_end: return status; @@ -6172,8 +6423,10 @@ enum i40e_status_code i40e_led_get_phy(s for (gpio_led_port = 0; gpio_led_port < 3; gpio_led_port++, temp_addr++) { - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - temp_addr, phy_addr, ®_val); + status = i40e_read_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + temp_addr, phy_addr, + ®_val); if (status) return status; *val = reg_val; @@ -6206,41 +6459,42 @@ enum i40e_status_code i40e_led_set_phy(s i = rd32(hw, I40E_PFGEN_PORTNUM); port_num = (u8)(i & I40E_PFGEN_PORTNUM_PORT_NUM_MASK); phy_addr = i40e_get_phy_address(hw, port_num); - - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) return status; led_ctl = led_reg; if (led_reg & I40E_PHY_LED_LINK_MODE_MASK) { led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, + I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, + led_reg); if (status) return status; } - status = i40e_read_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, &led_reg); + status = i40e_read_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, &led_reg); if (status) goto restore_config; if (on) led_reg = I40E_PHY_LED_MANUAL_ON; else led_reg = 0; - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, - led_addr, phy_addr, led_reg); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_reg); if (status) goto restore_config; if (mode & I40E_PHY_LED_MODE_ORIG) { led_ctl = (mode & I40E_PHY_LED_MODE_MASK); - status = i40e_write_phy_register(hw, + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, led_addr, phy_addr, led_ctl); } return status; restore_config: - status = i40e_write_phy_register(hw, I40E_PHY_COM_REG_PAGE, led_addr, - phy_addr, led_ctl); + status = i40e_write_phy_register_clause45(hw, I40E_PHY_COM_REG_PAGE, + led_addr, phy_addr, led_ctl); return status; } @@ -6485,10 +6739,13 @@ enum i40e_status_code i40e_aq_set_arp_pr i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_proxy_config); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_arp_proxy_data)); status = i40e_asq_send_command(hw, &desc, proxy_config, sizeof(struct i40e_aqc_arp_proxy_data), @@ -6519,10 +6776,13 @@ enum i40e_status_code i40e_aq_set_ns_pro i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_set_ns_proxy_table_entry); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); desc.params.external.addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); desc.params.external.addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); + desc.datalen = CPU_TO_LE16(sizeof(struct i40e_aqc_ns_proxy_data)); status = i40e_asq_send_command(hw, &desc, ns_proxy_table_entry, sizeof(struct i40e_aqc_ns_proxy_data), @@ -6569,9 +6829,11 @@ enum i40e_status_code i40e_aq_set_clear_ if (set_filter) { if (!filter) return I40E_ERR_PARAM; + cmd_flags |= I40E_AQC_SET_WOL_FILTER; - buff_len = sizeof(*filter); + cmd_flags |= I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR; } + if (no_wol_tco) cmd_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL; cmd->cmd_flags = CPU_TO_LE16(cmd_flags); @@ -6582,6 +6844,12 @@ enum i40e_status_code i40e_aq_set_clear_ valid_flags |= I40E_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID; cmd->valid_flags = CPU_TO_LE16(valid_flags); + buff_len = sizeof(*filter); + desc.datalen = CPU_TO_LE16(buff_len); + + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_BUF); + desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_RD); + cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); @@ -6618,3 +6886,24 @@ enum i40e_status_code i40e_aq_get_wake_e return status; } +/** +* i40e_aq_clear_all_wol_filters +* @hw: pointer to the hw struct +* @cmd_details: pointer to command details structure or NULL +* +* Get information for the reason of a Wake Up event +**/ +enum i40e_status_code i40e_aq_clear_all_wol_filters(struct i40e_hw *hw, + struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + + i40e_fill_default_direct_cmd_desc(&desc, + i40e_aqc_opc_clear_all_wol_filters); + + status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); + + return status; +} + Modified: stable/11/sys/dev/ixl/i40e_devids.h ============================================================================== --- stable/11/sys/dev/ixl/i40e_devids.h Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_devids.h Tue May 16 17:49:15 2017 (r318357) @@ -63,7 +63,6 @@ #define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 #define I40E_DEV_ID_SFP_I_X722 0x37D3 #define I40E_DEV_ID_X722_VF 0x37CD -#define I40E_DEV_ID_X722_VF_HV 0x37D9 #define i40e_is_40G_device(d) ((d) == I40E_DEV_ID_QSFP_A || \ (d) == I40E_DEV_ID_QSFP_B || \ Modified: stable/11/sys/dev/ixl/i40e_lan_hmc.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_lan_hmc.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_lan_hmc.c Tue May 16 17:49:15 2017 (r318357) @@ -1240,11 +1240,6 @@ enum i40e_status_code i40e_hmc_get_objec u64 obj_offset_in_fpm; u32 sd_idx, sd_lmt; - if (NULL == hmc_info) { - ret_code = I40E_ERR_BAD_PTR; - DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n"); - goto exit; - } if (NULL == hmc_info->hmc_obj) { ret_code = I40E_ERR_BAD_PTR; DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n"); Modified: stable/11/sys/dev/ixl/i40e_nvm.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_nvm.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_nvm.c Tue May 16 17:49:15 2017 (r318357) @@ -220,14 +220,14 @@ enum i40e_status_code i40e_read_nvm_word { enum i40e_status_code ret_code = I40E_SUCCESS; - if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { - ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); - if (!ret_code) { + ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ); + if (!ret_code) { + if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) { ret_code = i40e_read_nvm_word_aq(hw, offset, data); - i40e_release_nvm(hw); + } else { + ret_code = i40e_read_nvm_word_srctl(hw, offset, data); } - } else { - ret_code = i40e_read_nvm_word_srctl(hw, offset, data); + i40e_release_nvm(hw); } return ret_code; } @@ -886,9 +886,20 @@ enum i40e_status_code i40e_nvmupd_comman *((u16 *)&bytes[2]) = hw->nvm_wait_opcode; } + /* Clear error status on read */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + return I40E_SUCCESS; } + /* Clear status even it is not read and log */ + if (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) { + i40e_debug(hw, I40E_DEBUG_NVM, + "Clearing I40E_NVMUPD_STATE_ERROR state without reading\n"); + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT: status = i40e_nvmupd_state_init(hw, cmd, bytes, perrno); @@ -1247,6 +1258,11 @@ void i40e_nvmupd_check_wait_event(struct } hw->nvm_wait_opcode = 0; + if (hw->aq.arq_last_status) { + hw->nvmupd_state = I40E_NVMUPD_STATE_ERROR; + return; + } + switch (hw->nvmupd_state) { case I40E_NVMUPD_STATE_INIT_WAIT: hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; @@ -1409,7 +1425,8 @@ static enum i40e_status_code i40e_nvmupd if (hw->nvm_buff.va) { buff = hw->nvm_buff.va; - memcpy(buff, &bytes[aq_desc_len], aq_data_len); + i40e_memcpy(buff, &bytes[aq_desc_len], aq_data_len, + I40E_NONDMA_TO_NONDMA); } } @@ -1482,7 +1499,7 @@ static enum i40e_status_code i40e_nvmupd __func__, cmd->offset, cmd->offset + len); buff = ((u8 *)&hw->nvm_wb_desc) + cmd->offset; - memcpy(bytes, buff, len); + i40e_memcpy(bytes, buff, len, I40E_NONDMA_TO_NONDMA); bytes += len; remainder -= len; @@ -1496,7 +1513,7 @@ static enum i40e_status_code i40e_nvmupd i40e_debug(hw, I40E_DEBUG_NVM, "%s: databuf bytes %d to %d\n", __func__, start_byte, start_byte + remainder); - memcpy(bytes, buff, remainder); + i40e_memcpy(bytes, buff, remainder, I40E_NONDMA_TO_NONDMA); } return I40E_SUCCESS; Modified: stable/11/sys/dev/ixl/i40e_osdep.c ============================================================================== --- stable/11/sys/dev/ixl/i40e_osdep.c Tue May 16 17:35:05 2017 (r318356) +++ stable/11/sys/dev/ixl/i40e_osdep.c Tue May 16 17:49:15 2017 (r318357) @@ -189,15 +189,71 @@ void i40e_debug_shared(struct i40e_hw *hw, enum i40e_debug_mask mask, char *fmt, ...) { va_list args; + device_t dev; if (!(mask & ((struct i40e_hw *)hw)->debug_mask)) return; + dev = ((struct i40e_osdep *)hw->back)->dev; + + /* Re-implement device_printf() */ + device_print_prettyname(dev); va_start(args, fmt); - device_printf(((struct i40e_osdep *)hw->back)->dev, fmt, args); + vprintf(fmt, args); va_end(args); } +const char * +ixl_vc_opcode_str(uint16_t op) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue May 16 17:51:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F02FD706BF; Tue, 16 May 2017 17:51:32 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 454F7159; Tue, 16 May 2017 17:51:32 +0000 (UTC) (envelope-from erj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GHpVRk044805; Tue, 16 May 2017 17:51:31 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GHpVHp044803; Tue, 16 May 2017 17:51:31 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201705161751.v4GHpVHp044803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Tue, 16 May 2017 17:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318358 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 17:51:32 -0000 Author: erj Date: Tue May 16 17:51:30 2017 New Revision: 318358 URL: https://svnweb.freebsd.org/changeset/base/318358 Log: MFC r318147: Add several new media types to if_media.h These include several 25G types (for active direct attach cables and LR modules), and a missing type for 10G active direct attach. Sponsored by: Intel Corporation Modified: stable/11/sys/net/ieee8023ad_lacp.c stable/11/sys/net/if_media.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:49:15 2017 (r318357) +++ stable/11/sys/net/ieee8023ad_lacp.c Tue May 16 17:51:30 2017 (r318358) @@ -1090,6 +1090,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_10G_CR1: case IFM_10G_ER: case IFM_10G_SFI: + case IFM_10G_AOC: key = IFM_10G_LR; break; case IFM_20G_KR2: @@ -1114,6 +1115,9 @@ lacp_compose_key(struct lacp_port *lp) case IFM_25G_CR: case IFM_25G_KR: case IFM_25G_SR: + case IFM_25G_LR: + case IFM_25G_ACC: + case IFM_25G_AOC: key = IFM_25G_PCIE; break; case IFM_40G_CR4: Modified: stable/11/sys/net/if_media.h ============================================================================== --- stable/11/sys/net/if_media.h Tue May 16 17:49:15 2017 (r318357) +++ stable/11/sys/net/if_media.h Tue May 16 17:51:30 2017 (r318358) @@ -196,6 +196,10 @@ uint64_t ifmedia_baudrate(int); #define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ #define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ #define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ +#define IFM_25G_LR IFM_X(58) /* 25GBase-LR */ +#define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */ +#define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */ +#define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -447,6 +451,10 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_25G_LR, "25GBase-LR" }, \ + { IFM_10G_AOC, "10GBase-AOC" }, \ + { IFM_25G_ACC, "25GBase-ACC" }, \ + { IFM_25G_AOC, "25GBase-AOC" }, \ { 0, NULL }, \ } @@ -775,6 +783,10 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ + { IFM_ETHER | IFM_25G_AOC, IF_Gbps(25ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16, IF_Mbps(16) }, \ From owner-svn-src-stable@freebsd.org Tue May 16 18:54:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0ED8D70008; Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67656137A; Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIsPno075525; Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIsPdD075523; Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705161854.v4GIsPdD075523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 16 May 2017 18:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:54:26 -0000 Author: dim Date: Tue May 16 18:54:25 2017 New Revision: 318365 URL: https://svnweb.freebsd.org/changeset/base/318365 Log: MFC r318259: Silence a -Wunused warning about the junk variable being used to raise an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde Modified: stable/11/lib/msun/src/catrig.c stable/11/lib/msun/src/catrigf.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/msun/src/catrig.c stable/10/lib/msun/src/catrigf.c Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/msun/src/catrig.c ============================================================================== --- stable/11/lib/msun/src/catrig.c Tue May 16 18:46:56 2017 (r318364) +++ stable/11/lib/msun/src/catrig.c Tue May 16 18:54:25 2017 (r318365) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabs(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) Modified: stable/11/lib/msun/src/catrigf.c ============================================================================== --- stable/11/lib/msun/src/catrigf.c Tue May 16 18:46:56 2017 (r318364) +++ stable/11/lib/msun/src/catrigf.c Tue May 16 18:54:25 2017 (r318365) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsf(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) From owner-svn-src-stable@freebsd.org Tue May 16 18:54:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D154D7000C; Tue, 16 May 2017 18:54:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8B611383; Tue, 16 May 2017 18:54:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GIsPh2075532; Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GIsPS1075530; Tue, 16 May 2017 18:54:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201705161854.v4GIsPS1075530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 16 May 2017 18:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318365 - in stable: 10/lib/msun/src 11/lib/msun/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 18:54:27 -0000 Author: dim Date: Tue May 16 18:54:25 2017 New Revision: 318365 URL: https://svnweb.freebsd.org/changeset/base/318365 Log: MFC r318259: Silence a -Wunused warning about the junk variable being used to raise an inexact floating point exception. The variable cannot be eliminated, unfortunately, otherwise the desired addition triggering the exception will be emitted neither by clang, nor by gcc. Reviewed by: Steve Kargl, bde Modified: stable/10/lib/msun/src/catrig.c stable/10/lib/msun/src/catrigf.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/msun/src/catrig.c stable/11/lib/msun/src/catrigf.c Directory Properties: stable/11/ (props changed) Modified: stable/10/lib/msun/src/catrig.c ============================================================================== --- stable/10/lib/msun/src/catrig.c Tue May 16 18:46:56 2017 (r318364) +++ stable/10/lib/msun/src/catrig.c Tue May 16 18:54:25 2017 (r318365) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabs(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) Modified: stable/10/lib/msun/src/catrigf.c ============================================================================== --- stable/10/lib/msun/src/catrigf.c Tue May 16 18:46:56 2017 (r318364) +++ stable/10/lib/msun/src/catrigf.c Tue May 16 18:54:25 2017 (r318365) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define isinf(x) (fabsf(x) == INFINITY) #undef isnan #define isnan(x) ((x) != (x)) -#define raise_inexact() do { volatile float junk = 1 + tiny; } while(0) +#define raise_inexact() do { volatile float junk __unused = 1 + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) From owner-svn-src-stable@freebsd.org Tue May 16 19:35:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B357AD70FB6; Tue, 16 May 2017 19:35:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 834EC160B; Tue, 16 May 2017 19:35:26 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4GJZPj3092556; Tue, 16 May 2017 19:35:25 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4GJZPk0092555; Tue, 16 May 2017 19:35:25 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201705161935.v4GJZPk0092555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 16 May 2017 19:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318367 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2017 19:35:26 -0000 Author: mjg Date: Tue May 16 19:35:25 2017 New Revision: 318367 URL: https://svnweb.freebsd.org/changeset/base/318367 Log: MFC r317784: cache: stop holding the ncneg_hot lock across purging Only non-hot entries are purged so the lock is not needed in the first place. This saves one lock/unlock pair. Modified: stable/11/sys/kern/vfs_cache.c Modified: stable/11/sys/kern/vfs_cache.c ============================================================================== --- stable/11/sys/kern/vfs_cache.c Tue May 16 19:03:26 2017 (r318366) +++ stable/11/sys/kern/vfs_cache.c Tue May 16 19:35:25 2017 (r318367) @@ -735,13 +735,12 @@ cache_negative_remove(struct namecache * list_locked = true; mtx_lock(&neglist->nl_lock); } - } else { - mtx_assert(&neglist->nl_lock, MA_OWNED); - mtx_assert(&ncneg_hot.nl_lock, MA_OWNED); } if (ncp->nc_flag & NCF_HOTNEGATIVE) { + mtx_assert(&ncneg_hot.nl_lock, MA_OWNED); TAILQ_REMOVE(&ncneg_hot.nl_list, ncp, nc_dst); } else { + mtx_assert(&neglist->nl_lock, MA_OWNED); TAILQ_REMOVE(&neglist->nl_list, ncp, nc_dst); } if (list_locked) @@ -816,7 +815,6 @@ cache_negative_zap_one(void) mtx_unlock(&ncneg_hot.nl_lock); mtx_lock(dvlp); rw_wlock(blp); - mtx_lock(&ncneg_hot.nl_lock); mtx_lock(&neglist->nl_lock); ncp2 = TAILQ_FIRST(&neglist->nl_list); if (ncp != ncp2 || dvlp != VP2VNODELOCK(ncp2->nc_dvp) || @@ -830,7 +828,6 @@ cache_negative_zap_one(void) cache_zap_locked(ncp, true); out_unlock_all: mtx_unlock(&neglist->nl_lock); - mtx_unlock(&ncneg_hot.nl_lock); rw_wunlock(blp); mtx_unlock(dvlp); out: From owner-svn-src-stable@freebsd.org Wed May 17 01:38:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CABBD707B2; Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C3671263; Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1cWvQ044538; Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1cWtC044537; Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705170138.v4H1cWtC044537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 17 May 2017 01:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318390 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 01:38:33 -0000 Author: cy Date: Wed May 17 01:38:32 2017 New Revision: 318390 URL: https://svnweb.freebsd.org/changeset/base/318390 Log: MFC r318281: Separate the ipfilter function/static string from the error with a colon (:) in error messages to assist the user in parsing out the error from where or which object the error message refers to. Modified: stable/11/contrib/ipfilter/lib/ipf_perror.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/lib/ipf_perror.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/lib/ipf_perror.c ============================================================================== --- stable/11/contrib/ipfilter/lib/ipf_perror.c Wed May 17 00:34:34 2017 (r318389) +++ stable/11/contrib/ipfilter/lib/ipf_perror.c Wed May 17 01:38:32 2017 (r318390) @@ -10,7 +10,7 @@ ipf_perror(err, string) if (err == 0) fprintf(stderr, "%s\n", string); else - fprintf(stderr, "%s %s\n", string, ipf_strerror(err)); + fprintf(stderr, "%s: %s\n", string, ipf_strerror(err)); } int From owner-svn-src-stable@freebsd.org Wed May 17 01:38:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7092D707B7; Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B36C91266; Wed, 17 May 2017 01:38:33 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1cWbO044544; Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1cWEd044543; Wed, 17 May 2017 01:38:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705170138.v4H1cWEd044543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 17 May 2017 01:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318390 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 01:38:34 -0000 Author: cy Date: Wed May 17 01:38:32 2017 New Revision: 318390 URL: https://svnweb.freebsd.org/changeset/base/318390 Log: MFC r318281: Separate the ipfilter function/static string from the error with a colon (:) in error messages to assist the user in parsing out the error from where or which object the error message refers to. Modified: stable/10/contrib/ipfilter/lib/ipf_perror.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/lib/ipf_perror.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/lib/ipf_perror.c ============================================================================== --- stable/10/contrib/ipfilter/lib/ipf_perror.c Wed May 17 00:34:34 2017 (r318389) +++ stable/10/contrib/ipfilter/lib/ipf_perror.c Wed May 17 01:38:32 2017 (r318390) @@ -10,7 +10,7 @@ ipf_perror(err, string) if (err == 0) fprintf(stderr, "%s\n", string); else - fprintf(stderr, "%s %s\n", string, ipf_strerror(err)); + fprintf(stderr, "%s: %s\n", string, ipf_strerror(err)); } int From owner-svn-src-stable@freebsd.org Wed May 17 01:45:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59F2FD70AD2; Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29A2B1938; Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1jR9Z049306; Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1jRYd049305; Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705170145.v4H1jRYd049305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 17 May 2017 01:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318391 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 01:45:28 -0000 Author: cy Date: Wed May 17 01:45:26 2017 New Revision: 318391 URL: https://svnweb.freebsd.org/changeset/base/318391 Log: MFC r318283: As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no need to put a colon (:) in the message string. Modified: stable/11/contrib/ipfilter/lib/printhash_live.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/ipfilter/lib/printhash_live.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/ipfilter/lib/printhash_live.c ============================================================================== --- stable/11/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:38:32 2017 (r318390) +++ stable/11/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:45:26 2017 (r318391) @@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field printed++; } if (last == 0) - ipferror(fd, "walking hash nodes:"); + ipferror(fd, "walking hash nodes"); if (printed == 0) putchar(';'); From owner-svn-src-stable@freebsd.org Wed May 17 01:45:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93803D70AD6; Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 632E61939; Wed, 17 May 2017 01:45:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1jRqq049312; Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1jR8R049311; Wed, 17 May 2017 01:45:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201705170145.v4H1jR8R049311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 17 May 2017 01:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318391 - in stable: 10/contrib/ipfilter/lib 11/contrib/ipfilter/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 01:45:28 -0000 Author: cy Date: Wed May 17 01:45:26 2017 New Revision: 318391 URL: https://svnweb.freebsd.org/changeset/base/318391 Log: MFC r318283: As of r318281 in HEAD (r318390 [in stable/10 & stable/11]), there is no need to put a colon (:) in the message string. Modified: stable/10/contrib/ipfilter/lib/printhash_live.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ipfilter/lib/printhash_live.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/ipfilter/lib/printhash_live.c ============================================================================== --- stable/10/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:38:32 2017 (r318390) +++ stable/10/contrib/ipfilter/lib/printhash_live.c Wed May 17 01:45:26 2017 (r318391) @@ -59,7 +59,7 @@ printhash_live(hp, fd, name, opts, field printed++; } if (last == 0) - ipferror(fd, "walking hash nodes:"); + ipferror(fd, "walking hash nodes"); if (printed == 0) putchar(';'); From owner-svn-src-stable@freebsd.org Wed May 17 01:48:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D6F5D70BDC; Wed, 17 May 2017 01:48:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61C401C06; Wed, 17 May 2017 01:48:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H1mjD4049999; Wed, 17 May 2017 01:48:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H1mien049988; Wed, 17 May 2017 01:48:44 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705170148.v4H1mien049988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 17 May 2017 01:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318392 - in stable/11/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 01:48:46 -0000 Author: sephe Date: Wed May 17 01:48:44 2017 New Revision: 318392 URL: https://svnweb.freebsd.org/changeset/base/318392 Log: MFC 318136 hyperv/vmbus: Reorganize vmbus device tree For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V. For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V. The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility. Device tree structure is suggested by jhb@. Tested-by: dexuan@ Collabrated-wth: dexuan@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 Added: stable/11/sys/dev/acpica/acpi_container.c - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c stable/11/sys/dev/hyperv/vmbus/vmbus_res.c - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c Modified: stable/11/sys/conf/files stable/11/sys/conf/files.amd64 stable/11/sys/conf/files.i386 stable/11/sys/dev/acpica/acpi_pcib_acpi.c stable/11/sys/dev/hyperv/vmbus/vmbus.c stable/11/sys/modules/hyperv/vmbus/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/conf/files Wed May 17 01:48:44 2017 (r318392) @@ -664,6 +664,7 @@ dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi +dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi Modified: stable/11/sys/conf/files.amd64 ============================================================================== --- stable/11/sys/conf/files.amd64 Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/conf/files.amd64 Wed May 17 01:48:44 2017 (r318392) @@ -317,6 +317,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv Modified: stable/11/sys/conf/files.i386 ============================================================================== --- stable/11/sys/conf/files.i386 Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/conf/files.i386 Wed May 17 01:48:44 2017 (r318392) @@ -267,6 +267,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv Copied: stable/11/sys/dev/acpica/acpi_container.c (from r318136, head/sys/dev/acpica/acpi_container.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/dev/acpica/acpi_container.c Wed May 17 01:48:44 2017 (r318392, copy of r318136, head/sys/dev/acpica/acpi_container.c) @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 2017 Microsoft 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 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" + +ACPI_MODULE_NAME("CONTAINER") + +static int acpi_syscont_probe(device_t); +static int acpi_syscont_attach(device_t); +static int acpi_syscont_detach(device_t); +static int acpi_syscont_alloc_msi(device_t, device_t, + int count, int maxcount, int *irqs); +static int acpi_syscont_release_msi(device_t bus, device_t dev, + int count, int *irqs); +static int acpi_syscont_alloc_msix(device_t bus, device_t dev, + int *irq); +static int acpi_syscont_release_msix(device_t bus, device_t dev, + int irq); +static int acpi_syscont_map_msi(device_t bus, device_t dev, + int irq, uint64_t *addr, uint32_t *data); + +static device_method_t acpi_syscont_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_syscont_probe), + DEVMETHOD(device_attach, acpi_syscont_attach), + DEVMETHOD(device_detach, acpi_syscont_detach), + + /* Bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, bus_generic_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), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, acpi_syscont_alloc_msi), + DEVMETHOD(pcib_release_msi, acpi_syscont_release_msi), + DEVMETHOD(pcib_alloc_msix, acpi_syscont_alloc_msix), + DEVMETHOD(pcib_release_msix, acpi_syscont_release_msix), + DEVMETHOD(pcib_map_msi, acpi_syscont_map_msi), + + DEVMETHOD_END +}; + +static driver_t acpi_syscont_driver = { + "acpi_syscontainer", + acpi_syscont_methods, + 0, +}; + +static devclass_t acpi_syscont_devclass; + +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver, + acpi_syscont_devclass, NULL, NULL); +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1); + +static int +acpi_syscont_probe(device_t dev) +{ + static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL }; + + if (acpi_disabled("syscontainer") || + ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL) + return (ENXIO); + + device_set_desc(dev, "System Container"); + return (BUS_PROBE_DEFAULT); +} + +static int +acpi_syscont_attach(device_t dev) +{ + + bus_generic_probe(dev); + return (bus_generic_attach(dev)); +} + +static int +acpi_syscont_detach(device_t dev) +{ + + return (bus_generic_detach(dev)); +} + +static int +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount, + int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount, + irqs)); +} + +static int +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs)); +} + +static int +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_release_msix(device_t bus, device_t dev, int irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, + uint32_t *data) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data)); +} Modified: stable/11/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_pcib_acpi.c Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/dev/acpica/acpi_pcib_acpi.c Wed May 17 01:48:44 2017 (r318392) @@ -519,6 +519,7 @@ acpi_pcib_acpi_attach(device_t dev) acpi_pcib_fetch_prt(dev, &sc->ap_prt); + bus_generic_probe(dev); if (device_add_child(dev, "pci", -1) == NULL) { device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); #if defined(NEW_PCIB) && defined(PCI_RES_BUS) Modified: stable/11/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- stable/11/sys/dev/hyperv/vmbus/vmbus.c Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/dev/hyperv/vmbus/vmbus.c Wed May 17 01:48:44 2017 (r318392) @@ -71,6 +71,7 @@ struct vmbus_msghc { struct hypercall_postmsg_in mh_inprm_save; }; +static void vmbus_identify(driver_t *, device_t); static int vmbus_probe(device_t); static int vmbus_attach(device_t); static int vmbus_detach(device_t); @@ -144,6 +145,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP static device_method_t vmbus_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, vmbus_identify), DEVMETHOD(device_probe, vmbus_probe), DEVMETHOD(device_attach, vmbus_attach), DEVMETHOD(device_detach, vmbus_detach), @@ -190,7 +192,10 @@ static driver_t vmbus_driver = { static devclass_t vmbus_devclass; -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass, + NULL, NULL); + MODULE_DEPEND(vmbus, acpi, 1, 1, 1); MODULE_DEPEND(vmbus, pci, 1, 1, 1); MODULE_VERSION(vmbus, 1); @@ -1066,43 +1071,41 @@ vmbus_alloc_resource(device_t dev, devic return (res); } -static device_t -get_nexus(device_t vmbus) -{ - device_t acpi = device_get_parent(vmbus); - device_t nexus = device_get_parent(acpi); - return (nexus); -} - static int vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) { - return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs)); + + return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, + irqs)); } static int vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs) { - return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs)); + + return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs)); } static int vmbus_alloc_msix(device_t bus, device_t dev, int *irq) { - return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_release_msix(device_t bus, device_t dev, int irq) { - return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data)); + + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static uint32_t @@ -1216,36 +1219,44 @@ vmbus_get_crs(device_t dev, device_t vmb static void vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass) { - device_t acpi0, pcib0 = NULL; - device_t *children; - int i, count; - - /* Try to find _CRS on VMBus device */ - vmbus_get_crs(dev, dev, pass); - - /* Try to find _CRS on VMBus device's parent */ - acpi0 = device_get_parent(dev); - vmbus_get_crs(acpi0, dev, pass); + device_t acpi0, parent; - /* Try to locate pcib0 and find _CRS on it */ - if (device_get_children(acpi0, &children, &count) != 0) - return; + parent = device_get_parent(dev); - for (i = 0; i < count; i++) { - if (!device_is_attached(children[i])) - continue; + acpi0 = device_get_parent(parent); + if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) { + device_t *children; + int count; - if (strcmp("pcib0", device_get_nameunit(children[i]))) - continue; + /* + * Try to locate VMBUS resources and find _CRS on them. + */ + if (device_get_children(acpi0, &children, &count) == 0) { + int i; - pcib0 = children[i]; - break; - } + for (i = 0; i < count; ++i) { + if (!device_is_attached(children[i])) + continue; + + if (strcmp("vmbus_res", + device_get_name(children[i])) == 0) + vmbus_get_crs(children[i], dev, pass); + } + free(children, M_TEMP); + } - if (pcib0) - vmbus_get_crs(pcib0, dev, pass); + /* + * Try to find _CRS on acpi. + */ + vmbus_get_crs(acpi0, dev, pass); + } else { + device_printf(dev, "not grandchild of acpi\n"); + } - free(children, M_TEMP); + /* + * Try to find _CRS on parent. + */ + vmbus_get_crs(parent, dev, pass); } static void @@ -1275,18 +1286,25 @@ vmbus_free_mmio_res(device_t dev) } #endif /* NEW_PCIB */ +static void +vmbus_identify(driver_t *driver, device_t parent) +{ + + if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return; + device_add_child(parent, "vmbus", -1); +} + static int vmbus_probe(device_t dev) { - char *id[] = { "VMBUS", NULL }; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || - device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) return (ENXIO); device_set_desc(dev, "Hyper-V Vmbus"); - return (BUS_PROBE_DEFAULT); } Copied: stable/11/sys/dev/hyperv/vmbus/vmbus_res.c (from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/dev/hyperv/vmbus/vmbus_res.c Wed May 17 01:48:44 2017 (r318392, copy of r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2017 Microsoft 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 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +#include "acpi_if.h" +#include "bus_if.h" + +static int vmbus_res_probe(device_t); +static int vmbus_res_attach(device_t); +static int vmbus_res_detach(device_t); + +static device_method_t vmbus_res_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_res_probe), + DEVMETHOD(device_attach, vmbus_res_attach), + DEVMETHOD(device_detach, vmbus_res_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + DEVMETHOD_END +}; + +static driver_t vmbus_res_driver = { + "vmbus_res", + vmbus_res_methods, + 1 +}; + +static devclass_t vmbus_res_devclass; + +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass, + NULL, NULL); +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1); +MODULE_VERSION(vmbus_res, 1); + +static int +vmbus_res_probe(device_t dev) +{ + char *id[] = { "VMBUS", NULL }; + + if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || + device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return (ENXIO); + + device_set_desc(dev, "Hyper-V Vmbus Resource"); + return (BUS_PROBE_DEFAULT); +} + +static int +vmbus_res_attach(device_t dev __unused) +{ + + return (0); +} + +static int +vmbus_res_detach(device_t dev __unused) +{ + + return (0); +} Modified: stable/11/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- stable/11/sys/modules/hyperv/vmbus/Makefile Wed May 17 01:45:26 2017 (r318391) +++ stable/11/sys/modules/hyperv/vmbus/Makefile Wed May 17 01:48:44 2017 (r318392) @@ -12,6 +12,7 @@ SRCS= hyperv.c \ vmbus_chan.c \ vmbus_et.c \ vmbus_if.c \ + vmbus_res.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h From owner-svn-src-stable@freebsd.org Wed May 17 02:40:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47FA0D6DBBD; Wed, 17 May 2017 02:40:08 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 117FB16BB; Wed, 17 May 2017 02:40:07 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H2e7Aq073395; Wed, 17 May 2017 02:40:07 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H2e6Ce073386; Wed, 17 May 2017 02:40:06 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705170240.v4H2e6Ce073386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 17 May 2017 02:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318393 - in stable/10/sys: conf dev/acpica dev/hyperv/vmbus modules/hyperv/vmbus X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 02:40:08 -0000 Author: sephe Date: Wed May 17 02:40:06 2017 New Revision: 318393 URL: https://svnweb.freebsd.org/changeset/base/318393 Log: MFC 318136 hyperv/vmbus: Reorganize vmbus device tree For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V. For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V. The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility. Device tree structure is suggested by jhb@. Tested-by: dexuan@ Collabrated-wth: dexuan@ Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 Added: stable/10/sys/dev/acpica/acpi_container.c - copied unchanged from r318136, head/sys/dev/acpica/acpi_container.c stable/10/sys/dev/hyperv/vmbus/vmbus_res.c - copied unchanged from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c Modified: stable/10/sys/conf/files stable/10/sys/conf/files.amd64 stable/10/sys/conf/files.i386 stable/10/sys/dev/acpica/acpi_pcib_acpi.c stable/10/sys/dev/hyperv/vmbus/vmbus.c stable/10/sys/modules/hyperv/vmbus/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/conf/files Wed May 17 02:40:06 2017 (r318393) @@ -617,6 +617,7 @@ dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi +dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi Modified: stable/10/sys/conf/files.amd64 ============================================================================== --- stable/10/sys/conf/files.amd64 Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/conf/files.amd64 Wed May 17 02:40:06 2017 (r318393) @@ -281,6 +281,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/amd64/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/amd64/vmbus_vector.S optional hyperv Modified: stable/10/sys/conf/files.i386 ============================================================================== --- stable/10/sys/conf/files.i386 Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/conf/files.i386 Wed May 17 02:40:06 2017 (r318393) @@ -256,6 +256,7 @@ dev/hyperv/vmbus/vmbus_br.c optional dev/hyperv/vmbus/vmbus_chan.c optional hyperv dev/hyperv/vmbus/vmbus_et.c optional hyperv dev/hyperv/vmbus/vmbus_if.m optional hyperv +dev/hyperv/vmbus/vmbus_res.c optional hyperv dev/hyperv/vmbus/vmbus_xact.c optional hyperv dev/hyperv/vmbus/i386/hyperv_machdep.c optional hyperv dev/hyperv/vmbus/i386/vmbus_vector.S optional hyperv Copied: stable/10/sys/dev/acpica/acpi_container.c (from r318136, head/sys/dev/acpica/acpi_container.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/acpica/acpi_container.c Wed May 17 02:40:06 2017 (r318393, copy of r318136, head/sys/dev/acpica/acpi_container.c) @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 2017 Microsoft 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 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include "pcib_if.h" + +ACPI_MODULE_NAME("CONTAINER") + +static int acpi_syscont_probe(device_t); +static int acpi_syscont_attach(device_t); +static int acpi_syscont_detach(device_t); +static int acpi_syscont_alloc_msi(device_t, device_t, + int count, int maxcount, int *irqs); +static int acpi_syscont_release_msi(device_t bus, device_t dev, + int count, int *irqs); +static int acpi_syscont_alloc_msix(device_t bus, device_t dev, + int *irq); +static int acpi_syscont_release_msix(device_t bus, device_t dev, + int irq); +static int acpi_syscont_map_msi(device_t bus, device_t dev, + int irq, uint64_t *addr, uint32_t *data); + +static device_method_t acpi_syscont_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_syscont_probe), + DEVMETHOD(device_attach, acpi_syscont_attach), + DEVMETHOD(device_detach, acpi_syscont_detach), + + /* Bus interface */ + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_alloc_resource, bus_generic_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), +#if __FreeBSD_version >= 1100000 + DEVMETHOD(bus_get_cpus, bus_generic_get_cpus), +#endif + + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, acpi_syscont_alloc_msi), + DEVMETHOD(pcib_release_msi, acpi_syscont_release_msi), + DEVMETHOD(pcib_alloc_msix, acpi_syscont_alloc_msix), + DEVMETHOD(pcib_release_msix, acpi_syscont_release_msix), + DEVMETHOD(pcib_map_msi, acpi_syscont_map_msi), + + DEVMETHOD_END +}; + +static driver_t acpi_syscont_driver = { + "acpi_syscontainer", + acpi_syscont_methods, + 0, +}; + +static devclass_t acpi_syscont_devclass; + +DRIVER_MODULE(acpi_syscontainer, acpi, acpi_syscont_driver, + acpi_syscont_devclass, NULL, NULL); +MODULE_DEPEND(acpi_syscontainer, acpi, 1, 1, 1); + +static int +acpi_syscont_probe(device_t dev) +{ + static char *syscont_ids[] = { "ACPI0004", "PNP0A05", "PNP0A06", NULL }; + + if (acpi_disabled("syscontainer") || + ACPI_ID_PROBE(device_get_parent(dev), dev, syscont_ids) == NULL) + return (ENXIO); + + device_set_desc(dev, "System Container"); + return (BUS_PROBE_DEFAULT); +} + +static int +acpi_syscont_attach(device_t dev) +{ + + bus_generic_probe(dev); + return (bus_generic_attach(dev)); +} + +static int +acpi_syscont_detach(device_t dev) +{ + + return (bus_generic_detach(dev)); +} + +static int +acpi_syscont_alloc_msi(device_t bus, device_t dev, int count, int maxcount, + int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSI(device_get_parent(parent), dev, count, maxcount, + irqs)); +} + +static int +acpi_syscont_release_msi(device_t bus, device_t dev, int count, int *irqs) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSI(device_get_parent(parent), dev, count, irqs)); +} + +static int +acpi_syscont_alloc_msix(device_t bus, device_t dev, int *irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_ALLOC_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_release_msix(device_t bus, device_t dev, int irq) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_RELEASE_MSIX(device_get_parent(parent), dev, irq)); +} + +static int +acpi_syscont_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, + uint32_t *data) +{ + device_t parent = device_get_parent(bus); + + return (PCIB_MAP_MSI(device_get_parent(parent), dev, irq, addr, data)); +} Modified: stable/10/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi_pcib_acpi.c Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/dev/acpica/acpi_pcib_acpi.c Wed May 17 02:40:06 2017 (r318393) @@ -509,6 +509,7 @@ acpi_pcib_acpi_attach(device_t dev) if (sc->ap_segment == 0 && sc->ap_bus == 0) bus0_seen = 1; + bus_generic_probe(dev); return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus)); } Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/vmbus.c Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/dev/hyperv/vmbus/vmbus.c Wed May 17 02:40:06 2017 (r318393) @@ -73,6 +73,7 @@ struct vmbus_msghc { struct hypercall_postmsg_in mh_inprm_save; }; +static void vmbus_identify(driver_t *, device_t); static int vmbus_probe(device_t); static int vmbus_attach(device_t); static int vmbus_detach(device_t); @@ -143,6 +144,7 @@ vmbus_chanmsg_handlers[VMBUS_CHANMSG_TYP static device_method_t vmbus_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, vmbus_identify), DEVMETHOD(device_probe, vmbus_probe), DEVMETHOD(device_attach, vmbus_attach), DEVMETHOD(device_detach, vmbus_detach), @@ -189,7 +191,10 @@ static driver_t vmbus_driver = { static devclass_t vmbus_devclass; -DRIVER_MODULE(vmbus, acpi, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, pcib, vmbus_driver, vmbus_devclass, NULL, NULL); +DRIVER_MODULE(vmbus, acpi_syscontainer, vmbus_driver, vmbus_devclass, + NULL, NULL); + MODULE_DEPEND(vmbus, acpi, 1, 1, 1); MODULE_DEPEND(vmbus, pci, 1, 1, 1); MODULE_VERSION(vmbus, 1); @@ -1145,43 +1150,41 @@ vmbus_alloc_resource(device_t dev, devic return (res); } -static device_t -get_nexus(device_t vmbus) -{ - device_t acpi = device_get_parent(vmbus); - device_t nexus = device_get_parent(acpi); - return (nexus); -} - static int vmbus_alloc_msi(device_t bus, device_t dev, int count, int maxcount, int *irqs) { - return (PCIB_ALLOC_MSI(get_nexus(bus), dev, count, maxcount, irqs)); + + return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, + irqs)); } static int vmbus_release_msi(device_t bus, device_t dev, int count, int *irqs) { - return (PCIB_RELEASE_MSI(get_nexus(bus), dev, count, irqs)); + + return (PCIB_RELEASE_MSI(device_get_parent(bus), dev, count, irqs)); } static int vmbus_alloc_msix(device_t bus, device_t dev, int *irq) { - return (PCIB_ALLOC_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_release_msix(device_t bus, device_t dev, int irq) { - return (PCIB_RELEASE_MSIX(get_nexus(bus), dev, irq)); + + return (PCIB_RELEASE_MSIX(device_get_parent(bus), dev, irq)); } static int vmbus_map_msi(device_t bus, device_t dev, int irq, uint64_t *addr, uint32_t *data) { - return (PCIB_MAP_MSI(get_nexus(bus), dev, irq, addr, data)); + + return (PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data)); } static uint32_t @@ -1295,36 +1298,44 @@ vmbus_get_crs(device_t dev, device_t vmb static void vmbus_get_mmio_res_pass(device_t dev, enum parse_pass pass) { - device_t acpi0, pcib0 = NULL; - device_t *children; - int i, count; - - /* Try to find _CRS on VMBus device */ - vmbus_get_crs(dev, dev, pass); - - /* Try to find _CRS on VMBus device's parent */ - acpi0 = device_get_parent(dev); - vmbus_get_crs(acpi0, dev, pass); + device_t acpi0, parent; - /* Try to locate pcib0 and find _CRS on it */ - if (device_get_children(acpi0, &children, &count) != 0) - return; + parent = device_get_parent(dev); - for (i = 0; i < count; i++) { - if (!device_is_attached(children[i])) - continue; + acpi0 = device_get_parent(parent); + if (strcmp("acpi0", device_get_nameunit(acpi0)) == 0) { + device_t *children; + int count; - if (strcmp("pcib0", device_get_nameunit(children[i]))) - continue; + /* + * Try to locate VMBUS resources and find _CRS on them. + */ + if (device_get_children(acpi0, &children, &count) == 0) { + int i; - pcib0 = children[i]; - break; - } + for (i = 0; i < count; ++i) { + if (!device_is_attached(children[i])) + continue; + + if (strcmp("vmbus_res", + device_get_name(children[i])) == 0) + vmbus_get_crs(children[i], dev, pass); + } + free(children, M_TEMP); + } - if (pcib0) - vmbus_get_crs(pcib0, dev, pass); + /* + * Try to find _CRS on acpi. + */ + vmbus_get_crs(acpi0, dev, pass); + } else { + device_printf(dev, "not grandchild of acpi\n"); + } - free(children, M_TEMP); + /* + * Try to find _CRS on parent. + */ + vmbus_get_crs(parent, dev, pass); } static void @@ -1354,18 +1365,25 @@ vmbus_free_mmio_res(device_t dev) } #endif /* NEW_PCIB */ +static void +vmbus_identify(driver_t *driver, device_t parent) +{ + + if (device_get_unit(parent) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return; + device_add_child(parent, "vmbus", -1); +} + static int vmbus_probe(device_t dev) { - char *id[] = { "VMBUS", NULL }; - if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || - device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + if (device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) return (ENXIO); device_set_desc(dev, "Hyper-V Vmbus"); - return (BUS_PROBE_DEFAULT); } Copied: stable/10/sys/dev/hyperv/vmbus/vmbus_res.c (from r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/hyperv/vmbus/vmbus_res.c Wed May 17 02:40:06 2017 (r318393, copy of r318136, head/sys/dev/hyperv/vmbus/vmbus_res.c) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2017 Microsoft 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 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 ``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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +#include "acpi_if.h" +#include "bus_if.h" + +static int vmbus_res_probe(device_t); +static int vmbus_res_attach(device_t); +static int vmbus_res_detach(device_t); + +static device_method_t vmbus_res_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, vmbus_res_probe), + DEVMETHOD(device_attach, vmbus_res_attach), + DEVMETHOD(device_detach, vmbus_res_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + DEVMETHOD_END +}; + +static driver_t vmbus_res_driver = { + "vmbus_res", + vmbus_res_methods, + 1 +}; + +static devclass_t vmbus_res_devclass; + +DRIVER_MODULE(vmbus_res, acpi, vmbus_res_driver, vmbus_res_devclass, + NULL, NULL); +MODULE_DEPEND(vmbus_res, acpi, 1, 1, 1); +MODULE_VERSION(vmbus_res, 1); + +static int +vmbus_res_probe(device_t dev) +{ + char *id[] = { "VMBUS", NULL }; + + if (ACPI_ID_PROBE(device_get_parent(dev), dev, id) == NULL || + device_get_unit(dev) != 0 || vm_guest != VM_GUEST_HV || + (hyperv_features & CPUID_HV_MSR_SYNIC) == 0) + return (ENXIO); + + device_set_desc(dev, "Hyper-V Vmbus Resource"); + return (BUS_PROBE_DEFAULT); +} + +static int +vmbus_res_attach(device_t dev __unused) +{ + + return (0); +} + +static int +vmbus_res_detach(device_t dev __unused) +{ + + return (0); +} Modified: stable/10/sys/modules/hyperv/vmbus/Makefile ============================================================================== --- stable/10/sys/modules/hyperv/vmbus/Makefile Wed May 17 01:48:44 2017 (r318392) +++ stable/10/sys/modules/hyperv/vmbus/Makefile Wed May 17 02:40:06 2017 (r318393) @@ -12,6 +12,7 @@ SRCS= hyperv.c \ vmbus_chan.c \ vmbus_et.c \ vmbus_if.c \ + vmbus_res.c \ vmbus_xact.c SRCS+= acpi_if.h bus_if.h device_if.h opt_acpi.h pci_if.h pcib_if.h vmbus_if.h From owner-svn-src-stable@freebsd.org Wed May 17 05:21:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BB28D7095C; Wed, 17 May 2017 05:21:05 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06E21980; Wed, 17 May 2017 05:21:04 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5L4Ad039034; Wed, 17 May 2017 05:21:04 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5L34Y039031; Wed, 17 May 2017 05:21:03 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201705170521.v4H5L34Y039031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 17 May 2017 05:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318394 - in stable/11: sbin/geom/class/label sys/geom/part X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 05:21:05 -0000 Author: araujo Date: Wed May 17 05:21:03 2017 New Revision: 318394 URL: https://svnweb.freebsd.org/changeset/base/318394 Log: MFC r315112, r315196 r315112: Add the capability to refresh the gpart(8) label without need a reboot. gpart(8) has functionality to change the label of an GPT partition. This functionality works like it should, however, after a label change the /dev/gpt/ entries remain unchanged. glabel(8) status output remains unchanged. The change only takes effect after a reboot. PR: 162690 Submitted by: sub.mesa@gmail, Ben RUBSON , ae Reviewed by: allanjude, bapt, bcr Differential Revision: https://reviews.freebsd.org/D9935 r315196: After r315112 I broke the tests with eli, instead to pass 0, I should pass M_NOWAIT to g_media_changed() that will call g_post_event() with this flag. Reported by: lwhsu, ngie and ae Modified: stable/11/sbin/geom/class/label/geom_label.c stable/11/sbin/geom/class/label/glabel.8 stable/11/sys/geom/part/g_part.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/geom/class/label/geom_label.c ============================================================================== --- stable/11/sbin/geom/class/label/geom_label.c Wed May 17 02:40:06 2017 (r318393) +++ stable/11/sbin/geom/class/label/geom_label.c Wed May 17 05:21:03 2017 (r318394) @@ -53,6 +53,7 @@ static void label_main(struct gctl_req * static void label_clear(struct gctl_req *req); static void label_dump(struct gctl_req *req); static void label_label(struct gctl_req *req); +static void label_refresh(struct gctl_req *req); struct g_command PUBSYM(class_commands)[] = { { "clear", G_FLAG_VERBOSE, label_main, G_NULL_OPTS, @@ -74,6 +75,9 @@ struct g_command PUBSYM(class_commands)[ { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, label_main, G_NULL_OPTS, "[-v] name dev" }, + { "refresh", 0, label_main, G_NULL_OPTS, + "dev ..." + }, { "stop", G_FLAG_VERBOSE, NULL, { { 'f', "force", NULL, G_TYPE_BOOL }, @@ -105,6 +109,8 @@ label_main(struct gctl_req *req, unsigne label_clear(req); else if (strcmp(name, "dump") == 0) label_dump(req); + else if (strcmp(name, "refresh") == 0) + label_refresh(req); else gctl_error(req, "Unknown command: %s.", name); } @@ -223,3 +229,28 @@ label_dump(struct gctl_req *req) printf("\n"); } } + +static void +label_refresh(struct gctl_req *req) +{ + const char *name; + int i, nargs, fd; + + nargs = gctl_get_int(req, "nargs"); + if (nargs < 1) { + gctl_error(req, "Too few arguments."); + return; + } + + for (i = 0; i < nargs; i++) { + name = gctl_get_ascii(req, "arg%d", i); + fd = g_open(name, 1); + if (fd == -1) { + printf("Can't refresh metadata from %s: %s.\n", + name, strerror(errno)); + } else { + printf("Metadata from %s refreshed.\n", name); + (void)g_close(fd); + } + } +} Modified: stable/11/sbin/geom/class/label/glabel.8 ============================================================================== --- stable/11/sbin/geom/class/label/glabel.8 Wed May 17 02:40:06 2017 (r318393) +++ stable/11/sbin/geom/class/label/glabel.8 Wed May 17 05:21:03 2017 (r318394) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 22, 2013 +.Dd March 12, 2017 .Dt GLABEL 8 .Os .Sh NAME @@ -57,6 +57,9 @@ .Cm dump .Ar dev ... .Nm +.Cm refresh +.Ar dev ... +.Nm .Cm list .Nm .Cm status @@ -186,6 +189,8 @@ Same as Clear metadata on the given devices. .It Cm dump Dump metadata stored on the given devices. +.It Cm refresh +Refresh / rediscover metadata from the given devices. .It Cm list See .Xr geom 8 . Modified: stable/11/sys/geom/part/g_part.c ============================================================================== --- stable/11/sys/geom/part/g_part.c Wed May 17 02:40:06 2017 (r318393) +++ stable/11/sys/geom/part/g_part.c Wed May 17 05:21:03 2017 (r318394) @@ -884,6 +884,10 @@ g_part_ctl_commit(struct gctl_req *req, LIST_FOREACH_SAFE(entry, &table->gpt_entry, gpe_entry, tmp) { if (!entry->gpe_deleted) { + /* Notify consumers that provider might be changed. */ + if (entry->gpe_modified && ( + entry->gpe_pp->acw + entry->gpe_pp->ace) == 0) + g_media_changed(entry->gpe_pp, M_NOWAIT); entry->gpe_created = 0; entry->gpe_modified = 0; continue; From owner-svn-src-stable@freebsd.org Wed May 17 05:28:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B76D70A11; Wed, 17 May 2017 05:28:18 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41D3AD40; Wed, 17 May 2017 05:28:18 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5SHm3042943; Wed, 17 May 2017 05:28:17 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5SHRl042942; Wed, 17 May 2017 05:28:17 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201705170528.v4H5SHRl042942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 17 May 2017 05:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318395 - stable/11/usr.sbin/fdread X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 05:28:18 -0000 Author: araujo Date: Wed May 17 05:28:16 2017 New Revision: 318395 URL: https://svnweb.freebsd.org/changeset/base/318395 Log: MFC r317742: Free the memory allocated to trackbuf before exiting, it might fix a potential memory leak. Submitted by: trix@juniper.net Differential Revision: https://reviews.freebsd.org/D9856 Modified: stable/11/usr.sbin/fdread/fdread.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fdread/fdread.c ============================================================================== --- stable/11/usr.sbin/fdread/fdread.c Wed May 17 05:21:03 2017 (r318394) +++ stable/11/usr.sbin/fdread/fdread.c Wed May 17 05:28:16 2017 (r318395) @@ -184,6 +184,7 @@ doread(int fd, FILE *of, const char *_de if (rv == 0) { /* EOF? */ warnx("premature EOF after %u bytes", nbytes); + free(trackbuf); return (EX_OK); } if ((unsigned)rv == tracksize) { @@ -215,6 +216,7 @@ doread(int fd, FILE *of, const char *_de if (!quiet) putc('\n', stderr); perror("non-IO error"); + free(trackbuf); return (EX_OSERR); } if (ioctl(fd, FD_GSTAT, &fdcs) == -1) @@ -233,6 +235,7 @@ doread(int fd, FILE *of, const char *_de if (!recover) { if (!quiet) putc('\n', stderr); + free(trackbuf); return (EX_IOERR); } memset(trackbuf, fillbyte, secsize); @@ -284,6 +287,7 @@ doread(int fd, FILE *of, const char *_de continue; } } + free(trackbuf); if (!quiet) { putc('\n', stderr); if (nerrs) From owner-svn-src-stable@freebsd.org Wed May 17 05:47:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52E99D6E054; Wed, 17 May 2017 05:47:32 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2FF071650; Wed, 17 May 2017 05:47:32 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5lVQm051165; Wed, 17 May 2017 05:47:31 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5lVw2051164; Wed, 17 May 2017 05:47:31 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201705170547.v4H5lVw2051164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 17 May 2017 05:47:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318396 - stable/11/usr.sbin/bsdinstall/partedit X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 05:47:32 -0000 Author: araujo Date: Wed May 17 05:47:31 2017 New Revision: 318396 URL: https://svnweb.freebsd.org/changeset/base/318396 Log: MFC r317743: Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9942 Modified: stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed May 17 05:28:16 2017 (r318395) +++ stable/11/usr.sbin/bsdinstall/partedit/gpart_ops.c Wed May 17 05:47:31 2017 (r318396) @@ -101,14 +101,14 @@ newfs_command(const char *fstype, char * if (!use_default) { int choice; choice = dlg_checklist("UFS Options", "", 0, 0, 0, - sizeof(items)/sizeof(items[0]), items, NULL, + nitems(items), items, NULL, FLAG_CHECK, &i); if (choice == 1) /* Cancel */ return; } strcpy(command, "newfs "); - for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "UFS1") == 0) @@ -139,7 +139,7 @@ newfs_command(const char *fstype, char * if (!use_default) { int choice; choice = dlg_checklist("ZFS Options", "", 0, 0, 0, - sizeof(items)/sizeof(items[0]), items, NULL, + nitems(items), items, NULL, FLAG_CHECK, &i); if (choice == 1) /* Cancel */ return; @@ -155,7 +155,7 @@ newfs_command(const char *fstype, char * sprintf(command, "%s -o cachefile=%s/zpool.cache ", command, zfsboot_path); } - for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "fletcher4") == 0) @@ -181,14 +181,14 @@ newfs_command(const char *fstype, char * if (!use_default) { int choice; choice = dlg_checklist("FAT Options", "", 0, 0, 0, - sizeof(items)/sizeof(items[0]), items, NULL, + nitems(items), items, NULL, FLAG_RADIO, &i); if (choice == 1) /* Cancel */ return; } strcpy(command, "newfs_msdos "); - for (i = 0; i < (int)(sizeof(items)/sizeof(items[0])); i++) { + for (i = 0; i < (int)nitems(items); i++) { if (items[i].state == 0) continue; if (strcmp(items[i].name, "FAT32") == 0) @@ -231,7 +231,7 @@ parttypemenu: dialog_vars.default_item = __DECONST(char *, def_scheme); cancel = dlg_menu("Partition Scheme", "Select a partition scheme for this volume:", 0, 0, 0, - sizeof(items) / sizeof(items[0]), items, &choice, NULL); + nitems(items), items, &choice, NULL); dialog_vars.default_item = NULL; if (cancel) @@ -653,7 +653,7 @@ endedit: "freebsd") == 0) gpart_partition(pp->lg_name, "BSD"); - for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) + for (i = 0; i < nitems(items); i++) if (items[i].text_free) free(items[i].text); } @@ -1191,7 +1191,7 @@ addpartform: set_default_part_metadata(newpartname, scheme, items[0].text, items[2].text, newfs); - for (i = 0; i < (sizeof(items) / sizeof(items[0])); i++) + for (i = 0; i < nitems(items); i++) if (items[i].text_free) free(items[i].text); From owner-svn-src-stable@freebsd.org Wed May 17 05:53:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 147E1D6E2CB; Wed, 17 May 2017 05:53:27 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD2621A94; Wed, 17 May 2017 05:53:26 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4H5rPcx054909; Wed, 17 May 2017 05:53:25 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4H5rPbN054904; Wed, 17 May 2017 05:53:25 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705170553.v4H5rPbN054904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 17 May 2017 05:53:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318397 - in stable/11: sbin/ifconfig sys/net sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 05:53:27 -0000 Author: rpokala Date: Wed May 17 05:53:25 2017 New Revision: 318397 URL: https://svnweb.freebsd.org/changeset/base/318397 Log: MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add a way to retrive it The MAC address reported by `ifconfig ${nic} ether' does not always match the address in the hardware, as reported by the driver during attach. In particular, NICs which are components of a lagg(4) interface all report the same MAC. When attaching, the NIC driver passes the MAC address it read from the hardware as an argument to ether_ifattach(). Keep a second copy of it, and create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along with the active MAC address. PR: 194386 Modified: stable/11/sbin/ifconfig/af_link.c stable/11/sys/net/if.c stable/11/sys/net/if_ethersubr.c stable/11/sys/net/if_var.h stable/11/sys/sys/sockio.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/af_link.c ============================================================================== --- stable/11/sbin/ifconfig/af_link.c Wed May 17 05:47:31 2017 (r318396) +++ stable/11/sbin/ifconfig/af_link.c Wed May 17 05:53:25 2017 (r318397) @@ -42,6 +42,7 @@ static const char rcsid[] = #include #include #include +#include #include #include @@ -67,7 +68,7 @@ link_status(int s __unused, const struct sdl->sdl_alen == ETHER_ADDR_LEN) { ether_format = ether_ntoa((struct ether_addr *)LLADDR(sdl)); if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { - for (format_char = strchr(ether_format, ':'); + for (format_char = strchr(ether_format, ':'); format_char != NULL; format_char = strchr(ether_format, ':')) *format_char = '-'; @@ -78,6 +79,48 @@ link_status(int s __unused, const struct printf("\tlladdr %s\n", link_ntoa(sdl) + n); } + /* Best-effort (i.e. failures are silent) to get original + * hardware address, as read by NIC driver at attach time. Only + * applies to Ethernet NICs (IFT_ETHER). However, laggX + * interfaces claim to be IFT_ETHER, and re-type their component + * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If + * the MAC is zeroed, then it's actually a lagg. + */ + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_IEEE8023ADLAG) && + sdl->sdl_alen == ETHER_ADDR_LEN) { + struct ifreq ifr; + int sock_hw; + int rc; + static const u_char laggaddr[6] = {0}; + + strncpy(ifr.ifr_name, ifa->ifa_name, + sizeof(ifr.ifr_name)); + memcpy(&ifr.ifr_addr, ifa->ifa_addr, + sizeof(ifa->ifa_addr->sa_len)); + ifr.ifr_addr.sa_family = AF_LOCAL; + if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) { + warn("socket(AF_LOCAL,SOCK_DGRAM)"); + return; + } + rc = ioctl(sock_hw, SIOCGHWADDR, &ifr); + close(sock_hw); + if (rc != 0) { + return; + } + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + return; + } + ether_format = ether_ntoa((const struct ether_addr *) + &ifr.ifr_addr.sa_data); + if (f_ether != NULL && strcmp(f_ether, "dash") == 0) { + for (format_char = strchr(ether_format, ':'); + format_char != NULL; + format_char = strchr(ether_format, ':')) + *format_char = '-'; + } + printf("\thwaddr %s\n", ether_format); + } } } Modified: stable/11/sys/net/if.c ============================================================================== --- stable/11/sys/net/if.c Wed May 17 05:47:31 2017 (r318396) +++ stable/11/sys/net/if.c Wed May 17 05:53:25 2017 (r318397) @@ -744,6 +744,11 @@ if_attach_internal(struct ifnet *ifp, in /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; + if (ifp->if_type == IFT_ETHER) { + ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR, + M_WAITOK | M_ZERO); + } + #if defined(INET) || defined(INET6) /* Use defaults for TSO, if nothing is set */ if (ifp->if_hw_tsomax == 0 && @@ -1059,6 +1064,8 @@ if_detach_internal(struct ifnet *ifp, in * Remove link ifaddr pointer and maybe decrement if_index. * Clean up all addresses. */ + free(ifp->if_hw_addr, M_IFADDR); + ifp->if_hw_addr = NULL; ifp->if_addr = NULL; /* We can now free link ifaddr. */ @@ -2667,6 +2674,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, ifr->ifr_addr.sa_data, ifr->ifr_addr.sa_len); break; + case SIOCGHWADDR: + error = if_gethwaddr(ifp, ifr); + break; + case SIOCAIFGROUP: { struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr; @@ -3598,6 +3609,29 @@ if_requestencap_default(struct ifnet *if } /* + * Get the link layer address that was read from the hardware at attach. + * + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type + * their component interfaces as IFT_IEEE8023ADLAG. + */ +int +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) +{ + + if (ifp->if_hw_addr == NULL) + return (ENODEV); + + switch (ifp->if_type) { + case IFT_ETHER: + case IFT_IEEE8023ADLAG: + bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen); + return (0); + default: + return (ENODEV); + } +} + +/* * The name argument must be a pointer to storage which will last as * long as the interface does. For physical devices, the result of * device_get_name(dev) is a good choice and for pseudo-devices a Modified: stable/11/sys/net/if_ethersubr.c ============================================================================== --- stable/11/sys/net/if_ethersubr.c Wed May 17 05:47:31 2017 (r318396) +++ stable/11/sys/net/if_ethersubr.c Wed May 17 05:53:25 2017 (r318397) @@ -918,6 +918,9 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); + if (ifp->if_hw_addr != NULL) + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) (*ng_ether_attach_p)(ifp); Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Wed May 17 05:47:31 2017 (r318396) +++ stable/11/sys/net/if_var.h Wed May 17 05:53:25 2017 (r318397) @@ -241,6 +241,7 @@ struct ifnet { struct ifmultihead if_multiaddrs; /* multicast addresses configured */ int if_amcount; /* number of all-multicast requests */ struct ifaddr *if_addr; /* pointer to link-level address */ + void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ struct rwlock if_afdata_lock; void *if_afdata[AF_MAX]; @@ -608,6 +609,7 @@ int if_gethwassist(if_t ifp); int if_setsoftc(if_t ifp, void *softc); void *if_getsoftc(if_t ifp); int if_setflags(if_t ifp, int flags); +int if_gethwaddr(if_t ifp, struct ifreq *); int if_setmtu(if_t ifp, int mtu); int if_getmtu(if_t ifp); int if_getmtu_family(if_t ifp, int family); Modified: stable/11/sys/sys/sockio.h ============================================================================== --- stable/11/sys/sys/sockio.h Wed May 17 05:47:31 2017 (r318396) +++ stable/11/sys/sys/sockio.h Wed May 17 05:53:25 2017 (r318397) @@ -97,6 +97,7 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ #define SIOCGI2C _IOWR('i', 61, struct ifreq) /* get I2C data */ +#define SIOCGHWADDR _IOWR('i', 62, struct ifreq) /* get hardware lladdr */ #define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif address */ #define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ From owner-svn-src-stable@freebsd.org Wed May 17 14:28:03 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9209FD70A7A; Wed, 17 May 2017 14:28:03 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BDCA300; Wed, 17 May 2017 14:28:03 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HES2Vj064591; Wed, 17 May 2017 14:28:02 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HES1gZ064583; Wed, 17 May 2017 14:28:01 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201705171428.v4HES1gZ064583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Wed, 17 May 2017 14:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318402 - stable/11/crypto/openssh X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 14:28:03 -0000 Author: lidl Date: Wed May 17 14:28:01 2017 New Revision: 318402 URL: https://svnweb.freebsd.org/changeset/base/318402 Log: MFC r318242: Refine and update blacklist support in sshd Adjust notification points slightly to catch all auth failures, rather than just the ones caused by bad usernames. Modify notification point for bad usernames to send new type of BLACKLIST_BAD_USER. (Support in libblacklist will be forthcoming soon.) Add guards to allow library headers to expose the enum of action values. Reviewed by: des Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: stable/11/crypto/openssh/auth-pam.c stable/11/crypto/openssh/auth.c stable/11/crypto/openssh/auth1.c stable/11/crypto/openssh/auth2.c stable/11/crypto/openssh/blacklist.c stable/11/crypto/openssh/blacklist_client.h stable/11/crypto/openssh/packet.c stable/11/crypto/openssh/sshd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/auth-pam.c ============================================================================== --- stable/11/crypto/openssh/auth-pam.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/auth-pam.c Wed May 17 14:28:01 2017 (r318402) @@ -795,7 +795,8 @@ sshpam_query(void *ctx, char **name, cha free(msg); return (0); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, + sshpam_authctxt->user); error("PAM: %s for %s%.100s from %.100s", msg, sshpam_authctxt->valid ? "" : "illegal user ", sshpam_authctxt->user, Modified: stable/11/crypto/openssh/auth.c ============================================================================== --- stable/11/crypto/openssh/auth.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/auth.c Wed May 17 14:28:01 2017 (r318402) @@ -296,7 +296,7 @@ auth_log(Authctxt *authctxt, int authent else { authmsg = authenticated ? "Accepted" : "Failed"; if (authenticated) - BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_OK, "ssh"); } authlog("%s %s%s%s for %s%.100s from %.200s port %d %s%s%s", @@ -644,7 +644,7 @@ getpwnamallow(const char *user) } #endif if (pw == NULL) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); logit("Invalid user %.100s from %.100s", user, get_remote_ipaddr()); #ifdef CUSTOM_FAILED_LOGIN Modified: stable/11/crypto/openssh/auth1.c ============================================================================== --- stable/11/crypto/openssh/auth1.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/auth1.c Wed May 17 14:28:01 2017 (r318402) @@ -338,7 +338,7 @@ do_authloop(Authctxt *authctxt) char *msg; size_t len; - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); error("Access denied for user %s by PAM account " "configuration", authctxt->user); len = buffer_len(&loginmsg); @@ -364,6 +364,7 @@ do_authloop(Authctxt *authctxt) if (authenticated) return; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); if (++authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); @@ -406,7 +407,7 @@ do_authentication(Authctxt *authctxt) else { debug("do_authentication: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_BAD_USER, user); } /* Configuration may have changed as a result of Match */ Modified: stable/11/crypto/openssh/auth2.c ============================================================================== --- stable/11/crypto/openssh/auth2.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/auth2.c Wed May 17 14:28:01 2017 (r318402) @@ -249,7 +249,6 @@ input_userauth_request(int type, u_int32 } else { logit("input_userauth_request: invalid user %s", user); authctxt->pw = fakepw(); - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_INVALID_USER)); #endif @@ -389,8 +388,10 @@ userauth_finish(Authctxt *authctxt, int /* Allow initial try of "none" auth without failure penalty */ if (!partial && !authctxt->server_caused_failure && - (authctxt->attempt > 1 || strcmp(method, "none") != 0)) + (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { authctxt->failures++; + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); + } if (authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS PRIVSEP(audit_event(SSH_LOGIN_EXCEED_MAXTRIES)); Modified: stable/11/crypto/openssh/blacklist.c ============================================================================== --- stable/11/crypto/openssh/blacklist.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/blacklist.c Wed May 17 14:28:01 2017 (r318402) @@ -46,8 +46,8 @@ #include "log.h" #include "misc.h" #include "servconf.h" -#include "blacklist_client.h" #include +#include "blacklist_client.h" static struct blacklist *blstate = NULL; @@ -88,10 +88,10 @@ blacklist_init(void) } void -blacklist_notify(int action) +blacklist_notify(int action, const char *msg) { if (blstate != NULL && packet_connection_is_on_socket()) (void)blacklist_r(blstate, action, - packet_get_connection_in(), "ssh"); + packet_get_connection_in(), msg); } Modified: stable/11/crypto/openssh/blacklist_client.h ============================================================================== --- stable/11/crypto/openssh/blacklist_client.h Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/blacklist_client.h Wed May 17 14:28:01 2017 (r318402) @@ -34,22 +34,26 @@ #ifndef BLACKLIST_CLIENT_H #define BLACKLIST_CLIENT_H +#ifndef BLACKLIST_API_ENUM enum { BLACKLIST_AUTH_OK = 0, - BLACKLIST_AUTH_FAIL + BLACKLIST_AUTH_FAIL, + BLACKLIST_ABUSIVE_BEHAVIOR, + BLACKLIST_BAD_USER }; +#endif #ifdef USE_BLACKLIST void blacklist_init(void); -void blacklist_notify(int); +void blacklist_notify(int, const char *); #define BLACKLIST_INIT() blacklist_init() -#define BLACKLIST_NOTIFY(x) blacklist_notify(x) +#define BLACKLIST_NOTIFY(x,msg) blacklist_notify(x,msg) #else #define BLACKLIST_INIT() -#define BLACKLIST_NOTIFY(x) +#define BLACKLIST_NOTIFY(x,msg) #endif Modified: stable/11/crypto/openssh/packet.c ============================================================================== --- stable/11/crypto/openssh/packet.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/packet.c Wed May 17 14:28:01 2017 (r318402) @@ -2072,7 +2072,7 @@ sshpkt_fatal(struct ssh *ssh, const char case SSH_ERR_NO_KEX_ALG_MATCH: case SSH_ERR_NO_HOSTKEY_ALG_MATCH: if (ssh && ssh->kex && ssh->kex->failed_choice) { - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); fatal("Unable to negotiate with %.200s port %d: %s. " "Their offer: %s", ssh_remote_ipaddr(ssh), ssh_remote_port(ssh), ssh_err(r), Modified: stable/11/crypto/openssh/sshd.c ============================================================================== --- stable/11/crypto/openssh/sshd.c Wed May 17 13:22:13 2017 (r318401) +++ stable/11/crypto/openssh/sshd.c Wed May 17 14:28:01 2017 (r318402) @@ -389,7 +389,7 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, "ssh"); /* Log error and exit. */ sigdie("Timeout before authentication for %s", get_remote_ipaddr()); From owner-svn-src-stable@freebsd.org Wed May 17 14:35:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3D95D70CFE; Wed, 17 May 2017 14:35:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8D0DA18; Wed, 17 May 2017 14:35:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HEZLBA068451; Wed, 17 May 2017 14:35:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HEZLtb068450; Wed, 17 May 2017 14:35:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705171435.v4HEZLtb068450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 17 May 2017 14:35:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318403 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 14:35:23 -0000 Author: gjb Date: Wed May 17 14:35:21 2017 New Revision: 318403 URL: https://svnweb.freebsd.org/changeset/base/318403 Log: Document r318402, blacklistd refinement for OpenSSH. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 17 14:28:01 2017 (r318402) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed May 17 14:35:21 2017 (r318403) @@ -302,6 +302,13 @@ &man.blacklistd.8; has been updated to the 20170503 snapshot. + + &man.blacklistd.8; support for + OpenSSH has been refined to adjust + notification points to catch all authentication failures + rather than authentication failures caused by invalid + login usernames. From owner-svn-src-stable@freebsd.org Wed May 17 22:29:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18541D71BD1; Wed, 17 May 2017 22:29:27 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E942F156C; Wed, 17 May 2017 22:29:26 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4HMTPdl065766; Wed, 17 May 2017 22:29:25 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4HMTPHG065760; Wed, 17 May 2017 22:29:25 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705172229.v4HMTPHG065760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Wed, 17 May 2017 22:29:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318430 - in stable/10: sbin/ifconfig sys/net sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 22:29:27 -0000 Author: rpokala Date: Wed May 17 22:29:25 2017 New Revision: 318430 URL: https://svnweb.freebsd.org/changeset/base/318430 Log: MFC r318160, 318176: Persistently store NIC's hardware MAC address, and add a way to retrive it NOTE: Due to restructuring, the merges didn't apply cleanly; the resulting change is almost identical to what went into stable/11, but in some cases in different locations. The MAC address reported by `ifconfig ${nic} ether' does not always match the address in the hardware, as reported by the driver during attach. In particular, NICs which are components of a lagg(4) interface all report the same MAC. When attaching, the NIC driver passes the MAC address it read from the hardware as an argument to ether_ifattach(). Keep a second copy of it, and create ioctl(SIOCGHWADDR) to return it. Teach `ifconfig' to report it along with the active MAC address. PR: 194386 Modified: stable/10/sbin/ifconfig/af_link.c stable/10/sys/net/if.c stable/10/sys/net/if_ethersubr.c stable/10/sys/net/if_var.h stable/10/sys/sys/sockio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_link.c ============================================================================== --- stable/10/sbin/ifconfig/af_link.c Wed May 17 22:13:07 2017 (r318429) +++ stable/10/sbin/ifconfig/af_link.c Wed May 17 22:29:25 2017 (r318430) @@ -42,6 +42,7 @@ static const char rcsid[] = #include #include #include +#include #include #include @@ -69,6 +70,41 @@ link_status(int s __unused, const struct printf("\tlladdr %s\n", link_ntoa(sdl) + n); } + /* Best-effort (i.e. failures are silent) to get original + * hardware address, as read by NIC driver at attach time. Only + * applies to Ethernet NICs (IFT_ETHER). However, laggX + * interfaces claim to be IFT_ETHER, and re-type their component + * Ethernet NICs as IFT_IEEE8023ADLAG. So, check for both. If + * the MAC is zeroed, then it's actually a lagg. + */ + if ((sdl->sdl_type == IFT_ETHER || + sdl->sdl_type == IFT_IEEE8023ADLAG) && + sdl->sdl_alen == ETHER_ADDR_LEN) { + struct ifreq ifr; + int sock_hw; + int rc; + static const u_char laggaddr[6] = {0}; + + strncpy(ifr.ifr_name, ifa->ifa_name, + sizeof(ifr.ifr_name)); + memcpy(&ifr.ifr_addr, ifa->ifa_addr, + sizeof(ifa->ifa_addr->sa_len)); + ifr.ifr_addr.sa_family = AF_LOCAL; + if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) { + warn("socket(AF_LOCAL,SOCK_DGRAM)"); + return; + } + rc = ioctl(sock_hw, SIOCGHWADDR, &ifr); + close(sock_hw); + if (rc != 0) { + return; + } + if (memcmp(ifr.ifr_addr.sa_data, laggaddr, sdl->sdl_alen) == 0) { + return; + } + printf("\thwaddr %s\n", ether_ntoa((const struct ether_addr *) + &ifr.ifr_addr.sa_data)); + } } } Modified: stable/10/sys/net/if.c ============================================================================== --- stable/10/sys/net/if.c Wed May 17 22:13:07 2017 (r318429) +++ stable/10/sys/net/if.c Wed May 17 22:29:25 2017 (r318430) @@ -732,6 +732,11 @@ if_attach_internal(struct ifnet *ifp, in /* Reliably crash if used uninitialized. */ ifp->if_broadcastaddr = NULL; + if (ifp->if_type == IFT_ETHER) { + ifp->if_hw_addr = malloc(ifp->if_addrlen, M_IFADDR, + M_WAITOK | M_ZERO); + } + #if defined(INET) || defined(INET6) /* Use defaults for TSO, if nothing is set */ if (ifp->if_hw_tsomax == 0 && @@ -988,6 +993,8 @@ if_detach_internal(struct ifnet *ifp, in * Remove link ifaddr pointer and maybe decrement if_index. * Clean up all addresses. */ + free(ifp->if_hw_addr, M_IFADDR); + ifp->if_hw_addr = NULL; ifp->if_addr = NULL; /* We can now free link ifaddr. */ @@ -2639,6 +2646,10 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, EVENTHANDLER_INVOKE(iflladdr_event, ifp); break; + case SIOCGHWADDR: + error = if_gethwaddr(ifp, ifr); + break; + case SIOCAIFGROUP: { struct ifgroupreq *ifgr = (struct ifgroupreq *)ifr; @@ -3578,6 +3589,29 @@ if_setlladdr(struct ifnet *ifp, const u_ } /* + * Get the link layer address that was read from the hardware at attach. + * + * This is only set by Ethernet NICs (IFT_ETHER), but laggX interfaces re-type + * their component interfaces as IFT_IEEE8023ADLAG. + */ +int +if_gethwaddr(struct ifnet *ifp, struct ifreq *ifr) +{ + + if (ifp->if_hw_addr == NULL) + return (ENODEV); + + switch (ifp->if_type) { + case IFT_ETHER: + case IFT_IEEE8023ADLAG: + bcopy(ifp->if_hw_addr, ifr->ifr_addr.sa_data, ifp->if_addrlen); + return (0); + default: + return (ENODEV); + } +} + +/* * The name argument must be a pointer to storage which will last as * long as the interface does. For physical devices, the result of * device_get_name(dev) is a good choice and for pseudo-devices a Modified: stable/10/sys/net/if_ethersubr.c ============================================================================== --- stable/10/sys/net/if_ethersubr.c Wed May 17 22:13:07 2017 (r318429) +++ stable/10/sys/net/if_ethersubr.c Wed May 17 22:29:25 2017 (r318430) @@ -918,6 +918,9 @@ ether_ifattach(struct ifnet *ifp, const sdl->sdl_alen = ifp->if_addrlen; bcopy(lla, LLADDR(sdl), ifp->if_addrlen); + if (ifp->if_hw_addr != NULL) + bcopy(lla, ifp->if_hw_addr, ifp->if_addrlen); + bpfattach(ifp, DLT_EN10MB, ETHER_HDR_LEN); if (ng_ether_attach_p != NULL) (*ng_ether_attach_p)(ifp); Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Wed May 17 22:13:07 2017 (r318429) +++ stable/10/sys/net/if_var.h Wed May 17 22:29:25 2017 (r318430) @@ -200,6 +200,7 @@ struct ifnet { (struct ifnet *, struct vnet *, char *); struct vnet *if_home_vnet; /* where this ifnet originates from */ struct ifaddr *if_addr; /* pointer to link-level address */ + void *if_hw_addr; /* hardware link-level address */ void *if_llsoftc; /* link layer softc */ int if_drv_flags; /* driver-managed status flags */ struct ifaltq if_snd; /* output queue (includes altq) */ @@ -973,6 +974,7 @@ void if_qflush(struct ifnet *); void if_ref(struct ifnet *); void if_rele(struct ifnet *); int if_setlladdr(struct ifnet *, const u_char *, int); +int if_gethwaddr(struct ifnet *, struct ifreq *); void if_up(struct ifnet *); int ifioctl(struct socket *, u_long, caddr_t, struct thread *); int ifpromisc(struct ifnet *, int); Modified: stable/10/sys/sys/sockio.h ============================================================================== --- stable/10/sys/sys/sockio.h Wed May 17 22:13:07 2017 (r318429) +++ stable/10/sys/sys/sockio.h Wed May 17 22:29:25 2017 (r318430) @@ -97,6 +97,7 @@ #define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ #define SIOCGI2C _IOWR('i', 61, struct ifreq) /* get I2C data */ +#define SIOCGHWADDR _IOWR('i', 62, struct ifreq) /* get hardware lladdr */ #define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif address */ #define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ From owner-svn-src-stable@freebsd.org Thu May 18 01:32:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13D3BD70810; Thu, 18 May 2017 01:32:52 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7D141FFE; Thu, 18 May 2017 01:32:51 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1WoN3043235; Thu, 18 May 2017 01:32:50 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1WoL0043234; Thu, 18 May 2017 01:32:50 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705180132.v4I1WoL0043234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 18 May 2017 01:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318433 - stable/11/contrib/hyperv/tools X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 01:32:52 -0000 Author: sephe Date: Thu May 18 01:32:50 2017 New Revision: 318433 URL: https://svnweb.freebsd.org/changeset/base/318433 Log: MFC 317783 hyperv/kvp: Fix pool direcrory and file permission PR: 209385 Sponsored by: Microsoft Modified: stable/11/contrib/hyperv/tools/hv_kvp_daemon.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- stable/11/contrib/hyperv/tools/hv_kvp_daemon.c Thu May 18 00:32:05 2017 (r318432) +++ stable/11/contrib/hyperv/tools/hv_kvp_daemon.c Thu May 18 01:32:50 2017 (r318433) @@ -61,6 +61,10 @@ typedef uint16_t __u16; typedef uint32_t __u32; typedef uint64_t __u64; +#define POOL_FILE_MODE (S_IRUSR | S_IWUSR) +#define POOL_DIR_MODE (POOL_FILE_MODE | S_IXUSR) +#define POOL_DIR "/var/db/hyperv/pool" + /* * ENUM Data */ @@ -285,11 +289,12 @@ kvp_file_init(void) int i; int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; - if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 && + if (mkdir(POOL_DIR, POOL_DIR_MODE) < 0 && (errno != EEXIST && errno != EISDIR)) { KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); exit(EXIT_FAILURE); } + chmod(POOL_DIR, POOL_DIR_MODE); /* fix old mistake */ for (i = 0; i < HV_KVP_POOL_COUNT; i++) { @@ -297,11 +302,12 @@ kvp_file_init(void) records_read = 0; num_blocks = 1; snprintf(fname, MAX_FILE_NAME, "/var/db/hyperv/pool/.kvp_pool_%d", i); - fd = open(fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH); + fd = open(fname, O_RDWR | O_CREAT, POOL_FILE_MODE); if (fd == -1) { return (1); } + fchmod(fd, POOL_FILE_MODE); /* fix old mistake */ filep = fopen(fname, "r"); From owner-svn-src-stable@freebsd.org Thu May 18 01:42:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEAC4D712ED; Thu, 18 May 2017 01:42:56 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE50819BD; Thu, 18 May 2017 01:42:56 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I1gtXh047457; Thu, 18 May 2017 01:42:55 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I1gtRN047456; Thu, 18 May 2017 01:42:55 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201705180142.v4I1gtRN047456@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 18 May 2017 01:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318435 - stable/10/contrib/hyperv/tools X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 01:42:57 -0000 Author: sephe Date: Thu May 18 01:42:55 2017 New Revision: 318435 URL: https://svnweb.freebsd.org/changeset/base/318435 Log: MFC 317783 hyperv/kvp: Fix pool direcrory and file permission PR: 209385 Sponsored by: Microsoft Modified: stable/10/contrib/hyperv/tools/hv_kvp_daemon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/hyperv/tools/hv_kvp_daemon.c ============================================================================== --- stable/10/contrib/hyperv/tools/hv_kvp_daemon.c Thu May 18 01:35:07 2017 (r318434) +++ stable/10/contrib/hyperv/tools/hv_kvp_daemon.c Thu May 18 01:42:55 2017 (r318435) @@ -61,6 +61,10 @@ typedef uint16_t __u16; typedef uint32_t __u32; typedef uint64_t __u64; +#define POOL_FILE_MODE (S_IRUSR | S_IWUSR) +#define POOL_DIR_MODE (POOL_FILE_MODE | S_IXUSR) +#define POOL_DIR "/var/db/hyperv/pool" + /* * ENUM Data */ @@ -285,11 +289,12 @@ kvp_file_init(void) int i; int alloc_unit = sizeof(struct kvp_record) * ENTRIES_PER_BLOCK; - if (mkdir("/var/db/hyperv/pool", S_IRUSR | S_IWUSR | S_IROTH) < 0 && + if (mkdir(POOL_DIR, POOL_DIR_MODE) < 0 && (errno != EEXIST && errno != EISDIR)) { KVP_LOG(LOG_ERR, " Failed to create /var/db/hyperv/pool\n"); exit(EXIT_FAILURE); } + chmod(POOL_DIR, POOL_DIR_MODE); /* fix old mistake */ for (i = 0; i < HV_KVP_POOL_COUNT; i++) { @@ -297,11 +302,12 @@ kvp_file_init(void) records_read = 0; num_blocks = 1; snprintf(fname, MAX_FILE_NAME, "/var/db/hyperv/pool/.kvp_pool_%d", i); - fd = open(fname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH); + fd = open(fname, O_RDWR | O_CREAT, POOL_FILE_MODE); if (fd == -1) { return (1); } + fchmod(fd, POOL_FILE_MODE); /* fix old mistake */ filep = fopen(fname, "r"); From owner-svn-src-stable@freebsd.org Thu May 18 03:32:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1549D69F65; Thu, 18 May 2017 03:32:02 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CC8171D; Thu, 18 May 2017 03:32:02 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4I3W1pg092997; Thu, 18 May 2017 03:32:01 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4I3W1QL092994; Thu, 18 May 2017 03:32:01 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201705180332.v4I3W1QL092994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 18 May 2017 03:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318438 - in stable/10: cddl/lib/libdtrace sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 03:32:02 -0000 Author: smh Date: Thu May 18 03:32:01 2017 New Revision: 318438 URL: https://svnweb.freebsd.org/changeset/base/318438 Log: Revert the partial MFC of r313045 which broke dtrace This removes the mbuf to ipinfo_t translator and switches tcp_autorcvbuf to use the older mtod macro. This was originally merged to stable/10 as part of r317375. Reported by: markj Reviewed by: markj, hiren Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D10769 Modified: stable/10/cddl/lib/libdtrace/ip.d stable/10/sys/netinet/in_kdtrace.c stable/10/sys/netinet/tcp_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/lib/libdtrace/ip.d ============================================================================== --- stable/10/cddl/lib/libdtrace/ip.d Thu May 18 01:46:30 2017 (r318437) +++ stable/10/cddl/lib/libdtrace/ip.d Thu May 18 03:32:01 2017 (r318438) @@ -240,24 +240,6 @@ translator ipinfo_t < uint8_t *p > { #pragma D binding "1.0" IFF_LOOPBACK inline int IFF_LOOPBACK = 0x8; -#pragma D binding "1.13" translator -translator ipinfo_t < struct mbuf *m > { - ip_ver = m == NULL ? 0 : ((struct ip *)m->m_data)->ip_v; - ip_plength = m == NULL ? 0 : - ((struct ip *)m->m_data)->ip_v == 4 ? - ntohs(((struct ip *)m->m_data)->ip_len) - - (((struct ip *)m->m_data)->ip_hl << 2): - ntohs(((struct ip6_hdr *)m->m_data)->ip6_ctlun.ip6_un1.ip6_un1_plen); - ip_saddr = m == NULL ? 0 : - ((struct ip *)m->m_data)->ip_v == 4 ? - inet_ntoa(&((struct ip *)m->m_data)->ip_src.s_addr) : - inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_src); - ip_daddr = m == NULL ? 0 : - ((struct ip *)m->m_data)->ip_v == 4 ? - inet_ntoa(&((struct ip *)m->m_data)->ip_dst.s_addr) : - inet_ntoa6(&((struct ip6_hdr *)m->m_data)->ip6_dst); -}; - #pragma D binding "1.0" translator translator ifinfo_t < struct ifnet *p > { if_name = p->if_xname; Modified: stable/10/sys/netinet/in_kdtrace.c ============================================================================== --- stable/10/sys/netinet/in_kdtrace.c Thu May 18 01:46:30 2017 (r318437) +++ stable/10/sys/netinet/in_kdtrace.c Thu May 18 03:32:01 2017 (r318438) @@ -58,28 +58,28 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); @@ -93,7 +93,7 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , connect SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); @@ -115,7 +115,7 @@ SDT_PROBE_DEFINE6_XLATE(tcp, , , state__ SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize, "void *", "void *", "struct tcpcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", + "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *", "int", "int"); Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Thu May 18 01:46:30 2017 (r318437) +++ stable/10/sys/netinet/tcp_input.c Thu May 18 03:32:01 2017 (r318438) @@ -1519,7 +1519,8 @@ tcp_autorcvbuf(struct mbuf *m, struct tc newsize = min(so->so_rcv.sb_hiwat + V_tcp_autorcvbuf_inc, V_tcp_autorcvbuf_max); } - TCP_PROBE6(receive__autoresize, NULL, tp, m, tp, th, newsize); + TCP_PROBE6(receive__autoresize, NULL, tp, mtod(m, const char *), + tp, th, newsize); /* Start over with next RTT. */ tp->rfbuf_ts = 0; From owner-svn-src-stable@freebsd.org Thu May 18 12:27:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEAA1D71318; Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EB948E; Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ICRfDj009540; Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ICRfkq009539; Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181227.v4ICRfkq009539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 12:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318447 - in stable: 10 11 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 12:27:42 -0000 Author: gjb Date: Thu May 18 12:27:41 2017 New Revision: 318447 URL: https://svnweb.freebsd.org/changeset/base/318447 Log: MFC r318294: Correct the URL to instructions for updating system sources. PR: 219303 Sponsored by: The FreeBSD Foundation Modified: stable/11/README Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/README Directory Properties: stable/10/ (props changed) Modified: stable/11/README ============================================================================== --- stable/11/README Thu May 18 09:34:26 2017 (r318446) +++ stable/11/README Thu May 18 12:27:41 2017 (r318447) @@ -81,4 +81,4 @@ usr.sbin System administration commands. For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html From owner-svn-src-stable@freebsd.org Thu May 18 12:27:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC0AED71312; Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78A658D; Thu, 18 May 2017 12:27:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ICRfAI009534; Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ICRfqD009533; Thu, 18 May 2017 12:27:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181227.v4ICRfqD009533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 12:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318447 - in stable: 10 11 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 12:27:42 -0000 Author: gjb Date: Thu May 18 12:27:41 2017 New Revision: 318447 URL: https://svnweb.freebsd.org/changeset/base/318447 Log: MFC r318294: Correct the URL to instructions for updating system sources. PR: 219303 Sponsored by: The FreeBSD Foundation Modified: stable/10/README Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/README Directory Properties: stable/11/ (props changed) Modified: stable/10/README ============================================================================== --- stable/10/README Thu May 18 09:34:26 2017 (r318446) +++ stable/10/README Thu May 18 12:27:41 2017 (r318447) @@ -87,4 +87,4 @@ usr.sbin System administration commands. For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see: - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html From owner-svn-src-stable@freebsd.org Thu May 18 13:19:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41A56D72994; Thu, 18 May 2017 13:19:09 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05D206B1; Thu, 18 May 2017 13:19:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IDJ8Uu029783; Thu, 18 May 2017 13:19:08 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IDJ74T029775; Thu, 18 May 2017 13:19:07 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201705181319.v4IDJ74T029775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Thu, 18 May 2017 13:19:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318449 - in stable/11: contrib/top usr.bin/top X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 13:19:09 -0000 Author: allanjude Date: Thu May 18 13:19:07 2017 New Revision: 318449 URL: https://svnweb.freebsd.org/changeset/base/318449 Log: MFC r315435: Add ZFS compressed ARC stats to top(1) MFC r316314: top(1) read the wrong amount of data from sysctl MFC r318448: Explain the new fields in top(1) related to ZFS compressed ARC Remove the laundry field during the merge, does not exist in stable/11 Modified: stable/11/contrib/top/display.c stable/11/contrib/top/display.h stable/11/contrib/top/layout.h stable/11/contrib/top/machine.h stable/11/contrib/top/top.c stable/11/usr.bin/top/machine.c stable/11/usr.bin/top/top.local.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/top/display.c ============================================================================== --- stable/11/contrib/top/display.c Thu May 18 12:55:07 2017 (r318448) +++ stable/11/contrib/top/display.c Thu May 18 13:19:07 2017 (r318449) @@ -69,6 +69,7 @@ static char **procstate_names; static char **cpustate_names; static char **memory_names; static char **arc_names; +static char **carc_names; static char **swap_names; static int num_procstates; @@ -105,6 +106,8 @@ int x_mem = 5; int y_mem = 3; int x_arc = 5; int y_arc = 4; +int x_carc = 5; +int y_carc = 5; int x_swap = 6; int y_swap = 4; int y_message = 5; @@ -222,6 +225,7 @@ struct statics *statics; lmemory = (int *)malloc(num_memory * sizeof(int)); arc_names = statics->arc_names; + carc_names = statics->carc_names; /* calculate starting columns where needed */ cpustate_total_length = 0; @@ -684,6 +688,47 @@ int *stats; line_update(arc_buffer, new, x_arc, y_arc); } + +/* + * *_carc(stats) - print "Compressed ARC: " followed by the summary string + * + * Assumptions: cursor is on "lastline" + * for i_carc ONLY: cursor is on the previous line + */ +char carc_buffer[MAX_COLS]; + +void +i_carc(stats) + +int *stats; + +{ + if (carc_names == NULL) + return; + + fputs("\n ", stdout); + lastline++; + + /* format and print the memory summary */ + summary_format(carc_buffer, stats, carc_names); + fputs(carc_buffer, stdout); +} + +void +u_carc(stats) + +int *stats; + +{ + static char new[MAX_COLS]; + + if (carc_names == NULL) + return; + + /* format the new line */ + summary_format(new, stats, carc_names); + line_update(carc_buffer, new, x_carc, y_carc); +} /* * *_swap(stats) - print "Swap: " followed by the swap summary string @@ -1174,6 +1219,7 @@ register char **names; register int num; register char *thisname; register int useM = No; + char rbuf[6]; /* format each number followed by its string */ p = str; @@ -1194,6 +1240,14 @@ register char **names; /* skip over the K, since it was included by format_k */ p = strecpy(p, thisname+1); } + /* is this number a ratio? */ + else if (thisname[0] == ':') + { + (void) snprintf(rbuf, sizeof(rbuf), "%.2f", + (float)*(numbers - 2) / (float)num); + p = strecpy(p, rbuf); + p = strecpy(p, thisname); + } else { p = strecpy(p, itoa(num)); Modified: stable/11/contrib/top/display.h ============================================================================== --- stable/11/contrib/top/display.h Thu May 18 12:55:07 2017 (r318448) +++ stable/11/contrib/top/display.h Thu May 18 13:19:07 2017 (r318449) @@ -16,6 +16,7 @@ char *cpustates_tag(void); void display_header(int t); int display_init(struct statics *statics); void i_arc(int *stats); +void i_carc(int *stats); void i_cpustates(int *states); void i_loadave(int mpid, double *avenrun); void i_memory(int *stats); @@ -29,6 +30,7 @@ void new_message(); int readline(char *buffer, int size, int numeric); char *trim_header(char *text); void u_arc(int *stats); +void u_carc(int *stats); void u_cpustates(int *states); void u_endscreen(int hi); void u_header(char *text); Modified: stable/11/contrib/top/layout.h ============================================================================== --- stable/11/contrib/top/layout.h Thu May 18 12:55:07 2017 (r318448) +++ stable/11/contrib/top/layout.h Thu May 18 13:19:07 2017 (r318449) @@ -21,6 +21,8 @@ extern int x_mem; /* 5 */ extern int y_mem; /* 3 */ extern int x_arc; /* 5 */ extern int y_arc; /* 4 */ +extern int x_carc; /* 5 */ +extern int y_carc; /* 5 */ extern int x_swap; /* 6 */ extern int y_swap; /* 4 */ extern int y_message; /* 5 */ Modified: stable/11/contrib/top/machine.h ============================================================================== --- stable/11/contrib/top/machine.h Thu May 18 12:55:07 2017 (r318448) +++ stable/11/contrib/top/machine.h Thu May 18 13:19:07 2017 (r318449) @@ -21,6 +21,7 @@ struct statics char **cpustate_names; char **memory_names; char **arc_names; + char **carc_names; char **swap_names; #ifdef ORDER char **order_names; @@ -48,6 +49,7 @@ struct system_info int *cpustates; int *memory; int *arc; + int *carc; int *swap; struct timeval boottime; int ncpus; Modified: stable/11/contrib/top/top.c ============================================================================== --- stable/11/contrib/top/top.c Thu May 18 12:55:07 2017 (r318448) +++ stable/11/contrib/top/top.c Thu May 18 13:19:07 2017 (r318449) @@ -125,6 +125,7 @@ void (*d_procstates)() = i_procstates; void (*d_cpustates)() = i_cpustates; void (*d_memory)() = i_memory; void (*d_arc)() = i_arc; +void (*d_carc)() = i_carc; void (*d_swap)() = i_swap; void (*d_message)() = i_message; void (*d_header)() = i_header; @@ -658,6 +659,7 @@ restart: /* display memory stats */ (*d_memory)(system_info.memory); (*d_arc)(system_info.arc); + (*d_carc)(system_info.carc); /* display swap stats */ (*d_swap)(system_info.swap); @@ -724,6 +726,7 @@ restart: d_cpustates = u_cpustates; d_memory = u_memory; d_arc = u_arc; + d_carc = u_carc; d_swap = u_swap; d_message = u_message; d_header = u_header; @@ -1190,6 +1193,7 @@ reset_display() d_cpustates = i_cpustates; d_memory = i_memory; d_arc = i_arc; + d_carc = i_carc; d_swap = i_swap; d_message = i_message; d_header = i_header; Modified: stable/11/usr.bin/top/machine.c ============================================================================== --- stable/11/usr.bin/top/machine.c Thu May 18 12:55:07 2017 (r318448) +++ stable/11/usr.bin/top/machine.c Thu May 18 13:19:07 2017 (r318449) @@ -188,6 +188,12 @@ char *arcnames[] = { NULL }; +int carc_stats[5]; +char *carcnames[] = { + "K Compressed, ", "K Uncompressed, ", ":1 Ratio, ", "K Overhead", + NULL +}; + int swap_stats[7]; char *swapnames[] = { "K Total, ", "K Used, ", "K Free, ", "% Inuse, ", "K In, ", "K Out", @@ -223,6 +229,7 @@ static long total_majflt; /* these are for getting the memory statistics */ static int arc_enabled; +static int carc_enabled; static int pageshift; /* log base 2 of the pagesize */ /* define pagetok in terms of pageshift */ @@ -283,16 +290,18 @@ update_layout(void) y_mem = 3; y_arc = 4; - y_swap = 4 + arc_enabled; - y_idlecursor = 5 + arc_enabled; - y_message = 5 + arc_enabled; - y_header = 6 + arc_enabled; - y_procs = 7 + arc_enabled; - Header_lines = 7 + arc_enabled; + y_carc = 5; + y_swap = 4 + arc_enabled + carc_enabled; + y_idlecursor = 5 + arc_enabled + carc_enabled; + y_message = 5 + arc_enabled + carc_enabled; + y_header = 6 + arc_enabled + carc_enabled; + y_procs = 7 + arc_enabled + carc_enabled; + Header_lines = 7 + arc_enabled + carc_enabled; if (pcpu_stats) { y_mem += ncpus - 1; y_arc += ncpus - 1; + y_carc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; @@ -307,6 +316,7 @@ machine_init(struct statics *statics, ch { int i, j, empty, pagesize; uint64_t arc_size; + boolean_t carc_en; size_t size; struct passwd *pw; @@ -318,6 +328,10 @@ machine_init(struct statics *statics, ch size != sizeof(smpmode)) smpmode = 0; + size = sizeof(carc_en); + if (sysctlbyname("vfs.zfs.compressed_arc_enabled", &carc_en, &size, + NULL, 0) == 0 && carc_en == 1) + carc_enabled = 1; size = sizeof(arc_size); if (sysctlbyname("kstat.zfs.misc.arcstats.size", &arc_size, &size, NULL, 0) == 0 && arc_size != 0) @@ -368,6 +382,10 @@ machine_init(struct statics *statics, ch statics->arc_names = arcnames; else statics->arc_names = NULL; + if (carc_enabled) + statics->carc_names = carcnames; + else + statics->carc_names = NULL; statics->swap_names = swapnames; #ifdef ORDER statics->order_names = ordernames; @@ -559,6 +577,16 @@ get_system_info(struct system_info *si) arc_stats[5] = arc_stat >> 10; si->arc = arc_stats; } + if (carc_enabled) { + GETSYSCTL("kstat.zfs.misc.arcstats.compressed_size", arc_stat); + carc_stats[0] = arc_stat >> 10; + GETSYSCTL("kstat.zfs.misc.arcstats.uncompressed_size", arc_stat); + carc_stats[1] = arc_stat >> 10; + carc_stats[2] = arc_stats[0]; /* ARC Total */ + GETSYSCTL("kstat.zfs.misc.arcstats.overhead_size", arc_stat); + carc_stats[3] = arc_stat >> 10; + si->carc = carc_stats; + } /* set arrays and strings */ if (pcpu_stats) { Modified: stable/11/usr.bin/top/top.local.1 ============================================================================== --- stable/11/usr.bin/top/top.local.1 Thu May 18 12:55:07 2017 (r318448) +++ stable/11/usr.bin/top/top.local.1 Thu May 18 13:19:07 2017 (r318449) @@ -2,9 +2,10 @@ .SH "FreeBSD NOTES" .SH DESCRIPTION OF MEMORY -Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free -ARC: 2048K Total, 342K MRU, 760K MFU, 272K Anon, 232K Header, 442K Other -Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out +Mem: 61M Active, 86M Inact, 22G Wired, 1M Cache, 2M Buf, 102G Free +ARC: 15G Total, 9303M MFU, 6155M MRU, 1464K Anon, 98M Header, 35M Other + 15G Compressed, 27G Uncompressed, 1.75:1 Ratio, 174M Overhead +Swap: 4096M Total, 532M Free, 13% Inuse, 80K In, 104K Out .TP .B K: Kilobyte @@ -55,8 +56,20 @@ number of ARC bytes holding in flight da .B Header: number of ARC bytes holding headers .TP -.B Other +.B Other: miscellaneous ARC bytes +.TP +.B Compressed: +bytes of memory used by ARC caches +.TP +.B Uncompressed: +bytes of data stored in ARC caches before compression +.TP +.B Ratio: +ratio of uncompressed data to total ARC size +.TP +.B Overhead: +amount of overhead from ARC compression .SS Swap Stats .TP .B Total: From owner-svn-src-stable@freebsd.org Thu May 18 15:41:50 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FFE7D73924; Thu, 18 May 2017 15:41:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEBEC09; Thu, 18 May 2017 15:41:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfne1093067; Thu, 18 May 2017 15:41:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfnUS093066; Thu, 18 May 2017 15:41:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfnUS093066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318454 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:50 -0000 Author: gjb Date: Thu May 18 15:41:49 2017 New Revision: 318454 URL: https://svnweb.freebsd.org/changeset/base/318454 Log: Document r318357, ixl(4) updated to version 1.7.12-k. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:48 2017 (r318453) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:49 2017 (r318454) @@ -471,6 +471,10 @@ The &man.bytgpio.4; driver has been added, providing support for Intel® Bay Trail™ SoC GPIO controllers. + + The &man.ixl.4; driver has been updated + to version 1.7.12-k. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:51 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43B0DD7392A; Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 154B7C0A; Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfobh093111; Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfojS093110; Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfojS093110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318455 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:51 -0000 Author: gjb Date: Thu May 18 15:41:49 2017 New Revision: 318455 URL: https://svnweb.freebsd.org/changeset/base/318455 Log: Add qlnxe(4) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 15:41:49 2017 (r318454) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 15:41:49 2017 (r318455) @@ -898,6 +898,8 @@ &hwlist.pcn; + &hwlist.qlnxe; + &hwlist.qlxgb; &hwlist.qlxgbe; From owner-svn-src-stable@freebsd.org Thu May 18 15:41:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87E54D7391F; Thu, 18 May 2017 15:41:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59700C01; Thu, 18 May 2017 15:41:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfm4i093024; Thu, 18 May 2017 15:41:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfm2F093023; Thu, 18 May 2017 15:41:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfm2F093023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318453 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:49 -0000 Author: gjb Date: Thu May 18 15:41:48 2017 New Revision: 318453 URL: https://svnweb.freebsd.org/changeset/base/318453 Log: Document r307144, cloudabi 32-bit support on 64-bit envionments. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 14:19:06 2017 (r318452) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:48 2017 (r318453) @@ -507,7 +507,10 @@ Hardware Support -   + The &man.cloudabi.4; driver has been updated to allow + running 32-bit binaries within 64-bit userland environments + when the kernel configuration file has the + COMPAT_CLOUDABI32 option present. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8AE1D73956; Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA664C1A; Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfp9Y093198; Thu, 18 May 2017 15:41:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfpia093197; Thu, 18 May 2017 15:41:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfpia093197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318457 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:53 -0000 Author: gjb Date: Thu May 18 15:41:51 2017 New Revision: 318457 URL: https://svnweb.freebsd.org/changeset/base/318457 Log: Document r312358, alc(4) Killer E2400 support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:50 2017 (r318456) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:51 2017 (r318457) @@ -495,6 +495,10 @@ sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated to firmware version 1.16.26.0. + The &man.alc.4; driver has been updated + to provide support for Atheros® Killer E2400™ + Gigabit ethernet cards. + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:54 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E23AD73962; Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE7C0C34; Thu, 18 May 2017 15:41:53 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfq3d093242; Thu, 18 May 2017 15:41:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfqGj093240; Thu, 18 May 2017 15:41:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfqGj093240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318458 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:54 -0000 Author: gjb Date: Thu May 18 15:41:52 2017 New Revision: 318458 URL: https://svnweb.freebsd.org/changeset/base/318458 Log: Document r314005, alc(4) Killer E2500 support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:51 2017 (r318457) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:52 2017 (r318458) @@ -499,6 +499,11 @@ to provide support for Atheros® Killer E2400™ Gigabit ethernet cards. + The + &man.alc.4; driver has been updated to provide support for + Atheros® Killer E2500™ Gigabit ethernet + cards. + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Thu May 18 15:41:51 2017 (r318457) +++ stable/11/release/doc/share/xml/sponsor.ent Thu May 18 15:41:52 2017 (r318458) @@ -40,6 +40,7 @@ + From owner-svn-src-stable@freebsd.org Thu May 18 15:41:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 913A6D7397E; Thu, 18 May 2017 15:41:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D449C8B; Thu, 18 May 2017 15:41:56 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFftCl093371; Thu, 18 May 2017 15:41:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFftmX093370; Thu, 18 May 2017 15:41:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFftmX093370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318461 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:56 -0000 Author: gjb Date: Thu May 18 15:41:55 2017 New Revision: 318461 URL: https://svnweb.freebsd.org/changeset/base/318461 Log: Clarify the cxgbe(4) firmware update is for T4, T5, and T6 cards. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:54 2017 (r318460) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:55 2017 (r318461) @@ -493,7 +493,7 @@ The &man.cxgbe.4; driver has been updated - to firmware version 1.16.26.0. + to firmware version 1.16.26.0 for T4, T5, and T6 cards. The &man.alc.4; driver has been updated to provide support for Atheros® Killer E2400™ From owner-svn-src-stable@freebsd.org Thu May 18 15:41:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE7FDD73977; Thu, 18 May 2017 15:41:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C98C6C; Thu, 18 May 2017 15:41:55 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfsOH093328; Thu, 18 May 2017 15:41:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfso9093327; Thu, 18 May 2017 15:41:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfso9093327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318460 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:55 -0000 Author: gjb Date: Thu May 18 15:41:54 2017 New Revision: 318460 URL: https://svnweb.freebsd.org/changeset/base/318460 Log: Document r307576, Elantech support added to atkbdc(4). Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:53 2017 (r318459) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:54 2017 (r318460) @@ -529,6 +529,12 @@ userland environments when the kernel configuration file has the COMPAT_CLOUDABI32 option present. + + The &man.atkbdc.4; driver has been + updated to provide support for Elantech® trackpads. To + enable hardware support, add + hw.psm.elantech_support=1 to + &man.loader.conf.5;. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EE61D73994; Thu, 18 May 2017 15:41:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ABE9CA1; Thu, 18 May 2017 15:41:57 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfuh9093415; Thu, 18 May 2017 15:41:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfu2J093413; Thu, 18 May 2017 15:41:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfu2J093413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318462 - in stable/11/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:57 -0000 Author: gjb Date: Thu May 18 15:41:56 2017 New Revision: 318462 URL: https://svnweb.freebsd.org/changeset/base/318462 Log: Document r315330, etherswitch(4) support for RTL8366RB and RTL8366SR. Correct the Netgate sponsor entity while here. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/11/release/doc/share/xml/sponsor.ent Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:55 2017 (r318461) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:56 2017 (r318462) @@ -504,6 +504,10 @@ Atheros® Killer E2500™ Gigabit ethernet cards. + The &man.etherswitch.4; driver has been + updated to support RTL8366RB and RTL8366SR cards. + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. Modified: stable/11/release/doc/share/xml/sponsor.ent ============================================================================== --- stable/11/release/doc/share/xml/sponsor.ent Thu May 18 15:41:55 2017 (r318461) +++ stable/11/release/doc/share/xml/sponsor.ent Thu May 18 15:41:56 2017 (r318462) @@ -46,7 +46,7 @@ - + From owner-svn-src-stable@freebsd.org Thu May 18 15:41:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 193F6D73934; Thu, 18 May 2017 15:41:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEA38C0E; Thu, 18 May 2017 15:41:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfoZc093155; Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfoOi093154; Thu, 18 May 2017 15:41:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfoOi093154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318456 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:52 -0000 Author: gjb Date: Thu May 18 15:41:50 2017 New Revision: 318456 URL: https://svnweb.freebsd.org/changeset/base/318456 Log: Document r311506, cxgbe(4) firmware version 1.16.26.0. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:49 2017 (r318455) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:50 2017 (r318456) @@ -491,6 +491,10 @@ providing support for Broadcom® NetXtreme-C™ and NetXtreme-E™ devices. + The &man.cxgbe.4; driver has been updated + to firmware version 1.16.26.0. + The &man.qlnxe.4; driver has been added, providing support for Cavium® Qlogic™ 45000 Series adapters. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:54 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6860D73966; Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9645DC49; Thu, 18 May 2017 15:41:54 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfrhS093285; Thu, 18 May 2017 15:41:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfrxl093284; Thu, 18 May 2017 15:41:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfrxl093284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318459 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:54 -0000 Author: gjb Date: Thu May 18 15:41:53 2017 New Revision: 318459 URL: https://svnweb.freebsd.org/changeset/base/318459 Log: Add missing revision for cloudabi 32-bit support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:52 2017 (r318458) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:53 2017 (r318459) @@ -524,10 +524,11 @@ Hardware Support - The &man.cloudabi.4; driver has been updated to allow - running 32-bit binaries within 64-bit userland environments - when the kernel configuration file has the - COMPAT_CLOUDABI32 option present. + The &man.cloudabi.4; driver has been + updated to allow running 32-bit binaries within 64-bit + userland environments when the kernel configuration file has + the COMPAT_CLOUDABI32 option + present. From owner-svn-src-stable@freebsd.org Thu May 18 15:42:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08A4ED739C9; Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF8A0D00; Thu, 18 May 2017 15:41:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfwbi093545; Thu, 18 May 2017 15:41:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfwVO093544; Thu, 18 May 2017 15:41:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfwVO093544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318465 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:42:00 -0000 Author: gjb Date: Thu May 18 15:41:58 2017 New Revision: 318465 URL: https://svnweb.freebsd.org/changeset/base/318465 Log: Document r311686, bsdinstall(8) hidden wifi network support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:57 2017 (r318464) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:58 2017 (r318465) @@ -314,7 +314,9 @@ Installation and Configuration Tools -   + The &man.bsdinstall.8; installer has + been updated to include support for hidden wireless networks + when configuring the &man.wlan.4; interface. From owner-svn-src-stable@freebsd.org Thu May 18 15:41:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63340D7399A; Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32505CCD; Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfvNL093459; Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfv2o093458; Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfv2o093458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318463 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:58 -0000 Author: gjb Date: Thu May 18 15:41:56 2017 New Revision: 318463 URL: https://svnweb.freebsd.org/changeset/base/318463 Log: Document r310852, miibus(4) Microchip/Micrel KSZ9031 support. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:56 2017 (r318462) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:56 2017 (r318463) @@ -491,6 +491,11 @@ providing support for Broadcom® NetXtreme-C™ and NetXtreme-E™ devices. + The &man.miibus.4; driver has been updated + to support Microchip/Micrel KSZ9031 Gigabit ethernet + cards. + The &man.cxgbe.4; driver has been updated to firmware version 1.16.26.0 for T4, T5, and T6 cards. From owner-svn-src-stable@freebsd.org Thu May 18 15:42:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEA0AD739DD; Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1822D25; Thu, 18 May 2017 15:42:00 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfxno093589; Thu, 18 May 2017 15:41:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfx4H093588; Thu, 18 May 2017 15:41:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfx4H093588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318466 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:42:01 -0000 Author: gjb Date: Thu May 18 15:41:59 2017 New Revision: 318466 URL: https://svnweb.freebsd.org/changeset/base/318466 Log: Fix FDP style nits found by igor(1). Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu May 18 15:41:58 2017 (r318465) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu May 18 15:41:59 2017 (r318466) @@ -1,8 +1,8 @@ + "http://www.FreeBSD.org/release/XML/release.ent"> %release; %sponsor; @@ -13,10 +13,10 @@ ]>
+ xmlns:xlink="http://www.w3.org/1999/xlink" + version="5.0"> - &os; &release; Errata + &os; &release; Errata The &os; Project @@ -25,7 +25,8 @@ 2016 - The &os; Documentation Project + The &os; Documentation + Project @@ -37,45 +38,44 @@ This document lists errata items for &os; &release;, - containing significant information discovered after the release - or too late in the release cycle to be otherwise included in the - release documentation. - This information includes security advisories, as well as news - relating to the software or documentation that could affect its - operation or usability. An up-to-date version of this document - should always be consulted before installing this version of + containing significant information discovered after the + release or too late in the release cycle to be otherwise + included in the release documentation. This information + includes security advisories, as well as news relating to the + software or documentation that could affect its operation or + usability. An up-to-date version of this document should + always be consulted before installing this version of &os;. - This errata document for &os; &release; - will be maintained until the release of &os; &release.next;. + This errata document for &os; &release; will be maintained + until the release of &os; &release.next;. Introduction - This errata document contains late-breaking news - about &os; &release; - Before installing this version, it is important to consult this - document to learn about any post-release discoveries or problems - that may already have been found and fixed. + This errata document contains late-breaking + news about &os; &release; Before installing this + version, it is important to consult this document to learn about + any post-release discoveries or problems that may already have + been found and fixed. Any version of this errata document actually distributed with the release (for example, on a CDROM distribution) will be out of date by definition, but other copies are kept updated on the Internet and should be consulted as the current - errata for this release. These other copies of the - errata are located at - , - plus any sites - which keep up-to-date mirrors of this location. + errata for this release. These other copies of the + errata are located at , plus any + sites which keep up-to-date mirrors of this location. Source and binary snapshots of &os; &release.branch; also contain up-to-date copies of this document (as of the time of the snapshot). - For a list of all &os; CERT security advisories, see - . + For a list of all &os; CERT security advisories, see . From owner-svn-src-stable@freebsd.org Thu May 18 15:41:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23AD6D739AE; Thu, 18 May 2017 15:41:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8052CE3; Thu, 18 May 2017 15:41:58 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IFfvnB093502; Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IFfvx0093501; Thu, 18 May 2017 15:41:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181541.v4IFfvx0093501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 15:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318464 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 15:41:59 -0000 Author: gjb Date: Thu May 18 15:41:57 2017 New Revision: 318464 URL: https://svnweb.freebsd.org/changeset/base/318464 Log: Move the ixl(4) entry to the network driver section. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:56 2017 (r318463) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu May 18 15:41:57 2017 (r318464) @@ -471,10 +471,6 @@ The &man.bytgpio.4; driver has been added, providing support for Intel® Bay Trail™ SoC GPIO controllers. - - The &man.ixl.4; driver has been updated - to version 1.7.12-k. @@ -519,6 +515,10 @@ The &man.qlxgbe.4; firmware has been updated to version 5.4.64. + + The &man.ixl.4; driver has been updated + to version 1.7.12-k. From owner-svn-src-stable@freebsd.org Thu May 18 16:24:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4822D73E4D; Thu, 18 May 2017 16:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 727DF1DA4; Thu, 18 May 2017 16:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGOA1M013193; Thu, 18 May 2017 16:24:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGOAIx013191; Thu, 18 May 2017 16:24:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181624.v4IGOAIx013191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318467 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:24:11 -0000 Author: gjb Date: Thu May 18 16:24:10 2017 New Revision: 318467 URL: https://svnweb.freebsd.org/changeset/base/318467 Log: Fix FDP style nits reported by igor(1). Bump copyright year in readme/article.xml. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 15:41:59 2017 (r318466) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:10 2017 (r318467) @@ -1,16 +1,20 @@ %release; %devauto; ]> -
- &os; &release.current; Hardware Notes - +
- The &os; Documentation Project + + &os; &release.current; Hardware Notes + + + The &os; Documentation Project + $FreeBSD$ @@ -33,7 +37,8 @@ 2015 2016 2017 - The &os; Documentation Project + The &os; Documentation + Project @@ -112,8 +117,8 @@ - The single-core &intel; &xeon; - processors Nocona, Irwindale, + The single-core &intel; &xeon; processors + Nocona, Irwindale, Potomac, and Cranford have EM64T support. @@ -132,7 +137,8 @@ - All &intel; ¢rino; Duo and ¢rino; Pro platforms + All &intel; ¢rino; Duo and ¢rino; Pro + platforms @@ -142,11 +148,11 @@ - Some &intel; &pentium; 4s and &celeron; Ds using - the Prescott core have EM64T support. See - the Intel - Processor Spec Finder for the definitive answer about - EM64T support in Intel processors. + Some &intel; &pentium; 4s and &celeron; Ds using the + Prescott core have EM64T support. See the + Intel + Processor Spec Finder for the definitive answer + about EM64T support in Intel processors. @@ -171,14 +177,14 @@ i386 &os;/&arch.i386; runs on a wide variety of IBM PC - compatible machines. Due to the wide range of + compatible machines. Due to the wide range of hardware available for this architecture, it is impossible to exhaustively list all combinations of equipment supported by &os;. Nevertheless, some general guidelines are presented here. Almost all &i386;-compatible processors with a floating - point unit are supported. All &intel; processors beginning + point unit are supported. All &intel; processors beginning with the 80486 are supported, including the 80486, &pentium;, &pentium; Pro, &pentium; II, &pentium; III, &pentium; 4, and variants thereof, such as the &xeon; and &celeron; processors. @@ -248,11 +254,13 @@ (DSDT) provided by each machine's BIOS. Some machines have bad or incomplete DSDTs, which prevents ACPI from functioning correctly. Replacement DSDTs for some machines can be found - at the DSDT - section of the ACPI4Linux project - Web site. &os; can use these DSDTs to override the DSDT - provided by the BIOS; see the &man.acpi.4; manual page for - more information. + at the DSDT + section of the ACPI4Linux + project Web site. &os; can use these DSDTs to override the + DSDT provided by the BIOS; see the &man.acpi.4; manual page + for more information. @@ -287,8 +295,8 @@ powerpc - All Apple PowerPC machines with built-in USB are supported, - as well a limited selection of non-Apple machines, + All Apple PowerPC machines with built-in USB are + supported, as well a limited selection of non-Apple machines, including KVM on POWER7 SMP is supported on all systems with more than @@ -299,8 +307,8 @@ sparc64 This section describes the systems currently known to be - supported by &os; on the Fujitsu &sparc64; and Sun &ultrasparc; - platforms. + supported by &os; on the Fujitsu &sparc64; and Sun + &ultrasparc; platforms. SMP is supported on all systems with more than 1 processor. @@ -310,8 +318,8 @@ supported by the &man.creator.4; (Sun Creator, Sun Creator3D and Sun Elite3D) or &man.machfb.4; (Sun PGX and Sun PGX64 as well as the ATI Mach64 chips found onboard in for example - &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and &sun.ultra; 10) - driver must use the serial console. + &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and + &sun.ultra; 10) driver must use the serial console. If you have a system that is not listed here, it may not have been tested with &os; &release.current;. We encourage @@ -456,10 +464,11 @@ The following systems are partially supported by &os;. In - particular the fiber channel controllers in SBus-based systems are not - supported. However, it is possible to use these with a SCSI controller - supported by the &man.esp.4; driver (Sun ESP SCSI, Sun FAS Fast-SCSI - and Sun FAS366 Fast-Wide SCSI controllers). + particular the fiber channel controllers in SBus-based systems + are not supported. However, it is possible to use these with + a SCSI controller supported by the &man.esp.4; driver (Sun ESP + SCSI, Sun FAS Fast-SCSI and Sun FAS366 Fast-Wide SCSI + controllers). @@ -471,9 +480,9 @@ - Starting with 7.2-RELEASE, &arch.sparc64; systems based on Sun - &ultrasparc; III and beyond are also supported by &os;, which includes - the following known working systems: + Starting with 7.2-RELEASE, &arch.sparc64; systems based on + Sun &ultrasparc; III and beyond are also supported by &os;, + which includes the following known working systems: @@ -501,7 +510,8 @@ - &sun.fire; V215 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V215 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -509,7 +519,8 @@ - &sun.fire; V245 (support first appeared in 7.3-RELEASE and 8.1-RELEASE) + &sun.fire; V245 (support first appeared in 7.3-RELEASE + and 8.1-RELEASE) @@ -522,9 +533,10 @@ - &sun.fire; V480 (501-6780 and 501-6790 centerplanes only, for - which support first appeared in 7.3-RELEASE and 8.1-RELEASE, - other centerplanes might work beginning with 8.3-RELEASE and 9.0-RELEASE) + &sun.fire; V480 (501-6780 and 501-6790 centerplanes + only, for which support first appeared in 7.3-RELEASE and + 8.1-RELEASE, other centerplanes might work beginning with + 8.3-RELEASE and 9.0-RELEASE) @@ -532,8 +544,9 @@ - &sun.fire; V890 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V890 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) @@ -550,14 +563,16 @@ - &sun.fire; V490 (support first appeared in 7.4-RELEASE and 8.1-RELEASE, - non-mixed &ultrasparc; IV/IV+ CPU-configurations only) + &sun.fire; V490 (support first appeared in 7.4-RELEASE + and 8.1-RELEASE, non-mixed &ultrasparc; IV/IV+ + CPU-configurations only) - Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; systems based on - Fujitsu &sparc64; V are also supported by &os;, which - includes the following known working systems: + Starting with 7.4-RELEASE and 8.1-RELEASE, &arch.sparc64; + systems based on Fujitsu &sparc64; V are also supported by + &os;, which includes the following known working + systems: @@ -565,8 +580,8 @@ - The following Fujitsu &primepower; systems are not tested but - believed to be also supported by &os;: + The following Fujitsu &primepower; systems are not tested + but believed to be also supported by &os;: @@ -682,7 +697,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -712,7 +727,7 @@ [&arch.amd64;, &arch.i386;] Booting from these - controllers is supported. EISA adapters are not + controllers is supported. EISA adapters are not supported. @@ -765,8 +780,8 @@ support CD-ROM commands are supported for read-only access by the CD-ROM drivers (such as &man.cd.4;). WORM/CD-R/CD-RW writing support is provided by &man.cdrecord.1;, which is a - part of the sysutils/cdrtools port in the Ports - Collection. + part of the sysutils/cdrtools port in the + Ports Collection. The following CD-ROM type systems are supported at this time: @@ -1020,8 +1035,8 @@ 4965AGN IEEE 802.11n PCI network adapters (&man.iwn.4; driver) - [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE 802.11b/g - PCI network adapters (&man.malo.4; driver) + [&arch.i386;, &arch.amd64;] Marvell Libertas IEEE + 802.11b/g PCI network adapters (&man.malo.4; driver) Marvell 88W8363 IEEE 802.11n wireless network adapters (&man.mwl.4; driver) @@ -1032,8 +1047,8 @@ &hwlist.rsu; - Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless network - adapters (&man.rtwn.4; driver) + Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless + network adapters (&man.rtwn.4; driver) &hwlist.rum; @@ -1147,12 +1162,13 @@ - [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO 2S - and PCI IO 4S + [&arch.amd64;, &arch.i386;] Avlab Technology, PCI IO + 2S and PCI IO 4S - [&arch.amd64;, &arch.i386;] Comtrol RocketPort 550 + [&arch.amd64;, &arch.i386;] Comtrol RocketPort + 550 @@ -1222,7 +1238,7 @@ [&arch.amd64;, &arch.i386;] SIIG Cyber 4S PCI - 16C550/16C650/16C850 + 16C550/16C650/16C850 @@ -1305,7 +1321,7 @@ "flags 0x15000?01" is necessary in kernel - configuration. + configuration. [&arch.pc98;] Media Intelligent RSB-384 (&man.sio.4; @@ -1453,8 +1469,9 @@ - [&arch.amd64;, &arch.i386;, &arch.pc98;] - USB Bluetooth adapters can be found in Bluetooth section. + [&arch.amd64;, &arch.i386;, &arch.pc98;] USB Bluetooth + adapters can be found in Bluetooth section. &hwlist.ohci; @@ -1576,7 +1593,8 @@ Information regarding specific video cards and compatibility with Xorg can be - found at http://www.x.org/. + found at http://www.x.org/. [&arch.amd64;, &arch.i386;, &arch.pc98;] @@ -1631,7 +1649,8 @@ &man.moused.8; has more information on using pointing devices with &os;. Information on using pointing devices - with Xorg can be found at http://www.x.org/. + with Xorg can be found at http://www.x.org/. [&arch.amd64;, &arch.i386;] PC standard @@ -1664,8 +1683,9 @@ [&arch.i386;] Xilinx XC6200-based reconfigurable hardware - cards compatible with the HOT1 from Virtual Computers (xrpu - driver). + cards compatible with the HOT1 from Virtual Computers + (xrpu driver). [&arch.pc98;] Power Management Controller of NEC PC-98 Note (pmc driver) Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 15:41:59 2017 (r318466) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:10 2017 (r318467) @@ -1,10 +1,10 @@ %release; ]> - -
- &os; &release.current; README - +
+ + + &os; &release.current; README The &os; Project @@ -37,7 +39,10 @@ 2013 2014 2015 - The &os; Documentation Project + 2016 + 2017 + The &os; Documentation + Project @@ -48,35 +53,36 @@ &tm-attrib.general; - - This document gives a brief introduction to &os; - &release.current;. It includes some information on how to - obtain &os;, a listing of various ways to contact the &os; - Project, and pointers to some other sources of - information. - + + This document gives a brief introduction to &os; + &release.current;. It includes some information on how to + obtain &os;, a listing of various ways to contact the &os; + Project, and pointers to some other sources of + information. + Introduction - This distribution is a &release.type; of &os; &release.current;, the - latest point along the &release.branch; branch. + This distribution is a &release.type; of &os; + &release.current;, the latest point along the &release.branch; + branch. About &os; &os; is an operating system based on 4.4 BSD Lite for AMD64 and Intel EM64T based PC hardware (&arch.amd64;), - Intel, AMD, Cyrix or NexGen x86 based PC hardware (&arch.i386;), - NEC PC-9801/9821 series PCs and compatibles (&arch.pc98;), - and &ultrasparc; machines (&arch.sparc64;). Versions - for the &arm; (&arch.arm;), &mips; (&arch.mips;), and - &powerpc; (&arch.powerpc;) architectures are currently under - development as well. &os; works with a wide variety of - peripherals and configurations and can be used for everything - from software development to games to Internet Service - Provision. + Intel, AMD, Cyrix or NexGen x86 based PC + hardware (&arch.i386;), NEC PC-9801/9821 series PCs and + compatibles (&arch.pc98;), and &ultrasparc; machines + (&arch.sparc64;). Versions for the &arm; (&arch.arm;), &mips; + (&arch.mips;), and &powerpc; (&arch.powerpc;) architectures + are currently under development as well. &os; works with + a wide variety of peripherals and configurations and can be + used for everything from software development to games to + Internet Service Provision. This release of &os; contains everything you need to run such a system, including full source code for the kernel and @@ -88,61 +94,63 @@ A large collection of third-party ported software (the Ports Collection) is also provided to make it - easy to obtain and install all your favorite traditional &unix; - utilities for &os;. Each port consists of a - set of scripts to retrieve, configure, build, and install a - piece of software, with a single command. Over &os.numports; - ports, from editors to programming languages to graphical - applications, make &os; a powerful and comprehensive operating - environment that extends far beyond what's provided by many - commercial versions of &unix;. Most ports are also available as - pre-compiled packages, which can be quickly - installed from the installation program. + easy to obtain and install all your favorite traditional + &unix; utilities for &os;. Each port consists + of a set of scripts to retrieve, configure, build, and install + a piece of software, with a single command. Over + &os.numports; ports, from editors to programming languages to + graphical applications, make &os; a powerful and comprehensive + operating environment that extends far beyond what's provided + by many commercial versions of &unix;. Most ports are also + available as pre-compiled packages, which can + be quickly installed from the installation program. Target Audience - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; is aimed primarily at early adopters - and various other users who want to get involved with the - ongoing development of &os;. While the &os; development team - tries its best to ensure that each &release.type; works as - advertised, &release.branch; is very much a - work-in-progress. - - The basic requirements for using this &release.type; are - technical proficiency with &os; and an understanding of the - ongoing development process of &os; &release.branch; (as - discussed on the &a.current;). - - For those more interested in doing business with &os; than - in experimenting with new &os; technology, formal releases - (such as &release.prev.stable;) are frequently more appropriate. - Releases undergo a period of testing and quality assurance - checking to ensure high reliability and dependability. - - This &release.type; of &os; is suitable for all users. It - has undergone a period of testing and quality assurance - checking to ensure the highest reliability and - dependability. + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.current;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; is aimed + primarily at early adopters and various other users who want + to get involved with the ongoing development of &os;. While + the &os; development team tries its best to ensure that each + &release.type; works as advertised, &release.branch; is very + much a work-in-progress. + + The basic requirements for using + this &release.type; are technical proficiency with &os; and an + understanding of the ongoing development process of &os; + &release.branch; (as discussed on the &a.current;). + + For those more interested in doing + business with &os; than in experimenting with new &os; + technology, formal releases (such as &release.prev.stable;) + are frequently more appropriate. Releases undergo a period of + testing and quality assurance checking to ensure high + reliability and dependability. + + This &release.type; of &os; is + suitable for all users. It has undergone a period of testing + and quality assurance checking to ensure the highest + reliability and dependability. @@ -166,16 +174,18 @@ Collection, or other extra material. A list of the CDROM and DVD publishers known to the - project are listed in the Obtaining - &os; appendix to the Handbook. + project are listed in the Obtaining + &os; appendix to the Handbook. FTP You can use FTP to retrieve &os; and any or all of its - optional packages from ftp://ftp.FreeBSD.org/, which is the official - &os; release site, or any of its + optional packages from ftp://ftp.FreeBSD.org/, + which is the official &os; release site, or any of its mirrors. Lists of locations that mirror &os; can be found in the @@ -187,8 +197,9 @@ Additional mirror sites are always welcome. Contact freebsd-admin@FreeBSD.org for more details on becoming an official mirror site. You can also find useful - information for mirror sites at the Mirroring - &os; article. + information for mirror sites at the Mirroring &os; + article. Mirrors generally contain the ISO images generally used to create a CDROM of a &os; release. They usually also contain @@ -208,16 +219,18 @@ For any questions or general technical support issues, please send mail to the &a.questions;. - If you're tracking the &release.branch; development efforts, you - must join the &a.current;, in order to - keep abreast of recent developments and changes that may - affect the way you use and maintain the system. - - Being a largely-volunteer effort, the &os; - Project is always happy to have extra hands willing to help—there are already far more desired enhancements than - there is time to implement them. To contact the developers on - technical matters, or with offers of help, please send mail to - the &a.hackers;. + If you're tracking the &release.branch; development + efforts, you must join the &a.current;, + in order to keep abreast of recent developments and changes + that may affect the way you use and maintain the + system. + + Being a largely-volunteer effort, the &os; Project is + always happy to have extra hands willing to help—there + are already far more desired enhancements than there is time + to implement them. To contact the developers on technical + matters, or with offers of help, please send mail to the + &a.hackers;. Please note that these mailing lists can experience significant amounts of traffic. If you @@ -226,13 +239,15 @@ preferable to subscribe instead to the &a.announce;. All of the mailing lists can be freely joined by anyone - wishing to do so. Visit the - &os; Mailman Info Page. This will give you more - information on joining the various lists, accessing archives, - etc. There are a number of mailing lists targeted at special - interest groups not mentioned here; more information can be - obtained either from the Mailman pages or the mailing - lists section of the &os; Web site. + wishing to do so. Visit the &os; Mailman Info + Page. This will give you more information on joining + the various lists, accessing archives, etc. There are + a number of mailing lists targeted at special interest groups + not mentioned here; more information can be obtained either + from the Mailman pages or the mailing + lists section of the &os; Web site. Do not send email to the lists @@ -286,48 +301,48 @@ provided in various formats. Most distributions will include both ASCII text (.TXT) and HTML (.HTM) renditions. Some distributions - may also include other formats such as Portable Document Format - (.PDF). + may also include other formats such as Portable Document + Format (.PDF). - - - README.TXT: This file, which - gives some general information about &os; as well as - some cursory notes about obtaining a - distribution. - - - - RELNOTES.TXT: The release - notes, showing what's new and different in &os; - &release.current; compared to the previous release (&os; - &release.prev;). - - - - HARDWARE.TXT: The hardware - compatibility list, showing devices with which &os; has - been tested and is known to work. - - - - ERRATA.TXT: Release errata. - Late-breaking, post-release information can be found in - this file, which is principally applicable to releases - (as opposed to snapshots). It is important to consult - this file before installing a release of &os;, as it - contains the latest information on problems which have - been found and fixed since the release was - created. - - - + + + README.TXT: This file, which + gives some general information about &os; as well as + some cursory notes about obtaining a + distribution. + + + + RELNOTES.TXT: The release + notes, showing what's new and different in &os; + &release.current; compared to the previous release (&os; + &release.prev;). + + + + HARDWARE.TXT: The hardware + compatibility list, showing devices with which &os; has + been tested and is known to work. + + + + ERRATA.TXT: Release errata. + Late-breaking, post-release information can be found in + this file, which is principally applicable to releases + (as opposed to snapshots). It is important to consult + this file before installing a release of &os;, as it + contains the latest information on problems which have + been found and fixed since the release was + created. + + On platforms that support &man.bsdinstall.8; (currently - &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the - Documentation menu during installation. Once the system is - installed, you can revisit this menu by re-running the - &man.bsdinstall.8; utility. + &arch.amd64;, &arch.i386;, &arch.pc98;, and &arch.sparc64;), + these documents are generally available via the Documentation + menu during installation. Once the system is installed, you + can revisit this menu by re-running the &man.bsdinstall.8; + utility. It is extremely important to read the errata for any @@ -338,8 +353,9 @@ other copies are kept updated on the Internet and should be consulted as the current errata for this release. These other copies of the errata are located at - &url.base;/releases/ (as - well as any sites which keep up-to-date mirrors of this + &url.base;/releases/ + (as well as any sites which keep up-to-date mirrors of this location). @@ -347,18 +363,19 @@ Manual Pages - As with almost all &unix; like operating systems, &os; comes - with a set of on-line manual pages, accessed through the - &man.man.1; command or through the hypertext manual - pages gateway on the &os; Web site. In general, the - manual pages provide information on the different commands and - APIs available to the &os; user. + As with almost all &unix; like operating systems, &os; + comes with a set of on-line manual pages, accessed through the + &man.man.1; command or through the hypertext + manual pages gateway on the &os; Web site. In + general, the manual pages provide information on the different + commands and APIs available to the &os; user. In some cases, manual pages are written to give information on particular topics. Notable examples of such - manual pages are &man.tuning.7; (a guide to performance tuning), - &man.security.7; (an introduction to &os; security), and - &man.style.9; (a style guide to kernel coding). + manual pages are &man.tuning.7; (a guide to performance + tuning), &man.security.7; (an introduction to &os; security), + and &man.style.9; (a style guide to kernel coding). @@ -366,31 +383,34 @@ Two highly-useful collections of &os;-related information, maintained by the &os; Project, - are the &os; Handbook and &os; FAQ (Frequently Asked - Questions document). On-line versions of the Handbook - and FAQ - are always available from the &os; Documentation - page or its mirrors. If you install the + are the &os; Handbook and &os; FAQ (Frequently Asked Questions + document). On-line versions of the Handbook and FAQ are always + available from the &os; Documentation + page or its mirrors. If you install the doc distribution set, you can use a Web browser to read the Handbook and FAQ locally. In particular, note that the Handbook contains a step-by-step guide to installing &os;. A number of on-line books and articles, also maintained by - the &os; Project, cover more-specialized, &os;-related topics. - This material spans a wide range of topics, from effective use - of the mailing lists, to dual-booting &os; with other - operating systems, to guidelines for new committers. Like the - Handbook and FAQ, these documents are available from the &os; - Documentation Page or in the doc - distribution set. + the &os; Project, cover more-specialized, &os;-related topics. + This material spans a wide range of topics, from effective use + of the mailing lists, to dual-booting &os; with other + operating systems, to guidelines for new committers. Like the + Handbook and FAQ, these documents are available from the &os; + Documentation Page or in the doc + distribution set. A listing of other books and documents about &os; can be - found in the bibliography - of the &os; Handbook. Because of &os;'s strong &unix; heritage, - many other articles and books written for &unix; systems are - applicable as well, some of which are also listed in the - bibliography. + found in the bibliography + of the &os; Handbook. Because of &os;'s strong &unix; + heritage, many other articles and books written for &unix; + systems are applicable as well, some of which are also listed + in the bibliography. @@ -399,10 +419,11 @@ &os; represents the cumulative work of many hundreds, if not thousands, of individuals from around the world who have worked - countless hours to bring about this &release.type;. For a - complete list of &os; developers and contributors, please see - Contributors - to &os; on the &os; Web site or any of its + countless hours to bring about this &release.type;. For + a complete list of &os; developers and contributors, please see + Contributors + to &os; on the &os; Web site or any of its mirrors. Special thanks also go to the many thousands of &os; users From owner-svn-src-stable@freebsd.org Thu May 18 16:24:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADD6D73E56; Thu, 18 May 2017 16:24:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE381DA6; Thu, 18 May 2017 16:24:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGOBLW013238; Thu, 18 May 2017 16:24:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGOBPb013236; Thu, 18 May 2017 16:24:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181624.v4IGOBPb013236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:24:13 -0000 Author: gjb Date: Thu May 18 16:24:11 2017 New Revision: 318468 URL: https://svnweb.freebsd.org/changeset/base/318468 Log: Fix grammar nits. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:10 2017 (r318467) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:24:11 2017 (r318468) @@ -555,7 +555,7 @@ The following Sun &ultrasparc; systems are not tested but - believed to be also supported by &os;: + believed to also be supported by &os;: @@ -581,7 +581,7 @@ The following Fujitsu &primepower; systems are not tested - but believed to be also supported by &os;: + but believed to also be supported by &os;: @@ -620,11 +620,11 @@ is highly recommended to try to keep the formatting of this section consistent. - We give manpage references using the &man entities where - possible. If a driver has no manpage (and consequently no + We give manual page references using the &man entities where + possible. If a driver has no manual page (and consequently no &man entity, we simply give the name of the driver). Please avoid doing &man entity conversions unless you - know for sure that an entity and manpage exist; sweeps through + know for sure that an entity and manual page exist; sweeps through this file to fix "missed" conversions are likely to break the build. --> Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:10 2017 (r318467) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:11 2017 (r318468) @@ -219,7 +219,7 @@ For any questions or general technical support issues, please send mail to the &a.questions;. - If you're tracking the &release.branch; development + If you are tracking the &release.branch; development efforts, you must join the &a.current;, in order to keep abreast of recent developments and changes that may affect the way you use and maintain the From owner-svn-src-stable@freebsd.org Thu May 18 16:32:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0609D721CB; Thu, 18 May 2017 16:32:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F173689; Thu, 18 May 2017 16:32:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IGWfDi017173; Thu, 18 May 2017 16:32:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IGWf0E017172; Thu, 18 May 2017 16:32:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181632.v4IGWf0E017172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 16:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318469 - stable/11/release/doc/en_US.ISO8859-1/readme X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:32:42 -0000 Author: gjb Date: Thu May 18 16:32:41 2017 New Revision: 318469 URL: https://svnweb.freebsd.org/changeset/base/318469 Log: Prefer https://download.FreeBSD.org as the official release site. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:24:11 2017 (r318468) +++ stable/11/release/doc/en_US.ISO8859-1/readme/article.xml Thu May 18 16:32:41 2017 (r318469) @@ -180,13 +180,21 @@ + HTTPS + + &os; releases may be downloaded via + HTTPS from https://download.FreeBSD.org/, + which is the official &os; release site. + + + FTP You can use FTP to retrieve &os; and any or all of its optional packages from ftp://ftp.FreeBSD.org/, - which is the official &os; release site, or any of its - mirrors. + or any of its mirrors. Lists of locations that mirror &os; can be found in the FTP From owner-svn-src-stable@freebsd.org Thu May 18 16:43:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F171DD72519; Thu, 18 May 2017 16:43:31 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 343A9CBA; Thu, 18 May 2017 16:43:30 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id fae6499b TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 18 May 2017 10:43:29 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Adam Weinberger In-Reply-To: <201705181624.v4IGOBPb013236@repo.freebsd.org> Date: Thu, 18 May 2017 10:43:28 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> To: Glen Barber X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:43:32 -0000 > On 18 May, 2017, at 10:24, Glen Barber wrote: >=20 > Author: gjb > Date: Thu May 18 16:24:11 2017 > New Revision: 318468 > URL: https://svnweb.freebsd.org/changeset/base/318468 >=20 > Log: > Fix grammar nits. >=20 > Sponsored by: The FreeBSD Foundation >=20 > Modified: > stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > stable/11/release/doc/en_US.ISO8859-1/readme/article.xml >=20 > Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml = Thu May 18 16:24:10 2017 (r318467) > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml = Thu May 18 16:24:11 2017 (r318468) > @@ -555,7 +555,7 @@ > >=20 > The following Sun &ultrasparc; systems are not tested but > - believed to be also supported by &os;: > + believed to also be supported by &os;: As long as we're picking grammar nits, you've split an infinitive there. = I think you want "believed also to be supported" or "believed to be = supported by &os; as well:". >=20 > > > @@ -581,7 +581,7 @@ > >=20 > The following Fujitsu &primepower; systems are not tested > - but believed to be also supported by &os;: > + but believed to also be supported by &os;: Same here. # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org From owner-svn-src-stable@freebsd.org Thu May 18 16:53:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A72DD72B1E for ; Thu, 18 May 2017 16:53:05 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E53416FA for ; Thu, 18 May 2017 16:53:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 4ee24c93-3bea-11e7-8c46-c35e37f62db1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 4ee24c93-3bea-11e7-8c46-c35e37f62db1; Thu, 18 May 2017 16:51:59 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v4IGr2vo001612; Thu, 18 May 2017 10:53:02 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1495126382.93532.17.camel@freebsd.org> Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Ian Lepore To: Adam Weinberger , Glen Barber Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Date: Thu, 18 May 2017 10:53:02 -0600 In-Reply-To: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 16:53:05 -0000 On Thu, 2017-05-18 at 10:43 -0600, Adam Weinberger wrote: > > > > On 18 May, 2017, at 10:24, Glen Barber wrote: > > > > Author: gjb > > Date: Thu May 18 16:24:11 2017 > > New Revision: 318468 > > URL: https://svnweb.freebsd.org/changeset/base/318468 > > > > Log: > >  Fix grammar nits. > > > >  Sponsored by: The FreeBSD Foundation > > > > Modified: > >  stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > >  stable/11/release/doc/en_US.ISO8859-1/readme/article.xml > > > > Modified: stable/11/release/doc/en_US.ISO8859- > > 1/hardware/article.xml > > =================================================================== > > =========== > > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > Thu May 18 16:24:10 2017 (r318467) > > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > Thu May 18 16:24:11 2017 (r318468) > > @@ -555,7 +555,7 @@ > >        > > > >       The following Sun &ultrasparc; systems are not tested > > but > > - believed to be also supported by &os;: > > + believed to also be supported by &os;: > As long as we're picking grammar nits, you've split an infinitive > there. I think you want "believed also to be supported" or "believed > to be supported by &os; as well:". > > > > > > >        > > > > @@ -581,7 +581,7 @@ > >        > > > >       The following Fujitsu &primepower; systems are not > > tested > > - but believed to be also supported by &os;: > > + but believed to also be supported by &os;: > Same here. > > # Adam There is no rule of grammar forbidding split infinitives, and the style opinion which disfavored them for many years is itself no longer in favor.  Like the old "don't end a sentence with a preposition" this is just a thing many of us learned in school that turned out to be widespread prejudice, not an actual rule of grammar. -- Ian From owner-svn-src-stable@freebsd.org Thu May 18 17:01:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADCB0D72F3C; Thu, 18 May 2017 17:01:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F6CD1D6A; Thu, 18 May 2017 17:01:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IH1QUO026203; Thu, 18 May 2017 17:01:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IH1QDu026202; Thu, 18 May 2017 17:01:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181701.v4IH1QDu026202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 17:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318470 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:01:27 -0000 Author: gjb Date: Thu May 18 17:01:26 2017 New Revision: 318470 URL: https://svnweb.freebsd.org/changeset/base/318470 Log: Further refine grammar. Submitted by: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 16:32:41 2017 (r318469) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May 18 17:01:26 2017 (r318470) @@ -555,7 +555,7 @@ The following Sun &ultrasparc; systems are not tested but - believed to also be supported by &os;: + believed to be supported by &os; as well: @@ -581,7 +581,7 @@ The following Fujitsu &primepower; systems are not tested - but believed to also be supported by &os;: + but believed to be supported by &os; as well: From owner-svn-src-stable@freebsd.org Thu May 18 17:03:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1B8AD730F5; Thu, 18 May 2017 17:03:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B2B010A; Thu, 18 May 2017 17:03:08 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 5783E5A13; Thu, 18 May 2017 17:03:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 18 May 2017 17:03:05 +0000 From: Glen Barber To: Adam Weinberger Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme Message-ID: <20170518170305.GC49693@FreeBSD.org> References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vOmOzSkFvhd7u8Ms" Content-Disposition: inline In-Reply-To: <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> X-Operating-System: FreeBSD 11.0-STABLE amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer X-Spidey-Sense: Uh oh, Peter logged in User-Agent: Mutt/1.8.2 (2017-04-18) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:03:08 -0000 --vOmOzSkFvhd7u8Ms Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, May 18, 2017 at 10:43:28AM -0600, Adam Weinberger wrote: > > On 18 May, 2017, at 10:24, Glen Barber wrote: > >=20 > > Author: gjb > > Date: Thu May 18 16:24:11 2017 > > New Revision: 318468 > > URL: https://svnweb.freebsd.org/changeset/base/318468 > >=20 > > Log: > > Fix grammar nits. > >=20 > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > stable/11/release/doc/en_US.ISO8859-1/readme/article.xml > >=20 > > Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May = 18 16:24:10 2017 (r318467) > > +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Thu May = 18 16:24:11 2017 (r318468) > > @@ -555,7 +555,7 @@ > > > >=20 > > The following Sun &ultrasparc; systems are not tested but > > - believed to be also supported by &os;: > > + believed to also be supported by &os;: >=20 > As long as we're picking grammar nits, you've split an infinitive there. = I think you want "believed also to be supported" or "believed to be support= ed by &os; as well:". >=20 I like the wording from your second suggestion better anyway. Thanks. Glen --vOmOzSkFvhd7u8Ms Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlkd08QACgkQAxRYpUeP 4pO1kQ/9GRlSHIL0Jn0RAr7AMCFyhEqII9rfTfTErW1ltDrVGLcVWiF83eiCT5SE zrGq6kyWL6abKQKIhFJ0+i27s6IwXBgZ7I3dVB1djrhdLEr5Tlhh3mHxT8BbvApQ 9aZWufOzISL+dLnwZl3MW0raOC0mSXhm8FLECWNZgBxh1CxjYu0A0PsL7nrXgE9b PNY927CvbdcASgmZEqxb6Nk7CDCMlTwTNDuzyDKwMB4pvxBgNtmHY8qPT6VeVAid vqmpsW9iP1meKcDC4wI4meWBnfOK6DwKNY3mrIeoTbQXCWc59V5j55Zsd/OX2TYn D3F/7oxOQ0LTWhfHSht1kAb3voqp+nrw6yGJHJK/okCOEae6Odlv6tF/VqmtPUMU G8LOetd7QZXHn4GzaEna+eFutw86jn9/dlnJSqhrpjLRRCOQ9A8j3YwpoIBrqVcq b21RkEtAzJ0u82Z0G2VohV6gFIV4cwPk2MaqafbHX2hXXtzf6j1+T0uiXc+aVJlC zJsD8KhcQ1uplD1bmo956bVG/NjQijC+7+ZSPLuNJ/remRRa7LPRwzNrPQmY4VEJ ZoCQ+DQEOw2bvpB7CbX6rq6GtcHhVXU/7SU2VtL/t6gEFC0PVUprI2Pko5r/o90r IC29pDT/CdYdoc8ApTjJmawIlfbeMw3dIpUVAu6AU6bhZfYkSp0= =j28E -----END PGP SIGNATURE----- --vOmOzSkFvhd7u8Ms-- From owner-svn-src-stable@freebsd.org Thu May 18 17:09:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3472AD732BA; Thu, 18 May 2017 17:09:20 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from apnoea.adamw.org (apnoea.adamw.org [104.225.5.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "apnoea.adamw.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7813969E; Thu, 18 May 2017 17:09:18 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by apnoea.adamw.org (OpenSMTPD) with ESMTPSA id daae5adb TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 18 May 2017 11:09:17 -0600 (MDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r318468 - in stable/11/release/doc/en_US.ISO8859-1: hardware readme From: Adam Weinberger In-Reply-To: <1495126382.93532.17.camel@freebsd.org> Date: Thu, 18 May 2017 11:09:15 -0600 Cc: Glen Barber , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-11@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201705181624.v4IGOBPb013236@repo.freebsd.org> <83CC5C29-230F-4033-B2A6-90E81D403A79@adamw.org> <1495126382.93532.17.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:09:20 -0000 > On 18 May, 2017, at 10:53, Ian Lepore wrote: >=20 > On Thu, 2017-05-18 at 10:43 -0600, Adam Weinberger wrote: >>>=20 >>> On 18 May, 2017, at 10:24, Glen Barber wrote: >>>=20 >>> Author: gjb >>> Date: Thu May 18 16:24:11 2017 >>> New Revision: 318468 >>> URL: https://svnweb.freebsd.org/changeset/base/318468 >>>=20 >>> Log: >>> Fix grammar nits. >>>=20 >>> Sponsored by: The FreeBSD Foundation >>>=20 >>> Modified: >>> stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml >>> stable/11/release/doc/en_US.ISO8859-1/readme/article.xml >>>=20 >>> Modified: stable/11/release/doc/en_US.ISO8859- >>> 1/hardware/article.xml >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml=09 >>> Thu May 18 16:24:10 2017 (r318467) >>> +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml=09 >>> Thu May 18 16:24:11 2017 (r318468) >>> @@ -555,7 +555,7 @@ >>> >>>=20 >>> The following Sun &ultrasparc; systems are not tested >>> but >>> - believed to be also supported by &os;: >>> + believed to also be supported by &os;: >> As long as we're picking grammar nits, you've split an infinitive >> there. I think you want "believed also to be supported" or "believed >> to be supported by &os; as well:". >>=20 >>>=20 >>>=20 >>> >>> >>> @@ -581,7 +581,7 @@ >>> >>>=20 >>> The following Fujitsu &primepower; systems are not >>> tested >>> - but believed to be also supported by &os;: >>> + but believed to also be supported by &os;: >> Same here. >>=20 >> # Adam >=20 > There is no rule of grammar forbidding split infinitives, and the = style > opinion which disfavored them for many years is itself no longer in > favor. Like the old "don't end a sentence with a preposition" this is > just a thing many of us learned in school that turned out to be > widespread prejudice, not an actual rule of grammar. I did not know that! If Mr. Gould's 6th grade English class was a lie, I = just don't know who to trust in this world anymore. # Adam --=20 Adam Weinberger adamw@adamw.org https://www.adamw.org From owner-svn-src-stable@freebsd.org Thu May 18 17:40:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04A50D73FEF; Thu, 18 May 2017 17:40:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBEA41FA5; Thu, 18 May 2017 17:40:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHeUiG042262; Thu, 18 May 2017 17:40:30 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHeUHA042257; Thu, 18 May 2017 17:40:30 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705181740.v4IHeUHA042257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 18 May 2017 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318472 - in stable/11: . share/mk tools/build/options X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:40:32 -0000 Author: emaste Date: Thu May 18 17:40:30 2017 New Revision: 318472 URL: https://svnweb.freebsd.org/changeset/base/318472 Log: MFC LLD changes and enable LLD as /usr/bin/ld on arm64 by default MFC r316629: do not require binutils port when using lld as ld r279908 added logic to Makefile.inc1 to automatically set CROSS_BINUTILS_PREFIX for architectures not supported by the in-tree binutils: arm64 when first introduced, and later riscv64 as well. LLVM's LLD linker is now included in the base system, and is enabled by default for arm64 and capable of linking world and kernel. Thus, avoid automatically setting CROSS_BINUTILS_PREFIX and requiring the binutils port if WITH_LLD_IS_LD is true. -- MFC r317608: revert r313473 (Disable LLD_IS_LD option combinations that fail) r316647 corrected the build of tblgen and libllvm as dependencies for LLD so undo the temporary seat-belt. We still want to extend the build infrastructure to automatically detect the case where the host LLD can be used instead of building a bootstrap LLD, and likely extend libllvmminimal to meet LLD's needs for cases where the build includes LLD but not Clang. -- MFC r316684: Make WITHOUT_TOOLCHAIN imply WITHOUT_LLD. LLD is a toolchain component. -- MFC r316647: Introduce LLD_BOOTSTRAP to control lld as bootstrap linker Add WITH_LLD_BOOTSTRAP and WITHOUT_LLD_BOOTSTRAP knobs, similar to the Clang bootstrap knobs. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10793 Added: stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP - copied unchanged from r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP stable/11/tools/build/options/WITH_LLD_BOOTSTRAP - copied unchanged from r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP Modified: stable/11/Makefile.inc1 stable/11/UPDATING stable/11/share/mk/src.opts.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu May 18 17:15:58 2017 (r318471) +++ stable/11/Makefile.inc1 Thu May 18 17:40:30 2017 (r318472) @@ -195,10 +195,11 @@ CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN .endif # If we do not have a bootstrap binutils (because the in-tree one does not # support the target architecture), provide a default cross-binutils prefix. -# This allows aarch64 builds, for example, to automatically use the -# aarch64-binutils port or package. +# This allows riscv64 builds, for example, to automatically use the +# riscv64-binutils port or package. .if !make(showconfig) .if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ + ${MK_LLD_BOOTSTRAP} == "no" && \ !defined(CROSS_BINUTILS_PREFIX) CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ .if !exists(${CROSS_BINUTILS_PREFIX}) @@ -1666,9 +1667,10 @@ ${_bt}-usr.bin/yacc: ${_bt}-lib/liby _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tblgen when we're building clang either as -# the bootstrap compiler, or as the part of the normal build. -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" +# We need to build tblgen when we're building clang or lld, either as +# bootstrap tools, or as the part of the normal build. +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \ + ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no" _clang_tblgen= \ lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen \ @@ -1832,9 +1834,6 @@ _elftctools= lib/libelftc \ # cross-build on a FreeBSD 10 host: _elftctools+= usr.bin/addr2line .endif -.if ${MK_LLD_IS_LD} != "no" -_lld= usr.bin/clang/lld -.endif .elif ${TARGET_ARCH} != ${MACHINE_ARCH} && ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no" # If cross-building with an external binutils we still need to build strip for # the target (for at least crunchide). @@ -1845,6 +1844,11 @@ _elftctools= lib/libelftc \ .if ${MK_CLANG_BOOTSTRAP} != "no" _clang= usr.bin/clang +.endif +.if ${MK_LLD_BOOTSTRAP} != "no" +_lld= usr.bin/clang/lld +.endif +.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif .if ${MK_GCC_BOOTSTRAP} != "no" Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Thu May 18 17:15:58 2017 (r318471) +++ stable/11/UPDATING Thu May 18 17:40:30 2017 (r318472) @@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITH the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20170518: + arm64 builds now use the base system LLD 4.0.0 linker by default, + instead of requiring that the aarch64-binutils port or package be + installed. To continue using aarch64-binutils, set + CROSS_BINUTILS_PREFIX=/usr/local/aarch64-freebsd/bin . + 20170511: The mmcsd.ko module now additionally depends on geom_flashmap.ko. Also, mmc.ko and mmcsd.ko need to be a matching pair built from the Modified: stable/11/share/mk/src.opts.mk ============================================================================== --- stable/11/share/mk/src.opts.mk Thu May 18 17:15:58 2017 (r318471) +++ stable/11/share/mk/src.opts.mk Thu May 18 17:40:30 2017 (r318472) @@ -247,9 +247,9 @@ BROKEN_OPTIONS+=TESTS # "undefined ref BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif .if ${__T} == "aarch64" -__DEFAULT_YES_OPTIONS+=LLD_IS_LD +__DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else -__DEFAULT_NO_OPTIONS+=LLD_IS_LD +__DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLDB @@ -306,16 +306,6 @@ MK_LDNS_UTILS:= no MK_UNBOUND:= no .endif -.if ${MK_LLD} == "no" -MK_LLD_IS_LD:= no -.endif - -# LLD requires LLVM libraries, and we do not yet compare in-tree and host LLD -# versions to avoid building it if they are identical. -.if ${MK_LLD_IS_LD} != "no" -MK_SYSTEM_COMPILER:= no -.endif - .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no @@ -383,6 +373,7 @@ MK_CLANG:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no +MK_LLD:= no MK_LLDB:= no .endif Copied: stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP (from r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITHOUT_LLD_BOOTSTRAP Thu May 18 17:40:30 2017 (r318472, copy of r316647, head/tools/build/options/WITHOUT_LLD_BOOTSTRAP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. Copied: stable/11/tools/build/options/WITH_LLD_BOOTSTRAP (from r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tools/build/options/WITH_LLD_BOOTSTRAP Thu May 18 17:40:30 2017 (r318472, copy of r316647, head/tools/build/options/WITH_LLD_BOOTSTRAP) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build the LLD linker during the bootstrap phase of the build. From owner-svn-src-stable@freebsd.org Thu May 18 17:44:47 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20BD4D702F0; Thu, 18 May 2017 17:44:47 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59AB785; Thu, 18 May 2017 17:44:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IHijXw046238; Thu, 18 May 2017 17:44:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IHijK6046237; Thu, 18 May 2017 17:44:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705181744.v4IHijK6046237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 18 May 2017 17:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318473 - stable/11/share/man/man5 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 17:44:47 -0000 Author: emaste Date: Thu May 18 17:44:45 2017 New Revision: 318473 URL: https://svnweb.freebsd.org/changeset/base/318473 Log: regen src.conf(5) after r318472 Modified: stable/11/share/man/man5/src.conf.5 Modified: stable/11/share/man/man5/src.conf.5 ============================================================================== --- stable/11/share/man/man5/src.conf.5 Thu May 18 17:40:30 2017 (r318472) +++ stable/11/share/man/man5/src.conf.5 Thu May 18 17:44:45 2017 (r318473) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd May 15, 2017 +.Dd May 18, 2017 .Dt SRC.CONF 5 .Os .Sh NAME @@ -880,12 +880,6 @@ Set to not build LLVM's lld linker. .Pp It is a default setting on mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. -When set, it also enforces the following options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_LLD_IS_LD -.El .It Va WITH_LLD Set to build LLVM's lld linker. .Pp @@ -901,6 +895,19 @@ Set to build the LLDB debugger. .Pp It is a default setting on amd64/amd64 and arm64/aarch64. +.It Va WITHOUT_LLD_BOOTSTRAP +Set to not build the LLD linker during the bootstrap phase of +the build. +To be able to build the system, either Binutils or LLD bootstrap must be +enabled unless an alternate linker is provided via XLD. +.Pp +It is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITH_LLD_BOOTSTRAP +Set to build the LLD linker during the bootstrap phase of the build. +.Pp +It is a default setting on +arm64/aarch64. .It Va WITHOUT_LLD_IS_LD Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp @@ -911,14 +918,6 @@ Set to use LLVM's LLD as the system link .Pp It is a default setting on arm64/aarch64. -When set, the following options are also in effect: -.Pp -.Bl -inset -compact -.It Va WITHOUT_SYSTEM_COMPILER -(unless -.Va WITH_SYSTEM_COMPILER -is set explicitly) -.El .It Va WITHOUT_LLVM_LIBUNWIND Set to use GCC's stack unwinder (instead of LLVM's libunwind). .Pp @@ -1327,24 +1326,6 @@ The and .Va WITHOUT_GCC options control those. -.Pp -It is a default setting on -arm64/aarch64. -.It Va WITH_SYSTEM_COMPILER -Set to opportunistically skip building a cross-compiler during the -bootstrap phase of the build. -If the currently installed compiler matches the planned bootstrap compiler -type and revision, then it will not be built. -This does not prevent a compiler from being built for installation though, -only for building one for the build itself. -The -.Va WITHOUT_CLANG -and -.Va WITHOUT_GCC -options control those. -.Pp -It is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, pc98/i386, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_TALK Set to not build or install .Xr talk 1 @@ -1421,6 +1402,8 @@ When set, it also enforces the following .It .Va WITHOUT_INCLUDES .It +.Va WITHOUT_LLD +.It .Va WITHOUT_LLDB .El .It Va WITHOUT_UNBOUND From owner-svn-src-stable@freebsd.org Thu May 18 18:18:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A73C6D70CDA; Thu, 18 May 2017 18:18:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1341A60; Thu, 18 May 2017 18:18:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIIdMn058857; Thu, 18 May 2017 18:18:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIIdL9058855; Thu, 18 May 2017 18:18:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705181818.v4IIIdL9058855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 18 May 2017 18:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318475 - stable/11/release/doc/en_US.ISO8859-1/installation X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:18:40 -0000 Author: gjb Date: Thu May 18 18:18:39 2017 New Revision: 318475 URL: https://svnweb.freebsd.org/changeset/base/318475 Log: Add the installation/article.xml for installation.html. This is not yet connected to the build. Sponsored by: The FreeBSD Foundation Added: stable/11/release/doc/en_US.ISO8859-1/installation/ stable/11/release/doc/en_US.ISO8859-1/installation/Makefile (contents, props changed) stable/11/release/doc/en_US.ISO8859-1/installation/article.xml (contents, props changed) Added: stable/11/release/doc/en_US.ISO8859-1/installation/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/release/doc/en_US.ISO8859-1/installation/Makefile Thu May 18 18:18:39 2017 (r318475) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +RELN_ROOT?= ${.CURDIR}/../.. +.ifdef NO_LANGCODE_IN_DESTDIR +DESTDIR?= ${DOCDIR}/installation +.else +DESTDIR?= ${DOCDIR}/en_US.ISO8859-1/installation +.endif + +DOC?= article +FORMATS?= html +INSTALL_COMPRESSED?= gz +INSTALL_ONLY_COMPRESSED?= + +# SGML content +SRCS+= article.xml + +.include "${RELN_ROOT}/share/mk/doc.relnotes.mk" +.include "${DOC_PREFIX}/share/mk/doc.project.mk" Added: stable/11/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/release/doc/en_US.ISO8859-1/installation/article.xml Thu May 18 18:18:39 2017 (r318475) @@ -0,0 +1,129 @@ + + +%release; + +]> + +
+ + + &os; &release.current; Installation + Instructions + + + The &os; Project + + + $FreeBSD$ + + + 2017 + The &os; Documentation + Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + This article gives some brief instructions on installing + &os; &release.current; and upgrading the systems running + earlier releases. + + + + + Installing &os; + + The Installing + &os; chapter of the &os; Handbook + provides more in-depth information about the installation + program itself, including a guided walk-through with + screenshots. + + + + Upgrading &os; + + If you are upgrading from a previous release of &os;, please + read upgrading + section in the Release Notes for notable + incompatibilities carefully. + + + Upgrading from Source + + The procedure for doing a source code based update is + described in and + . + + For SVN use the releng/&local.rel; + branch which will be where any upcoming Security Advisories or + Errata Notices will be applied. + + + + Upgrading Using <quote>&os; Update</quote> + + The &man.freebsd-update.8; utility supports binary + upgrades of &arch.i386; and &arch.amd64; systems running + earlier FreeBSD releases. Systems running + 10.3-RELEASE, + 11.0-RELEASE can upgrade as follows: + + &prompt.root; freebsd-update fetch +&prompt.root; freebsd-update install + + Now the &man.freebsd-update.8; utility can fetch bits + belonging to &release.current;. During this process + &man.freebsd-update.8; will ask for help in merging + configuration files. + + &prompt.root; freebsd-update upgrade -r &local.rel;-RELEASE + + &prompt.root; freebsd-update install + + The system must now be rebooted with the newly installed + kernel before the non-kernel components are updated. + + &prompt.root; shutdown -r now + + After rebooting, &man.freebsd-update.8; needs to be run + again to install the new userland components: + + &prompt.root; freebsd-update install + + At this point, users of systems being upgraded from + earlier &os; releases will be prompted by + &man.freebsd-update.8; to rebuild all third-party applications + (e.g., ports installed from the ports tree) due to updates in + system libraries. + + After updating installed third-party applications (and + again, only if &man.freebsd-update.8; printed a message + indicating that this was necessary), run + &man.freebsd-update.8; again so that it can delete the old (no + longer used) system libraries: + + &prompt.root; freebsd-update install + + Finally, reboot into &release.current; + + &prompt.root; shutdown -r now + + +
From owner-svn-src-stable@freebsd.org Thu May 18 18:39:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46F3CD716CA; Thu, 18 May 2017 18:39:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 184EACAC; Thu, 18 May 2017 18:39:25 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IIdOgR067292; Thu, 18 May 2017 18:39:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IIdOWv067291; Thu, 18 May 2017 18:39:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705181839.v4IIdOWv067291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 18 May 2017 18:39:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318480 - stable/11/sys/boot/efi/loader X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 18:39:25 -0000 Author: markj Date: Thu May 18 18:39:23 2017 New Revision: 318480 URL: https://svnweb.freebsd.org/changeset/base/318480 Log: MFC r318193: Set the right variable when overriding the default console speed. Modified: stable/11/sys/boot/efi/loader/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/loader/main.c ============================================================================== --- stable/11/sys/boot/efi/loader/main.c Thu May 18 18:37:19 2017 (r318479) +++ stable/11/sys/boot/efi/loader/main.c Thu May 18 18:39:23 2017 (r318480) @@ -314,7 +314,7 @@ main(int argc, CHAR16 *argv[]) } else { cpy16to8(&argv[i + 1][0], var, sizeof(var)); - setenv("comconsole_speedspeed", var, 1); + setenv("comconsole_speed", var, 1); } i++; break; From owner-svn-src-stable@freebsd.org Thu May 18 19:47:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 241EBD73C25; Thu, 18 May 2017 19:47:48 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5C2716AD; Thu, 18 May 2017 19:47:47 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJlkYL095698; Thu, 18 May 2017 19:47:46 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJlhAq095668; Thu, 18 May 2017 19:47:43 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201705181947.v4IJlhAq095668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 18 May 2017 19:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318482 - in stable/11: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchiv... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:47:48 -0000 Author: mm Date: Thu May 18 19:47:43 2017 New Revision: 318482 URL: https://svnweb.freebsd.org/changeset/base/318482 Log: MFC r317782,318181: MFC r317782 (mm): Sync libarchive with vendor Vendor changes (FreeBSD-related): PR 897: add test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes MFC r318181 (ngie) (2): cpio/tests/test_option_lz4: fix a use after free in the failure case Reported by: Coverity (2) Sponsored by: Dell EMC Isilon (2) Added: stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu Modified: stable/11/contrib/libarchive/cpio/cpio.c stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c stable/11/contrib/libarchive/cpio/test/test_option_a.c stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c stable/11/contrib/libarchive/cpio/test/test_option_grzip.c stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c stable/11/contrib/libarchive/cpio/test/test_option_lz4.c stable/11/contrib/libarchive/cpio/test/test_option_lzma.c stable/11/contrib/libarchive/cpio/test/test_option_lzop.c stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c stable/11/contrib/libarchive/cpio/test/test_option_xz.c stable/11/contrib/libarchive/cpio/test/test_option_y.c stable/11/contrib/libarchive/cpio/test/test_option_z.c stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c stable/11/contrib/libarchive/libarchive/archive_getdate.c stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h stable/11/contrib/libarchive/libarchive/archive_read.c stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/11/contrib/libarchive/libarchive/archive_string.c stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/11/contrib/libarchive/libarchive/libarchive_changes.3 stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c stable/11/contrib/libarchive/libarchive/test/test_write_format_pax.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_compression_store.c stable/11/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/11/contrib/libarchive/libarchive/xxhash.c stable/11/contrib/libarchive/test_utils/test_main.c stable/11/lib/libarchive/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/11/contrib/libarchive/cpio/cpio.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/cpio.c Thu May 18 19:47:43 2017 (r318482) @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* Modified: stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:47:43 2017 (r318482) @@ -43,17 +43,18 @@ DEFINE_TEST(test_option_Z_upper) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without compress support"); + free(p); return; } failure("-Z option is broken"); assertEqualInt(r, 0); - goto done; + free(p); + return; } free(p); /* Check that the archive file has a compress signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x1f\x9d", 2); -done: free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:47:43 2017 (r318482) @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { Modified: stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:47:43 2017 (r318482) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_grzip.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:47:43 2017 (r318482) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip) systemf("echo f | %s -o --grzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an grzip signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:47:43 2017 (r318482) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_lrzip) systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "LRZI\x00", 5); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:47:43 2017 (r318482) @@ -43,6 +43,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lz4 support"); + free(p); return; } /* POSIX permits different handling of the spawnp @@ -52,6 +53,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't launch") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* Some systems successfully spawn the new process, @@ -61,6 +63,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't write") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* On some systems the error won't be detected until closing @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Error closing") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an lz4 signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x04\x22\x4d\x18", 4); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lzma.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:47:43 2017 (r318482) @@ -43,14 +43,18 @@ DEFINE_TEST(test_option_lzma) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lzma support"); + free(p); return; } failure("--lzma option is broken"); assertEqualInt(r, 0); + free(p); return; } + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x5d\00\00", 3); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_lzop.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:47:43 2017 (r318482) @@ -39,7 +39,7 @@ DEFINE_TEST(test_option_lzop) r = systemf("echo f | %s -o --lzop >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canLzop()) { skipping("lzop is not supported on this platform"); @@ -53,4 +53,5 @@ DEFINE_TEST(test_option_lzop) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:47:43 2017 (r318482) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_xz.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:47:43 2017 (r318482) @@ -44,14 +44,18 @@ DEFINE_TEST(test_option_xz) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without xz support"); + free(p); return; } + free(p); failure("--xz option is broken"); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an xz signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\xFD\x37\x7A\x58\x5A\x00", 6); + free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_y.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:47:43 2017 (r318482) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } assertTextFileContents("1 block\n", "archive.err"); /* Check that the archive file has a bzip2 signature. */ - free(p); p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "BZh9", 4); -done: free(p); } Modified: stable/11/contrib/libarchive/cpio/test/test_option_z.c ============================================================================== --- stable/11/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:47:43 2017 (r318482) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } Modified: stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:47:43 2017 (r318482) @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archiv void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archiv int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; Modified: stable/11/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:47:43 2017 (r318482) @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; Modified: stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:47:43 2017 (r318482) @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void) Modified: stable/11/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:47:43 2017 (r318482) @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, vo len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; Modified: stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:47:43 2017 (r318482) @@ -916,11 +916,10 @@ setup_sparse(struct archive_read_disk *a return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0) { + if (*fd < 0) path = archive_read_disk_entry_setup_path(a, entry, fd); - if (path == NULL) - return (ARCHIVE_FAILED); - } + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -931,6 +930,8 @@ setup_sparse(struct archive_read_disk *a if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { + if (path == NULL) + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:47:43 2017 (r318482) @@ -494,7 +494,7 @@ lz4_filter_read_data_block(struct archiv if (read_buf == NULL) goto truncated_error; compressed_size = archive_le32dec(read_buf); - if ((compressed_size & ~(1 << 31)) > state->flags.block_maximum_size) + if ((compressed_size & 0x7fffffff) > state->flags.block_maximum_size) goto malformed_error; /* A compressed size == 0 means the end of stream blocks. */ if (compressed_size == 0) { @@ -504,8 +504,8 @@ lz4_filter_read_data_block(struct archiv checksum_size = state->flags.block_checksum; /* Check if the block is uncompressed. */ - if (compressed_size & (1 << 31)) { - compressed_size &= ~(1 << 31); + if (compressed_size & 0x80000000U) { + compressed_size &= 0x7fffffff; uncompressed_size = compressed_size; } else uncompressed_size = 0;/* Unknown yet. */ Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:47:43 2017 (r318482) @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffm static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ getdata: static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, siz } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *h const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *h weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *h for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:47:43 2017 (r318482) @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$"); struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:47:43 2017 (r318482) @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, s ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:47:43 2017 (r318482) @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_r static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, st case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, st } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, st strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, st long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, st case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,77 +1823,9 @@ parse_escapes(char *src, struct mtree_en *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - * - * Convert the number pointed to by 'p' into a 64-bit signed integer. - * On return, 'p' points to the first non-digit following the number. - * On overflow, the function returns INT64_MIN or INT64_MAX. - */ -static int64_t -mtree_atol10(char **p) -{ - const int base = 10; - const int64_t limit = INT64_MAX / base; - const int64_t last_digit_limit = INT64_MAX % base; - int64_t l; - int sign; - - if (**p == '-') { - sign = -1; - ++(*p); - } else { - sign = 1; - } - - l = 0; - while (**p >= '0' && **p < '0' + base) { - int digit = **p - '0'; - if (l > limit || (l == limit && digit > last_digit_limit)) { - while (**p >= '0' && **p < '0' + base) { - ++(*p); - } - return (sign < 0) ? INT64_MIN : INT64_MAX; - } - l = (l * base) + digit; - ++(*p); - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1913,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; + int64_t l, limit; + int digit, last_digit_limit; - base = 16; + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* Modified: stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:47:43 2017 (r318482) @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar * return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); Modified: stable/11/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:47:43 2017 (r318482) @@ -202,7 +202,8 @@ archive_string_append(struct archive_str { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); Modified: stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:47:43 2017 (r318482) @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_ "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, con * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } Modified: stable/11/contrib/libarchive/libarchive/libarchive_changes.3 ============================================================================== --- stable/11/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:42:19 2017 (r318481) +++ stable/11/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:47:43 2017 (r318482) @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 Modified: stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c ============================================================================== --- stable/11/contrib/libarchive/libarchive/test/test_read_format_mtree.c Thu May 18 19:42:19 2017 (r318481) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 18 19:50:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28CEBD73CDC; Thu, 18 May 2017 19:50:20 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA71C1831; Thu, 18 May 2017 19:50:19 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IJoIto095879; Thu, 18 May 2017 19:50:18 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IJoFqk095849; Thu, 18 May 2017 19:50:15 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201705181950.v4IJoFqk095849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Thu, 18 May 2017 19:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318483 - in stable/10: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/test_utils lib/libarchiv... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 19:50:20 -0000 Author: mm Date: Thu May 18 19:50:15 2017 New Revision: 318483 URL: https://svnweb.freebsd.org/changeset/base/318483 Log: MFC r317782,318181: MFC r317782 (mm): Sync libarchive with vendor Vendor changes (FreeBSD-related): PR 897: add test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes MFC r318181 (ngie) (2): cpio/tests/test_option_lz4: fix a use after free in the failure case Reported by: Coverity (2) Sponsored by: Dell EMC Isilon (2) Added: stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu - copied unchanged from r317782, head/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu Modified: stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c stable/10/contrib/libarchive/cpio/test/test_option_a.c stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c stable/10/contrib/libarchive/cpio/test/test_option_grzip.c stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c stable/10/contrib/libarchive/cpio/test/test_option_lz4.c stable/10/contrib/libarchive/cpio/test/test_option_lzma.c stable/10/contrib/libarchive/cpio/test/test_option_lzop.c stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c stable/10/contrib/libarchive/cpio/test/test_option_xz.c stable/10/contrib/libarchive/cpio/test/test_option_y.c stable/10/contrib/libarchive/cpio/test/test_option_z.c stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c stable/10/contrib/libarchive/libarchive/archive_getdate.c stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h stable/10/contrib/libarchive/libarchive/archive_read.c stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c stable/10/contrib/libarchive/libarchive/archive_string.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c stable/10/contrib/libarchive/libarchive/libarchive_changes.3 stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c stable/10/contrib/libarchive/libarchive/test/test_write_format_pax.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_compression_store.c stable/10/contrib/libarchive/libarchive/test/test_write_format_zip_large.c stable/10/contrib/libarchive/libarchive/xxhash.c stable/10/contrib/libarchive/test_utils/test_main.c stable/10/lib/libarchive/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/cpio.c Thu May 18 19:50:15 2017 (r318483) @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* Modified: stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_Z_upper.c Thu May 18 19:50:15 2017 (r318483) @@ -43,17 +43,18 @@ DEFINE_TEST(test_option_Z_upper) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without compress support"); + free(p); return; } failure("-Z option is broken"); assertEqualInt(r, 0); - goto done; + free(p); + return; } free(p); /* Check that the archive file has a compress signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x1f\x9d", 2); -done: free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_a.c Thu May 18 19:50:15 2017 (r318483) @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { Modified: stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_b64encode.c Thu May 18 19:50:15 2017 (r318483) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_grzip.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_grzip.c Thu May 18 19:50:15 2017 (r318483) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip) systemf("echo f | %s -o --grzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an grzip signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lrzip.c Thu May 18 19:50:15 2017 (r318483) @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_lrzip) systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "LRZI\x00", 5); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lz4.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lz4.c Thu May 18 19:50:15 2017 (r318483) @@ -43,6 +43,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lz4 support"); + free(p); return; } /* POSIX permits different handling of the spawnp @@ -52,6 +53,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't launch") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* Some systems successfully spawn the new process, @@ -61,6 +63,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't write") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* On some systems the error won't be detected until closing @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Error closing") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an lz4 signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x04\x22\x4d\x18", 4); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lzma.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lzma.c Thu May 18 19:50:15 2017 (r318483) @@ -43,14 +43,18 @@ DEFINE_TEST(test_option_lzma) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lzma support"); + free(p); return; } failure("--lzma option is broken"); assertEqualInt(r, 0); + free(p); return; } + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x5d\00\00", 3); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_lzop.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_lzop.c Thu May 18 19:50:15 2017 (r318483) @@ -39,7 +39,7 @@ DEFINE_TEST(test_option_lzop) r = systemf("echo f | %s -o --lzop >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canLzop()) { skipping("lzop is not supported on this platform"); @@ -53,4 +53,5 @@ DEFINE_TEST(test_option_lzop) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_uuencode.c Thu May 18 19:50:15 2017 (r318483) @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_xz.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_xz.c Thu May 18 19:50:15 2017 (r318483) @@ -44,14 +44,18 @@ DEFINE_TEST(test_option_xz) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without xz support"); + free(p); return; } + free(p); failure("--xz option is broken"); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an xz signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\xFD\x37\x7A\x58\x5A\x00", 6); + free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_y.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_y.c Thu May 18 19:50:15 2017 (r318483) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } assertTextFileContents("1 block\n", "archive.err"); /* Check that the archive file has a bzip2 signature. */ - free(p); p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "BZh9", 4); -done: free(p); } Modified: stable/10/contrib/libarchive/cpio/test/test_option_z.c ============================================================================== --- stable/10/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/cpio/test/test_option_z.c Thu May 18 19:50:15 2017 (r318483) @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } Modified: stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_entry_sparse.c Thu May 18 19:50:15 2017 (r318483) @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archiv void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archiv int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; Modified: stable/10/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_getdate.c Thu May 18 19:50:15 2017 (r318483) @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; Modified: stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_openssl_hmac_private.h Thu May 18 19:50:15 2017 (r318483) @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void) Modified: stable/10/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read.c Thu May 18 19:50:15 2017 (r318483) @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, vo len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; Modified: stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Thu May 18 19:50:15 2017 (r318483) @@ -916,11 +916,10 @@ setup_sparse(struct archive_read_disk *a return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0) { + if (*fd < 0) path = archive_read_disk_entry_setup_path(a, entry, fd); - if (path == NULL) - return (ARCHIVE_FAILED); - } + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -931,6 +930,8 @@ setup_sparse(struct archive_read_disk *a if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { + if (path == NULL) + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c Thu May 18 19:50:15 2017 (r318483) @@ -494,7 +494,7 @@ lz4_filter_read_data_block(struct archiv if (read_buf == NULL) goto truncated_error; compressed_size = archive_le32dec(read_buf); - if ((compressed_size & ~(1 << 31)) > state->flags.block_maximum_size) + if ((compressed_size & 0x7fffffff) > state->flags.block_maximum_size) goto malformed_error; /* A compressed size == 0 means the end of stream blocks. */ if (compressed_size == 0) { @@ -504,8 +504,8 @@ lz4_filter_read_data_block(struct archiv checksum_size = state->flags.block_checksum; /* Check if the block is uncompressed. */ - if (compressed_size & (1 << 31)) { - compressed_size &= ~(1 << 31); + if (compressed_size & 0x80000000U) { + compressed_size &= 0x7fffffff; uncompressed_size = compressed_size; } else uncompressed_size = 0;/* Unknown yet. */ Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c Thu May 18 19:50:15 2017 (r318483) @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffm static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ getdata: static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, siz } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *h const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *h weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *h for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Thu May 18 19:50:15 2017 (r318483) @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$"); struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Thu May 18 19:50:15 2017 (r318483) @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, s ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Thu May 18 19:50:15 2017 (r318483) @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_r static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, st case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, st } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, st if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, st strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, st long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, st case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,77 +1823,9 @@ parse_escapes(char *src, struct mtree_en *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - * - * Convert the number pointed to by 'p' into a 64-bit signed integer. - * On return, 'p' points to the first non-digit following the number. - * On overflow, the function returns INT64_MIN or INT64_MAX. - */ -static int64_t -mtree_atol10(char **p) -{ - const int base = 10; - const int64_t limit = INT64_MAX / base; - const int64_t last_digit_limit = INT64_MAX % base; - int64_t l; - int sign; - - if (**p == '-') { - sign = -1; - ++(*p); - } else { - sign = 1; - } - - l = 0; - while (**p >= '0' && **p < '0' + base) { - int digit = **p - '0'; - if (l > limit || (l == limit && digit > last_digit_limit)) { - while (**p >= '0' && **p < '0' + base) { - ++(*p); - } - return (sign < 0) ? INT64_MIN : INT64_MAX; - } - l = (l * base) + digit; - ++(*p); - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1913,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; + int64_t l, limit; + int digit, last_digit_limit; - base = 16; + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* Modified: stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar.c Thu May 18 19:50:15 2017 (r318483) @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar * return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); Modified: stable/10/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_string.c Thu May 18 19:50:15 2017 (r318483) @@ -202,7 +202,8 @@ archive_string_append(struct archive_str { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); Modified: stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/archive_write_set_format_pax.c Thu May 18 19:50:15 2017 (r318483) @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_ "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, con * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } Modified: stable/10/contrib/libarchive/libarchive/libarchive_changes.3 ============================================================================== --- stable/10/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:47:43 2017 (r318482) +++ stable/10/contrib/libarchive/libarchive/libarchive_changes.3 Thu May 18 19:50:15 2017 (r318483) @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 Modified: stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/test/test_read_format_mtree.c Thu May 18 19:47:43 2017 (r318482) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 18 20:29:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC343D73882; Thu, 18 May 2017 20:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94E6C1056; Thu, 18 May 2017 20:29:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKTlIf012532; Thu, 18 May 2017 20:29:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKTlFU012531; Thu, 18 May 2017 20:29:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182029.v4IKTlFU012531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318485 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:29:49 -0000 Author: trasz Date: Thu May 18 20:29:47 2017 New Revision: 318485 URL: https://svnweb.freebsd.org/changeset/base/318485 Log: MFC r316941: Don't try to write out bufs that have already failed with ENXIO. This fixes some panics after disconnecting mounted disks. Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Thu May 18 20:15:35 2017 (r318484) +++ stable/11/sys/kern/vfs_bio.c Thu May 18 20:29:47 2017 (r318485) @@ -2303,18 +2303,28 @@ brelse(struct buf *bp) bdirty(bp); } if (bp->b_iocmd == BIO_WRITE && (bp->b_ioflags & BIO_ERROR) && + (bp->b_error != ENXIO || !LIST_EMPTY(&bp->b_dep)) && !(bp->b_flags & B_INVAL)) { /* - * Failed write, redirty. Must clear BIO_ERROR to prevent - * pages from being scrapped. + * Failed write, redirty. All errors except ENXIO (which + * means the device is gone) are expected to be potentially + * transient - underlying media might work if tried again + * after EIO, and memory might be available after an ENOMEM. + * + * Do this also for buffers that failed with ENXIO, but have + * non-empty dependencies - the soft updates code might need + * to access the buffer to untangle them. + * + * Must clear BIO_ERROR to prevent pages from being scrapped. */ bp->b_ioflags &= ~BIO_ERROR; bdirty(bp); } else if ((bp->b_flags & (B_NOCACHE | B_INVAL)) || (bp->b_ioflags & BIO_ERROR) || (bp->b_bufsize <= 0)) { /* - * Either a failed read I/O or we were asked to free or not - * cache the buffer. + * Either a failed read I/O, or we were asked to free or not + * cache the buffer, or we failed to write to a device that's + * no longer present. */ bp->b_flags |= B_INVAL; if (!LIST_EMPTY(&bp->b_dep)) From owner-svn-src-stable@freebsd.org Thu May 18 20:31:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DE46D73960; Thu, 18 May 2017 20:31:11 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBA0C12BA; Thu, 18 May 2017 20:31:10 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKV9rX012828; Thu, 18 May 2017 20:31:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKV94V012827; Thu, 18 May 2017 20:31:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182031.v4IKV94V012827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318486 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:31:11 -0000 Author: trasz Date: Thu May 18 20:31:09 2017 New Revision: 318486 URL: https://svnweb.freebsd.org/changeset/base/318486 Log: MFC r317212: Mention GEOM_MOUNTVER. Modified: stable/11/share/man/man4/geom.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/geom.4 ============================================================================== --- stable/11/share/man/man4/geom.4 Thu May 18 20:29:47 2017 (r318485) +++ stable/11/share/man/man4/geom.4 Thu May 18 20:31:09 2017 (r318486) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2015 +.Dd April 20, 2017 .Dt GEOM 4 .Os .Sh NAME @@ -55,6 +55,7 @@ .Cd options GEOM_MAP .Cd options GEOM_MBR .Cd options GEOM_MIRROR +.Cd options GEOM_MOUNTVER .Cd options GEOM_MULTIPATH .Cd options GEOM_NOP .Cd options GEOM_PART_APM From owner-svn-src-stable@freebsd.org Thu May 18 20:32:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18204D73AF5; Thu, 18 May 2017 20:32:14 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC1A5174A; Thu, 18 May 2017 20:32:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKWCYf016827; Thu, 18 May 2017 20:32:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKWC3j016826; Thu, 18 May 2017 20:32:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182032.v4IKWC3j016826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318487 - stable/11/usr.bin/tip/tip X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:32:14 -0000 Author: trasz Date: Thu May 18 20:32:12 2017 New Revision: 318487 URL: https://svnweb.freebsd.org/changeset/base/318487 Log: MFC r317280: Add basic example to the cu(1) man page. Srsly, folks, you don't need to install minicom for this... Modified: stable/11/usr.bin/tip/tip/cu.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/tip/tip/cu.1 ============================================================================== --- stable/11/usr.bin/tip/tip/cu.1 Thu May 18 20:31:09 2017 (r318486) +++ stable/11/usr.bin/tip/tip/cu.1 Thu May 18 20:32:12 2017 (r318487) @@ -30,7 +30,7 @@ .\" @(#)tip.1 8.4 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 1, 2006 +.Dd April 22, 2017 .Dt CU 1 .Os .Sh NAME @@ -494,6 +494,11 @@ line access log lock file to avoid conflicts with .Xr uucp 1 Pq Pa ports/net/freebsd-uucp .El +.Sh EXAMPLES +Connect to the first USB serial port at the speed of 115200 baud: +.Bd -literal -offset indent +cu -s 115200 -l /dev/cuaU0 +.Ed .Sh SEE ALSO .Xr tip 1 .Sh HISTORY From owner-svn-src-stable@freebsd.org Thu May 18 20:34:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 511D7D73B7E; Thu, 18 May 2017 20:34:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D10A1923; Thu, 18 May 2017 20:34:27 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKYQPE016996; Thu, 18 May 2017 20:34:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKYQKe016995; Thu, 18 May 2017 20:34:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182034.v4IKYQKe016995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318488 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:34:27 -0000 Author: trasz Date: Thu May 18 20:34:25 2017 New Revision: 318488 URL: https://svnweb.freebsd.org/changeset/base/318488 Log: MFC r317348: Make it possible to terminate "show lockedbufs" by pressing "q". Modified: stable/11/sys/kern/vfs_bio.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Thu May 18 20:32:12 2017 (r318487) +++ stable/11/sys/kern/vfs_bio.c Thu May 18 20:34:25 2017 (r318488) @@ -4923,6 +4923,8 @@ DB_SHOW_COMMAND(lockedbufs, lockedbufs) if (BUF_ISLOCKED(bp)) { db_show_buffer((uintptr_t)bp, 1, 0, NULL); db_printf("\n"); + if (db_pager_quit) + break; } } } From owner-svn-src-stable@freebsd.org Thu May 18 20:36:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5A13D73C77; Thu, 18 May 2017 20:36:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCFA1B8D; Thu, 18 May 2017 20:36:08 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKa7X0017114; Thu, 18 May 2017 20:36:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKa7SF017112; Thu, 18 May 2017 20:36:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182036.v4IKa7SF017112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318489 - stable/11/usr.sbin/fstyp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:36:09 -0000 Author: trasz Date: Thu May 18 20:36:07 2017 New Revision: 318489 URL: https://svnweb.freebsd.org/changeset/base/318489 Log: MFC r317459: Make fstyp(8) recognize exFAT even without the -u option. While it's not directly mountable with mount(8), it's something that's mountable - differently from GELI or zpools. Modified: stable/11/usr.sbin/fstyp/fstyp.8 stable/11/usr.sbin/fstyp/fstyp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/fstyp/fstyp.8 ============================================================================== --- stable/11/usr.sbin/fstyp/fstyp.8 Thu May 18 20:34:25 2017 (r318488) +++ stable/11/usr.sbin/fstyp/fstyp.8 Thu May 18 20:36:07 2017 (r318489) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2017 +.Dd April 26, 2017 .Dt FSTYP 8 .Os .Sh NAME @@ -43,7 +43,7 @@ The .Nm utility is used to determine the filesystem type on a given device. -It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems. +It can recognize ISO-9660, exFAT, Ext2, FAT, NTFS, and UFS filesystems. When the .Fl u flag is specified, @@ -51,7 +51,7 @@ flag is specified, also recognizes certain additional metadata formats that cannot be handled using .Xr mount 8 , -such as exFAT filesystems, +such as .Xr geli 8 providers, and ZFS pools. Modified: stable/11/usr.sbin/fstyp/fstyp.c ============================================================================== --- stable/11/usr.sbin/fstyp/fstyp.c Thu May 18 20:34:25 2017 (r318488) +++ stable/11/usr.sbin/fstyp/fstyp.c Thu May 18 20:36:07 2017 (r318489) @@ -57,7 +57,7 @@ static struct { bool unmountable; } fstypes[] = { { "cd9660", &fstyp_cd9660, false }, - { "exfat", &fstyp_exfat, true }, + { "exfat", &fstyp_exfat, false }, { "ext2fs", &fstyp_ext2fs, false }, { "geli", &fstyp_geli, true }, { "msdosfs", &fstyp_msdosfs, false }, From owner-svn-src-stable@freebsd.org Thu May 18 20:37:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1293D73CF9; Thu, 18 May 2017 20:37:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A110F1CE7; Thu, 18 May 2017 20:37:48 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKbluc017218; Thu, 18 May 2017 20:37:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKblU3017217; Thu, 18 May 2017 20:37:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182037.v4IKblU3017217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318490 - stable/11/etc/autofs X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:37:48 -0000 Author: trasz Date: Thu May 18 20:37:47 2017 New Revision: 318490 URL: https://svnweb.freebsd.org/changeset/base/318490 Log: MFC r317803: Enable automounting of exFAT media. With fstyp(8) being updated to detect exfat in base r312003, it seems like a good time to add support for auto-mounting SDXC cards -- which use exfat by default. The user will need to locally compile and install sysutils/fusefs-exfat for this to succeed; logs a message to that effect when not installed. PR: 218743 Submitted by: eborisch+FreeBSD@gmail.com Modified: stable/11/etc/autofs/special_media Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/autofs/special_media ============================================================================== --- stable/11/etc/autofs/special_media Thu May 18 20:36:07 2017 (r318489) +++ stable/11/etc/autofs/special_media Thu May 18 20:37:47 2017 (r318490) @@ -39,6 +39,15 @@ print_map_entry() { _p="$2" case "${_fstype}" in + "exfat") + if [ -f "/usr/local/sbin/mount.exfat" ]; then + echo "-mountprog=/usr/local/sbin/mount.exfat,fstype=${_fstype},nosuid :/dev/${_p}" + else + /usr/bin/logger -p info -t "special_media[$$]" \ + "Cannot mount ${_fstype} formatted device /dev/${_p}: Install sysutils/fusefs-exfat first" + exit 1 + fi + ;; "ntfs") if [ -f "/usr/local/bin/ntfs-3g" ]; then echo "-mountprog=/usr/local/bin/ntfs-3g,fstype=${_fstype},nosuid :/dev/${_p}" From owner-svn-src-stable@freebsd.org Thu May 18 20:40:50 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA86ED73DB6; Thu, 18 May 2017 20:40:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A1441E93; Thu, 18 May 2017 20:40:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKen5h017417; Thu, 18 May 2017 20:40:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKenmG017415; Thu, 18 May 2017 20:40:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182040.v4IKenmG017415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318491 - in stable/11/sbin: kldconfig kldload X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:40:50 -0000 Author: trasz Date: Thu May 18 20:40:49 2017 New Revision: 318491 URL: https://svnweb.freebsd.org/changeset/base/318491 Log: MFC r317517: Advertise kldxref(8) a little better. Modified: stable/11/sbin/kldconfig/kldconfig.8 stable/11/sbin/kldload/kldload.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/kldconfig/kldconfig.8 ============================================================================== --- stable/11/sbin/kldconfig/kldconfig.8 Thu May 18 20:37:47 2017 (r318490) +++ stable/11/sbin/kldconfig/kldconfig.8 Thu May 18 20:40:49 2017 (r318491) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2001 +.Dd April 27, 2017 .Dt KLDCONFIG 8 .Os .Sh NAME @@ -98,6 +98,7 @@ The default module search path used by t .Sh SEE ALSO .Xr kldload 2 , .Xr kldload 8 , +.Xr kldxref 8 , .Xr sysctl 8 .Sh HISTORY The Modified: stable/11/sbin/kldload/kldload.8 ============================================================================== --- stable/11/sbin/kldload/kldload.8 Thu May 18 20:37:47 2017 (r318490) +++ stable/11/sbin/kldload/kldload.8 Thu May 18 20:40:49 2017 (r318491) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2012 +.Dd April 27, 2017 .Dt KLDLOAD 8 .Os .Sh NAME @@ -116,7 +116,8 @@ Modules may also be auto-loaded through .Xr security 7 , .Xr kldconfig 8 , .Xr kldstat 8 , -.Xr kldunload 8 +.Xr kldunload 8 , +.Xr kldxref 8 .Sh HISTORY The .Nm From owner-svn-src-stable@freebsd.org Thu May 18 20:41:56 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB72FD73E1E; Thu, 18 May 2017 20:41:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 934BA1F9; Thu, 18 May 2017 20:41:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKftfg020342; Thu, 18 May 2017 20:41:55 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKftlZ020338; Thu, 18 May 2017 20:41:55 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182041.v4IKftlZ020338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318492 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:41:57 -0000 Author: trasz Date: Thu May 18 20:41:55 2017 New Revision: 318492 URL: https://svnweb.freebsd.org/changeset/base/318492 Log: MFC r317460: Add some .Xrs to USB serial driver man pages. Modified: stable/11/share/man/man4/ubser.4 stable/11/share/man/man4/ucom.4 stable/11/share/man/man4/ucycom.4 stable/11/share/man/man4/uipaq.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/ubser.4 ============================================================================== --- stable/11/share/man/man4/ubser.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ubser.4 Thu May 18 20:41:55 2017 (r318492) @@ -60,6 +60,7 @@ driver provides support for the BWCT con .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: stable/11/share/man/man4/ucom.4 ============================================================================== --- stable/11/share/man/man4/ucom.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ucom.4 Thu May 18 20:41:55 2017 (r318492) @@ -99,8 +99,15 @@ Capture pulses on the DCD line. .Sh SEE ALSO .Xr tty 4 , .Xr uark 4 , +.Xr ubsa 4 , +.Xr ubser 4 , .Xr uchcom 4 , +.Xr ucycom 4 , +.Xr ufoma 4 , .Xr uftdi 4 , +.Xr uhso 4 , +.\".Xr ugensa 4 , +.Xr uipaq 4 , .Xr umcs 4 , .Xr umct 4 , .Xr umodem 4 , Modified: stable/11/share/man/man4/ucycom.4 ============================================================================== --- stable/11/share/man/man4/ucycom.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/ucycom.4 Thu May 18 20:41:55 2017 (r318492) @@ -73,6 +73,7 @@ DeLorme Earthmate USB GPS receiver .El .Sh SEE ALSO .Xr tty 4 , +.Xr ucom 4 , .Xr usb 4 .Sh HISTORY The Modified: stable/11/share/man/man4/uipaq.4 ============================================================================== --- stable/11/share/man/man4/uipaq.4 Thu May 18 20:40:49 2017 (r318491) +++ stable/11/share/man/man4/uipaq.4 Thu May 18 20:41:55 2017 (r318492) @@ -82,7 +82,6 @@ driver which makes it behave like a .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , -.Xr uhub 4 , .Xr usb 4 .Sh HISTORY The From owner-svn-src-stable@freebsd.org Thu May 18 20:45:12 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 486C1D7301B; Thu, 18 May 2017 20:45:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12027618; Thu, 18 May 2017 20:45:12 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKjBvC021314; Thu, 18 May 2017 20:45:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKj9YD021293; Thu, 18 May 2017 20:45:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705182045.v4IKj9YD021293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 18 May 2017 20:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318493 - stable/11/share/man/man4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:45:12 -0000 Author: trasz Date: Thu May 18 20:45:09 2017 New Revision: 318493 URL: https://svnweb.freebsd.org/changeset/base/318493 Log: MFC r317463: Add information about device nodes to man pages for USB serial drivers. MFC r318016: Fix mistake introduced to uart(4) man page in r317463. MFC r318017: Fix device paths for USB serial adapters: the formatting strings contain "%u", differently from eg uart(4) which uses "%r". Modified: stable/11/share/man/man4/u3g.4 stable/11/share/man/man4/uark.4 stable/11/share/man/man4/uart.4 stable/11/share/man/man4/ubsa.4 stable/11/share/man/man4/ubser.4 stable/11/share/man/man4/uchcom.4 stable/11/share/man/man4/ucom.4 stable/11/share/man/man4/ucycom.4 stable/11/share/man/man4/uftdi.4 stable/11/share/man/man4/uipaq.4 stable/11/share/man/man4/umcs.4 stable/11/share/man/man4/umct.4 stable/11/share/man/man4/umodem.4 stable/11/share/man/man4/umoscom.4 stable/11/share/man/man4/uplcom.4 stable/11/share/man/man4/uslcom.4 stable/11/share/man/man4/uvisor.4 stable/11/share/man/man4/uvscom.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/u3g.4 ============================================================================== --- stable/11/share/man/man4/u3g.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/u3g.4 Thu May 18 20:45:09 2017 (r318493) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2013 +.Dd April 26, 2017 .Dt U3G 4 .Os .Sh NAME @@ -97,6 +97,20 @@ See .Xr usbconfig 8 and .Xr usb_quirk 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uark.4 ============================================================================== --- stable/11/share/man/man4/uark.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uark.4 Thu May 18 20:45:09 2017 (r318493) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UARK 4 .Os .Sh NAME @@ -57,6 +57,20 @@ KQ-U8A Data Cable .It Skymaster USB to RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uart.4 ============================================================================== --- stable/11/share/man/man4/uart.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uart.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 9, 2015 +.Dd April 26, 2017 .Dt UART 4 .Os .Sh NAME @@ -226,7 +226,7 @@ level signal at up to 12 volts. A connection to header pins or an edge-connector on an embedded board is typically a TTL signal at 3.3 or 5 volts. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyu?.init" -compact +.Bl -tag -width "/dev/ttyu?.init" -compact .It Pa /dev/ttyu? for callin ports .It Pa /dev/ttyu?.init Modified: stable/11/share/man/man4/ubsa.4 ============================================================================== --- stable/11/share/man/man4/ubsa.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ubsa.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSA 4 .Os .Sh NAME @@ -81,6 +81,20 @@ GoHubs GoCOM232 .It Peracom single port serial adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/ubser.4 ============================================================================== --- stable/11/share/man/man4/ubser.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ubser.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UBSER 4 .Os .Sh NAME @@ -55,8 +55,18 @@ The .Nm driver provides support for the BWCT console management serial adapters. .Sh FILES -.Bl -tag -width ".Pa /dev/ttyy??" -compact -.It Pa /dev/ttyy?? +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: stable/11/share/man/man4/uchcom.4 ============================================================================== --- stable/11/share/man/man4/uchcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uchcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCHCOM 4 .Os .Sh NAME @@ -70,6 +70,20 @@ driver supports the following adapters: .It HL USB-RS232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/ucom.4 ============================================================================== --- stable/11/share/man/man4/ucom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ucom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2015 +.Dd April 26, 2017 .Dt UCOM 4 .Os .Sh NAME @@ -92,9 +92,18 @@ Capture pulses on the CTS line. Capture pulses on the DCD line. .El .Sh FILES -.Bl -tag -width ".Pa /dev/cuaU?" -.It Pa /dev/cuaU? -.It Pa /dev/ttyU? +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices .El .Sh SEE ALSO .Xr tty 4 , Modified: stable/11/share/man/man4/ucycom.4 ============================================================================== --- stable/11/share/man/man4/ucycom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/ucycom.4 Thu May 18 20:45:09 2017 (r318493) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UCYCOM 4 .Os .Sh NAME @@ -71,6 +71,20 @@ Cypress USB to RS232 bridge chips: .It DeLorme Earthmate USB GPS receiver .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uftdi.4 ============================================================================== --- stable/11/share/man/man4/uftdi.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uftdi.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2015 +.Dd April 26, 2017 .Dt UFTDI 4 .Os .Sh NAME @@ -242,6 +242,20 @@ Buffalo PC-OP-RS / Kurouto-shikou KURO-R .It Prologix GPIB-USB Controller .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uipaq.4 ============================================================================== --- stable/11/share/man/man4/uipaq.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uipaq.4 Thu May 18 20:45:09 2017 (r318493) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UIPAQ 4 .Os .Sh NAME @@ -79,6 +79,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umcs.4 ============================================================================== --- stable/11/share/man/man4/umcs.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umcs.4 Thu May 18 20:45:09 2017 (r318493) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 25, 2012 +.Dd April 26, 2017 .Dt UMCS 4 .Os .Sh NAME @@ -80,6 +80,20 @@ ST Lab U-360 two-port serial USB adapter .It ST Lab U-400 four-port serial USB adapter .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umct.4 ============================================================================== --- stable/11/share/man/man4/umct.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umct.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UMCT 4 .Os .Sh NAME @@ -78,6 +78,20 @@ Magic Control Technology USB-232 .It Sitecom USB-232 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umodem.4 ============================================================================== --- stable/11/share/man/man4/umodem.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umodem.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 6, 2012 +.Dd April 26, 2017 .Dt UMODEM 4 .Os .Sh NAME @@ -95,6 +95,20 @@ Sony Ericsson W810i phone .It Sonim XP5300 Force .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/umoscom.4 ============================================================================== --- stable/11/share/man/man4/umoscom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/umoscom.4 Thu May 18 20:45:09 2017 (r318493) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2014 +.Dd April 26, 2017 .Dt UMOSCOM 4 .Os .Sh NAME @@ -56,6 +56,20 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uplcom.4 ============================================================================== --- stable/11/share/man/man4/uplcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uplcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2012 +.Dd April 26, 2017 .Dt UPLCOM 4 .Os .Sh NAME @@ -180,6 +180,20 @@ YC-Cable USB-Serial Adapter .It Zeagle N2iTion3 Diving Computer .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uslcom.4 ============================================================================== --- stable/11/share/man/man4/uslcom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uslcom.4 Thu May 18 20:45:09 2017 (r318493) @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 4, 2012 +.Dd April 26, 2017 .Dt USLCOM 4 .Os .Sh NAME @@ -192,6 +192,20 @@ WMR RIGblaster Plug&Play and RIGtalk RT1 .It Zephyr Bioharness .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uvisor.4 ============================================================================== --- stable/11/share/man/man4/uvisor.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uvisor.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVISOR 4 .Os .Sh NAME @@ -118,6 +118,20 @@ Sony Clie S360 .It Sony Clie TJ37 .El +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices +.El .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , Modified: stable/11/share/man/man4/uvscom.4 ============================================================================== --- stable/11/share/man/man4/uvscom.4 Thu May 18 20:41:55 2017 (r318492) +++ stable/11/share/man/man4/uvscom.4 Thu May 18 20:45:09 2017 (r318493) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2011 +.Dd April 26, 2017 .Dt UVSCOM 4 .Os .Sh NAME @@ -77,6 +77,19 @@ The device is accessed through the .Xr ucom 4 driver which makes it behave like a .Xr tty 4 . +.Sh FILES +.Bl -tag -width "/dev/ttyU*.init" -compact +.It Pa /dev/ttyU* +for callin ports +.It Pa /dev/ttyU*.init +.It Pa /dev/ttyU*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU* +for callout ports +.It Pa /dev/cuaU*.init +.It Pa /dev/cuaU*.lock +corresponding callout initial-state and lock-state devices .Sh SEE ALSO .Xr tty 4 , .Xr ucom 4 , From owner-svn-src-stable@freebsd.org Thu May 18 20:46:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB6CBD730E0; Thu, 18 May 2017 20:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87960817; Thu, 18 May 2017 20:46:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKkLZ7021443; Thu, 18 May 2017 20:46:21 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKkLKg021436; Thu, 18 May 2017 20:46:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182046.v4IKkLKg021436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 20:46:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318494 - in stable/11/sys/dev: mmc sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:46:22 -0000 Author: marius Date: Thu May 18 20:46:20 2017 New Revision: 318494 URL: https://svnweb.freebsd.org/changeset/base/318494 Log: MFC: r315598 o Add support for eMMC DDR bus speed mode up to 52 MHz to sdhci(4) and mmc(4). Given that support for DDR52 is not denoted by SDHCI capability registers, availability of that timing is indicated by a new quirk SDHCI_QUIRK_MMC_DDR52 and only enabled for Intel SDHCI controllers so far. Compared to 50 MHz at SDR high speed typically yielding ~45 MB/s read throughput with the eMMC chips tested, read performance goes up to ~80 MB/s at DDR52. As a side-effect, this change also fixes communication with some eMMC devices at SDR high speed mode due to the signaling voltage and UHS bits in the SDHCI controller no longer being left in an inappropriate state. o In sdhci(4), add two tunables hw.sdhci.quirk_clear as well as hw.sdhci.quirk_set, which (when hooked up in the front-end) allow to set/clear sdhci(4) quirks for debugging and testing purposes. However, especially for SDHCI controllers on the PCI bus which have no specific support code so far and, thus, are picked up as generic SDHCI controllers, hw.sdhci.quirk_set allows for setting the necessary quirks (if required). o In mmc(4), check and handle the return values of some more function calls instead of assuming that everything went right. In case failures actually are not problematic, indicate that by casting the return value to void. Modified: stable/11/sys/dev/mmc/bridge.h stable/11/sys/dev/mmc/mmc.c stable/11/sys/dev/mmc/mmcbr_if.m stable/11/sys/dev/mmc/mmcbrvar.h stable/11/sys/dev/mmc/mmcreg.h stable/11/sys/dev/sdhci/sdhci.c stable/11/sys/dev/sdhci/sdhci.h stable/11/sys/dev/sdhci/sdhci_acpi.c stable/11/sys/dev/sdhci/sdhci_if.m stable/11/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mmc/bridge.h ============================================================================== --- stable/11/sys/dev/mmc/bridge.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/bridge.h Thu May 18 20:46:20 2017 (r318494) @@ -89,6 +89,10 @@ enum mmc_vdd { vdd_330, vdd_340, vdd_350, vdd_360 }; +enum mmc_vccq { + vccq_120 = 0, vccq_180, vccq_330 +}; + enum mmc_power_mode { power_off = 0, power_up, power_on }; @@ -105,18 +109,28 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_drv_type { + drv_type_b = 0, drv_type_a, drv_type_c, drv_type_d +}; + enum mmc_bus_timing { - bus_timing_normal = 0, bus_timing_hs + bus_timing_normal = 0, bus_timing_hs, bus_timing_uhs_sdr12, + bus_timing_uhs_sdr25, bus_timing_uhs_sdr50, bus_timing_uhs_ddr50, + bus_timing_uhs_sdr104, bus_timing_mmc_ddr52, bus_timing_mmc_hs200, + bus_timing_mmc_hs400, bus_timing_mmc_hs400es, bus_timing_max = + bus_timing_mmc_hs400es }; struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins */ + enum mmc_vccq vccq; /* Voltage to use for signaling */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; enum mmc_bus_timing timing; + enum mmc_drv_type drv_type; }; enum mmc_card_mode { @@ -134,6 +148,28 @@ struct mmc_host { #define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ #define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ #define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ +#define MMC_CAP_UHS_SDR12 (1 << 6) /* Can do UHS SDR12 */ +#define MMC_CAP_UHS_SDR25 (1 << 7) /* Can do UHS SDR25 */ +#define MMC_CAP_UHS_SDR50 (1 << 8) /* Can do UHS SDR50 */ +#define MMC_CAP_UHS_SDR104 (1 << 9) /* Can do UHS SDR104 */ +#define MMC_CAP_UHS_DDR50 (1 << 10) /* Can do UHS DDR50 */ +#define MMC_CAP_MMC_DDR52_120 (1 << 11) /* Can do eMMC DDR52 at 1.2 V */ +#define MMC_CAP_MMC_DDR52_180 (1 << 12) /* Can do eMMC DDR52 at 1.8 V */ +#define MMC_CAP_MMC_DDR52 (MMC_CAP_MMC_DDR52_120 | MMC_CAP_MMC_DDR52_180) +#define MMC_CAP_MMC_HS200_120 (1 << 13) /* Can do eMMC HS200 at 1.2 V */ +#define MMC_CAP_MMC_HS200_180 (1 << 14) /* Can do eMMC HS200 at 1.8 V */ +#define MMC_CAP_MMC_HS200 (MMC_CAP_MMC_HS200_120| MMC_CAP_MMC_HS200_180) +#define MMC_CAP_MMC_HS400_120 (1 << 15) /* Can do eMMC HS400 at 1.2 V */ +#define MMC_CAP_MMC_HS400_180 (1 << 16) /* Can do eMMC HS400 at 1.8 V */ +#define MMC_CAP_MMC_HS400 (MMC_CAP_MMC_HS400_120 | MMC_CAP_MMC_HS400_180) +#define MMC_CAP_MMC_HSX00_120 (MMC_CAP_MMC_HS200_120 | MMC_CAP_MMC_HS400_120) +#define MMC_CAP_MMC_ENH_STROBE (1 << 17) /* Can do eMMC Enhanced Strobe */ +#define MMC_CAP_SIGNALING_120 (1 << 18) /* Can do signaling at 1.2 V */ +#define MMC_CAP_SIGNALING_180 (1 << 19) /* Can do signaling at 1.8 V */ +#define MMC_CAP_SIGNALING_330 (1 << 20) /* Can do signaling at 3.3 V */ +#define MMC_CAP_DRIVER_TYPE_A (1 << 21) /* Can do Driver Type A */ +#define MMC_CAP_DRIVER_TYPE_C (1 << 22) /* Can do Driver Type C */ +#define MMC_CAP_DRIVER_TYPE_D (1 << 23) /* Can do Driver Type D */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -141,7 +177,7 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; -#define MMC_VERSION 2 +#define MMC_VERSION 3 #define MMC_DECLARE_BRIDGE(name) \ DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ Modified: stable/11/sys/dev/mmc/mmc.c ============================================================================== --- stable/11/sys/dev/mmc/mmc.c Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmc.c Thu May 18 20:46:20 2017 (r318494) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,6 +76,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "mmcbus_if.h" +CTASSERT(bus_timing_max <= sizeof(uint32_t) * NBBY); + /* * Per-card data */ @@ -92,9 +95,11 @@ struct mmc_ivars { struct mmc_sd_status sd_status; /* SD_STATUS decoded */ u_char read_only; /* True when the device is read-only */ u_char bus_width; /* Bus width to use */ - u_char timing; /* Bus timing support */ u_char high_cap; /* High Capacity card (block addressed) */ uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t timings; /* Mask of bus timings supported */ + uint32_t vccq_120; /* Mask of bus timings at VCCQ of 1.2 V */ + uint32_t vccq_180; /* Mask of bus timings at VCCQ of 1.8 V */ uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ @@ -105,8 +110,6 @@ struct mmc_ivars { #define CMD_RETRIES 3 -#define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ - static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; @@ -180,12 +183,15 @@ static int mmc_send_op_cond(struct mmc_s uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, - struct mmc_ivars *ivar); +static int mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar); +static int mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, - int timing); + enum mmc_bus_timing timing); static int mmc_test_bus_width(struct mmc_softc *sc); +static uint32_t mmc_timing_to_dtr(struct mmc_ivars *ivar, + enum mmc_bus_timing timing); +static const char *mmc_timing_to_string(enum mmc_bus_timing timing); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -264,8 +270,8 @@ mmc_acquire_bus(device_t busdev, device_ { struct mmc_softc *sc; struct mmc_ivars *ivar; - int err; - int rca; + int err, rca; + enum mmc_bus_timing timing; err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) @@ -287,16 +293,44 @@ mmc_acquire_bus(device_t busdev, device_ ivar = device_get_ivars(dev); rca = ivar->rca; if (sc->last_rca != rca) { - mmc_select_card(sc, rca); + if (mmc_select_card(sc, rca) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to select.\n", rca); + return (ENXIO); + } sc->last_rca = rca; + timing = mmcbr_get_timing(busdev); /* Prepare bus width for the new card. */ if (bootverbose || mmc_debug) { device_printf(busdev, - "setting bus width to %d bits\n", + "setting bus width to %d bits %s timing\n", (ivar->bus_width == bus_width_4) ? 4 : - (ivar->bus_width == bus_width_8) ? 8 : 1); + (ivar->bus_width == bus_width_8) ? 8 : 1, + mmc_timing_to_string(timing)); + } + if (mmc_set_card_bus_width(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set bus width.\n", + rca); + return (ENXIO); + } + if (isset(&ivar->vccq_120, timing)) + mmcbr_set_vccq(busdev, vccq_120); + else if (isset(&ivar->vccq_180, timing)) + mmcbr_set_vccq(busdev, vccq_180); + else + mmcbr_set_vccq(busdev, vccq_330); + if (mmcbr_switch_vccq(busdev) != 0) { + device_printf(sc->dev, "Failed to set VCCQ " + "for card at relative address %d.\n", rca); + return (ENXIO); + } + if (mmc_set_power_class(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set power class.\n", + rca); + return (ENXIO); } - mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -524,6 +558,7 @@ static void mmc_power_up(struct mmc_softc *sc) { device_t dev; + enum mmc_vccq vccq; dev = sc->dev; mmcbr_set_vdd(dev, mmc_highest_voltage(mmcbr_get_host_ocr(dev))); @@ -533,9 +568,14 @@ mmc_power_up(struct mmc_softc *sc) mmcbr_set_power_mode(dev, power_up); mmcbr_set_clock(dev, 0); mmcbr_update_ios(dev); + for (vccq = vccq_330; ; vccq--) { + mmcbr_set_vccq(dev, vccq); + if (mmcbr_switch_vccq(dev) == 0 || vccq == vccq_120) + break; + } mmc_ms_delay(1); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); @@ -631,10 +671,30 @@ mmc_set_card_bus_width(struct mmc_softc value = EXT_CSD_BUS_WIDTH_1; break; case bus_width_4: - value = EXT_CSD_BUS_WIDTH_4; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_4_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_4; + break; + } break; case bus_width_8: - value = EXT_CSD_BUS_WIDTH_8; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_8_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_8; + break; + } break; default: return (MMC_ERR_INVALID); @@ -647,23 +707,96 @@ mmc_set_card_bus_width(struct mmc_softc } static int -mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) +mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar) { - u_char switch_res[64]; - uint8_t value; - int err; + device_t dev; + const uint8_t *ext_csd; + uint32_t clock; + uint8_t value; - switch (timing) { - case bus_timing_normal: - value = 0; + dev = sc->dev; + if (mmcbr_get_mode(dev) != mode_mmc || ivar->csd.spec_vers < 4) + return (MMC_ERR_NONE); + + value = 0; + ext_csd = ivar->raw_ext_csd; + clock = mmcbr_get_clock(dev); + switch (1 << mmcbr_get_vdd(dev)) { + case MMC_OCR_LOW_VOLTAGE: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_195]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) >= bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_195_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_195]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) + value = ext_csd[EXT_CSD_PWR_CL_200_195]; break; - case bus_timing_hs: - value = 1; + case MMC_OCR_270_280: + case MMC_OCR_280_290: + case MMC_OCR_290_300: + case MMC_OCR_300_310: + case MMC_OCR_310_320: + case MMC_OCR_320_330: + case MMC_OCR_330_340: + case MMC_OCR_340_350: + case MMC_OCR_350_360: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_360]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) == bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_360]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) { + if (ivar->bus_width == bus_width_8) + value = ext_csd[EXT_CSD_PWR_CL_200_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_200_360]; + } break; default: + device_printf(dev, "No power class support for VDD 0x%x\n", + 1 << mmcbr_get_vdd(dev)); return (MMC_ERR_INVALID); } + + if (ivar->bus_width == bus_width_8) + value = (value & EXT_CSD_POWER_CLASS_8BIT_MASK) >> + EXT_CSD_POWER_CLASS_8BIT_SHIFT; + else + value = (value & EXT_CSD_POWER_CLASS_4BIT_MASK) >> + EXT_CSD_POWER_CLASS_4BIT_SHIFT; + + if (value == 0) + return (MMC_ERR_NONE); + + return (mmc_switch(dev, dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_POWER_CLASS, value, ivar->cmd6_time, true)); +} + +static int +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + enum mmc_bus_timing timing) +{ + u_char switch_res[64]; + uint8_t value; + int err; + if (mmcbr_get_mode(sc->dev) == mode_sd) { + switch (timing) { + case bus_timing_normal: + value = SD_SWITCH_NORMAL_MODE; + break; + case bus_timing_hs: + value = SD_SWITCH_HS_MODE; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); if (err != MMC_ERR_NONE) @@ -673,6 +806,17 @@ mmc_set_timing(struct mmc_softc *sc, str mmcbr_set_timing(sc->dev, timing); mmcbr_update_ios(sc->dev); } else { + switch (timing) { + case bus_timing_normal: + value = EXT_CSD_HS_TIMING_BC; + break; + case bus_timing_hs: + case bus_timing_mmc_ddr52: + value = EXT_CSD_HS_TIMING_HS; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_switch(sc->dev, sc->dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, ivar->cmd6_time, false); @@ -1166,19 +1310,82 @@ mmc_set_blocklen(struct mmc_softc *sc, u return (err); } +static uint32_t +mmc_timing_to_dtr(struct mmc_ivars *ivar, enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return (ivar->tran_speed); + case bus_timing_hs: + return (ivar->hs_tran_speed); + case bus_timing_uhs_sdr12: + return (SD_SDR12_MAX); + case bus_timing_uhs_sdr25: + return (SD_SDR25_MAX); + case bus_timing_uhs_ddr50: + return (SD_DDR50_MAX); + case bus_timing_uhs_sdr50: + return (SD_SDR50_MAX); + case bus_timing_uhs_sdr104: + return (SD_SDR104_MAX); + case bus_timing_mmc_ddr52: + return (MMC_TYPE_DDR52_MAX); + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + return (MMC_TYPE_HS200_HS400ES_MAX); + } + return (0); +} + +static const char * +mmc_timing_to_string(enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return ("normal speed"); + case bus_timing_hs: + return ("high speed"); + case bus_timing_uhs_sdr12: + case bus_timing_uhs_sdr25: + case bus_timing_uhs_sdr50: + case bus_timing_uhs_sdr104: + return ("single data rate"); + case bus_timing_uhs_ddr50: + case bus_timing_mmc_ddr52: + return ("dual data rate"); + case bus_timing_mmc_hs200: + return ("HS200"); + case bus_timing_mmc_hs400: + return ("HS400"); + case bus_timing_mmc_hs400es: + return ("HS400 with enhanced strobe"); + } + return (""); +} + static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + enum mmc_bus_timing max_timing, timing; device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); - device_printf(dev, " bus: %ubit, %uMHz%s\n", + max_timing = bus_timing_normal; + for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", (ivar->bus_width == bus_width_1 ? 1 : (ivar->bus_width == bus_width_4 ? 4 : 8)), - (ivar->timing == bus_timing_hs ? - ivar->hs_tran_speed : ivar->tran_speed) / 1000000, - ivar->timing == bus_timing_hs ? ", high speed timing" : ""); + mmc_timing_to_dtr(ivar, timing) / 1000000, + mmc_timing_to_string(timing)); device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", ivar->sec_count, ivar->erase_sector, ivar->read_only ? ", read-only" : ""); @@ -1192,10 +1399,11 @@ mmc_discover_cards(struct mmc_softc *sc) struct mmc_ivars *ivar = NULL; device_t *devlist; device_t child; - int err, i, devcount, newcard; + int devcount, err, host_caps, i, newcard; uint32_t resp, sec_count, status; uint16_t rca = 2; + host_caps = mmcbr_get_caps(sc->dev); if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { @@ -1235,14 +1443,24 @@ mmc_discover_cards(struct mmc_softc *sc) if (mmcbr_get_ro(sc->dev)) ivar->read_only = 1; ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; + setbit(&ivar->timings, bus_timing_normal); ivar->mode = mmcbr_get_mode(sc->dev); if (ivar->mode == mode_sd) { mmc_decode_cid_sd(ivar->raw_cid, &ivar->cid); - mmc_send_relative_addr(sc, &resp); + err = mmc_send_relative_addr(sc, &resp); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting RCA %d\n", err); + break; + } ivar->rca = resp >> 16; /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1271,18 +1489,29 @@ mmc_discover_cards(struct mmc_softc *sc) } /* Get card SCR. Card must be selected to fetch it. */ - mmc_select_card(sc, ivar->rca); - mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error selecting card %d\n", err); + break; + } + err = mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading SCR %d\n", err); + break; + } mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && (ivar->csd.ccc & (1 << 10))) { - mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, + err = mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); - if (switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { - ivar->timing = bus_timing_hs; - ivar->hs_tran_speed = SD_MAX_HS; + if (err == MMC_ERR_NONE && + switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = SD_HS_MAX; } } @@ -1299,8 +1528,9 @@ mmc_discover_cards(struct mmc_softc *sc) * it is still nice to get that right. */ mmc_select_card(sc, 0); - mmc_select_card(sc, ivar->rca); - mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); + (void)mmc_select_card(sc, ivar->rca); + (void)mmc_app_sd_status(sc, ivar->rca, + ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); if (ivar->sd_status.au_size != 0) { @@ -1308,7 +1538,7 @@ mmc_discover_cards(struct mmc_softc *sc) 16 << ivar->sd_status.au_size; } /* Find max supported bus width. */ - if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && + if ((host_caps & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) ivar->bus_width = bus_width_4; @@ -1338,9 +1568,17 @@ mmc_discover_cards(struct mmc_softc *sc) return; } ivar->rca = rca++; - mmc_set_relative_addr(sc, ivar->rca); + err = mmc_set_relative_addr(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error setting RCA %d\n", err); + break; + } /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1366,7 +1604,12 @@ mmc_discover_cards(struct mmc_softc *sc) break; } - mmc_select_card(sc, ivar->rca); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error selecting card %d\n", + err); + break; + } /* Only MMC >= 4.x devices support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { @@ -1386,16 +1629,28 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->sec_count = sec_count; ivar->high_cap = 1; } - /* Get card speed in high speed mode. */ - ivar->timing = bus_timing_hs; - if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_52) - ivar->hs_tran_speed = MMC_TYPE_52_MAX_HS; - else if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_26) - ivar->hs_tran_speed = MMC_TYPE_26_MAX_HS; - else - ivar->hs_tran_speed = ivar->tran_speed; + /* Get device speeds beyond normal mode. */ + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_52) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_52_MAX; + } else if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_26) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_26_MAX; + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_2V) != 0 && + (host_caps & MMC_CAP_SIGNALING_120) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_120, bus_timing_mmc_ddr52); + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_8V) != 0 && + (host_caps & MMC_CAP_SIGNALING_180) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_180, bus_timing_mmc_ddr52); + } /* * Determine generic switch timeout (provided in * units of 10 ms), defaulting to 500 ms. @@ -1422,9 +1677,6 @@ mmc_discover_cards(struct mmc_softc *sc) break; } } - } else { - ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; } /* @@ -1548,7 +1800,7 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_idle_cards(sc); } else { mmcbr_set_bus_mode(dev, opendrain); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_update_ios(dev); /* XXX recompute vdd based on new cards? */ } @@ -1587,42 +1839,59 @@ mmc_calculate_clock(struct mmc_softc *sc { device_t *kids; struct mmc_ivars *ivar; - int i, f_max, max_dtr, max_hs_dtr, max_timing, nkid; - - f_max = mmcbr_get_f_max(sc->dev); - max_dtr = max_hs_dtr = f_max; - if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED) + int host_caps, i, nkid; + uint32_t dtr, max_dtr; + enum mmc_bus_timing max_timing, timing; + bool changed; + + max_dtr = mmcbr_get_f_max(sc->dev); + host_caps = mmcbr_get_caps(sc->dev); + if ((host_caps & MMC_CAP_MMC_DDR52) != 0) + max_timing = bus_timing_mmc_ddr52; + else if ((host_caps & MMC_CAP_HSPEED) != 0) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; if (device_get_children(sc->dev, &kids, &nkid) != 0) panic("can't get children"); - for (i = 0; i < nkid; i++) { - ivar = device_get_ivars(kids[i]); - if (ivar->timing < max_timing) - max_timing = ivar->timing; - if (ivar->tran_speed < max_dtr) - max_dtr = ivar->tran_speed; - if (ivar->hs_tran_speed < max_hs_dtr) - max_hs_dtr = ivar->hs_tran_speed; - } + do { + changed = false; + for (i = 0; i < nkid; i++) { + ivar = device_get_ivars(kids[i]); + if (isclr(&ivar->timings, max_timing)) { + for (timing = max_timing; timing >= + bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + changed = true; + } + dtr = mmc_timing_to_dtr(ivar, max_timing); + if (dtr < max_dtr) { + max_dtr = dtr; + changed = true; + } + } + } while (changed == true); if (bootverbose || mmc_debug) { device_printf(sc->dev, - "setting transfer rate to %d.%03dMHz%s\n", + "setting transfer rate to %d.%03dMHz (%s timing)\n", max_dtr / 1000000, (max_dtr / 1000) % 1000, - max_timing == bus_timing_hs ? " (high speed timing)" : ""); + mmc_timing_to_string(max_timing)); } for (i = 0; i < nkid; i++) { ivar = device_get_ivars(kids[i]); - if (ivar->timing == bus_timing_normal) + if ((ivar->timings & ~(1 << bus_timing_normal)) == 0) continue; - mmc_select_card(sc, ivar->rca); - mmc_set_timing(sc, ivar, max_timing); + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE || + mmc_set_timing(sc, ivar, max_timing) != MMC_ERR_NONE) + device_printf(sc->dev, "Card at relative address %d " + "failed to set timing.\n", ivar->rca); } mmc_select_card(sc, 0); free(kids, M_TEMP); - if (max_timing == bus_timing_hs) - max_dtr = max_hs_dtr; mmcbr_set_clock(sc->dev, max_dtr); mmcbr_update_ios(sc->dev); return (max_dtr); Modified: stable/11/sys/dev/mmc/mmcbr_if.m ============================================================================== --- stable/11/sys/dev/mmc/mmcbr_if.m Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:20 2017 (r318494) @@ -65,6 +65,18 @@ INTERFACE mmcbr; # +# Default implementations of some methods. +# +CODE { + static int + null_switch_vccq(device_t brdev __unused, device_t reqdev __unused) + { + + return (0); + } +}; + +# # Called by the mmcbus to set up the IO pins correctly, the common/core # supply voltage (VDD/VCC) to use for the device, the clock frequency, the # type of SPI chip select, power mode and bus width. @@ -75,6 +87,14 @@ METHOD int update_ios { }; # +# Called by the mmcbus to switch the signaling voltage (VCCQ). +# +METHOD int switch_vccq { + device_t brdev; + device_t reqdev; +} DEFAULT null_switch_vccq; + +# # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification # of the status of the request, who then notifies the requesting device Modified: stable/11/sys/dev/mmc/mmcbrvar.h ============================================================================== --- stable/11/sys/dev/mmc/mmcbrvar.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:20 2017 (r318494) @@ -71,6 +71,7 @@ enum mmcbr_device_ivars { MMCBR_IVAR_OCR, MMCBR_IVAR_POWER_MODE, MMCBR_IVAR_VDD, + MMCBR_IVAR_VCCQ, MMCBR_IVAR_CAPS, MMCBR_IVAR_TIMING, MMCBR_IVAR_MAX_DATA, @@ -94,6 +95,7 @@ MMCBR_ACCESSOR(mode, MODE, int) MMCBR_ACCESSOR(ocr, OCR, int) MMCBR_ACCESSOR(power_mode, POWER_MODE, int) MMCBR_ACCESSOR(vdd, VDD, int) +MMCBR_ACCESSOR(vccq, VCCQ, int) MMCBR_ACCESSOR(caps, CAPS, int) MMCBR_ACCESSOR(timing, TIMING, int) MMCBR_ACCESSOR(max_data, MAX_DATA, int) @@ -107,6 +109,13 @@ mmcbr_update_ios(device_t dev) } static int __inline +mmcbr_switch_vccq(device_t dev) +{ + + return (MMCBR_SWITCH_VCCQ(device_get_parent(dev), dev)); +} + +static int __inline mmcbr_get_ro(device_t dev) { Modified: stable/11/sys/dev/mmc/mmcreg.h ============================================================================== --- stable/11/sys/dev/mmc/mmcreg.h Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/mmc/mmcreg.h Thu May 18 20:46:20 2017 (r318494) @@ -209,11 +209,11 @@ struct mmc_request { #define MMC_SET_BLOCKLEN 16 #define MMC_READ_SINGLE_BLOCK 17 #define MMC_READ_MULTIPLE_BLOCK 18 - /* reserved: 19 */ +#define MMC_SEND_TUNING_BLOCK 19 +#define MMC_SEND_TUNING_BLOCK_HS200 21 /* Class 3: Stream write commands */ #define MMC_WRITE_DAT_UNTIL_STOP 20 - /* reserved: 21 */ /* reserved: 22 */ /* Class 4: Block oriented write commands */ @@ -304,16 +304,28 @@ struct mmc_request { #define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ #define EXT_CSD_PART_CONFIG 179 /* R/W */ #define EXT_CSD_BUS_WIDTH 183 /* R/W */ +#define EXT_CSD_STROBE_SUPPORT 184 /* RO */ #define EXT_CSD_HS_TIMING 185 /* R/W */ +#define EXT_CSD_POWER_CLASS 187 /* R/W */ #define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_DRIVER_STRENGTH 197 /* RO */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_PART_SWITCH_TO 199 /* RO */ +#define EXT_CSD_PWR_CL_52_195 200 /* RO */ +#define EXT_CSD_PWR_CL_26_195 201 /* RO */ +#define EXT_CSD_PWR_CL_52_360 202 /* RO */ +#define EXT_CSD_PWR_CL_26_360 203 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_ERASE_TO_MULT 223 /* RO */ #define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ #define EXT_CSD_BOOT_SIZE_MULT 226 /* RO */ +#define EXT_CSD_PWR_CL_200_195 236 /* RO */ +#define EXT_CSD_PWR_CL_200_360 237 /* RO */ +#define EXT_CSD_PWR_CL_52_195_DDR 238 /* RO */ +#define EXT_CSD_PWR_CL_52_360_DDR 239 /* RO */ #define EXT_CSD_GEN_CMD6_TIME 248 /* RO */ +#define EXT_CSD_PWR_CL_200_360_DDR 253 /* RO */ /* * EXT_CSD field definitions @@ -363,15 +375,38 @@ struct mmc_request { #define EXT_CSD_CMD_SET_SECURE 2 #define EXT_CSD_CMD_SET_CPSECURE 4 -#define EXT_CSD_CARD_TYPE_26 1 -#define EXT_CSD_CARD_TYPE_52 2 +#define EXT_CSD_HS_TIMING_BC 0 +#define EXT_CSD_HS_TIMING_HS 1 +#define EXT_CSD_HS_TIMING_DDR200 2 +#define EXT_CSD_HS_TIMING_DDR400 3 +#define EXT_CSD_HS_TIMING_DRV_STR_SHIFT 4 + +#define EXT_CSD_POWER_CLASS_8BIT_MASK 0xf0 +#define EXT_CSD_POWER_CLASS_8BIT_SHIFT 4 +#define EXT_CSD_POWER_CLASS_4BIT_MASK 0x0f +#define EXT_CSD_POWER_CLASS_4BIT_SHIFT 0 + +#define EXT_CSD_CARD_TYPE_HS_26 0x0001 +#define EXT_CSD_CARD_TYPE_HS_52 0x0002 +#define EXT_CSD_CARD_TYPE_DDR_52_1_8V 0x0004 +#define EXT_CSD_CARD_TYPE_DDR_52_1_2V 0x0008 +#define EXT_CSD_CARD_TYPE_HS200_1_8V 0x0010 +#define EXT_CSD_CARD_TYPE_HS200_1_2V 0x0020 +#define EXT_CSD_CARD_TYPE_HS400_1_8V 0x0040 +#define EXT_CSD_CARD_TYPE_HS400_1_2V 0x0080 +#define EXT_CSD_CARD_TYPE_HS400ES 0x0100 #define EXT_CSD_BUS_WIDTH_1 0 #define EXT_CSD_BUS_WIDTH_4 1 #define EXT_CSD_BUS_WIDTH_8 2 - -#define MMC_TYPE_26_MAX_HS 26000000 -#define MMC_TYPE_52_MAX_HS 52000000 +#define EXT_CSD_BUS_WIDTH_4_DDR 5 +#define EXT_CSD_BUS_WIDTH_8_DDR 6 +#define EXT_CSD_BUS_WIDTH_ES 0x80 + +#define MMC_TYPE_HS_26_MAX 26000000 +#define MMC_TYPE_HS_52_MAX 52000000 +#define MMC_TYPE_DDR52_MAX 52000000 +#define MMC_TYPE_HS200_HS400ES_MAX 200000000 /* * SD bus widths @@ -387,12 +422,23 @@ struct mmc_request { #define SD_SWITCH_GROUP1 0 #define SD_SWITCH_NORMAL_MODE 0 #define SD_SWITCH_HS_MODE 1 +#define SD_SWITCH_SDR50_MODE 2 +#define SD_SWITCH_SDR104_MODE 3 +#define SD_SWITCH_DDR50 4 #define SD_SWITCH_NOCHANGE 0xF #define SD_CLR_CARD_DETECT 0 #define SD_SET_CARD_DETECT 1 -#define SD_MAX_HS 50000000 +#define SD_HS_MAX 50000000 +#define SD_DDR50_MAX 50000000 +#define SD_SDR12_MAX 25000000 +#define SD_SDR25_MAX 50000000 +#define SD_SDR50_MAX 100000000 +#define SD_SDR104_MAX 208000000 + +/* Specifications require 400 kHz max. during ID phase. */ +#define SD_MMC_CARD_ID_FREQUENCY 400000 /* OCR bits */ @@ -429,6 +475,12 @@ struct mmc_request { #define MMC_OCR_340_350 (1U << 22) /* Vdd voltage 3.40 ~ 3.50 */ #define MMC_OCR_350_360 (1U << 23) /* Vdd voltage 3.50 ~ 3.60 */ #define MMC_OCR_MAX_VOLTAGE_SHIFT 23 +#define MMC_OCR_S18R (1U << 24) /* Switching to 1.8 V requested (SD) */ +#define MMC_OCR_S18A MMC_OCR_S18R /* Switching to 1.8 V accepted (SD) */ +#define MMC_OCR_XPC (1U << 28) /* SDXC Power Control */ +#define MMC_OCR_ACCESS_MODE_BYTE (0U << 29) /* Access Mode Byte (MMC) */ +#define MMC_OCR_ACCESS_MODE_SECT (1U << 29) /* Access Mode Sector (MMC) */ +#define MMC_OCR_ACCESS_MODE_MASK (3U << 29) #define MMC_OCR_CCS (1u << 30) /* Card Capacity status (SD vs SDHC) */ #define MMC_OCR_CARD_BUSY (1U << 31) /* Card Power up status */ Modified: stable/11/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci.c Thu May 18 20:45:09 2017 (r318493) +++ stable/11/sys/dev/sdhci/sdhci.c Thu May 18 20:46:20 2017 (r318494) @@ -57,6 +57,12 @@ SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLA static int sdhci_debug; SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); +u_int sdhci_quirk_clear = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_clear, CTLFLAG_RWTUN, &sdhci_quirk_clear, + 0, "Mask of quirks to clear"); +u_int sdhci_quirk_set = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_set, CTLFLAG_RWTUN, &sdhci_quirk_set, 0, + "Mask of quirks to set"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) @@ -78,6 +84,10 @@ static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ +static void sdhci_dumpregs(struct sdhci_slot *slot); +static int slot_printf(struct sdhci_slot *slot, const char * fmt, ...) + __printflike(2, 3); + #define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) #define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) #define SDHCI_LOCK_INIT(_slot) \ @@ -581,7 +591,7 @@ sdhci_card_poll(void *arg) int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num) { - uint32_t caps, freq; + uint32_t caps, caps2, freq, host_caps; int err; SDHCI_LOCK_INIT(slot); @@ -625,10 +635,16 @@ sdhci_init_slot(device_t dev, struct sdh sdhci_init(slot); slot->version = (RD2(slot, SDHCI_HOST_VERSION) >> SDHCI_SPEC_VER_SHIFT) & SDHCI_SPEC_VER_MASK; - if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) + if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) { caps = slot->caps; - else + caps2 = slot->caps2; + } else { caps = RD4(slot, SDHCI_CAPABILITIES); + if (slot->version >= SDHCI_SPEC_300) + caps2 = RD4(slot, SDHCI_CAPABILITIES2); + else + caps2 = 0; + } /* Calculate base clock frequency. */ if (slot->version >= SDHCI_SPEC_300) freq = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> @@ -684,15 +700,45 @@ sdhci_init_slot(device_t dev, struct sdh device_printf(dev, "Hardware doesn't report any " "support voltages.\n"); } - slot->host.caps = MMC_CAP_4_BIT_DATA; + host_caps = MMC_CAP_4_BIT_DATA; if (caps & SDHCI_CAN_DO_8BITBUS) - slot->host.caps |= MMC_CAP_8_BIT_DATA; + host_caps |= MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) - slot->host.caps |= MMC_CAP_HSPEED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 18 20:46:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84B06D73137; Thu, 18 May 2017 20:46:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 492DA84D; Thu, 18 May 2017 20:46:29 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IKkSOP021508; Thu, 18 May 2017 20:46:28 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IKkRrZ021500; Thu, 18 May 2017 20:46:27 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182046.v4IKkRrZ021500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 20:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318495 - in stable/10/sys/dev: mmc sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 20:46:29 -0000 Author: marius Date: Thu May 18 20:46:27 2017 New Revision: 318495 URL: https://svnweb.freebsd.org/changeset/base/318495 Log: MFC: r315598 o Add support for eMMC DDR bus speed mode up to 52 MHz to sdhci(4) and mmc(4). Given that support for DDR52 is not denoted by SDHCI capability registers, availability of that timing is indicated by a new quirk SDHCI_QUIRK_MMC_DDR52 and only enabled for Intel SDHCI controllers so far. Compared to 50 MHz at SDR high speed typically yielding ~45 MB/s read throughput with the eMMC chips tested, read performance goes up to ~80 MB/s at DDR52. As a side-effect, this change also fixes communication with some eMMC devices at SDR high speed mode due to the signaling voltage and UHS bits in the SDHCI controller no longer being left in an inappropriate state. o In sdhci(4), add two tunables hw.sdhci.quirk_clear as well as hw.sdhci.quirk_set, which (when hooked up in the front-end) allow to set/clear sdhci(4) quirks for debugging and testing purposes. However, especially for SDHCI controllers on the PCI bus which have no specific support code so far and, thus, are picked up as generic SDHCI controllers, hw.sdhci.quirk_set allows for setting the necessary quirks (if required). o In mmc(4), check and handle the return values of some more function calls instead of assuming that everything went right. In case failures actually are not problematic, indicate that by casting the return value to void. Modified: stable/10/sys/dev/mmc/bridge.h stable/10/sys/dev/mmc/mmc.c stable/10/sys/dev/mmc/mmcbr_if.m stable/10/sys/dev/mmc/mmcbrvar.h stable/10/sys/dev/mmc/mmcreg.h stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h stable/10/sys/dev/sdhci/sdhci_acpi.c stable/10/sys/dev/sdhci/sdhci_if.m stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/bridge.h ============================================================================== --- stable/10/sys/dev/mmc/bridge.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/bridge.h Thu May 18 20:46:27 2017 (r318495) @@ -89,6 +89,10 @@ enum mmc_vdd { vdd_330, vdd_340, vdd_350, vdd_360 }; +enum mmc_vccq { + vccq_120 = 0, vccq_180, vccq_330 +}; + enum mmc_power_mode { power_off = 0, power_up, power_on }; @@ -105,18 +109,28 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_drv_type { + drv_type_b = 0, drv_type_a, drv_type_c, drv_type_d +}; + enum mmc_bus_timing { - bus_timing_normal = 0, bus_timing_hs + bus_timing_normal = 0, bus_timing_hs, bus_timing_uhs_sdr12, + bus_timing_uhs_sdr25, bus_timing_uhs_sdr50, bus_timing_uhs_ddr50, + bus_timing_uhs_sdr104, bus_timing_mmc_ddr52, bus_timing_mmc_hs200, + bus_timing_mmc_hs400, bus_timing_mmc_hs400es, bus_timing_max = + bus_timing_mmc_hs400es }; struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins */ + enum mmc_vccq vccq; /* Voltage to use for signaling */ enum mmc_bus_mode bus_mode; enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; enum mmc_bus_timing timing; + enum mmc_drv_type drv_type; }; enum mmc_card_mode { @@ -134,6 +148,28 @@ struct mmc_host { #define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ #define MMC_CAP_BOOT_NOACC (1 << 4) /* Cannot access boot partitions */ #define MMC_CAP_WAIT_WHILE_BUSY (1 << 5) /* Host waits for busy responses */ +#define MMC_CAP_UHS_SDR12 (1 << 6) /* Can do UHS SDR12 */ +#define MMC_CAP_UHS_SDR25 (1 << 7) /* Can do UHS SDR25 */ +#define MMC_CAP_UHS_SDR50 (1 << 8) /* Can do UHS SDR50 */ +#define MMC_CAP_UHS_SDR104 (1 << 9) /* Can do UHS SDR104 */ +#define MMC_CAP_UHS_DDR50 (1 << 10) /* Can do UHS DDR50 */ +#define MMC_CAP_MMC_DDR52_120 (1 << 11) /* Can do eMMC DDR52 at 1.2 V */ +#define MMC_CAP_MMC_DDR52_180 (1 << 12) /* Can do eMMC DDR52 at 1.8 V */ +#define MMC_CAP_MMC_DDR52 (MMC_CAP_MMC_DDR52_120 | MMC_CAP_MMC_DDR52_180) +#define MMC_CAP_MMC_HS200_120 (1 << 13) /* Can do eMMC HS200 at 1.2 V */ +#define MMC_CAP_MMC_HS200_180 (1 << 14) /* Can do eMMC HS200 at 1.8 V */ +#define MMC_CAP_MMC_HS200 (MMC_CAP_MMC_HS200_120| MMC_CAP_MMC_HS200_180) +#define MMC_CAP_MMC_HS400_120 (1 << 15) /* Can do eMMC HS400 at 1.2 V */ +#define MMC_CAP_MMC_HS400_180 (1 << 16) /* Can do eMMC HS400 at 1.8 V */ +#define MMC_CAP_MMC_HS400 (MMC_CAP_MMC_HS400_120 | MMC_CAP_MMC_HS400_180) +#define MMC_CAP_MMC_HSX00_120 (MMC_CAP_MMC_HS200_120 | MMC_CAP_MMC_HS400_120) +#define MMC_CAP_MMC_ENH_STROBE (1 << 17) /* Can do eMMC Enhanced Strobe */ +#define MMC_CAP_SIGNALING_120 (1 << 18) /* Can do signaling at 1.2 V */ +#define MMC_CAP_SIGNALING_180 (1 << 19) /* Can do signaling at 1.8 V */ +#define MMC_CAP_SIGNALING_330 (1 << 20) /* Can do signaling at 3.3 V */ +#define MMC_CAP_DRIVER_TYPE_A (1 << 21) /* Can do Driver Type A */ +#define MMC_CAP_DRIVER_TYPE_C (1 << 22) /* Can do Driver Type C */ +#define MMC_CAP_DRIVER_TYPE_D (1 << 23) /* Can do Driver Type D */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; @@ -141,7 +177,7 @@ struct mmc_host { extern driver_t mmc_driver; extern devclass_t mmc_devclass; -#define MMC_VERSION 2 +#define MMC_VERSION 3 #define MMC_DECLARE_BRIDGE(name) \ DRIVER_MODULE(mmc, name, mmc_driver, mmc_devclass, NULL, NULL); \ Modified: stable/10/sys/dev/mmc/mmc.c ============================================================================== --- stable/10/sys/dev/mmc/mmc.c Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmc.c Thu May 18 20:46:27 2017 (r318495) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Bernd Walter. All rights reserved. * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * Copyright (c) 2017 Marius Strobl * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -75,6 +76,8 @@ __FBSDID("$FreeBSD$"); #include "mmcbr_if.h" #include "mmcbus_if.h" +CTASSERT(bus_timing_max <= sizeof(uint32_t) * NBBY); + /* * Per-card data */ @@ -92,9 +95,11 @@ struct mmc_ivars { struct mmc_sd_status sd_status; /* SD_STATUS decoded */ u_char read_only; /* True when the device is read-only */ u_char bus_width; /* Bus width to use */ - u_char timing; /* Bus timing support */ u_char high_cap; /* High Capacity card (block addressed) */ uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t timings; /* Mask of bus timings supported */ + uint32_t vccq_120; /* Mask of bus timings at VCCQ of 1.2 V */ + uint32_t vccq_180; /* Mask of bus timings at VCCQ of 1.8 V */ uint32_t tran_speed; /* Max speed in normal mode */ uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ @@ -105,8 +110,6 @@ struct mmc_ivars { #define CMD_RETRIES 3 -#define CARD_ID_FREQUENCY 400000 /* Spec requires 400kHz max during ID phase. */ - static SYSCTL_NODE(_hw, OID_AUTO, mmc, CTLFLAG_RD, NULL, "mmc driver"); static int mmc_debug; @@ -181,12 +184,15 @@ static int mmc_send_op_cond(struct mmc_s uint32_t *rocr); static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp); static int mmc_set_blocklen(struct mmc_softc *sc, uint32_t len); -static int mmc_set_card_bus_width(struct mmc_softc *sc, - struct mmc_ivars *ivar); +static int mmc_set_card_bus_width(struct mmc_softc *sc, struct mmc_ivars *ivar); +static int mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar); static int mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp); static int mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, - int timing); + enum mmc_bus_timing timing); static int mmc_test_bus_width(struct mmc_softc *sc); +static uint32_t mmc_timing_to_dtr(struct mmc_ivars *ivar, + enum mmc_bus_timing timing); +static const char *mmc_timing_to_string(enum mmc_bus_timing timing); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req); @@ -265,8 +271,8 @@ mmc_acquire_bus(device_t busdev, device_ { struct mmc_softc *sc; struct mmc_ivars *ivar; - int err; - int rca; + int err, rca; + enum mmc_bus_timing timing; err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) @@ -288,16 +294,44 @@ mmc_acquire_bus(device_t busdev, device_ ivar = device_get_ivars(dev); rca = ivar->rca; if (sc->last_rca != rca) { - mmc_select_card(sc, rca); + if (mmc_select_card(sc, rca) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to select.\n", rca); + return (ENXIO); + } sc->last_rca = rca; + timing = mmcbr_get_timing(busdev); /* Prepare bus width for the new card. */ if (bootverbose || mmc_debug) { device_printf(busdev, - "setting bus width to %d bits\n", + "setting bus width to %d bits %s timing\n", (ivar->bus_width == bus_width_4) ? 4 : - (ivar->bus_width == bus_width_8) ? 8 : 1); + (ivar->bus_width == bus_width_8) ? 8 : 1, + mmc_timing_to_string(timing)); + } + if (mmc_set_card_bus_width(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set bus width.\n", + rca); + return (ENXIO); + } + if (isset(&ivar->vccq_120, timing)) + mmcbr_set_vccq(busdev, vccq_120); + else if (isset(&ivar->vccq_180, timing)) + mmcbr_set_vccq(busdev, vccq_180); + else + mmcbr_set_vccq(busdev, vccq_330); + if (mmcbr_switch_vccq(busdev) != 0) { + device_printf(sc->dev, "Failed to set VCCQ " + "for card at relative address %d.\n", rca); + return (ENXIO); + } + if (mmc_set_power_class(sc, ivar) != MMC_ERR_NONE) { + device_printf(sc->dev, "Card at relative " + "address %d failed to set power class.\n", + rca); + return (ENXIO); } - mmc_set_card_bus_width(sc, ivar); mmcbr_set_bus_width(busdev, ivar->bus_width); mmcbr_update_ios(busdev); } @@ -525,6 +559,7 @@ static void mmc_power_up(struct mmc_softc *sc) { device_t dev; + enum mmc_vccq vccq; dev = sc->dev; mmcbr_set_vdd(dev, mmc_highest_voltage(mmcbr_get_host_ocr(dev))); @@ -534,9 +569,14 @@ mmc_power_up(struct mmc_softc *sc) mmcbr_set_power_mode(dev, power_up); mmcbr_set_clock(dev, 0); mmcbr_update_ios(dev); + for (vccq = vccq_330; ; vccq--) { + mmcbr_set_vccq(dev, vccq); + if (mmcbr_switch_vccq(dev) == 0 || vccq == vccq_120) + break; + } mmc_ms_delay(1); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); @@ -632,10 +672,30 @@ mmc_set_card_bus_width(struct mmc_softc value = EXT_CSD_BUS_WIDTH_1; break; case bus_width_4: - value = EXT_CSD_BUS_WIDTH_4; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_4_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_4; + break; + } break; case bus_width_8: - value = EXT_CSD_BUS_WIDTH_8; + switch (mmcbr_get_timing(sc->dev)) { + case bus_timing_mmc_ddr52: + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + value = EXT_CSD_BUS_WIDTH_8_DDR; + break; + default: + value = EXT_CSD_BUS_WIDTH_8; + break; + } break; default: return (MMC_ERR_INVALID); @@ -648,23 +708,96 @@ mmc_set_card_bus_width(struct mmc_softc } static int -mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, int timing) +mmc_set_power_class(struct mmc_softc *sc, struct mmc_ivars *ivar) { - u_char switch_res[64]; - uint8_t value; - int err; + device_t dev; + const uint8_t *ext_csd; + uint32_t clock; + uint8_t value; - switch (timing) { - case bus_timing_normal: - value = 0; + dev = sc->dev; + if (mmcbr_get_mode(dev) != mode_mmc || ivar->csd.spec_vers < 4) + return (MMC_ERR_NONE); + + value = 0; + ext_csd = ivar->raw_ext_csd; + clock = mmcbr_get_clock(dev); + switch (1 << mmcbr_get_vdd(dev)) { + case MMC_OCR_LOW_VOLTAGE: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_195]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) >= bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_195_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_195]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) + value = ext_csd[EXT_CSD_PWR_CL_200_195]; break; - case bus_timing_hs: - value = 1; + case MMC_OCR_270_280: + case MMC_OCR_280_290: + case MMC_OCR_290_300: + case MMC_OCR_300_310: + case MMC_OCR_310_320: + case MMC_OCR_320_330: + case MMC_OCR_330_340: + case MMC_OCR_340_350: + case MMC_OCR_350_360: + if (clock <= MMC_TYPE_HS_26_MAX) + value = ext_csd[EXT_CSD_PWR_CL_26_360]; + else if (clock <= MMC_TYPE_HS_52_MAX) { + if (mmcbr_get_timing(dev) == bus_timing_mmc_ddr52 && + ivar->bus_width >= bus_width_4) + value = ext_csd[EXT_CSD_PWR_CL_52_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_52_360]; + } else if (clock <= MMC_TYPE_HS200_HS400ES_MAX) { + if (ivar->bus_width == bus_width_8) + value = ext_csd[EXT_CSD_PWR_CL_200_360_DDR]; + else + value = ext_csd[EXT_CSD_PWR_CL_200_360]; + } break; default: + device_printf(dev, "No power class support for VDD 0x%x\n", + 1 << mmcbr_get_vdd(dev)); return (MMC_ERR_INVALID); } + + if (ivar->bus_width == bus_width_8) + value = (value & EXT_CSD_POWER_CLASS_8BIT_MASK) >> + EXT_CSD_POWER_CLASS_8BIT_SHIFT; + else + value = (value & EXT_CSD_POWER_CLASS_4BIT_MASK) >> + EXT_CSD_POWER_CLASS_4BIT_SHIFT; + + if (value == 0) + return (MMC_ERR_NONE); + + return (mmc_switch(dev, dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_POWER_CLASS, value, ivar->cmd6_time, true)); +} + +static int +mmc_set_timing(struct mmc_softc *sc, struct mmc_ivars *ivar, + enum mmc_bus_timing timing) +{ + u_char switch_res[64]; + uint8_t value; + int err; + if (mmcbr_get_mode(sc->dev) == mode_sd) { + switch (timing) { + case bus_timing_normal: + value = SD_SWITCH_NORMAL_MODE; + break; + case bus_timing_hs: + value = SD_SWITCH_HS_MODE; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_sd_switch(sc, SD_SWITCH_MODE_SET, SD_SWITCH_GROUP1, value, switch_res); if (err != MMC_ERR_NONE) @@ -674,6 +807,17 @@ mmc_set_timing(struct mmc_softc *sc, str mmcbr_set_timing(sc->dev, timing); mmcbr_update_ios(sc->dev); } else { + switch (timing) { + case bus_timing_normal: + value = EXT_CSD_HS_TIMING_BC; + break; + case bus_timing_hs: + case bus_timing_mmc_ddr52: + value = EXT_CSD_HS_TIMING_HS; + break; + default: + return (MMC_ERR_INVALID); + } err = mmc_switch(sc->dev, sc->dev, ivar->rca, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, value, ivar->cmd6_time, false); @@ -1167,19 +1311,82 @@ mmc_set_blocklen(struct mmc_softc *sc, u return (err); } +static uint32_t +mmc_timing_to_dtr(struct mmc_ivars *ivar, enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return (ivar->tran_speed); + case bus_timing_hs: + return (ivar->hs_tran_speed); + case bus_timing_uhs_sdr12: + return (SD_SDR12_MAX); + case bus_timing_uhs_sdr25: + return (SD_SDR25_MAX); + case bus_timing_uhs_ddr50: + return (SD_DDR50_MAX); + case bus_timing_uhs_sdr50: + return (SD_SDR50_MAX); + case bus_timing_uhs_sdr104: + return (SD_SDR104_MAX); + case bus_timing_mmc_ddr52: + return (MMC_TYPE_DDR52_MAX); + case bus_timing_mmc_hs200: + case bus_timing_mmc_hs400: + case bus_timing_mmc_hs400es: + return (MMC_TYPE_HS200_HS400ES_MAX); + } + return (0); +} + +static const char * +mmc_timing_to_string(enum mmc_bus_timing timing) +{ + + switch (timing) { + case bus_timing_normal: + return ("normal speed"); + case bus_timing_hs: + return ("high speed"); + case bus_timing_uhs_sdr12: + case bus_timing_uhs_sdr25: + case bus_timing_uhs_sdr50: + case bus_timing_uhs_sdr104: + return ("single data rate"); + case bus_timing_uhs_ddr50: + case bus_timing_mmc_ddr52: + return ("dual data rate"); + case bus_timing_mmc_hs200: + return ("HS200"); + case bus_timing_mmc_hs400: + return ("HS400"); + case bus_timing_mmc_hs400es: + return ("HS400 with enhanced strobe"); + } + return (""); +} + static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) { + enum mmc_bus_timing max_timing, timing; device_printf(dev, "Card at relative address 0x%04x%s:\n", ivar->rca, newcard ? " added" : ""); device_printf(dev, " card: %s\n", ivar->card_id_string); - device_printf(dev, " bus: %ubit, %uMHz%s\n", + max_timing = bus_timing_normal; + for (timing = bus_timing_max; timing > bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + device_printf(dev, " bus: %ubit, %uMHz (%s timing)\n", (ivar->bus_width == bus_width_1 ? 1 : (ivar->bus_width == bus_width_4 ? 4 : 8)), - (ivar->timing == bus_timing_hs ? - ivar->hs_tran_speed : ivar->tran_speed) / 1000000, - ivar->timing == bus_timing_hs ? ", high speed timing" : ""); + mmc_timing_to_dtr(ivar, timing) / 1000000, + mmc_timing_to_string(timing)); device_printf(dev, " memory: %u blocks, erase sector %u blocks%s\n", ivar->sec_count, ivar->erase_sector, ivar->read_only ? ", read-only" : ""); @@ -1193,10 +1400,11 @@ mmc_discover_cards(struct mmc_softc *sc) struct mmc_ivars *ivar = NULL; device_t *devlist; device_t child; - int err, i, devcount, newcard; + int devcount, err, host_caps, i, newcard; uint32_t resp, sec_count, status; uint16_t rca = 2; + host_caps = mmcbr_get_caps(sc->dev); if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { @@ -1236,14 +1444,24 @@ mmc_discover_cards(struct mmc_softc *sc) if (mmcbr_get_ro(sc->dev)) ivar->read_only = 1; ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; + setbit(&ivar->timings, bus_timing_normal); ivar->mode = mmcbr_get_mode(sc->dev); if (ivar->mode == mode_sd) { mmc_decode_cid_sd(ivar->raw_cid, &ivar->cid); - mmc_send_relative_addr(sc, &resp); + err = mmc_send_relative_addr(sc, &resp); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting RCA %d\n", err); + break; + } ivar->rca = resp >> 16; /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1272,18 +1490,29 @@ mmc_discover_cards(struct mmc_softc *sc) } /* Get card SCR. Card must be selected to fetch it. */ - mmc_select_card(sc, ivar->rca); - mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error selecting card %d\n", err); + break; + } + err = mmc_app_send_scr(sc, ivar->rca, ivar->raw_scr); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, + "Error reading SCR %d\n", err); + break; + } mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && (ivar->csd.ccc & (1 << 10))) { - mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, + err = mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); - if (switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { - ivar->timing = bus_timing_hs; - ivar->hs_tran_speed = SD_MAX_HS; + if (err == MMC_ERR_NONE && + switch_res[13] & (1 << SD_SWITCH_HS_MODE)) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = SD_HS_MAX; } } @@ -1300,8 +1529,9 @@ mmc_discover_cards(struct mmc_softc *sc) * it is still nice to get that right. */ mmc_select_card(sc, 0); - mmc_select_card(sc, ivar->rca); - mmc_app_sd_status(sc, ivar->rca, ivar->raw_sd_status); + (void)mmc_select_card(sc, ivar->rca); + (void)mmc_app_sd_status(sc, ivar->rca, + ivar->raw_sd_status); mmc_app_decode_sd_status(ivar->raw_sd_status, &ivar->sd_status); if (ivar->sd_status.au_size != 0) { @@ -1309,7 +1539,7 @@ mmc_discover_cards(struct mmc_softc *sc) 16 << ivar->sd_status.au_size; } /* Find max supported bus width. */ - if ((mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) && + if ((host_caps & MMC_CAP_4_BIT_DATA) && (ivar->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) ivar->bus_width = bus_width_4; @@ -1339,9 +1569,17 @@ mmc_discover_cards(struct mmc_softc *sc) return; } ivar->rca = rca++; - mmc_set_relative_addr(sc, ivar->rca); + err = mmc_set_relative_addr(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error setting RCA %d\n", err); + break; + } /* Get card CSD. */ - mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + err = mmc_send_csd(sc, ivar->rca, ivar->raw_csd); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error getting CSD %d\n", err); + break; + } if (bootverbose || mmc_debug) device_printf(sc->dev, "%sard detected (CSD %08x%08x%08x%08x)\n", @@ -1367,7 +1605,12 @@ mmc_discover_cards(struct mmc_softc *sc) break; } - mmc_select_card(sc, ivar->rca); + err = mmc_select_card(sc, ivar->rca); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error selecting card %d\n", + err); + break; + } /* Only MMC >= 4.x devices support EXT_CSD. */ if (ivar->csd.spec_vers >= 4) { @@ -1387,16 +1630,28 @@ mmc_discover_cards(struct mmc_softc *sc) ivar->sec_count = sec_count; ivar->high_cap = 1; } - /* Get card speed in high speed mode. */ - ivar->timing = bus_timing_hs; - if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_52) - ivar->hs_tran_speed = MMC_TYPE_52_MAX_HS; - else if (ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] - & EXT_CSD_CARD_TYPE_26) - ivar->hs_tran_speed = MMC_TYPE_26_MAX_HS; - else - ivar->hs_tran_speed = ivar->tran_speed; + /* Get device speeds beyond normal mode. */ + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_52) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_52_MAX; + } else if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_HS_26) != 0) { + setbit(&ivar->timings, bus_timing_hs); + ivar->hs_tran_speed = MMC_TYPE_HS_26_MAX; + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_2V) != 0 && + (host_caps & MMC_CAP_SIGNALING_120) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_120, bus_timing_mmc_ddr52); + } + if ((ivar->raw_ext_csd[EXT_CSD_CARD_TYPE] & + EXT_CSD_CARD_TYPE_DDR_52_1_8V) != 0 && + (host_caps & MMC_CAP_SIGNALING_180) != 0) { + setbit(&ivar->timings, bus_timing_mmc_ddr52); + setbit(&ivar->vccq_180, bus_timing_mmc_ddr52); + } /* * Determine generic switch timeout (provided in * units of 10 ms), defaulting to 500 ms. @@ -1423,9 +1678,6 @@ mmc_discover_cards(struct mmc_softc *sc) break; } } - } else { - ivar->bus_width = bus_width_1; - ivar->timing = bus_timing_normal; } /* @@ -1549,7 +1801,7 @@ mmc_go_discovery(struct mmc_softc *sc) mmc_idle_cards(sc); } else { mmcbr_set_bus_mode(dev, opendrain); - mmcbr_set_clock(dev, CARD_ID_FREQUENCY); + mmcbr_set_clock(dev, SD_MMC_CARD_ID_FREQUENCY); mmcbr_update_ios(dev); /* XXX recompute vdd based on new cards? */ } @@ -1588,42 +1840,59 @@ mmc_calculate_clock(struct mmc_softc *sc { device_t *kids; struct mmc_ivars *ivar; - int i, f_max, max_dtr, max_hs_dtr, max_timing, nkid; - - f_max = mmcbr_get_f_max(sc->dev); - max_dtr = max_hs_dtr = f_max; - if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED) + int host_caps, i, nkid; + uint32_t dtr, max_dtr; + enum mmc_bus_timing max_timing, timing; + bool changed; + + max_dtr = mmcbr_get_f_max(sc->dev); + host_caps = mmcbr_get_caps(sc->dev); + if ((host_caps & MMC_CAP_MMC_DDR52) != 0) + max_timing = bus_timing_mmc_ddr52; + else if ((host_caps & MMC_CAP_HSPEED) != 0) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; if (device_get_children(sc->dev, &kids, &nkid) != 0) panic("can't get children"); - for (i = 0; i < nkid; i++) { - ivar = device_get_ivars(kids[i]); - if (ivar->timing < max_timing) - max_timing = ivar->timing; - if (ivar->tran_speed < max_dtr) - max_dtr = ivar->tran_speed; - if (ivar->hs_tran_speed < max_hs_dtr) - max_hs_dtr = ivar->hs_tran_speed; - } + do { + changed = false; + for (i = 0; i < nkid; i++) { + ivar = device_get_ivars(kids[i]); + if (isclr(&ivar->timings, max_timing)) { + for (timing = max_timing; timing >= + bus_timing_normal; timing--) { + if (isset(&ivar->timings, timing)) { + max_timing = timing; + break; + } + } + changed = true; + } + dtr = mmc_timing_to_dtr(ivar, max_timing); + if (dtr < max_dtr) { + max_dtr = dtr; + changed = true; + } + } + } while (changed == true); if (bootverbose || mmc_debug) { device_printf(sc->dev, - "setting transfer rate to %d.%03dMHz%s\n", + "setting transfer rate to %d.%03dMHz (%s timing)\n", max_dtr / 1000000, (max_dtr / 1000) % 1000, - max_timing == bus_timing_hs ? " (high speed timing)" : ""); + mmc_timing_to_string(max_timing)); } for (i = 0; i < nkid; i++) { ivar = device_get_ivars(kids[i]); - if (ivar->timing == bus_timing_normal) + if ((ivar->timings & ~(1 << bus_timing_normal)) == 0) continue; - mmc_select_card(sc, ivar->rca); - mmc_set_timing(sc, ivar, max_timing); + if (mmc_select_card(sc, ivar->rca) != MMC_ERR_NONE || + mmc_set_timing(sc, ivar, max_timing) != MMC_ERR_NONE) + device_printf(sc->dev, "Card at relative address %d " + "failed to set timing.\n", ivar->rca); } mmc_select_card(sc, 0); free(kids, M_TEMP); - if (max_timing == bus_timing_hs) - max_dtr = max_hs_dtr; mmcbr_set_clock(sc->dev, max_dtr); mmcbr_update_ios(sc->dev); return (max_dtr); Modified: stable/10/sys/dev/mmc/mmcbr_if.m ============================================================================== --- stable/10/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcbr_if.m Thu May 18 20:46:27 2017 (r318495) @@ -65,6 +65,18 @@ INTERFACE mmcbr; # +# Default implementations of some methods. +# +CODE { + static int + null_switch_vccq(device_t brdev __unused, device_t reqdev __unused) + { + + return (0); + } +}; + +# # Called by the mmcbus to set up the IO pins correctly, the common/core # supply voltage (VDD/VCC) to use for the device, the clock frequency, the # type of SPI chip select, power mode and bus width. @@ -75,6 +87,14 @@ METHOD int update_ios { }; # +# Called by the mmcbus to switch the signaling voltage (VCCQ). +# +METHOD int switch_vccq { + device_t brdev; + device_t reqdev; +} DEFAULT null_switch_vccq; + +# # Called by the mmcbus or its children to schedule a mmc request. These # requests are queued. Time passes. The bridge then gets notification # of the status of the request, who then notifies the requesting device Modified: stable/10/sys/dev/mmc/mmcbrvar.h ============================================================================== --- stable/10/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcbrvar.h Thu May 18 20:46:27 2017 (r318495) @@ -71,6 +71,7 @@ enum mmcbr_device_ivars { MMCBR_IVAR_OCR, MMCBR_IVAR_POWER_MODE, MMCBR_IVAR_VDD, + MMCBR_IVAR_VCCQ, MMCBR_IVAR_CAPS, MMCBR_IVAR_TIMING, MMCBR_IVAR_MAX_DATA, @@ -94,6 +95,7 @@ MMCBR_ACCESSOR(mode, MODE, int) MMCBR_ACCESSOR(ocr, OCR, int) MMCBR_ACCESSOR(power_mode, POWER_MODE, int) MMCBR_ACCESSOR(vdd, VDD, int) +MMCBR_ACCESSOR(vccq, VCCQ, int) MMCBR_ACCESSOR(caps, CAPS, int) MMCBR_ACCESSOR(timing, TIMING, int) MMCBR_ACCESSOR(max_data, MAX_DATA, int) @@ -107,6 +109,13 @@ mmcbr_update_ios(device_t dev) } static int __inline +mmcbr_switch_vccq(device_t dev) +{ + + return (MMCBR_SWITCH_VCCQ(device_get_parent(dev), dev)); +} + +static int __inline mmcbr_get_ro(device_t dev) { Modified: stable/10/sys/dev/mmc/mmcreg.h ============================================================================== --- stable/10/sys/dev/mmc/mmcreg.h Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/mmc/mmcreg.h Thu May 18 20:46:27 2017 (r318495) @@ -209,11 +209,11 @@ struct mmc_request { #define MMC_SET_BLOCKLEN 16 #define MMC_READ_SINGLE_BLOCK 17 #define MMC_READ_MULTIPLE_BLOCK 18 - /* reserved: 19 */ +#define MMC_SEND_TUNING_BLOCK 19 +#define MMC_SEND_TUNING_BLOCK_HS200 21 /* Class 3: Stream write commands */ #define MMC_WRITE_DAT_UNTIL_STOP 20 - /* reserved: 21 */ /* reserved: 22 */ /* Class 4: Block oriented write commands */ @@ -304,16 +304,28 @@ struct mmc_request { #define EXT_CSD_ERASE_GRP_DEF 175 /* R/W */ #define EXT_CSD_PART_CONFIG 179 /* R/W */ #define EXT_CSD_BUS_WIDTH 183 /* R/W */ +#define EXT_CSD_STROBE_SUPPORT 184 /* RO */ #define EXT_CSD_HS_TIMING 185 /* R/W */ +#define EXT_CSD_POWER_CLASS 187 /* R/W */ #define EXT_CSD_CARD_TYPE 196 /* RO */ +#define EXT_CSD_DRIVER_STRENGTH 197 /* RO */ #define EXT_CSD_REV 192 /* RO */ #define EXT_CSD_PART_SWITCH_TO 199 /* RO */ +#define EXT_CSD_PWR_CL_52_195 200 /* RO */ +#define EXT_CSD_PWR_CL_26_195 201 /* RO */ +#define EXT_CSD_PWR_CL_52_360 202 /* RO */ +#define EXT_CSD_PWR_CL_26_360 203 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ #define EXT_CSD_ERASE_TO_MULT 223 /* RO */ #define EXT_CSD_ERASE_GRP_SIZE 224 /* RO */ #define EXT_CSD_BOOT_SIZE_MULT 226 /* RO */ +#define EXT_CSD_PWR_CL_200_195 236 /* RO */ +#define EXT_CSD_PWR_CL_200_360 237 /* RO */ +#define EXT_CSD_PWR_CL_52_195_DDR 238 /* RO */ +#define EXT_CSD_PWR_CL_52_360_DDR 239 /* RO */ #define EXT_CSD_GEN_CMD6_TIME 248 /* RO */ +#define EXT_CSD_PWR_CL_200_360_DDR 253 /* RO */ /* * EXT_CSD field definitions @@ -363,15 +375,38 @@ struct mmc_request { #define EXT_CSD_CMD_SET_SECURE 2 #define EXT_CSD_CMD_SET_CPSECURE 4 -#define EXT_CSD_CARD_TYPE_26 1 -#define EXT_CSD_CARD_TYPE_52 2 +#define EXT_CSD_HS_TIMING_BC 0 +#define EXT_CSD_HS_TIMING_HS 1 +#define EXT_CSD_HS_TIMING_DDR200 2 +#define EXT_CSD_HS_TIMING_DDR400 3 +#define EXT_CSD_HS_TIMING_DRV_STR_SHIFT 4 + +#define EXT_CSD_POWER_CLASS_8BIT_MASK 0xf0 +#define EXT_CSD_POWER_CLASS_8BIT_SHIFT 4 +#define EXT_CSD_POWER_CLASS_4BIT_MASK 0x0f +#define EXT_CSD_POWER_CLASS_4BIT_SHIFT 0 + +#define EXT_CSD_CARD_TYPE_HS_26 0x0001 +#define EXT_CSD_CARD_TYPE_HS_52 0x0002 +#define EXT_CSD_CARD_TYPE_DDR_52_1_8V 0x0004 +#define EXT_CSD_CARD_TYPE_DDR_52_1_2V 0x0008 +#define EXT_CSD_CARD_TYPE_HS200_1_8V 0x0010 +#define EXT_CSD_CARD_TYPE_HS200_1_2V 0x0020 +#define EXT_CSD_CARD_TYPE_HS400_1_8V 0x0040 +#define EXT_CSD_CARD_TYPE_HS400_1_2V 0x0080 +#define EXT_CSD_CARD_TYPE_HS400ES 0x0100 #define EXT_CSD_BUS_WIDTH_1 0 #define EXT_CSD_BUS_WIDTH_4 1 #define EXT_CSD_BUS_WIDTH_8 2 - -#define MMC_TYPE_26_MAX_HS 26000000 -#define MMC_TYPE_52_MAX_HS 52000000 +#define EXT_CSD_BUS_WIDTH_4_DDR 5 +#define EXT_CSD_BUS_WIDTH_8_DDR 6 +#define EXT_CSD_BUS_WIDTH_ES 0x80 + +#define MMC_TYPE_HS_26_MAX 26000000 +#define MMC_TYPE_HS_52_MAX 52000000 +#define MMC_TYPE_DDR52_MAX 52000000 +#define MMC_TYPE_HS200_HS400ES_MAX 200000000 /* * SD bus widths @@ -387,12 +422,23 @@ struct mmc_request { #define SD_SWITCH_GROUP1 0 #define SD_SWITCH_NORMAL_MODE 0 #define SD_SWITCH_HS_MODE 1 +#define SD_SWITCH_SDR50_MODE 2 +#define SD_SWITCH_SDR104_MODE 3 +#define SD_SWITCH_DDR50 4 #define SD_SWITCH_NOCHANGE 0xF #define SD_CLR_CARD_DETECT 0 #define SD_SET_CARD_DETECT 1 -#define SD_MAX_HS 50000000 +#define SD_HS_MAX 50000000 +#define SD_DDR50_MAX 50000000 +#define SD_SDR12_MAX 25000000 +#define SD_SDR25_MAX 50000000 +#define SD_SDR50_MAX 100000000 +#define SD_SDR104_MAX 208000000 + +/* Specifications require 400 kHz max. during ID phase. */ +#define SD_MMC_CARD_ID_FREQUENCY 400000 /* OCR bits */ @@ -429,6 +475,12 @@ struct mmc_request { #define MMC_OCR_340_350 (1U << 22) /* Vdd voltage 3.40 ~ 3.50 */ #define MMC_OCR_350_360 (1U << 23) /* Vdd voltage 3.50 ~ 3.60 */ #define MMC_OCR_MAX_VOLTAGE_SHIFT 23 +#define MMC_OCR_S18R (1U << 24) /* Switching to 1.8 V requested (SD) */ +#define MMC_OCR_S18A MMC_OCR_S18R /* Switching to 1.8 V accepted (SD) */ +#define MMC_OCR_XPC (1U << 28) /* SDXC Power Control */ +#define MMC_OCR_ACCESS_MODE_BYTE (0U << 29) /* Access Mode Byte (MMC) */ +#define MMC_OCR_ACCESS_MODE_SECT (1U << 29) /* Access Mode Sector (MMC) */ +#define MMC_OCR_ACCESS_MODE_MASK (3U << 29) #define MMC_OCR_CCS (1u << 30) /* Card Capacity status (SD vs SDHC) */ #define MMC_OCR_CARD_BUSY (1U << 31) /* Card Power up status */ Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Thu May 18 20:46:20 2017 (r318494) +++ stable/10/sys/dev/sdhci/sdhci.c Thu May 18 20:46:27 2017 (r318495) @@ -58,6 +58,12 @@ static int sdhci_debug; TUNABLE_INT("hw.sdhci.debug", &sdhci_debug); SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); +u_int sdhci_quirk_clear = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_clear, CTLFLAG_RWTUN, &sdhci_quirk_clear, + 0, "Mask of quirks to clear"); +u_int sdhci_quirk_set = 0; +SYSCTL_INT(_hw_sdhci, OID_AUTO, quirk_set, CTLFLAG_RWTUN, &sdhci_quirk_set, 0, + "Mask of quirks to set"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) @@ -79,6 +85,10 @@ static void sdhci_card_poll(void *); static void sdhci_card_task(void *, int); /* helper routines */ +static void sdhci_dumpregs(struct sdhci_slot *slot); +static int slot_printf(struct sdhci_slot *slot, const char * fmt, ...) + __printflike(2, 3); + #define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) #define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) #define SDHCI_LOCK_INIT(_slot) \ @@ -582,7 +592,7 @@ sdhci_card_poll(void *arg) int sdhci_init_slot(device_t dev, struct sdhci_slot *slot, int num) { - uint32_t caps, freq; + uint32_t caps, caps2, freq, host_caps; int err; SDHCI_LOCK_INIT(slot); @@ -626,10 +636,16 @@ sdhci_init_slot(device_t dev, struct sdh sdhci_init(slot); slot->version = (RD2(slot, SDHCI_HOST_VERSION) >> SDHCI_SPEC_VER_SHIFT) & SDHCI_SPEC_VER_MASK; - if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) + if (slot->quirks & SDHCI_QUIRK_MISSING_CAPS) { caps = slot->caps; - else + caps2 = slot->caps2; + } else { caps = RD4(slot, SDHCI_CAPABILITIES); + if (slot->version >= SDHCI_SPEC_300) + caps2 = RD4(slot, SDHCI_CAPABILITIES2); + else + caps2 = 0; + } /* Calculate base clock frequency. */ if (slot->version >= SDHCI_SPEC_300) freq = (caps & SDHCI_CLOCK_V3_BASE_MASK) >> @@ -685,15 +701,45 @@ sdhci_init_slot(device_t dev, struct sdh device_printf(dev, "Hardware doesn't report any " "support voltages.\n"); } - slot->host.caps = MMC_CAP_4_BIT_DATA; + host_caps = MMC_CAP_4_BIT_DATA; if (caps & SDHCI_CAN_DO_8BITBUS) - slot->host.caps |= MMC_CAP_8_BIT_DATA; + host_caps |= MMC_CAP_8_BIT_DATA; if (caps & SDHCI_CAN_DO_HISPD) - slot->host.caps |= MMC_CAP_HSPEED; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu May 18 21:00:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 378DAD73734; Thu, 18 May 2017 21:00:52 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEF321059; Thu, 18 May 2017 21:00:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL0pe2026310; Thu, 18 May 2017 21:00:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL0oET026308; Thu, 18 May 2017 21:00:50 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182100.v4IL0oET026308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318496 - stable/11/sys/dev/sdhci X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:00:52 -0000 Author: marius Date: Thu May 18 21:00:50 2017 New Revision: 318496 URL: https://svnweb.freebsd.org/changeset/base/318496 Log: MFC: r318282 - Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail and Braswell eMMC and SDXC controllers share the same IDs. Like in the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ quirk (see r311794 for the corresponding change to the sdhci(4) PCI PCI front-end), though. However, due to the shared ACPI IDs, this is trickier to do. - Intel Apollo Lake eMMC and SDXC controllers are affected by the APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May Lead to Unpredictable System Behavior") silicon bug. When this erratum hits, typically both SDHCI and XHCI controllers wedge. According to Intel, using ADMA2 with 64-bit addressing and 96-bit descriptors serves as a workaround. Until such times when sdhci(4) has ADMA2 support, flag DMA as broken for affected interfaces. This turns out to work around the problem, too, at the cost of performance. - In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC and SDXC controllers, too. Modified: stable/11/sys/dev/sdhci/sdhci_acpi.c stable/11/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_acpi.c Thu May 18 20:46:27 2017 (r318495) +++ stable/11/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:50 2017 (r318496) @@ -57,25 +57,39 @@ static const struct sdhci_acpi_device { const char *desc; u_int quirks; } sdhci_acpi_devices[] = { - { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + { "80860F14", 1, "Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller", SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F14", 3, "Intel Bay Trail SDXC Controller", + { "80860F14", 3, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F16", 0, "Intel Bay Trail SDXC Controller", + { "80860F16", 0, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACA", 0, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACC", 0, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { NULL, 0, NULL, 0} }; static char *sdhci_ids[] = { "80860F14", "80860F16", + "80865ACA", + "80865ACC", NULL }; @@ -249,6 +263,11 @@ sdhci_acpi_attach(device_t dev) return (ENOMEM); } + /* Intel Braswell eMMC 4.5.1 controller quirk */ + if (strcmp(acpi_dev->hid, "80860F14") == 0 && acpi_dev->uid == 1 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES) == 0x446cc8b2 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES2) == 0x00000807) + sc->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_1MHZ; sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; sc->slot.quirks = sc->quirks; Modified: stable/11/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/11/sys/dev/sdhci/sdhci_pci.c Thu May 18 20:46:27 2017 (r318495) +++ stable/11/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:50 2017 (r318496) @@ -132,9 +132,11 @@ static const struct sdhci_device { SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | @@ -340,6 +342,7 @@ sdhci_pci_attach(device_t dev) } sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; + /* Some controllers need to be bumped into the right mode. */ if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) sdhci_lower_frequency(dev); From owner-svn-src-stable@freebsd.org Thu May 18 21:00:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D3EAD7375B; Thu, 18 May 2017 21:00:55 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 009CD1066; Thu, 18 May 2017 21:00:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL0sGh026358; Thu, 18 May 2017 21:00:54 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL0rPP026356; Thu, 18 May 2017 21:00:53 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182100.v4IL0rPP026356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318497 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:00:55 -0000 Author: marius Date: Thu May 18 21:00:53 2017 New Revision: 318497 URL: https://svnweb.freebsd.org/changeset/base/318497 Log: MFC: r318282 - Unlike as in the PCI case, when attached to ACPI, Intel Bay Trail and Braswell eMMC and SDXC controllers share the same IDs. Like in the PCI case, Braswell eMMC needs the SDHCI_QUIRK_DATA_TIMEOUT_1MHZ quirk (see r311794 for the corresponding change to the sdhci(4) PCI PCI front-end), though. However, due to the shared ACPI IDs, this is trickier to do. - Intel Apollo Lake eMMC and SDXC controllers are affected by the APL18 ("Using 32-bit Addressing Mode With SD/eMMC Controller May Lead to Unpredictable System Behavior") silicon bug. When this erratum hits, typically both SDHCI and XHCI controllers wedge. According to Intel, using ADMA2 with 64-bit addressing and 96-bit descriptors serves as a workaround. Until such times when sdhci(4) has ADMA2 support, flag DMA as broken for affected interfaces. This turns out to work around the problem, too, at the cost of performance. - In the sdhci(4) ACPI front-end, probe the Intel Apollo Lake eMMC and SDXC controllers, too. Modified: stable/10/sys/dev/sdhci/sdhci_acpi.c stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_acpi.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:50 2017 (r318496) +++ stable/10/sys/dev/sdhci/sdhci_acpi.c Thu May 18 21:00:53 2017 (r318497) @@ -57,25 +57,39 @@ static const struct sdhci_acpi_device { const char *desc; u_int quirks; } sdhci_acpi_devices[] = { - { "80860F14", 1, "Intel Bay Trail eMMC 4.5 Controller", + { "80860F14", 1, "Intel Bay Trail/Braswell eMMC 4.5/4.5.1 Controller", SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_MMC_DDR52 | SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F14", 3, "Intel Bay Trail SDXC Controller", + { "80860F14", 3, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, - { "80860F16", 0, "Intel Bay Trail SDXC Controller", + { "80860F16", 0, "Intel Bay Trail/Braswell SDXC Controller", SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACA", 0, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, + { "80865ACC", 0, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ + SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | + SDHCI_QUIRK_INTEL_POWER_UP_RESET | + SDHCI_QUIRK_WAIT_WHILE_BUSY | + SDHCI_QUIRK_MMC_DDR52 | + SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 | + SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { NULL, 0, NULL, 0} }; static char *sdhci_ids[] = { "80860F14", "80860F16", + "80865ACA", + "80865ACC", NULL }; @@ -249,6 +263,11 @@ sdhci_acpi_attach(device_t dev) return (ENOMEM); } + /* Intel Braswell eMMC 4.5.1 controller quirk */ + if (strcmp(acpi_dev->hid, "80860F14") == 0 && acpi_dev->uid == 1 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES) == 0x446cc8b2 && + SDHCI_READ_4(dev, &sc->slot, SDHCI_CAPABILITIES2) == 0x00000807) + sc->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_1MHZ; sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; sc->slot.quirks = sc->quirks; Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:50 2017 (r318496) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Thu May 18 21:00:53 2017 (r318497) @@ -132,9 +132,11 @@ static const struct sdhci_device { SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_WAIT_WHILE_BUSY | SDHCI_QUIRK_PRESET_VALUE_BROKEN }, { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller", + SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */ SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE | SDHCI_QUIRK_INTEL_POWER_UP_RESET | SDHCI_QUIRK_WAIT_WHILE_BUSY | @@ -341,6 +343,7 @@ sdhci_pci_attach(device_t dev) } sc->quirks &= ~sdhci_quirk_clear; sc->quirks |= sdhci_quirk_set; + /* Some controllers need to be bumped into the right mode. */ if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) sdhci_lower_frequency(dev); From owner-svn-src-stable@freebsd.org Thu May 18 21:09:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E26D73A84; Thu, 18 May 2017 21:09:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 256AC167B; Thu, 18 May 2017 21:09:26 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL9PUB030404; Thu, 18 May 2017 21:09:25 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL9Pck030403; Thu, 18 May 2017 21:09:25 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182109.v4IL9Pck030403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318498 - stable/11/sys/dev/usb/controller X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:09:26 -0000 Author: marius Date: Thu May 18 21:09:24 2017 New Revision: 318498 URL: https://svnweb.freebsd.org/changeset/base/318498 Log: MFC: r314345, r318276 - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Modified: stable/11/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:00:53 2017 (r318497) +++ stable/11/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:24 2017 (r318498) @@ -100,6 +100,8 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x00151912: + return ("NEC uPD720202 USB 3.0 controller"); case 0x10001b73: return ("Fresco Logic FL1000G USB 3.0 controller"); @@ -114,6 +116,10 @@ xhci_pci_match(device_t self) case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); + case 0x22b58086: + return ("Intel Braswell USB 3.0 controller"); + case 0x5aa88086: + return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: From owner-svn-src-stable@freebsd.org Thu May 18 21:09:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7861AD73ABD; Thu, 18 May 2017 21:09:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49EA116B3; Thu, 18 May 2017 21:09:32 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IL9VZK030454; Thu, 18 May 2017 21:09:31 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IL9V9l030453; Thu, 18 May 2017 21:09:31 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201705182109.v4IL9V9l030453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Thu, 18 May 2017 21:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318499 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:09:32 -0000 Author: marius Date: Thu May 18 21:09:31 2017 New Revision: 318499 URL: https://svnweb.freebsd.org/changeset/base/318499 Log: MFC: r314345, r318276 - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Modified: stable/10/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:24 2017 (r318498) +++ stable/10/sys/dev/usb/controller/xhci_pci.c Thu May 18 21:09:31 2017 (r318499) @@ -100,6 +100,8 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x00151912: + return ("NEC uPD720202 USB 3.0 controller"); case 0x10001b73: return ("Fresco Logic FL1000G USB 3.0 controller"); @@ -114,6 +116,10 @@ xhci_pci_match(device_t self) case 0x9c318086: case 0x1e318086: return ("Intel Panther Point USB 3.0 controller"); + case 0x22b58086: + return ("Intel Braswell USB 3.0 controller"); + case 0x5aa88086: + return ("Intel Apollo Lake USB 3.0 controller"); case 0x8c318086: return ("Intel Lynx Point USB 3.0 controller"); case 0x8cb18086: From owner-svn-src-stable@freebsd.org Thu May 18 21:23:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A876FD6F2AC; Thu, 18 May 2017 21:23:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7962174E; Thu, 18 May 2017 21:23:40 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4ILNdEM038659; Thu, 18 May 2017 21:23:39 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4ILNdsB038658; Thu, 18 May 2017 21:23:39 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201705182123.v4ILNdsB038658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 18 May 2017 21:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318500 - stable/11/sys/dev/atkbdc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:23:40 -0000 Author: wulf Date: Thu May 18 21:23:39 2017 New Revision: 318500 URL: https://svnweb.freebsd.org/changeset/base/318500 Log: MFC r317811: Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads Wait for all advertised head packets after status packet have been received. This fixes rare but quite annoying issue in Elan hw v.4 touchpads support when triple-finger taps are reported as double-finger taps under several circumstances. MFC r317812: Reduce default tap_min_queue size for Elan touchpads Elan hw v.4 touchpads often sends touchpad release packet right after touchpad touch one. Most probably this happens due to PS/2 limited bandwith. Reducing of tap_min_queue size to 1 makes multifinger tap detection more reliable in this case. MFC r317813: Adjust Elantech palm width threshold to nearly match synaptics defaults MFC r317814: psm(4): reduce cursor jumping on palm detection This is done with discarding pointer movements rather then mouse packets MFC r317815: Enable palm detection on two finger touches for multitouch trackpads. MFC r317816: Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as Linux does. It should not affect gesture processing in current state as it ignores finger coords on 3-finger tap detection but it should make evdev reports looking more Linux-alike. MFC r317817: Set predefined logical touchpad sizes for several ancient Elan hw v.2 models. This change is based on Linux driver. Determine logical trace size. It used for calculation of touch sizes in surface units for MT-protocol type B evdev reports. MFC r317818: psm(4): Remove sys/libkern.h header inclusion It is already included via sys/systm.h MFC r317819: Reduce synaptics touch sensitivity Increase hw.psm.synaptics.min_pressure default value from 16 to 32 to nearly match Linux driver (30-35 hysteresis loop). This makes libinput tap detection more reliable. Modified: stable/11/sys/dev/atkbdc/psm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/atkbdc/psm.c ============================================================================== --- stable/11/sys/dev/atkbdc/psm.c Thu May 18 21:09:31 2017 (r318499) +++ stable/11/sys/dev/atkbdc/psm.c Thu May 18 21:23:39 2017 (r318500) @@ -81,7 +81,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -300,6 +299,8 @@ typedef struct elantechhw { int dpmmy; int ntracesx; int ntracesy; + int dptracex; + int dptracey; int issemimt; int isclickpad; int hascrc; @@ -366,6 +367,7 @@ enum { typedef struct elantechaction { finger_t fingers[ELANTECH_MAX_FINGERS]; int mask; + int mask_v4wait; } elantechaction_t; /* driver control block */ @@ -3016,13 +3018,15 @@ proc_synaptics(struct psm_softc *sc, pac ms->button = touchpad_buttons; + psmgestures(sc, &f[0], nfingers, ms); + for (id = 0; id < PSM_FINGERS; id++) + psmsmoother(sc, &f[id], id, ms, x, y); + /* Palm detection doesn't terminate the current action. */ - if (!psmpalmdetect(sc, &f[0], nfingers)) { - psmgestures(sc, &f[0], nfingers, ms); - for (id = 0; id < PSM_FINGERS; id++) - psmsmoother(sc, &f[id], id, ms, x, y); - } else { - VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); + if (psmpalmdetect(sc, &f[0], nfingers)) { + *x = *y = *z = 0; + ms->button = ms->obutton; + return (0); } ms->button |= extended_buttons | guest_buttons; @@ -3062,8 +3066,9 @@ static int psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) { if (!( - ((sc->synhw.capMultiFinger || - sc->synhw.capAdvancedGestures) && nfingers > 1) || + ((sc->synhw.capMultiFinger || sc->synhw.capAdvancedGestures) && + !sc->synhw.capReportsV && nfingers > 1) || + (sc->synhw.capReportsV && nfingers > 2) || (sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) || (!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) || (sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) { @@ -3076,6 +3081,7 @@ psmpalmdetect(struct psm_softc *sc, fing * [min_pressure; max_pressure] * - pen aren't supported but PSM_FINGER_IS_PEN is set */ + VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f->w)); return (1); } return (0); @@ -3767,27 +3773,30 @@ proc_elantech(struct psm_softc *sc, pack nfingers = (pb->ipacket[0] & 0xc0) >> 6; if (nfingers == 3 && (pb->ipacket[3] & 0x80)) nfingers = 4; - mask = (1 << nfingers) - 1; - fn = ELANTECH_FINGER_SET_XYP(pb); + if (nfingers == 0) { + mask = (1 << nfingers) - 1; /* = 0x00 */ + break; + } + + /* Map 3-rd and 4-th fingers to first finger */ + mask = (1 << 1) - 1; /* = 0x01 */ + f[0] = ELANTECH_FINGER_SET_XYP(pb); if (sc->elanhw.haspressure) { - fn.w = ((pb->ipacket[0] & 0x30) >> 2) | + f[0].w = ((pb->ipacket[0] & 0x30) >> 2) | ((pb->ipacket[3] & 0x30) >> 4); } else { - fn.p = PSM_FINGER_DEFAULT_P; - fn.w = PSM_FINGER_DEFAULT_W; + f[0].p = PSM_FINGER_DEFAULT_P; + f[0].w = PSM_FINGER_DEFAULT_W; } /* * HW v2 dont report exact finger positions when 3 or more - * fingers are on touchpad. Use reported value as fingers - * position as it is required for tap detection + * fingers are on touchpad. */ if (nfingers > 2) - fn.flags = PSM_FINGER_FUZZY; + f[0].flags = PSM_FINGER_FUZZY; - for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++) - f[id] = fn; break; case ELANTECH_PKT_V2_2FINGER: /*HW V2. Two finger touch */ @@ -3833,8 +3842,12 @@ proc_elantech(struct psm_softc *sc, pack * ------------------------------------------- */ nfingers = (pb->ipacket[0] & 0xc0) >> 6; - mask = (1 << nfingers) - 1; - id = nfingers - 1; + /* Map 3-rd finger to first finger */ + id = nfingers > 2 ? 0 : nfingers - 1; + mask = (1 << (id + 1)) - 1; + + if (nfingers == 0) + break; fn = ELANTECH_FINGER_SET_XYP(pb); fn.w = ((pb->ipacket[0] & 0x30) >> 2) | @@ -3842,15 +3855,11 @@ proc_elantech(struct psm_softc *sc, pack /* * HW v3 dont report exact finger positions when 3 or more - * fingers are on touchpad. Use reported value as fingers - * position as it is required for tap detection + * fingers are on touchpad. */ if (nfingers > 1) fn.flags = PSM_FINGER_FUZZY; - for (id = 0; id < imin(nfingers, ELANTECH_MAX_FINGERS); id++) - f[id] = fn; - if (nfingers == 2) { if (ELANTECH_PKT_IS_V3_HEAD(pb, sc->elanhw.hascrc)) { sc->elanaction.fingers[0] = fn; @@ -3858,6 +3867,7 @@ proc_elantech(struct psm_softc *sc, pack } else f[0] = sc->elanaction.fingers[0]; } + f[id] = fn; break; case ELANTECH_PKT_V4_STATUS: /* HW Version 4. Status packet */ @@ -3879,9 +3889,15 @@ proc_elantech(struct psm_softc *sc, pack mask = pb->ipacket[1] & 0x1f; nfingers = bitcount(mask); + if (sc->elanaction.mask_v4wait != 0) + VLOG(3, (LOG_DEBUG, "elantech: HW v4 status packet" + " when not all previous head packets received\n")); + + /* Bitmap of fingers to receive before gesture processing */ + sc->elanaction.mask_v4wait = mask & ~sc->elanaction.mask; + /* Skip "new finger is on touchpad" packets */ - if ((sc->elanaction.mask & mask) == sc->elanaction.mask && - (mask & ~sc->elanaction.mask)) { + if (sc->elanaction.mask_v4wait) { sc->elanaction.mask = mask; return (0); } @@ -3906,11 +3922,33 @@ proc_elantech(struct psm_softc *sc, pack mask = sc->elanaction.mask; nfingers = bitcount(mask); id = ((pb->ipacket[3] & 0xe0) >> 5) - 1; + fn = ELANTECH_FINGER_SET_XYP(pb); + fn.w =(pb->ipacket[0] & 0xf0) >> 4; + + if (id < 0) + return (0); - if (id >= 0 && id < ELANTECH_MAX_FINGERS) { - f[id] = ELANTECH_FINGER_SET_XYP(pb); - f[id].w = (pb->ipacket[0] & 0xf0) >> 4; + /* Packet is finger position update. Report it */ + if (sc->elanaction.mask_v4wait == 0) { + if (id < ELANTECH_MAX_FINGERS) + f[id] = fn; + break; } + + /* Remove finger from waiting bitmap and store into context */ + sc->elanaction.mask_v4wait &= ~(1 << id); + if (id < ELANTECH_MAX_FINGERS) + sc->elanaction.fingers[id] = fn; + + /* Wait for other fingers if needed */ + if (sc->elanaction.mask_v4wait != 0) + return (0); + + /* All new fingers are received. Report them from context */ + for (id = 0; id < ELANTECH_MAX_FINGERS; id++) + if (sc->elanaction.mask & (1 << id)) + f[id] = sc->elanaction.fingers[id]; + break; case ELANTECH_PKT_V4_MOTION: /* HW Version 4. Motion packet */ @@ -4006,20 +4044,14 @@ proc_elantech(struct psm_softc *sc, pack ms->button = touchpad_button | trackpoint_button; - /* Palm detection doesn't terminate the current action. */ - if (!psmpalmdetect(sc, &f[0], nfingers)) { - /* Send finger 1 position to gesture processor */ - if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) || - nfingers == 0) - psmgestures(sc, &f[0], imin(nfingers, 3), ms); - /* Send fingers positions to movement smoothers */ - for (id = 0; id < PSM_FINGERS; id++) - if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id))) - psmsmoother(sc, &f[id], id, ms, x, y); - } else { - VLOG(2, (LOG_DEBUG, "elantech: palm detected! (%d)\n", - f[0].w)); - } + /* Send finger 1 position to gesture processor */ + if (PSM_FINGER_IS_SET(f[0]) || PSM_FINGER_IS_SET(f[1]) || + nfingers == 0) + psmgestures(sc, &f[0], imin(nfingers, 3), ms); + /* Send fingers positions to movement smoothers */ + for (id = 0; id < PSM_FINGERS; id++) + if (PSM_FINGER_IS_SET(f[id]) || !(mask & (1 << id))) + psmsmoother(sc, &f[id], id, ms, x, y); /* Store current finger positions in action context */ for (id = 0; id < ELANTECH_MAX_FINGERS; id++) { @@ -4030,6 +4062,13 @@ proc_elantech(struct psm_softc *sc, pack } sc->elanaction.mask = mask; + /* Palm detection doesn't terminate the current action. */ + if (psmpalmdetect(sc, &f[0], nfingers)) { + *x = *y = *z = 0; + ms->button = ms->obutton; + return (0); + } + /* Use the extra buttons as a scrollwheel */ if (ms->button & MOUSE_BUTTON4DOWN) *z = -1; @@ -5054,7 +5093,7 @@ synaptics_sysctl_create_tree(struct psm_ "Enable two finger scrolling"); /* hw.psm.synaptics.min_pressure. */ - sc->syninfo.min_pressure = 16; + sc->syninfo.min_pressure = 32; SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx, SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, "min_pressure", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, @@ -6155,7 +6194,10 @@ elantech_init_synaptics(struct psm_softc sc->synhw.capPassthrough = sc->elanhw.hastrackpoint; sc->synhw.capClickPad = sc->elanhw.isclickpad; sc->synhw.capMultiFinger = 1; - sc->synhw.capAdvancedGestures = 1; + if (sc->elanhw.issemimt) + sc->synhw.capAdvancedGestures = 1; + else + sc->synhw.capReportsV = 1; sc->synhw.capPalmDetect = 1; sc->synhw.capPen = 0; sc->synhw.capReportsMax = 1; @@ -6189,6 +6231,12 @@ elantech_init_synaptics(struct psm_softc /* Disable finger detection pressure threshold */ sc->syninfo.min_pressure = 1; + /* Adjust palm width to nearly match synaptics w=10 */ + sc->syninfo.max_width = 7; + + /* Elans often report double & triple taps as single event */ + sc->syninfo.tap_min_queue = 1; + /* Use full area of touchpad */ sc->syninfo.margin_top = 0; sc->syninfo.margin_right = 0; @@ -6233,8 +6281,17 @@ enable_elantech(struct psm_softc *sc, en static const int ic2hw[] = /*IC: 0 1 2 3 4 5 6 7 8 9 a b c d e f */ { 0, 0, 2, 0, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0 }; + static const int fw_sizes[][3] = { + /* FW.vers MaxX MaxY */ + { 0x020030, 1152, 768 }, + { 0x020800, 1152, 768 }, + { 0x020b00, 1152, 768 }, + { 0x040215, 900, 500 }, + { 0x040216, 819, 405 }, + { 0x040219, 900, 500 }, + }; elantechhw_t elanhw; - int icversion, hwversion, dptracex, dptracey, id, resp[3], dpix, dpiy; + int icversion, hwversion, xtr, i, id, resp[3], dpix, dpiy; KBDC kbdc = sc->kbdc; VLOG(3, (LOG_DEBUG, "elantech: BEGIN init\n")); @@ -6285,8 +6342,8 @@ enable_elantech(struct psm_softc *sc, en return (FALSE); } - elanhw.ntracesx = resp[1] - 1; - elanhw.ntracesy = resp[2] - 1; + elanhw.ntracesx = imax(resp[1], 3); + elanhw.ntracesy = imax(resp[2], 3); elanhw.hastrackpoint = (resp[0] & 0x80) != 0; /* Get the touchpad resolution */ @@ -6320,24 +6377,35 @@ enable_elantech(struct psm_softc *sc, en * On HW v.3 touchpads it should be done after switching hardware * to real resolution mode (by setting bit 3 of reg10) */ + elanhw.dptracex = elanhw.dptracey = 64; + for (i = 0; i < nitems(fw_sizes); i++) { + if (elanhw.fwversion == fw_sizes[i][0]) { + elanhw.sizex = fw_sizes[i][1]; + elanhw.sizey = fw_sizes[i][2]; + goto found; + } + } if (elantech_cmd(kbdc, hwversion, ELANTECH_FW_ID, resp) != 0) { printf(" Failed to read touchpad size\n"); elanhw.sizex = 10000; /* Arbitrary high values to */ elanhw.sizey = 10000; /* prevent clipping in smoother */ } else if (hwversion == 2) { - dptracex = dptracey = 64; if ((elanhw.fwversion >> 16) == 0x14 && (resp[1] & 0x10) && !elantech_cmd(kbdc, hwversion, ELANTECH_SAMPLE, resp)) { - dptracex = resp[1] / 2; - dptracey = resp[2] / 2; + elanhw.dptracex = resp[1] / 2; + elanhw.dptracey = resp[2] / 2; } - elanhw.sizex = (elanhw.ntracesx - 1) * dptracex; - elanhw.sizey = (elanhw.ntracesy - 1) * dptracey; + xtr = ((elanhw.fwversion >> 8) == 0x0208) ? 1 : 2; + elanhw.sizex = (elanhw.ntracesx - xtr) * elanhw.dptracex; + elanhw.sizey = (elanhw.ntracesy - xtr) * elanhw.dptracey; } else { elanhw.sizex = (resp[0] & 0x0f) << 8 | resp[1]; elanhw.sizey = (resp[0] & 0xf0) << 4 | resp[2]; + xtr = (elanhw.sizex % (elanhw.ntracesx - 2) == 0) ? 2 : 1; + elanhw.dptracex = elanhw.sizex / (elanhw.ntracesx - xtr); + elanhw.dptracey = elanhw.sizey / (elanhw.ntracesy - xtr); } - +found: if (verbose >= 2) { printf(" Model information:\n"); printf(" MaxX: %d\n", elanhw.sizex); @@ -6346,6 +6414,8 @@ enable_elantech(struct psm_softc *sc, en printf(" DpmmY: %d\n", elanhw.dpmmy); printf(" TracesX: %d\n", elanhw.ntracesx); printf(" TracesY: %d\n", elanhw.ntracesy); + printf(" DptraceX: %d\n", elanhw.dptracex); + printf(" DptraceY: %d\n", elanhw.dptracey); printf(" SemiMT: %d\n", elanhw.issemimt); printf(" Clickpad: %d\n", elanhw.isclickpad); printf(" Trackpoint: %d\n", elanhw.hastrackpoint); From owner-svn-src-stable@freebsd.org Thu May 18 21:27:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21795D6F45D; Thu, 18 May 2017 21:27:25 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id CD888A51; Thu, 18 May 2017 21:27:24 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id B30FB1BD74; Fri, 19 May 2017 00:27:20 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id fGesGcTLBgKv; Fri, 19 May 2017 00:27:16 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id BDDAC1BD6E; Fri, 19 May 2017 00:27:16 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id 68285574ABD; Fri, 19 May 2017 00:27:13 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id DNIzAvbcvEA8; Fri, 19 May 2017 00:27:10 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id 88B29574A91; Fri, 19 May 2017 00:27:10 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 19 May 2017 00:27:10 +0300 From: Vladimir Kondratyev To: Vladimir Kondratyev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org, owner-src-committers@freebsd.org Subject: Re: svn commit: r318500 - stable/11/sys/dev/atkbdc In-Reply-To: <201705182123.v4ILNdsB038658@repo.freebsd.org> References: <201705182123.v4ILNdsB038658@repo.freebsd.org> Message-ID: X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.2.2 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 21:27:25 -0000 On 2017-05-19 00:23, Vladimir Kondratyev wrote: > Author: wulf > Date: Thu May 18 21:23:39 2017 > New Revision: 318500 > URL: https://svnweb.freebsd.org/changeset/base/318500 > > Log: > MFC r317811: > > ... > > MFC r317819: > Approved by: gonzo (mentor) -- WBR Vladimir Kondratyev From owner-svn-src-stable@freebsd.org Thu May 18 23:41:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD421D739A4; Thu, 18 May 2017 23:41:19 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89E841307; Thu, 18 May 2017 23:41:19 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INfIsV091477; Thu, 18 May 2017 23:41:18 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INfIaf091476; Thu, 18 May 2017 23:41:18 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705182341.v4INfIaf091476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 18 May 2017 23:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318504 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:41:19 -0000 Author: rpokala Date: Thu May 18 23:41:18 2017 New Revision: 318504 URL: https://svnweb.freebsd.org/changeset/base/318504 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it jhb pointed out that (struct ifnet) is part of the network driver KBI, and thus the offsets of internal fields must not change. Therefore, move the new "if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's what they're there for. The new field replaces the *last* element of that array; that way, offsetof(if_pspare) and offsetof(if_ispare) are unchanged compared to before r318397. PR: 194386 Reviewed by: jhb Pointyhat to: rpokala Sponsored by: Panasas Modified: stable/11/sys/net/if_var.h Modified: stable/11/sys/net/if_var.h ============================================================================== --- stable/11/sys/net/if_var.h Thu May 18 22:50:16 2017 (r318503) +++ stable/11/sys/net/if_var.h Thu May 18 23:41:18 2017 (r318504) @@ -241,7 +241,6 @@ struct ifnet { struct ifmultihead if_multiaddrs; /* multicast addresses configured */ int if_amcount; /* number of all-multicast requests */ struct ifaddr *if_addr; /* pointer to link-level address */ - void *if_hw_addr; /* hardware link-level address */ const u_int8_t *if_broadcastaddr; /* linklevel broadcast bytestring */ struct rwlock if_afdata_lock; void *if_afdata[AF_MAX]; @@ -312,7 +311,8 @@ struct ifnet { * that structure can be enhanced without changing the kernel * binary interface. */ - void *if_pspare[4]; /* packet pacing / general use */ + void *if_pspare[3]; /* packet pacing / general use */ + void *if_hw_addr; /* hardware link-level address */ int if_ispare[4]; /* packet pacing / general use */ }; From owner-svn-src-stable@freebsd.org Thu May 18 23:41:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63B24D73A0D; Thu, 18 May 2017 23:41:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32310146F; Thu, 18 May 2017 23:41:35 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INfYGM091541; Thu, 18 May 2017 23:41:34 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INfYTM091540; Thu, 18 May 2017 23:41:34 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201705182341.v4INfYTM091540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Thu, 18 May 2017 23:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318505 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:41:35 -0000 Author: rpokala Date: Thu May 18 23:41:34 2017 New Revision: 318505 URL: https://svnweb.freebsd.org/changeset/base/318505 Log: Persistently store NIC's hardware MAC address, and add a way to retrive it jhb pointed out that (struct ifnet) is part of the network driver KBI, and thus the offsets of internal fields must not change. Therefore, move the new "if_hw_addr" field to the end, and consume one of the "if_pspare"s; that's what they're there for. Because netmap on stable/10 uses "if_pspare[0]", the new field replaces the *last* element of that array; that way, offsetof(if_pspare) is unchanged compared to before r318430. PR: 194386 Reviewed by: jhb Pointyhat to: rpokala Sponsored by: Panasas Modified: stable/10/sys/net/if_var.h Modified: stable/10/sys/net/if_var.h ============================================================================== --- stable/10/sys/net/if_var.h Thu May 18 23:41:18 2017 (r318504) +++ stable/10/sys/net/if_var.h Thu May 18 23:41:34 2017 (r318505) @@ -200,7 +200,6 @@ struct ifnet { (struct ifnet *, struct vnet *, char *); struct vnet *if_home_vnet; /* where this ifnet originates from */ struct ifaddr *if_addr; /* pointer to link-level address */ - void *if_hw_addr; /* hardware link-level address */ void *if_llsoftc; /* link layer softc */ int if_drv_flags; /* driver-managed status flags */ struct ifaltq if_snd; /* output queue (includes altq) */ @@ -260,7 +259,8 @@ struct ifnet { */ u_int if_hw_tsomaxsegcount; /* TSO maximum segment count */ u_int if_hw_tsomaxsegsize; /* TSO maximum segment size in bytes */ - void *if_pspare[8]; /* 1 netmap, 7 TDB */ + void *if_pspare[7]; /* 1 netmap, 6 TDB */ + void *if_hw_addr; /* hardware link-level address */ }; typedef void if_init_f_t(void *); From owner-svn-src-stable@freebsd.org Thu May 18 23:52:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0ED0ED73E55; Thu, 18 May 2017 23:52:30 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE16A1A76; Thu, 18 May 2017 23:52:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4INqSIL099302; Thu, 18 May 2017 23:52:28 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4INqSbQ099301; Thu, 18 May 2017 23:52:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201705182352.v4INqSbQ099301@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 18 May 2017 23:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318506 - stable/11/sys/dev/vt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 23:52:30 -0000 Author: jkim Date: Thu May 18 23:52:28 2017 New Revision: 318506 URL: https://svnweb.freebsd.org/changeset/base/318506 Log: MFC: r317171, r317173, r317560, r317561, r318326 Always clear borders when the terminal is flushed. PR: 202288 Modified: stable/11/sys/dev/vt/vt_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/vt_core.c ============================================================================== --- stable/11/sys/dev/vt/vt_core.c Thu May 18 23:41:34 2017 (r318505) +++ stable/11/sys/dev/vt/vt_core.c Thu May 18 23:52:28 2017 (r318506) @@ -1147,6 +1147,36 @@ vt_mark_mouse_position_as_dirty(struct v } #endif +static void +vt_set_border(struct vt_device *vd, const term_rect_t *area, + const term_color_t c) +{ + vd_drawrect_t *drawrect = vd->vd_driver->vd_drawrect; + + if (drawrect == NULL) + return; + + /* Top bar */ + if (area->tr_begin.tp_row > 0) + drawrect(vd, 0, 0, vd->vd_width - 1, + area->tr_begin.tp_row - 1, 1, c); + + /* Left bar */ + if (area->tr_begin.tp_col > 0) + drawrect(vd, 0, area->tr_begin.tp_row, + area->tr_begin.tp_col - 1, area->tr_end.tp_row - 1, 1, c); + + /* Right bar */ + if (area->tr_end.tp_col < vd->vd_width) + drawrect(vd, area->tr_end.tp_col, area->tr_begin.tp_row, + vd->vd_width - 1, area->tr_end.tp_row - 1, 1, c); + + /* Bottom bar */ + if (area->tr_end.tp_row < vd->vd_height) + drawrect(vd, 0, area->tr_end.tp_row, vd->vd_width - 1, + vd->vd_height - 1, 1, c); +} + static int vt_flush(struct vt_device *vd) { @@ -1212,6 +1242,7 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_INVALID) { vd->vd_flags &= ~VDF_INVALID; + vt_set_border(vd, &vw->vw_draw_area, TC_BLACK); vt_termrect(vd, vf, &tarea); if (vt_draw_logo_cpus) vtterm_draw_cpu_logos(vd); @@ -1527,45 +1558,6 @@ vtterm_opened(struct terminal *tm, int o } static int -vt_set_border(struct vt_window *vw, term_color_t c) -{ - struct vt_device *vd = vw->vw_device; - - if (vd->vd_driver->vd_drawrect == NULL) - return (ENOTSUP); - - /* Top bar. */ - if (vw->vw_draw_area.tr_begin.tp_row > 0) - vd->vd_driver->vd_drawrect(vd, - 0, 0, - vd->vd_width - 1, vw->vw_draw_area.tr_begin.tp_row - 1, - 1, c); - - /* Left bar. */ - if (vw->vw_draw_area.tr_begin.tp_col > 0) - vd->vd_driver->vd_drawrect(vd, - 0, 0, - vw->vw_draw_area.tr_begin.tp_col - 1, vd->vd_height - 1, - 1, c); - - /* Right bar. */ - if (vw->vw_draw_area.tr_end.tp_col < vd->vd_width) - vd->vd_driver->vd_drawrect(vd, - vw->vw_draw_area.tr_end.tp_col - 1, 0, - vd->vd_width - 1, vd->vd_height - 1, - 1, c); - - /* Bottom bar. */ - if (vw->vw_draw_area.tr_end.tp_row < vd->vd_height) - vd->vd_driver->vd_drawrect(vd, - 0, vw->vw_draw_area.tr_end.tp_row - 1, - vd->vd_width - 1, vd->vd_height - 1, - 1, c); - - return (0); -} - -static int vt_change_font(struct vt_window *vw, struct vt_font *vf) { struct vt_device *vd = vw->vw_device; @@ -1630,7 +1622,6 @@ vt_change_font(struct vt_window *vw, str /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) { - vt_set_border(vw, TC_BLACK); vd->vd_flags |= VDF_INVALID; vt_resume_flush_timer(vw->vw_device, 0); } From owner-svn-src-stable@freebsd.org Fri May 19 00:00:39 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B80D732BD; Fri, 19 May 2017 00:00:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F251DC7; Fri, 19 May 2017 00:00:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J00cfr099707; Fri, 19 May 2017 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J00cqM099703; Fri, 19 May 2017 00:00:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705190000.v4J00cqM099703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 00:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318507 - in stable/11: . gnu/usr.bin/groff/tmac lib/clang sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:00:39 -0000 Author: gjb Date: Fri May 19 00:00:38 2017 New Revision: 318507 URL: https://svnweb.freebsd.org/changeset/base/318507 Log: Update stable/11 from 11.0-STABLE to 11.1-PRERELEASE, marking the official start of the code slush. Set the default mdoc(7) version to 11.1, and update the clang(1) TARGET_TRIPLE to reflect 11.1. While here, add missing FreeBSD major versions to mdoc(7). Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/Makefile.inc1 stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in stable/11/lib/clang/llvm.build.mk stable/11/sys/conf/newvers.sh Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Thu May 18 23:52:28 2017 (r318506) +++ stable/11/Makefile.inc1 Fri May 19 00:00:38 2017 (r318507) @@ -596,7 +596,7 @@ XCXXFLAGS+= -isystem ${WORLDTMP}/usr/inc .endif .else TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.1 XCFLAGS+= -target ${TARGET_TRIPLE} .endif XCFLAGS+= --sysroot=${WORLDTMP} Modified: stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in ============================================================================== --- stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Thu May 18 23:52:28 2017 (r318506) +++ stable/11/gnu/usr.bin/groff/tmac/mdoc.local.in Fri May 19 00:00:38 2017 (r318507) @@ -50,7 +50,7 @@ .ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~11.0 +.ds doc-default-operating-system FreeBSD\~11.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-2.2.9 2.2.9 @@ -62,7 +62,10 @@ .ds doc-operating-system-FreeBSD-9.3 9.3 .ds doc-operating-system-FreeBSD-10.0 10.0 .ds doc-operating-system-FreeBSD-10.1 10.1 +.ds doc-operating-system-FreeBSD-10.2 10.2 +.ds doc-operating-system-FreeBSD-10.3 10.3 .ds doc-operating-system-FreeBSD-11.0 11.0 +.ds doc-operating-system-FreeBSD-11.1 11.1 . .\" Definitions for other *BSDs not (yet) in doc-common .ds doc-operating-system-NetBSD-7.0 7.0 Modified: stable/11/lib/clang/llvm.build.mk ============================================================================== --- stable/11/lib/clang/llvm.build.mk Thu May 18 23:52:28 2017 (r318506) +++ stable/11/lib/clang/llvm.build.mk Fri May 19 00:00:38 2017 (r318507) @@ -31,7 +31,7 @@ TARGET_ABI= gnueabi .else TARGET_ABI= unknown .endif -OS_VERSION= freebsd11.0 +OS_VERSION= freebsd11.1 TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-${TARGET_ABI}-${OS_VERSION} BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-unknown-${OS_VERSION} Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu May 18 23:52:28 2017 (r318506) +++ stable/11/sys/conf/newvers.sh Fri May 19 00:00:38 2017 (r318507) @@ -43,8 +43,8 @@ # included if the tree is modified. TYPE="FreeBSD" -REVISION="11.0" -BRANCH="STABLE" +REVISION="11.1" +BRANCH="PRERELEASE" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@freebsd.org Fri May 19 00:33:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CAD4D71011; Fri, 19 May 2017 00:33:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E30814CA; Fri, 19 May 2017 00:33:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J0XmHn015774; Fri, 19 May 2017 00:33:48 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J0Xm6n015773; Fri, 19 May 2017 00:33:48 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201705190033.v4J0Xm6n015773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Fri, 19 May 2017 00:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318509 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:33:49 -0000 Author: vangyzen Date: Fri May 19 00:33:48 2017 New Revision: 318509 URL: https://svnweb.freebsd.org/changeset/base/318509 Log: MFC r318354 (by cem) Correct page frame mask constant used in pmap_change_attr_locked This was introduced in r290156. It's present in 11.0, but not any 10.x release unless someone decided to MFC it. It affects ordinary pages right above the DMAP limit, which is effectively system memory rounded up to a 1 GB (3rd level superpage) boundary (or up to a minimum of 4 GB, on small systems). Sponsored by: Dell EMC Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Fri May 19 00:25:09 2017 (r318508) +++ stable/11/sys/amd64/amd64/pmap.c Fri May 19 00:33:48 2017 (r318509) @@ -6727,7 +6727,7 @@ pmap_change_attr_locked(vm_offset_t va, changed = TRUE; } if (tmpva >= VM_MIN_KERNEL_ADDRESS && - (*pte & PG_PS_FRAME) < dmaplimit) { + (*pte & PG_FRAME) < dmaplimit) { if (pa_start == pa_end) { /* Start physical address run. */ pa_start = *pte & PG_FRAME; From owner-svn-src-stable@freebsd.org Fri May 19 00:43:51 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 821EBD712F1; Fri, 19 May 2017 00:43:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A68D1999; Fri, 19 May 2017 00:43:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J0hoQw019763; Fri, 19 May 2017 00:43:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J0hoCl019762; Fri, 19 May 2017 00:43:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201705190043.v4J0hoCl019762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 19 May 2017 00:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318510 - stable/11/contrib/libstdc++/config/abi/pre X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 00:43:51 -0000 Author: emaste Date: Fri May 19 00:43:49 2017 New Revision: 318510 URL: https://svnweb.freebsd.org/changeset/base/318510 Log: MFC r317159: libstdc++: fix symbol version script for LLD LLD is less tolerant of inconsistencies in the symbol version script. - Add a ; on the last entry in a version block - Remove duplicated symbols, retaining those in the earliest block Modified: stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/libstdc++/config/abi/pre/gnu.ver ============================================================================== --- stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Fri May 19 00:33:48 2017 (r318509) +++ stable/11/contrib/libstdc++/config/abi/pre/gnu.ver Fri May 19 00:43:49 2017 (r318510) @@ -121,7 +121,7 @@ GLIBCXX_3.4 { std::__moneypunct_cache*; std::__numpunct_cache*; std::__timepunct_cache*; - __gnu_debug::_Error_formatter* + __gnu_debug::_Error_formatter*; }; # Names not in an 'extern' block are mangled names. @@ -604,34 +604,6 @@ GLIBCXX_3.4.4 { } GLIBCXX_3.4.3; GLIBCXX_3.4.5 { - - # std::string - _ZNKSs11_M_disjunctEPKc; - _ZNKSs15_M_check_lengthE[jm][jm]PKc; - _ZNSs4_Rep26_M_set_length_and_sharableE*; - _ZNSs7_M_copyEPcPKc[jm]; - _ZNSs7_M_moveEPcPKc[jm]; - _ZNSs9_M_assignEPc[jm]c; - - # std::wstring - _ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw; - _ZNKSbIwSt11char_traitsIwESaIwEE15_M_check_lengthE[jm][jm]PKc; - _ZNSbIwSt11char_traitsIwESaIwEE4_Rep26_M_set_length_and_sharableE*; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_copyEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE7_M_moveEPwPKw[jm]; - _ZNSbIwSt11char_traitsIwESaIwEE9_M_assignEPw[jm]w; - - _ZNKSt13basic_fstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ifstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - _ZNKSt14basic_ofstreamI[cw]St11char_traitsI[cw]EE7is_openEv; - - _ZNSi6ignoreE[ilv]; - _ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreE[ilv]; - - _ZNSt11char_traitsI[cw]E2eqERK[cw]S2_; - - _ZNSt19istreambuf_iteratorI[cw]St11char_traitsI[cw]EEppEv; - } GLIBCXX_3.4.4; GLIBCXX_3.4.6 { @@ -643,8 +615,6 @@ GLIBCXX_3.4.6 { _ZNSt15basic_stringbufI[cw]St11char_traitsI[cw]ESaI[cw]EE9showmanycEv; - _ZNKSt15basic_stringbufIwSt11char_traitsIwESaIwEE3strEv; - _ZN9__gnu_cxx6__poolILb1EE13_M_initializeEv; } GLIBCXX_3.4.5; From owner-svn-src-stable@freebsd.org Fri May 19 02:12:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23DAD749C7; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1DA87AE; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J2CA54057156; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J2CAmR057155; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201705190212.v4J2CAmR057155@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Fri, 19 May 2017 02:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318513 - in stable: 10/usr.sbin/rmt 11/usr.sbin/rmt X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 02:12:11 -0000 Author: rgrimes Date: Fri May 19 02:12:10 2017 New Revision: 318513 URL: https://svnweb.freebsd.org/changeset/base/318513 Log: MFC r314693 Change /etc/rmt symlink from absolute to relative path, correcting the mistake made in r6499 Approved by: grehan (mentor) Modified: stable/11/usr.sbin/rmt/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/rmt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/11/usr.sbin/rmt/Makefile ============================================================================== --- stable/11/usr.sbin/rmt/Makefile Fri May 19 01:42:31 2017 (r318512) +++ stable/11/usr.sbin/rmt/Makefile Fri May 19 02:12:10 2017 (r318513) @@ -7,6 +7,6 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt + ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-stable@freebsd.org Fri May 19 02:12:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2426D749C2; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 711287AD; Fri, 19 May 2017 02:12:11 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J2CAgc057150; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J2CAEn057149; Fri, 19 May 2017 02:12:10 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201705190212.v4J2CAEn057149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Fri, 19 May 2017 02:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318513 - in stable: 10/usr.sbin/rmt 11/usr.sbin/rmt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 02:12:11 -0000 Author: rgrimes Date: Fri May 19 02:12:10 2017 New Revision: 318513 URL: https://svnweb.freebsd.org/changeset/base/318513 Log: MFC r314693 Change /etc/rmt symlink from absolute to relative path, correcting the mistake made in r6499 Approved by: grehan (mentor) Modified: stable/10/usr.sbin/rmt/Makefile Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/rmt/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/10/usr.sbin/rmt/Makefile ============================================================================== --- stable/10/usr.sbin/rmt/Makefile Fri May 19 01:42:31 2017 (r318512) +++ stable/10/usr.sbin/rmt/Makefile Fri May 19 02:12:10 2017 (r318513) @@ -7,6 +7,6 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ln -s ${BINDIR}/rmt ${DESTDIR}/etc/rmt + ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-stable@freebsd.org Fri May 19 07:28:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 459B7D73AC5; Fri, 19 May 2017 07:28:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149D4FF; Fri, 19 May 2017 07:28:38 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J7Sbd4082904; Fri, 19 May 2017 07:28:37 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J7Sb2Z082903; Fri, 19 May 2017 07:28:37 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705190728.v4J7Sb2Z082903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 19 May 2017 07:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318518 - stable/11/sys/netinet/libalias X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 07:28:38 -0000 Author: eugen (ports committer) Date: Fri May 19 07:28:36 2017 New Revision: 318518 URL: https://svnweb.freebsd.org/changeset/base/318518 Log: MFC r318150: Fix translation of transit PPtP/GRE connections for ipfw nat/natd "global" case. PR: 218968 Approved by: ae, vsevolod (mentor) Modified: stable/11/sys/netinet/libalias/alias.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/libalias/alias.c ============================================================================== --- stable/11/sys/netinet/libalias/alias.c Fri May 19 06:37:16 2017 (r318517) +++ stable/11/sys/netinet/libalias/alias.c Fri May 19 07:28:36 2017 (r318518) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-stable@freebsd.org Fri May 19 07:31:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 942E1D73CF9; Fri, 19 May 2017 07:31:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E5168A; Fri, 19 May 2017 07:31:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J7Vmhr084491; Fri, 19 May 2017 07:31:48 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J7VmAa084490; Fri, 19 May 2017 07:31:48 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201705190731.v4J7VmAa084490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Fri, 19 May 2017 07:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318519 - stable/10/sys/netinet/libalias X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 07:31:49 -0000 Author: eugen (ports committer) Date: Fri May 19 07:31:48 2017 New Revision: 318519 URL: https://svnweb.freebsd.org/changeset/base/318519 Log: MFC r318150: Fix translation of transit PPtP/GRE connections for ipfw nat/natd "global" case. PR: 218968 Approved by: ae, vsevolod (mentor) Modified: stable/10/sys/netinet/libalias/alias.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/libalias/alias.c ============================================================================== --- stable/10/sys/netinet/libalias/alias.c Fri May 19 07:28:36 2017 (r318518) +++ stable/10/sys/netinet/libalias/alias.c Fri May 19 07:31:48 2017 (r318519) @@ -699,12 +699,14 @@ ProtoAliasOut(struct libalias *la, struc struct alias_link *lnk; LIBALIAS_LOCK_ASSERT(la); - (void)create; /* Return if proxy-only mode is enabled */ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY) return (PKT_ALIAS_OK); + if (!create) + return (PKT_ALIAS_IGNORED); + lnk = FindProtoOut(la, *ip_src, ip_dst, ip_p); if (lnk != NULL) { struct in_addr alias_address; From owner-svn-src-stable@freebsd.org Fri May 19 09:04:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33171D74037; Fri, 19 May 2017 09:04:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE34E1E2C; Fri, 19 May 2017 09:04:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4J94JCt023471; Fri, 19 May 2017 09:04:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4J94JZ1023470; Fri, 19 May 2017 09:04:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705190904.v4J94JZ1023470@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 May 2017 09:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318528 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 09:04:20 -0000 Author: kib Date: Fri May 19 09:04:18 2017 New Revision: 318528 URL: https://svnweb.freebsd.org/changeset/base/318528 Log: MFC r318243: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. PR: 219228 Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Fri May 19 08:38:03 2017 (r318527) +++ stable/11/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) @@ -2664,7 +2664,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-stable@freebsd.org Fri May 19 10:16:53 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0038FD71184; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5D0A2FE; Fri, 19 May 2017 10:16:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JAGpnP052122; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JAGpEX052121; Fri, 19 May 2017 10:16:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705191016.v4JAGpEX052121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 May 2017 10:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318529 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 10:16:53 -0000 Author: kib Date: Fri May 19 10:16:51 2017 New Revision: 318529 URL: https://svnweb.freebsd.org/changeset/base/318529 Log: MFC r318243: Do not wake up sleeping thread in reschedule_signals() if the signal is blocked. The spurious wakeup might result in spurious EINTR. PR: 219228 Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri May 19 09:04:18 2017 (r318528) +++ stable/10/sys/kern/kern_sig.c Fri May 19 10:16:51 2017 (r318529) @@ -2637,7 +2637,9 @@ reschedule_signals(struct proc *p, sigse signotify(td); if (!(flags & SIGPROCMASK_PS_LOCKED)) mtx_lock(&ps->ps_mtx); - if (p->p_flag & P_TRACED || SIGISMEMBER(ps->ps_sigcatch, sig)) + if (p->p_flag & P_TRACED || + (SIGISMEMBER(ps->ps_sigcatch, sig) && + !SIGISMEMBER(td->td_sigmask, sig))) tdsigwakeup(td, sig, SIG_CATCH, (SIGISMEMBER(ps->ps_sigintr, sig) ? EINTR : ERESTART)); From owner-svn-src-stable@freebsd.org Fri May 19 12:35:25 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29373D726A6; Fri, 19 May 2017 12:35:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9FC38D; Fri, 19 May 2017 12:35:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCZN9s009370; Fri, 19 May 2017 12:35:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCZNxP009364; Fri, 19 May 2017 12:35:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191235.v4JCZNxP009364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318532 - in stable/11/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:35:25 -0000 Author: hselasky Date: Fri May 19 12:35:23 2017 New Revision: 318532 URL: https://svnweb.freebsd.org/changeset/base/318532 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c stable/11/sys/ofed/drivers/net/mlx4/fw.h stable/11/sys/ofed/drivers/net/mlx4/main.c stable/11/sys/ofed/drivers/net/mlx4/qp.c stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/11/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:35:23 2017 (r318532) @@ -210,10 +210,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -266,7 +271,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -313,6 +318,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -402,6 +409,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:35:23 2017 (r318532) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:35:23 2017 (r318532) @@ -823,6 +823,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1088,6 +1093,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/11/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:35:23 2017 (r318532) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:35:23 2017 (r318532) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/11/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:22:48 2017 (r318531) +++ stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:35:23 2017 (r318532) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-stable@freebsd.org Fri May 19 12:39:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA69D727CC; Fri, 19 May 2017 12:39:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91C3D7A3; Fri, 19 May 2017 12:39:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCdaYD009559; Fri, 19 May 2017 12:39:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCdaNq009552; Fri, 19 May 2017 12:39:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191239.v4JCdaNq009552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318533 - in stable/10/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:39:37 -0000 Author: hselasky Date: Fri May 19 12:39:35 2017 New Revision: 318533 URL: https://svnweb.freebsd.org/changeset/base/318533 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:39:35 2017 (r318533) @@ -208,10 +208,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -264,7 +269,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -311,6 +316,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -400,6 +407,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:39:35 2017 (r318533) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:39:35 2017 (r318533) @@ -825,6 +825,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1090,6 +1095,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/10/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:39:35 2017 (r318533) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:39:35 2017 (r318533) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/10/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:35:23 2017 (r318532) +++ stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:39:35 2017 (r318533) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-stable@freebsd.org Fri May 19 12:42:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3708D729C7; Fri, 19 May 2017 12:42:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B40CEB85; Fri, 19 May 2017 12:42:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCgYqL013230; Fri, 19 May 2017 12:42:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCgYWH013224; Fri, 19 May 2017 12:42:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191242.v4JCgYWH013224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318534 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:42:36 -0000 Author: hselasky Date: Fri May 19 12:42:33 2017 New Revision: 318534 URL: https://svnweb.freebsd.org/changeset/base/318534 Log: MFC r313556: Change mlx4 QP allocation scheme. When using Blue-Flame, BF, the QPN overrides the VLAN, CV, and SV fields in the WQE. Thus, BF may only be used for QPNs with bits 6,7 unset. The current ethernet driver code reserves a TX QP range with 256b alignment. This is wrong because if there are more than 64 TX QPs in use, QPNs >= base + 65 will have bits 6/7 set. This problem is not specific for the Ethernet driver, any entity that tries to reserve more than 64 BF-enabled QPs should fail. Also, using ranges is not necessary here and is wasteful. The new mechanism introduced here will support reservation for "Eth QPs eligible for BF" for all drivers: bare-metal, multi-PF, and VFs (when hypervisors support WC in VMs). The flow we use is: 1. In mlx4_en, allocate Tx QPs one by one instead of a range allocation, and request "BF enabled QPs" if BF is supported for the function 2. In the ALLOC_RES FW command, change param1 to: a. param1[23:0] - number of QPs b. param1[31-24] - flags controlling QPs reservation Bit 31 refers to Eth blueflame supported QPs. Those QPs must have bits 6 and 7 unset in order to be used in Ethernet. Bits 24-30 of the flags are currently reserved. When a function tries to allocate a QP, it states the required attributes for this QP. Those attributes are considered "best-effort". If an attribute, such as Ethernet BF enabled QP, is a must-have attribute, the function has to check that attribute is supported before trying to do the allocation. In a lower layer of the code, mlx4_qp_reserve_range masks out the bits which are unsupported. If SRIOV is used, the PF validates those attributes and masks out unsupported attributes as well. In order to notify VFs which attributes are supported, the VF uses QUERY_FUNC_CAP command. This command's mailbox is filled by the PF, which notifies which QP allocation attributes it supports. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8868 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c stable/9/sys/ofed/drivers/net/mlx4/fw.h stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/qp.c stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/9/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:42:33 2017 (r318534) @@ -208,10 +208,15 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_MTT_QUOTA_OFFSET 0x64 #define QUERY_FUNC_CAP_MCG_QUOTA_OFFSET 0x68 +#define QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET 0x6c + #define QUERY_FUNC_CAP_FMR_FLAG 0x80 #define QUERY_FUNC_CAP_FLAG_RDMA 0x40 #define QUERY_FUNC_CAP_FLAG_ETH 0x80 #define QUERY_FUNC_CAP_FLAG_QUOTAS 0x10 +#define QUERY_FUNC_CAP_FLAG_VALID_MAILBOX 0x04 + +#define QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG (1UL << 31) /* when opcode modifier = 1 */ #define QUERY_FUNC_CAP_PHYS_PORT_OFFSET 0x3 @@ -264,7 +269,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m } else if (vhcr->op_modifier == 0) { /* enable rdma and ethernet interfaces, and new quota locations */ field = (QUERY_FUNC_CAP_FLAG_ETH | QUERY_FUNC_CAP_FLAG_RDMA | - QUERY_FUNC_CAP_FLAG_QUOTAS); + QUERY_FUNC_CAP_FLAG_QUOTAS | QUERY_FUNC_CAP_FLAG_VALID_MAILBOX); MLX4_PUT(outbox->buf, field, QUERY_FUNC_CAP_FLAGS_OFFSET); field = dev->caps.num_ports; @@ -311,6 +316,8 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET); MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MCG_QUOTA_OFFSET_DEP); + size = QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); } else err = -EINVAL; @@ -400,6 +407,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev MLX4_GET(size, outbox, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); func_cap->reserved_eq = size & 0xFFFFFF; + func_cap->extra_flags = 0; + + /* Mailbox data from 0x6c and onward should only be treated if + * QUERY_FUNC_CAP_FLAG_VALID_MAILBOX is set in func_cap->flags + */ + if (func_cap->flags & QUERY_FUNC_CAP_FLAG_VALID_MAILBOX) { + MLX4_GET(size, outbox, QUERY_FUNC_CAP_EXTRA_FLAGS_OFFSET); + if (size & QUERY_FUNC_CAP_EXTRA_FLAGS_BF_QP_ALLOC_FLAG) + func_cap->extra_flags |= MLX4_QUERY_FUNC_FLAGS_BF_RES_QP; + } + goto out; } Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:42:33 2017 (r318534) @@ -144,6 +144,7 @@ struct mlx4_func_cap { u8 physical_port; u8 port_flags; u8 def_counter_index; + u8 extra_flags; }; struct mlx4_adapter { Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:42:33 2017 (r318534) @@ -825,6 +825,11 @@ static int mlx4_dev_cap(struct mlx4_dev if (!mlx4_is_slave(dev)) { for (i = 0; i < dev->caps.num_ports; ++i) dev->caps.def_counter_index[i] = i << 1; + + dev->caps.alloc_res_qp_mask = + (dev->caps.bf_reg_size ? MLX4_RESERVE_ETH_BF_QP : 0); + } else { + dev->caps.alloc_res_qp_mask = 0; } return 0; @@ -1090,6 +1095,10 @@ static int mlx4_slave_cap(struct mlx4_de slave_adjust_steering_mode(dev, &dev_cap, &hca_param); + if (func_cap.extra_flags & MLX4_QUERY_FUNC_FLAGS_BF_RES_QP && + dev->caps.bf_reg_size) + dev->caps.alloc_res_qp_mask |= MLX4_RESERVE_ETH_BF_QP; + return 0; err_mem: Modified: stable/9/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/qp.c Fri May 19 12:42:33 2017 (r318534) @@ -242,6 +242,9 @@ int mlx4_qp_reserve_range(struct mlx4_de u64 out_param; int err; + /* Turn off all unsupported QP allocation flags */ + flags &= dev->caps.alloc_res_qp_mask; + if (mlx4_is_mfunc(dev)) { set_param_l(&in_param, (((u32) flags) << 24) | (u32) cnt); set_param_h(&in_param, align); Modified: stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/drivers/net/mlx4/resource_tracker.c Fri May 19 12:42:33 2017 (r318534) @@ -1544,7 +1544,10 @@ static int qp_alloc_res(struct mlx4_dev switch (op) { case RES_OP_RESERVE: count = get_param_l(&in_param) & 0xffffff; - flags = get_param_l(&in_param) >> 24; + /* Turn off all unsupported QP allocation flags that the + * slave tries to set. + */ + flags = (get_param_l(&in_param) >> 24) & dev->caps.alloc_res_qp_mask; align = get_param_h(&in_param); err = mlx4_grant_resource(dev, slave, RES_QP, count, 0); if (err) Modified: stable/9/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:39:35 2017 (r318533) +++ stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:42:33 2017 (r318534) @@ -218,6 +218,23 @@ enum { }; enum { + MLX4_QUERY_FUNC_FLAGS_BF_RES_QP = 1LL << 0 +}; + +/* bit enums for an 8-bit flags field indicating special use + * QPs which require special handling in qp_reserve_range. + * Currently, this only includes QPs used by the ETH interface, + * where we expect to use blueflame. These QPs must not have + * bits 6 and 7 set in their qp number. + * + * This enum may use only bits 0..7. + */ +enum { + MLX4_RESERVE_ETH_BF_QP = 1 << 7, +}; + + +enum { MLX4_DEV_CAP_64B_EQE_ENABLED = 1LL << 0, MLX4_DEV_CAP_64B_CQE_ENABLED = 1LL << 1 }; @@ -531,6 +548,7 @@ struct mlx4_caps { u32 max_basic_counters; u32 max_extended_counters; u8 def_counter_index[MLX4_MAX_PORTS + 1]; + u8 alloc_res_qp_mask; }; struct mlx4_buf_list { From owner-svn-src-stable@freebsd.org Fri May 19 12:51:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15421D72C0F; Fri, 19 May 2017 12:51:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFA84F1B; Fri, 19 May 2017 12:51:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCpDUq015719; Fri, 19 May 2017 12:51:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCpDSF015622; Fri, 19 May 2017 12:51:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191251.v4JCpDSF015622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318535 - in stable/11/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:51:15 -0000 Author: hselasky Date: Fri May 19 12:51:13 2017 New Revision: 318535 URL: https://svnweb.freebsd.org/changeset/base/318535 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c stable/11/sys/ofed/drivers/net/mlx4/fw.c stable/11/sys/ofed/drivers/net/mlx4/fw.h stable/11/sys/ofed/drivers/net/mlx4/main.c stable/11/sys/ofed/drivers/net/mlx4/profile.c stable/11/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:51:13 2017 (r318535) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:51:13 2017 (r318535) @@ -179,6 +179,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -189,6 +243,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -236,6 +291,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -298,11 +354,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -334,14 +403,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -522,6 +594,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -619,6 +692,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -845,8 +920,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -856,8 +934,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1359,6 +1438,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1467,6 +1547,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1573,6 +1654,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/11/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:51:13 2017 (r318535) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/11/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:51:13 2017 (r318535) @@ -590,6 +590,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -623,7 +646,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1474,8 +1500,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1537,8 +1562,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2074,6 +2098,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2914,13 +2950,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/11/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:51:13 2017 (r318535) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/11/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:42:33 2017 (r318534) +++ stable/11/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:51:13 2017 (r318535) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-stable@freebsd.org Fri May 19 12:53:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 399AED72CF5; Fri, 19 May 2017 12:53:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6641195; Fri, 19 May 2017 12:53:51 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCrpSS017361; Fri, 19 May 2017 12:53:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCrooQ017354; Fri, 19 May 2017 12:53:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191253.v4JCrooQ017354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318536 - in stable/10/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:53:52 -0000 Author: hselasky Date: Fri May 19 12:53:50 2017 New Revision: 318536 URL: https://svnweb.freebsd.org/changeset/base/318536 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/fw.h stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/profile.c stable/10/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:53:50 2017 (r318536) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:53:50 2017 (r318536) @@ -177,6 +177,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -187,6 +241,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -234,6 +289,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -296,11 +352,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -332,14 +401,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -520,6 +592,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -617,6 +690,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -843,8 +918,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -854,8 +932,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1357,6 +1436,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1465,6 +1545,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1571,6 +1652,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:53:50 2017 (r318536) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:53:50 2017 (r318536) @@ -592,6 +592,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -625,7 +648,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1476,8 +1502,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1539,8 +1564,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2076,6 +2100,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2916,13 +2952,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/10/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:53:50 2017 (r318536) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/10/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:51:13 2017 (r318535) +++ stable/10/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:53:50 2017 (r318536) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-stable@freebsd.org Fri May 19 12:56:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F4BD72D99; Fri, 19 May 2017 12:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45CBC134E; Fri, 19 May 2017 12:56:20 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JCuJLx017548; Fri, 19 May 2017 12:56:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JCuIjt017542; Fri, 19 May 2017 12:56:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191256.v4JCuIjt017542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 12:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318537 - in stable/9/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 12:56:20 -0000 Author: hselasky Date: Fri May 19 12:56:18 2017 New Revision: 318537 URL: https://svnweb.freebsd.org/changeset/base/318537 Log: MFC r313555: Flexible and asymmetric allocation of EQs and MSI-X vectors for PF/VFs. Previously, the mlx4 driver queried the firmware in order to get the number of supported EQs. Under SRIOV, since this was done before the driver notified the firmware how many VFs it actually needs, the firmware had to take into account a worst case scenario and always allocated four EQs per VF, where one was used for events while the others were used for completions. Now, when the firmware supports the asymmetric allocation scheme, denoted by exposing num_sys_eqs > 0 (--> MLX4_DEV_CAP_FLAG2_SYS_EQS), we use the QUERY_FUNC command to query the firmware before enabling SRIOV. Thus we can get more EQs and MSI-X vectors per function. Moreover, when running in the new firmware/driver mode, the limitation that the number of EQs should be a power of two is lifted. Obtained from: Linux (dual BSD/GPLv2 licensed) Submitted by: Dexuan Cui @ microsoft . com Differential Revision: https://reviews.freebsd.org/D8867 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c stable/9/sys/ofed/drivers/net/mlx4/fw.c stable/9/sys/ofed/drivers/net/mlx4/fw.h stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/profile.c stable/9/sys/ofed/include/linux/mlx4/device.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/eq.c Fri May 19 12:56:18 2017 (r318537) @@ -1136,8 +1136,12 @@ int mlx4_init_eq_table(struct mlx4_dev * goto err_out_free; } - err = mlx4_bitmap_init(&priv->eq_table.bitmap, dev->caps.num_eqs, - dev->caps.num_eqs - 1, dev->caps.reserved_eqs, 0); + err = mlx4_bitmap_init(&priv->eq_table.bitmap, + roundup_pow_of_two(dev->caps.num_eqs), + dev->caps.num_eqs - 1, + dev->caps.reserved_eqs, + roundup_pow_of_two(dev->caps.num_eqs) - + dev->caps.num_eqs); if (err) goto err_out_free; Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.c Fri May 19 12:56:18 2017 (r318537) @@ -177,6 +177,60 @@ int mlx4_MOD_STAT_CFG(struct mlx4_dev *d return err; } +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave) +{ + struct mlx4_cmd_mailbox *mailbox; + u32 *outbox; + u8 in_modifier; + u8 field; + u16 field16; + int err; + +#define QUERY_FUNC_BUS_OFFSET 0x00 +#define QUERY_FUNC_DEVICE_OFFSET 0x01 +#define QUERY_FUNC_FUNCTION_OFFSET 0x01 +#define QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET 0x03 +#define QUERY_FUNC_RSVD_EQS_OFFSET 0x04 +#define QUERY_FUNC_MAX_EQ_OFFSET 0x06 +#define QUERY_FUNC_RSVD_UARS_OFFSET 0x0b + + mailbox = mlx4_alloc_cmd_mailbox(dev); + if (IS_ERR(mailbox)) + return PTR_ERR(mailbox); + outbox = mailbox->buf; + + in_modifier = slave; + + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, 0, + MLX4_CMD_QUERY_FUNC, + MLX4_CMD_TIME_CLASS_A, + MLX4_CMD_NATIVE); + if (err) + goto out; + + MLX4_GET(field, outbox, QUERY_FUNC_BUS_OFFSET); + func->bus = field & 0xf; + MLX4_GET(field, outbox, QUERY_FUNC_DEVICE_OFFSET); + func->device = field & 0xf1; + MLX4_GET(field, outbox, QUERY_FUNC_FUNCTION_OFFSET); + func->function = field & 0x7; + MLX4_GET(field, outbox, QUERY_FUNC_PHYSICAL_FUNCTION_OFFSET); + func->physical_function = field & 0xf; + MLX4_GET(field16, outbox, QUERY_FUNC_RSVD_EQS_OFFSET); + func->rsvd_eqs = field16 & 0xffff; + MLX4_GET(field16, outbox, QUERY_FUNC_MAX_EQ_OFFSET); + func->max_eq = field16 & 0xffff; + MLX4_GET(field, outbox, QUERY_FUNC_RSVD_UARS_OFFSET); + func->rsvd_uars = field & 0x0f; + + mlx4_dbg(dev, "Bus: %d, Device: %d, Function: %d, Physical function: %d, Max EQs: %d, Reserved EQs: %d, Reserved UARs: %d\n", + func->bus, func->device, func->function, func->physical_function, + func->max_eq, func->rsvd_eqs, func->rsvd_uars); +out: + mlx4_free_cmd_mailbox(dev, mailbox); + return err; +} + int mlx4_QUERY_FUNC_CAP_wrapper(struct mlx4_dev *dev, int slave, struct mlx4_vhcr *vhcr, struct mlx4_cmd_mailbox *inbox, @@ -187,6 +241,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m u8 field, port; u32 size; int err = 0; + struct mlx4_func func; #define QUERY_FUNC_CAP_FLAGS_OFFSET 0x0 #define QUERY_FUNC_CAP_NUM_PORTS_OFFSET 0x1 @@ -234,6 +289,7 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m #define QUERY_FUNC_CAP_PROPS_DEF_COUNTER 0x20 #define QUERY_FUNC_CAP_RDMA_PROPS_FORCE_PHY_WQE_GID 0x80 +#define QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS (1 << 31) if (vhcr->op_modifier == 1) { port = vhcr->in_modifier; /* phys-port = logical-port */ @@ -296,11 +352,24 @@ int mlx4_QUERY_FUNC_CAP_wrapper(struct m size = dev->caps.num_cqs; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_CQ_QUOTA_OFFSET_DEP); - size = dev->caps.num_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); - - size = dev->caps.reserved_eqs; - MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) || + mlx4_QUERY_FUNC(dev, &func, slave)) { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + dev->caps.num_eqs : + rounddown_pow_of_two(dev->caps.num_eqs); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = dev->caps.reserved_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } else { + size = vhcr->in_modifier & + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS ? + func.max_eq : + rounddown_pow_of_two(func.max_eq); + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MAX_EQ_OFFSET); + size = func.rsvd_eqs; + MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_RESERVED_EQ_OFFSET); + } size = priv->mfunc.master.res_tracker.res_alloc[RES_MPT].quota[slave]; MLX4_PUT(outbox->buf, size, QUERY_FUNC_CAP_MPT_QUOTA_OFFSET); @@ -332,14 +401,17 @@ int mlx4_QUERY_FUNC_CAP(struct mlx4_dev u8 field, op_modifier; u32 size; int err = 0, quotas = 0; + u32 in_modifier; op_modifier = !!gen_or_port; /* 0 = general, 1 = logical port */ + in_modifier = op_modifier ? gen_or_port : + QUERY_FUNC_CAP_SUPPORTS_NON_POWER_OF_2_NUM_EQS; mailbox = mlx4_alloc_cmd_mailbox(dev); if (IS_ERR(mailbox)) return PTR_ERR(mailbox); - err = mlx4_cmd_box(dev, 0, mailbox->dma, gen_or_port, op_modifier, + err = mlx4_cmd_box(dev, 0, mailbox->dma, in_modifier, op_modifier, MLX4_CMD_QUERY_FUNC_CAP, MLX4_CMD_TIME_CLASS_A, MLX4_CMD_WRAPPED); if (err) @@ -520,6 +592,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * #define QUERY_DEV_CAP_MAX_MRW_SZ_OFFSET 0x21 #define QUERY_DEV_CAP_RSVD_MRW_OFFSET 0x22 #define QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET 0x23 +#define QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET 0x26 #define QUERY_DEV_CAP_MAX_AV_OFFSET 0x27 #define QUERY_DEV_CAP_MAX_REQ_QP_OFFSET 0x29 #define QUERY_DEV_CAP_MAX_RES_QP_OFFSET 0x2b @@ -617,6 +690,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->reserved_mrws = 1 << (field & 0xf); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MTT_SEG_OFFSET); dev_cap->max_mtt_seg = 1 << (field & 0x3f); + MLX4_GET(size, outbox, QUERY_DEV_CAP_NUM_SYS_EQ_OFFSET); + dev_cap->num_sys_eqs = size & 0xfff; MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_REQ_QP_OFFSET); dev_cap->max_requester_per_qp = 1 << (field & 0x3f); MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_RES_QP_OFFSET); @@ -843,8 +918,11 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * * we can't use any EQs whose doorbell falls on that page, * even if the EQ itself isn't reserved. */ - dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, - dev_cap->reserved_eqs); + if (dev_cap->num_sys_eqs == 0) + dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, + dev_cap->reserved_eqs); + else + dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_SYS_EQS; mlx4_dbg(dev, "Max ICM size %lld MB\n", (unsigned long long) dev_cap->max_icm_sz >> 20); @@ -854,8 +932,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev * dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); mlx4_dbg(dev, "Max CQs: %d, reserved CQs: %d, entry size: %d\n", dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); - mlx4_dbg(dev, "Max EQs: %d, reserved EQs: %d, entry size: %d\n", - dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); + mlx4_dbg(dev, "Num sys EQs: %d, max EQs: %d, reserved EQs: %d, entry size: %d\n", + dev_cap->num_sys_eqs, dev_cap->max_eqs, dev_cap->reserved_eqs, + dev_cap->eqc_entry_sz); mlx4_dbg(dev, "reserved MPTs: %d, reserved MTTs: %d\n", dev_cap->reserved_mrws, dev_cap->reserved_mtts); mlx4_dbg(dev, "Max PDs: %d, reserved PDs: %d, reserved UARs: %d\n", @@ -1357,6 +1436,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, #define INIT_HCA_AUXC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x50) #define INIT_HCA_EQC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x60) #define INIT_HCA_LOG_EQ_OFFSET (INIT_HCA_QPC_OFFSET + 0x67) +#define INIT_HCA_NUM_SYS_EQS_OFFSET (INIT_HCA_QPC_OFFSET + 0x6a) #define INIT_HCA_RDMARC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x70) #define INIT_HCA_LOG_RD_OFFSET (INIT_HCA_QPC_OFFSET + 0x77) #define INIT_HCA_MCAST_OFFSET 0x0c0 @@ -1465,6 +1545,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, MLX4_PUT(inbox, param->auxc_base, INIT_HCA_AUXC_BASE_OFFSET); MLX4_PUT(inbox, param->eqc_base, INIT_HCA_EQC_BASE_OFFSET); MLX4_PUT(inbox, param->log_num_eqs, INIT_HCA_LOG_EQ_OFFSET); + MLX4_PUT(inbox, param->num_sys_eqs, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_PUT(inbox, param->rdmarc_base, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_PUT(inbox, param->log_rd_per_qp, INIT_HCA_LOG_RD_OFFSET); @@ -1571,6 +1652,7 @@ int mlx4_QUERY_HCA(struct mlx4_dev *dev, MLX4_GET(param->auxc_base, outbox, INIT_HCA_AUXC_BASE_OFFSET); MLX4_GET(param->eqc_base, outbox, INIT_HCA_EQC_BASE_OFFSET); MLX4_GET(param->log_num_eqs, outbox, INIT_HCA_LOG_EQ_OFFSET); + MLX4_GET(param->num_sys_eqs, outbox, INIT_HCA_NUM_SYS_EQS_OFFSET); MLX4_GET(param->rdmarc_base, outbox, INIT_HCA_RDMARC_BASE_OFFSET); MLX4_GET(param->log_rd_per_qp, outbox, INIT_HCA_LOG_RD_OFFSET); Modified: stable/9/sys/ofed/drivers/net/mlx4/fw.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/fw.h Fri May 19 12:56:18 2017 (r318537) @@ -56,6 +56,7 @@ struct mlx4_dev_cap { int max_mpts; int reserved_eqs; int max_eqs; + int num_sys_eqs; int reserved_mtts; int max_mrw_sz; int reserved_mrws; @@ -147,6 +148,16 @@ struct mlx4_func_cap { u8 extra_flags; }; +struct mlx4_func { + int bus; + int device; + int function; + int physical_function; + int rsvd_eqs; + int max_eq; + int rsvd_uars; +}; + struct mlx4_adapter { u16 vsd_vendor_id; char board_id[MLX4_BOARD_ID_LEN]; @@ -174,6 +185,7 @@ struct mlx4_init_hca_param { u8 log_num_srqs; u8 log_num_cqs; u8 log_num_eqs; + u16 num_sys_eqs; u8 log_rd_per_qp; u8 log_mc_table_sz; u8 log_mpt_sz; @@ -226,6 +238,7 @@ int mlx4_map_cmd(struct mlx4_dev *dev, u int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages); int mlx4_NOP(struct mlx4_dev *dev); int mlx4_MOD_STAT_CFG(struct mlx4_dev *dev, struct mlx4_mod_stat_cfg *cfg); +int mlx4_QUERY_FUNC(struct mlx4_dev *dev, struct mlx4_func *func, int slave); void mlx4_opreq_action(struct work_struct *work); #endif /* MLX4_FW_H */ Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Fri May 19 12:56:18 2017 (r318537) @@ -592,6 +592,29 @@ static void mlx4_set_port_mask(struct ml dev->caps.port_mask[i] = dev->caps.port_type[i]; } +enum { + MLX4_QUERY_FUNC_NUM_SYS_EQS = 1 << 0, +}; + +static int mlx4_query_func(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) +{ + int err = 0; + struct mlx4_func func; + + if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_QUERY_FUNC(dev, &func, 0); + if (err) { + mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting.\n"); + return err; + } + dev_cap->max_eqs = func.max_eq; + dev_cap->reserved_eqs = func.rsvd_eqs; + dev_cap->reserved_uars = func.rsvd_uars; + err |= MLX4_QUERY_FUNC_NUM_SYS_EQS; + } + return err; +} + static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) { int err; @@ -625,7 +648,10 @@ static int mlx4_dev_cap(struct mlx4_dev } dev->caps.num_ports = dev_cap->num_ports; - dev->phys_caps.num_phys_eqs = MLX4_MAX_EQ_NUM; + dev->caps.num_sys_eqs = dev_cap->num_sys_eqs; + dev->phys_caps.num_phys_eqs = dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS ? + dev->caps.num_sys_eqs : + MLX4_MAX_EQ_NUM; for (i = 1; i <= dev->caps.num_ports; ++i) { dev->caps.vl_cap[i] = dev_cap->max_vl[i]; dev->caps.ib_mtu_cap[i] = dev_cap->ib_mtu[i]; @@ -1476,8 +1502,7 @@ static int mlx4_init_cmpt_table(struct m if (err) goto err_srq; - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.cmpt_table, cmpt_base + ((u64) (MLX4_CMPT_TYPE_EQ * @@ -1539,8 +1564,7 @@ static int mlx4_init_icm(struct mlx4_dev } - num_eqs = (mlx4_is_master(dev)) ? dev->phys_caps.num_phys_eqs : - dev->caps.num_eqs; + num_eqs = dev->phys_caps.num_phys_eqs; err = mlx4_init_icm_table(dev, &priv->eq_table.table, init_hca->eqc_base, dev_cap->eqc_entry_sz, num_eqs, num_eqs, 0, 0); @@ -2076,6 +2100,18 @@ static int mlx4_init_hca(struct mlx4_dev goto err_free_icm; } + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + err = mlx4_query_func(dev, dev_cap); + if (err < 0) { + mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); + goto err_stop_fw; + } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { + dev->caps.num_eqs = dev_cap->max_eqs; + dev->caps.reserved_eqs = dev_cap->reserved_eqs; + dev->caps.reserved_uars = dev_cap->reserved_uars; + } + } + /* * Read HCA frequency by QUERY_HCA command */ @@ -2916,13 +2952,12 @@ static void mlx4_enable_msi_x(struct mlx { struct mlx4_priv *priv = mlx4_priv(dev); struct msix_entry *entries; - int nreq = min_t(int, dev->caps.num_ports * - min_t(int, num_possible_cpus() + 1, MAX_MSIX_P_PORT) - + MSIX_LEGACY_SZ, MAX_MSIX); int err; int i; if (msi_x) { + int nreq = dev->caps.num_ports * num_online_cpus() + MSIX_LEGACY_SZ; + nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, nreq); Modified: stable/9/sys/ofed/drivers/net/mlx4/profile.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/drivers/net/mlx4/profile.c Fri May 19 12:56:18 2017 (r318537) @@ -199,10 +199,17 @@ u64 mlx4_make_profile(struct mlx4_dev *d init_hca->log_num_cqs = profile[i].log_num; break; case MLX4_RES_EQ: - dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, - MAX_MSIX)); - init_hca->eqc_base = profile[i].start; - init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) { + init_hca->log_num_eqs = 0x1f; + init_hca->eqc_base = profile[i].start; + init_hca->num_sys_eqs = dev_cap->num_sys_eqs; + } else { + dev->caps.num_eqs = roundup_pow_of_two( + min_t(unsigned, + dev_cap->max_eqs, MAX_MSIX)); + init_hca->eqc_base = profile[i].start; + init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); + } break; case MLX4_RES_DMPT: dev->caps.num_mpts = profile[i].num; Modified: stable/9/sys/ofed/include/linux/mlx4/device.h ============================================================================== --- stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:53:50 2017 (r318536) +++ stable/9/sys/ofed/include/linux/mlx4/device.h Fri May 19 12:56:18 2017 (r318537) @@ -199,6 +199,7 @@ enum { MLX4_DEV_CAP_FLAG2_EQE_STRIDE = 1LL << 23, MLX4_DEV_CAP_FLAG2_UPDATE_QP_SRC_CHECK_LB = 1LL << 24, MLX4_DEV_CAP_FLAG2_RX_CSUM_MODE = 1LL << 25, + MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 26, }; /* bit enums for an 8-bit flags field indicating special use @@ -490,6 +491,7 @@ struct mlx4_caps { int num_cqs; int max_cqes; int reserved_cqs; + int num_sys_eqs; int num_eqs; int reserved_eqs; int num_comp_vectors; From owner-svn-src-stable@freebsd.org Fri May 19 13:02:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63511D730EE; Fri, 19 May 2017 13:02:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E9BB18F4; Fri, 19 May 2017 13:02:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD2KNX021732; Fri, 19 May 2017 13:02:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD2KsZ021730; Fri, 19 May 2017 13:02:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191302.v4JD2KsZ021730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318538 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:02:21 -0000 Author: hselasky Date: Fri May 19 13:02:19 2017 New Revision: 318538 URL: https://svnweb.freebsd.org/changeset/base/318538 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 12:56:18 2017 (r318537) +++ stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:02:19 2017 (r318538) @@ -1639,7 +1639,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1754,7 +1754,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 12:56:18 2017 (r318537) +++ stable/11/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:02:19 2017 (r318538) @@ -587,7 +587,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-stable@freebsd.org Fri May 19 13:04:11 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39283D7319E; Fri, 19 May 2017 13:04:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 166701A95; Fri, 19 May 2017 13:04:11 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD4AGO021907; Fri, 19 May 2017 13:04:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD4AAr021905; Fri, 19 May 2017 13:04:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191304.v4JD4AAr021905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318540 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:04:11 -0000 Author: hselasky Date: Fri May 19 13:04:09 2017 New Revision: 318540 URL: https://svnweb.freebsd.org/changeset/base/318540 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:05 2017 (r318539) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:09 2017 (r318540) @@ -1640,7 +1640,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1755,7 +1755,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2572,9 +2572,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2637,7 +2637,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2648,9 +2647,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:05 2017 (r318539) +++ stable/10/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:09 2017 (r318540) @@ -586,7 +586,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-stable@freebsd.org Fri May 19 13:05:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93232D7326E; Fri, 19 May 2017 13:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8011D4F; Fri, 19 May 2017 13:05:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JD5ehc022023; Fri, 19 May 2017 13:05:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JD5eCX022021; Fri, 19 May 2017 13:05:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201705191305.v4JD5eCX022021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 19 May 2017 13:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r318541 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 13:05:41 -0000 Author: hselasky Date: Fri May 19 13:05:40 2017 New Revision: 318541 URL: https://svnweb.freebsd.org/changeset/base/318541 Log: MFC r317505: Don't free uninitialized sysctl contexts in the mlx4en driver. This can cause NULL pointer panics during failed device attach. Differential Revision: https://reviews.freebsd.org/D8876 Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:04:09 2017 (r318540) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Fri May 19 13:05:40 2017 (r318541) @@ -1640,7 +1640,7 @@ void mlx4_en_free_resources(struct mlx4_ mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); } - if (priv->sysctl) + if (priv->stat_sysctl != NULL) sysctl_ctx_free(&priv->stat_ctx); } @@ -1755,7 +1755,7 @@ void mlx4_en_destroy_netdev(struct net_d mlx4_en_free_resources(priv); /* freeing the sysctl conf cannot be called from within mlx4_en_free_resources */ - if (priv->sysctl) + if (priv->conf_sysctl != NULL) sysctl_ctx_free(&priv->conf_ctx); kfree(priv->tx_ring); @@ -2573,9 +2573,9 @@ static void mlx4_en_sysctl_conf(struct m pnameunit = device_get_nameunit(priv->mdev->pdev->dev.bsddev); sysctl_ctx_init(ctx); - priv->sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), + priv->conf_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_STATIC_CHILDREN(_hw), OID_AUTO, dev->if_xname, CTLFLAG_RD, 0, "mlx4 10gig ethernet"); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "conf", CTLFLAG_RD, NULL, "Configuration"); node_list = SYSCTL_CHILDREN(node); @@ -2638,7 +2638,6 @@ static void mlx4_en_sysctl_conf(struct m static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { struct sysctl_ctx_list *ctx; - struct sysctl_oid *node; struct sysctl_oid_list *node_list; struct sysctl_oid *ring_node; struct sysctl_oid_list *ring_list; @@ -2649,9 +2648,9 @@ static void mlx4_en_sysctl_stat(struct m ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); - node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, + priv->stat_sysctl = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->conf_sysctl), OID_AUTO, "stat", CTLFLAG_RD, NULL, "Statistics"); - node_list = SYSCTL_CHILDREN(node); + node_list = SYSCTL_CHILDREN(priv->stat_sysctl); #ifdef MLX4_EN_PERF_STAT SYSCTL_ADD_UINT(ctx, node_list, OID_AUTO, "tx_poll", CTLFLAG_RD, Modified: stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:04:09 2017 (r318540) +++ stable/9/sys/ofed/drivers/net/mlx4/mlx4_en.h Fri May 19 13:05:40 2017 (r318541) @@ -586,7 +586,8 @@ struct mlx4_en_priv { struct callout watchdog_timer; struct ifmedia media; volatile int blocked; - struct sysctl_oid *sysctl; + struct sysctl_oid *conf_sysctl; + struct sysctl_oid *stat_sysctl; struct sysctl_ctx_list conf_ctx; struct sysctl_ctx_list stat_ctx; #define MLX4_EN_MAC_HASH_IDX 5 From owner-svn-src-stable@freebsd.org Fri May 19 15:57:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDEDFD74F7C; Fri, 19 May 2017 15:57:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDC91E8; Fri, 19 May 2017 15:57:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JFv5dN093669; Fri, 19 May 2017 15:57:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JFv5Tg093668; Fri, 19 May 2017 15:57:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191557.v4JFv5Tg093668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 15:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318542 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 15:57:06 -0000 Author: gjb Date: Fri May 19 15:57:05 2017 New Revision: 318542 URL: https://svnweb.freebsd.org/changeset/base/318542 Log: Correct a typo. Submitted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 13:05:40 2017 (r318541) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 15:57:05 2017 (r318542) @@ -633,7 +633,7 @@ sponsor="&dellemc;">The network stack has been modified to fix incorrect or invalid IP addresses if multiple threads emit a UDP - log_in_vein message concurrently. + log_in_vain message concurrently. The TCP stack has From owner-svn-src-stable@freebsd.org Fri May 19 16:15:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC20BD73700; Fri, 19 May 2017 16:15:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A44AFAD; Fri, 19 May 2017 16:15:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JGF05Z001828; Fri, 19 May 2017 16:15:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JGF0Jc001827; Fri, 19 May 2017 16:15:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191615.v4JGF0Jc001827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 16:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318543 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:15:01 -0000 Author: gjb Date: Fri May 19 16:15:00 2017 New Revision: 318543 URL: https://svnweb.freebsd.org/changeset/base/318543 Log: Document r317373, periodic(8) sleep consolidation. Submitted by: asomers Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 15:57:05 2017 (r318542) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:15:00 2017 (r318543) @@ -333,6 +333,13 @@ <filename class="directory">/etc/periodic</filename> Scripts + The default &man.periodic.conf.5; has + been updated to include the + anticongestion_sleeptime option, + consolidating random sleeps in &man.periodic.8; scripts and + replacing the daily_ntpd_avoid_congestion + option. The default value is 3600 seconds. + The 410.status-mfi &man.periodic.8; script has been added to monitor the status of &man.mfi.4; volumes. From owner-svn-src-stable@freebsd.org Fri May 19 16:22:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE20AD73DBC; Fri, 19 May 2017 16:22:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DABB1ABA; Fri, 19 May 2017 16:22:27 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JGMQUd005670; Fri, 19 May 2017 16:22:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JGMQ2k005669; Fri, 19 May 2017 16:22:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191622.v4JGMQ2k005669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 16:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318544 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 16:22:27 -0000 Author: gjb Date: Fri May 19 16:22:26 2017 New Revision: 318544 URL: https://svnweb.freebsd.org/changeset/base/318544 Log: Remove an HREF from a section title. Suggested by: asomers Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:15:00 2017 (r318543) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 16:22:26 2017 (r318544) @@ -594,7 +594,7 @@ - &man.geom.4; + <literal>geom(4)</literal>   From owner-svn-src-stable@freebsd.org Fri May 19 18:07:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9256DD74ACD; Fri, 19 May 2017 18:07:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6151D17A8; Fri, 19 May 2017 18:07:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JI7Se3047347; Fri, 19 May 2017 18:07:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JI7SLB047346; Fri, 19 May 2017 18:07:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191807.v4JI7SLB047346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 18:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318547 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 18:07:29 -0000 Author: gjb Date: Fri May 19 18:07:28 2017 New Revision: 318547 URL: https://svnweb.freebsd.org/changeset/base/318547 Log: Fix a few grammar and ambiguity nits. Submitted by: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 17:14:29 2017 (r318546) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:07:28 2017 (r318547) @@ -205,7 +205,7 @@ NAT-T configuration. The -g and -t flags have been added, which list only global and virtual policies, - respectively when used with the -D and + respectively, when used with the -D and -P flags. The &man.daemon.8; utility has been updated to allow redirecting &man.stdout.4; and &man.stderr.4; - output to &man.syslog.3; and to a file. + output to &man.syslog.3; or to a file. @@ -307,8 +307,8 @@ sponsor="&ff;">&man.blacklistd.8; support for OpenSSH has been refined to adjust notification points to catch all authentication failures - rather than authentication failures caused by invalid - login usernames. + rather than only those caused by invalid login + usernames. From owner-svn-src-stable@freebsd.org Fri May 19 18:23:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D79ACD74044; Fri, 19 May 2017 18:23:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8F85238; Fri, 19 May 2017 18:23:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JINiNC055327; Fri, 19 May 2017 18:23:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JINiAr055326; Fri, 19 May 2017 18:23:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705191823.v4JINiAr055326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 18:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318549 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 18:23:46 -0000 Author: gjb Date: Fri May 19 18:23:44 2017 New Revision: 318549 URL: https://svnweb.freebsd.org/changeset/base/318549 Log: Use literal tags around 'keep state'/'keep frags' to avoid (mis)placing a comma. In collaboration with: adamw Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:13:41 2017 (r318548) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 18:23:44 2017 (r318549) @@ -385,9 +385,9 @@ &man.close.2; calls. The &man.ipf.4; packet filter has been - updated to prevent "keep state" from incorrectly - implying "keep frags", matching the behavior - documented in &man.ipf.5;. + updated to prevent keep state from + incorrectly implying keep frags, matching + the behavior documented in &man.ipf.5;. From owner-svn-src-stable@freebsd.org Fri May 19 20:11:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39279D74FF1; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5F5A1298; Fri, 19 May 2017 20:11:31 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBUYv000948; Fri, 19 May 2017 20:11:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBUSA000947; Fri, 19 May 2017 20:11:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBUSA000947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318551 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:32 -0000 Author: gjb Date: Fri May 19 20:11:30 2017 New Revision: 318551 URL: https://svnweb.freebsd.org/changeset/base/318551 Log: Further clarify zfsbootcfg(8). Move kvm_close(3) entry to 'Runtime Libraries and API'. Move cloudabi(4) to the 'Kernel Modules' section. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:02:32 2017 (r318550) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:30 2017 (r318551) @@ -197,8 +197,8 @@ default. The &man.zfsbootcfg.8; utility has been - added, providing one-time &man.nextboot.8; options for - &man.zfsboot.8;. + added, providing one-time &man.boot.config.5;-style options + for &man.zfsboot.8;. The &man.setkey.8; utility has been modified to show the runtime @@ -348,6 +348,10 @@ Runtime Libraries and API + The &man.kvm.close.3; function has been + updated to return the accumulated error from previous + &man.close.2; calls. + The clock_nanosleep() system call has been added. The @@ -380,10 +384,6 @@ Kernel Bug Fixes - The &man.kvm.close.3; function has been - updated to return the accumulated error from previous - &man.close.2; calls. - The &man.ipf.4; packet filter has been updated to prevent keep state from incorrectly implying keep frags, matching @@ -407,6 +407,11 @@ Kernel Modules + &man.cloudabi.4; has been updated to + allow running 32-bit binaries within 64-bit userland + environments when the kernel configuration file has the + COMPAT_CLOUDABI32 option present. + The ipsec and tcpmd5 kernel modules have been added. @@ -542,12 +547,6 @@ Hardware Support - The &man.cloudabi.4; driver has been - updated to allow running 32-bit binaries within 64-bit - userland environments when the kernel configuration file has - the COMPAT_CLOUDABI32 option - present. - The &man.atkbdc.4; driver has been updated to provide support for Elantech® trackpads. To enable hardware support, add From owner-svn-src-stable@freebsd.org Fri May 19 20:11:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFB32D74FF7; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C14A1129C; Fri, 19 May 2017 20:11:32 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBVgn000996; Fri, 19 May 2017 20:11:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBV3g000995; Fri, 19 May 2017 20:11:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBV3g000995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318552 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:33 -0000 Author: gjb Date: Fri May 19 20:11:31 2017 New Revision: 318552 URL: https://svnweb.freebsd.org/changeset/base/318552 Log: Document r309258, max_align_t' is now defined for C11 compliance. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:30 2017 (r318551) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:31 2017 (r318552) @@ -362,6 +362,9 @@ ABI Compatibility + The type max_align_t + is now defined for C11 compliance. + The sem_clockwait_np() library function has From owner-svn-src-stable@freebsd.org Fri May 19 20:11:33 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7466D74FFD; Fri, 19 May 2017 20:11:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3E1012A3; Fri, 19 May 2017 20:11:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBWo6001039; Fri, 19 May 2017 20:11:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBWOB001038; Fri, 19 May 2017 20:11:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBWOB001038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318553 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:34 -0000 Author: gjb Date: Fri May 19 20:11:32 2017 New Revision: 318553 URL: https://svnweb.freebsd.org/changeset/base/318553 Log: Document r312394, /dev/kmem no longer supports access via mmap(). Document r306533, devctl(8) now supports a "clear driver" command. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:31 2017 (r318552) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:32 2017 (r318553) @@ -488,6 +488,17 @@ The &man.bytgpio.4; driver has been added, providing support for Intel® Bay Trail™ SoC GPIO controllers. + + /dev/kmem no longer + supports access via mmap(). Consumers + wishing to use /dev/kmem must use + read() and + write(). + + &man.devctl.8; now supports a "clear + driver" command as a complement to "set + driver". From owner-svn-src-stable@freebsd.org Fri May 19 20:11:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BB1ED74040; Fri, 19 May 2017 20:11:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD2E12B7; Fri, 19 May 2017 20:11:35 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBY5R001127; Fri, 19 May 2017 20:11:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBYCU001126; Fri, 19 May 2017 20:11:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBYCU001126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318555 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:35 -0000 Author: gjb Date: Fri May 19 20:11:34 2017 New Revision: 318555 URL: https://svnweb.freebsd.org/changeset/base/318555 Log: Document r306520, PCI pass through with bhyve resets functions via FLR. Document r306471, PCI pass through with bhyve supports more dynamic configurations. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:33 2017 (r318554) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:34 2017 (r318555) @@ -602,7 +602,16 @@ Virtualization Support -   + PCI passthrough with + &man.bhyve.4; supports more dynamic configurations permitting + devices to be marked for passthrough or host use at + runtime. + + PCI passthrough with + &man.bhyve.4; resets functions via FLR when + a virtual machine is started and stopped. From owner-svn-src-stable@freebsd.org Fri May 19 20:11:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD38D7405A; Fri, 19 May 2017 20:11:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 291A012C5; Fri, 19 May 2017 20:11:36 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBZJp001171; Fri, 19 May 2017 20:11:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBZpZ001170; Fri, 19 May 2017 20:11:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBZpZ001170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318556 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:36 -0000 Author: gjb Date: Fri May 19 20:11:35 2017 New Revision: 318556 URL: https://svnweb.freebsd.org/changeset/base/318556 Log: Add a 'Userland Debugging' section. Document r306786, core dumps now include the process ID (PID) and command line arguments. Document r304499, ptrace(2) now supports events for vfork(2). Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:34 2017 (r318555) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:35 2017 (r318556) @@ -375,6 +375,18 @@ nullability attribute has been added to the C library headers. + + + Userland Debugging + + &man.ptrace.2; now supports events for + &man.vfork.2;, permitting reliable debugging across + &man.vfork.2; invocations. + + Process core dumps now include the + process ID (PID and command line + arguments. + From owner-svn-src-stable@freebsd.org Fri May 19 20:11:34 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0893D74039; Fri, 19 May 2017 20:11:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D70712A6; Fri, 19 May 2017 20:11:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKBXDI001084; Fri, 19 May 2017 20:11:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKBXhm001083; Fri, 19 May 2017 20:11:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192011.v4JKBXhm001083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318554 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:11:35 -0000 Author: gjb Date: Fri May 19 20:11:33 2017 New Revision: 318554 URL: https://svnweb.freebsd.org/changeset/base/318554 Log: Document r306660, Virtual Function devices on T4 and T5 adapters. Document r306661, TCP Offload Engine on Chelsio T4+ adapters. Document r306664, cxgbev(4) addition. Document r309560, several cxgbe(4) and cxgbev(4) updates. Submitted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:32 2017 (r318553) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:33 2017 (r318554) @@ -510,11 +510,42 @@ Network Drivers + The &man.cxgbe.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T4 and T5 adapters. + + TCP connections using the TCP Offload + Engine (TOE) on Chelsio T4+ adapters can + now perform zero-copy sends via + aio_write(). + + The &man.cxgbev.4; has been added, + providing support for Virtual Function devices + (VFs) on Chelsio T4 and T5 adapters. + The &man.bnxt.4; driver has been added, providing support for Broadcom® NetXtreme-C™ and NetXtreme-E™ devices. + The &man.cxgbe.4; driver now supports + devices using T6-based adapters which support 10, 25, 40, and + 100 Gbps. + + The &man.cxgbe.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T6 adapters. + + The &man.cxgbev.4; has been updated to + provide support for Virtual Function devices + (VFs) on Chelsio T6 adapters. + The &man.miibus.4; driver has been updated to support Microchip/Micrel KSZ9031 Gigabit ethernet From owner-svn-src-stable@freebsd.org Fri May 19 20:16:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B790D744FA; Fri, 19 May 2017 20:16:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F081D60; Fri, 19 May 2017 20:16:15 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKGE17003780; Fri, 19 May 2017 20:16:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKGEjc003779; Fri, 19 May 2017 20:16:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192016.v4JKGEjc003779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318557 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:16:16 -0000 Author: gjb Date: Fri May 19 20:16:14 2017 New Revision: 318557 URL: https://svnweb.freebsd.org/changeset/base/318557 Log: Document r305476, OpenSSH blacklistd(8) support. Wording fixes. Expand what GARP means. Submitted by: lidl Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:11:35 2017 (r318556) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:16:14 2017 (r318557) @@ -159,8 +159,8 @@ Userland Configuration Changes - The &man.inetd.8; utility can now be - built without libwrap support when + The &man.inetd.8; utility is now built + without libwrap support when WITHOUT_TCP_WRAPPERS is set in &man.src.conf.5;. @@ -179,6 +179,10 @@ Userland Application Changes + Support for &man.blacklistd.8; has been added + to OpenSSH. + The &man.cron.8; utility has been updated to add support for including files within Support for GARP - retransmit has been added. A new &man.sysctl.8;, + (gratuitous ARP) retransmit has been added. + A new &man.sysctl.8;, net.link.ether.inet.garp_rexmit_count, has been added, which sets the maximum number of retransmissions when set to a non-zero value. From owner-svn-src-stable@freebsd.org Fri May 19 20:20:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C3C3D7481D; Fri, 19 May 2017 20:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B415CB; Fri, 19 May 2017 20:20:18 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKKHL1003986; Fri, 19 May 2017 20:20:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKKHW2003985; Fri, 19 May 2017 20:20:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192020.v4JKKHW2003985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318558 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:20:18 -0000 Author: gjb Date: Fri May 19 20:20:17 2017 New Revision: 318558 URL: https://svnweb.freebsd.org/changeset/base/318558 Log: Add a missing ')'. Spotted by: vangyzen Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:16:14 2017 (r318557) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:20:17 2017 (r318558) @@ -388,7 +388,7 @@ &man.vfork.2; invocations. Process core dumps now include the - process ID (PID and command line + process ID (PID) and command line arguments. From owner-svn-src-stable@freebsd.org Fri May 19 20:22:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43D64D74A93; Fri, 19 May 2017 20:22:46 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDB957D7; Fri, 19 May 2017 20:22:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JKMiRZ007818; Fri, 19 May 2017 20:22:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JKMieQ007817; Fri, 19 May 2017 20:22:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705192022.v4JKMieQ007817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 19 May 2017 20:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318559 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 20:22:46 -0000 Author: gjb Date: Fri May 19 20:22:44 2017 New Revision: 318559 URL: https://svnweb.freebsd.org/changeset/base/318559 Log: Add missing 'driver' after manual page references where missing. Spotted by: jhb Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:20:17 2017 (r318558) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri May 19 20:22:44 2017 (r318559) @@ -527,8 +527,8 @@ Network Drivers The &man.cxgbe.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. aio_write(). The &man.cxgbev.4; has been added, + sponsor="&chelsio;">The &man.cxgbev.4; driver has been added, providing support for Virtual Function devices (VFs) on Chelsio T4 and T5 adapters. @@ -553,13 +553,13 @@ 100 Gbps. The &man.cxgbe.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbe.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T6 adapters. The &man.cxgbev.4; has been updated to - provide support for Virtual Function devices + sponsor="&chelsio;">The &man.cxgbev.4; driver has been updated + to provide support for Virtual Function devices (VFs) on Chelsio T6 adapters. Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 951D9D748ED; Fri, 19 May 2017 21:18:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 618AA7F; Fri, 19 May 2017 21:18:43 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JLIgQM029178; Fri, 19 May 2017 21:18:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JLIggH029177; Fri, 19 May 2017 21:18:42 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201705192118.v4JLIggH029177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 19 May 2017 21:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318560 - stable/11/sys/libkern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 21:18:43 -0000 Author: markj Date: Fri May 19 21:18:42 2017 New Revision: 318560 URL: https://svnweb.freebsd.org/changeset/base/318560 Log: Direct commit to fix the PC98 build. Modified: stable/11/sys/libkern/crc32.c Modified: stable/11/sys/libkern/crc32.c ============================================================================== --- stable/11/sys/libkern/crc32.c Fri May 19 20:22:44 2017 (r318559) +++ stable/11/sys/libkern/crc32.c Fri May 19 21:18:42 2017 (r318560) @@ -755,7 +755,7 @@ calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, unsigned int length) { -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) if ((cpu_feature2 & CPUID2_SSE42) != 0) { return (sse42_crc32c(crc32c, buffer, length)); } else From owner-svn-src-stable@freebsd.org Fri May 19 23:01:57 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4842FD7493A; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1823A13F0; Fri, 19 May 2017 23:01:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4JN1uxI073668; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4JN1udK073667; Fri, 19 May 2017 23:01:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201705192301.v4JN1udK073667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 19 May 2017 23:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318563 - stable/11/sys/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 23:01:57 -0000 Author: jhb Date: Fri May 19 23:01:55 2017 New Revision: 318563 URL: https://svnweb.freebsd.org/changeset/base/318563 Log: MFC 318360: Fix p_endcopy. For p_endcopy to work correctly, it must be the name of the next element in struct proc after the end of the copy region, not the name of the last element in the copy region. Currently, the last element (p_elf_flags) is not being copied. In addition, the p_xexit and p_xsig fields should not be copied on fork, so move them out of the copy region. Note that for stable/11 the fix is a bit simpler than in HEAD as it merely consists of formally moving p_xexit and p_xsig out of the copy region by shrinking the end of the copy region. Modified: stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Fri May 19 22:54:45 2017 (r318562) +++ stable/11/sys/sys/proc.h Fri May 19 23:01:55 2017 (r318563) @@ -624,12 +624,11 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - u_int p_xexit; /* (c) Exit code. */ - u_int p_xsig; /* (c) Stop/kill sig. */ - /* End area that is copied on creation. */ -#define p_endcopy p_pgrp +#define p_endcopy p_xexit + u_int p_xexit; /* (c) Exit code. */ + u_int p_xsig; /* (c) Stop/kill sig. */ struct pgrp *p_pgrp; /* (c + e) Pointer to process group. */ struct knlist *p_klist; /* (c) Knotes attached to this proc. */ int p_numthreads; /* (c) Number of threads. */ From owner-svn-src-stable@freebsd.org Sat May 20 00:41:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECC9D7324B; Sat, 20 May 2017 00:41:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165081E4C; Sat, 20 May 2017 00:41:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K0fD7Y011401; Sat, 20 May 2017 00:41:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K0fDEd011400; Sat, 20 May 2017 00:41:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705200041.v4K0fDEd011400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 May 2017 00:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318564 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 00:41:14 -0000 Author: kib Date: Sat May 20 00:41:12 2017 New Revision: 318564 URL: https://svnweb.freebsd.org/changeset/base/318564 Log: MFC r318256: Style. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Fri May 19 23:01:55 2017 (r318563) +++ stable/11/libexec/rtld-elf/rtld.c Sat May 20 00:41:12 2017 (r318564) @@ -339,22 +339,16 @@ _LD(const char *var) func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { - Elf_Auxinfo *aux_info[AT_COUNT]; - int i; - int argc; - char **argv; - char **env; - Elf_Auxinfo *aux; - Elf_Auxinfo *auxp; - const char *argv0; + Elf_Auxinfo *aux, *auxp, *aux_info[AT_COUNT]; Objlist_Entry *entry; - Obj_Entry *obj; - Obj_Entry *preload_tail; - Obj_Entry *last_interposer; + Obj_Entry *last_interposer, *obj, *preload_tail; + const Elf_Phdr *phdr; Objlist initlist; RtldLockState lockstate; - char *library_path_rpath; - int mib[2]; + char **argv, *argv0, **env, *kexecpath, *library_path_rpath; + caddr_t imgentry; + char buf[MAXPATHLEN]; + int argc, fd, i, mib[2], phnum; size_t len; /* @@ -477,7 +471,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ * already loaded. */ if (aux_info[AT_EXECFD] != NULL) { /* Load the main program. */ - int fd = aux_info[AT_EXECFD]->a_un.a_val; + fd = aux_info[AT_EXECFD]->a_un.a_val; dbg("loading main program"); obj_main = map_object(fd, argv0, NULL); close(fd); @@ -485,10 +479,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ rtld_die(); max_stack_flags = obj->stack_flags; } else { /* Main program already loaded. */ - const Elf_Phdr *phdr; - int phnum; - caddr_t entry; - dbg("processing main program's program header"); assert(aux_info[AT_PHDR] != NULL); phdr = (const Elf_Phdr *) aux_info[AT_PHDR]->a_un.a_ptr; @@ -497,15 +487,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ assert(aux_info[AT_PHENT] != NULL); assert(aux_info[AT_PHENT]->a_un.a_val == sizeof(Elf_Phdr)); assert(aux_info[AT_ENTRY] != NULL); - entry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; - if ((obj_main = digest_phdr(phdr, phnum, entry, argv0)) == NULL) + imgentry = (caddr_t) aux_info[AT_ENTRY]->a_un.a_ptr; + if ((obj_main = digest_phdr(phdr, phnum, imgentry, argv0)) == NULL) rtld_die(); } if (aux_info[AT_EXECPATH] != NULL) { - char *kexecpath; - char buf[MAXPATHLEN]; - kexecpath = aux_info[AT_EXECPATH]->a_un.a_ptr; dbg("AT_EXECPATH %p %s", kexecpath, kexecpath); if (kexecpath[0] == '/') From owner-svn-src-stable@freebsd.org Sat May 20 01:04:20 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44751D73B06; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1437D1C50; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14Jcs022999; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14J1G022998; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14J1G022998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318568 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:20 -0000 Author: gjb Date: Sat May 20 01:04:18 2017 New Revision: 318568 URL: https://svnweb.freebsd.org/changeset/base/318568 Log: Document r316613, C standard library has been updated to make use of reallocarray(3). Document r318121, system libraries have been updated to make use of reallocarray(3). Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318567) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318568) @@ -356,11 +356,19 @@ updated to return the accumulated error from previous &man.close.2; calls. + The C standard library has been updated + to make use of &man.reallocarray.3; for bounds + checking. + The clock_nanosleep() system call has been added. The nanosleep() system call is now a wrapper around clock_nanosleep(). + + The system libraries have been updated + to make use of &man.reallocarray.3; for bounds + checking. From owner-svn-src-stable@freebsd.org Sat May 20 01:04:19 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 697C1D73AFD; Sat, 20 May 2017 01:04:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 394E11C4F; Sat, 20 May 2017 01:04:19 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14Iht022954; Sat, 20 May 2017 01:04:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14IoS022953; Sat, 20 May 2017 01:04:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14IoS022953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318567 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:19 -0000 Author: gjb Date: Sat May 20 01:04:18 2017 New Revision: 318567 URL: https://svnweb.freebsd.org/changeset/base/318567 Log: s/nullability attribute/nullability qualifier/ Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 00:43:52 2017 (r318566) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318567) @@ -376,7 +376,7 @@ clock and choose between absolute and relative mode. The clang - nullability attribute has been added to the + nullability qualifier has been added to the C library headers. From owner-svn-src-stable@freebsd.org Sat May 20 01:04:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1266AD73B0D; Sat, 20 May 2017 01:04:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D80911C51; Sat, 20 May 2017 01:04:20 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K14J2p023042; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K14JVO023041; Sat, 20 May 2017 01:04:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201705200104.v4K14JVO023041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 20 May 2017 01:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318569 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 01:04:21 -0000 Author: gjb Date: Sat May 20 01:04:19 2017 New Revision: 318569 URL: https://svnweb.freebsd.org/changeset/base/318569 Log: Document r316613, C standard library has been updated to make use of reallocarray(3). Document r318121, system libraries have been updated to make use of reallocarray(3). Document r315282, GNU __nonnull__ attribute have been replaced with the more benign Clang nullability attributes. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:18 2017 (r318568) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat May 20 01:04:19 2017 (r318569) @@ -386,6 +386,11 @@ The clang nullability qualifier has been added to the C library headers. + + Uses of the GNU + __nonnull__ attribute have been replaced + with the more benign Clang + nullability attributes. From owner-svn-src-stable@freebsd.org Sat May 20 05:12:34 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01A61D75954; Sat, 20 May 2017 05:12:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D10B51961; Sat, 20 May 2017 05:12:33 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4K5CW17026104; Sat, 20 May 2017 05:12:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4K5CWxf026100; Sat, 20 May 2017 05:12:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201705200512.v4K5CWxf026100@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 20 May 2017 05:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318572 - in stable/11/sys: cddl/dev/dtrace/powerpc cddl/dev/fbt/powerpc powerpc/booke powerpc/include X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 05:12:34 -0000 Author: jhibbits Date: Sat May 20 05:12:32 2017 New Revision: 318572 URL: https://svnweb.freebsd.org/changeset/base/318572 Log: MFC r314370,r318130,r318167: DTrace related fixes for PowerPC. r314370: Unbreak kernel breakpoints, broken for ~4 years now r318130: Fix the encoded instruction for FBT traps on powerpc r318167: Fix stack tracing in dtrace for powerpc Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c stable/11/sys/powerpc/booke/trap_subr.S stable/11/sys/powerpc/include/trap.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c Sat May 20 05:12:32 2017 (r318572) @@ -38,6 +38,7 @@ #include #include +#include #include #include @@ -54,16 +55,19 @@ #ifdef __powerpc64__ #define OFFSET 4 /* Account for the TOC reload slot */ +#define FRAME_OFFSET 48 #else #define OFFSET 0 +#define FRAME_OFFSET 8 #endif #define INKERNEL(x) ((x) <= VM_MAX_KERNEL_ADDRESS && \ (x) >= VM_MIN_KERNEL_ADDRESS) static __inline int -dtrace_sp_inkernel(uintptr_t sp, int aframes) +dtrace_sp_inkernel(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -77,14 +81,15 @@ dtrace_sp_inkernel(uintptr_t sp, int afr /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ - if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit) && - aframes != 0) - return (0); + if (callpc + OFFSET == (vm_offset_t) &trapexit || + callpc + OFFSET == (vm_offset_t) &asttrapexit) { + if (sp == 0) + return (0); + frame = (struct trapframe *)(sp + FRAME_OFFSET); + + return ((frame->srr1 & PSL_PR) == 0); + } return (1); } @@ -93,6 +98,7 @@ static __inline uintptr_t dtrace_next_sp(uintptr_t sp) { vm_offset_t callpc; + struct trapframe *frame; #ifdef __powerpc64__ callpc = *(vm_offset_t *)(sp + RETURN_OFFSET64); @@ -103,18 +109,13 @@ dtrace_next_sp(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + sizeof(register_t)); -#else - return (*(uintptr_t *)sp + 8 + sizeof(register_t)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (*(uintptr_t *)(frame->fixreg[1])); + } return (*(uintptr_t*)sp); } @@ -122,6 +123,7 @@ dtrace_next_sp(uintptr_t sp) static __inline uintptr_t dtrace_get_pc(uintptr_t sp) { + struct trapframe *frame; vm_offset_t callpc; #ifdef __powerpc64__ @@ -133,18 +135,13 @@ dtrace_get_pc(uintptr_t sp) /* * trapexit() and asttrapexit() are sentinels * for kernel stack tracing. - * - * Special-case this for 'aframes == 0', because fbt sets aframes to the - * trap callchain depth, so we want to break out of it. */ if ((callpc + OFFSET == (vm_offset_t) &trapexit || - callpc + OFFSET == (vm_offset_t) &asttrapexit)) - /* Access the trap frame */ -#ifdef __powerpc64__ - return (*(uintptr_t *)sp + 48 + offsetof(struct trapframe, lr)); -#else - return (*(uintptr_t *)sp + 8 + offsetof(struct trapframe, lr)); -#endif + callpc + OFFSET == (vm_offset_t) &asttrapexit)) { + /* Access the trap frame */ + frame = (struct trapframe *)(sp + FRAME_OFFSET); + return (frame->srr0); + } return (callpc); } @@ -176,7 +173,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcs if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; callpc = dtrace_get_pc(sp); @@ -537,7 +534,7 @@ dtrace_getstackdepth(int aframes) if (sp <= osp) break; - if (!dtrace_sp_inkernel(sp, aframes)) + if (!dtrace_sp_inkernel(sp)) break; if (aframes == 0) Modified: stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c ============================================================================== --- stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/cddl/dev/fbt/powerpc/fbt_isa.c Sat May 20 05:12:32 2017 (r318572) @@ -37,7 +37,7 @@ #include "fbt.h" -#define FBT_PATCHVAL 0x7c810808 +#define FBT_PATCHVAL 0x7ffff808 #define FBT_MFLR_R0 0x7c0802a6 #define FBT_MTLR_R0 0x7c0803a6 #define FBT_BLR 0x4e800020 Modified: stable/11/sys/powerpc/booke/trap_subr.S ============================================================================== --- stable/11/sys/powerpc/booke/trap_subr.S Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/powerpc/booke/trap_subr.S Sat May 20 05:12:32 2017 (r318572) @@ -803,12 +803,12 @@ INTERRUPT(int_debug) lwz %r4,0(%r5) /* interrupt_vector_base in r4 */ add %r4,%r4,%r5 cmplw cr0, %r3, %r4 - blt 1f + blt trap_common lwz %r4,4(%r5) /* interrupt_vector_top in r4 */ add %r4,%r4,%r5 addi %r4,%r4,4 cmplw cr0, %r3, %r4 - bge 1f + bge trap_common /* Disable single-stepping for the interrupt handlers. */ lwz %r3, FRAME_SRR1+8(%r1); rlwinm %r3, %r3, 0, 23, 21 @@ -820,14 +820,6 @@ INTERRUPT(int_debug) lwz %r4, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR1+8)(%r4); mtspr SPR_SRR1, %r4 b 9f -1: - addi %r3, %r1, 8 - bl CNAME(trap) - /* - * Handle ASTs, needed for proper support of single-stepping. - * We actually need to return to the process with an rfi. - */ - b trapexit 9: FRAME_LEAVE(SPR_CSRR0, SPR_CSRR1) rfci Modified: stable/11/sys/powerpc/include/trap.h ============================================================================== --- stable/11/sys/powerpc/include/trap.h Sat May 20 03:51:31 2017 (r318571) +++ stable/11/sys/powerpc/include/trap.h Sat May 20 05:12:32 2017 (r318572) @@ -125,7 +125,7 @@ #define EXC_PGM_TRAP (1UL << 17) /* DTrace trap opcode. */ -#define EXC_DTRACE 0x7c810808 +#define EXC_DTRACE 0x7ffff808 /* Magic pointer to store TOC base and other info for trap handlers on ppc64 */ #define TRAP_GENTRAP 0x1f0 From owner-svn-src-stable@freebsd.org Sat May 20 16:12:46 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D71BFD75DF2; Sat, 20 May 2017 16:12:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 747F015E7; Sat, 20 May 2017 16:12:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KGCjPA097782; Sat, 20 May 2017 16:12:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KGCjlQ097775; Sat, 20 May 2017 16:12:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201705201612.v4KGCjlQ097775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 20 May 2017 16:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318576 - in stable/11: lib lib/libefi lib/libefivar share/mk sys/amd64/amd64 sys/arm/include sys/arm64/include sys/boot/efi/include sys/boot/efi/libefi sys/conf sys/contrib/edk2 sys/de... X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 16:12:47 -0000 Author: kib Date: Sat May 20 16:12:44 2017 New Revision: 318576 URL: https://svnweb.freebsd.org/changeset/base/318576 Log: MFC efivar(8) (by imp): List of revisions merged: r307070 r307071 r307072 r307074 r307189 r307224 r307339 r307390 r307391 r309776 r314231 r314232 r314615 r314616 r314617 r314618 r314619 r314620 r314621 r314623 r314890 r314925 r314926 r314927 r314928 r315770 r315771 Discussed with: gjb (re), imp Sponsored by: The FreeBSD Foundation Added: stable/11/lib/libefivar/ - copied from r307071, head/lib/libefivar/ stable/11/lib/libefivar/FreeBSD-update - copied unchanged from r314926, head/lib/libefivar/FreeBSD-update stable/11/lib/libefivar/ProcessorBind.h - copied unchanged from r314926, head/lib/libefivar/ProcessorBind.h stable/11/lib/libefivar/efi-osdep.h - copied unchanged from r314926, head/lib/libefivar/efi-osdep.h stable/11/lib/libefivar/efivar-dp-format.c - copied unchanged from r314926, head/lib/libefivar/efivar-dp-format.c stable/11/lib/libefivar/efivar-dp-parse.c - copied, changed from r314926, head/lib/libefivar/efivar-dp-parse.c stable/11/lib/libefivar/efivar-dp.h - copied unchanged from r314926, head/lib/libefivar/efivar-dp.h stable/11/lib/libefivar/uefi-dplib.h - copied, changed from r314926, head/lib/libefivar/uefi-dplib.h stable/11/lib/libefivar/uefi-dputil.c - copied unchanged from r314926, head/lib/libefivar/uefi-dputil.c stable/11/lib/libefivar/uefi-guid.c - copied unchanged from r314926, head/lib/libefivar/uefi-guid.c stable/11/lib/libefivar/uefi-guid.dat - copied unchanged from r314926, head/lib/libefivar/uefi-guid.dat stable/11/sys/boot/efi/include/efichar.h - copied unchanged from r314925, head/sys/boot/efi/include/efichar.h stable/11/sys/boot/efi/libefi/efichar.c - copied unchanged from r314925, head/sys/boot/efi/libefi/efichar.c stable/11/sys/contrib/edk2/ - copied from r314890, head/sys/contrib/edk2/ stable/11/sys/dev/efidev/ - copied from r307070, head/sys/dev/efidev/ stable/11/sys/i386/include/efi.h - copied, changed from r307070, head/sys/i386/include/efi.h stable/11/sys/mips/include/efi.h - copied, changed from r307074, head/sys/mips/include/efi.h stable/11/sys/pc98/include/efi.h - copied, changed from r307074, head/sys/pc98/include/efi.h stable/11/sys/powerpc/include/efi.h - copied, changed from r307074, head/sys/powerpc/include/efi.h stable/11/sys/riscv/include/efi.h - copied, changed from r307074, head/sys/riscv/include/efi.h stable/11/sys/sparc64/include/efi.h - copied, changed from r307074, head/sys/sparc64/include/efi.h stable/11/sys/sys/efiio.h - copied unchanged from r307070, head/sys/sys/efiio.h stable/11/usr.sbin/efidp/ - copied from r314928, head/usr.sbin/efidp/ stable/11/usr.sbin/efivar/ - copied from r307072, head/usr.sbin/efivar/ Deleted: stable/11/lib/libefi/ stable/11/lib/libefivar/libefivar.c stable/11/lib/libefivar/libefivar_int.h Modified: stable/11/lib/Makefile stable/11/lib/libefivar/Makefile stable/11/lib/libefivar/efivar.c stable/11/lib/libefivar/efivar.h stable/11/share/mk/bsd.libnames.mk stable/11/share/mk/src.libnames.mk stable/11/share/mk/src.opts.mk stable/11/sys/amd64/amd64/efirt.c stable/11/sys/arm/include/efi.h stable/11/sys/arm64/include/efi.h stable/11/sys/conf/files stable/11/sys/dev/efidev/efidev.c stable/11/sys/modules/efirt/Makefile stable/11/usr.sbin/Makefile stable/11/usr.sbin/efivar/efivar.8 stable/11/usr.sbin/efivar/efivar.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat May 20 11:40:37 2017 (r318575) +++ stable/11/lib/Makefile Sat May 20 16:12:44 2017 (r318576) @@ -49,6 +49,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libdpv \ libdwarf \ libedit \ + ${_libefivar} \ ${_libelftc} \ libevent \ libexecinfo \ @@ -232,6 +233,10 @@ _libcxxrt= libcxxrt _libcplusplus= libc++ .endif +.if ${MK_EFI} != "no" +_libefivar= libefivar +.endif + .if ${MK_LIBTHR} != "no" _libthr= libthr .endif Copied: stable/11/lib/libefivar/FreeBSD-update (from r314926, head/lib/libefivar/FreeBSD-update) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/FreeBSD-update Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/FreeBSD-update) @@ -0,0 +1,39 @@ +$FreeBSD$ + +For the printing and parsing functionalit, we use the Tianocore routines directly. + +efivar-dp-format.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +efivar-dp-parse.c is a copy of MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c + +These files are first mechnaically processed with + +sed -e "s/L'/'/;"'s/L"/"/g;s/%g/%36s/g;s/%a/%s/g;s/^VOID/static VOID/g;s/ *$//g' + +for several reasons. We're moving from wide rotuines to narrow +routines. The UTC-2 this code is written for is a bad match for +wchar_t which is an int. It's a much better match for plain narrow +characters on FreeBSD. So we pretend that CHAR16 for these files is +really char * (ASCII). + +Next, we have have to convert the Unicode printf that this code +expects to FreeBSD's printf. %g means "Print the GUID" and %a means +"print the ASCII string." so we mechanically convert them. Once we've +done that we can compare efivar-dp-*.c to its source to see what's +changed. Because we go through this indirection, I've done that +outside of svn. To upgrade you have to do these files by hand. You +have to go through and make routines static. + +uefi-*.[ch] are internal routines to support this. They've been copied +from EDK2 as well, but in a more hap-hazard manner. This was a trade +off between ease of implementation / upgrade vs pulling in too much +since less than half of any file was needed. + +efi-osdep.h shims the EDK2 types to FreeBSD's types. It's included by +ProcessorBind.h which EDK2 uses to define the CPU. We keep it separate +from uefi-dplib.h to allow better sharing. + +uefi-dplib.h shims the EDK2 routines that are needed to FreeBSD's +routines. This is relatively easy since we map all the UCS-2 routines +to simple char * routines. + +RESIST THE URGE TO CLEAN UP THESE FILES. Modified: stable/11/lib/libefivar/Makefile ============================================================================== --- head/lib/libefivar/Makefile Tue Oct 11 22:30:41 2016 (r307071) +++ stable/11/lib/libefivar/Makefile Sat May 20 16:12:44 2017 (r318576) @@ -26,13 +26,25 @@ .include +EFIBOOT=${SRCTOP}/sys/boot/efi +EDK2INC=${SRCTOP}/sys/contrib/edk2/Include + +.PATH: ${EFIBOOT}/libefi + PACKAGE=lib${LIB} LIB= efivar -SRCS= efivar.c libefivar.c -INCS= efivar.h +SRCS= efivar.c efichar.c efivar-dp-format.c \ + efivar-dp-parse.c \ + uefi-guid.c uefi-dputil.c +INCS= efivar.h efivar-dp.h SHLIB_MAJOR= 1 MAN= efivar.3 +CFLAGS+= -I${EFIBOOT}/include +CFLAGS+= -I${.CURDIR} -I${EDK2INC} + +CFLAGS.efivar-dp-format.c=-Wno-unused-parameter + MLINKS+=efivar.3 efi_set_variables_supported.3 \ efivar.3 efi_del_variable.3 \ efivar.3 efi_get_variable.3 \ @@ -51,3 +63,5 @@ MLINKS+=efivar.3 efi_set_variables_suppo WARNS?= 9 .include + +CFLAGS+= -Wno-cast-align -Wno-unused-parameter Copied: stable/11/lib/libefivar/ProcessorBind.h (from r314926, head/lib/libefivar/ProcessorBind.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/ProcessorBind.h Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/ProcessorBind.h) @@ -0,0 +1,4 @@ +/* File in public domain */ +/* Brings in the glue for UEFI/EDK2 Tianocore code to run on this OS */ +/* $FreeBSD$ */ +#include "efi-osdep.h" Copied: stable/11/lib/libefivar/efi-osdep.h (from r314926, head/lib/libefivar/efi-osdep.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/efi-osdep.h Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/efi-osdep.h) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2017 Netflix, Inc. + * 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 + * in this position and unchanged. + * 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$ + */ + +#ifndef _EFI_OSDEP_H_ +#define _EFI_OSDEP_H_ + +/* + * Defines to adjust the types that EDK2 uses for FreeBSD so we can + * use the code and headers mostly unchanged. The headers are imported + * all into one directory to avoid case issues with filenames and + * included. The actual code is heavily modified since it has too many + * annoying dependencies that are difficult to satisfy. + */ + +#include +#include +#include +#include + +typedef int8_t INT8; +typedef int16_t INT16; +typedef int32_t INT32; +typedef int64_t INT64; +typedef intptr_t INTN; +typedef uint8_t UINT8; +typedef uint16_t UINT16; +typedef uint32_t UINT32; +typedef uint64_t UINT64; +typedef uintptr_t UINTN; +//typedef uintptr_t EFI_PHYSICAL_ADDRESS; +//typedef uint32_t EFI_IPv4_ADDRESS; +//typedef uint8_t EFI_MAC_ADDRESS[6]; +//typedef uint8_t EFI_IPv6_ADDRESS[16]; +typedef uint8_t CHAR8; +typedef uint16_t CHAR16; +typedef UINT8 BOOLEAN; +typedef void VOID; +//typedef uuid_t GUID; +//typedef uuid_t EFI_GUID; + +/* We can't actually call this stuff, so snip out API syntactic sugar */ +#define INTERFACE_DECL(x) +#define EFIAPI +#define IN +#define OUT +#define CONST const +#define OPTIONAL +//#define TRUE 1 +//#define FALSE 0 + +/* + * EDK2 has fine definitions for these, so let it define them. + */ +#undef NULL +#undef EFI_PAGE_SIZE +#undef EFI_PAGE_MASK + +/* + * Note: the EDK2 code assumed #pragma packed works and PACKED is a + * workaround for some old toolchain issues for EDK2 that aren't + * relevent to FreeBSD. + */ +#define PACKED + +/* + * Since we're not compiling for the UEFI boot time (which use ms abi + * conventions), tell EDK2 to define VA_START correctly. For the boot + * loader, this likely needs to be different. + */ +#define NO_MSABI_VA_FUNCS 1 + +/* + * Finally, we need to define the processor we are in EDK2 terms. + */ +#if defined(__i386__) +#define MDE_CPU_IA32 +#elif defined(__amd64__) +#define MDE_CPU_X64 +#elif defined(__arm__) +#define MDE_CPU_ARM +#elif defined(__aarch64__) +#define MDE_CPU_AARCH64 +#endif +/* FreeBSD doesn't have/use MDE_CPU_EBC or MDE_CPU_IPF (ia64) */ + +#endif /* _EFI_OSDEP_H_ */ Copied: stable/11/lib/libefivar/efivar-dp-format.c (from r314926, head/lib/libefivar/efivar-dp-format.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libefivar/efivar-dp-format.c Sat May 20 16:12:44 2017 (r318576, copy of r314926, head/lib/libefivar/efivar-dp-format.c) @@ -0,0 +1,2427 @@ +/*- + * Copyright (c) 2017 Netflix, Inc. + * 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 + * in this position and unchanged. + * 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. + */ + +/* + * Routines to format EFI_DEVICE_PATHs from the UEFI standard. Much of + * this file is taken from EDK2 and rototilled. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "efi-osdep.h" +#include "efivar-dp.h" + +#include "uefi-dplib.h" + +/* + * This is a lie, but since we have converted everything + * from wide to narrow, it's the right lie now. + */ +#define UnicodeSPrint snprintf + +/* + * Taken from MdePkg/Library/UefiDevicePathLib/DevicePathToText.c + * hash a11928f3310518ab1c6fd34e8d0fdbb72de9602c 2017-Mar-01 + * heavily modified: + * wide strings converted to narrow + * Low level printing code redone for narrow strings + * Routines made static + * %s -> %S in spots (where it is still UCS-2) + * %a (ascii) -> %s + * %g -> %36s hack to print guid (see above for caveat) + * some tidying up of const and deconsting. It's evil, but const + * poisoning the whole file was too much. + */ + +/** @file + DevicePathToText protocol as defined in the UEFI 2.0 specification. + + (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
+Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +// #include "UefiDevicePathLib.h" + +/** + Concatenates a formatted unicode string to allocated pool. The caller must + free the resulting buffer. + + @param Str Tracks the allocated pool, size in use, and + amount of pool allocated. + @param Fmt The format string + @param ... Variable arguments based on the format string. + + @return Allocated buffer with the formatted string printed in it. + The caller must free the allocated buffer. The buffer + allocation is not packed. + +**/ +static char * +EFIAPI +UefiDevicePathLibCatPrint ( + IN OUT POOL_PRINT *Str, + IN const char *Fmt, + ... + ) +{ + UINTN Count; + VA_LIST Args; + + VA_START (Args, Fmt); + Count = vsnprintf(NULL, 0, Fmt, Args); + VA_END(Args); + + if ((Str->Count + (Count + 1)) > Str->Capacity) { + Str->Capacity = (Str->Count + (Count + 1) * 2); + Str->Str = reallocf(Str->Str, Str->Capacity); + ASSERT (Str->Str != NULL); + } + VA_START (Args, Fmt); + vsnprintf(Str->Str + Str->Count, Str->Capacity - Str->Count, Fmt, Args); + Str->Count += Count; + + VA_END (Args); + return Str->Str; +} + +/** + Converts a PCI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextPci ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + PCI_DEVICE_PATH *Pci; + + Pci = DevPath; + UefiDevicePathLibCatPrint (Str, "Pci(0x%x,0x%x)", Pci->Device, Pci->Function); +} + +/** + Converts a PC Card device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextPccard ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + PCCARD_DEVICE_PATH *Pccard; + + Pccard = DevPath; + UefiDevicePathLibCatPrint (Str, "PcCard(0x%x)", Pccard->FunctionNumber); +} + +/** + Converts a Memory Map device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextMemMap ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + MEMMAP_DEVICE_PATH *MemMap; + + MemMap = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "MemoryMapped(0x%x,0x%lx,0x%lx)", + MemMap->MemoryType, + MemMap->StartingAddress, + MemMap->EndingAddress + ); +} + +/** + Converts a Vendor device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextVendor ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + VENDOR_DEVICE_PATH *Vendor; + const char *Type; + UINTN Index; + UINTN DataLength; + UINT32 FlowControlMap; + UINT16 Info; + + Vendor = (VENDOR_DEVICE_PATH *) DevPath; + switch (DevicePathType (&Vendor->Header)) { + case HARDWARE_DEVICE_PATH: + Type = "Hw"; + break; + + case MESSAGING_DEVICE_PATH: + Type = "Msg"; + if (AllowShortcuts) { + if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) { + UefiDevicePathLibCatPrint (Str, "VenPcAnsi()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) { + UefiDevicePathLibCatPrint (Str, "VenVt100()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) { + UefiDevicePathLibCatPrint (Str, "VenVt100Plus()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) { + UefiDevicePathLibCatPrint (Str, "VenUft8()"); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) { + FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap); + switch (FlowControlMap & 0x00000003) { + case 0: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "None"); + break; + + case 1: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "Hardware"); + break; + + case 2: + UefiDevicePathLibCatPrint (Str, "UartFlowCtrl(%s)", "XonXoff"); + break; + + default: + break; + } + + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) { + UefiDevicePathLibCatPrint ( + Str, + "SAS(0x%lx,0x%lx,0x%x,", + ((SAS_DEVICE_PATH *) Vendor)->SasAddress, + ((SAS_DEVICE_PATH *) Vendor)->Lun, + ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort + ); + Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology); + if (((Info & 0x0f) == 0) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint (Str, "NoTopology,0,0,0,"); + } else if (((Info & 0x0f) <= 2) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint ( + Str, + "%s,%s,%s,", + ((Info & BIT4) != 0) ? "SATA" : "SAS", + ((Info & BIT5) != 0) ? "External" : "Internal", + ((Info & BIT6) != 0) ? "Expanded" : "Direct" + ); + if ((Info & 0x0f) == 1) { + UefiDevicePathLibCatPrint (Str, "0,"); + } else { + // + // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256 + // + UefiDevicePathLibCatPrint (Str, "0x%x,", ((Info >> 8) & 0xff) + 1); + } + } else { + UefiDevicePathLibCatPrint (Str, "0x%x,0,0,0,", Info); + } + + UefiDevicePathLibCatPrint (Str, "0x%x)", ((SAS_DEVICE_PATH *) Vendor)->Reserved); + return ; + } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) { + UefiDevicePathLibCatPrint (Str, "DebugPort()"); + return ; + } + } + break; + + case MEDIA_DEVICE_PATH: + Type = "Media"; + break; + + default: + Type = "?"; + break; + } + + DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH); + UefiDevicePathLibCatPrint (Str, "Ven%s(%36s", Type, G(&Vendor->Guid)); + if (DataLength != 0) { + UefiDevicePathLibCatPrint (Str, ","); + for (Index = 0; Index < DataLength; Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]); + } + } + + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a Controller device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextController ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + CONTROLLER_DEVICE_PATH *Controller; + + Controller = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "Ctrl(0x%x)", + Controller->ControllerNumber + ); +} + +/** + Converts a BMC device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextBmc ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + BMC_DEVICE_PATH *Bmc; + + Bmc = DevPath; + UefiDevicePathLibCatPrint ( + Str, + "BMC(0x%x,0x%lx)", + Bmc->InterfaceType, + ReadUnaligned64 ((&Bmc->BaseAddress)) + ); +} + +/** + Converts a ACPI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_HID_DEVICE_PATH *Acpi; + + Acpi = DevPath; + if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { + switch (EISA_ID_TO_NUM (Acpi->HID)) { + case 0x0a03: + UefiDevicePathLibCatPrint (Str, "PciRoot(0x%x)", Acpi->UID); + break; + + case 0x0a08: + UefiDevicePathLibCatPrint (Str, "PcieRoot(0x%x)", Acpi->UID); + break; + + case 0x0604: + UefiDevicePathLibCatPrint (Str, "Floppy(0x%x)", Acpi->UID); + break; + + case 0x0301: + UefiDevicePathLibCatPrint (Str, "Keyboard(0x%x)", Acpi->UID); + break; + + case 0x0501: + UefiDevicePathLibCatPrint (Str, "Serial(0x%x)", Acpi->UID); + break; + + case 0x0401: + UefiDevicePathLibCatPrint (Str, "ParallelPort(0x%x)", Acpi->UID); + break; + + default: + UefiDevicePathLibCatPrint (Str, "Acpi(PNP%04x,0x%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID); + break; + } + } else { + UefiDevicePathLibCatPrint (Str, "Acpi(0x%08x,0x%x)", Acpi->HID, Acpi->UID); + } +} + +/** + Converts a ACPI extended HID device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpiEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_EXTENDED_HID_DEVICE_PATH *AcpiEx; + CHAR8 *HIDStr; + CHAR8 *UIDStr; + CHAR8 *CIDStr; + char HIDText[11]; + char CIDText[11]; + + AcpiEx = DevPath; + HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); + UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1; + CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1; + + // + // Converts EISA identification to string. + // + UnicodeSPrint ( + HIDText, + sizeof (HIDText), + "%c%c%c%04X", + ((AcpiEx->HID >> 10) & 0x1f) + 'A' - 1, + ((AcpiEx->HID >> 5) & 0x1f) + 'A' - 1, + ((AcpiEx->HID >> 0) & 0x1f) + 'A' - 1, + (AcpiEx->HID >> 16) & 0xFFFF + ); + UnicodeSPrint ( + CIDText, + sizeof (CIDText), + "%c%c%c%04X", + ((AcpiEx->CID >> 10) & 0x1f) + 'A' - 1, + ((AcpiEx->CID >> 5) & 0x1f) + 'A' - 1, + ((AcpiEx->CID >> 0) & 0x1f) + 'A' - 1, + (AcpiEx->CID >> 16) & 0xFFFF + ); + + if ((*HIDStr == '\0') && (*CIDStr == '\0') && (AcpiEx->UID == 0)) { + // + // use AcpiExp() + // + UefiDevicePathLibCatPrint ( + Str, + "AcpiExp(%s,%s,%s)", + HIDText, + CIDText, + UIDStr + ); + } else { + if (AllowShortcuts) { + // + // display only + // + if (AcpiEx->HID == 0) { + UefiDevicePathLibCatPrint (Str, "AcpiEx(%s,", HIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "AcpiEx(%s,", HIDText); + } + + if (AcpiEx->UID == 0) { + UefiDevicePathLibCatPrint (Str, "%s,", UIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "0x%x,", AcpiEx->UID); + } + + if (AcpiEx->CID == 0) { + UefiDevicePathLibCatPrint (Str, "%s)", CIDStr); + } else { + UefiDevicePathLibCatPrint (Str, "%s)", CIDText); + } + } else { + UefiDevicePathLibCatPrint ( + Str, + "AcpiEx(%s,%s,0x%x,%s,%s,%s)", + HIDText, + CIDText, + AcpiEx->UID, + HIDStr, + CIDStr, + UIDStr + ); + } + } +} + +/** + Converts a ACPI address device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAcpiAdr ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ACPI_ADR_DEVICE_PATH *AcpiAdr; + UINT32 *Addr; + UINT16 Index; + UINT16 Length; + UINT16 AdditionalAdrCount; + + AcpiAdr = DevPath; + Length = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr); + AdditionalAdrCount = (UINT16) ((Length - 8) / 4); + + UefiDevicePathLibCatPrint (Str, "AcpiAdr(0x%x", AcpiAdr->ADR); + Addr = &AcpiAdr->ADR + 1; + for (Index = 0; Index < AdditionalAdrCount; Index++) { + UefiDevicePathLibCatPrint (Str, ",0x%x", Addr[Index]); + } + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a ATAPI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextAtapi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + ATAPI_DEVICE_PATH *Atapi; + + Atapi = DevPath; + + if (DisplayOnly) { + UefiDevicePathLibCatPrint (Str, "Ata(0x%x)", Atapi->Lun); + } else { + UefiDevicePathLibCatPrint ( + Str, + "Ata(%s,%s,0x%x)", + (Atapi->PrimarySecondary == 1) ? "Secondary" : "Primary", + (Atapi->SlaveMaster == 1) ? "Slave" : "Master", + Atapi->Lun + ); + } +} + +/** + Converts a SCSI device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextScsi ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + SCSI_DEVICE_PATH *Scsi; + + Scsi = DevPath; + UefiDevicePathLibCatPrint (Str, "Scsi(0x%x,0x%x)", Scsi->Pun, Scsi->Lun); +} + +/** + Converts a Fibre device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextFibre ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + FIBRECHANNEL_DEVICE_PATH *Fibre; + + Fibre = DevPath; + UefiDevicePathLibCatPrint (Str, "Fibre(0x%lx,0x%lx)", Fibre->WWN, Fibre->Lun); +} + +/** + Converts a FibreEx device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextFibreEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + FIBRECHANNELEX_DEVICE_PATH *FibreEx; + UINTN Index; + + FibreEx = DevPath; + UefiDevicePathLibCatPrint (Str, "FibreEx(0x"); + for (Index = 0; Index < sizeof (FibreEx->WWN) / sizeof (FibreEx->WWN[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", FibreEx->WWN[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x"); + for (Index = 0; Index < sizeof (FibreEx->Lun) / sizeof (FibreEx->Lun[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", FibreEx->Lun[Index]); + } + UefiDevicePathLibCatPrint (Str, ")"); +} + +/** + Converts a Sas Ex device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +static VOID +DevPathToTextSasEx ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + SASEX_DEVICE_PATH *SasEx; + UINTN Index; + + SasEx = DevPath; + UefiDevicePathLibCatPrint (Str, "SasEx(0x"); + + for (Index = 0; Index < sizeof (SasEx->SasAddress) / sizeof (SasEx->SasAddress[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", SasEx->SasAddress[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x"); + for (Index = 0; Index < sizeof (SasEx->Lun) / sizeof (SasEx->Lun[0]); Index++) { + UefiDevicePathLibCatPrint (Str, "%02x", SasEx->Lun[Index]); + } + UefiDevicePathLibCatPrint (Str, ",0x%x,", SasEx->RelativeTargetPort); + + if (((SasEx->DeviceTopology & 0x0f) == 0) && ((SasEx->DeviceTopology & BIT7) == 0)) { + UefiDevicePathLibCatPrint (Str, "NoTopology,0,0,0"); + } else if (((SasEx->DeviceTopology & 0x0f) <= 2) && ((SasEx->DeviceTopology & BIT7) == 0)) { + UefiDevicePathLibCatPrint ( + Str, + "%s,%s,%s,", + ((SasEx->DeviceTopology & BIT4) != 0) ? "SATA" : "SAS", + ((SasEx->DeviceTopology & BIT5) != 0) ? "External" : "Internal", + ((SasEx->DeviceTopology & BIT6) != 0) ? "Expanded" : "Direct" + ); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Sat May 20 17:09:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39705D756AC; Sat, 20 May 2017 17:09:29 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEFC154F; Sat, 20 May 2017 17:09:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4KH9Su7018927; Sat, 20 May 2017 17:09:28 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4KH9Sud018926; Sat, 20 May 2017 17:09:28 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201705201709.v4KH9Sud018926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 20 May 2017 17:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318579 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 May 2017 17:09:29 -0000 Author: bdrewery Date: Sat May 20 17:09:27 2017 New Revision: 318579 URL: https://svnweb.freebsd.org/changeset/base/318579 Log: MFC r317863: Fix some "don't build" optimizations from r308599 not working due to a typo. Modified: stable/11/share/mk/bsd.init.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Sat May 20 16:58:48 2017 (r318578) +++ stable/11/share/mk/bsd.init.mk Sat May 20 17:09:27 2017 (r318579) @@ -29,7 +29,7 @@ ____: .if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) _SKIP_BUILD= not building at level 0 -.elseif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ +.elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ make(destroy*)