svn commit: r284747 - head/sys/dev/sfxge

2015-06-23 Thread Andrew Rybchenko
Author: arybchik
Date: Wed Jun 24 06:25:20 2015
New Revision: 284747
URL: https://svnweb.freebsd.org/changeset/base/284747

Log:
  sfxge: skip VPD info population if access is denied
  
  The patch allows to run on unprivileged PF (PFIOV) passed to
  a virtual machine.
  
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D2891

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

Modified: head/sys/dev/sfxge/sfxge.c
==
--- head/sys/dev/sfxge/sfxge.c  Wed Jun 24 06:01:29 2015(r284746)
+++ head/sys/dev/sfxge/sfxge.c  Wed Jun 24 06:25:20 2015(r284747)
@@ -905,8 +905,15 @@ sfxge_vpd_init(struct sfxge_softc *sc)
efx_vpd_value_t value;
int rc;
 
-   if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0)
+   if ((rc = efx_vpd_size(sc->enp, &sc->vpd_size)) != 0) {
+   /*
+* Unpriviledged functions deny VPD access.
+* Simply skip VPD in this case.
+*/
+   if (rc == EACCES)
+   goto done;
goto fail;
+   }
sc->vpd_data = malloc(sc->vpd_size, M_SFXGE, M_WAITOK);
if ((rc = efx_vpd_read(sc->enp, sc->vpd_data, sc->vpd_size)) != 0)
goto fail2;
@@ -935,6 +942,7 @@ sfxge_vpd_init(struct sfxge_softc *sc)
for (keyword[1] = 'A'; keyword[1] <= 'Z'; keyword[1]++)
sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword);
 
+done:
return (0);
 
 fail2:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284746 - in head/sys/dev/hyperv: include netvsc

2015-06-23 Thread Wei Hu
Author: whu
Date: Wed Jun 24 06:01:29 2015
New Revision: 284746
URL: https://svnweb.freebsd.org/changeset/base/284746

Log:
  TSO and checksum offloading support for Netvsc driver on Hyper-V.
  
  Submitted by: whu
  Reviewed by:  royger
  Approved by:  royger
  MFC after:1 week
  Relnotes: yes
  Sponsored by: Microsoft OSTC
  Differential Revision:https://reviews.freebsd.org/D2517

Modified:
  head/sys/dev/hyperv/include/hyperv.h
  head/sys/dev/hyperv/netvsc/hv_net_vsc.c
  head/sys/dev/hyperv/netvsc/hv_net_vsc.h
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  head/sys/dev/hyperv/netvsc/hv_rndis.h
  head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
  head/sys/dev/hyperv/netvsc/hv_rndis_filter.h

Modified: head/sys/dev/hyperv/include/hyperv.h
==
--- head/sys/dev/hyperv/include/hyperv.hWed Jun 24 01:48:44 2015
(r284745)
+++ head/sys/dev/hyperv/include/hyperv.hWed Jun 24 06:01:29 2015
(r284746)
@@ -107,7 +107,7 @@ typedef uint8_t hv_bool_uint8_t;
 #define HV_MAX_PIPE_USER_DEFINED_BYTES 116
 
 
-#define HV_MAX_PAGE_BUFFER_COUNT   16
+#define HV_MAX_PAGE_BUFFER_COUNT   32
 #define HV_MAX_MULTIPAGE_BUFFER_COUNT  32
 
 #define HV_ALIGN_UP(value, align)  \

Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c
==
--- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Jun 24 01:48:44 2015
(r284745)
+++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Wed Jun 24 06:01:29 2015
(r284746)
@@ -49,6 +49,7 @@
 #include "hv_rndis.h"
 #include "hv_rndis_filter.h"
 
