svn commit: r298831 - head/sys/boot/forth

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 02:47:41 2016
New Revision: 298831
URL: https://svnweb.freebsd.org/changeset/base/298831

Log:
  boot/forth: spelling fixes.
  
  Reviewed by: dteske
  MFC after: 2 weeks

Modified:
  head/sys/boot/forth/delay.4th
  head/sys/boot/forth/loader.4th
  head/sys/boot/forth/loader.conf
  head/sys/boot/forth/menu.4th
  head/sys/boot/forth/support.4th

Modified: head/sys/boot/forth/delay.4th
==
--- head/sys/boot/forth/delay.4th   Sat Apr 30 01:24:24 2016
(r298830)
+++ head/sys/boot/forth/delay.4th   Sat Apr 30 02:47:41 2016
(r298831)
@@ -66,7 +66,7 @@ only forth definitions also delay-proces
 
false delay_showdots ! \ reset to zero and read from environment
s" delay_showdots" getenv dup -1 <> if
-   2drop \ don't need the value, just existance
+   2drop \ don't need the value, just existence
true delay_showdots !
else
drop

Modified: head/sys/boot/forth/loader.4th
==
--- head/sys/boot/forth/loader.4th  Sat Apr 30 01:24:24 2016
(r298830)
+++ head/sys/boot/forth/loader.4th  Sat Apr 30 02:47:41 2016
(r298831)
@@ -136,7 +136,7 @@ only forth definitions also support-func
 \ * start
 \
 \   Initializes support.4th global variables, sets loader_conf_files,
-\   processes conf files, and, if any one such file was succesfully
+\   processes conf files, and, if any one such file was successfully
 \   read to the end, loads kernel and modules.
 
 : start  ( -- ) ( throws: abort & user-defined )
@@ -144,7 +144,7 @@ only forth definitions also support-func
   include_conf_files
   include_nextboot_file
   \ Will *NOT* try to load kernel and modules if no configuration file
-  \ was succesfully loaded!
+  \ was successfully loaded!
   any_conf_read? if
 s" loader_delay" getenv -1 = if
   load_xen_throw

Modified: head/sys/boot/forth/loader.conf
==
--- head/sys/boot/forth/loader.conf Sat Apr 30 01:24:24 2016
(r298830)
+++ head/sys/boot/forth/loader.conf Sat Apr 30 02:47:41 2016
(r298831)
@@ -159,7 +159,7 @@ module_path="/boot/modules" # Set the mo
 #kern.cam.boot_delay="1"   # Delay (in ms) of root mount for CAM bus
# registration, useful for USB sticks as root
 #kern.cam.scsi_delay="2000"# Delay (in ms) before probing SCSI
-#kern.ipc.maxsockets=""# Set the maximum number of sockets 
avaliable
+#kern.ipc.maxsockets=""# Set the maximum number of sockets 
available
 #kern.ipc.nmbclusters=""   # Set the number of mbuf clusters
 #kern.ipc.nsfbufs=""   # Set the number of sendfile(2) bufs
 #net.inet.tcp.tcbhashsize=""   # Set the value of TCBHASHSIZE

Modified: head/sys/boot/forth/menu.4th
==
--- head/sys/boot/forth/menu.4thSat Apr 30 01:24:24 2016
(r298830)
+++ head/sys/boot/forth/menu.4thSat Apr 30 02:47:41 2016
(r298831)
@@ -282,7 +282,7 @@ also menu-infrastructure definitions
 ;
 
 \ This function parses $kernels into variables that are used by the menu to
-\ display wich kernel to boot when the [overloaded] `boot' word is interpreted.
+\ display which kernel to boot when the [overloaded] `boot' word is 
interpreted.
 \ Used internally by menu-create, you need not (nor should you) call this
 \ directly.
 \ 
@@ -790,7 +790,7 @@ also menu-infrastructure definitions
again
 ;
 
-: menu-erase ( -- ) \ Erases menu and resets positioning variable to positon 1.
+: menu-erase ( -- ) \ Erases menu and resets positioning variable to position 
1.
 
\ Clear the screen area associated with the interactive menu
menuX @ menuY @

Modified: head/sys/boot/forth/support.4th
==
--- head/sys/boot/forth/support.4th Sat Apr 30 01:24:24 2016
(r298830)
+++ head/sys/boot/forth/support.4th Sat Apr 30 02:47:41 2016
(r298831)
@@ -56,7 +56,7 @@
 \ string conf_filesconfiguration files to be loaded
 \ cell modules_options pointer to first module information
 \ value verbose?   indicates if user wants a verbose loading
-\ value any_conf_read? indicates if a conf file was succesfully read
+\ value any_conf_read? indicates if a conf file was successfully read
 \
 \ Other exported words:
 \note, strlen is internal
@@ -960,7 +960,7 @@ only forth also support-functions defini
 
 string current_file_name_ref   \ used to print the file name
 
-\ Indicates if any conf file was succesfully read
+\ Indicates if any conf file was successfully read
 
 0 value any_conf_read?
 
@@ 

Re: svn commit: r298818 - in head/sys: dev/bwi dev/if_ndis dev/iwi dev/malo dev/otus dev/ral dev/rtwn dev/urtwn dev/usb/wlan net80211

2016-04-29 Thread Andriy Voskoboinyk
Sat, 30 Apr 2016 01:38:32 +0300 було написано Adrian Chadd  
:


hi,

probably, IEEE80211_CHAN_BYTES should be uncommented too?


hi,

you should likely keep this as a macro:

#defineIEEE80211_MODE_MAX  (IEEE80211_MODE_QUARTER+1)
+#defineIEEE80211_MODE_BYTES2   /*
howmany(IEEE80211_MODE_MAX, NBBY) */

.. or as a runtime assert so when we add 11ac modes, we don't forget
to bump that. :)


-a

___
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: r298830 - in head/lib/libc: amd64/string iconv include locale nameser net posix1e regex resolv rpc sparc64/fpu stdio stdlib string sys tests/nss

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 01:24:24 2016
New Revision: 298830
URL: https://svnweb.freebsd.org/changeset/base/298830

Log:
  libc: spelling fixes.
  
  Mostly on comments.

Modified:
  head/lib/libc/amd64/string/strcmp.S
  head/lib/libc/iconv/iconv-internal.h
  head/lib/libc/include/compat.h
  head/lib/libc/include/reentrant.h
  head/lib/libc/locale/collate.c
  head/lib/libc/locale/nl_langinfo.c
  head/lib/libc/nameser/ns_samedomain.c
  head/lib/libc/net/getaddrinfo.c
  head/lib/libc/net/gethostnamadr.c
  head/lib/libc/net/getnetnamadr.c
  head/lib/libc/net/name6.c
  head/lib/libc/net/nscachedcli.c
  head/lib/libc/net/res_config.h
  head/lib/libc/posix1e/acl_delete_entry.c
  head/lib/libc/posix1e/acl_support.c
  head/lib/libc/regex/regcomp.c
  head/lib/libc/resolv/res_comp.c
  head/lib/libc/resolv/res_findzonecut.c
  head/lib/libc/resolv/res_init.c
  head/lib/libc/rpc/README
  head/lib/libc/rpc/clnt_dg.c
  head/lib/libc/rpc/clnt_vc.c
  head/lib/libc/rpc/getnetconfig.c
  head/lib/libc/rpc/svc.c
  head/lib/libc/rpc/svc_simple.c
  head/lib/libc/rpc/svc_vc.c
  head/lib/libc/sparc64/fpu/fpu_reg.h
  head/lib/libc/stdio/vfscanf.c
  head/lib/libc/stdlib/heapsort.c
  head/lib/libc/stdlib/strfmon.c
  head/lib/libc/string/wcscoll.c
  head/lib/libc/sys/wait.2
  head/lib/libc/tests/nss/getproto_test.c
  head/lib/libc/tests/nss/getrpc_test.c

Modified: head/lib/libc/amd64/string/strcmp.S
==
--- head/lib/libc/amd64/string/strcmp.S Sat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/amd64/string/strcmp.S Sat Apr 30 01:24:24 2016
(r298830)
@@ -29,7 +29,7 @@ ENTRY(strcmp)
jmp .Ldone
 
/*
-* Check whether s2 is aligned to a word boundry.  If it is, we
+* Check whether s2 is aligned to a word boundary.  If it is, we
 * can compare by words.  Otherwise we have to compare by bytes.
 */
 .Ls1aligned:

Modified: head/lib/libc/iconv/iconv-internal.h
==
--- head/lib/libc/iconv/iconv-internal.hSat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/iconv/iconv-internal.hSat Apr 30 01:24:24 2016
(r298830)
@@ -27,7 +27,7 @@
  */
 
 /*
- * Interal prototypes for our back-end functions.
+ * Internal prototypes for our back-end functions.
  */
 size_t __bsd___iconv(iconv_t, char **, size_t *, char **,
size_t *, __uint32_t, size_t *);

Modified: head/lib/libc/include/compat.h
==
--- head/lib/libc/include/compat.h  Sat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/include/compat.h  Sat Apr 30 01:24:24 2016
(r298830)
@@ -28,7 +28,7 @@
  */
 
 /*
- * This file defines compatiblity symbol versions for old system calls.  It
+ * This file defines compatibility symbol versions for old system calls.  It
  * is included in all generated system call files.
  */
 

Modified: head/lib/libc/include/reentrant.h
==
--- head/lib/libc/include/reentrant.h   Sat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/include/reentrant.h   Sat Apr 30 01:24:24 2016
(r298830)
@@ -49,7 +49,7 @@
  * One approach for thread safety is to provide discrete versions of the
  * library: one thread safe, the other not.  The disadvantage of this is
  * that libc is rather large, and two copies of a library which are 99%+
- * identical is not an efficent use of resources.
+ * identical is not an efficient use of resources.
  * 
  * Another approach is to provide a single thread safe library.  However,
  * it should not add significant run time or code size overhead to non-

