Re: svn commit: r318400 - head/sbin/ipfw

2017-05-17 Thread Andrey V. Elsukov
On 18.05.2017 03:49, Rodney W. Grimes wrote:
> [ Charset UTF-8 unsupported, converting... ]
>> Author: ae
>> Date: Wed May 17 10:56:22 2017
>> New Revision: 318400
>> URL: https://svnweb.freebsd.org/changeset/base/318400
>>
>> Log:
>>   Allow zero port specification in table entries with type flow.
>>   
>>   PR:217620
>>   MFC after: 1 week
>>
>> Modified:
>>   head/sbin/ipfw/tables.c
>>
>> Modified: head/sbin/ipfw/tables.c
>> ==
>> --- head/sbin/ipfw/tables.c  Wed May 17 09:04:09 2017(r318399)
>> +++ head/sbin/ipfw/tables.c  Wed May 17 10:56:22 2017(r318400)
>> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
>>  if ((p = strchr(arg, ',')) != NULL)
>>  *p++ = '\0';
>>  
>> -if ((port = htons(strtol(arg, NULL, 10))) == 0) {
>> +port = htons(strtol(arg, , 10));
>   ^^^
> Can this be converted to a sizeof(foo) somehow?
> Constants like this are typically bad style and lead to bugs.

This means that decimal number is expected in the string.
Not sure what bugs this can lead to.

-- 
WBR, Andrey V. Elsukov



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r310230 - head/sys/cam/scsi

2017-05-17 Thread Alexander Motin
On 17.05.2017 19:00, Bryan Drewery wrote:
> On 12/18/16 7:02 AM, Alexander Motin wrote:
>> Author: mav
>> Date: Sun Dec 18 15:02:50 2016
>> New Revision: 310230
>> URL: https://svnweb.freebsd.org/changeset/base/310230
>>
>> Log:
>>   Don't treat informational exceptions (warnings and impending failures)
>>   a.k.a. SCSI SMART events as errors.  Log them to console and continue.
>>   
>>   MFC after: 2 weeks
>>
>> Modified:
>>   head/sys/cam/scsi/scsi_all.c
>>
>> Modified: head/sys/cam/scsi/scsi_all.c
>> ==
>> --- head/sys/cam/scsi/scsi_all.c Sun Dec 18 14:54:20 2016
>> (r310229)
>> +++ head/sys/cam/scsi/scsi_all.c Sun Dec 18 15:02:50 2016
>> (r310230)
>> @@ -1233,58 +1233,58 @@ static struct asc_table_entry asc_table[
>>  { SST(0x0A, 0x00, SS_FATAL | ENOSPC,
>>  "Error log overflow") },
>>  /* DTLPWROMAEBKVF */
>> -{ SST(0x0B, 0x00, SS_RDEF,
>> +{ SST(0x0B, 0x00, SS_NOP | SSQ_PRINT_SENSE,
> 
> After this change (removing SS_RETRY), will a retry still occur on the
> changed SENSE exceptions via something else?

There will be no retry, since it is no longer considered an error.  It
is successful command completion status.  The command will complete
normally after just logging the status for administrative purposes.

-- 
Alexander Motin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r310230 - head/sys/cam/scsi

2017-05-17 Thread Bryan Drewery
On 12/18/16 7:02 AM, Alexander Motin wrote:
> Author: mav
> Date: Sun Dec 18 15:02:50 2016
> New Revision: 310230
> URL: https://svnweb.freebsd.org/changeset/base/310230
> 
> Log:
>   Don't treat informational exceptions (warnings and impending failures)
>   a.k.a. SCSI SMART events as errors.  Log them to console and continue.
>   
>   MFC after:  2 weeks
> 
> Modified:
>   head/sys/cam/scsi/scsi_all.c
> 
> Modified: head/sys/cam/scsi/scsi_all.c
> ==
> --- head/sys/cam/scsi/scsi_all.c  Sun Dec 18 14:54:20 2016
> (r310229)
> +++ head/sys/cam/scsi/scsi_all.c  Sun Dec 18 15:02:50 2016
> (r310230)
> @@ -1233,58 +1233,58 @@ static struct asc_table_entry asc_table[
>   { SST(0x0A, 0x00, SS_FATAL | ENOSPC,
>   "Error log overflow") },
>   /* DTLPWROMAEBKVF */
> - { SST(0x0B, 0x00, SS_RDEF,
> + { SST(0x0B, 0x00, SS_NOP | SSQ_PRINT_SENSE,

After this change (removing SS_RETRY), will a retry still occur on the
changed SENSE exceptions via something else?

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r318437 - head/usr.bin/getconf

2017-05-17 Thread Ngie Cooper
Author: ngie
Date: Thu May 18 01:46:30 2017
New Revision: 318437
URL: https://svnweb.freebsd.org/changeset/base/318437

Log:
  Revert local changes to find_progenv accidentally committed in r318436
  
  MFC after:2 weeks
  MFC with: r318436
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.bin/getconf/getconf.h

Modified: head/usr.bin/getconf/getconf.h
==
--- head/usr.bin/getconf/getconf.h  Thu May 18 01:43:30 2017
(r318436)
+++ head/usr.bin/getconf/getconf.h  Thu May 18 01:46:30 2017
(r318437)
@@ -36,15 +36,8 @@ typedef long long intmax_t;
 #include 
 #endif
 
-typedef enum {
-   PROG_ENV_VALID_NO_ALT_PATH = -1,
-   PROG_ENV_INVALID = 0,
-   PROG_ENV_VALID_HAS_ALT_PATH = 1,
-   PROG_ENV_UNKNOWN = 2,
-} prog_env_validity;
-
 intfind_confstr(const char *name, int *key);
 intfind_limit(const char *name, intmax_t *value);
 intfind_pathconf(const char *name, int *key);
-prog_env_validity  find_progenv(const char *name, const char **alt_path);
+intfind_progenv(const char *name, const char **alt_path);
 intfind_sysconf(const char *name, int *key);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318436 - in head: etc/mtree usr.bin/getconf usr.bin/getconf/tests

2017-05-17 Thread Ngie Cooper
Author: ngie
Date: Thu May 18 01:43:30 2017
New Revision: 318436
URL: https://svnweb.freebsd.org/changeset/base/318436

Log:
  usr.bin/getconf: add some initial tests
  
  Items tested via this commit are:
  - Some basic POSIX constants.
  - Some valid programming environments with -v.
  - Some invalid programming environments via -v.
  
  NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are
  currently not true on all architectures to avoid hardcoding some
  architectures in the tests. I'm working on improving getconf(1) to be
  more sane about handling ILP32/LP32 vs LP64. Future commits are coming
  soon to address this.
  
  MFC after:2 weeks
  Tested with:  amd64, i386
  Sponsored by: Dell EMC Isilon

Added:
  head/usr.bin/getconf/tests/
  head/usr.bin/getconf/tests/Makefile   (contents, props changed)
  head/usr.bin/getconf/tests/arch_type.c   (contents, props changed)
  head/usr.bin/getconf/tests/getconf_test.sh   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/usr.bin/getconf/Makefile
  head/usr.bin/getconf/getconf.h

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Thu May 18 01:42:55 2017
(r318435)
+++ head/etc/mtree/BSD.tests.dist   Thu May 18 01:43:30 2017
(r318436)
@@ -622,6 +622,8 @@
 ..
 file2c
 ..
+getconf
+..
 grep
 ..
 gzip

Modified: head/usr.bin/getconf/Makefile
==
--- head/usr.bin/getconf/Makefile   Thu May 18 01:42:55 2017
(r318435)
+++ head/usr.bin/getconf/Makefile   Thu May 18 01:43:30 2017
(r318436)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include 
+
 PROG=  getconf
 
 SRCS=  confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c
@@ -35,4 +37,8 @@ conflicting.names:confstr.names limits.
 unique.names:  conflicting.names
LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=   tests
+.endif
+
 .include 

Modified: head/usr.bin/getconf/getconf.h
==
--- head/usr.bin/getconf/getconf.h  Thu May 18 01:42:55 2017
(r318435)
+++ head/usr.bin/getconf/getconf.h  Thu May 18 01:43:30 2017
(r318436)
@@ -36,8 +36,15 @@ typedef long long intmax_t;
 #include 
 #endif
 
+typedef enum {
+   PROG_ENV_VALID_NO_ALT_PATH = -1,
+   PROG_ENV_INVALID = 0,
+   PROG_ENV_VALID_HAS_ALT_PATH = 1,
+   PROG_ENV_UNKNOWN = 2,
+} prog_env_validity;
+
 intfind_confstr(const char *name, int *key);
 intfind_limit(const char *name, intmax_t *value);
 intfind_pathconf(const char *name, int *key);
-intfind_progenv(const char *name, const char **alt_path);
+prog_env_validity  find_progenv(const char *name, const char **alt_path);
 intfind_sysconf(const char *name, int *key);

Added: head/usr.bin/getconf/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/getconf/tests/Makefile Thu May 18 01:43:30 2017
(r318436)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+ATF_TESTS_SH+= getconf_test
+
+PROGS+=arch_type
+
+BINDIR=${TESTSDIR}
+
+WARNS?=6
+
+.include 

Added: head/usr.bin/getconf/tests/arch_type.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/getconf/tests/arch_type.c  Thu May 18 01:43:30 2017
(r318436)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2017 Ngie Cooper 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 

svn commit: r318434 - head/usr.bin/getconf

2017-05-17 Thread Ngie Cooper
Author: ngie
Date: Thu May 18 01:35:07 2017
New Revision: 318434
URL: https://svnweb.freebsd.org/changeset/base/318434

Log:
  Make the `.gperf.c` suffix rule depend on fake-gperf.awk
  
  Parameterize out fake-gperf.awk to avoid duplicating the path
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/usr.bin/getconf/Makefile

Modified: head/usr.bin/getconf/Makefile
==
--- head/usr.bin/getconf/Makefile   Thu May 18 01:32:50 2017
(r318433)
+++ head/usr.bin/getconf/Makefile   Thu May 18 01:35:07 2017
(r318434)
@@ -13,8 +13,9 @@ CLEANFILES+=  confstr.c limits.c pathconf
 
 all:   conflicts
 
-.gperf.c:
-   LC_ALL=C awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET}
+FAKE_GPERF=${.CURDIR}/fake-gperf.awk
+.gperf.c: ${FAKE_GPERF}
+   LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET}
 
 .gperf.names:
LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r318400 - head/sbin/ipfw

2017-05-17 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> Author: ae
> Date: Wed May 17 10:56:22 2017
> New Revision: 318400
> URL: https://svnweb.freebsd.org/changeset/base/318400
> 
> Log:
>   Allow zero port specification in table entries with type flow.
>   
>   PR: 217620
>   MFC after:  1 week
> 
> Modified:
>   head/sbin/ipfw/tables.c
> 
> Modified: head/sbin/ipfw/tables.c
> ==
> --- head/sbin/ipfw/tables.c   Wed May 17 09:04:09 2017(r318399)
> +++ head/sbin/ipfw/tables.c   Wed May 17 10:56:22 2017(r318400)
> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
>   if ((p = strchr(arg, ',')) != NULL)
>   *p++ = '\0';
>  
> - if ((port = htons(strtol(arg, NULL, 10))) == 0) {
> + port = htons(strtol(arg, , 10));
  ^^^
Can this be converted to a sizeof(foo) somehow?
Constants like this are typically bad style and lead to bugs.

> + if (*pp != '\0') {
>   if ((sent = getservbyname(arg, NULL)) == NULL)
>   errx(EX_DATAERR, "Unknown service: %s",
>   arg);
> - else
> - key = sent->s_port;
> + port = sent->s_port;
>   }
> - 
>   tfe->sport = port;
> -
>   arg = p;
>   }
>  
> @@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
>   if ((p = strchr(arg, ',')) != NULL)
>   *p++ = '\0';
>  
> - if ((port = htons(strtol(arg, NULL, 10))) == 0) {
> + port = htons(strtol(arg, , 10));
> + if (*pp != '\0') {
>   if ((sent = getservbyname(arg, NULL)) == NULL)
>   errx(EX_DATAERR, "Unknown service: %s",
>   arg);
> - else
> - key = sent->s_port;
> + port = sent->s_port;
>   }
> - 
>   tfe->dport = port;
> -
>   arg = p;
>   }
>  
> 
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318432 - head/libexec/rtld-elf

2017-05-17 Thread Jonathan Anderson
Author: jonathan
Date: Thu May 18 00:32:05 2017
New Revision: 318432
URL: https://svnweb.freebsd.org/changeset/base/318432

Log:
  Fix some nroff syntax in rtld.1.
  
  When I originally documented the LD_LIBRARY_PATH_FDS environment variable,
  I used `.Ev` rather than `.It Ev` to introduce it; this led to the
  documentation being embedded in the previous paragraph (LD_LIBRARY_PATH).

Modified:
  head/libexec/rtld-elf/rtld.1

Modified: head/libexec/rtld-elf/rtld.1
==
--- head/libexec/rtld-elf/rtld.1Wed May 17 22:51:28 2017
(r318431)
+++ head/libexec/rtld-elf/rtld.1Thu May 18 00:32:05 2017
(r318432)
@@ -192,7 +192,7 @@ the directories specified by
 will be searched first
 followed by the set of built-in standard directories.
 This variable is unset for set-user-ID and set-group-ID programs.
-.Ev LD_LIBRARY_PATH_FDS
+.It Ev LD_LIBRARY_PATH_FDS
 A colon separated list of file descriptor numbers for library directories.
 This is intended for use within
 .Xr capsicum 4
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318431 - head/libexec/rtld-elf

2017-05-17 Thread Jonathan Anderson
Author: jonathan
Date: Wed May 17 22:51:28 2017
New Revision: 318431
URL: https://svnweb.freebsd.org/changeset/base/318431

Log:
  Allow rtld direct-exec to take a file descriptor.
  
  When executing rtld directly, allow a file descriptor to be explicitly
  specified rather than opened from the given path. This, together with the
  LD_LIBRARY_PATH_FDS environment variable, allows dynamically-linked
  applications to be executed from within capability mode.
  
  Also add some rudimentary argument parsing (without pulling in getopt or
  the like) to accept this file descriptor, a help (-h) option and a basic
  usage string.
  
  Reviewed by:  kib
  Sponsored by: NSERC, RDC
  Differential Revision:https://reviews.freebsd.org/D10751

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cWed May 17 22:29:25 2017
(r318430)
+++ head/libexec/rtld-elf/rtld.cWed May 17 22:51:28 2017
(r318431)
@@ -115,8 +115,10 @@ static void objlist_push_head(Objlist *,
 static void objlist_push_tail(Objlist *, Obj_Entry *);
 static void objlist_put_after(Objlist *, Obj_Entry *, Obj_Entry *);
 static void objlist_remove(Objlist *, Obj_Entry *);
+static int parse_args(char* argv[], int argc, bool *use_pathp, int *fdp);
 static int parse_integer(const char *);
 static void *path_enumerate(const char *, path_enum_proc, void *);
+static void print_usage(const char *argv0);
 static void release_object(Obj_Entry *);
 static int relocate_object_dag(Obj_Entry *root, bool bind_now,
 Obj_Entry *rtldobj, int flags, RtldLockState *lockstate);
@@ -350,9 +352,9 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 char **argv, *argv0, **env, **envp, *kexecpath, *library_path_rpath;
 caddr_t imgentry;
 char buf[MAXPATHLEN];
-int argc, fd, i, mib[2], phnum;
+int argc, fd, i, mib[2], phnum, rtld_argc;
 size_t len;
-bool dir_enable;
+bool dir_enable, explicit_fd, search_in_path;
 
 /*
  * On entry, the dynamic linker itself has not been relocated yet.
@@ -428,15 +430,19 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
}
dbg("opening main program in direct exec mode");
if (argc >= 2) {
-   argv0 = argv[1];
-   fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY);
+   rtld_argc = parse_args(argv, argc, _in_path, );
+   argv0 = argv[rtld_argc];
+   explicit_fd = (fd != -1);
+   if (!explicit_fd)
+   fd = open(argv0, O_RDONLY | O_CLOEXEC | O_VERIFY);
if (fd == -1) {
rtld_printf("Opening %s: %s\n", argv0,
  rtld_strerror(errno));
rtld_die();
}
if (fstat(fd, ) == -1) {
-   rtld_printf("Stat %s: %s\n", argv0,
+   _rtld_error("failed to fstat FD %d (%s): %s", fd,
+ explicit_fd ? "user-provided descriptor" : argv0,
  rtld_strerror(errno));
rtld_die();
}
@@ -469,26 +475,23 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
/*
 * For direct exec mode, argv[0] is the interpreter
-* name, we must remove it and shift arguments left by
-* 1 before invoking binary main.  Since stack layout
+* name, we must remove it and shift arguments left
+* before invoking binary main.  Since stack layout
 * places environment pointers and aux vectors right
 * after the terminating NULL, we must shift
 * environment and aux as well.
-* XXX Shift will be > 1 when options are implemented.
 */
+   main_argc = argc - rtld_argc;
+   for (i = 0; i <= main_argc; i++)
+   argv[i] = argv[i + rtld_argc];
+   *argcp -= rtld_argc;
+   environ = env = envp = argv + main_argc + 1;
do {
-   *argv = *(argv + 1);
-   argv++;
-   } while (*argv != NULL);
-   *argcp -= 1;
-   main_argc = argc - 1;
-   environ = env = envp = argv;
-   do {
-   *envp = *(envp + 1);
+   *envp = *(envp + rtld_argc);
envp++;
} while (*envp != NULL);
aux = auxp = (Elf_Auxinfo *)envp;
-   auxpf = (Elf_Auxinfo *)(envp + 1);
+   auxpf = (Elf_Auxinfo *)(envp + rtld_argc);
for (;; auxp++, auxpf++) {
*auxp = *auxpf;
if (auxp->a_type == AT_NULL)
@@ -5274,6 +5277,81 @@ symlook_init_from_req(SymLook *dst, cons
 
 
 /*
+ * Parse a set of command-line arguments.
+ */
+static int
+parse_args(char* 

svn commit: r318429 - in head: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/crypto sys/modules/cxgbe sys/modules/cxgbe/ccr sys/powerpc/conf

2017-05-17 Thread John Baldwin
Author: jhb
Date: Wed May 17 22:13:07 2017
New Revision: 318429
URL: https://svnweb.freebsd.org/changeset/base/318429

Log:
  Add a driver for the Chelsio T6 crypto accelerator engine.
  
  The ccr(4) driver supports use of the crypto accelerator engine on
  Chelsio T6 NICs in "lookaside" mode via the opencrypto framework.
  
  Currently, the driver supports AES-CBC, AES-CTR, AES-GCM, and AES-XTS
  cipher algorithms as well as the SHA1-HMAC, SHA2-256-HMAC, SHA2-384-HMAC,
  and SHA2-512-HMAC authentication algorithms.  The driver also supports
  chaining one of AES-CBC, AES-CTR, or AES-XTS with an authentication
  algorithm for encrypt-then-authenticate operations.
  
  Note that this driver is still under active development and testing and
  may not yet be ready for production use.  It does pass the tests in
  tests/sys/opencrypto with the exception that the AES-GCM implementation
  in the driver does not yet support requests with a zero byte payload.
  
  To use this driver currently, the "uwire" configuration must be used
  along with explicitly enabling support for lookaside crypto capabilities
  in the cxgbe(4) driver.  These can be done by setting the following
  tunables before loading the cxgbe(4) driver:
  
  hw.cxgbe.config_file=uwire
  hw.cxgbe.cryptocaps_allowed=-1
  
  MFC after:1 month
  Relnotes: yes
  Sponsored by: Chelsio Communications
  Differential Revision:https://reviews.freebsd.org/D10763

Added:
  head/share/man/man4/ccr.4   (contents, props changed)
  head/sys/dev/cxgbe/crypto/
  head/sys/dev/cxgbe/crypto/t4_crypto.c   (contents, props changed)
  head/sys/dev/cxgbe/crypto/t4_crypto.h   (contents, props changed)
  head/sys/modules/cxgbe/ccr/
  head/sys/modules/cxgbe/ccr/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/cxgbe.4
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/dev/cxgbe/adapter.h
  head/sys/modules/cxgbe/Makefile
  head/sys/powerpc/conf/NOTES

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileWed May 17 22:05:07 2017
(r318428)
+++ head/share/man/man4/MakefileWed May 17 22:13:07 2017
(r318429)
@@ -100,6 +100,7 @@ MAN=aac.4 \
cc_newreno.4 \
cc_vegas.4 \
${_ccd.4} \
+   ccr.4 \
cd.4 \
cdce.4 \
cfi.4 \

Added: head/share/man/man4/ccr.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/ccr.4   Wed May 17 22:13:07 2017(r318429)
@@ -0,0 +1,110 @@
+.\" Copyright (c) 2017, Chelsio 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.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd May 16, 2017
+.Dt CCR 4
+.Os
+.Sh NAME
+.Nm ccr
+.Nd "Chelsio T6 crypto accelerator driver"
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your
+kernel configuration file:
+.Bd -ragged -offset indeunt
+.Cd "device ccr"
+.Ed
+.Pp
+To load the driver as a
+module at boot time, place the following line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+ccr_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the crypto accelerator engine included on
+PCI Express Ethernet adapters based on the Chelsio Terminator 6 ASIC (T6).
+The driver accelerates AES-CBC, AES-CTR, AES-GCM, AES-XTS, SHA1-HMAC,
+SHA2-256-HMAC, SHA2-384-HMAC, and SHA2-512-HMAC operations for
+.Xr crypto 4
+and
+.Xr ipsec 4 .
+The driver also supports chaining one of AES-CBC, AES-CTR, or AES-XTS with
+SHA1-HMAC, 

svn commit: r318428 - head/sys/boot/fdt/dts/arm

2017-05-17 Thread Luiz Otavio O Souza
Author: loos
Date: Wed May 17 22:05:07 2017
New Revision: 318428
URL: https://svnweb.freebsd.org/changeset/base/318428

Log:
  Fix the offset for the CPU0 MPIC registers.
  
  Please note that only a subset of CPU0 registers are exported.  CPU1
  registers are not touched.
  
  Obtained from:ARMADA38X Functional Specifications
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/boot/fdt/dts/arm/armada-38x.dtsi

Modified: head/sys/boot/fdt/dts/arm/armada-38x.dtsi
==
--- head/sys/boot/fdt/dts/arm/armada-38x.dtsi   Wed May 17 21:33:37 2017
(r318427)
+++ head/sys/boot/fdt/dts/arm/armada-38x.dtsi   Wed May 17 22:05:07 2017
(r318428)
@@ -419,7 +419,7 @@
 
mpic: interrupt-controller@20a00 {
compatible = "marvell,mpic";
-   reg = <0x20a00 0x2d0>, <0x21070 0x58>;
+   reg = <0x20a00 0x2d0>, <0x21870 0x58>;
#interrupt-cells = <1>;
#size-cells = <1>;
interrupt-controller;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318427 - in head: share/man/man4 sys/dev/mpr sys/dev/mpr/mpi

2017-05-17 Thread Stephen McConnell
Author: slm
Date: Wed May 17 21:33:37 2017
New Revision: 318427
URL: https://svnweb.freebsd.org/changeset/base/318427

Log:
  Add tri-mode support (SAS/SATA/PCIe).
  
  This includes NVMe device support and adds support for the following adapters:
  SAS 3408
  SAS 3416
  SAS 3508
  SAS 3516
  SAS 3616
  SAS 3708
  SAS 3716
  
  Reviewed by:ken, scottl, asomers, mav
  Approved by:  ken, scottl, mav
  MFC after:  2 weeks
  Relnotes: yes
  Differential Revision: https://reviews.freebsd.org/D10095

Added:
  head/sys/dev/mpr/mpi/mpi2_pci.h   (contents, props changed)
Modified:
  head/share/man/man4/mpr.4
  head/sys/dev/mpr/mpi/mpi2.h
  head/sys/dev/mpr/mpi/mpi2_cnfg.h
  head/sys/dev/mpr/mpi/mpi2_hbd.h
  head/sys/dev/mpr/mpi/mpi2_history.txt
  head/sys/dev/mpr/mpi/mpi2_init.h
  head/sys/dev/mpr/mpi/mpi2_ioc.h
  head/sys/dev/mpr/mpi/mpi2_tool.h
  head/sys/dev/mpr/mpr.c
  head/sys/dev/mpr/mpr_config.c
  head/sys/dev/mpr/mpr_mapping.c
  head/sys/dev/mpr/mpr_mapping.h
  head/sys/dev/mpr/mpr_pci.c
  head/sys/dev/mpr/mpr_sas.c
  head/sys/dev/mpr/mpr_sas.h
  head/sys/dev/mpr/mpr_sas_lsi.c
  head/sys/dev/mpr/mpr_table.c
  head/sys/dev/mpr/mpr_table.h
  head/sys/dev/mpr/mpr_user.c
  head/sys/dev/mpr/mprvar.h

Modified: head/share/man/man4/mpr.4
==
--- head/share/man/man4/mpr.4   Wed May 17 21:14:27 2017(r318426)
+++ head/share/man/man4/mpr.4   Wed May 17 21:33:37 2017(r318427)
@@ -1,8 +1,8 @@
 .\"
 .\" Copyright (c) 2010 Spectra Logic Corporation
 .\" Copyright (c) 2014 LSI Corp
-.\" Copyright (c) 2016 Avago Technologies
-.\" Copyright (c) 2016 Broadcom Ltd.
+.\" Copyright (c) 2017 Avago Technologies
+.\" Copyright (c) 2017 Broadcom Ltd.
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -38,12 +38,12 @@
 .\" $Id$
 .\" $FreeBSD$
 .\"
-.Dd July 6, 2016
+.Dd May 17, 2017
 .Dt MPR 4
 .Os
 .Sh NAME
 .Nm mpr
-.Nd "LSI Fusion-MPT 3 IT/IR 12Gb/s Serial Attached SCSI/SATA driver"
+.Nd "LSI Fusion-MPT 3/3.5 IT/IR 12Gb/s Serial Attached SCSI/SATA/PCIe driver"
 .Sh SYNOPSIS
 To compile this driver into the kernel, place these lines in the kernel
 configuration file:
@@ -62,8 +62,8 @@ mpr_load="YES"
 The
 .Nm
 driver provides support for Broadcom Ltd./Avago Tech (LSI)
-Fusion-MPT 3 IT/IR
-.Tn SAS
+Fusion-MPT 3/3.5 IT/IR
+.Tn SAS/PCIe
 controllers.
 .Sh HARDWARE
 These controllers are supported by the
@@ -81,6 +81,24 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3108 
 Broadcom Ltd./Avago Tech (LSI) SAS 3216 (16 Port SAS)
 .It
 Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3316 (16 Port SAS)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3324 (24 Port SAS)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3408 (8 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3416 (16 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3508 (8 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3516 (16 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3616 (16 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3708 (8 Port SAS/PCIe)
+.It
+Broadcom Ltd./Avago Tech (LSI) SAS 3716 (16 Port SAS/PCIe)
 .El
 .Sh CONFIGURATION
 In all tunable descriptions below, X represents the adapter number.
@@ -156,6 +174,24 @@ dev.mpr.X.io_cmds_active
 .Xr sysctl 8
 variable.
 .Pp
+The current number of free PRP pages is stored in the
+dev.mpr.X.prp_pages_free
+.Xr sysctl 8
+variable.
+PRP pages are used by NVMe devices for I/O transfers, much like Scatter/Gather
+lists.
+.Pp
+The lowest number of free PRP pages seen since boot is stored in the
+dev.mpr.X.prp_pages_free_lowwater
+.Xr sysctl 8
+variable.
+.Pp
+The number of times that PRP page allocations have failed since boot is
+stored in the
+dev.mpr.X.prp_page_alloc_fail
+.Xr sysctl 8
+variable.
+.Pp
 To set the maximum number of pages that will be used per I/O for all adapters,
 set this tunable in
 .Xr loader.conf 5 :
@@ -229,13 +265,13 @@ Send SSU to HDDs, but not to SSDs.
 Send SSU to both HDDs and SSDs.
 .El
 .Pp
-To control the feature for a specific adapter, set this tunable value in
+To control this feature for a specific adapter, set this tunable value in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 dev.mpr.X.enable_ssu
 .Ed
 .Pp
-The same set of values are valid when setting this tunable for all adapters.
+The same set of values are valid as when setting this tunable for all adapters.
 .Pp
 SATA disks that take several seconds to spin up and fail the SATA Identify
 command might not be discovered by the driver.
@@ -261,6 +297,45 @@ dev.mpr.X.spinup_wait_time=
 tunable.
  is the number of seconds to wait for SATA devices to spin up when they 
fail
 the initial SATA Identify command.
+.Pp
+The driver can map devices discovered by the adapter so that target IDs
+corresponding to a specific device persist across resets and reboots.
+In some cases it is 

svn commit: r318426 - head/sys/arm/mv

2017-05-17 Thread Luiz Otavio O Souza
Author: loos
Date: Wed May 17 21:14:27 2017
New Revision: 318426
URL: https://svnweb.freebsd.org/changeset/base/318426

Log:
  Use the MACROS to access the Global mpic registers.  Makes the code
  consistent and easier to read.
  
  While here, remove two unused static functions and fix a unused function
  warning when building !INTRNG.
  
  No functional changes.
  
  Sponsored by: Rubicon Communications, LLC (Netgate)

Modified:
  head/sys/arm/mv/mpic.c

Modified: head/sys/arm/mv/mpic.c
==
--- head/sys/arm/mv/mpic.c  Wed May 17 20:23:27 2017(r318425)
+++ head/sys/arm/mv/mpic.c  Wed May 17 21:14:27 2017(r318426)
@@ -148,12 +148,10 @@ static void   mpic_unmask_irq(uintptr_t nb
 static voidmpic_mask_irq(uintptr_t nb);
 static voidmpic_mask_irq_err(uintptr_t nb);
 static voidmpic_unmask_irq_err(uintptr_t nb);
+#ifdef INTRNG
 static int mpic_intr(void *arg);
-static voidmpic_unmask_msi(void);
-#ifndef INTRNG
-static voidarm_mask_irq_err(uintptr_t);
-static voidarm_unmask_irq_err(uintptr_t);
 #endif
+static voidmpic_unmask_msi(void);
 
 #defineMPIC_WRITE(softc, reg, val) \
 bus_space_write_4((softc)->mpic_bst, (softc)->mpic_bsh, (reg), (val))
@@ -260,8 +258,7 @@ mv_mpic_attach(device_t dev)
sc->drbl_bsh = rman_get_bushandle(sc->mpic_res[2]);
}
 
-   bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-   MPIC_CTRL, 1);
+   MPIC_WRITE(mv_mpic_sc, MPIC_CTRL, 1);
MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 0);
 
val = MPIC_READ(mv_mpic_sc, MPIC_CTRL);
@@ -435,27 +432,12 @@ arm_mask_irq(uintptr_t nb)
mpic_mask_irq(nb);
 }
 
-
-static void
-arm_mask_irq_err(uintptr_t nb)
-{
-
-   mpic_mask_irq_err(nb);
-}
-
 void
 arm_unmask_irq(uintptr_t nb)
 {
 
mpic_unmask_irq(nb);
 }
-
-void
-arm_unmask_irq_err(uintptr_t nb)
-{
-
-   mpic_unmask_irq_err(nb);
-}
 #endif
 
 static void
@@ -471,8 +453,7 @@ mpic_unmask_irq_err(uintptr_t nb)
uint32_t mask;
uint8_t bit_off;
 
-   bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-   MPIC_ISE, MPIC_INT_ERR);
+   MPIC_WRITE(mv_mpic_sc, MPIC_ISE, MPIC_INT_ERR);
MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, MPIC_INT_ERR);
 
bit_off = nb - ERR_IRQ;
@@ -498,8 +479,7 @@ mpic_unmask_irq(uintptr_t nb)
 {
 
if (nb < ERR_IRQ) {
-   bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-   MPIC_ISE, nb);
+   MPIC_WRITE(mv_mpic_sc, MPIC_ISE, nb);
MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ICM, nb);
} else if (nb < MSI_IRQ)
mpic_unmask_irq_err(nb);
@@ -513,8 +493,7 @@ mpic_mask_irq(uintptr_t nb)
 {
 
if (nb < ERR_IRQ) {
-   bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-   MPIC_ICE, nb);
+   MPIC_WRITE(mv_mpic_sc, MPIC_ICE, nb);
MPIC_CPU_WRITE(mv_mpic_sc, MPIC_ISM, nb);
} else if (nb < MSI_IRQ)
mpic_mask_irq_err(nb);
@@ -533,8 +512,7 @@ mv_mpic_get_cause_err(void)
uint32_t err_cause;
uint8_t bit_off;
 
-   err_cause = bus_space_read_4(mv_mpic_sc->mpic_bst,
-   mv_mpic_sc->mpic_bsh, MPIC_ERR_CAUSE);
+   err_cause = MPIC_READ(mv_mpic_sc, MPIC_ERR_CAUSE);
 
if (err_cause)
bit_off = ffs(err_cause) - 1;
@@ -615,8 +593,7 @@ pic_ipi_send(cpuset_t cpus, u_int ipi)
if (CPU_ISSET(i, ))
val |= (1 << (8 + i));
val |= ipi;
-   bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
-   MPIC_SOFT_INT, val);
+   MPIC_WRITE(mv_mpic_sc, MPIC_SOFT_INT, val);
 }
 
 int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318413 - head/sys/net80211

2017-05-17 Thread Adrian Chadd
Author: adrian
Date: Wed May 17 19:34:36 2017
New Revision: 318413
URL: https://svnweb.freebsd.org/changeset/base/318413

Log:
  [net80211] initial VHT radiotap implementation defines from upstream radiotap.

Modified:
  head/sys/net80211/ieee80211_radiotap.h

Modified: head/sys/net80211/ieee80211_radiotap.h
==
--- head/sys/net80211/ieee80211_radiotap.h  Wed May 17 16:32:24 2017
(r318412)
+++ head/sys/net80211/ieee80211_radiotap.h  Wed May 17 19:34:36 2017
(r318413)
@@ -178,6 +178,30 @@ struct ieee80211_radiotap_header {
  *  finally the maximum regulatory transmit power cap in .5 dBm
  *  units.  This property supersedes IEEE80211_RADIOTAP_CHANNEL
  *  and only one of the two should be present.
+ * IEEE80211_RADIOTAP_RX_FLAGS  guint16   bitmap
+ *
+ * Properties of received frames. See flags defined below.
+ *
+ * IEEE80211_RADIOTAP_TX_FLAGS  guint16   bitmap
+ *
+ * Properties of transmitted frames. See flags defined below.
+ *
+ * IEEE80211_RADIOTAP_RTS_RETRIES   u8   data
+ *
+ * Number of rts retries a transmitted frame used.
+ *
+ * IEEE80211_RADIOTAP_DATA_RETRIES  u8   data
+ *
+ * Number of unicast retries a transmitted frame used.
+ *
+ * IEEE80211_RADIOTAP_MCS   u8, u8, u8  unitless
+ *
+ * Contains a bitmap of known fields/flags, the flags, and
+ * the MCS index.
+ *
+ * IEEE80211_RADIOTAP_AMPDU_STATUS  u32, u16, u8, u8unitlesss
+ *
+ *  Contains the AMPDU information for the subframe.
  */
 enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_TSFT = 0,
@@ -206,6 +230,7 @@ enum ieee80211_radiotap_type {
IEEE80211_RADIOTAP_XCHANNEL = 18,
IEEE80211_RADIOTAP_MCS = 19,
IEEE80211_RADIOTAP_AMPDU_STATUS = 20,
+   IEEE80211_RADIOTAP_VHT = 21,
 
 IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE = 29,
IEEE80211_RADIOTAP_VENDOREXT = 30,
@@ -250,4 +275,95 @@ enum ieee80211_radiotap_type {
 #defineIEEE80211_RADIOTAP_F_BADFCS 0x40/* does not pass FCS 
check */
 #defineIEEE80211_RADIOTAP_F_SHORTGI0x80/* HT short GI */
 
+/* For IEEE80211_RADIOTAP_RX_FLAGS */
+#defineIEEE80211_RADIOTAP_F_RX_BADPLCP 0x0002  /* bad PLCP */
+
+/* For IEEE80211_RADIOTAP_TX_FLAGS */
+#defineIEEE80211_RADIOTAP_F_TX_FAIL0x0001  /* failed due to 
excessive
+* retries */
+#defineIEEE80211_RADIOTAP_F_TX_CTS 0x0002  /* used cts 
'protection' */
+#defineIEEE80211_RADIOTAP_F_TX_RTS 0x0004  /* used rts/cts 
handshake */
+
+
+/* For IEEE80211_RADIOTAP_MCS */
+#defineIEEE80211_RADIOTAP_MCS_HAVE_BW  0x01
+#defineIEEE80211_RADIOTAP_MCS_HAVE_MCS 0x02
+#defineIEEE80211_RADIOTAP_MCS_HAVE_GI  0x04
+#defineIEEE80211_RADIOTAP_MCS_HAVE_FMT 0x08
+#defineIEEE80211_RADIOTAP_MCS_HAVE_FEC 0x10
+#defineIEEE80211_RADIOTAP_MCS_HAVE_STBC0x20
+#defineIEEE80211_RADIOTAP_MCS_HAVE_NESS0x40
+#defineIEEE80211_RADIOTAP_MCS_NESS_BIT10x80
+
+#defineIEEE80211_RADIOTAP_MCS_BW_MASK  0x03
+#defineIEEE80211_RADIOTAP_MCS_BW_200
+#defineIEEE80211_RADIOTAP_MCS_BW_401
+#define IEEE80211_RADIOTAP_MCS_BW_20L  2
+#defineIEEE80211_RADIOTAP_MCS_BW_20U   3
+#defineIEEE80211_RADIOTAP_MCS_SGI  0x04
+#defineIEEE80211_RADIOTAP_MCS_FMT_GF   0x08
+#defineIEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
+#defineIEEE80211_RADIOTAP_MCS_STBC_MASK0x60
+#defineIEEE80211_RADIOTAP_MCS_STBC_SHIFT   5
+#defineIEEE80211_RADIOTAP_MCS_STBC_1   1
+#defineIEEE80211_RADIOTAP_MCS_STBC_2   2
+#defineIEEE80211_RADIOTAP_MCS_STBC_3   3
+#defineIEEE80211_RADIOTAP_MCS_NESS_BIT00x80
+
+/* For IEEE80211_RADIOTAP_AMPDU_STATUS */
+#defineIEEE80211_RADIOTAP_AMPDU_REPORT_ZEROLEN 0x0001
+#defineIEEE80211_RADIOTAP_AMPDU_IS_ZEROLEN 0x0002
+#defineIEEE80211_RADIOTAP_AMPDU_LAST_KNOWN 0x0004
+#defineIEEE80211_RADIOTAP_AMPDU_IS_LAST0x0008
+#defineIEEE80211_RADIOTAP_AMPDU_DELIM_CRC_ERR  0x0010
+#defineIEEE80211_RADIOTAP_AMPDU_DELIM_CRC_KNOWN0x0020
+
+/* For IEEE80211_RADIOTAP_VHT */
+#defineIEEE80211_RADIOTAP_VHT_HAVE_STBC0x0001
+#defineIEEE80211_RADIOTAP_VHT_HAVE_TXOP_PS 0x0002
+#defineIEEE80211_RADIOTAP_VHT_HAVE_GI  0x0004
+#defineIEEE80211_RADIOTAP_VHT_HAVE_SGI_NSYM_DA 0x0008
+#defineIEEE80211_RADIOTAP_VHT_HAVE_LDPC_EXTRA  0x0010
+#defineIEEE80211_RADIOTAP_VHT_HAVE_BF  0x0020
+#defineIEEE80211_RADIOTAP_VHT_HAVE_BW  

svn commit: r318412 - head/sys/sparc64/include

2017-05-17 Thread Ed Maste
Author: emaste
Date: Wed May 17 16:32:24 2017
New Revision: 318412
URL: https://svnweb.freebsd.org/changeset/base/318412

Log:
  fix sparc64 build by restoring 'register' in pcpu.h
  
  Reported by:  jhb
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/sparc64/include/pcpu.h

Modified: head/sys/sparc64/include/pcpu.h
==
--- head/sys/sparc64/include/pcpu.h Wed May 17 15:59:45 2017
(r318411)
+++ head/sys/sparc64/include/pcpu.h Wed May 17 16:32:24 2017
(r318412)
@@ -71,8 +71,8 @@ extern void *dpcpu0;
 struct pcb;
 struct pcpu;
 
-struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
-struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
+register struct pcb *curpcb __asm__(__XSTRING(PCB_REG));
+register struct pcpu *pcpup __asm__(__XSTRING(PCPU_REG));
 
 #defineget_pcpu()  (pcpup)
 #definePCPU_GET(member)(pcpup->pc_ ## member)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318411 - head/sys/dev/etherswitch/e6000sw

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:59:45 2017
New Revision: 318411
URL: https://svnweb.freebsd.org/changeset/base/318411

Log:
  Add missing unlock in e6000sw driver
  
  This patch adds missing unlock on attach failure.
  
  Submitted by:  Zbigniew Bodek 
  Obtained from: Semihalf
  Sponsored by:  Stormshield
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10712

Modified:
  head/sys/dev/etherswitch/e6000sw/e6000sw.c

Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c
==
--- head/sys/dev/etherswitch/e6000sw/e6000sw.c  Wed May 17 15:58:39 2017
(r318410)
+++ head/sys/dev/etherswitch/e6000sw/e6000sw.c  Wed May 17 15:59:45 2017
(r318411)
@@ -425,6 +425,7 @@ e6000sw_attach(device_t dev)
return (0);
 
 out_fail:
+   E6000SW_UNLOCK(sc);
e6000sw_detach(dev);
 
return (err);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318410 - head/sys/dev/etherswitch/e6000sw

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:58:39 2017
New Revision: 318410
URL: https://svnweb.freebsd.org/changeset/base/318410

Log:
  Fix broken malloc in e6000sw
  
  Malloc should always return something when M_WAITOK flag is used,
  but keep this code and change flag to M_NOWAIT as it is under a lock
  (allows for possible future change). Free ifnet structure to avoid
  memory leak on failure.
  
  Submitted by:  Zbigniew Bodek 
  Obtained from: Semihalf
  Sponsored by:  Stormshield
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10711

Modified:
  head/sys/dev/etherswitch/e6000sw/e6000sw.c

Modified: head/sys/dev/etherswitch/e6000sw/e6000sw.c
==
--- head/sys/dev/etherswitch/e6000sw/e6000sw.c  Wed May 17 15:57:14 2017
(r318409)
+++ head/sys/dev/etherswitch/e6000sw/e6000sw.c  Wed May 17 15:58:39 2017
(r318410)
@@ -321,9 +321,11 @@ e6000sw_init_interface(e6000sw_softc_t *
sc->ifp[port]->if_softc = sc;
sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST |
IFF_DRV_RUNNING | IFF_SIMPLEX;
-   sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_WAITOK);
-   if (sc->ifname[port] == NULL)
+   sc->ifname[port] = malloc(strlen(name) + 1, M_E6000SW, M_NOWAIT);
+   if (sc->ifname[port] == NULL) {
+   if_free(sc->ifp[port]);
return (ENOMEM);
+   }
memcpy(sc->ifname[port], name, strlen(name) + 1);
if_initname(sc->ifp[port], sc->ifname[port], port);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318409 - head/sys/arm/mv

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:57:14 2017
New Revision: 318409
URL: https://svnweb.freebsd.org/changeset/base/318409

Log:
  Fix registration of MPIC driver
  
  Submitted by:  Michal Mazur 
  Obtained from: Semihalf
  Sponsored by:  Netgate
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10717

Modified:
  head/sys/arm/mv/mpic.c

Modified: head/sys/arm/mv/mpic.c
==
--- head/sys/arm/mv/mpic.c  Wed May 17 15:56:09 2017(r318408)
+++ head/sys/arm/mv/mpic.c  Wed May 17 15:57:14 2017(r318409)
@@ -273,6 +273,9 @@ mv_mpic_attach(device_t dev)
bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
return (ENXIO);
}
+
+   OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev);
+
if (intr_pic_register(dev, OF_xref_from_device(dev)) == NULL) {
device_printf(dev, "could not register PIC\n");
bus_release_resources(dev, mv_mpic_spec, sc->mpic_res);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318408 - head/sys/arm/mv

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:56:09 2017
New Revision: 318408
URL: https://svnweb.freebsd.org/changeset/base/318408

Log:
  Correct MPIC order of attachment
  
  If MPIC happens to be a slave interrupt controller (as on Armada38x),
  it should be attached after primary interrupt controller.
  Thus BUS_PASS_ORDER_LATE was added to default BUS_PASS_INTERRUPT.
  
  This change doesn't affect the cases when MPIC is standalone IC.
  
  Submitted by:  Bartosz Szczepanek 
  Obtained from: Semihalf
  Sponsored by:  Stormshield, Netgate
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10715

Modified:
  head/sys/arm/mv/mpic.c

Modified: head/sys/arm/mv/mpic.c
==
--- head/sys/arm/mv/mpic.c  Wed May 17 15:54:33 2017(r318407)
+++ head/sys/arm/mv/mpic.c  Wed May 17 15:56:09 2017(r318408)
@@ -398,7 +398,7 @@ static driver_t mv_mpic_driver = {
 static devclass_t mv_mpic_devclass;
 
 EARLY_DRIVER_MODULE(mpic, simplebus, mv_mpic_driver, mv_mpic_devclass, 0, 0,
-BUS_PASS_INTERRUPT);
+BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE);
 
 #ifndef INTRNG
 int
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318407 - head/sys/arm/mv

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:54:33 2017
New Revision: 318407
URL: https://svnweb.freebsd.org/changeset/base/318407

Log:
  Enable proper parsing of nested simlpe-buses on Marvell platforms
  
  OF_finddevice doesn't find the "simple-bus" node, which is problematic
  for Marvell platforms, using nested buses in Device Tree, like
  Armada 38x SoC.
  
  Submitted by: Arnaud Ysmal 
  Obtained from: Stormshield
  Sponsored by: Stormshield
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10719

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Wed May 17 15:53:13 2017(r318406)
+++ head/sys/arm/mv/mv_common.c Wed May 17 15:54:33 2017(r318407)
@@ -2280,11 +2280,12 @@ moveon:
 static int
 fdt_win_setup(void)
 {
-   phandle_t node, child;
+   phandle_t node, child, sb;
struct soc_node_spec *soc_node;
u_long size, base;
int err, i;
 
+   sb = 0;
node = OF_finddevice("/");
if (node == -1)
panic("fdt_win_setup: no root node");
@@ -2326,7 +2327,7 @@ fdt_win_setup(void)
 */
child = OF_peer(child);
if ((child == 0) && (node == OF_finddevice("/"))) {
-   node = fdt_find_compatible(node, "simple-bus", 0);
+   sb = node = fdt_find_compatible(node, "simple-bus", 0);
if (node == 0)
return (ENXIO);
child = OF_child(node);
@@ -2336,7 +2337,7 @@ fdt_win_setup(void)
 * it is present) and its children. This node also have
 * "simple-bus" compatible.
 */
-   if ((child == 0) && (node == OF_finddevice("simple-bus"))) {
+   if ((child == 0) && (node == sb)) {
node = fdt_find_compatible(node, "simple-bus", 0);
if (node == 0)
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318406 - head/sys/arm/mv

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:53:13 2017
New Revision: 318406
URL: https://svnweb.freebsd.org/changeset/base/318406

Log:
  Parse EHCI windows on Marvell platforms
  
  Add missing compatibility string to allow proper
  window configuration for EHCI devices.
  
  Submitted by: Wojciech Macek 
  Obtained from: Semihalf
  Sponsored by: Stormshield
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10722

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Wed May 17 15:52:04 2017(r318405)
+++ head/sys/arm/mv/mv_common.c Wed May 17 15:53:13 2017(r318406)
@@ -139,6 +139,7 @@ struct soc_node_spec {
 static struct soc_node_spec soc_nodes[] = {
{ "mrvl,ge", _win_eth_setup, _win_eth_dump },
{ "mrvl,usb-ehci", _win_usb_setup, _win_usb_dump },
+   { "marvell,orion-ehci", _win_usb_setup, _win_usb_dump },
{ "marvell,armada-380-xhci", _win_usb3_setup, 
_win_usb3_dump },
{ "marvell,armada-380-ahci", _win_ahci_setup, 
_win_ahci_dump },
{ "marvell,armada-380-sdhci", _win_sdhci_setup, 
_win_sdhci_dump },
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318405 - head/sys/arm/mv

2017-05-17 Thread Zbigniew Bodek
Author: zbb
Date: Wed May 17 15:52:04 2017
New Revision: 318405
URL: https://svnweb.freebsd.org/changeset/base/318405

Log:
  Fix USB3.0 decoding windows on Armada38x
  
  Set correct offset for MBUS windows configuration in
  USB3.0 interface.
  
  Submitted by: Marcin Wojtas 
  Obtained from: Semihalf
  Sponsored by: Stormshield
  Reviewed by: loos
  Differential revision: https://reviews.freebsd.org/D10721

Modified:
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mvwin.h
==
--- head/sys/arm/mv/mvwin.h Wed May 17 15:13:01 2017(r318404)
+++ head/sys/arm/mv/mvwin.h Wed May 17 15:52:04 2017(r318405)
@@ -220,8 +220,8 @@
 #define MV_WIN_USB_BASE(n) (0x10 * (n) + 0x324)
 #define MV_WIN_USB_MAX 4
 
-#defineMV_WIN_USB3_CTRL(n) (0x8 * (n))
-#defineMV_WIN_USB3_BASE(n) (0x8 * (n) + 0x4)
+#defineMV_WIN_USB3_CTRL(n) (0x8 * (n) + 0x4000)
+#defineMV_WIN_USB3_BASE(n) (0x8 * (n) + 0x4004)
 #defineMV_WIN_USB3_MAX 8
 
 #define MV_WIN_ETH_BASE(n) (0x8 * (n) + 0x200)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318404 - head/sys/arm/mv

2017-05-17 Thread Luiz Otavio O Souza
Author: loos
Date: Wed May 17 15:13:01 2017
New Revision: 318404
URL: https://svnweb.freebsd.org/changeset/base/318404

Log:
  Move the IO Window Control Register defines out of the ARMADA38X ifdef.
  
  Fixes the build of Marvell kernels (other than ARMADA38X) after r318336.
  
  Reported by:  mmel

Modified:
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mvwin.h
==
--- head/sys/arm/mv/mvwin.h Wed May 17 14:35:21 2017(r318403)
+++ head/sys/arm/mv/mvwin.h Wed May 17 15:13:01 2017(r318404)
@@ -305,18 +305,6 @@
 #defineMV_BOOTROM_WIN_SIZE 0xF
 #defineMV_CPU_SUBSYS_REGS_LEN  0x100
 
-/* IO Window Control Register fields */
-#defineIO_WIN_SIZE_SHIFT   16
-#defineIO_WIN_SIZE_MASK0x
-#defineIO_WIN_ATTR_SHIFT   8
-#defineIO_WIN_ATTR_MASK0xFF
-#defineIO_WIN_TGT_SHIFT4
-#defineIO_WIN_TGT_MASK 0xF
-#defineIO_WIN_SYNC_SHIFT   1
-#defineIO_WIN_SYNC_MASK0x1
-#defineIO_WIN_ENA_SHIFT0
-#defineIO_WIN_ENA_MASK 0x1
-
 #defineIO_WIN_9_CTRL_OFFSET0x98
 #defineIO_WIN_9_BASE_OFFSET0x9C
 
@@ -329,6 +317,18 @@
 #defineMV_SYNC_BARRIER_CTRL_ALL0x
 #endif
 
+/* IO Window Control Register fields */
+#defineIO_WIN_SIZE_SHIFT   16
+#defineIO_WIN_SIZE_MASK0x
+#defineIO_WIN_ATTR_SHIFT   8
+#defineIO_WIN_ATTR_MASK0xFF
+#defineIO_WIN_TGT_SHIFT4
+#defineIO_WIN_TGT_MASK 0xF
+#defineIO_WIN_SYNC_SHIFT   1
+#defineIO_WIN_SYNC_MASK0x1
+#defineIO_WIN_ENA_SHIFT0
+#defineIO_WIN_ENA_MASK 0x1
+
 #define WIN_REG_IDX_RD(pre,reg,off,base)   
\
static __inline uint32_t
\
pre ## _ ## reg ## _read(int i) 
\
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318401 - head/sys/dev/tws

2017-05-17 Thread Josh Paetzel
Author: jpaetzel
Date: Wed May 17 13:22:13 2017
New Revision: 318401
URL: https://svnweb.freebsd.org/changeset/base/318401

Log:
  Increase the number of LUNs this hardware can support.
  
  Experimentally we know this value works, but the hardware
  may support an even higher value.
  
  PR:   213876
  Reported by:  j.catry...@proximedia.be
  MFC after:1 week

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

Modified: head/sys/dev/tws/tws.h
==
--- head/sys/dev/tws/tws.h  Wed May 17 10:56:22 2017(r318400)
+++ head/sys/dev/tws/tws.h  Wed May 17 13:22:13 2017(r318401)
@@ -67,7 +67,7 @@ extern int tws_queue_depth;
 
 #define TWS_DRIVER_VERSION_STRING "10.80.00.005"
 #define TWS_MAX_NUM_UNITS 65 
-#define TWS_MAX_NUM_LUNS  16
+#define TWS_MAX_NUM_LUNS  32
 #define TWS_MAX_IRQS  2
 #define TWS_SCSI_INITIATOR_ID 66
 #define TWS_MAX_IO_SIZE   0x2 /* 128kB */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318400 - head/sbin/ipfw

2017-05-17 Thread Andrey V. Elsukov
Author: ae
Date: Wed May 17 10:56:22 2017
New Revision: 318400
URL: https://svnweb.freebsd.org/changeset/base/318400

Log:
  Allow zero port specification in table entries with type flow.
  
  PR:   217620
  MFC after:1 week

Modified:
  head/sbin/ipfw/tables.c

Modified: head/sbin/ipfw/tables.c
==
--- head/sbin/ipfw/tables.c Wed May 17 09:04:09 2017(r318399)
+++ head/sbin/ipfw/tables.c Wed May 17 10:56:22 2017(r318400)
@@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
if ((p = strchr(arg, ',')) != NULL)
*p++ = '\0';
 
-   if ((port = htons(strtol(arg, NULL, 10))) == 0) {
+   port = htons(strtol(arg, , 10));
+   if (*pp != '\0') {
if ((sent = getservbyname(arg, NULL)) == NULL)
errx(EX_DATAERR, "Unknown service: %s",
arg);
-   else
-   key = sent->s_port;
+   port = sent->s_port;
}
-   
tfe->sport = port;
-
arg = p;
}
 
@@ -1304,16 +1302,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
if ((p = strchr(arg, ',')) != NULL)
*p++ = '\0';
 
-   if ((port = htons(strtol(arg, NULL, 10))) == 0) {
+   port = htons(strtol(arg, , 10));
+   if (*pp != '\0') {
if ((sent = getservbyname(arg, NULL)) == NULL)
errx(EX_DATAERR, "Unknown service: %s",
arg);
-   else
-   key = sent->s_port;
+   port = sent->s_port;
}
-   
tfe->dport = port;
-
arg = p;
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318399 - head/sys/netinet

2017-05-17 Thread Andrey V. Elsukov
Author: ae
Date: Wed May 17 09:04:09 2017
New Revision: 318399
URL: https://svnweb.freebsd.org/changeset/base/318399

Log:
  Set M_BCAST and M_MCAST flags on mbuf sent via divert socket.
  
  r290383 has changed how mbufs sent by divert socket are handled.
  Previously they are always handled by slow path processing in ip_input().
  Now ip_tryforward() is invoked from ip_input() before in_broadcast() check.
  Since diverted packet lost all mbuf flags, it passes the broadcast check
  in ip_tryforward() due to missing M_BCAST flag. In the result the broadcast
  packet is forwarded to the wire instead of be consumed by network stack.
  
  Add in_broadcast() check to the div_output() function. And restore the
  M_BCAST flag if destination address is broadcast for the given network
  interface.
  
  PR:   209491
  MFC after:1 week

Modified:
  head/sys/netinet/ip_divert.c

Modified: head/sys/netinet/ip_divert.c
==
--- head/sys/netinet/ip_divert.cWed May 17 08:38:41 2017
(r318398)
+++ head/sys/netinet/ip_divert.cWed May 17 09:04:09 2017
(r318399)
@@ -481,6 +481,14 @@ div_output(struct socket *so, struct mbu
/* Send packet to input processing via netisr */
switch (ip->ip_v) {
case IPVERSION:
+   /*
+* Restore M_BCAST flag when destination address is
+* broadcast. It is expected by ip_tryforward().
+*/
+   if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)))
+   m->m_flags |= M_MCAST;
+   else if (in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))
+   m->m_flags |= M_BCAST;
netisr_queue_src(NETISR_IP, (uintptr_t)so, m);
break;
 #ifdef INET6
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r318398 - head/sys/amd64/include

2017-05-17 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed May 17 08:38:41 2017
New Revision: 318398
URL: https://svnweb.freebsd.org/changeset/base/318398

Log:
  Bump default MAXTSIZ (kern.maxtsiz) from 128MB to 32GB. The old limit
  prevents one from running eg clang built with debug; the new one is
  arbitrary (equal to MAXDSIZ) and... well, should be quite future-proof.
  
  Same fix might be applicable to other 64 bit architectures; I'll ask
  their respective maintainers to make sure it won't break anything.
  
  Reviewed by:  kib
  MFC after:2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D10758

Modified:
  head/sys/amd64/include/vmparam.h

Modified: head/sys/amd64/include/vmparam.h
==
--- head/sys/amd64/include/vmparam.hWed May 17 05:53:25 2017
(r318397)
+++ head/sys/amd64/include/vmparam.hWed May 17 08:38:41 2017
(r318398)
@@ -52,7 +52,7 @@
 /*
  * Virtual memory related constants, all in bytes
  */
-#defineMAXTSIZ (128UL*1024*1024)   /* max text size */
+#defineMAXTSIZ (32768UL*1024*1024) /* max text size */
 #ifndef DFLDSIZ
 #defineDFLDSIZ (32768UL*1024*1024) /* initial data size 
limit */
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"