+MALLOC_DEFINE(M_NETVSC, "netvsc", "Hyper-V netvsc driver");
 
 /*
  * Forward declarations
@@ -59,13 +60,10 @@ static int  hv_nv_init_rx_buffer_with_ne
 static int  hv_nv_destroy_send_buffer(netvsc_dev *net_dev);
 static int  hv_nv_destroy_rx_buffer(netvsc_dev *net_dev);
 static int  hv_nv_connect_to_vsp(struct hv_device *device);
-static void hv_nv_on_send_completion(struct hv_device *device,
-hv_vm_packet_descriptor *pkt);
-static void hv_nv_on_receive(struct hv_device *device,
-hv_vm_packet_descriptor *pkt);
-static void hv_nv_send_receive_completion(struct hv_device *device,
- uint64_t tid);
-
+static void hv_nv_on_send_completion(netvsc_dev *net_dev,
+struct hv_device *device, hv_vm_packet_descriptor *pkt);
+static void hv_nv_on_receive(netvsc_dev *net_dev,
+struct hv_device *device, hv_vm_packet_descriptor *pkt);
 
 /*
  *
@@ -76,7 +74,7 @@ hv_nv_alloc_net_device(struct hv_device 
netvsc_dev *net_dev;
hn_softc_t *sc = device_get_softc(device->device);
 
-   net_dev = malloc(sizeof(netvsc_dev), M_DEVBUF, M_NOWAIT | M_ZERO);
+   net_dev = malloc(sizeof(netvsc_dev), M_NETVSC, M_NOWAIT | M_ZERO);
if (net_dev == NULL) {
return (NULL);
}
@@ -128,6 +126,34 @@ hv_nv_get_inbound_net_device(struct hv_d
return (net_dev);
 }
 
+int
+hv_nv_get_next_send_section(netvsc_dev *net_dev)
+{
+   unsigned long bitsmap_words = net_dev->bitsmap_words;
+   unsigned long *bitsmap = net_dev->send_section_bitsmap;
+   unsigned long idx;
+   int ret = NVSP_1_CHIMNEY_SEND_INVALID_SECTION_INDEX;
+   int i;
+
+   for (i = 0; i < bitsmap_words; i++) {
+   idx = ffs(~bitsmap[i]);
+   if (0 == idx)
+   continue;
+
+   idx--;
+   if (i * BITS_PER_LONG + idx >= net_dev->send_section_count)
+   return (ret);
+
+   if (synch_test_and_set_bit(idx, &bitsmap[i]))
+   continue;
+
+   ret = i * BITS_PER_LONG + idx;
+   break;
+   }
+
+   return (ret);
+}
+
 /*
  * Net VSC initialize receive buffer with net VSP
  * 
@@ -146,12 +172,8 @@ hv_nv_init_rx_buffer_with_net_vsp(struct
return (ENODEV);
}
 
-   net_dev->rx_buf = contigmalloc(net_dev->rx_buf_size, M_DEVBUF,
+   net_dev->rx_buf = contigmalloc(net_dev->rx_buf_size, M_NETVSC,
M_ZERO, 0UL, BUS_SPACE_MAXADDR, PAGE_SIZE, 0);
-   if (net_dev->rx_buf == NULL) {
-   ret = ENOMEM;
-   goto cleanup;
-   }
 
/*
 * Establish the GPADL handle for this buffer on this channel.
@@ -202,7 +224,7 @@ hv_nv_init_rx_buffer_with_net_vsp(struct
init_pkt->msgs.vers_1_msgs.send_rx_buf_complete.num_sections;
 
net_dev->rx_sections = malloc(net_dev->rx_section_count *
-   sizeof(nvsp_1_rx_buf_section), M_DEVBUF, M_NOWAIT);
+   sizeof(nvsp_1_rx_buf_section), M_NETVSC, M_NOWAIT);
if (net_dev->rx_sections == NULL) {
ret = EINVAL;
goto cleanup;
@@ -246,7 +268,7 @@ hv_nv_init_send_buffer_with_net_vsp(stru
   

svn commit: r284745 - head/lib/libugidfw

2015-06-23 Thread Marcelo Araujo
Author: araujo (ports committer)
Date: Wed Jun 24 01:48:44 2015
New Revision: 284745
URL: https://svnweb.freebsd.org/changeset/base/284745

Log:
  Set some internal helpers as static and initialize few variables to silence
  CLANG WARNINGS.
  BUMP SHLIB_MAJOR version as the ABI potentially changed.
  
  Also run an 'exp run' to double check if any external project are using
  those functions. Thanks antoine@.
  
  PR:   200807
  Differential Revision:D2775
  Reviewed by:  kib, ngie

Modified:
  head/lib/libugidfw/Makefile
  head/lib/libugidfw/ugidfw.c

Modified: head/lib/libugidfw/Makefile
==
--- head/lib/libugidfw/Makefile Wed Jun 24 01:34:35 2015(r284744)
+++ head/lib/libugidfw/Makefile Wed Jun 24 01:48:44 2015(r284745)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 LIB=   ugidfw
-SHLIB_MAJOR=   4
+SHLIB_MAJOR=   5   
 SRCS=  ugidfw.c
 INCS=  ugidfw.h
 

Modified: head/lib/libugidfw/ugidfw.c
==
--- head/lib/libugidfw/ugidfw.c Wed Jun 24 01:34:35 2015(r284744)
+++ head/lib/libugidfw/ugidfw.c Wed Jun 24 01:48:44 2015(r284745)
@@ -505,7 +505,7 @@ truncated:
return (-1);
 }
 
-int
+static int
 bsde_parse_uidrange(char *spec, uid_t *min, uid_t *max,
 size_t buflen, char *errstr){
struct passwd *pwd;
@@ -554,7 +554,7 @@ bsde_parse_uidrange(char *spec, uid_t *m
return (0);
 }
 
-int
+static int
 bsde_parse_gidrange(char *spec, gid_t *min, gid_t *max,
 size_t buflen, char *errstr){
struct group *grp;
@@ -603,7 +603,7 @@ bsde_parse_gidrange(char *spec, gid_t *m
return (0);
 }
 
-int
+static int
 bsde_parse_subject(int argc, char *argv[],
 struct mac_bsdextended_subject *subject, size_t buflen, char *errstr)
 {
@@ -612,7 +612,7 @@ bsde_parse_subject(int argc, char *argv[
char *endp;
uid_t uid_min, uid_max;
gid_t gid_min, gid_max;
-   int jid;
+   int jid = 0;
size_t len;
long value;
 
@@ -720,7 +720,7 @@ bsde_parse_subject(int argc, char *argv[
return (0);
 }
 
-int
+static int
 bsde_parse_type(char *spec, int *type, size_t buflen, char *errstr)
 {
size_t len;
@@ -764,7 +764,7 @@ bsde_parse_type(char *spec, int *type, s
return (0);
 }
 
-int
+static int
 bsde_parse_fsid(char *spec, struct fsid *fsid, size_t buflen, char *errstr)
 {
size_t len;
@@ -781,15 +781,15 @@ bsde_parse_fsid(char *spec, struct fsid 
return (0);
 }
 
-int
+static int
 bsde_parse_object(int argc, char *argv[],
 struct mac_bsdextended_object *object, size_t buflen, char *errstr)
 {
int not_seen, flags;
int current, neg, nextnot;
+   int type;
uid_t uid_min, uid_max;
gid_t gid_min, gid_max;
-   int type;
struct fsid fsid;
size_t len;
 
@@ -797,6 +797,7 @@ bsde_parse_object(int argc, char *argv[]
flags = 0;
neg = 0;
nextnot = 0;
+   type = 0;
 
if (strcmp("not", argv[current]) == 0) {
not_seen = 1;
@@ -1101,7 +1102,7 @@ bsde_get_mib(const char *string, int *na
return (0);
 }
 
-int
+static int
 bsde_check_version(size_t buflen, char *errstr)
 {
size_t len;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284744 - head/lib/libusb

2015-06-23 Thread Marcelo Araujo
Author: araujo (ports committer)
Date: Wed Jun 24 01:34:35 2015
New Revision: 284744
URL: https://svnweb.freebsd.org/changeset/base/284744

Log:
  Remove unused variables to silence CLANG warnings.
  Remove some BLANK lines and unnecessary TABS.
  
  Differential Revision:D2687
  Reviewed by:  rodrigc, hselasky

Modified:
  head/lib/libusb/libusb10.c
  head/lib/libusb/libusb20_desc.c

Modified: head/lib/libusb/libusb10.c
==
--- head/lib/libusb/libusb10.c  Tue Jun 23 22:40:22 2015(r284743)
+++ head/lib/libusb/libusb10.c  Wed Jun 24 01:34:35 2015(r284744)
@@ -1008,7 +1008,6 @@ libusb10_isoc_proxy(struct libusb20_tran
uint16_t iso_packets;
uint16_t i;
uint8_t status;
-   uint8_t flags;
 
status = libusb20_tr_get_status(pxfer);
sxfer = libusb20_tr_get_priv_sc1(pxfer);
@@ -1016,7 +1015,7 @@ libusb10_isoc_proxy(struct libusb20_tran
iso_packets = libusb20_tr_get_max_frames(pxfer);
 
if (sxfer == NULL)
-   return; /* cancelled - nothing to do */
+   return; /* cancelled - nothing to do */
 