Modified: head/lib/libc/locale/collate.c
==
--- head/lib/libc/locale/collate.c  Sat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/locale/collate.c  Sat Apr 30 01:24:24 2016
(r298830)
@@ -322,7 +322,7 @@ _collate_lookup(struct xlocale_collate *
*len = 1;
 
/*
-* Check for composites such as dipthongs that collate as a
+* Check for composites such as diphthongs that collate as a
 * single element (aka chains or collating-elements).
 */
if (((p2 = chainsearch(table, t, )) != NULL) &&

Modified: head/lib/libc/locale/nl_langinfo.c
==
--- head/lib/libc/locale/nl_langinfo.c  Sat Apr 30 00:53:10 2016
(r298829)
+++ head/lib/libc/locale/nl_langinfo.c  Sat Apr 30 01:24:24 2016
(r298830)
@@ -153,7 +153,7 @@ nl_langinfo_l(nl_item item, locale_t loc
break;
/*
 * YESSTR and NOSTR items marked with LEGACY are available, but not
-* recomended by SUSv2 to be used in portable 

svn commit: r298829 - in head/sys/compat: linux linuxkpi/common/include/linux linuxkpi/common/src

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 00:53:10 2016
New Revision: 298829
URL: https://svnweb.freebsd.org/changeset/base/298829

Log:
  sys/compat/linux*: spelling fixes.
  
  Mostly on comments but there are some user-visible messages as well.
  
  MFC after: 2 weeks

Modified:
  head/sys/compat/linux/check_internal_locks.d
  head/sys/compat/linux/linux_fork.c
  head/sys/compat/linux/linux_misc.c
  head/sys/compat/linux/linux_socket.h
  head/sys/compat/linux/trace_futexes.d
  head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
  head/sys/compat/linuxkpi/common/include/linux/dmapool.h
  head/sys/compat/linuxkpi/common/src/linux_radix.c
  head/sys/compat/linuxkpi/common/src/linux_usb.c

Modified: head/sys/compat/linux/check_internal_locks.d
==
--- head/sys/compat/linux/check_internal_locks.dSat Apr 30 00:35:46 
2016(r298828)
+++ head/sys/compat/linux/check_internal_locks.dSat Apr 30 00:53:10 
2016(r298829)
@@ -64,7 +64,7 @@ linuxulator*:locks:futex_mtx:locked
 linuxulator*:locks:futex_mtx:unlock
 /check[probefunc] == 0/
 {
-   printf("ERROR: unlock attemt of unlocked %s (%p),", probefunc, arg0);
+   printf("ERROR: unlock attempt of unlocked %s (%p),", probefunc, arg0);
printf("   missing SDT probe in kernel, or dtrace program started");
printf("   while the %s was already held (race condition).", 
probefunc);
printf("   Stack trace follows:");

Modified: head/sys/compat/linux/linux_fork.c
==
--- head/sys/compat/linux/linux_fork.c  Sat Apr 30 00:35:46 2016
(r298828)
+++ head/sys/compat/linux/linux_fork.c  Sat Apr 30 00:53:10 2016
(r298829)
@@ -163,7 +163,7 @@ linux_clone_proc(struct thread *td, stru
ff |= RFSIGSHARE;
/*
 * XXX: In Linux, sharing of fs info (chroot/cwd/umask)
-* and open files is independant.  In FreeBSD, its in one
+* and open files is independent.  In FreeBSD, its in one
 * structure but in reality it does not cause any problems
 * because both of these flags are usually set together.
 */

Modified: head/sys/compat/linux/linux_misc.c
==
--- head/sys/compat/linux/linux_misc.c  Sat Apr 30 00:35:46 2016
(r298828)
+++ head/sys/compat/linux/linux_misc.c  Sat Apr 30 00:53:10 2016
(r298829)
@@ -199,7 +199,7 @@ linux_alarm(struct thread *td, struct li
 #endif
secs = args->secs;
/*
-* Linux alarm() is always successfull. Limit secs to INT32_MAX / 2
+* Linux alarm() is always successful. Limit secs to INT32_MAX / 2
 * to match kern_setitimer()'s limit to avoid error from it.
 *
 * XXX. Linux limit secs to INT_MAX on 32 and does not limit on 64-bit

Modified: head/sys/compat/linux/linux_socket.h
==
--- head/sys/compat/linux/linux_socket.hSat Apr 30 00:35:46 2016
(r298828)
+++ head/sys/compat/linux/linux_socket.hSat Apr 30 00:53:10 2016
(r298829)
@@ -79,7 +79,7 @@ struct l_cmsghdr {
l_int   cmsg_type;
 };
 
-/* Ancilliary data object information macros */
+/* Ancillary data object information macros */
 
 #define LINUX_CMSG_ALIGN(len)  roundup2(len, sizeof(l_ulong))
 #define LINUX_CMSG_DATA(cmsg)  ((void *)((char *)(cmsg) + \

Modified: head/sys/compat/linux/trace_futexes.d
==
--- head/sys/compat/linux/trace_futexes.d   Sat Apr 30 00:35:46 2016
(r298828)
+++ head/sys/compat/linux/trace_futexes.d   Sat Apr 30 00:53:10 2016
(r298829)
@@ -120,7 +120,7 @@ linuxulator*:locks:futex_mtx:locked
 linuxulator*:locks:futex_mtx:unlock
 /check[probefunc, arg0] == 0/
 {
-   printf("ERROR: unlock attemt of unlocked %s (%p),", probefunc, arg0);
+   printf("ERROR: unlock attempt of unlocked %s (%p),", probefunc, arg0);
printf("   missing SDT probe in kernel, or dtrace program started");
printf("   while the %s was already held (race condition).", 
probefunc);
printf("   Stack trace follows:");

Modified: head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h
==
--- head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sat Apr 30 
00:35:46 2016(r298828)
+++ head/sys/compat/linuxkpi/common/include/linux/dma-mapping.h Sat Apr 30 
00:53:10 2016(r298829)
@@ -115,7 +115,7 @@ dma_set_coherent_mask(struct device *dev
 
if (!dma_supported(dev, mask))
return -EIO;
-   /* XXX Currently we don't support a seperate coherent mask. */
+   /* XXX Currently we don't support a separate 

svn commit: r298828 - head/sys/compat/ndis

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 00:35:46 2016
New Revision: 298828
URL: https://svnweb.freebsd.org/changeset/base/298828

Log:
  ndis: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/compat/ndis/kern_ndis.c
  head/sys/compat/ndis/ndis_var.h
  head/sys/compat/ndis/ntoskrnl_var.h
  head/sys/compat/ndis/subr_hal.c
  head/sys/compat/ndis/subr_ntoskrnl.c
  head/sys/compat/ndis/subr_pe.c

Modified: head/sys/compat/ndis/kern_ndis.c
==
--- head/sys/compat/ndis/kern_ndis.cSat Apr 30 00:34:04 2016
(r298827)
+++ head/sys/compat/ndis/kern_ndis.cSat Apr 30 00:35:46 2016
(r298828)
@@ -717,7 +717,7 @@ ndis_ptom(m0, p)
  * send routine.
  *
  * NDIS packets consist of two parts: an ndis_packet structure,
- * which is vaguely analagous to the pkthdr portion of an mbuf,
+ * which is vaguely analogous to the pkthdr portion of an mbuf,
  * and one or more ndis_buffer structures, which define the
  * actual memory segments in which the packet data resides.
  * We need to allocate one ndis_buffer for each mbuf in a chain,

Modified: head/sys/compat/ndis/ndis_var.h
==
--- head/sys/compat/ndis/ndis_var.h Sat Apr 30 00:34:04 2016
(r298827)
+++ head/sys/compat/ndis/ndis_var.h Sat Apr 30 00:35:46 2016
(r298828)
@@ -1042,7 +1042,7 @@ struct ndis_request {
uint32_tnr_bytesneeded;
} ndis_set_information;
} ndis_data;
-   /* NDIS 5.0 extentions */
+   /* NDIS 5.0 extensions */
uint8_t nr_ndis_rsvd[9 * sizeof(void *)];
union {
uint8_t nr_callmgr_rsvd[2 * sizeof(void *)];
@@ -1444,7 +1444,7 @@ struct ndis_miniport_characteristics {
void *  nmc_setinfo_func;
void *  nmc_transferdata_func;
 
-   /* NDIS 4.0 extentions */
+   /* NDIS 4.0 extensions */
 
void *  nmc_return_packet_func;
void *  nmc_sendmulti_func;
@@ -1459,7 +1459,7 @@ struct ndis_miniport_characteristics {
void *  nmc_comultisend_func;
void *  nmc_corequest_func;
 
-   /* NDIS 5.1 extentions */
+   /* NDIS 5.1 extensions */
 
void *  nmc_canceltxpkts_handler;
void *  nmc_pnpevent_handler;

Modified: head/sys/compat/ndis/ntoskrnl_var.h
==
--- head/sys/compat/ndis/ntoskrnl_var.h Sat Apr 30 00:34:04 2016
(r298827)
+++ head/sys/compat/ndis/ntoskrnl_var.h Sat Apr 30 00:35:46 2016
(r298828)
@@ -670,13 +670,13 @@ struct kuser_shared_data {
  * created and maintained by bus drivers. For example, the PCI
  * bus driver might detect two PCI ethernet cards on a given
  * bus. The PCI bus driver will then allocate two device_objects
- * for its own internal bookeeping purposes. This is analagous
+ * for its own internal bookeeping purposes. This is analogous
  * to the device_t that the FreeBSD PCI code allocates and passes
  * into each PCI driver's probe and attach routines.
  *
  * When an ethernet driver claims one of the ethernet cards
  * on the bus, it will create its own device_object. This is
- * the Functional Device Object. This object is analagous to the
+ * the Functional Device Object. This object is analogous to the
  * device-specific softc structure.
  */
 
@@ -962,7 +962,7 @@ struct io_stack_location {
 
/*
 * There's a big-ass union here in the actual Windows
-* definition of the stucture, but it contains stuff
+* definition of the structure, but it contains stuff
 * that doesn't really apply to BSD, and defining it
 * all properly would require duplicating over a dozen
 * other structures that we'll never use. Since the

Modified: head/sys/compat/ndis/subr_hal.c
==
--- head/sys/compat/ndis/subr_hal.c Sat Apr 30 00:34:04 2016
(r298827)
+++ head/sys/compat/ndis/subr_hal.c Sat Apr 30 00:35:46 2016
(r298828)
@@ -274,7 +274,7 @@ READ_PORT_BUFFER_UCHAR(port, val, cnt)
  * KeAcquireSpinLock() and KeReleaseSpinLock(), but these are just
  * macros that call KfAcquireSpinLock() and KfReleaseSpinLock().
  * KefAcquireSpinLockAtDpcLevel() and KefReleaseSpinLockFromDpcLevel()
- * perform the lock aquisition/release functions without doing the
+ * perform the lock acquisition/release functions without doing the
  * IRQL manipulation, and are used when one is already running at
  * DISPATCH_LEVEL. Make sense? Good.
  *

Modified: head/sys/compat/ndis/subr_ntoskrnl.c
==
--- head/sys/compat/ndis/subr_ntoskrnl.cSat 

svn commit: r298827 - head/sys/compat/x86bios

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 00:34:04 2016
New Revision: 298827
URL: https://svnweb.freebsd.org/changeset/base/298827

Log:
  x86bios: spelling fix in a comment.
  
  No functional change.

Modified:
  head/sys/compat/x86bios/x86bios.h

Modified: head/sys/compat/x86bios/x86bios.h
==
--- head/sys/compat/x86bios/x86bios.h   Sat Apr 30 00:26:38 2016
(r298826)
+++ head/sys/compat/x86bios/x86bios.h   Sat Apr 30 00:34:04 2016
(r298827)
@@ -27,7 +27,7 @@
  */
 /*
  * x86 registers were borrowed from x86emu.h x86emu_regs.h
- * for compatability.
+ * for compatibility.
  */
 
 #ifndef _X86BIOS_H_
___
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: r298818 - in head/sys: dev/bwi dev/if_ndis dev/iwi dev/malo dev/otus dev/ral dev/rtwn dev/urtwn dev/usb/wlan net80211

2016-04-29 Thread Adrian Chadd
Right


-a


On 29 April 2016 at 15:47, Andriy Voskoboinyk  wrote:
> Sat, 30 Apr 2016 01:38:32 +0300 було написано Adrian Chadd
> :
>
> hi,
>
> probably, IEEE80211_CHAN_BYTES should be uncommented too?
>
>
>> hi,
>>
>> you should likely keep this as a macro:
>>
>> #defineIEEE80211_MODE_MAX  (IEEE80211_MODE_QUARTER+1)
>> +#defineIEEE80211_MODE_BYTES2   /*
>> howmany(IEEE80211_MODE_MAX, NBBY) */
>>
>> .. or as a runtime assert so when we add 11ac modes, we don't forget
>> to bump that. :)
>>
>>
>> -a
___
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: r298826 - in head/sys/boot: arm/at91/bootiic arm/at91/bootspi arm/at91/libat91 efi/boot1 efi/include efi/include/amd64 efi/include/arm efi/include/arm64 efi/include/i386 efi/loader fdt ...

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Apr 30 00:26:38 2016
New Revision: 298826
URL: https://svnweb.freebsd.org/changeset/base/298826

Log:
  sys/boot: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/boot/arm/at91/bootiic/env_vars.c
  head/sys/boot/arm/at91/bootspi/env_vars.c
  head/sys/boot/arm/at91/libat91/at91rm9200.h
  head/sys/boot/arm/at91/libat91/mci_device.h
  head/sys/boot/efi/boot1/boot1.c
  head/sys/boot/efi/include/amd64/efibind.h
  head/sys/boot/efi/include/arm/efibind.h
  head/sys/boot/efi/include/arm64/efibind.h
  head/sys/boot/efi/include/efiuga.h
  head/sys/boot/efi/include/i386/efibind.h
  head/sys/boot/efi/loader/main.c
  head/sys/boot/fdt/fdt_loader_cmd.c
  head/sys/boot/i386/libfirewire/dconsole.c
  head/sys/boot/i386/libfirewire/fwohci.c
  head/sys/boot/i386/libi386/amd64_tramp.S
  head/sys/boot/i386/libi386/pxe.h
  head/sys/boot/i386/zfsboot/zfsboot.c
  head/sys/boot/ofw/common/main.c
  head/sys/boot/pc98/boot0.5/disk.s
  head/sys/boot/pc98/boot0.5/putssjis.s
  head/sys/boot/pc98/boot0.5/support.s
  head/sys/boot/uboot/fdt/uboot_fdt.c

Modified: head/sys/boot/arm/at91/bootiic/env_vars.c
==
--- head/sys/boot/arm/at91/bootiic/env_vars.c   Fri Apr 29 23:55:22 2016
(r298825)
+++ head/sys/boot/arm/at91/bootiic/env_vars.c   Sat Apr 30 00:26:38 2016
(r298826)
@@ -41,7 +41,7 @@ static intcurrentOffset;
 /*
  * .KB_C_FN_DEFINITION_START
  * int ReadCharFromEnvironment(char *)
- *  This private function reads characters from the enviroment variables
+ *  This private function reads characters from the environment variables
  * to service the command prompt during auto-boot or just to setup the
  * default environment.  Returns positive value if valid character was
  * set in the pointer.  Returns negative value to signal input stream

Modified: head/sys/boot/arm/at91/bootspi/env_vars.c
==
--- head/sys/boot/arm/at91/bootspi/env_vars.c   Fri Apr 29 23:55:22 2016
(r298825)
+++ head/sys/boot/arm/at91/bootspi/env_vars.c   Sat Apr 30 00:26:38 2016
(r298826)
@@ -41,7 +41,7 @@ static intcurrentOffset;
 /*
  * .KB_C_FN_DEFINITION_START
  * int ReadCharFromEnvironment(char *)
- *  This private function reads characters from the enviroment variables
+ *  This private function reads characters from the environment variables
  * to service the command prompt during auto-boot or just to setup the
  * default environment.  Returns positive value if valid character was
  * set in the pointer.  Returns negative value to signal input stream

Modified: head/sys/boot/arm/at91/libat91/at91rm9200.h
==
--- head/sys/boot/arm/at91/libat91/at91rm9200.h Fri Apr 29 23:55:22 2016
(r298825)
+++ head/sys/boot/arm/at91/libat91/at91rm9200.h Sat Apr 30 00:26:38 2016
(r298826)
@@ -474,7 +474,7 @@ typedef struct _AT91S_ST {
 #defineAT91C_ST_CRTV (0xFu <<  0) // (ST) Current 
Real-time Value
 
 // 
*
-//  SOFTWARE API DEFINITION  FOR Power Management Controler
+//  SOFTWARE API DEFINITION  FOR Power Management Controller
 // 
*
 typedef struct _AT91S_PMC {
AT91_REG PMC_SCER;  // System Clock Enable Register
@@ -547,7 +547,7 @@ typedef struct _AT91S_PMC {
 //  PMC_IMR : (PMC Offset: 0x6c) PMC Interrupt Mask Register  
 
 // 
*
-//  SOFTWARE API DEFINITION  FOR Clock Generator Controler
+//  SOFTWARE API DEFINITION  FOR Clock Generator Controller
 // 
*
 typedef struct _AT91S_CKGR {
AT91_REG CKGR_MOR;  // Main Oscillator Register
@@ -590,7 +590,7 @@ typedef struct _AT91S_CKGR {
 #defineAT91C_CKGR_USB_PLL(0x1u << 29) // (CKGR) PLL Use
 
 // 
*
-//  SOFTWARE API DEFINITION  FOR Parallel Input Output Controler
+//  SOFTWARE API DEFINITION  FOR Parallel Input Output Controller
 // 
*
 typedef struct _AT91S_PIO {
AT91_REG PIO_PER;   // PIO Enable Register

Modified: head/sys/boot/arm/at91/libat91/mci_device.h
==
--- head/sys/boot/arm/at91/libat91/mci_device.h Fri Apr 29 23:55:22 2016
(r298825)
+++ head/sys/boot/arm/at91/libat91/mci_device.h Sat Apr 30 00:26:38 2016
(r298826)
@@ -106,15 +106,15 @@ typedef struct _AT91S_MciDevice
 

svn commit: r298825 - head/sys/conf

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 23:55:22 2016
New Revision: 298825
URL: https://svnweb.freebsd.org/changeset/base/298825

Log:
  Add PCI_IOV to NOTES.

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Fri Apr 29 23:53:55 2016(r298824)
+++ head/sys/conf/NOTES Fri Apr 29 23:55:22 2016(r298825)
@@ -1411,6 +1411,7 @@ options   MSGBUF_SIZE=40960
 # PCI bus & PCI options:
 #
 device pci
+optionsPCI_IOV # PCI SR-IOV support
 
 
 #
___
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: r298824 - in head/sys: amd64/conf arm/conf conf i386/conf pc98/conf powerpc/conf sparc64/conf

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 23:53:55 2016
New Revision: 298824
URL: https://svnweb.freebsd.org/changeset/base/298824

Log:
  Move 'device pci' for the PCI bus driver to the MI NOTES file.
  
  The PCI bus was already listed in all of the MD NOTES files and the
  driver should at least compile on all platforms.

Modified:
  head/sys/amd64/conf/NOTES
  head/sys/arm/conf/NOTES
  head/sys/conf/NOTES
  head/sys/i386/conf/NOTES
  head/sys/pc98/conf/NOTES
  head/sys/powerpc/conf/NOTES
  head/sys/sparc64/conf/NOTES

Modified: head/sys/amd64/conf/NOTES
==
--- head/sys/amd64/conf/NOTES   Fri Apr 29 23:27:15 2016(r298823)
+++ head/sys/amd64/conf/NOTES   Fri Apr 29 23:53:55 2016(r298824)
@@ -177,11 +177,6 @@ optionsMAXMEM=(128*1024)
 #options   BROKEN_KEYBOARD_RESET
 
 #
-# PCI bus & PCI options:
-#
-device pci
-
-#
 # AGP GART support
 device agp
 

Modified: head/sys/arm/conf/NOTES
==
--- head/sys/arm/conf/NOTES Fri Apr 29 23:27:15 2016(r298823)
+++ head/sys/arm/conf/NOTES Fri Apr 29 23:53:55 2016(r298824)
@@ -36,8 +36,6 @@ options   SOC_MV_DISCOVERY
 optionsSOC_MV_KIRKWOOD
 optionsSOC_MV_ORION
 
-device pci
-
 device at91_board_bwct
 device at91_board_ethernut5
 device at91_board_hl200

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Fri Apr 29 23:27:15 2016(r298823)
+++ head/sys/conf/NOTES Fri Apr 29 23:53:55 2016(r298824)
@@ -1405,6 +1405,15 @@ options  MSGBUF_SIZE=40960
 
 
 #
+# HARDWARE BUS CONFIGURATION
+
+#
+# PCI bus & PCI options:
+#
+device pci
+
+
+#
 # HARDWARE DEVICE CONFIGURATION
 
 # For ISA the required hints are listed.

Modified: head/sys/i386/conf/NOTES
==
--- head/sys/i386/conf/NOTESFri Apr 29 23:27:15 2016(r298823)
+++ head/sys/i386/conf/NOTESFri Apr 29 23:53:55 2016(r298824)
@@ -373,11 +373,6 @@ optionsEISA_SLOTS=12
 device mca
 
 #
-# PCI bus & PCI options:
-#
-device pci
-
-#
 # AGP GART support
 device agp
 

Modified: head/sys/pc98/conf/NOTES
==
--- head/sys/pc98/conf/NOTESFri Apr 29 23:27:15 2016(r298823)
+++ head/sys/pc98/conf/NOTESFri Apr 29 23:53:55 2016(r298824)
@@ -282,11 +282,6 @@ optionsEPSON_BOUNCEDMA
 optionsEPSON_MEMWIN
 
 #
-# PCI bus & PCI options:
-#
-device pci
-
-#
 # AGP GART support
 device agp
 

Modified: head/sys/powerpc/conf/NOTES
==
--- head/sys/powerpc/conf/NOTES Fri Apr 29 23:27:15 2016(r298823)
+++ head/sys/powerpc/conf/NOTES Fri Apr 29 23:53:55 2016(r298824)
@@ -52,7 +52,6 @@ options   SC_OFWFB# OFW frame buffer
 device cpufreq
 
 # Standard busses
-device pci
 device agp
 
 device bm  # Apple BMAC (Big Mac Ethernet)

Modified: head/sys/sparc64/conf/NOTES
==
--- head/sys/sparc64/conf/NOTES Fri Apr 29 23:27:15 2016(r298823)
+++ head/sys/sparc64/conf/NOTES Fri Apr 29 23:53:55 2016(r298824)
@@ -20,7 +20,6 @@ cpu   SUN4U
 
 device ebus
 device isa
-device pci
 device sbus
 device central
 device fhc
___
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: r298823 - in head: gnu/usr.bin gnu/usr.bin/sdiff usr.bin usr.bin/sdiff usr.bin/sdiff/tests

2016-04-29 Thread Baptiste Daroussin
Author: bapt
Date: Fri Apr 29 23:27:15 2016
New Revision: 298823
URL: https://svnweb.freebsd.org/changeset/base/298823

Log:
  import sdiff(1) from GSoC 2012
  
  Import sdiff(1) from the diff version written by Raymond Lai,
  improved during GSoC 2012 by Jesse Hagewood.
  
  Compared to the version done in during that summer of code:
  - Remove the zlib frontend: zsdiff
  - Compatible output (column size and separators) with GNU sdiff
  
  Compared to GNU sdiff in ports:
  - The only difference is padding using spaces vs tabs
  
  Compared to OpenBSD and NetBSD import:
  - Implement missing options (including long options) from GNU sdiff
  - Improved support for the edition mode (signal handling)
  - Output visually compatible with GNU sdiff: size of columns
  
  While here import regression tests from NetBSD adapted to fit the output as
  expected by GNU sdiff
  
  Reviewed by:  emaste (in part)
  Obtained from:OpenBSD, NetBSD, GSoC 2012
  Relnotes: yes
  Differential Revision:https://reviews.freebsd.org/D5981
  Differential Revision:https://reviews.freebsd.org/D6032 (diff with 
NetBSD version)
  Differential Revision:https://reviews.freebsd.org/D6033 (diff with 
OpenBSD version)

Added:
  head/usr.bin/sdiff/
  head/usr.bin/sdiff/Makefile   (contents, props changed)
  head/usr.bin/sdiff/common.c   (contents, props changed)
  head/usr.bin/sdiff/common.h   (contents, props changed)
  head/usr.bin/sdiff/edit.c   (contents, props changed)
  head/usr.bin/sdiff/extern.h   (contents, props changed)
  head/usr.bin/sdiff/sdiff.1   (contents, props changed)
  head/usr.bin/sdiff/sdiff.c   (contents, props changed)
  head/usr.bin/sdiff/tests/
  head/usr.bin/sdiff/tests/Makefile   (contents, props changed)
  head/usr.bin/sdiff/tests/d_dot.in   (contents, props changed)
  head/usr.bin/sdiff/tests/d_flags_l.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_flags_s.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_flags_w.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_a1.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_a2.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_b1.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_b2.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_c1.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_c2.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_d1.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_iflags_d2.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_input1   (contents, props changed)
  head/usr.bin/sdiff/tests/d_input2   (contents, props changed)
  head/usr.bin/sdiff/tests/d_oneline.in   (contents, props changed)
  head/usr.bin/sdiff/tests/d_oneline_a.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_oneline_b.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_same.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_short.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabends.in   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabends_a.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabends_b.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabends_c.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabs.out   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabs1.in   (contents, props changed)
  head/usr.bin/sdiff/tests/d_tabs2.in   (contents, props changed)
  head/usr.bin/sdiff/tests/sdiff.sh   (contents, props changed)
Deleted:
  head/gnu/usr.bin/sdiff/
Modified:
  head/gnu/usr.bin/Makefile
  head/usr.bin/Makefile

Modified: head/gnu/usr.bin/Makefile
==
--- head/gnu/usr.bin/Makefile   Fri Apr 29 22:43:11 2016(r298822)
+++ head/gnu/usr.bin/Makefile   Fri Apr 29 23:27:15 2016(r298823)
@@ -13,7 +13,6 @@ SUBDIR= ${_binutils} \
grep \
${_groff} \
${_rcs} \
-   sdiff \
${_tests}
 
 SUBDIR_DEPEND_gdb= ${_binutils}

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Fri Apr 29 22:43:11 2016(r298822)
+++ head/usr.bin/Makefile   Fri Apr 29 23:27:15 2016(r298823)
@@ -134,6 +134,7 @@ SUBDIR= alias \
rusers \
rwall \
script \
+   sdiff \
sed \
send-pr \
seq \

Added: head/usr.bin/sdiff/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/sdiff/Makefile Fri Apr 29 23:27:15 2016(r298823)
@@ -0,0 +1,16 @@
+# $FreeBSD$
+
+.include 
+
+PROG=  sdiff
+SRCS=  common.c edit.c sdiff.c
+WARNS= 3
+
+LIBADD=util
+MAN1=  sdiff.1
+
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif

svn commit: r298822 - head/sys/dev/wpi

2016-04-29 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Apr 29 22:43:11 2016
New Revision: 298822
URL: https://svnweb.freebsd.org/changeset/base/298822

Log:
  wpi: convert to ieee80211_add_channel() (mostly noop).
  
  Tested with Intel 3945BG, STA / HOSTAP modes.

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==
--- head/sys/dev/wpi/if_wpi.c   Fri Apr 29 22:42:59 2016(r298821)
+++ head/sys/dev/wpi/if_wpi.c   Fri Apr 29 22:43:11 2016(r298822)
@@ -1412,9 +1412,18 @@ wpi_read_eeprom_band(struct wpi_softc *s
 {
struct wpi_eeprom_chan *channels = sc->eeprom_channels[n];
const struct wpi_chan_band *band = _bands[n];
-   struct ieee80211_channel *c;
uint32_t nflags;
+   uint8_t bands[IEEE80211_MODE_BYTES];
uint8_t chan, i;
+   int error;
+
+   memset(bands, 0, sizeof(bands));
+
+   if (n == 0) {
+   setbit(bands, IEEE80211_MODE_11B);
+   setbit(bands, IEEE80211_MODE_11G);
+   } else
+   setbit(bands, IEEE80211_MODE_11A);
 
for (i = 0; i < band->nchan; i++) {
if (!(channels[i].flags & WPI_EEPROM_CHAN_VALID)) {
@@ -1424,45 +1433,19 @@ wpi_read_eeprom_band(struct wpi_softc *s
continue;
}
 
-   if (*nchans >= maxchans)
-   break;
-
chan = band->chan[i];
nflags = wpi_eeprom_channel_flags([i]);
-
-   c = [(*nchans)++];
-   c->ic_ieee = chan;
-   c->ic_maxregpower = channels[i].maxpwr;
-   c->ic_maxpower = 2*c->ic_maxregpower;
-
-   if (n == 0) {   /* 2GHz band */
-   c->ic_freq = ieee80211_ieee2mhz(chan,
-   IEEE80211_CHAN_G);
-
-   /* G =>'s B is supported */
-   c->ic_flags = IEEE80211_CHAN_B | nflags;
-
-   if (*nchans >= maxchans)
-   break;
-
-   c = [(*nchans)++];
-   c[0] = c[-1];
-   c->ic_flags = IEEE80211_CHAN_G | nflags;
-   } else {/* 5GHz band */
-   c->ic_freq = ieee80211_ieee2mhz(chan,
-   IEEE80211_CHAN_A);
-
-   c->ic_flags = IEEE80211_CHAN_A | nflags;
-   }
+   error = ieee80211_add_channel(chans, maxchans, nchans,
+   chan, 0, channels[i].maxpwr, nflags, bands);
+   if (error != 0)
+   break;
 
/* Save maximum allowed TX power for this channel. */
sc->maxpwr[chan] = channels[i].maxpwr;
 
DPRINTF(sc, WPI_DEBUG_EEPROM,
-   "adding chan %d (%dMHz) flags=0x%x maxpwr=%d passive=%d,"
-   " offset %d\n", chan, c->ic_freq,
-   channels[i].flags, sc->maxpwr[chan],
-   IEEE80211_IS_CHAN_PASSIVE(c), *nchans);
+   "adding chan %d flags=0x%x maxpwr=%d, offset %d\n",
+   chan, channels[i].flags, sc->maxpwr[chan], *nchans);
}
 }
 
___
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: r298821 - in head/sys/boot: fdt uboot/fdt

2016-04-29 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Apr 29 22:42:59 2016
New Revision: 298821
URL: https://svnweb.freebsd.org/changeset/base/298821

Log:
  Add FDT overlays support to ubldr
  
  FDT overlays is de-facto standard for describing expansion boards like
  Beaglebone capes or Raspberry Pi shields. The ides is to have basic
  DTB for base board and overlays DTB for shields/capes and to construct
  final DTB either using human-readable configuration or some
  self-discovery mechanism. I believe this approach can also be expanded
  to support dynamically loadable FPGA bitstreams on systems like
  Zedboard/Zybo.
  
  Overlaying process is simmilar to executable link process for
  binaries: each DTB has "exported" symbols and "undefined" symbols, the
  latter are resolved using information for the former obtained from
  base DTB or one of the overlays applied earlier (more rare case).
  
  This symbols information is not generated by standard dtc that FreeBSD
  has in base system, patched[1] version required to produces
  overlay-compatible blobs. So although DTB files generated by
  buildkernel do not support overlays there are enough
  vendor/community-provided DTB blobs ciruclating around to justify
  committing this change to ubldr.
  
  This commit introduces handler for "fdt_overlays" variable that can be
  defined either as a loader env variable or U-Boot env variable.
  fdt_overlays is comma-separated list of .dtbo files located in
  /boot/dtb/ directory along with base .dtb. ubldr loads files and
  applies them one-by-one to base .dtb and then passes result blob to
  the kernel.
  
  [1] 
https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15a6103efb
  
  Differential Revision:https://reviews.freebsd.org/D3180

Added:
  head/sys/boot/fdt/fdt_overlay.c   (contents, props changed)
  head/sys/boot/fdt/fdt_overlay.h   (contents, props changed)
Modified:
  head/sys/boot/fdt/Makefile
  head/sys/boot/fdt/fdt_loader_cmd.c
  head/sys/boot/fdt/fdt_platform.h
  head/sys/boot/uboot/fdt/uboot_fdt.c

Modified: head/sys/boot/fdt/Makefile
==
--- head/sys/boot/fdt/Makefile  Fri Apr 29 22:29:33 2016(r298820)
+++ head/sys/boot/fdt/Makefile  Fri Apr 29 22:42:59 2016(r298821)
@@ -10,7 +10,7 @@ SRCS+=fdt.c fdt_ro.c fdt_wip.c fdt_sw.
fdt_empty_tree.c
 
 # Loader's fdt commands extension sources.
-SRCS+= fdt_loader_cmd.c
+SRCS+= fdt_loader_cmd.c fdt_overlay.c
 
 CFLAGS+=   -I${.CURDIR}/../../contrib/libfdt/ -I${.CURDIR}/../common/
 

Modified: head/sys/boot/fdt/fdt_loader_cmd.c
==
--- head/sys/boot/fdt/fdt_loader_cmd.c  Fri Apr 29 22:29:33 2016
(r298820)
+++ head/sys/boot/fdt/fdt_loader_cmd.c  Fri Apr 29 22:42:59 2016
(r298821)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 
 #include "bootstrap.h"
 #include "fdt_platform.h"
+#include "fdt_overlay.h"
 
 #ifdef DEBUG
 #define debugf(fmt, args...) do { printf("%s(): ", __func__);  \
@@ -276,6 +277,128 @@ fdt_load_dtb_file(const char * filename)
return (0);
 }
 
+static int
+fdt_load_dtb_overlay(const char * filename)
+{
+   struct preloaded_file *bfp, *oldbfp;
+   struct fdt_header header;
+   int err;
+
+   debugf("fdt_load_dtb_overlay(%s)\n", filename);
+
+   oldbfp = file_findfile(filename, "dtbo");
+
+   /* Attempt to load and validate a new dtb from a file. */
+   if ((bfp = file_loadraw(filename, "dtbo", 1)) == NULL) {
+   printf("failed to load file '%s'\n", filename);
+   return (1);
+   }
+
+   COPYOUT(bfp->f_addr, , sizeof(header));
+   err = fdt_check_header();
+
+   if (err < 0) {
+   file_discard(bfp);
+   if (err == -FDT_ERR_BADVERSION)
+   printf("incompatible blob version: %d, should be: %d\n",
+   fdt_version(fdtp), FDT_LAST_SUPPORTED_VERSION);
+
+   else
+   printf("error validating blob: %s\n",
+   fdt_strerror(err));
+   return (1);
+   }
+
+   /* A new dtb was validated, discard any previous file. */
+   if (oldbfp)
+   file_discard(oldbfp);
+
+   return (0);
+}
+
+int
+fdt_load_dtb_overlays(const char * filenames)
+{
+   char *names;
+   char *name;
+   char *comaptr;
+
+   debugf("fdt_load_dtb_overlay(%s)\n", filenames);
+
+   names = strdup(filenames);
+   if (names == NULL)
+   return (1);
+   name = names;
+   do {
+   comaptr = strchr(name, ',');
+   if (comaptr)
+   *comaptr = '\0';
+   fdt_load_dtb_overlay(name);
+   name = comaptr + 1;
+   } while(comaptr);
+
+   free(names);
+   return (0);
+}
+
+void
+fdt_apply_overlays()
+{
+   struct 

Re: svn commit: r298818 - in head/sys: dev/bwi dev/if_ndis dev/iwi dev/malo dev/otus dev/ral dev/rtwn dev/urtwn dev/usb/wlan net80211

2016-04-29 Thread Adrian Chadd
hi,

you should likely keep this as a macro:

#defineIEEE80211_MODE_MAX  (IEEE80211_MODE_QUARTER+1)
+#defineIEEE80211_MODE_BYTES2   /*
howmany(IEEE80211_MODE_MAX, NBBY) */

.. or as a runtime assert so when we add 11ac modes, we don't forget
to bump that. :)


-a
___
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: r298820 - in head/sys: arm/conf powerpc/conf

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 22:29:33 2016
New Revision: 298820
URL: https://svnweb.freebsd.org/changeset/base/298820

Log:
  Remove vestiges of IEEE-488/GPIB drivers removed in r276214.

Modified:
  head/sys/arm/conf/NOTES
  head/sys/powerpc/conf/NOTES

Modified: head/sys/arm/conf/NOTES
==
--- head/sys/arm/conf/NOTES Fri Apr 29 22:15:33 2016(r298819)
+++ head/sys/arm/conf/NOTES Fri Apr 29 22:29:33 2016(r298820)
@@ -82,9 +82,7 @@ nodevice  star_saver
 nodevice   warp_saver
 
 nodevice   cxgbe
-nodevice   pcii
 nodevice   snd_cmi
-nodevice   tnt4882
 
 #
 # Enable the kernel DTrace hooks which are required to load the DTrace

Modified: head/sys/powerpc/conf/NOTES
==
--- head/sys/powerpc/conf/NOTES Fri Apr 29 22:15:33 2016(r298819)
+++ head/sys/powerpc/conf/NOTES Fri Apr 29 22:29:33 2016(r298820)
@@ -96,9 +96,6 @@ nodevice  warp_saver
 nodevice   daemon_saver
 nodevice   star_saver
 nodevice   snake_saver
-# isa
-nodevice   pcii
-nodevice   tnt4882
 # sound
 nodevice   snd_cmi
 # wants gdb_cur
___
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: r298819 - head/sys/kern

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 22:15:33 2016
New Revision: 298819
URL: https://svnweb.freebsd.org/changeset/base/298819

Log:
  sys/kern: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/kern/bus_if.m
  head/sys/kern/imgact_binmisc.c
  head/sys/kern/inflate.c
  head/sys/kern/kern_condvar.c
  head/sys/kern/kern_descrip.c
  head/sys/kern/kern_exec.c
  head/sys/kern/kern_fork.c
  head/sys/kern/kern_jail.c
  head/sys/kern/kern_linker.c
  head/sys/kern/kern_lock.c
  head/sys/kern/kern_lockf.c
  head/sys/kern/kern_mbuf.c
  head/sys/kern/kern_mtxpool.c
  head/sys/kern/kern_prot.c
  head/sys/kern/kern_rctl.c
  head/sys/kern/kern_rmlock.c
  head/sys/kern/kern_sysctl.c
  head/sys/kern/kern_tc.c
  head/sys/kern/kern_timeout.c
  head/sys/kern/link_elf_obj.c
  head/sys/kern/linker_if.m
  head/sys/kern/sched_4bsd.c
  head/sys/kern/subr_blist.c
  head/sys/kern/subr_bus.c
  head/sys/kern/subr_devstat.c
  head/sys/kern/subr_intr.c
  head/sys/kern/subr_mbpool.c
  head/sys/kern/subr_mchain.c
  head/sys/kern/subr_msgbuf.c
  head/sys/kern/subr_prof.c
  head/sys/kern/subr_scanf.c
  head/sys/kern/subr_uio.c
  head/sys/kern/subr_witness.c
  head/sys/kern/sysv_sem.c
  head/sys/kern/tty.c
  head/sys/kern/tty_pts.c
  head/sys/kern/uipc_mbuf2.c
  head/sys/kern/uipc_socket.c
  head/sys/kern/vfs_cache.c
  head/sys/kern/vfs_cluster.c
  head/sys/kern/vfs_lookup.c
  head/sys/kern/vfs_mountroot.c
  head/sys/kern/vfs_subr.c
  head/sys/kern/vnode_if.src

Modified: head/sys/kern/bus_if.m
==
--- head/sys/kern/bus_if.m  Fri Apr 29 22:14:11 2016(r298818)
+++ head/sys/kern/bus_if.m  Fri Apr 29 22:15:33 2016(r298819)
@@ -121,7 +121,7 @@ METHOD void probe_nomatch {
  * @param _child   the child device whose instance variable is
  * being read
  * @param _index   the instance variable to read
- * @param _result  a loction to recieve the instance variable
+ * @param _result  a location to receive the instance variable
  * value
  * 
  * @retval 0   success
@@ -389,7 +389,7 @@ METHOD int release_resource {
  * triggers
  * @param _arg a value to use as the single argument in calls
  * to @p _intr
- * @param _cookiep a pointer to a location to recieve a cookie
+ * @param _cookiep a pointer to a location to receive a cookie
  * value that may be used to remove the interrupt
  * handler
  */
@@ -460,9 +460,9 @@ METHOD int set_resource {
  * @param _child   the device which owns the resource
  * @param _typethe type of resource
  * @param _rid the resource identifier
- * @param _start   the address of a location to recieve the start
+ * @param _start   the address of a location to receive the start
  * index of the resource range
- * @param _count   the address of a location to recieve the size
+ * @param _count   the address of a location to receive the size
  * of the resource range
  */
 METHOD int get_resource {

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Fri Apr 29 22:14:11 2016
(r298818)
+++ head/sys/kern/imgact_binmisc.c  Fri Apr 29 22:15:33 2016
(r298819)
@@ -700,7 +700,7 @@ imgact_binmisc_exec(struct image_params 
break;
 
case ' ':
-   /* Replace space with NUL to seperate arguments. */
+   /* Replace space with NUL to separate arguments. */
*d++ = '\0';
break;
 

Modified: head/sys/kern/inflate.c
==
--- head/sys/kern/inflate.c Fri Apr 29 22:14:11 2016(r298818)
+++ head/sys/kern/inflate.c Fri Apr 29 22:15:33 2016(r298819)
@@ -206,7 +206,7 @@ extern void kzipfree (void*);
   end-of-block.  Note however that the static length tree defines
   288 codes just to fill out the Huffman codes.  Codes 286 and 287
   cannot be used though, since there is no length base or extra bits
-  defined for them.  Similarily, there are up to 30 distance codes.
+  defined for them.  Similarly, there are up to 30 distance codes.
   However, static trees define 32 codes (all 5 bits) to fill out the
   Huffman codes, but the last two had better not show up in the data.
7. Unzip can check dynamic Huffman blocks for complete code sets.
@@ -335,7 +335,7 @@ static const ush mask[] = {
where NEEDBITS makes sure that b has at least j bits in it, and
DUMPBITS removes the bits from b.  The macros use the variable k
for the number of bits in b.  Normally, b and k are register
-   variables for speed, and are 

svn commit: r298818 - in head/sys: dev/bwi dev/if_ndis dev/iwi dev/malo dev/otus dev/ral dev/rtwn dev/urtwn dev/usb/wlan net80211

2016-04-29 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Apr 29 22:14:11 2016
New Revision: 298818
URL: https://svnweb.freebsd.org/changeset/base/298818

Log:
  net80211 + drivers: hide size of 'bands' array behind a macro.
  
  Auto-replace 'howmany(IEEE80211_MODE_MAX, 8)' with 'IEEE80211_MODE_BYTES'.
  No functional changes.

Modified:
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/malo/if_malo.c
  head/sys/dev/otus/if_otus.c
  head/sys/dev/ral/rt2560.c
  head/sys/dev/ral/rt2661.c
  head/sys/dev/ral/rt2860.c
  head/sys/dev/rtwn/if_rtwn.c
  head/sys/dev/urtwn/if_urtwn.c
  head/sys/dev/usb/wlan/if_rsu.c
  head/sys/dev/usb/wlan/if_rum.c
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_uath.c
  head/sys/dev/usb/wlan/if_upgt.c
  head/sys/dev/usb/wlan/if_ural.c
  head/sys/dev/usb/wlan/if_urtw.c
  head/sys/dev/usb/wlan/if_zyd.c
  head/sys/net80211/_ieee80211.h

Modified: head/sys/dev/bwi/if_bwi.c
==
--- head/sys/dev/bwi/if_bwi.c   Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/bwi/if_bwi.c   Fri Apr 29 22:14:11 2016(r298818)
@@ -356,7 +356,7 @@ bwi_attach(struct bwi_softc *sc)
device_t dev = sc->sc_dev;
struct bwi_mac *mac;
struct bwi_phy *phy;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t bands[IEEE80211_MODE_BYTES];
int i, error;
 
BWI_LOCK_INIT(sc);

Modified: head/sys/dev/if_ndis/if_ndis.c
==
--- head/sys/dev/if_ndis/if_ndis.c  Fri Apr 29 21:54:28 2016
(r298817)
+++ head/sys/dev/if_ndis/if_ndis.c  Fri Apr 29 22:14:11 2016
(r298818)
@@ -725,7 +725,7 @@ ndis_80211attach(struct ndis_softc *sc)
struct ndis_80211_nettype_list *ntl;
uint32_targ;
int mode, i, r, len, nonettypes = 1;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)] = { 0 };
+   uint8_t bands[IEEE80211_MODE_BYTES] = { 0 };
 
callout_init(>ndis_scan_callout, 1);
 

Modified: head/sys/dev/iwi/if_iwi.c
==
--- head/sys/dev/iwi/if_iwi.c   Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/iwi/if_iwi.c   Fri Apr 29 22:14:11 2016(r298818)
@@ -271,7 +271,7 @@ iwi_attach(device_t dev)
struct iwi_softc *sc = device_get_softc(dev);
struct ieee80211com *ic = >sc_ic;
uint16_t val;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t bands[IEEE80211_MODE_BYTES];
int i, error;
 
sc->sc_dev = dev;

Modified: head/sys/dev/malo/if_malo.c
==
--- head/sys/dev/malo/if_malo.c Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/malo/if_malo.c Fri Apr 29 22:14:11 2016(r298818)
@@ -174,7 +174,7 @@ malo_attach(uint16_t devid, struct malo_
struct ieee80211com *ic = >malo_ic;
struct malo_hal *mh;
int error;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t bands[IEEE80211_MODE_BYTES];
 
MALO_LOCK_INIT(sc);
callout_init_mtx(>malo_watchdog_timer, >malo_mtx, 0);

Modified: head/sys/dev/otus/if_otus.c
==
--- head/sys/dev/otus/if_otus.c Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/otus/if_otus.c Fri Apr 29 22:14:11 2016(r298818)
@@ -624,7 +624,7 @@ otus_attachhook(struct otus_softc *sc)
struct ieee80211com *ic = >sc_ic;
usb_device_request_t req;
uint32_t in, out;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t bands[IEEE80211_MODE_BYTES];
int error;
 
/* Not locked */

Modified: head/sys/dev/ral/rt2560.c
==
--- head/sys/dev/ral/rt2560.c   Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/ral/rt2560.c   Fri Apr 29 22:14:11 2016(r298818)
@@ -199,7 +199,7 @@ rt2560_attach(device_t dev, int id)
 {
struct rt2560_softc *sc = device_get_softc(dev);
struct ieee80211com *ic = >sc_ic;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t bands[IEEE80211_MODE_BYTES];
int error;
 
sc->sc_dev = dev;

Modified: head/sys/dev/ral/rt2661.c
==
--- head/sys/dev/ral/rt2661.c   Fri Apr 29 21:54:28 2016(r298817)
+++ head/sys/dev/ral/rt2661.c   Fri Apr 29 22:14:11 2016(r298818)
@@ -199,7 +199,7 @@ rt2661_attach(device_t dev, int id)
struct rt2661_softc *sc = device_get_softc(dev);
struct ieee80211com *ic = >sc_ic;
uint32_t val;
-   uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)];
+   uint8_t 

svn commit: r298817 - head/sys/kern

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 21:54:28 2016
New Revision: 298817
URL: https://svnweb.freebsd.org/changeset/base/298817

Log:
  sys/kern: spelling fixes.
  
  Mostly on comments but affects some debug messages.
  
  MFC after: 2 weeks

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/kern/vfs_vnops.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Fri Apr 29 21:46:43 2016(r298816)
+++ head/sys/kern/vfs_bio.c Fri Apr 29 21:54:28 2016(r298817)
@@ -224,7 +224,7 @@ SYSCTL_INT(_vfs, OID_AUTO, getnewbufcall
"Number of calls to getnewbuf");
 static int getnewbufrestarts;
 SYSCTL_INT(_vfs, OID_AUTO, getnewbufrestarts, CTLFLAG_RW, , 
0,
-"Number of times getnewbuf has had to restart a buffer aquisition");
+"Number of times getnewbuf has had to restart a buffer acquisition");
 static int mappingrestarts;
 SYSCTL_INT(_vfs, OID_AUTO, mappingrestarts, CTLFLAG_RW, , 0,
 "Number of times getblk has had to restart a buffer mapping for "
@@ -975,7 +975,7 @@ kern_vfs_bio_buffer_alloc(caddr_t v, lon
else
bio_transient_maxcnt = biotmap_sz / MAXPHYS;
/*
-* Artifically limit to 1024 simultaneous in-flight I/Os
+* Artificially limit to 1024 simultaneous in-flight I/Os
 * using the transient mapping.
 */
if (bio_transient_maxcnt > 1024)
@@ -1084,7 +1084,7 @@ bufinit(void)
maxbufmallocspace = hibufspace / 20;
 
/*
-* Reduce the chance of a deadlock occuring by limiting the number
+* Reduce the chance of a deadlock occurring by limiting the number
 * of delayed-write dirty buffers we allow to stack up.
 */
hidirtybuffers = nbuf / 4 + 20;
@@ -3470,7 +3470,7 @@ has_addr:
  * to clear B_INVAL.  If the caller does this without issuing an I/O, 
  * the caller should set B_CACHE ( as an optimization ), else the caller
  * should issue the I/O and biodone() will set B_CACHE if the I/O was
- * a write attempt or if it was a successfull read.  If the caller 
+ * a write attempt or if it was a successful read.  If the caller 
  * intends to issue a READ, the caller must clear B_INVAL and BIO_ERROR
  * prior to issuing the READ.  biodone() will *not* clear B_INVAL.
  */
@@ -3582,7 +3582,7 @@ loop:
bp_unmapped_get_kva(bp, blkno, size, flags);
 
/*
-* If the size is inconsistant in the VMIO case, we can resize
+* If the size is inconsistent in the VMIO case, we can resize
 * the buffer.  This might lead to B_CACHE getting set or
 * cleared.  If the size has not changed, B_CACHE remains
 * unchanged from its previous state.
@@ -3844,7 +3844,7 @@ vfs_nonvmio_extend(struct buf *bp, int n
  * resize a buffer up or down.
  *
  * Note that this code is tricky, and has many complications to resolve
- * deadlock or inconsistant data situations.  Tread lightly!!! 
+ * deadlock or inconsistent data situations.  Tread lightly!!! 
  * There are B_CACHE and B_DELWRI interactions that must be dealt with by 
  * the caller.  Calling this code willy nilly can result in the loss of data.
  *
@@ -4004,11 +4004,11 @@ bufwait(struct buf *bp)
  * assuming B_INVAL is clear.
  *
  * For the VMIO case, we set B_CACHE if the op was a read and no
- * read error occured, or if the op was a write.  B_CACHE is never
+ * read error occurred, or if the op was a write.  B_CACHE is never
  * set if the buffer is invalid or otherwise uncacheable.
  *
  * biodone does not mess with B_INVAL, allowing the I/O routine or the
- * initiator to leave B_INVAL set to brelse the buffer out of existance
+ * initiator to leave B_INVAL set to brelse the buffer out of existence
  * in the biodone routine.
  */
 void
@@ -4053,7 +4053,7 @@ bufdone_finish(struct buf *bp)
if (bp->b_flags & B_VMIO) {
/*
 * Set B_CACHE if the op was a normal read and no error
-* occured.  B_CACHE is set for writes in the b*write()
+* occurred.  B_CACHE is set for writes in the b*write()
 * routines.
 */
if (bp->b_iocmd == BIO_READ &&
@@ -4081,7 +4081,7 @@ bufdone_finish(struct buf *bp)
 /*
  * This routine is called in lieu of iodone in the case of
  * incomplete I/O.  This keeps the busy status for pages
- * consistant.
+ * consistent.
  */
 void
 vfs_unbusy_pages(struct buf *bp)
@@ -4160,7 +4160,7 @@ vfs_page_set_validclean(struct buf *bp, 
 
/*
 * Start and end offsets in buffer.  eoff - soff may not cross a
-* page boundry or cross the end of the buffer.  The end of the
+* page boundary or cross the end of the buffer.  The end of the
 * buffer, in this case, is 

svn commit: r298816 - head/sys/dev/dwc

2016-04-29 Thread Jared McNeill
Author: jmcneill
Date: Fri Apr 29 21:46:43 2016
New Revision: 298816
URL: https://svnweb.freebsd.org/changeset/base/298816

Log:
  Set txbuf_map array size to TX_DESC_COUNT instead of RX_DESC_COUNT.

Modified:
  head/sys/dev/dwc/if_dwcvar.h

Modified: head/sys/dev/dwc/if_dwcvar.h
==
--- head/sys/dev/dwc/if_dwcvar.hFri Apr 29 21:38:36 2016
(r298815)
+++ head/sys/dev/dwc/if_dwcvar.hFri Apr 29 21:46:43 2016
(r298816)
@@ -90,7 +90,7 @@ struct dwc_softc {
struct dwc_hwdesc   *txdesc_ring;
bus_addr_t  txdesc_ring_paddr;
bus_dma_tag_t   txbuf_tag;
-   struct dwc_bufmap   txbuf_map[RX_DESC_COUNT];
+   struct dwc_bufmap   txbuf_map[TX_DESC_COUNT];
uint32_ttx_idx_head;
uint32_ttx_idx_tail;
int txcount;
___
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: r298815 - head/sys/dev/wpi

2016-04-29 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Apr 29 21:38:36 2016
New Revision: 298815
URL: https://svnweb.freebsd.org/changeset/base/298815

Log:
  wpi: remove unused variable.

Modified:
  head/sys/dev/wpi/if_wpi.c

Modified: head/sys/dev/wpi/if_wpi.c
==
--- head/sys/dev/wpi/if_wpi.c   Fri Apr 29 21:29:37 2016(r298814)
+++ head/sys/dev/wpi/if_wpi.c   Fri Apr 29 21:38:36 2016(r298815)
@@ -2074,7 +2074,6 @@ wpi_tx_done(struct wpi_softc *sc, struct
struct mbuf *m;
struct ieee80211_node *ni;
struct ieee80211vap *vap;
-   struct ieee80211com *ic;
uint32_t status = le32toh(stat->status);
int ackfailcnt = stat->ackfailcnt / WPI_NTRIES_DEFAULT;
 
@@ -2094,7 +2093,6 @@ wpi_tx_done(struct wpi_softc *sc, struct
m = data->m, data->m = NULL;
ni = data->ni, data->ni = NULL;
vap = ni->ni_vap;
-   ic = vap->iv_ic;
 
/*
 * Update rate control statistics for the node.
___
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: r298814 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-04-29 Thread Alan Somers
Author: asomers
Date: Fri Apr 29 21:29:37 2016
New Revision: 298814
URL: https://svnweb.freebsd.org/changeset/base/298814

Log:
  Fix a use-after-free when "zpool import" fails
  
  clear vd->vdev_tsd in vdev_geom_close_locked instead of vdev_geom_detach.
  In the latter function, it would fail to happen in certain circumstances
  where cp->private was unset.  Ideally, the latter should never happen, but
  it can happen when vdev open fails, or where spares are involved.
  
  MFC after:4 weeks
  X-MFC-With:   298786
  Sponsored by: Spectra Logic Corp

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 
29 21:25:05 2016(r298813)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 
29 21:29:37 2016(r298814)
@@ -276,10 +276,6 @@ vdev_geom_detach(struct g_consumer *cp, 
cp->provider && cp->provider->name ? cp->provider->name : "NULL");
 
vd = cp->private;
-   if (vd != NULL) {
-   vd->vdev_tsd = NULL;
-   vd->vdev_delayed_close = B_FALSE;
-   }
cp->private = NULL;
 
gp = cp->geom;
@@ -311,6 +307,8 @@ vdev_geom_close_locked(vdev_t *vd)
g_topology_assert();
 
cp = vd->vdev_tsd;
+   vd->vdev_tsd = NULL;
+   vd->vdev_delayed_close = B_FALSE;
if (cp == NULL)
return;
 
___
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: r298813 - in head/sys/netgraph: . atm bluetooth/drivers/ubt bluetooth/hci bluetooth/include bluetooth/l2cap bluetooth/socket netflow

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 21:25:05 2016
New Revision: 298813
URL: https://svnweb.freebsd.org/changeset/base/298813

Log:
  sys/netgraph: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/netgraph/atm/ng_atm.c
  head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
  head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
  head/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
  head/sys/netgraph/bluetooth/include/ng_hci.h
  head/sys/netgraph/bluetooth/include/ng_l2cap.h
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
  head/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
  head/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
  head/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
  head/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
  head/sys/netgraph/netflow/ng_netflow.c
  head/sys/netgraph/netflow/ng_netflow.h
  head/sys/netgraph/netgraph.h
  head/sys/netgraph/ng_base.c
  head/sys/netgraph/ng_bridge.c
  head/sys/netgraph/ng_car.c
  head/sys/netgraph/ng_car.h
  head/sys/netgraph/ng_etf.c
  head/sys/netgraph/ng_ether.c
  head/sys/netgraph/ng_frame_relay.c
  head/sys/netgraph/ng_gif.c
  head/sys/netgraph/ng_gif_demux.c
  head/sys/netgraph/ng_ksocket.c
  head/sys/netgraph/ng_l2tp.h
  head/sys/netgraph/ng_lmi.c
  head/sys/netgraph/ng_one2many.c
  head/sys/netgraph/ng_ppp.c
  head/sys/netgraph/ng_pppoe.c
  head/sys/netgraph/ng_pptpgre.c
  head/sys/netgraph/ng_sample.c
  head/sys/netgraph/ng_source.c
  head/sys/netgraph/ng_split.h
  head/sys/netgraph/ng_tee.c
  head/sys/netgraph/ng_tty.c
  head/sys/netgraph/ng_vjc.c
  head/sys/netgraph/ng_vlan.c

Modified: head/sys/netgraph/atm/ng_atm.c
==
--- head/sys/netgraph/atm/ng_atm.c  Fri Apr 29 21:18:14 2016
(r298812)
+++ head/sys/netgraph/atm/ng_atm.c  Fri Apr 29 21:25:05 2016
(r298813)
@@ -1343,7 +1343,7 @@ ng_atm_shutdown(node_p node)
}
 #else
/*
-* We are persistant - reinitialize
+* We are persistent - reinitialize.
 */
NG_NODE_REVIVE(node);
 #endif

Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
==
--- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.cFri Apr 29 21:18:14 
2016(r298812)
+++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.cFri Apr 29 21:25:05 
2016(r298813)
@@ -58,7 +58,7 @@
  * 2) Netgraph context. This is where all the Netgraph related stuff happens.
  *Since we mark node as WRITER, the Netgraph node will be "locked" (from
  *Netgraph point of view). Any variable that is only modified from the
- *Netgraph context does not require any additonal locking. It is generally
+ *Netgraph context does not require any additional locking. It is generally
  **NOT* allowed to grab *ANY* additional locks. Whatever you do, *DO NOT*
  *grab any lock in the Netgraph context that could cause de-scheduling of
  *the Netgraph thread for significant amount of time. In fact, the only
@@ -1463,7 +1463,7 @@ ng_ubt_shutdown(node_p node)
if (node->nd_flags & NGF_REALLY_DIE) {
/*
  * We came here because the USB device is being
-* detached, so stop being persistant.
+* detached, so stop being persistent.
  */
NG_NODE_SET_PRIVATE(node, NULL);
NG_NODE_UNREF(node);

Modified: head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
==
--- head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c   Fri Apr 29 21:18:14 
2016(r298812)
+++ head/sys/netgraph/bluetooth/hci/ng_hci_cmds.c   Fri Apr 29 21:25:05 
2016(r298813)
@@ -369,7 +369,7 @@ complete_command(ng_hci_unit_p unit, int
 * and return command parameters. ng_hci_command_untimeout will
 * drop NG_HCI_UNIT_COMMAND_PENDING flag.
 * Note: if ng_hci_command_untimeout() fails (returns non-zero)
-* then timeout aready happened and timeout message went info node
+* then timeout already happened and timeout message went info node
 * queue. In this case we ignore command completion and pretend
 * there is a timeout.
 */

Modified: head/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
==
--- head/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.hFri Apr 29 
21:18:14 2016(r298812)
+++ head/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.hFri Apr 29 
21:25:05 2016(r298813)
@@ -69,7 +69,7 @@
 #define RFCOMM_MODEM_FC0x02 /* Flow Control asserted */
 #define RFCOMM_MODEM_RTC   0x04 /* Ready To Communicate */
 #define RFCOMM_MODEM_RTR   0x08 /* Ready To Receive */
-#define 

svn commit: r298812 - head/sys/net80211

2016-04-29 Thread Andriy Voskoboinyk
Author: avos
Date: Fri Apr 29 21:18:14 2016
New Revision: 298812
URL: https://svnweb.freebsd.org/changeset/base/298812

Log:
  net80211: provide a set of ieee80211_add_channel*() functions
  
  This change adds few methods for net80211 channel table setup:
  
  - ieee80211_add_channel()
  - ieee80211_add_channel_ht40()
  (primarily for drivers, that parse EEPROM to get channel list -
  they will allow to hide implementation details).
  
  - ieee80211_add_channel_list_2ghz()
  - ieee80211_add_channel_list_5ghz()
  (mostly as a replacement for ieee80211_init_channels() - they will allow
  to specify non-default channel list; may be used in ic_getradiocaps()).
  
  Tested with wpi(4) (add_channel) and rum(4) (add_channel_list_2ghz).
  
  Reviewed by:  adrian
  Differential Revision:https://reviews.freebsd.org/D6124

Modified:
  head/sys/net80211/ieee80211.c
  head/sys/net80211/ieee80211_regdomain.c
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211.c
==
--- head/sys/net80211/ieee80211.c   Fri Apr 29 21:11:31 2016
(r298811)
+++ head/sys/net80211/ieee80211.c   Fri Apr 29 21:18:14 2016
(r298812)
@@ -970,6 +970,261 @@ ieee80211_ieee2mhz(u_int chan, u_int fla
}
 }
 
+static __inline void
+set_extchan(struct ieee80211_channel *c)
+{
+
+   /*
+* IEEE Std 802.11-2012, page 1738, subclause 20.3.15.4:
+* "the secondary channel number shall be 'N + [1,-1] * 4'
+*/
+   if (c->ic_flags & IEEE80211_CHAN_HT40U)
+   c->ic_extieee = c->ic_ieee + 4;
+   else if (c->ic_flags & IEEE80211_CHAN_HT40D)
+   c->ic_extieee = c->ic_ieee - 4;
+   else
+   c->ic_extieee = 0;
+}
+
+static int
+addchan(struct ieee80211_channel chans[], int maxchans, int *nchans,
+uint8_t ieee, uint16_t freq, int8_t maxregpower, uint32_t flags)
+{
+   struct ieee80211_channel *c;
+
+   if (*nchans >= maxchans)
+   return (ENOBUFS);
+
+   c = [(*nchans)++];
+   c->ic_ieee = ieee;
+   c->ic_freq = freq != 0 ? freq : ieee80211_ieee2mhz(ieee, flags);
+   c->ic_maxregpower = maxregpower;
+   c->ic_maxpower = 2 * maxregpower;
+   c->ic_flags = flags;
+   set_extchan(c);
+
+   return (0);
+}
+
+static int
+copychan_prev(struct ieee80211_channel chans[], int maxchans, int *nchans,
+uint32_t flags)
+{
+   struct ieee80211_channel *c;
+
+   KASSERT(*nchans > 0, ("channel list is empty\n"));
+
+   if (*nchans >= maxchans)
+   return (ENOBUFS);
+
+   c = [(*nchans)++];
+   c[0] = c[-1];
+   c->ic_flags = flags;
+   set_extchan(c);
+
+   return (0);
+}
+
+static void
+getflags_2ghz(const uint8_t bands[], uint32_t flags[], int ht40)
+{
+   int nmodes;
+
+   nmodes = 0;
+   if (isset(bands, IEEE80211_MODE_11B))
+   flags[nmodes++] = IEEE80211_CHAN_B;
+   if (isset(bands, IEEE80211_MODE_11G))
+   flags[nmodes++] = IEEE80211_CHAN_G;
+   if (isset(bands, IEEE80211_MODE_11NG))
+   flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT20;
+   if (ht40) {
+   flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40U;
+   flags[nmodes++] = IEEE80211_CHAN_G | IEEE80211_CHAN_HT40D;
+   }
+   flags[nmodes] = 0;
+}
+
+static void
+getflags_5ghz(const uint8_t bands[], uint32_t flags[], int ht40)
+{
+   int nmodes;
+
+   nmodes = 0;
+   if (isset(bands, IEEE80211_MODE_11A))
+   flags[nmodes++] = IEEE80211_CHAN_A;
+   if (isset(bands, IEEE80211_MODE_11NA))
+   flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT20;
+   if (ht40) {
+   flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40U;
+   flags[nmodes++] = IEEE80211_CHAN_A | IEEE80211_CHAN_HT40D;
+   }
+   flags[nmodes] = 0;
+}
+
+static void
+getflags(const uint8_t bands[], uint32_t flags[], int ht40)
+{
+
+   flags[0] = 0;
+   if (isset(bands, IEEE80211_MODE_11A) ||
+   isset(bands, IEEE80211_MODE_11NA)) {
+   if (isset(bands, IEEE80211_MODE_11B) ||
+   isset(bands, IEEE80211_MODE_11G) ||
+   isset(bands, IEEE80211_MODE_11NG))
+   return;
+
+   getflags_5ghz(bands, flags, ht40);
+   } else
+   getflags_2ghz(bands, flags, ht40);
+}
+
+/*
+ * Add one 20 MHz channel into specified channel list.
+ */
+int
+ieee80211_add_channel(struct ieee80211_channel chans[], int maxchans,
+int *nchans, uint8_t ieee, uint16_t freq, int8_t maxregpower,
+uint32_t chan_flags, const uint8_t bands[])
+{
+   uint32_t flags[IEEE80211_MODE_MAX];
+   int i, error;
+
+   getflags(bands, flags, 0);
+   KASSERT(flags[0] != 0, ("%s: no correct mode provided\n", __func__));
+
+   error = addchan(chans, maxchans, nchans, ieee, freq, 

svn commit: r298811 - in head: sys/kern tests/sys/kern

2016-04-29 Thread Alan Somers
Author: asomers
Date: Fri Apr 29 21:11:31 2016
New Revision: 298811
URL: https://svnweb.freebsd.org/changeset/base/298811

Log:
  Automate the subr_unit test.
  
  Build and install the subr_unit test program originally written by phk, and
  run it with the other ATF tests.
  
  tests/sys/kern/Makefile
* Build and install the subr_unit test as a plain test
  
  sys/kern/subr_unit.c
* Reduce the default number of repetitions from 100 to 1, and add a
  command-line parser to override it.
* Don't be so noisy by default
* Fix an include problem for the test build
  
  Reviewed by:  ngie
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D6038

Modified:
  head/sys/kern/subr_unit.c
  head/tests/sys/kern/Makefile

Modified: head/sys/kern/subr_unit.c
==
--- head/sys/kern/subr_unit.c   Fri Apr 29 21:05:48 2016(r298810)
+++ head/sys/kern/subr_unit.c   Fri Apr 29 21:11:31 2016(r298811)
@@ -68,11 +68,11 @@
  */
 
 #include 
-#include 
 #include 
 
 #ifdef _KERNEL
 
+#include 
 #include 
 #include 
 #include 
@@ -98,6 +98,11 @@ MTX_SYSINIT(unit, , "unit# alloc
 
 #else /* ...USERLAND */
 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -880,9 +885,13 @@ free_unr(struct unrhdr *uh, u_int item)
 #ifndef _KERNEL/* USERLAND test driver */
 
 /*
- * Simple stochastic test driver for the above functions
+ * Simple stochastic test driver for the above functions.  The code resides
+ * here so that it can access static functions and structures.
  */
 
+static bool verbose;
+#define VPRINTF(...)   {if (verbose) printf(__VA_ARGS__);}
+
 static void
 print_unr(struct unrhdr *uh, struct unr *up)
 {
@@ -933,7 +942,7 @@ test_alloc_unr(struct unrhdr *uh, u_int 
int j;
 
if (a[i]) {
-   printf("F %u\n", i);
+   VPRINTF("F %u\n", i);
free_unr(uh, i);
a[i] = 0;
} else {
@@ -941,7 +950,7 @@ test_alloc_unr(struct unrhdr *uh, u_int 
j = alloc_unr(uh);
if (j != -1) {
a[j] = 1;
-   printf("A %d\n", j);
+   VPRINTF("A %d\n", j);
}
no_alloc = 0;
}
@@ -954,40 +963,73 @@ test_alloc_unr_specific(struct unrhdr *u
 
j = alloc_unr_specific(uh, i);
if (j == -1) {
-   printf("F %u\n", i);
+   VPRINTF("F %u\n", i);
a[i] = 0;
free_unr(uh, i);
} else {
a[i] = 1;
-   printf("A %d\n", j);
+   VPRINTF("A %d\n", j);
}
 }
 
-/* Number of unrs to test */
-#define NN 1
+static void
+usage(char** argv)
+{
+   printf("%s [-h] [-r REPETITIONS] [-v]\n", argv[0]);
+}
 
 int
-main(int argc __unused, const char **argv __unused)
+main(int argc, char **argv)
 {
struct unrhdr *uh;
+   char *a;
+   long count = 1; /* Number of unrs to test */
+   long reps = 1;
+   int ch;
u_int i, x, m, j;
-   char a[NN];
+
+   verbose = false;
+
+   while ((ch = getopt(argc, argv, "hr:v")) != -1) {
+   switch (ch) {
+   case 'r':
+   errno = 0;
+   reps = strtol(optarg, NULL, 0);
+   if (errno == ERANGE || errno == EINVAL) {
+   usage(argv);
+   exit(2);
+   }
+   
+   break;
+   case 'v':
+   verbose = true;
+   break;
+   case 'h':
+   default:
+   usage(argv);
+   exit(2);
+   }
+
+
+   }
 
setbuf(stdout, NULL);
-   uh = new_unrhdr(0, NN - 1, NULL);
+   uh = new_unrhdr(0, count - 1, NULL);
print_unrhdr(uh);
 
-   memset(a, 0, sizeof a);
+   a = calloc(count, sizeof(char));
+   if (a == NULL)
+   err(1, "calloc failed");
srandomdev();
 
-   fprintf(stderr, "sizeof(struct unr) %zu\n", sizeof(struct unr));
-   fprintf(stderr, "sizeof(struct unrb) %zu\n", sizeof(struct unrb));
-   fprintf(stderr, "sizeof(struct unrhdr) %zu\n", sizeof(struct unrhdr));
-   fprintf(stderr, "NBITS %d\n", NBITS);
+   printf("sizeof(struct unr) %zu\n", sizeof(struct unr));
+   printf("sizeof(struct unrb) %zu\n", sizeof(struct unrb));
+   printf("sizeof(struct unrhdr) %zu\n", sizeof(struct unrhdr));
+   printf("NBITS %d\n", NBITS);
x = 1;
-   for (m = 0; m < NN * 100; m++) {
+   for (m = 0; m < count * reps; m++) {
j = random();
-   i = (j >> 1) % NN;
+   i = (j >> 1) % count;
 #if 0
  

svn commit: r298810 - in head/sys/cam: . ctl scsi

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 21:05:48 2016
New Revision: 298810
URL: https://svnweb.freebsd.org/changeset/base/298810

Log:
  sys/cam: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/cam/cam.h
  head/sys/cam/cam_periph.c
  head/sys/cam/cam_xpt.c
  head/sys/cam/ctl/ctl.c
  head/sys/cam/ctl/ctl_frontend_cam_sim.c
  head/sys/cam/ctl/ctl_frontend_ioctl.c
  head/sys/cam/ctl/ctl_io.h
  head/sys/cam/ctl/ctl_ioctl.h
  head/sys/cam/scsi/scsi_all.c
  head/sys/cam/scsi/scsi_all.h
  head/sys/cam/scsi/scsi_ch.h
  head/sys/cam/scsi/scsi_da.c
  head/sys/cam/scsi/scsi_low.h
  head/sys/cam/scsi/scsi_sa.c
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/cam.h
==
--- head/sys/cam/cam.h  Fri Apr 29 21:04:06 2016(r298809)
+++ head/sys/cam/cam.h  Fri Apr 29 21:05:48 2016(r298810)
@@ -77,7 +77,7 @@ typedef enum {
 CAM_RL_VALUES
 } cam_rl;
 /*
- * The generation number is incremented everytime a new entry is entered into
+ * The generation number is incremented every time a new entry is entered into
  * the queue giving round robin per priority level scheduling.
  */
 typedef struct {
@@ -118,7 +118,7 @@ typedef enum {
 enum {
SF_RETRY_UA = 0x01, /* Retry UNIT ATTENTION conditions. */
SF_NO_PRINT = 0x02, /* Never print error status. */
-   SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request 
reponses */
+   SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request 
responses */
SF_PRINT_ALWAYS = 0x08, /* Always print error status. */
SF_NO_RECOVERY  = 0x10, /* Don't do active error recovery. */
SF_NO_RETRY = 0x20, /* Don't do any retries. */

Modified: head/sys/cam/cam_periph.c
==
--- head/sys/cam/cam_periph.c   Fri Apr 29 21:04:06 2016(r298809)
+++ head/sys/cam/cam_periph.c   Fri Apr 29 21:05:48 2016(r298810)
@@ -1604,7 +1604,7 @@ sense_error_done:
 
 /*
  * Generic error handler.  Peripheral drivers usually filter
- * out the errors that they handle in a unique mannor, then
+ * out the errors that they handle in a unique manner, then
  * call this function.
  */
 int

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Fri Apr 29 21:04:06 2016(r298809)
+++ head/sys/cam/cam_xpt.c  Fri Apr 29 21:05:48 2016(r298810)
@@ -863,7 +863,7 @@ xpt_init(void *dummy)
xsoftc.boot_delay = CAM_BOOT_DELAY;
 #endif
/*
-* The xpt layer is, itself, the equivelent of a SIM.
+* The xpt layer is, itself, the equivalent of a SIM.
 * Allow 16 ccbs in the ccb pool for it.  This should
 * give decent parallelism when we probe busses and
 * perform other XPT functions.
@@ -892,7 +892,7 @@ xpt_init(void *dummy)
 
/*
 * Looking at the XPT from the SIM layer, the XPT is
-* the equivelent of a peripheral driver.  Allocate
+* the equivalent of a peripheral driver.  Allocate
 * a peripheral driver entry for us.
 */
if ((status = xpt_create_path(, NULL, CAM_XPT_PATH_ID,

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Fri Apr 29 21:04:06 2016(r298809)
+++ head/sys/cam/ctl/ctl.c  Fri Apr 29 21:05:48 2016(r298810)
@@ -5980,7 +5980,7 @@ ctl_debugconf_sp_sense_handler(struct ct
case SMS_PAGE_CTRL_DEFAULT >> 6:
case SMS_PAGE_CTRL_SAVED >> 6:
/*
-* We don't update the changable or default bits for this page.
+* We don't update the changeable or default bits for this page.
 */
break;
case SMS_PAGE_CTRL_CURRENT >> 6:
@@ -10223,7 +10223,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio
 *
 * Therefore we set the HiSup bit here.
 *
-* The reponse format is 2, per SPC-3.
+* The response format is 2, per SPC-3.
 */
inq_ptr->response_format = SID_HiSup | 2;
 

Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c
==
--- head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 29 21:04:06 2016
(r298809)
+++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 29 21:05:48 2016
(r298810)
@@ -106,7 +106,7 @@ static void cfcs_async(void *callback_ar
 
 struct cfcs_softc cfcs_softc;
 /*
- * This is primarly intended to allow for error injection to test the CAM
+ * This is primarily intended to allow for error injection to test the CAM
  * sense data and sense residual handling code.  This sets the maximum
  * amount of SCSI sense data that we will report to CAM.
  */


svn commit: r298809 - head/sys/cam

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 21:04:06 2016
New Revision: 298809
URL: https://svnweb.freebsd.org/changeset/base/298809

Log:
  sys/cam: spelling fixes.
  
  Affects a debug message.
  
  MFC after: 2 weeks

Modified:
  head/sys/cam/cam_queue.c

Modified: head/sys/cam/cam_queue.c
==
--- head/sys/cam/cam_queue.cFri Apr 29 20:56:58 2016(r298808)
+++ head/sys/cam/cam_queue.cFri Apr 29 21:04:06 2016(r298809)
@@ -122,7 +122,7 @@ camq_resize(struct camq *queue, int new_
cam_pinfo **new_array;
 
KASSERT(new_size >= queue->entries, ("camq_resize: "
-   "New queue size can't accomodate queued entries (%d < %d).",
+   "New queue size can't accommodate queued entries (%d < %d).",
new_size, queue->entries));
new_array = (cam_pinfo **)malloc(new_size * sizeof(cam_pinfo *),
 M_CAMQ, M_NOWAIT);
___
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: r298808 - in head/sys/geom: . bde journal mirror part raid raid3 vinum

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:56:58 2016
New Revision: 298808
URL: https://svnweb.freebsd.org/changeset/base/298808

Log:
  sys/geom: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/geom/bde/g_bde_lock.c
  head/sys/geom/geom_bsd_enc.c
  head/sys/geom/geom_ccd.c
  head/sys/geom/geom_dev.c
  head/sys/geom/geom_disk.c
  head/sys/geom/geom_kern.c
  head/sys/geom/geom_mbr_enc.c
  head/sys/geom/geom_sunlabel_enc.c
  head/sys/geom/journal/g_journal.c
  head/sys/geom/mirror/g_mirror.c
  head/sys/geom/part/g_part_bsd64.c
  head/sys/geom/part/g_part_if.m
  head/sys/geom/part/g_part_ldm.c
  head/sys/geom/raid/tr_raid1.c
  head/sys/geom/raid/tr_raid1e.c
  head/sys/geom/raid3/g_raid3.c
  head/sys/geom/vinum/geom_vinum_drive.c
  head/sys/geom/vinum/geom_vinum_subr.c

Modified: head/sys/geom/bde/g_bde_lock.c
==
--- head/sys/geom/bde/g_bde_lock.c  Fri Apr 29 20:53:39 2016
(r298807)
+++ head/sys/geom/bde/g_bde_lock.c  Fri Apr 29 20:56:58 2016
(r298808)
@@ -289,7 +289,7 @@ g_bde_decode_lock(struct g_bde_softc *sc
  * Security objectives: Encode/Decode the metadata encrypted by key-material.
  *
  * A simple AES/128/CBC will do.  We take care to always store the metadata
- * in the same endianess to make it MI.
+ * in the same endianness to make it MI.
  *
  * In the typical case the metadata is stored in encrypted format in sector
  * zero on the media, but at the users discretion or if the piece of the

Modified: head/sys/geom/geom_bsd_enc.c
==
--- head/sys/geom/geom_bsd_enc.cFri Apr 29 20:53:39 2016
(r298807)
+++ head/sys/geom/geom_bsd_enc.cFri Apr 29 20:56:58 2016
(r298808)
@@ -35,7 +35,7 @@
 
 /*
  * Functions to encode and decode struct disklabel and struct partition into
- * a bytestream of little endianess and correct packing.
+ * a bytestream of little endianness and correct packing.
  *
  * NB!  This file must be usable both in kernel and userland.
  */

Modified: head/sys/geom/geom_ccd.c
==
--- head/sys/geom/geom_ccd.cFri Apr 29 20:53:39 2016(r298807)
+++ head/sys/geom/geom_ccd.cFri Apr 29 20:56:58 2016(r298808)
@@ -271,7 +271,7 @@ ccdinit(struct gctl_req *req, struct ccd
 
/*
 * If uniform interleave is desired set all sizes to that of
-* the smallest component.  This will guarentee that a single
+* the smallest component.  This will guarantee that a single
 * interleave table is generated.
 *
 * Lost space must be taken into account when calculating the
@@ -291,7 +291,7 @@ ccdinit(struct gctl_req *req, struct ccd
 * Check to see if an even number of components
 * have been specified.  The interleave must also
 * be non-zero in order for us to be able to 
-* guarentee the topology.
+* guarantee the topology.
 */
if (cs->sc_ndisks % 2) {
gctl_error(req,

Modified: head/sys/geom/geom_dev.c
==
--- head/sys/geom/geom_dev.cFri Apr 29 20:53:39 2016(r298807)
+++ head/sys/geom/geom_dev.cFri Apr 29 20:56:58 2016(r298808)
@@ -630,8 +630,8 @@ g_dev_strategy(struct bio *bp)
 
for (;;) {
/*
-* XXX: This is not an ideal solution, but I belive it to
-* XXX: deadlock safe, all things considered.
+* XXX: This is not an ideal solution, but I believe it to
+* XXX: deadlock safely, all things considered.
 */
bp2 = g_clone_bio(bp);
if (bp2 != NULL)
@@ -686,7 +686,7 @@ g_dev_callback(void *arg)
  * - Clear any dump settings.
  * - Request asynchronous device destruction to prevent any more requests
  *   from coming in.  The provider is already marked with an error, so
- *   anything which comes in in the interrim will be returned immediately.
+ *   anything which comes in the interim will be returned immediately.
  */
 
 static void

Modified: head/sys/geom/geom_disk.c
==
--- head/sys/geom/geom_disk.c   Fri Apr 29 20:53:39 2016(r298807)
+++ head/sys/geom/geom_disk.c   Fri Apr 29 20:56:58 2016(r298808)
@@ -107,7 +107,7 @@ g_disk_access(struct g_provider *pp, int
if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) {
/*
 * Allow decreasing access count even if disk is not
-* avaliable anymore.
+* available anymore.
 */
if (r <= 0 && w <= 0 && e <= 0)
return 

svn commit: r298807 - head/sys/ddb

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:53:39 2016
New Revision: 298807
URL: https://svnweb.freebsd.org/changeset/base/298807

Log:
  sys/ddb: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/ddb/db_textdump.c

Modified: head/sys/ddb/db_textdump.c
==
--- head/sys/ddb/db_textdump.c  Fri Apr 29 20:51:24 2016(r298806)
+++ head/sys/ddb/db_textdump.c  Fri Apr 29 20:53:39 2016(r298807)
@@ -52,7 +52,7 @@
  * TODO
  * 
  *
- * - Allow subsytems to register to submit files for inclusion in the text
+ * - Allow subsystems to register to submit files for inclusion in the text
  *   dump in a generic way.
  */
 
___
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: r298806 - in head/sys/fs: fuse msdosfs nandfs nullfs smbfs tmpfs udf

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:51:24 2016
New Revision: 298806
URL: https://svnweb.freebsd.org/changeset/base/298806

Log:
  sys/fs: spelling fixes in comments.
  
  No functional change.

Modified:
  head/sys/fs/fuse/fuse_io.c
  head/sys/fs/fuse/fuse_vnops.c
  head/sys/fs/msdosfs/msdosfs_conv.c
  head/sys/fs/msdosfs/msdosfs_fat.c
  head/sys/fs/msdosfs/msdosfs_lookup.c
  head/sys/fs/msdosfs/msdosfs_vnops.c
  head/sys/fs/nandfs/nandfs_fs.h
  head/sys/fs/nandfs/nandfs_subr.h
  head/sys/fs/nandfs/nandfs_sufile.c
  head/sys/fs/nandfs/nandfs_vnops.c
  head/sys/fs/nullfs/null_vnops.c
  head/sys/fs/smbfs/smbfs_io.c
  head/sys/fs/smbfs/smbfs_subr.h
  head/sys/fs/tmpfs/tmpfs_vnops.c
  head/sys/fs/udf/osta.h

Modified: head/sys/fs/fuse/fuse_io.c
==
--- head/sys/fs/fuse/fuse_io.c  Fri Apr 29 20:45:50 2016(r298805)
+++ head/sys/fs/fuse/fuse_io.c  Fri Apr 29 20:51:24 2016(r298806)
@@ -209,7 +209,7 @@ fuse_read_biobackend(struct vnode *vp, s
 * buffer based on an EOF condition we need to hold
 * nfs_rslock() through obtaining the buffer to prevent
 * a potential writer-appender from messing with n_size.
-* Otherwise we may accidently truncate the buffer and
+* Otherwise we may accidentally truncate the buffer and
 * lose dirty data.
 *
 * Note that bcount is *not* DEV_BSIZE aligned.
@@ -546,7 +546,7 @@ again:
(on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) {
/*
 * Yes, we mean it. Write out everything to "storage"
-* immediatly, without hesitation. (Apart from other
+* immediately, without hesitation. (Apart from other
 * reasons: the only way to know if a write is valid
 * if its actually written out.)
 */

Modified: head/sys/fs/fuse/fuse_vnops.c
==
--- head/sys/fs/fuse/fuse_vnops.c   Fri Apr 29 20:45:50 2016
(r298805)
+++ head/sys/fs/fuse/fuse_vnops.c   Fri Apr 29 20:51:24 2016
(r298806)
@@ -1027,7 +1027,7 @@ out:
 * soon as we get those attrs... There is
 * one bit of info though not given us by
 * the daemon: whether his response is
-* authorative or not... His response should
+* authoritative or not... His response should
 * be ignored if something is mounted over
 * the dir in question. But that can be
 * known only by having the vnode...
@@ -1774,7 +1774,7 @@ fuse_vnop_getpages(struct vop_getpages_a
 
/*
 * We use only the kva address for the buffer, but this is extremely
-* convienient and fast.
+* convenient and fast.
 */
bp = getpbuf(_pbuf_freecnt);
 
@@ -1835,7 +1835,7 @@ fuse_vnop_getpages(struct vop_getpages_a
("fuse_getpages: page %p is dirty", m));
} else {
/*
-* Read operation was short.  If no error occured
+* Read operation was short.  If no error occurred
 * we may have hit a zero-fill section.   We simply
 * leave valid set to 0.
 */
@@ -1908,7 +1908,7 @@ fuse_vnop_putpages(struct vop_putpages_a
}
/*
 * We use only the kva address for the buffer, but this is extremely
-* convienient and fast.
+* convenient and fast.
 */
bp = getpbuf(_pbuf_freecnt);
 

Modified: head/sys/fs/msdosfs/msdosfs_conv.c
==
--- head/sys/fs/msdosfs/msdosfs_conv.c  Fri Apr 29 20:45:50 2016
(r298805)
+++ head/sys/fs/msdosfs/msdosfs_conv.c  Fri Apr 29 20:51:24 2016
(r298806)
@@ -759,7 +759,7 @@ winSlotCnt(const u_char *un, size_t unle
 }
 
 /*
- * Determine the number of bytes neccessary for Win95 names
+ * Determine the number of bytes necessary for Win95 names
  */
 size_t
 winLenFixup(const u_char *un, size_t unlen)

Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==
--- head/sys/fs/msdosfs/msdosfs_fat.c   Fri Apr 29 20:45:50 2016
(r298805)
+++ head/sys/fs/msdosfs/msdosfs_fat.c   Fri Apr 29 20:51:24 2016
(r298806)
@@ -175,7 +175,7 @@ pcbmap(struct denode *dep, u_long findcn
 
/*
 * Rummage around in the fat cache, maybe we can avoid tromping
-* thru every fat entry for the file. And, 

svn commit: r298805 - head/sys/fs/ext2fs

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:45:50 2016
New Revision: 298805
URL: https://svnweb.freebsd.org/changeset/base/298805

Log:
  fs/ext2fs: spelling fixes on comment.
  
  No functional change.

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

Modified: head/sys/fs/ext2fs/ext2_inode.c
==
--- head/sys/fs/ext2fs/ext2_inode.c Fri Apr 29 20:43:51 2016
(r298804)
+++ head/sys/fs/ext2fs/ext2_inode.c Fri Apr 29 20:45:50 2016
(r298805)
@@ -183,7 +183,7 @@ ext2_truncate(struct vnode *vp, off_t le
}
/*
 * Shorten the size of the file. If the file is not being
-* truncated to a block boundry, the contents of the
+* truncated to a block boundary, the contents of the
 * partial block following the end of the file must be
 * zero'ed in case it ever become accessible again because
 * of subsequent file growth.
___
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: r298804 - in head/sys/ufs: ffs ufs

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:43:51 2016
New Revision: 298804
URL: https://svnweb.freebsd.org/changeset/base/298804

Log:
  UFS: spelling fixes on comments.
  
  No functional change.

Modified:
  head/sys/ufs/ffs/ffs_alloc.c
  head/sys/ufs/ffs/ffs_softdep.c
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/ufs/ffs/fs.h
  head/sys/ufs/ufs/dirhash.h
  head/sys/ufs/ufs/ufs_acl.c

Modified: head/sys/ufs/ffs/ffs_alloc.c
==
--- head/sys/ufs/ffs/ffs_alloc.cFri Apr 29 20:33:20 2016
(r298803)
+++ head/sys/ufs/ffs/ffs_alloc.cFri Apr 29 20:43:51 2016
(r298804)
@@ -1231,7 +1231,7 @@ ffs_dirpref(pip)
 * backwards or even to alternate looking forward and backward,
 * this approach fails badly when the filesystem is nearly full.
 * Specifically, we first search all the areas that have no space
-* and finally try the one preceeding that. We repeat this on
+* and finally try the one preceding that. We repeat this on
 * every request and in the case of the final block end up
 * searching the entire filesystem. By jumping to the front
 * of the filesystem, our future forward searches always look
@@ -1351,7 +1351,7 @@ ffs_blkpref_ufs1(ip, lbn, indx, bap)
/*
 * If we are at the beginning of a file, or we have already allocated
 * the maximum number of blocks per cylinder group, or we do not
-* have a block allocated immediately preceeding us, then we need
+* have a block allocated immediately preceding us, then we need
 * to decide where to start allocating new blocks.
 */
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
@@ -1456,7 +1456,7 @@ ffs_blkpref_ufs2(ip, lbn, indx, bap)
/*
 * If we are at the beginning of a file, or we have already allocated
 * the maximum number of blocks per cylinder group, or we do not
-* have a block allocated immediately preceeding us, then we need
+* have a block allocated immediately preceding us, then we need
 * to decide where to start allocating new blocks.
 */
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {

Modified: head/sys/ufs/ffs/ffs_softdep.c
==
--- head/sys/ufs/ffs/ffs_softdep.c  Fri Apr 29 20:33:20 2016
(r298803)
+++ head/sys/ufs/ffs/ffs_softdep.c  Fri Apr 29 20:43:51 2016
(r298804)
@@ -13187,7 +13187,7 @@ softdep_request_cleanup(fs, vp, cred, re
 *
 * Additionally, if we are unpriviledged and allocating space,
 * we need to ensure that we clean up enough blocks to get the
-* needed number of blocks over the threshhold of the minimum
+* needed number of blocks over the threshold of the minimum
 * number of blocks required to be kept free by the filesystem
 * (fs_minfree).
 */
@@ -13888,7 +13888,7 @@ getdirtybuf(bp, lock, waitfor)
error = BUF_LOCK(bp,
LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, lock);
/*
-* Even if we sucessfully acquire bp here, we have dropped
+* Even if we successfully acquire bp here, we have dropped
 * lock, which may violates our guarantee.
 */
if (error == 0)

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==
--- head/sys/ufs/ffs/ffs_vfsops.c   Fri Apr 29 20:33:20 2016
(r298803)
+++ head/sys/ufs/ffs/ffs_vfsops.c   Fri Apr 29 20:43:51 2016
(r298804)
@@ -814,7 +814,7 @@ ffs_mountfs(devvp, mp, td)
goto out;
}
fs->fs_fmod = 0;
-   fs->fs_flags &= ~FS_INDEXDIRS;  /* no support for directory indicies */
+   fs->fs_flags &= ~FS_INDEXDIRS;  /* no support for directory indices */
fs->fs_flags &= ~FS_UNCLEAN;
if (fs->fs_clean == 0) {
fs->fs_flags |= FS_UNCLEAN;

Modified: head/sys/ufs/ffs/fs.h
==
--- head/sys/ufs/ffs/fs.h   Fri Apr 29 20:33:20 2016(r298803)
+++ head/sys/ufs/ffs/fs.h   Fri Apr 29 20:43:51 2016(r298804)
@@ -401,8 +401,8 @@ CTASSERT(sizeof(struct fs) == 1376);
  * flag to enforce that inconsistent filesystems be mounted read-only.
  * The FS_INDEXDIRS flag when set indicates that the kernel maintains
  * on-disk auxiliary indexes (such as B-trees) for speeding directory
- * accesses. Kernels that do not support auxiliary indicies clear the
- * flag to indicate that the indicies need to be rebuilt (by fsck) before
+ * accesses. Kernels that do not support auxiliary indices clear the
+ * flag to indicate that the indices need to be rebuilt (by fsck) before
  * they can be used.
  *
  * FS_ACLS indicates 

svn commit: r298803 - head/sys/netinet

2016-04-29 Thread Michael Tuexen
Author: tuexen
Date: Fri Apr 29 20:33:20 2016
New Revision: 298803
URL: https://svnweb.freebsd.org/changeset/base/298803

Log:
  Don't assign, just compare...

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Fri Apr 29 20:31:49 2016(r298802)
+++ head/sys/netinet/sctputil.c Fri Apr 29 20:33:20 2016(r298803)
@@ -6972,8 +6972,8 @@ sctp_recv_icmp_tunneled_packet(int cmd, 
}
type = icmp->icmp_type;
code = icmp->icmp_code;
-   if ((type = ICMP_UNREACH) &&
-   (code = ICMP_UNREACH_PORT)) {
+   if ((type == ICMP_UNREACH) &&
+   (code == ICMP_UNREACH_PORT)) {
code = ICMP_UNREACH_PROTOCOL;
}
sctp_notify(inp, stcb, net, type, code,
___
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: r298802 - head/sys/arm/ti

2016-04-29 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Fri Apr 29 20:31:49 2016
New Revision: 298802
URL: https://svnweb.freebsd.org/changeset/base/298802

Log:
  Add driver for AM33xx SoC touchscreen
  
  Split ADC driver in two halves: ADC(analog ot digital) and
  TSC(touchscreen). Touchscreen driver is fully functional
  up to the point of reporting samples. This part will be added
  once FreeBSD has API for touchscreen.
  
  Tested on: Beaglebone Black + 4DCAPE-43T
  Reviewed by:  loos
  Differential Revision:https://reviews.freebsd.org/D5847

Modified:
  head/sys/arm/ti/ti_adc.c
  head/sys/arm/ti/ti_adcreg.h
  head/sys/arm/ti/ti_adcvar.h

Modified: head/sys/arm/ti/ti_adc.c
==
--- head/sys/arm/ti/ti_adc.cFri Apr 29 20:22:10 2016(r298801)
+++ head/sys/arm/ti/ti_adc.cFri Apr 29 20:31:49 2016(r298802)
@@ -31,17 +31,23 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -50,16 +56,26 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#undef DEBUG_TSC
+
+#defineDEFAULT_CHARGE_DELAY0x400
+#defineSTEPDLY_OPEN0x98
+
+#defineORDER_XP0
+#defineORDER_XN1
+#defineORDER_YP2
+#defineORDER_YN3
+
 /* Define our 8 steps, one for each input channel. */
 static struct ti_adc_input ti_adc_inputs[TI_ADC_NPINS] = {
-   { .stepconfig = ADC_STEPCFG1, .stepdelay = ADC_STEPDLY1 },
-   { .stepconfig = ADC_STEPCFG2, .stepdelay = ADC_STEPDLY2 },
-   { .stepconfig = ADC_STEPCFG3, .stepdelay = ADC_STEPDLY3 },
-   { .stepconfig = ADC_STEPCFG4, .stepdelay = ADC_STEPDLY4 },
-   { .stepconfig = ADC_STEPCFG5, .stepdelay = ADC_STEPDLY5 },
-   { .stepconfig = ADC_STEPCFG6, .stepdelay = ADC_STEPDLY6 },
-   { .stepconfig = ADC_STEPCFG7, .stepdelay = ADC_STEPDLY7 },
-   { .stepconfig = ADC_STEPCFG8, .stepdelay = ADC_STEPDLY8 },
+   { .stepconfig = ADC_STEPCFG(1), .stepdelay = ADC_STEPDLY(1) },
+   { .stepconfig = ADC_STEPCFG(2), .stepdelay = ADC_STEPDLY(2) },
+   { .stepconfig = ADC_STEPCFG(3), .stepdelay = ADC_STEPDLY(3) },
+   { .stepconfig = ADC_STEPCFG(4), .stepdelay = ADC_STEPDLY(4) },
+   { .stepconfig = ADC_STEPCFG(5), .stepdelay = ADC_STEPDLY(5) },
+   { .stepconfig = ADC_STEPCFG(6), .stepdelay = ADC_STEPDLY(6) },
+   { .stepconfig = ADC_STEPCFG(7), .stepdelay = ADC_STEPDLY(7) },
+   { .stepconfig = ADC_STEPCFG(8), .stepdelay = ADC_STEPDLY(8) },
 };
 
 static int ti_adc_samples[5] = { 0, 2, 4, 8, 16 };
@@ -67,6 +83,7 @@ static int ti_adc_samples[5] = { 0, 2, 4
 static void
 ti_adc_enable(struct ti_adc_softc *sc)
 {
+   uint32_t reg;
 
TI_ADC_LOCK_ASSERT(sc);
 
@@ -75,10 +92,28 @@ ti_adc_enable(struct ti_adc_softc *sc)
 
/* Enable the FIFO0 threshold and the end of sequence interrupt. */
ADC_WRITE4(sc, ADC_IRQENABLE_SET,
-   ADC_IRQ_FIFO0_THRES | ADC_IRQ_END_OF_SEQ);
+   ADC_IRQ_FIFO0_THRES | ADC_IRQ_FIFO1_THRES | ADC_IRQ_END_OF_SEQ);
 
+   reg = ADC_CTRL_STEP_WP | ADC_CTRL_STEP_ID;
+   if (sc->sc_tsc_wires > 0) {
+   reg |= ADC_CTRL_TSC_ENABLE;
+   switch (sc->sc_tsc_wires) {
+   case 4:
+   reg |= ADC_CTRL_TSC_4WIRE;
+   break;
+   case 5:
+   reg |= ADC_CTRL_TSC_5WIRE;
+   break;
+   case 8:
+   reg |= ADC_CTRL_TSC_8WIRE;
+   break;
+   default:
+   break;
+   }
+   }
+   reg |= ADC_CTRL_ENABLE;
/* Enable the ADC.  Run thru enabled steps, start the conversions. */
-   ADC_WRITE4(sc, ADC_CTRL, ADC_READ4(sc, ADC_CTRL) | ADC_CTRL_ENABLE);
+   ADC_WRITE4(sc, ADC_CTRL, reg);
 
sc->sc_last_state = 1;
 }
@@ -102,7 +137,7 @@ ti_adc_disable(struct ti_adc_softc *sc)
 
/* Disable the FIFO0 threshold and the end of sequence interrupt. */
ADC_WRITE4(sc, ADC_IRQENABLE_CLR,
-   ADC_IRQ_FIFO0_THRES | ADC_IRQ_END_OF_SEQ);
+   ADC_IRQ_FIFO0_THRES | ADC_IRQ_FIFO1_THRES | ADC_IRQ_END_OF_SEQ);
 
/* ACK any pending interrupt. */
ADC_WRITE4(sc, ADC_IRQSTATUS, ADC_READ4(sc, ADC_IRQSTATUS));
@@ -114,20 +149,27 @@ ti_adc_disable(struct ti_adc_softc *sc)
count = ADC_READ4(sc, ADC_FIFO0COUNT) & ADC_FIFO_COUNT_MSK;
}
 
+   count = ADC_READ4(sc, ADC_FIFO1COUNT) & ADC_FIFO_COUNT_MSK;
+   while (count > 0) {
+   data = ADC_READ4(sc, ADC_FIFO1DATA);
+   count = ADC_READ4(sc, ADC_FIFO1COUNT) & ADC_FIFO_COUNT_MSK;
+   }
+
sc->sc_last_state = 0;
 }
 
 static int
 ti_adc_setup(struct ti_adc_softc *sc)
 {
-   int ain;
+   

svn commit: r298800 - head/sys/netinet

2016-04-29 Thread Michael Tuexen
Author: tuexen
Date: Fri Apr 29 20:22:01 2016
New Revision: 298800
URL: https://svnweb.freebsd.org/changeset/base/298800

Log:
  Add support for handling ICMP and ICMP6 messages sent in response
  to SCTP/UDP/IP and SCTP/UDP/IPv6 packets.

Modified:
  head/sys/netinet/ip_icmp.h
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/ip_icmp.h
==
--- head/sys/netinet/ip_icmp.h  Fri Apr 29 20:19:41 2016(r298799)
+++ head/sys/netinet/ip_icmp.h  Fri Apr 29 20:22:01 2016(r298800)
@@ -140,9 +140,10 @@ struct icmp {
 /*
  * ICMP_ADVLENPREF is the preferred number of bytes which should be contiguous.
  * SCTP needs additional 12 bytes to be able to access the initiate tag
- * in packets containing an INIT chunk.
+ * in packets containing an INIT chunk. For also supporting SCTP/UDP,
+ * additional 8 bytes are needed.
  */
-#defineICMP_ADVLENPREF(p)  (8 + ((p)->icmp_ip.ip_hl << 2) + 8 + 12)
+#defineICMP_ADVLENPREF(p)  (8 + ((p)->icmp_ip.ip_hl << 2) + 8 + 8 
+ 12)
 
 /*
  * Definition of type and code field values.

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Fri Apr 29 20:19:41 2016(r298799)
+++ head/sys/netinet/sctputil.c Fri Apr 29 20:22:01 2016(r298800)
@@ -52,6 +52,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#ifdef INET6
+#include 
+#endif
 
 
 #ifndef KTR_SCTP
@@ -6880,6 +6883,261 @@ out:
m_freem(m);
 }
 
+#ifdef INET
+static void
+sctp_recv_icmp_tunneled_packet(int cmd, struct sockaddr *sa, void *vip, void 
*ctx SCTP_UNUSED)
+{
+   struct ip *outer_ip, *inner_ip;
+   struct sctphdr *sh;
+   struct icmp *icmp;
+   struct udphdr *udp;
+   struct sctp_inpcb *inp;
+   struct sctp_tcb *stcb;
+   struct sctp_nets *net;
+   struct sctp_init_chunk *ch;
+   struct sockaddr_in src, dst;
+   uint8_t type, code;
+
+   inner_ip = (struct ip *)vip;
+   icmp = (struct icmp *)((caddr_t)inner_ip -
+   (sizeof(struct icmp) - sizeof(struct ip)));
+   outer_ip = (struct ip *)((caddr_t)icmp - sizeof(struct ip));
+   if (ntohs(outer_ip->ip_len) <
+   sizeof(struct ip) + 8 + (inner_ip->ip_hl << 2) + sizeof(struct 
udphdr) + 8) {
+   return;
+   }
+   udp = (struct udphdr *)((caddr_t)inner_ip + (inner_ip->ip_hl << 2));
+   sh = (struct sctphdr *)(udp + 1);
+   memset(, 0, sizeof(struct sockaddr_in));
+   src.sin_family = AF_INET;
+   src.sin_len = sizeof(struct sockaddr_in);
+   src.sin_port = sh->src_port;
+   src.sin_addr = inner_ip->ip_src;
+   memset(, 0, sizeof(struct sockaddr_in));
+   dst.sin_family = AF_INET;
+   dst.sin_len = sizeof(struct sockaddr_in);
+   dst.sin_port = sh->dest_port;
+   dst.sin_addr = inner_ip->ip_dst;
+   /*
+* 'dst' holds the dest of the packet that failed to be sent. 'src'
+* holds our local endpoint address. Thus we reverse the dst and the
+* src in the lookup.
+*/
+   inp = NULL;
+   net = NULL;
+   stcb = sctp_findassociation_addr_sa((struct sockaddr *),
+   (struct sockaddr *),
+   , , 1,
+   SCTP_DEFAULT_VRFID);
+   if ((stcb != NULL) &&
+   (net != NULL) &&
+   (inp != NULL) &&
+   (inp->sctp_socket != NULL)) {
+   /* Check the UDP port numbers */
+   if ((udp->uh_dport != net->port) ||
+   (udp->uh_sport != 
htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port {
+   SCTP_TCB_UNLOCK(stcb);
+   return;
+   }
+   /* Check the verification tag */
+   if (ntohl(sh->v_tag) != 0) {
+   /*
+* This must be the verification tag used for
+* sending out packets. We don't consider packets
+* reflecting the verification tag.
+*/
+   if (ntohl(sh->v_tag) != stcb->asoc.peer_vtag) {
+   SCTP_TCB_UNLOCK(stcb);
+   return;
+   }
+   } else {
+   if (ntohs(outer_ip->ip_len) >=
+   sizeof(struct ip) +
+   8 + (inner_ip->ip_hl << 2) + 8 + 20) {
+   /*
+* In this case we can check if we got an
+* INIT chunk and if the initiate tag
+* matches.
+*/
+   ch = (struct sctp_init_chunk *)(sh + 1);
+   if ((ch->ch.chunk_type != SCTP_INITIATION) ||
+   (ntohl(ch->init.initiate_tag) != 

svn commit: r298801 - head/sys/compat/x86bios

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 20:22:10 2016
New Revision: 298801
URL: https://svnweb.freebsd.org/changeset/base/298801

Log:
  x86bios_alloc(): Unsign a counter.
  
  The value can't even be signed so we can avoid the signed vs. unsigned
  comparison.
  
  Reviewed by:  jkim

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==
--- head/sys/compat/x86bios/x86bios.c   Fri Apr 29 20:22:01 2016
(r298800)
+++ head/sys/compat/x86bios/x86bios.c   Fri Apr 29 20:22:10 2016
(r298801)
@@ -119,7 +119,7 @@ void *
 x86bios_alloc(uint32_t *offset, size_t size, int flags)
 {
void *vaddr;
-   int i;
+   u_int i;
 
if (offset == NULL || size == 0)
return (NULL);
___
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: r298798 - head/sys/netinet6

2016-04-29 Thread Michael Tuexen
Author: tuexen
Date: Fri Apr 29 20:13:35 2016
New Revision: 298798
URL: https://svnweb.freebsd.org/changeset/base/298798

Log:
  Use correct order of source and destination address and port.

Modified:
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet6/udp6_usrreq.c
==
--- head/sys/netinet6/udp6_usrreq.c Fri Apr 29 20:12:45 2016
(r298797)
+++ head/sys/netinet6/udp6_usrreq.c Fri Apr 29 20:13:35 2016
(r298798)
@@ -556,8 +556,8 @@ udp6_common_ctlinput(int cmd, struct soc
if (!PRC_IS_REDIRECT(cmd)) {
/* Check to see if its tunneled */
struct inpcb *inp;
-   inp = in6_pcblookup_mbuf(pcbinfo, >ip6_src,
-   uh.uh_sport, >ip6_dst, uh.uh_dport,
+   inp = in6_pcblookup_mbuf(pcbinfo, >ip6_dst,
+   uh.uh_dport, >ip6_src, uh.uh_sport,
INPLOOKUP_WILDCARD | INPLOOKUP_RLOCKPCB,
m->m_pkthdr.rcvif, m);
if (inp != NULL) {
@@ -566,7 +566,7 @@ udp6_common_ctlinput(int cmd, struct soc
up = intoudpcb(inp);
if (up->u_icmp_func) {
/* Yes it is. */
-   INP_RUNLOCK(inp);   
+   INP_RUNLOCK(inp);
(*up->u_icmp_func)(cmd, (struct 
sockaddr *)ip6cp->ip6c_src,
  d, up->u_tun_ctx);
return;
___
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: r298797 - in head/sys: kern sys

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 20:12:45 2016
New Revision: 298797
URL: https://svnweb.freebsd.org/changeset/base/298797

Log:
  Expose soaio_enqueue().
  
  This can be used by protocol-specific AIO handlers to queue work to the
  socket AIO daemon pool.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/kern/sys_socket.c
  head/sys/sys/socketvar.h

Modified: head/sys/kern/sys_socket.c
==
--- head/sys/kern/sys_socket.c  Fri Apr 29 20:11:09 2016(r298796)
+++ head/sys/kern/sys_socket.c  Fri Apr 29 20:12:45 2016(r298797)
@@ -512,7 +512,7 @@ soaio_kproc_create(void *context, int pe
mtx_unlock(_jobs_lock);
 }
 
-static void
+void
 soaio_enqueue(struct task *task)
 {
 

Modified: head/sys/sys/socketvar.h
==
--- head/sys/sys/socketvar.hFri Apr 29 20:11:09 2016(r298796)
+++ head/sys/sys/socketvar.hFri Apr 29 20:12:45 2016(r298797)
@@ -341,6 +341,7 @@ int getsock_cap(struct thread *td, int f
struct file **fpp, u_int *fflagp);
 void   soabort(struct socket *so);
 intsoaccept(struct socket *so, struct sockaddr **nam);
+void   soaio_enqueue(struct task *task);
 void   soaio_rcv(void *context, int pending);
 void   soaio_snd(void *context, int pending);
 intsocheckuid(struct socket *so, uid_t uid);
___
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: r298796 - in head/sys: kern sys

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 20:11:09 2016
New Revision: 298796
URL: https://svnweb.freebsd.org/changeset/base/298796

Log:
  Introduce a new protocol hook pru_aio_queue.
  
  This allows a protocol to claim individual AIO requests instead of using
  the default socket AIO handling.
  
  Sponsored by: Chelsio Communications

Modified:
  head/sys/kern/sys_socket.c
  head/sys/kern/uipc_domain.c
  head/sys/kern/uipc_socket.c
  head/sys/sys/protosw.h

Modified: head/sys/kern/sys_socket.c
==
--- head/sys/kern/sys_socket.c  Fri Apr 29 19:17:31 2016(r298795)
+++ head/sys/kern/sys_socket.c  Fri Apr 29 20:11:09 2016(r298796)
@@ -734,8 +734,13 @@ soo_aio_queue(struct file *fp, struct ka
 {
struct socket *so;
struct sockbuf *sb;
+   int error;
 
so = fp->f_data;
+   error = (*so->so_proto->pr_usrreqs->pru_aio_queue)(so, job);
+   if (error == 0)
+   return (0);
+
switch (job->uaiocb.aio_lio_opcode) {
case LIO_READ:
sb = >so_rcv;

Modified: head/sys/kern/uipc_domain.c
==
--- head/sys/kern/uipc_domain.c Fri Apr 29 19:17:31 2016(r298795)
+++ head/sys/kern/uipc_domain.c Fri Apr 29 20:11:09 2016(r298796)
@@ -135,6 +135,7 @@ protosw_init(struct protosw *pr)
 
 #define DEFAULT(foo, bar)  if ((foo) == NULL)  (foo) = (bar)
DEFAULT(pu->pru_accept, pru_accept_notsupp);
+   DEFAULT(pu->pru_aio_queue, pru_aio_queue_notsupp);
DEFAULT(pu->pru_bind, pru_bind_notsupp);
DEFAULT(pu->pru_bindat, pru_bindat_notsupp);
DEFAULT(pu->pru_connect, pru_connect_notsupp);

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Fri Apr 29 19:17:31 2016(r298795)
+++ head/sys/kern/uipc_socket.c Fri Apr 29 20:11:09 2016(r298796)
@@ -3103,6 +3103,13 @@ pru_accept_notsupp(struct socket *so, st
 }
 
 int
+pru_aio_queue_notsupp(struct socket *so, struct kaiocb *job)
+{
+
+   return EOPNOTSUPP;
+}
+
+int
 pru_attach_notsupp(struct socket *so, int proto, struct thread *td)
 {
 

Modified: head/sys/sys/protosw.h
==
--- head/sys/sys/protosw.h  Fri Apr 29 19:17:31 2016(r298795)
+++ head/sys/sys/protosw.h  Fri Apr 29 20:11:09 2016(r298796)
@@ -34,6 +34,7 @@
 #define _SYS_PROTOSW_H_
 
 /* Forward declare these structures referenced from prototypes below. */
+struct kaiocb;
 struct mbuf;
 struct thread;
 struct sockaddr;
@@ -228,12 +229,14 @@ struct pr_usrreqs {
struct thread *td);
int (*pru_connectat)(int fd, struct socket *so,
struct sockaddr *nam, struct thread *td);
+   int (*pru_aio_queue)(struct socket *so, struct kaiocb *job);
 };
 
 /*
  * All nonvoid pru_*() functions below return EOPNOTSUPP.
  */
 intpru_accept_notsupp(struct socket *so, struct sockaddr **nam);
+intpru_aio_queue_notsupp(struct socket *so, struct kaiocb *job);
 intpru_attach_notsupp(struct socket *so, int proto, struct thread *td);
 intpru_bind_notsupp(struct socket *so, struct sockaddr *nam,
struct thread *td);
___
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: r298793 - head/sys/dev/iwm

2016-04-29 Thread Dmitry Chagin
Author: dchagin
Date: Fri Apr 29 19:10:22 2016
New Revision: 298793
URL: https://svnweb.freebsd.org/changeset/base/298793

Log:
  The iwm_nic_error() defined if IWM_DEBUG is defined.

Modified:
  head/sys/dev/iwm/if_iwm.c

Modified: head/sys/dev/iwm/if_iwm.c
==
--- head/sys/dev/iwm/if_iwm.c   Fri Apr 29 18:53:16 2016(r298792)
+++ head/sys/dev/iwm/if_iwm.c   Fri Apr 29 19:10:22 2016(r298793)
@@ -4363,8 +4363,9 @@ iwm_intr(void *arg)
struct ieee80211com *ic = >sc_ic;
struct ieee80211vap *vap = TAILQ_FIRST(>ic_vaps);
 
+#ifdef IWM_DEBUG
iwm_nic_error(sc);
-
+#endif
/* Dump driver status (TX and RX rings) while we're here. */
device_printf(sc->sc_dev, "driver status:\n");
for (i = 0; i < IWM_MVM_MAX_QUEUES; 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: r298792 - head/sys/dev/ath

2016-04-29 Thread Adrian Chadd
Author: adrian
Date: Fri Apr 29 18:53:16 2016
New Revision: 298792
URL: https://svnweb.freebsd.org/changeset/base/298792

Log:
  [ath] initialise do_ldpc to 0.
  
  I .. can't believe I missed this.
  
  This showed up because the AP was TX'ing LDPC to an iwm(4) chipset,
  which didn't advertise LDPC and doesn't /accept/ LDPC.  Amusingly, all
  the two other FreeBSD 11n parts I had tested with (AR9380, Intel 7260)
  and I completely forgot to test on ye olde hardware.
  
  That'll teach me.
  
  Tested:
  
  * AR9580 (AP) - Intel 7260 (STA), AR9380 (STA), Intel 6205 (STA)

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

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==
--- head/sys/dev/ath/if_ath_tx_ht.c Fri Apr 29 17:56:16 2016
(r298791)
+++ head/sys/dev/ath/if_ath_tx_ht.c Fri Apr 29 18:53:16 2016
(r298792)
@@ -237,6 +237,7 @@ ath_tx_rate_fill_rcflags(struct ath_soft
 * It's a global flag, not a per-try flag, so we clear
 * it if any of the rate entries aren't 11n.
 */
+   do_ldpc = 0;
if ((ni->ni_vap->iv_htcaps & IEEE80211_HTCAP_LDPC) &&
(ni->ni_htcap & IEEE80211_HTCAP_LDPC))
do_ldpc = 1;
___
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: r298791 - head/sys/sys

2016-04-29 Thread Conrad E. Meyer
Author: cem
Date: Fri Apr 29 17:56:16 2016
New Revision: 298791
URL: https://svnweb.freebsd.org/changeset/base/298791

Log:
  PRINT_BUF_FLAGS: Remove removed DIRTY/PERSIST flags
  
  This is a follow-up to r298789, which removed the B_DIRTY and B_PERSISTENT
  flags.  This changeset removes them from the associated %b bit description
  string as well.
  
  Reviewed by:  pfg
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/sys/buf.h

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Fri Apr 29 17:35:28 2016(r298790)
+++ head/sys/sys/buf.h  Fri Apr 29 17:56:16 2016(r298791)
@@ -226,9 +226,9 @@ struct buf {
 #define B_REMFREE  0x8000  /* Delayed bremfree */
 
 #define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \
-   "\33paging\32infreecnt\31nocopy\30b23\27relbuf\26dirty\25b20" \
+   "\33paging\32infreecnt\31nocopy\30b23\27relbuf\26b21\25b20" \
"\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \
-   "\15b12\14noreuse\13eintr\12done\11persist\10delwri" \
+   "\15b12\14noreuse\13eintr\12done\11b8\10delwri" \
"\7validsuspwrt\6cache\5deferred\4direct\3async\2needcommit\1age"
 
 /*
___
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: r298790 - head/sys/vm

2016-04-29 Thread John Baldwin
Author: jhb
Date: Fri Apr 29 17:35:28 2016
New Revision: 298790
URL: https://svnweb.freebsd.org/changeset/base/298790

Log:
  Don't require write locks on the VM object for vm_page_prev/next.
  
  Reviewed by:  kib
  Sponsored by: Chelsio Communications

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==
--- head/sys/vm/vm_page.c   Fri Apr 29 16:32:28 2016(r298789)
+++ head/sys/vm/vm_page.c   Fri Apr 29 17:35:28 2016(r298790)
@@ -1283,7 +1283,7 @@ vm_page_next(vm_page_t m)
 {
vm_page_t next;
 
-   VM_OBJECT_ASSERT_WLOCKED(m->object);
+   VM_OBJECT_ASSERT_LOCKED(m->object);
if ((next = TAILQ_NEXT(m, listq)) != NULL &&
next->pindex != m->pindex + 1)
next = NULL;
@@ -1301,7 +1301,7 @@ vm_page_prev(vm_page_t m)
 {
vm_page_t prev;
 
-   VM_OBJECT_ASSERT_WLOCKED(m->object);
+   VM_OBJECT_ASSERT_LOCKED(m->object);
if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL &&
prev->pindex != m->pindex - 1)
prev = NULL;
___
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: r298789 - in head/sys: kern sys

2016-04-29 Thread Conrad Meyer
I think you'll want to remove them from the subsequent PRINT_BUF_FLAGS too.

Best,
Conrad

On Fri, Apr 29, 2016 at 9:32 AM, Pedro F. Giffuni  wrote:
> Author: pfg
> Date: Fri Apr 29 16:32:28 2016
> New Revision: 298789
> URL: https://svnweb.freebsd.org/changeset/base/298789
>
> Log:
>   bufs: make B_DIRTY and B_PERSISTENT flags available
>
>   It appears these flags were related to ext2fs but are completely
>   unused nowadays. Retire them.
>
>   Suggested by: mckusick
>
> Modified:
>   head/sys/kern/vfs_bio.c
>   head/sys/sys/buf.h
>
> Modified: head/sys/kern/vfs_bio.c
> ==
> --- head/sys/kern/vfs_bio.c Fri Apr 29 16:07:25 2016(r298788)
> +++ head/sys/kern/vfs_bio.c Fri Apr 29 16:32:28 2016(r298789)
> @@ -1162,8 +1162,7 @@ vfs_buf_check_unmapped(struct buf *bp)
>  static int
>  isbufbusy(struct buf *bp)
>  {
> -   if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
> -   BUF_ISLOCKED(bp)) ||
> +   if (((bp->b_flags & B_INVAL) == 0 && BUF_ISLOCKED(bp)) ||
> ((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI))
> return (1);
> return (0);
>
> Modified: head/sys/sys/buf.h
> ==
> --- head/sys/sys/buf.h  Fri Apr 29 16:07:25 2016(r298788)
> +++ head/sys/sys/buf.h  Fri Apr 29 16:32:28 2016(r298789)
> @@ -200,7 +200,7 @@ struct buf {
>  #defineB_CACHE 0x0020  /* Bread found us in the 
> cache. */
>  #defineB_VALIDSUSPWRT  0x0040  /* Valid write during 
> suspension. */
>  #defineB_DELWRI0x0080  /* Delay I/O until buffer 
> reused. */
> -#defineB_PERSISTENT0x0100  /* Perm. ref'ed while EXT2FS 
> mounted. */
> +#defineB_0100  0x0100  /* Available flag. */
>  #defineB_DONE  0x0200  /* I/O completed. */
>  #defineB_EINTR 0x0400  /* I/O was interrupted */
>  #defineB_NOREUSE   0x0800  /* Contents not reused once 
> released. */
> @@ -213,7 +213,7 @@ struct buf {
>  #defineB_0004  0x0004  /* Available flag. */
>  #defineB_0008  0x0008  /* Available flag. */
>  #defineB_0010  0x0010  /* Available flag. */
> -#defineB_DIRTY 0x0020  /* Needs writing later (in 
> EXT2FS). */
> +#defineB_0020  0x0020  /* Available flag. */
>  #defineB_RELBUF0x0040  /* Release VMIO buffer. */
>  #defineB_FS_FLAG1  0x0080  /* Available flag for FS use. 
> */
>  #defineB_NOCOPY0x0100  /* Don't copy-on-write this 
> buf. */
>
___
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: r298789 - in head/sys: kern sys

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 16:32:28 2016
New Revision: 298789
URL: https://svnweb.freebsd.org/changeset/base/298789

Log:
  bufs: make B_DIRTY and B_PERSISTENT flags available
  
  It appears these flags were related to ext2fs but are completely
  unused nowadays. Retire them.
  
  Suggested by: mckusick

Modified:
  head/sys/kern/vfs_bio.c
  head/sys/sys/buf.h

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Fri Apr 29 16:07:25 2016(r298788)
+++ head/sys/kern/vfs_bio.c Fri Apr 29 16:32:28 2016(r298789)
@@ -1162,8 +1162,7 @@ vfs_buf_check_unmapped(struct buf *bp)
 static int
 isbufbusy(struct buf *bp)
 {
-   if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
-   BUF_ISLOCKED(bp)) ||
+   if (((bp->b_flags & B_INVAL) == 0 && BUF_ISLOCKED(bp)) ||
((bp->b_flags & (B_DELWRI | B_INVAL)) == B_DELWRI))
return (1);
return (0);

Modified: head/sys/sys/buf.h
==
--- head/sys/sys/buf.h  Fri Apr 29 16:07:25 2016(r298788)
+++ head/sys/sys/buf.h  Fri Apr 29 16:32:28 2016(r298789)
@@ -200,7 +200,7 @@ struct buf {
 #defineB_CACHE 0x0020  /* Bread found us in the cache. 
*/
 #defineB_VALIDSUSPWRT  0x0040  /* Valid write during 
suspension. */
 #defineB_DELWRI0x0080  /* Delay I/O until buffer 
reused. */
-#defineB_PERSISTENT0x0100  /* Perm. ref'ed while EXT2FS 
mounted. */
+#defineB_0100  0x0100  /* Available flag. */
 #defineB_DONE  0x0200  /* I/O completed. */
 #defineB_EINTR 0x0400  /* I/O was interrupted */
 #defineB_NOREUSE   0x0800  /* Contents not reused once 
released. */
@@ -213,7 +213,7 @@ struct buf {
 #defineB_0004  0x0004  /* Available flag. */
 #defineB_0008  0x0008  /* Available flag. */
 #defineB_0010  0x0010  /* Available flag. */
-#defineB_DIRTY 0x0020  /* Needs writing later (in 
EXT2FS). */
+#defineB_0020  0x0020  /* Available flag. */
 #defineB_RELBUF0x0040  /* Release VMIO buffer. */
 #defineB_FS_FLAG1  0x0080  /* Available flag for FS use. */
 #defineB_NOCOPY0x0100  /* Don't copy-on-write this 
buf. */
___
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: r298788 - in head/sys: fs/nfs fs/nfsclient fs/nfsserver nfs

2016-04-29 Thread Pedro Giffuni



On 04/29/16 11:07, Pedro F. Giffuni wrote:

Author: pfg
Date: Fri Apr 29 16:07:25 2016
New Revision: 298788
URL: https://svnweb.freebsd.org/changeset/base/298788

Log:
  NFS: spelling fixes on comments.

  No funcional change.


s/funcional/functional/

Ahh the irony ...
Every one knows coders are quite bad at spelling. ;)

Pedro.
___
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: r298788 - in head/sys: fs/nfs fs/nfsclient fs/nfsserver nfs

2016-04-29 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Apr 29 16:07:25 2016
New Revision: 298788
URL: https://svnweb.freebsd.org/changeset/base/298788

Log:
  NFS: spelling fixes on comments.
  
  No funcional change.

Modified:
  head/sys/fs/nfs/nfs_commonport.c
  head/sys/fs/nfs/nfsport.h
  head/sys/fs/nfs/nfsrvstate.h
  head/sys/fs/nfsclient/nfs_clbio.c
  head/sys/fs/nfsclient/nfs_clkdtrace.c
  head/sys/fs/nfsclient/nfs_clrpcops.c
  head/sys/fs/nfsclient/nfs_clstate.c
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/fs/nfsclient/nfs_clvnops.c
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/fs/nfsserver/nfs_nfsdstate.c
  head/sys/nfs/krpc_subr.c
  head/sys/nfs/nfs_nfssvc.c

Modified: head/sys/fs/nfs/nfs_commonport.c
==
--- head/sys/fs/nfs/nfs_commonport.cFri Apr 29 15:45:22 2016
(r298787)
+++ head/sys/fs/nfs/nfs_commonport.cFri Apr 29 16:07:25 2016
(r298788)
@@ -155,7 +155,7 @@ newnfs_realign(struct mbuf **pm, int how
  * we cannot afford to overwrite them.
  *
  * We would prefer to avoid this situation entirely.  The situation does
- * not occur with NFS/UDP and is supposed to only occassionally occur
+ * not occur with NFS/UDP and is supposed to only occasionally occur
  * with TCP.  Use vfs.nfs.realign_count and realign_test to check this.
  *
  */

Modified: head/sys/fs/nfs/nfsport.h
==
--- head/sys/fs/nfs/nfsport.h   Fri Apr 29 15:45:22 2016(r298787)
+++ head/sys/fs/nfs/nfsport.h   Fri Apr 29 16:07:25 2016(r298788)
@@ -968,7 +968,7 @@ struct nfsreq {
 
 /*
  * Name used by getnewvnode() to describe filesystem, "nfs".
- * For perfomance reasons it is useful to have the same string
+ * For performance reasons it is useful to have the same string
  * used in both places that call getnewvnode().
  */
 extern const char nfs_vnode_tag[];

Modified: head/sys/fs/nfs/nfsrvstate.h
==
--- head/sys/fs/nfs/nfsrvstate.hFri Apr 29 15:45:22 2016
(r298787)
+++ head/sys/fs/nfs/nfsrvstate.hFri Apr 29 16:07:25 2016
(r298788)
@@ -76,7 +76,7 @@ struct nfssessionhash {
  * Client server structure for V4. It is doubly linked into two lists.
  * The first is a hash table based on the clientid and the second is a
  * list of all clients maintained in LRU order.
- * The actual size malloc'd is large enough to accomodate the id string.
+ * The actual size malloc'd is large enough to accommodate the id string.
  */
 struct nfsclient {
LIST_ENTRY(nfsclient) lc_hash;  /* Clientid hash list */

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==
--- head/sys/fs/nfsclient/nfs_clbio.c   Fri Apr 29 15:45:22 2016
(r298787)
+++ head/sys/fs/nfsclient/nfs_clbio.c   Fri Apr 29 16:07:25 2016
(r298788)
@@ -140,7 +140,7 @@ ncl_getpages(struct vop_getpages_args *a
 
/*
 * We use only the kva address for the buffer, but this is extremely
-* convienient and fast.
+* convenient and fast.
 */
bp = getpbuf(_pbuf_freecnt);
 
@@ -201,7 +201,7 @@ ncl_getpages(struct vop_getpages_args *a
} else {
/*
 * Read operation was short.  If no error
-* occured we may have hit a zero-fill
+* occurred we may have hit a zero-fill
 * section.  We leave valid set to 0, and page
 * is freed by vm_page_readahead_finish() if
 * its index is not equal to requested, or
@@ -286,7 +286,7 @@ ncl_putpages(struct vop_putpages_args *a
 
/*
 * We use only the kva address for the buffer, but this is extremely
-* convienient and fast.
+* convenient and fast.
 */
bp = getpbuf(_pbuf_freecnt);
 
@@ -1188,7 +1188,7 @@ again:
 
/*
 * Get the partial update on the progress made from
-* uiomove, if an error occured.
+* uiomove, if an error occurred.
 */
if (error != 0)
n = local_resid - uio->uio_resid;
@@ -1480,7 +1480,7 @@ again:
}
/*
 * We might have lost our iod while sleeping,
-* so check and loop if nescessary.
+* so check and loop if necessary.
 */
goto again;
}

Modified: head/sys/fs/nfsclient/nfs_clkdtrace.c
==
--- head/sys/fs/nfsclient/nfs_clkdtrace.c   Fri Apr 29 15:45:22 2016
(r298787)
+++ head/sys/fs/nfsclient/nfs_clkdtrace.c   

Re: svn commit: r298769 - head/sys/netinet

2016-04-29 Thread hiren panchasara
On 04/29/16 at 07:23P, Sepherosa Ziehau wrote:
> Author: sephe
> Date: Fri Apr 29 07:23:08 2016
> New Revision: 298769
> URL: https://svnweb.freebsd.org/changeset/base/298769
> 
> Log:
>   tcp/syncache: Set flowid and hash type properly for SYN|ACK
>   
>   So the underlying drivers can use it to select the sending queue
>   properly for SYN|ACK instead of rolling their own hash.
>   
>   Sponsored by:   Microsoft OSTC
>   Differential Revision:  https://reviews.freebsd.org/D6120
> 
> Modified:
>   head/sys/netinet/tcp_syncache.c

Would it be possible to MFC this?

Cheers,
Hiren


pgpfS0rnfSu5Y.pgp
Description: PGP signature


svn commit: r298787 - head/sys/cddl/dev/dtrace/x86

2016-04-29 Thread Andriy Gapon
Author: avg
Date: Fri Apr 29 15:45:22 2016
New Revision: 298787
URL: https://svnweb.freebsd.org/changeset/base/298787

Log:
  add invpcid instruction to i386 dtrace disassembler tables
  
  MFC after:2 weeks

Modified:
  head/sys/cddl/dev/dtrace/x86/dis_tables.c

Modified: head/sys/cddl/dev/dtrace/x86/dis_tables.c
==
--- head/sys/cddl/dev/dtrace/x86/dis_tables.c   Fri Apr 29 15:23:51 2016
(r298786)
+++ head/sys/cddl/dev/dtrace/x86/dis_tables.c   Fri Apr 29 15:45:22 2016
(r298787)
@@ -1182,7 +1182,7 @@ const instable_t dis_op0F38[256] = {
 /*  [78]  */   INVALID,INVALID,INVALID,
INVALID,
 /*  [7C]  */   INVALID,INVALID,INVALID,
INVALID,
 
-/*  [80]  */   TNSy("invept", RM_66r), TNSy("invvpid", RM_66r),INVALID,
INVALID,
+/*  [80]  */   TNSy("invept", RM_66r), TNSy("invvpid", RM_66r),TNSy("invpcid", 
RM_66r),INVALID,
 /*  [84]  */   INVALID,INVALID,INVALID,
INVALID,
 /*  [88]  */   INVALID,INVALID,INVALID,
INVALID,
 /*  [8C]  */   INVALID,INVALID,INVALID,
INVALID,
___
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: r298786 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-04-29 Thread Alan Somers
Author: asomers
Date: Fri Apr 29 15:23:51 2016
New Revision: 298786
URL: https://svnweb.freebsd.org/changeset/base/298786

Log:
  Refactor vdev_geom_attach and friends to reduce code duplication
  
  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Move checks for provider's sectorsize and mediasize into a single
location in vdev_geom_attach. Remove the zfs::vdev::taste class;
it's ok to use the regular vdev class for tasting. Consolidate guid
checks into a single location in vdev_attach_ok. Consolidate some
error handling code from vdev_geom_attach into vdev_geom_detach,
closing a resource leak of geom consumers in the process.
  
  Reviewed by:  avg
  MFC after:4 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D5974

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 
29 13:58:01 2016(r298785)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Fri Apr 
29 15:23:51 2016(r298786)
@@ -61,6 +61,9 @@ static int vdev_geom_bio_delete_disable;
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_delete_disable, CTLFLAG_RWTUN,
 _geom_bio_delete_disable, 0, "Disable BIO_DELETE");
 
+/* Declare local functions */
+static void vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read);
+
 /*
  * Thread local storage used to indicate when a thread is probing geoms
  * for their guids.  If NULL, this thread is not tasting geoms.  If non NULL,
@@ -168,6 +171,17 @@ vdev_geom_attach(struct g_provider *pp, 
g_topology_assert();
 
ZFS_LOG(1, "Attaching to %s.", pp->name);
+
+   if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) {
+   ZFS_LOG(1, "Failing attach of %s. Incompatible sectorsize %d\n",
+   pp->name, pp->sectorsize);
+   return (NULL);
+   } else if (pp->mediasize < SPA_MINDEVSIZE) {
+   ZFS_LOG(1, "Failing attach of %s. Incompatible mediasize %ju\n",
+   pp->name, pp->mediasize);
+   return (NULL);
+   }
+
/* Do we have geom already? No? Create one. */
LIST_FOREACH(gp, _vdev_class.geom, geom) {
if (gp->flags & G_GEOM_WITHER)
@@ -185,14 +199,14 @@ vdev_geom_attach(struct g_provider *pp, 
if (error != 0) {
ZFS_LOG(1, "%s(%d): g_attach failed: %d\n", __func__,
__LINE__, error);
-   g_wither_geom(gp, ENXIO);
+   vdev_geom_detach(cp, B_FALSE);
return (NULL);
}
error = g_access(cp, 1, 0, 1);
if (error != 0) {
ZFS_LOG(1, "%s(%d): g_access failed: %d\n", __func__,
   __LINE__, error);
-   g_wither_geom(gp, ENXIO);
+   vdev_geom_detach(cp, B_FALSE);
return (NULL);
}
ZFS_LOG(1, "Created geom and consumer for %s.", pp->name);
@@ -210,15 +224,14 @@ vdev_geom_attach(struct g_provider *pp, 
if (error != 0) {
ZFS_LOG(1, "%s(%d): g_attach failed: %d\n",
__func__, __LINE__, error);
-   g_destroy_consumer(cp);
+   vdev_geom_detach(cp, B_FALSE);
return (NULL);
}
error = g_access(cp, 1, 0, 1);
if (error != 0) {
ZFS_LOG(1, "%s(%d): g_access failed: %d\n",
__func__, __LINE__, error);
-   g_detach(cp);
-   g_destroy_consumer(cp);
+   vdev_geom_detach(cp, B_FALSE);
return (NULL);
}
ZFS_LOG(1, "Created consumer for %s.", pp->name);
@@ -244,39 +257,41 @@ vdev_geom_attach(struct g_provider *pp, 
 * 2) Set it to a linked list of vdevs, not just a single vdev
 */
cp->private = vd;
-   vd->vdev_tsd = cp;
+   if (vd != NULL)
+   vd->vdev_tsd = cp;
 
cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
return (cp);
 }
 
 static void
-vdev_geom_close_locked(vdev_t *vd)
+vdev_geom_detach(struct g_consumer *cp, boolean_t open_for_read)
 {
struct g_geom *gp;
-   struct g_consumer *cp;
+   vdev_t *vd;
 
g_topology_assert();
 
-   cp = vd->vdev_tsd;
-   if (cp == NULL)
-   return;
+   ZFS_LOG(1, 

svn commit: r298784 - in head: etc/defaults etc/rc.d share/man/man5

2016-04-29 Thread Baptiste Daroussin
Author: bapt
Date: Fri Apr 29 12:23:56 2016
New Revision: 298784
URL: https://svnweb.freebsd.org/changeset/base/298784

Log:
  Add a savecore_enable variable support for the savecore rc script
  
  By default set to 'YES' so it does not change the current behaviour for users,
  this variable allows to decide to not extract crach dumps from the dump
  device at boot time by setting it to "NO" in rc.conf.
  
  Sponsored by: Gandi.net

Modified:
  head/etc/defaults/rc.conf
  head/etc/rc.d/savecore
  head/share/man/man5/rc.conf.5

Modified: head/etc/defaults/rc.conf
==
--- head/etc/defaults/rc.conf   Fri Apr 29 12:00:36 2016(r298783)
+++ head/etc/defaults/rc.conf   Fri Apr 29 12:23:56 2016(r298784)
@@ -603,6 +603,7 @@ chkprintcap_enable="NO" # Run chkprintca
 chkprintcap_flags="-d" # Create missing directories by default.
 dumpdev="AUTO" # Device to crashdump to (device name, AUTO, or NO).
 dumpdir="/var/crash"   # Directory where crash dumps are to be stored
+savecore_enable="YES"  # Extract core from dump devices if any
 savecore_flags="-m 10" # Used if dumpdev is enabled above, and present.
# By default, only the 10 most recent kernel dumps
# are saved.

Modified: head/etc/rc.d/savecore
==
--- head/etc/rc.d/savecore  Fri Apr 29 12:00:36 2016(r298783)
+++ head/etc/rc.d/savecore  Fri Apr 29 12:23:56 2016(r298784)
@@ -10,6 +10,7 @@
 . /etc/rc.subr
 
 name="savecore"
+rcvar="savecore_enable"
 desc="Save a core dump of the operating system"
 start_cmd="savecore_start"
 start_precmd="savecore_prestart"

Modified: head/share/man/man5/rc.conf.5
==
--- head/share/man/man5/rc.conf.5   Fri Apr 29 12:00:36 2016
(r298783)
+++ head/share/man/man5/rc.conf.5   Fri Apr 29 12:23:56 2016
(r298784)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 28, 2016
+.Dd April 29, 2016
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -3511,6 +3511,12 @@ to not run
 at boot time when
 .Va dumpdir
 is set.
+.It Va savecore_enable
+.Pq Vt bool
+If set to
+.Dq Li NO ,
+disable automatic extraction of the crash dump from the
+.Va dumpdev .
 .It Va savecore_flags
 .Pq Vt str
 If crash dumps are enabled, these are the flags to pass to the
___
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: r298783 - head/etc/devd

2016-04-29 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Apr 29 12:00:36 2016
New Revision: 298783
URL: https://svnweb.freebsd.org/changeset/base/298783

Log:
  Regenerate usb.conf .
  
  MFC after:1 week

Modified:
  head/etc/devd/usb.conf

Modified: head/etc/devd/usb.conf
==
--- head/etc/devd/usb.conf  Fri Apr 29 11:38:45 2016(r298782)
+++ head/etc/devd/usb.conf  Fri Apr 29 12:00:36 2016(r298783)
@@ -1721,7 +1721,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x07b8";
-   match "product" "(0x8178|0x8188|0x8189)";
+   match "product" "(0x8178|0x8179|0x8188|0x8189)";
action "kldload -n if_urtwn";
 };
 
@@ -3161,7 +3161,23 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x0df6";
-   match "product" "(0x0052|0x005c|0x0061)";
+   match "product" "0x0052";
+   action "kldload -n if_urtwn";
+};
+
+nomatch 32 {
+   match "bus" "uhub[0-9]+";
+   match "mode" "host";
+   match "vendor" "0x0df6";
+   match "product" "0x0056";
+   action "kldload -n if_axe";
+};
+
+nomatch 32 {
+   match "bus" "uhub[0-9]+";
+   match "mode" "host";
+   match "vendor" "0x0df6";
+   match "product" "(0x005c|0x0061)";
action "kldload -n if_urtwn";
 };
 
@@ -4633,7 +4649,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x17e9";
-   match "product" 
"(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x0377|0x03e0|0x401a)";
+   match "product" 
"(0x0059|0x0100|0x0117|0x0136|0x0138|0x0141|0x015a|0x0198|0x019b|0x01ba|0x01bb|0x01d4|0x01d7|0x01e2|0x0215|0x024c|0x02a9|0x02e9|0x0377|0x03e0|0x401a)";
action "kldload -n udl";
 };
 
@@ -5801,5 +5817,5 @@ nomatch 32 {
action "kldload -n umass";
 };
 
-# 2719 USB entries processed
+# 2722 USB entries processed
 
___
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: r298772 - head/sys/dev/mlx5/mlx5_en

2016-04-29 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Apr 29 11:01:06 2016
New Revision: 298772
URL: https://svnweb.freebsd.org/changeset/base/298772

Log:
  Correct some error codes to native FreeBSD ones.
  
  Sponsored by: Mellanox Technologies
  Tested by:Netflix
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Apr 29 11:00:12 2016
(r298771)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Apr 29 11:01:06 2016
(r298772)
@@ -2559,6 +2559,7 @@ out:
if (error) {
if_printf(ifp, "Query module num failed, eeprom "
"reading is not supported\n");
+   error = EINVAL;
goto err_i2c;
}
/* Check if module is present before doing an access */
@@ -2588,6 +2589,7 @@ out:
if (error) {
if_printf(ifp, "Query eeprom failed, eeprom "
"reading is not supported\n");
+   error = EINVAL;
goto err_i2c;
}
 
@@ -2601,6 +2603,7 @@ out:
if (error) {
if_printf(ifp, "Query eeprom failed, eeprom "
"reading is not supported\n");
+   error = EINVAL;
goto err_i2c;
}
 
___
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: r298771 - in head/sys/dev/mlx5: . mlx5_core mlx5_en

2016-04-29 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Apr 29 11:00:12 2016
New Revision: 298771
URL: https://svnweb.freebsd.org/changeset/base/298771

Log:
  Add function to detect the presence of a port module and use this
  function to error out early when no port module is present and doing
  eeprom access. This also prevents error codes from filling up in
  dmesg.
  
  Sponsored by: Mellanox Technologies
  Tested by:Netflix
  MFC after:1 week

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Apr 29 08:02:31 2016(r298770)
+++ head/sys/dev/mlx5/driver.h  Fri Apr 29 11:00:12 2016(r298771)
@@ -542,6 +542,7 @@ struct mlx5_core_dev {
atomic_tnum_qps;
u32 issi;
struct mlx5_special_contexts special_contexts;
+   unsigned int module_status[MLX5_MAX_PORTS];
 };
 
 enum {
@@ -835,6 +836,7 @@ int mlx5_set_port_mtu(struct mlx5_core_d
 int mlx5_query_port_max_mtu(struct mlx5_core_dev *dev, int *max_mtu);
 int mlx5_query_port_oper_mtu(struct mlx5_core_dev *dev, int *oper_mtu);
 
+unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int 
module_num);
 int mlx5_query_module_num(struct mlx5_core_dev *dev, int *module_num);
 int mlx5_query_eeprom(struct mlx5_core_dev *dev, int i2c_addr, int page_num,
  int device_addr, int size, int module_num, u32 *data,

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Apr 29 08:02:31 2016
(r298770)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Apr 29 11:00:12 2016
(r298771)
@@ -579,6 +579,13 @@ static const char *mlx5_port_module_even
}
 }
 
+unsigned int mlx5_query_module_status(struct mlx5_core_dev *dev, int 
module_num)
+{
+   if (module_num < 0 || module_num >= MLX5_MAX_PORTS)
+   return 0;   /* undefined */
+   return dev->module_status[module_num];
+}
+
 static void mlx5_port_module_event(struct mlx5_core_dev *dev,
   struct mlx5_eqe *eqe)
 {
@@ -612,5 +619,8 @@ static void mlx5_port_module_event(struc
default:
device_printf((>dev)->bsddev, "INFO: ""Module %u, unknown 
status", module_num);
}
+   /* store module status */
+   if (module_num < MLX5_MAX_PORTS)
+   dev->module_status[module_num] = module_status;
 }
 

Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Apr 29 08:02:31 2016
(r298770)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.cFri Apr 29 11:00:12 2016
(r298771)
@@ -2561,7 +2561,12 @@ out:
"reading is not supported\n");
goto err_i2c;
}
-
+   /* Check if module is present before doing an access */
+   if (mlx5_query_module_status(priv->mdev, module_num) !=
+   MLX5_MODULE_STATUS_PLUGGED) {
+   error = EINVAL;
+   goto err_i2c;
+   }
/*
 * Currently 0XA0 and 0xA2 are the only addresses permitted.
 * The internal conversion is as follows:
___
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: r298769 - head/sys/netinet

2016-04-29 Thread Sepherosa Ziehau
Author: sephe
Date: Fri Apr 29 07:23:08 2016
New Revision: 298769
URL: https://svnweb.freebsd.org/changeset/base/298769

Log:
  tcp/syncache: Set flowid and hash type properly for SYN|ACK
  
  So the underlying drivers can use it to select the sending queue
  properly for SYN|ACK instead of rolling their own hash.
  
  Sponsored by: Microsoft OSTC
  Differential Revision:https://reviews.freebsd.org/D6120

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==
--- head/sys/netinet/tcp_syncache.c Fri Apr 29 05:28:40 2016
(r298768)
+++ head/sys/netinet/tcp_syncache.c Fri Apr 29 07:23:08 2016
(r298769)
@@ -127,7 +127,8 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, sync
 static void syncache_drop(struct syncache *, struct syncache_head *);
 static void syncache_free(struct syncache *);
 static void syncache_insert(struct syncache *, struct syncache_head *);
-static int  syncache_respond(struct syncache *, struct syncache_head *, 
int);
+static int  syncache_respond(struct syncache *, struct syncache_head *, 
int,
+   const struct mbuf *);
 static struct   socket *syncache_socket(struct syncache *, struct socket *,
struct mbuf *m);
 static void syncache_timeout(struct syncache *sc, struct syncache_head 
*sch,
@@ -457,7 +458,7 @@ syncache_timer(void *xsch)
free(s, M_TCPLOG);
}
 
-   syncache_respond(sc, sch, 1);
+   syncache_respond(sc, sch, 1, NULL);
TCPSTAT_INC(tcps_sc_retransmitted);
syncache_timeout(sc, sch, 0);
}
@@ -1307,7 +1308,7 @@ syncache_add(struct in_conninfo *inc, st
s, __func__);
free(s, M_TCPLOG);
}
-   if (syncache_respond(sc, sch, 1) == 0) {
+   if (syncache_respond(sc, sch, 1, m) == 0) {
sc->sc_rxmits = 0;
syncache_timeout(sc, sch, 1);
TCPSTAT_INC(tcps_sndacks);
@@ -1474,7 +1475,7 @@ skip_alloc:
/*
 * Do a standard 3-way handshake.
 */
-   if (syncache_respond(sc, sch, 0) == 0) {
+   if (syncache_respond(sc, sch, 0, m) == 0) {
if (V_tcp_syncookies && V_tcp_syncookiesonly && sc != )
syncache_free(sc);
else if (sc != )
@@ -1505,7 +1506,8 @@ tfo_done:
 }
 
 static int
-syncache_respond(struct syncache *sc, struct syncache_head *sch, int locked)
+syncache_respond(struct syncache *sc, struct syncache_head *sch, int locked,
+const struct mbuf *m0)
 {
struct ip *ip = NULL;
struct mbuf *m;
@@ -1686,6 +1688,10 @@ syncache_respond(struct syncache *sc, st
 
M_SETFIB(m, sc->sc_inc.inc_fibnum);
m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
+   if (m0 != NULL && M_HASHTYPE_GET(m0) != M_HASHTYPE_NONE) {
+   m->m_pkthdr.flowid = m0->m_pkthdr.flowid;
+   M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0));
+   }
 #ifdef INET6
if (sc->sc_inc.inc_flags & INC_ISIPV6) {
m->m_pkthdr.csum_flags = CSUM_TCP_IPV6;
___
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"