uxfer = (struct libusb_transfer *)(
((uint8_t *)sxfer) + sizeof(*sxfer));
@@ -1025,16 +1024,13 @@ libusb10_isoc_proxy(struct libusb20_tran
iso_packets = uxfer->num_iso_packets;
 
if (iso_packets == 0)
-   return; /* nothing to do */
+   return; /* nothing to do */
 
/* make sure that the number of ISOCHRONOUS packets is valid */
uxfer->num_iso_packets = iso_packets;
 
-   flags = uxfer->flags;
-
switch (status) {
case LIBUSB20_TRANSFER_COMPLETED:
-
/* update actual length */
uxfer->actual_length = actlen;
for (i = 0; i != iso_packets; i++) {
@@ -1043,9 +1039,7 @@ libusb10_isoc_proxy(struct libusb20_tran
}
libusb10_complete_transfer(pxfer, sxfer, 
LIBUSB_TRANSFER_COMPLETED);
break;
-
case LIBUSB20_TRANSFER_START:
-
/* setup length(s) */
actlen = 0;
for (i = 0; i != iso_packets; i++) {
@@ -1064,7 +1058,6 @@ libusb10_isoc_proxy(struct libusb20_tran
/* fork another USB transfer, if any */
libusb10_submit_transfer_sub(libusb20_tr_get_priv_sc0(pxfer), 
uxfer->endpoint);
break;
-
default:
libusb10_complete_transfer(pxfer, sxfer, 
libusb10_convert_error(status));
break;

Modified: head/lib/libusb/libusb20_desc.c
==
--- head/lib/libusb/libusb20_desc.c Tue Jun 23 22:40:22 2015
(r284743)
+++ head/lib/libusb/libusb20_desc.c Wed Jun 24 01:34:35 2015
(r284744)
@@ -517,9 +517,7 @@ libusb20_me_encode(void *ptr, uint16_t l
 * room for the
 * complete structure:
 */
-   uint16_t dummy;
-
-   dummy = libusb20_me_encode(buf,
+   (void) libusb20_me_encode(buf,
0x - 3, ps->ptr);
} else {
bcopy(src_ptr, buf, src_len);
@@ -673,7 +671,6 @@ libusb20_me_decode(const void *ptr, uint
~(LIBUSB20_ME_STRUCT_ALIGN - 1));   /* align */
while (pd_count--) {
uint16_t temp;
-   uint16_t dummy;
struct libusb20_me_struct *ps;
 
ps = LIBUSB20_ADD_BYTES(pd, pd_offset);
@@ -763,7 +760,7 @@ libusb20_me_decode(const void *ptr, uint
 * Recursivly decode
 * the next structure
 */
-   dummy = libusb20_me_decode(buf,
+   (void) libusb20_me_decode(buf,
temp, ps->ptr);
} else {
/* update type */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284743 - head/sys/sys

2015-06-23 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jun 23 22:40:22 2015
New Revision: 284743
URL: https://svnweb.freebsd.org/changeset/base/284743

Log:
  Rename __weak to __weak_symbol to avoid language conflict with objective-C.
  
  PR:   200972 (exp-run)
  Suggested by: theraven@
  MFC after:3 days

Modified:
  head/sys/sys/cdefs.h
  head/sys/sys/linker_set.h

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hTue Jun 23 22:31:04 2015(r284742)
+++ head/sys/sys/cdefs.hTue Jun 23 22:40:22 2015(r284743)
@@ -213,9 +213,9 @@
 #define__packed
 #define__aligned(x)
 #define__section(x)
-#define__weak
+#define__weak_symbol
 #else
-#define__weak  __attribute__((__weak__))
+#define__weak_symbol   __attribute__((__weak__))
 #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
 #define__dead2
 #define__pure2

Modified: head/sys/sys/linker_set.h
==
--- head/sys/sys/linker_set.h   Tue Jun 23 22:31:04 2015(r284742)
+++ head/sys/sys/linker_set.h   Tue Jun 23 22:40:22 2015(r284743)
@@ -80,8 +80,8 @@
  * Initialize before referring to a given linker set.
  */
 #define SET_DECLARE(set, ptype)\
-   extern ptype __weak *__CONCAT(__start_set_,set);\
-   extern ptype __weak *__CONCAT(__stop_set_,set)
+   extern ptype __weak_symbol *__CONCAT(__start_set_,set); \
+   extern ptype __weak_symbol *__CONCAT(__stop_set_,set)
 
 #define SET_BEGIN(set) \
(&__CONCAT(__start_set_,set))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r284706 - stable/10/sys/dev/ixl

2015-06-23 Thread Andrew Gallatin

On 6/22/15 11:56 PM, John Baldwin wrote:

I think you have to use if_initbaudrate() in 10 (maybe 9 as well?) instead of a 
direct assignment since if_baudrate is only a long (and thus 32-bit on 32-bit 
platforms).  We use an extra scaling variable in older branches to allow higher 
baud rates to be represented.



Thanks for pointing that out.   I'd forgotten about if_initbaudrate.
Should be fixed now.  Thanks again!

Drew
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284742 - stable/10/sys/dev/ixl

2015-06-23 Thread Andrew Gallatin
Author: gallatin
Date: Tue Jun 23 22:31:04 2015
New Revision: 284742
URL: https://svnweb.freebsd.org/changeset/base/284742

Log:
  Fix r284612:  As pointed out by jhb, in stable branches, if_baudrate
  is 32b on 32b platforms.  So rather than a simple MFC of r284612,
  we need to use if_initbaudrate() to properly express a 40Gb speed.
  
  Spotted by: jhb
  Sponsored by: Netflix

Modified:
  stable/10/sys/dev/ixl/if_ixl.c

Modified: stable/10/sys/dev/ixl/if_ixl.c
==
--- stable/10/sys/dev/ixl/if_ixl.c  Tue Jun 23 22:22:36 2015
(r284741)
+++ stable/10/sys/dev/ixl/if_ixl.c  Tue Jun 23 22:31:04 2015
(r284742)
@@ -2324,7 +2324,7 @@ ixl_setup_interface(device_t dev, struct
}
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
ifp->if_mtu = ETHERMTU;
-   ifp->if_baudrate = IF_Gbps(40);
+   if_initbaudrate(ifp, IF_Gbps(40));
ifp->if_init = ixl_init;
ifp->if_softc = vsi;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284741 - in head/sys: dev/qlxgbe modules/qlxgbe

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 22:22:36 2015
New Revision: 284741
URL: https://svnweb.freebsd.org/changeset/base/284741

Log:
  Updated Copyright information
  Added support for the following:
  - iSCSI TLV (requires 64 Tx and 32 Rx rings
  - 9K receive buffers for jumbo frames (feature may be 
enabled/disabled)
  - builtin firmware, bootloader and minidump template
  - quick stats
  - async event handling for SFP insertion/removal and DCBX changes
  - Configuring DCBX and interrupt coalescing parameters

Added:
  head/sys/dev/qlxgbe/ql_boot.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_fw.c   (contents, props changed)
  head/sys/dev/qlxgbe/ql_minidump.c   (contents, props changed)
Modified:
  head/sys/dev/qlxgbe/ql_dbg.c
  head/sys/dev/qlxgbe/ql_dbg.h
  head/sys/dev/qlxgbe/ql_def.h
  head/sys/dev/qlxgbe/ql_glbl.h
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_hw.h
  head/sys/dev/qlxgbe/ql_inline.h
  head/sys/dev/qlxgbe/ql_ioctl.c
  head/sys/dev/qlxgbe/ql_ioctl.h
  head/sys/dev/qlxgbe/ql_isr.c
  head/sys/dev/qlxgbe/ql_misc.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxgbe/ql_os.h
  head/sys/dev/qlxgbe/ql_reset.c
  head/sys/dev/qlxgbe/ql_tmplt.h
  head/sys/dev/qlxgbe/ql_ver.h
  head/sys/modules/qlxgbe/Makefile

Added: head/sys/dev/qlxgbe/ql_boot.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/qlxgbe/ql_boot.c   Tue Jun 23 22:22:36 2015
(r284741)
@@ -0,0 +1,10964 @@
+/*
+ * Copyright (c) 2012-2016 Qlogic Corporation
+ * All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *  1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *  2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * File: ql_boot.c
+ */
+#include 
+__FBSDID("$FreeBSD$");
+
+#include "ql_os.h"
+
+unsigned int ql83xx_bootloader_version_major = 5;
+unsigned int ql83xx_bootloader_version_minor = 2;
+unsigned int ql83xx_bootloader_version_sub = 7;
+unsigned char ql83xx_bootloader[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x04, 0x00, 0x80, 0x82, 0x05, 0x1f, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x80, 0x1e, 0x02, 0x21, 0x00, 0x08, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x20, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x21, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0,
+  0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x7c, 0x00,
+  0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 

svn commit: r284740 - svnadmin/conf

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 22:00:47 2015
New Revision: 284740
URL: https://svnweb.freebsd.org/changeset/base/284740

Log:
  added self to sizelimit.conf

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confTue Jun 23 20:09:52 2015
(r284739)
+++ svnadmin/conf/sizelimit.confTue Jun 23 22:00:47 2015
(r284740)
@@ -23,6 +23,7 @@ bapt
 brooks
 # cy
 #delphij
+davidcs
 des
 dim
 ed
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284739 - head/sys/dev/bxe

2015-06-23 Thread David C Somayajulu
Author: davidcs
Date: Tue Jun 23 20:09:52 2015
New Revision: 284739
URL: https://svnweb.freebsd.org/changeset/base/284739

Log:
  tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
  
  Submitted by:attilio@isilon.com
  MFC after:5 days

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

Modified: head/sys/dev/bxe/bxe.c
==
--- head/sys/dev/bxe/bxe.c  Tue Jun 23 20:01:12 2015(r284738)
+++ head/sys/dev/bxe/bxe.c  Tue Jun 23 20:09:52 2015(r284739)
@@ -6547,10 +6547,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
 
 #if __FreeBSD_version >= 80
 if (fp->tx_br != NULL) {
-struct mbuf *m;
 /* just in case bxe_mq_flush() wasn't called */
-while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL) {
-m_freem(m);
+if (mtx_initialized(&fp->tx_mtx)) {
+struct mbuf *m;
+
+BXE_FP_TX_LOCK(fp);
+while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL)
+m_freem(m);
+BXE_FP_TX_UNLOCK(fp);
 }
 buf_ring_free(fp->tx_br, M_DEVBUF);
 fp->tx_br = NULL;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284738 - head

2015-06-23 Thread Simon J. Gerraty
Author: sjg
Date: Tue Jun 23 20:01:12 2015
New Revision: 284738
URL: https://svnweb.freebsd.org/changeset/base/284738

Log:
  Remove entry about make.conf - no longer relevant

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Tue Jun 23 18:55:08 2015(r284737)
+++ head/UPDATING   Tue Jun 23 20:01:12 2015(r284738)
@@ -32,23 +32,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20150616:
-   /etc/make.conf now included earlier.
-   sys.mk now includes /etc/make.conf and {local,src}.sys.mk earlier
-   than previously.
-   This makes it simple to interpose external toolchains etc.
-   However it may cause problems for users who have things like::
-
-   INSTALL+= something
-
-   in /etc/make.conf, since INSTALL is not yet defined.
-   A safe fix for that is to have::
-
-   INSTALL?= install
-   INSTALL+= something
-
-   which is equivalent to previous behavior.
-   
-20150616:
FreeBSD's old make (fmake) has been removed from the system. It is
available as the devel/fmake port or via pkg install fmake.

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


svn commit: r284736 - head/sys/net

2015-06-23 Thread Dimitry Andric
Author: dim
Date: Tue Jun 23 18:48:41 2015
New Revision: 284736
URL: https://svnweb.freebsd.org/changeset/base/284736

Log:
  Fix endless recursion in sys/net/if.c's drbr_inuse_drv(), found by clang
  3.7.0.
  
  Reviewed by:  marcel

Modified:
  head/sys/net/if.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Tue Jun 23 18:46:29 2015(r284735)
+++ head/sys/net/if.c   Tue Jun 23 18:48:41 2015(r284736)
@@ -4005,7 +4005,7 @@ if_setgetcounterfn(if_t ifp, if_get_coun
 int
 drbr_inuse_drv(if_t ifh, struct buf_ring *br)
 {
-   return drbr_inuse_drv(ifh, br);
+   return drbr_inuse(ifh, br);
 }
 
 struct mbuf*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284733 - head/sys/kern

2015-06-23 Thread John-Mark Gurney
Author: jmg
Date: Tue Jun 23 18:40:20 2015
New Revision: 284733
URL: https://svnweb.freebsd.org/changeset/base/284733

Log:
  zero this struct as it depends upon it...
  
  Reviewed by:  mjg
  Differential Revision:https://reviews.freebsd.org/D2890

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==
--- head/sys/kern/vfs_subr.cTue Jun 23 17:54:24 2015(r284732)
+++ head/sys/kern/vfs_subr.cTue Jun 23 18:40:20 2015(r284733)
@@ -3602,7 +3602,7 @@ v_addpollinfo(struct vnode *vp)
 
if (vp->v_pollinfo != NULL)
return;
-   vi = uma_zalloc(vnodepoll_zone, M_WAITOK);
+   vi = uma_zalloc(vnodepoll_zone, M_WAITOK | M_ZERO);
mtx_init(&vi->vpi_lock, "vnode pollinfo", NULL, MTX_DEF);
knlist_init(&vi->vpi_selinfo.si_note, vp, vfs_knllock,
vfs_knlunlock, vfs_knl_assert_locked, vfs_knl_assert_unlocked);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284732 - head/lib/libcxxrt

2015-06-23 Thread Dimitry Andric
Author: dim
Date: Tue Jun 23 17:54:24 2015
New Revision: 284732
URL: https://svnweb.freebsd.org/changeset/base/284732

Log:
  Add __cxa_deleted_virtual to libcxxrt's version map.
  
  This symbol can sometimes be emitted by clang++, and was not yet
  exported from libcxxrt.  Attempt to be compatible with libsupc++ by
  using the same CXXABI_1.3.6 symbol version.
  
  Reported by:  y...@rawbw.com
  PR:   200863
  Reviewed by:  emaste
  MFC after:3 days
  Differential Revision: https://reviews.freebsd.org/D2850

Modified:
  head/lib/libcxxrt/Version.map

Modified: head/lib/libcxxrt/Version.map
==
--- head/lib/libcxxrt/Version.map   Tue Jun 23 17:26:46 2015
(r284731)
+++ head/lib/libcxxrt/Version.map   Tue Jun 23 17:54:24 2015
(r284732)
@@ -254,6 +254,10 @@ CXXABI_1.3.1 {
 __cxa_get_exception_ptr;
 } CXXABI_1.3;
 
+CXXABI_1.3.6 {
+__cxa_deleted_virtual;
+} CXXABI_1.3.1;
+
 
 CXXRT_1.0 {
 
@@ -286,7 +290,7 @@ CXXRT_1.0 {
 __cxa_increment_exception_refcount;
 __cxa_rethrow_primary_exception;
 
-} CXXABI_1.3.1;
+} CXXABI_1.3.6;
 
 
 GLIBCXX_3.4 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284731 - svnadmin/conf

2015-06-23 Thread Xin LI
Author: delphij
Date: Tue Jun 23 17:26:46 2015
New Revision: 284731
URL: https://svnweb.freebsd.org/changeset/base/284731

Log:
  Revert previous commit after driver source import.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confTue Jun 23 17:26:16 2015
(r284730)
+++ svnadmin/conf/sizelimit.confTue Jun 23 17:26:46 2015
(r284731)
@@ -22,7 +22,7 @@
 bapt
 brooks
 # cy
-delphij
+#delphij
 des
 dim
 ed
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284730 - head/sys/dev/hpt27xx

2015-06-23 Thread Xin LI
Author: delphij
Date: Tue Jun 23 17:26:16 2015
New Revision: 284730
URL: https://svnweb.freebsd.org/changeset/base/284730

Log:
  Update vendor driver to 1.2.7.  This update improves driver reliability and
  adds support of 4Kn drives and report LUNs command.
  
  This driver update is intended for 10.2-RELEASE.
  
  Many thanks to HighPoint for providing this driver update.
  
  Submitted by: Steve Chang
  MFC after:3 days

Modified:
  head/sys/dev/hpt27xx/README
  head/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu   (contents, props changed)
  head/sys/dev/hpt27xx/array.h
  head/sys/dev/hpt27xx/him.h
  head/sys/dev/hpt27xx/himfuncs.h
  head/sys/dev/hpt27xx/hpt27xx_config.c
  head/sys/dev/hpt27xx/hpt27xx_config.h
  head/sys/dev/hpt27xx/hpt27xx_os_bsd.c
  head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
  head/sys/dev/hpt27xx/hptintf.h
  head/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu
  head/sys/dev/hpt27xx/ldm.h
  head/sys/dev/hpt27xx/list.h
  head/sys/dev/hpt27xx/os_bsd.h
  head/sys/dev/hpt27xx/osm.h

Modified: head/sys/dev/hpt27xx/README
==
--- head/sys/dev/hpt27xx/README Tue Jun 23 17:26:05 2015(r284729)
+++ head/sys/dev/hpt27xx/README Tue Jun 23 17:26:16 2015(r284730)
@@ -1,10 +1,34 @@
 RocketRAID Controller Driver for FreeBSD
-Copyright (C) 2011 HighPoint Technologies, Inc. All rights reserved.
+Copyright (C) 2005-2015 HighPoint Technologies, Inc. All rights reserved.
 
 #
 Revision History:
-   v1.0 2011-12-27
-First source code release
+   v1.2.7.1 06/08/2015
+   * Add 10.x comment and correct file name in readme.
+   
+   v1.2.7 05/22/2015
+   * Support Report Luns command.
+   
+   v1.2.6 04/13/2015
+   * Fix a bug that some disks will be dropped when data integrity test over
+ one hour on 32bit system.
+  
+   v1.2.5 01/26/2015
+* Fix a bug that failed to verify controller by retrying 8 times.
+* Supported 4Kn drive.
+
+   v1.2.4 09/29/2014
+* Fix a bug that memory would be corrupted and caused strange system
+  behavior when running IO and WebGUI
+
+   v1.2.3 01/24/2014
+* fixup system crash while write date to raid5.
+
+   v1.1   07/01/2013
+* Fix 2nd RAID controller can not load as multipath issue.
+
+   v1.0   12/13/2011
+* First source code release
 
 #
 
@@ -40,7 +64,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+ # tar xvzf /your/path/to/HPT27xx_FreeBSD_Src_v1.2.7.1_15_06_08.tgz
 
   3) Update the kernel configuration file to include the HighPoint source.
  Assume the configure file is GENERIC, and new kernel configure file is 
@@ -62,8 +86,8 @@ Revision History:
   compile-with"uudecode < 
$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \
   no-implicit-rule
 
-  dev/hpt27xx/os_bsd.c  optionalhpt27xx
-  dev/hpt27xx/osm_bsd.c optionalhpt27xx
+  dev/hpt27xx/hpt27xx_os_bsd.c  optionalhpt27xx
+  dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx
   dev/hpt27xx/hpt27xx_config.c  optionalhpt27xx
 
  For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines
@@ -74,13 +98,13 @@ Revision History:
   compile-with"uudecode < 
$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \
   no-implicit-rule
 
-  dev/hpt27xx/os_bsd.c  optionalhpt27xx
-  dev/hpt27xx/osm_bsd.c optionalhpt27xx
+  dev/hpt27xx/hpt27xx_os_bsd.c  optionalhpt27xx
+  dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx
   dev/hpt27xx/hpt27xx_config.c  optionalhpt27xx
 
   6) Rebuild and install the kernel:
 
- a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386:
+ a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386/10.x-i386:
  
 # cd /usr/src/sys/i386/conf/
 # /usr/sbin/config MYKERNEL
@@ -89,7 +113,7 @@ Revision History:
 # make 
 # make install
 
- b) for FreeBSD 5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64:
+ b) for FreeBSD 
5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64/10.x-amd64:
 
 # cd /usr/src/sys/amd64/conf/
 # /usr/sbin/config MYKERNEL
@@ -122,7 +146,7 @@ Revision History:
   2) Extract the driver files under the kernel source tree:
 
  # cd /usr/src/sys/
- # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz
+ # tar xvzf /your/path/to/HPT27xx_FreeBSD_Src_v1.2.7.1_15_06_08.tgz
 
 
   4) Build the driver module:
@@ -136,7 +160,7 @@ Revision History:
  
  # cp hpt27xx.ko /modules/
 
- For FreeBSD 5.x/6.x/7.x/8.x/9.x:
+ For FreeBSD 5

svn commit: r284729 - svnadmin/conf

2015-06-23 Thread Xin LI
Author: delphij
Date: Tue Jun 23 17:26:05 2015
New Revision: 284729
URL: https://svnweb.freebsd.org/changeset/base/284729

Log:
  Raise my size limit temporarily.

Modified:
  svnadmin/conf/sizelimit.conf

Modified: svnadmin/conf/sizelimit.conf
==
--- svnadmin/conf/sizelimit.confTue Jun 23 16:34:43 2015
(r284728)
+++ svnadmin/conf/sizelimit.confTue Jun 23 17:26:05 2015
(r284729)
@@ -22,7 +22,7 @@
 bapt
 brooks
 # cy
-#delphij
+delphij
 des
 dim
 ed
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284728 - head/usr.sbin/fstyp

2015-06-23 Thread Allan Jude
Author: allanjude (doc committer)
Date: Tue Jun 23 16:34:43 2015
New Revision: 284728
URL: https://svnweb.freebsd.org/changeset/base/284728

Log:
  Switch fstyp build to toggle ZFS support on WITHOUT_ZFS rather than 
WITHOUT_CDDL
  
  PR:   200976
  Approved by:  imp
  MFC after:1 week
  Sponsored by: ScaleEngine Inc.
  Differential Revision:https://reviews.freebsd.org/D2045

Modified:
  head/usr.sbin/fstyp/Makefile
  head/usr.sbin/fstyp/fstyp.c
  head/usr.sbin/fstyp/fstyp.h

Modified: head/usr.sbin/fstyp/Makefile
==
--- head/usr.sbin/fstyp/MakefileTue Jun 23 16:13:20 2015
(r284727)
+++ head/usr.sbin/fstyp/MakefileTue Jun 23 16:34:43 2015
(r284728)
@@ -5,7 +5,7 @@
 PROG=  fstyp
 SRCS=  cd9660.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c
 
-.if ${MK_CDDL} != "no"
+.if ${MK_ZFS} != "no"
 SRCS +=zfs.c
 .endif
 
@@ -13,10 +13,10 @@ MAN=fstyp.8
 
 WARNS?=0
 
-.if ${MK_CDDL} != "no"
+.if ${MK_ZFS} != "no"
 IGNORE_PRAGMA=  YES
 
-CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_CDDL
+CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_ZFS
 CFLAGS+= -I${.CURDIR}/../../sys/cddl/compat/opensolaris
 CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/include
 CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/lib/libumem
@@ -33,7 +33,7 @@ CFLAGS+=-I${.CURDIR}/../../sys
 DPADD=   ${LIBGEOM} ${LIBMD}
 LDADD=   -lgeom -lmd
 
-.if ${MK_CDDL} != "no"
+.if ${MK_ZFS} != "no"
 DPADD += ${LIBNVPAIR} ${LIBZFS}
 LDADD += -lnvpair -lzfs
 .endif

Modified: head/usr.sbin/fstyp/fstyp.c
==
--- head/usr.sbin/fstyp/fstyp.c Tue Jun 23 16:13:20 2015(r284727)
+++ head/usr.sbin/fstyp/fstyp.c Tue Jun 23 16:34:43 2015(r284728)
@@ -63,7 +63,7 @@ static struct {
{ "msdosfs", &fstyp_msdosfs, false },
{ "ntfs", &fstyp_ntfs, false },
{ "ufs", &fstyp_ufs, false },
-#ifdef HAVE_CDDL
+#ifdef HAVE_ZFS
{ "zfs", &fstyp_zfs, true },
 #endif
{ NULL, NULL, NULL }

Modified: head/usr.sbin/fstyp/fstyp.h
==
--- head/usr.sbin/fstyp/fstyp.h Tue Jun 23 16:13:20 2015(r284727)
+++ head/usr.sbin/fstyp/fstyp.h Tue Jun 23 16:34:43 2015(r284728)
@@ -44,7 +44,7 @@ int   fstyp_geli(FILE *fp, char *label, si
 intfstyp_msdosfs(FILE *fp, char *label, size_t size);
 intfstyp_ntfs(FILE *fp, char *label, size_t size);
 intfstyp_ufs(FILE *fp, char *label, size_t size);
-#ifdef HAVE_CDDL
+#ifdef HAVE_ZFS
 intfstyp_zfs(FILE *fp, char *label, size_t size);
 #endif
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r284589 - head/usr.sbin/fstyp

2015-06-23 Thread Allan Jude
On 2015-06-23 12:12, Olivier Cochard-Labbé wrote:
> 
> On Fri, Jun 19, 2015 at 7:09 AM, Allan Jude  > wrote:
> 
> Author: allanjude (doc committer)
> Date: Fri Jun 19 05:09:02 2015
> New Revision: 284589
> URL: https://svnweb.freebsd.org/changeset/base/284589
> 
> Log:
>   Add the ability to detect ZFS and GELI encrypted file systems to
> fstyp(8)
> 
>   Functionality is hidden behind the -u flag to avoid confusing
> automounters
> 
>   PR:   200823
>   Reviewed by:  asomers, eadler, wblock (man page)
>   Approved by:  trasz
>   MFC after:10 days
>   Relnotes: yes
>   Sponsored by: ScaleEngine Inc.
>   Differential Revision:https://reviews.freebsd.org/D2045
> 
> 
> +
> +.if ${MK_CDDL} != "no"
> +SRCS +=zfs.c
> +.endif
> +
>  
> 
> 
> ​Hi,​
> 
> ​My nanobsd use WITHOUT_ZFS (MK_ZFS="no") but kept CDDL​ enabled for
> dtrace (MK_CDDL= "yes"): Then it failed to build world on usr.sbin/fstyp.
> 
> Regards,
> 

Yes, I have a fix for this, I just need approval to commit it

https://reviews.freebsd.org/D2045

-- 
Allan Jude



signature.asc
Description: OpenPGP digital signature


svn commit: r284727 - head/sys/dev/isp

2015-06-23 Thread Alexander Motin
Author: mav
Date: Tue Jun 23 16:13:20 2015
New Revision: 284727
URL: https://svnweb.freebsd.org/changeset/base/284727

Log:
  Add dev.isp.X.role sysctl in addition to tunable.
  
  It (mostly) allows to enable/disable initiator mode in run time.
  Target mode control is blocked here to force coordination with CTL.
  
  While there, add separate tunables/sysctls for virtual channels.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_pci.c

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Tue Jun 23 15:49:12 2015
(r284726)
+++ head/sys/dev/isp/isp_freebsd.c  Tue Jun 23 16:13:20 2015
(r284727)
@@ -84,6 +84,43 @@ static struct cdevsw isp_cdevsw = {
 };
 
 static int
+isp_role_sysctl(SYSCTL_HANDLER_ARGS)
+{
+   ispsoftc_t *isp = (ispsoftc_t *)arg1;
+   int chan = arg2;
+   int error, old, value;
+
+   value = FCPARAM(isp, chan)->role;
+
+   error = sysctl_handle_int(oidp, &value, 0, req);
+   if ((error != 0) || (req->newptr == NULL))
+   return (error);
+
+   if (value < ISP_ROLE_NONE || value > ISP_ROLE_BOTH)
+   return (EINVAL);
+
+   ISP_LOCK(isp);
+   old = FCPARAM(isp, chan)->role;
+
+   /* If nothing has changed -- we are done. */
+   if (value == old) {
+   ISP_UNLOCK(isp);
+   return (0);
+   }
+
+   /* We don't allow target mode switch from here. */
+   if ((value ^ old) & ISP_ROLE_TARGET) {
+   ISP_UNLOCK(isp);
+   return (EPERM);
+   }
+
+   /* Actually change the role. */
+   error = isp_fc_change_role(isp, chan, value);
+   ISP_UNLOCK(isp);
+   return (error);
+}
+
+static int
 isp_attach_chan(ispsoftc_t *isp, struct cam_devq *devq, int chan)
 {
struct ccb_setasync csa;
@@ -138,6 +175,9 @@ isp_attach_chan(ispsoftc_t *isp, struct 
} else {
fcparam *fcp = FCPARAM(isp, chan);
struct isp_fc *fc = ISP_FC_PC(isp, chan);
+   struct sysctl_ctx_list *ctx = 
device_get_sysctl_ctx(isp->isp_osinfo.dev);
+   struct sysctl_oid *tree = 
device_get_sysctl_tree(isp->isp_osinfo.dev);
+   char name[16];
 
ISP_LOCK(isp);
fc->sim = sim;
@@ -178,17 +218,21 @@ isp_attach_chan(ispsoftc_t *isp, struct 
}
ISP_FC_PC(isp, chan)->num_threads += 1;
 #endif
-   if (chan == 0) {
-   struct sysctl_ctx_list *ctx = 
device_get_sysctl_ctx(isp->isp_osinfo.dev);
-   struct sysctl_oid *tree = 
device_get_sysctl_tree(isp->isp_osinfo.dev);
-   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"wwnn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwnn, "World Wide Node Name");
-   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"wwpn", CTLFLAG_RD, &FCPARAM(isp, 0)->isp_wwpn, "World Wide Port Name");
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"loop_down_limit", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->loop_down_limit, 0, "Loop 
Down Limit");
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"gone_device_time", CTLFLAG_RW, &ISP_FC_PC(isp, 0)->gone_device_time, 0, "Gone 
Device Time");
+   if (chan > 0) {
+   snprintf(name, sizeof(name), "chan%d", chan);
+   tree = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree),
+   OID_AUTO, name, CTLFLAG_RW, 0, "Virtual channel");
+   }
+   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwnn", 
CTLFLAG_RD, &FCPARAM(isp, chan)->isp_wwnn, "World Wide Node Name");
+   SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "wwpn", 
CTLFLAG_RD, &FCPARAM(isp, chan)->isp_wwpn, "World Wide Port Name");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"loop_down_limit", CTLFLAG_RW, &ISP_FC_PC(isp, chan)->loop_down_limit, 0, "Loop 
Down Limit");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"gone_device_time", CTLFLAG_RW, &ISP_FC_PC(isp, chan)->gone_device_time, 0, 
"Gone Device Time");
 #if defined(ISP_TARGET_MODE) && defined(DEBUG)
-   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"inject_lost_data_frame", CTLFLAG_RW, &ISP_FC_PC(isp, 
0)->inject_lost_data_frame, 0, "Cause a Lost Frame on a Read");
+   SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, 
"inject_lost_data_frame", CTLFLAG_RW, &ISP_FC_PC(isp, 
chan)->inject_lost_data_frame, 0, "Cause a Lost Frame on a Read");
 #endif
-   }
+   SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+   "role", CTLTYPE_INT | CTLFLAG_RW, isp, chan,
+   isp_role_sysctl, "I", "Current role");
}
return (0);
 }

Modified: 

Re: svn commit: r284589 - head/usr.sbin/fstyp

2015-06-23 Thread Olivier Cochard-Labbé
On Fri, Jun 19, 2015 at 7:09 AM, Allan Jude  wrote:

> Author: allanjude (doc committer)
> Date: Fri Jun 19 05:09:02 2015
> New Revision: 284589
> URL: https://svnweb.freebsd.org/changeset/base/284589
>
> Log:
>   Add the ability to detect ZFS and GELI encrypted file systems to fstyp(8)
>
>   Functionality is hidden behind the -u flag to avoid confusing
> automounters
>
>   PR:   200823
>   Reviewed by:  asomers, eadler, wblock (man page)
>   Approved by:  trasz
>   MFC after:10 days
>   Relnotes: yes
>   Sponsored by: ScaleEngine Inc.
>   Differential Revision:https://reviews.freebsd.org/D2045
>
>
> +
> +.if ${MK_CDDL} != "no"
> +SRCS +=zfs.c
> +.endif
> +
>


​Hi,​

​My nanobsd use WITHOUT_ZFS (MK_ZFS="no") but kept CDDL​ enabled for dtrace
(MK_CDDL= "yes"): Then it failed to build world on usr.sbin/fstyp.

Regards,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r284725 - head/libexec/rtld-elf/aarch64

2015-06-23 Thread Andrew Turner
Author: andrew
Date: Tue Jun 23 10:32:26 2015
New Revision: 284725
URL: https://svnweb.freebsd.org/changeset/base/284725

Log:
  Also save x8. It may be passed into a function as the indirect result
  location pointer when the return value doesn't fit in a register, e.g. when
  returning a struct.
  
  Obtained from:ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/libexec/rtld-elf/aarch64/rtld_start.S

Modified: head/libexec/rtld-elf/aarch64/rtld_start.S
==
--- head/libexec/rtld-elf/aarch64/rtld_start.S  Tue Jun 23 06:59:46 2015
(r284724)
+++ head/libexec/rtld-elf/aarch64/rtld_start.S  Tue Jun 23 10:32:26 2015
(r284725)
@@ -68,6 +68,7 @@ ENTRY(_rtld_bind_start)
stp x2, x3, [sp, #-16]!
stp x4, x5, [sp, #-16]!
stp x6, x7, [sp, #-16]!
+   stp x8, xzr, [sp, #-16]!
 
/* Calculate reloff */
ldr x2, [x17, #0]   /* Get the address of the entry */
@@ -84,12 +85,13 @@ ENTRY(_rtld_bind_start)
bl  _rtld_bind
 
/* Restore the registers saved by the plt code */
-   ldp xzr, x30, [sp, #(4 * 16)]
+   ldp xzr, x30, [sp, #(5 * 16)]
 
/* Backup the address to branch to */
mov x16, x0
 
/* restore the arguments */
+   ldp x8, xzr, [sp], #16
ldp x6, x7, [sp], #16
ldp x4, x5, [sp], #16
ldp x2, x3, [sp], #16
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r284683 - head/etc/etc.arm

2015-06-23 Thread Dmitry Morozovsky
On Sun, 21 Jun 2015, John-Mark Gurney wrote:

> Glen Barber wrote this message on Sun, Jun 21, 2015 at 19:50 +:
> > Author: gjb
> > Date: Sun Jun 21 19:50:02 2015
> > New Revision: 284683
> > URL: https://svnweb.freebsd.org/changeset/base/284683
> > 
> > Log:
> >   Enable ttyu1, ttyu2, ttyu3 for arm installations.
> >   
> >   This should make all consoles available, whether it
> >   is VGA, HDMI, serial, or JTAG, but more importantly
> >   enables all consoles when ttyu0 is not predictable.
> >   For example, the Pandaboard ES apparently has three
> >   consoles available, but the DB9/RS232 serial port is
> >   ttyu2, so not available by default after the system
> >   boots.
> 
> I was about to do the same for at least ttyu1 for amd64/i386 as the
> RCC-VE 4860 from Netgate has the console on com2 (2f8) instead of
> com1(3f8)...
> 
> I couldn't use the live cd part of the memstick because of this...

also, many, if not all, IPMI default configs have SOL console on either com3 or 
com2


-- 
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: ma...@freebsd.org ]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru ***

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


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

2015-06-23 Thread Bruce Evans

On Mon, 22 Jun 2015, Ian Lepore wrote:


On Mon, 2015-06-22 at 22:16 +, Hiren Panchasara wrote:

Author: hiren
Date: Mon Jun 22 22:16:06 2015
New Revision: 284711
URL: https://svnweb.freebsd.org/changeset/base/284711

Log:
  Reverting r284710.
  Today I learned: iff == if and only if.

  Suggested by: many

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cMon Jun 22 21:53:55 2015
(r284710)
+++ head/sys/netinet/tcp_input.cMon Jun 22 22:16:06 2015
(r284711)
@@ -2476,7 +2476,7 @@ tcp_do_segment(struct mbuf *m, struct tc

/*
 * Compute the amount of data 
in flight first.
-* We can inject new data into 
the pipe if
+* We can inject new data into 
the pipe iff
 * we have less than 1/2 the 
original window's



 * worth of data in flight.
 */


It would be nice if people also learned to format code to 80 columns.
(This comment and its code are the only places in the file with gross
misformatting to 96 columns.  Elsewhere in the file, only the FBSDID()
line, 2 SYSCTL_INT()s, 1 comment line and 6 scattered statement lines
are not formatted for 80 columns.  Several more lines have length
exactly 80.  style(9) implicitly specifies formatting to 79 columns to
avoid line wrap for width exactly 80 on some 80-column terminals, but
I don't mind using the full 80 if necessary to avoid line splitting.)


I think this is a bad idea.  "iff" means "if and only if" in mathematics
and formal logic.  Comments are written in English.


No, "iff" means "if and only if" in informal mathematics and informal
logic.  It is used because being formally correct is too painful, while
plain "if" is just ambiguous or wrong.

Only very carefully written comments are written in English.  The above
comment is quite carefully written except for its indentation.  I think
some English style rules disallow writing "half" as "1/2", and both
"half" and "1/2" in it should probably be followed by "of", but I
object to following any English style rules that require replacing
small numbers like "1" by words like "one".

Bruce
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r284724 - head/sys/dev/ti

2015-06-23 Thread Dimitry Andric
Author: dim
Date: Tue Jun 23 06:59:46 2015
New Revision: 284724
URL: https://svnweb.freebsd.org/changeset/base/284724

Log:
  Fix r284722, by making it actually compile.
  
  Pointy hat to:dim

Modified:
  head/sys/dev/ti/if_ti.c

Modified: head/sys/dev/ti/if_ti.c
==
--- head/sys/dev/ti/if_ti.c Tue Jun 23 06:50:03 2015(r284723)
+++ head/sys/dev/ti/if_ti.c Tue Jun 23 06:59:46 2015(r284724)
@@ -3350,7 +3350,7 @@ ti_ifmedia_upd(struct ifnet *ifp)
 
sc = ifp->if_softc;
TI_LOCK(sc);
-   error = ti_ifmedia_upd_locked(ifp);
+   error = ti_ifmedia_upd_locked(sc);
TI_UNLOCK(sc);
 
return (error);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"