svn commit: r293734 - in head/sys: dev/sfxge/common modules/sfxge

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 08:32:53 2016
New Revision: 293734
URL: https://svnweb.freebsd.org/changeset/base/293734

Log:
  sfxge: add medford_impl.h, medford_nic.c, ef10_impl.h
  
  Creating some files together to do the build system changes in one go.
  
  Submitted by:   Mark Spender 
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4859

Added:
  head/sys/dev/sfxge/common/ef10_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/medford_impl.h   (contents, props changed)
  head/sys/dev/sfxge/common/medford_nic.c   (contents, props changed)
Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/modules/sfxge/Makefile

Added: head/sys/dev/sfxge/common/ef10_impl.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/sfxge/common/ef10_impl.h   Tue Jan 12 08:32:53 2016
(r293734)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2015 Solarflare Communications Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *this list of conditions and the following disclaimer in the documentation
+ *and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE 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.
+ *
+ * The views and conclusions contained in the software and documentation are
+ * those of the authors and should not be interpreted as representing official
+ * policies, either expressed or implied, of the FreeBSD Project.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef_SYS_EF10_IMPL_H
+#define_SYS_EF10_IMPL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_EF10_IMPL_H */

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 06:37:42 2016
(r293733)
+++ head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 08:32:53 2016
(r293734)
@@ -58,6 +58,14 @@
 #include "hunt_impl.h"
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+#include "medford_impl.h"
+#endif /* EFSYS_OPT_MEDFORD */
+
+#if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
+#include "ef10_impl.h"
+#endif /* (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) */
+
 #ifdef __cplusplus
 extern "C" {
 #endif

Added: head/sys/dev/sfxge/common/medford_impl.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/sfxge/common/medford_impl.hTue Jan 12 08:32:53 2016
(r293734)
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2015 Solarflare Communications Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *this list of conditions and the following disclaimer in the documentation
+ *and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE 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) HOWEV

svn commit: r293735 - stable/10/sys/dev/usb/controller

2016-01-12 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jan 12 08:49:40 2016
New Revision: 293735
URL: https://svnweb.freebsd.org/changeset/base/293735

Log:
  MFC r293192:
  Fix for directly connected FULL or LOW speed USB devices.

Modified:
  stable/10/sys/dev/usb/controller/dwc_otg.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/controller/dwc_otg.c
==
--- stable/10/sys/dev/usb/controller/dwc_otg.c  Tue Jan 12 08:32:53 2016
(r293734)
+++ stable/10/sys/dev/usb/controller/dwc_otg.c  Tue Jan 12 08:49:40 2016
(r293735)
@@ -457,6 +457,18 @@ dwc_otg_init_fifo(struct dwc_otg_softc *
return (0);
 }
 
+static uint8_t
+dwc_otg_uses_split(struct usb_device *udev)
+{
+   /*
+* When a LOW or FULL speed device is connected directly to
+* the USB port we don't use split transactions:
+*/ 
+   return (udev->speed != USB_SPEED_HIGH &&
+   udev->parent_hs_hub != NULL &&
+   udev->parent_hs_hub->parent_hub != NULL);
+}
+
 static void
 dwc_otg_update_host_frame_interval(struct dwc_otg_softc *sc)
 {
@@ -3325,16 +3337,16 @@ dwc_otg_setup_standard_chain(struct usb_
else
hcchar |= (td->ep_type << HCCHAR_EPTYPE_SHIFT);
 
-   if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_LOW)
-   hcchar |= HCCHAR_LSPDDEV;
if (UE_GET_DIR(xfer->endpointno) == UE_DIR_IN)
hcchar |= HCCHAR_EPDIR_IN;
 
switch (xfer->xroot->udev->speed) {
-   case USB_SPEED_FULL:
case USB_SPEED_LOW:
+   hcchar |= HCCHAR_LSPDDEV;
+   /* FALLTHROUGH */
+   case USB_SPEED_FULL:
/* check if root HUB port is running High Speed */
-   if (xfer->xroot->udev->parent_hs_hub != NULL) {
+   if (dwc_otg_uses_split(xfer->xroot->udev)) {
hcsplt = HCSPLT_SPLTENA |
(xfer->xroot->udev->hs_port_no <<
HCSPLT_PRTADDR_SHIFT) |
@@ -4156,7 +4168,10 @@ dwc_otg_device_isoc_start(struct usb_xfe
framenum = DSTS_SOFFN_GET(temp);
}
 
-   if (xfer->xroot->udev->parent_hs_hub != NULL)
+   /*
+* Check if port is doing 8000 or 1000 frames per second:
+*/
+   if (sc->sc_flags.status_high_speed)
framenum /= 8;
 
framenum &= DWC_OTG_FRAME_MASK;
@@ -4833,7 +4848,7 @@ dwc_otg_xfer_setup(struct usb_setup_para
td = USB_ADD_BYTES(parm->buf, parm->size[0]);
 
/* compute shared bandwidth resource index for TT */
-   if (parm->udev->parent_hs_hub != NULL && 
parm->udev->speed != USB_SPEED_HIGH) {
+   if (dwc_otg_uses_split(parm->udev)) {
if 
(parm->udev->parent_hs_hub->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT)
td->tt_index = parm->udev->device_index;
else
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293736 - stable/10/sys/ofed/include/linux

2016-01-12 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jan 12 09:00:19 2016
New Revision: 293736
URL: https://svnweb.freebsd.org/changeset/base/293736

Log:
  MFC r292989:
  Handle when filedescriptors are closed before initialized. An early
  fdclose() call can cause fget_unlocked() to fail.

Modified:
  stable/10/sys/ofed/include/linux/file.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ofed/include/linux/file.h
==
--- stable/10/sys/ofed/include/linux/file.h Tue Jan 12 08:49:40 2016
(r293735)
+++ stable/10/sys/ofed/include/linux/file.h Tue Jan 12 09:00:19 2016
(r293736)
@@ -95,10 +95,11 @@ fd_install(unsigned int fd, struct linux
 
if (fget_unlocked(curthread->td_proc->p_fd, fd, NULL, 0, &file,
NULL) != 0) {
-   file = NULL;
+   filp->_file = NULL;
+   } else {
+   filp->_file = file;
+   finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
}
-   filp->_file = file;
-   finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
 
/* drop the extra reference */
fput(filp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293737 - stable/9/sys/ofed/include/linux

2016-01-12 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Jan 12 09:03:39 2016
New Revision: 293737
URL: https://svnweb.freebsd.org/changeset/base/293737

Log:
  MFC r292989:
  Handle when filedescriptors are closed before initialized. An early
  fdclose() call can cause fget_unlocked() to fail.

Modified:
  stable/9/sys/ofed/include/linux/file.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/ofed/include/linux/file.h
==
--- stable/9/sys/ofed/include/linux/file.h  Tue Jan 12 09:00:19 2016
(r293736)
+++ stable/9/sys/ofed/include/linux/file.h  Tue Jan 12 09:03:39 2016
(r293737)
@@ -90,8 +90,12 @@ fd_install(unsigned int fd, struct linux
struct file *file;
 
file = fget_unlocked(curthread->td_proc->p_fd, fd);
-   filp->_file = file;
-   finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
+   if (file == NULL) {
+   filp->_file = NULL;
+   } else {
+   filp->_file = file;
+   finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops);
+   }
 
/* drop the extra reference */
fput(filp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293738 - in stable/10: sbin/geom/class/nop sys/geom/nop

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 09:27:01 2016
New Revision: 293738
URL: https://svnweb.freebsd.org/changeset/base/293738

Log:
  MFC r289110:
  
  Make geom_nop(4) collect statistics on all types of BIOs, not just
  reads and writes.
  
  PR:   kern/198405
  Submitted by: Matthew D. Fuller 
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3679

Modified:
  stable/10/sbin/geom/class/nop/gnop.8
  stable/10/sys/geom/nop/g_nop.c
  stable/10/sys/geom/nop/g_nop.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/geom/class/nop/gnop.8
==
--- stable/10/sbin/geom/class/nop/gnop.8Tue Jan 12 09:03:39 2016
(r293737)
+++ stable/10/sbin/geom/class/nop/gnop.8Tue Jan 12 09:27:01 2016
(r293738)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 15, 2015
+.Dd October 10, 2015
 .Dt GNOP 8
 .Os
 .Sh NAME
@@ -72,9 +72,10 @@ The
 utility is used for setting up transparent providers on existing ones.
 Its main purpose is testing other GEOM classes, as it allows forced provider
 removal and I/O error simulation with a given probability.
-It also gathers the following statistics: number of read requests, number of
-write requests, number of bytes read and number of bytes written.
-In addition, it can be used as a good starting point for implementing new GEOM
+It also gathers statistics on the number of read, write, delete,
+getattr, flush, and other requests, and the number of bytes read and written.
+.Nm
+can also be used as a good starting point for implementing new GEOM
 classes.
 .Pp
 The first argument to

Modified: stable/10/sys/geom/nop/g_nop.c
==
--- stable/10/sys/geom/nop/g_nop.c  Tue Jan 12 09:03:39 2016
(r293737)
+++ stable/10/sys/geom/nop/g_nop.c  Tue Jan 12 09:27:01 2016
(r293738)
@@ -119,6 +119,24 @@ g_nop_start(struct bio *bp)
sc->sc_wrotebytes += bp->bio_length;
failprob = sc->sc_wfailprob;
break;
+   case BIO_DELETE:
+   sc->sc_deletes++;
+   break;
+   case BIO_GETATTR:
+   sc->sc_getattrs++;
+   break;
+   case BIO_FLUSH:
+   sc->sc_flushes++;
+   break;
+   case BIO_CMD0:
+   sc->sc_cmd0s++;
+   break;
+   case BIO_CMD1:
+   sc->sc_cmd1s++;
+   break;
+   case BIO_CMD2:
+   sc->sc_cmd2s++;
+   break;
}
mtx_unlock(&sc->sc_lock);
if (failprob > 0) {
@@ -238,6 +256,12 @@ g_nop_create(struct gctl_req *req, struc
sc->sc_wfailprob = wfailprob;
sc->sc_reads = 0;
sc->sc_writes = 0;
+   sc->sc_deletes = 0;
+   sc->sc_getattrs = 0;
+   sc->sc_flushes = 0;
+   sc->sc_cmd0s = 0;
+   sc->sc_cmd1s = 0;
+   sc->sc_cmd2s = 0;
sc->sc_readbytes = 0;
sc->sc_wrotebytes = 0;
mtx_init(&sc->sc_lock, "gnop lock", NULL, MTX_DEF);
@@ -602,6 +626,12 @@ g_nop_ctl_reset(struct gctl_req *req, st
sc = pp->geom->softc;
sc->sc_reads = 0;
sc->sc_writes = 0;
+   sc->sc_deletes = 0;
+   sc->sc_getattrs = 0;
+   sc->sc_flushes = 0;
+   sc->sc_cmd0s = 0;
+   sc->sc_cmd1s = 0;
+   sc->sc_cmd2s = 0;
sc->sc_readbytes = 0;
sc->sc_wrotebytes = 0;
}
@@ -659,6 +689,12 @@ g_nop_dumpconf(struct sbuf *sb, const ch
sbuf_printf(sb, "%s%d\n", indent, sc->sc_error);
sbuf_printf(sb, "%s%ju\n", indent, sc->sc_reads);
sbuf_printf(sb, "%s%ju\n", indent, sc->sc_writes);
+   sbuf_printf(sb, "%s%ju\n", indent, sc->sc_deletes);
+   sbuf_printf(sb, "%s%ju\n", indent, 
sc->sc_getattrs);
+   sbuf_printf(sb, "%s%ju\n", indent, sc->sc_flushes);
+   sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd0s);
+   sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd1s);
+   sbuf_printf(sb, "%s%ju\n", indent, sc->sc_cmd2s);
sbuf_printf(sb, "%s%ju\n", indent,
sc->sc_readbytes);
sbuf_printf(sb, "%s%ju\n", indent,

Modified: stable/10/sys/geom/nop/g_nop.h
==
--- stable/10/sys/geom/nop/g_nop.h  Tue Jan 12 09:03:39 2016
(r293737)
+++ stable/10/sys/geom/nop/g_nop.h  Tue Jan 12 09:27:01 2016
(r293738)
@@ -65,6 +65,12 @@ struct g_nop_softc {
u_int   sc_wfailprob;
uintmax_t   sc_reads;
uintmax_t   sc_writes;
+   uintmax_t   sc_deletes;
+   uintmax_t   sc_getattrs;
+   uintmax_t   sc_flushes;
+   uintmax_t   sc_cmd0s;
+   uintmax_t   sc_cmd1s;
+   uintmax_t   sc_cmd2s;
uintmax_t 

Re: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd

2016-01-12 Thread Roger Pau Monné
El 11/01/16 a les 21.40, Colin Percival ha escrit:
> On 01/11/16 11:52, Kenneth D. Merry wrote:
>> On Mon, Jan 11, 2016 at 18:29:22 +0100, Roger Pau Monn?? wrote:
>>> The following patch solves the problem AFAICT, and I would like to 
>>> commit it ASAP:
>>
>> I think this should be fine.
> 
> In light of the "ASAP" and the hour in Roger's part of the world (and the
> fact that this was obstructing other work I want to do today) I committed
> this fix as r293698 after experimental confirmation that it fixes what I
> was seeing.
> 
> Thank you both for the quick investigation!

Thanks both for the fast response, let's hope that this doesn't
introduce any other regressions :).

Roger.

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


svn commit: r293739 - head/release

2016-01-12 Thread Colin Percival
Author: cperciva
Date: Tue Jan 12 09:42:21 2016
New Revision: 293739
URL: https://svnweb.freebsd.org/changeset/base/293739

Log:
  Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
  EC2 images.
  
  X-MFC after:  if/when the driver fixes get MFCed
  Relnotes: FreeBSD now supports EC2 Enhanced Networking

Modified:
  head/release/Makefile.ec2

Modified: head/release/Makefile.ec2
==
--- head/release/Makefile.ec2   Tue Jan 12 09:27:01 2016(r293738)
+++ head/release/Makefile.ec2   Tue Jan 12 09:42:21 2016(r293739)
@@ -51,7 +51,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
@echo "--"
@false
 .endif
-   /usr/local/bin/bsdec2-image-upload ${PUBLISH} \
+   /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov \
${.OBJDIR}/ec2.raw \
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \
"${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293740 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 09:52:38 2016
New Revision: 293740
URL: https://svnweb.freebsd.org/changeset/base/293740

Log:
  sfxge: update autogenerated monitors lists
  
  Submitted by:   Andy Moreton 
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_mon.c

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Tue Jan 12 09:42:21 2016
(r293739)
+++ head/sys/dev/sfxge/common/efx.h Tue Jan 12 09:52:38 2016
(r293740)
@@ -615,7 +615,7 @@ efx_mon_init(
 #defineEFX_MON_STATS_PAGE_SIZE 0x100
 #defineEFX_MON_MASK_ELEMENT_SIZE 32
 
-/* START MKCONFIG GENERATED MonitorHeaderStatsBlock c79c86b62a144846 */
+/* START MKCONFIG GENERATED MonitorHeaderStatsBlock c09b13f732431f23 */
 typedef enum efx_mon_stat_e {
EFX_MON_STAT_2_5V,
EFX_MON_STAT_VCCP1,
@@ -686,6 +686,12 @@ typedef enum efx_mon_stat_e {
EFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP,
EFX_MON_STAT_CONTROLLER_SLAVE_VPTAT_EXT_ADC,
EFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP_EXT_ADC,
+   EFX_MON_STAT_SODIMM_VOUT,
+   EFX_MON_STAT_SODIMM_0_TEMP,
+   EFX_MON_STAT_SODIMM_1_TEMP,
+   EFX_MON_STAT_PHY0_VCC,
+   EFX_MON_STAT_PHY1_VCC,
+   EFX_MON_STAT_CONTROLLER_TDIODE_TEMP,
EFX_MON_NSTATS
 } efx_mon_stat_t;
 

Modified: head/sys/dev/sfxge/common/efx_mon.c
==
--- head/sys/dev/sfxge/common/efx_mon.c Tue Jan 12 09:42:21 2016
(r293739)
+++ head/sys/dev/sfxge/common/efx_mon.c Tue Jan 12 09:52:38 2016
(r293740)
@@ -209,7 +209,7 @@ fail1:
 
 #if EFSYS_OPT_NAMES
 
-/* START MKCONFIG GENERATED MonitorStatNamesBlock b9328f15438c4d01 */
+/* START MKCONFIG GENERATED MonitorStatNamesBlock 01ee3ea01f23a0c4 */
 static const char  *__mon_stat_name[] = {
"value_2_5v",
"value_vccp1",
@@ -280,6 +280,12 @@ static const char  *__mon_stat_name[] = 
"controller_slave_internal_temp",
"controller_slave_vptat_ext_adc",
"controller_slave_internal_temp_ext_adc",
+   "sodimm_vout",
+   "sodimm_0_temp",
+   "sodimm_1_temp",
+   "phy0_vcc",
+   "phy1_vcc",
+   "controller_tdiode_temp",
 };
 
 /* END MKCONFIG GENERATED MonitorStatNamesBlock */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293741 - in stable/10/lib/libc: amd64/sys i386/sys

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 09:58:00 2016
New Revision: 293741
URL: https://svnweb.freebsd.org/changeset/base/293741

Log:
  MFC r285240:
  
  Remove reboot.S (part of libc).  It's not needed and was actually
  broken - returning 0 from reboot(2) resulted in SIGBUS.
  
  Sponsored by: The FreeBSD Foundation

Deleted:
  stable/10/lib/libc/amd64/sys/reboot.S
  stable/10/lib/libc/i386/sys/reboot.S
Modified:
  stable/10/lib/libc/amd64/sys/Makefile.inc
  stable/10/lib/libc/i386/sys/Makefile.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/amd64/sys/Makefile.inc
==
--- stable/10/lib/libc/amd64/sys/Makefile.inc   Tue Jan 12 09:52:38 2016
(r293740)
+++ stable/10/lib/libc/amd64/sys/Makefile.inc   Tue Jan 12 09:58:00 2016
(r293741)
@@ -5,7 +5,7 @@ SRCS+=  amd64_get_fsbase.c amd64_get_gsba
amd64_set_gsbase.c __vdso_gettc.c
 
 MDASM= vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
-   reboot.S sbrk.S setlogin.S sigreturn.S
+   sbrk.S setlogin.S sigreturn.S
 
 # Don't generate default code for these syscalls:
 NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o

Modified: stable/10/lib/libc/i386/sys/Makefile.inc
==
--- stable/10/lib/libc/i386/sys/Makefile.incTue Jan 12 09:52:38 2016
(r293740)
+++ stable/10/lib/libc/i386/sys/Makefile.incTue Jan 12 09:58:00 2016
(r293741)
@@ -9,7 +9,7 @@ SRCS+=  i386_get_fsbase.c i386_get_gsbase
__vdso_gettc.c
 
 MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
-   reboot.S sbrk.S setlogin.S sigreturn.S syscall.S
+   sbrk.S setlogin.S sigreturn.S syscall.S
 
 # Don't generate default code for these syscalls:
 NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293742 - in stable/10/sys: kern sys

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 10:09:03 2016
New Revision: 293742
URL: https://svnweb.freebsd.org/changeset/base/293742

Log:
  MFC r287107:
  
  Make vfs_unmountall() unmount /dev after /, not before.  The only
  reason this didn't result in an unclean shutdown is that devfs ignores
  MNT_FORCE flag.
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3467

Modified:
  stable/10/sys/kern/vfs_mount.c
  stable/10/sys/kern/vfs_mountroot.c
  stable/10/sys/kern/vfs_subr.c
  stable/10/sys/sys/vnode.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/vfs_mount.c
==
--- stable/10/sys/kern/vfs_mount.c  Tue Jan 12 09:58:00 2016
(r293741)
+++ stable/10/sys/kern/vfs_mount.c  Tue Jan 12 10:09:03 2016
(r293742)
@@ -1359,6 +1359,8 @@ dounmount(struct mount *mp, int flags, s
vput(coveredvp);
}
vfs_event_signal(NULL, VQ_UNMOUNT, 0);
+   if (mp == rootdevmp)
+   rootdevmp = NULL;
vfs_mount_destroy(mp);
return (0);
 }

Modified: stable/10/sys/kern/vfs_mountroot.c
==
--- stable/10/sys/kern/vfs_mountroot.c  Tue Jan 12 09:58:00 2016
(r293741)
+++ stable/10/sys/kern/vfs_mountroot.c  Tue Jan 12 10:09:03 2016
(r293742)
@@ -95,6 +95,11 @@ static struct mntarg *parse_mountroot_op
  */
 struct vnode *rootvnode;
 
+/*
+ * Mount of the system's /dev.
+ */
+struct mount *rootdevmp;
+
 char *rootdevnames[2] = {NULL, NULL};
 
 struct mtx root_holds_mtx;
@@ -236,6 +241,7 @@ vfs_mountroot_devfs(struct thread *td, s
mtx_unlock(&mountlist_mtx);
 
*mpp = mp;
+   rootdevmp = mp;
set_rootvnode();
 
error = kern_symlink(td, "/", "dev", UIO_SYSSPACE);

Modified: stable/10/sys/kern/vfs_subr.c
==
--- stable/10/sys/kern/vfs_subr.c   Tue Jan 12 09:58:00 2016
(r293741)
+++ stable/10/sys/kern/vfs_subr.c   Tue Jan 12 10:09:03 2016
(r293742)
@@ -3728,6 +3728,21 @@ SYSCTL_PROC(_kern, KERN_VNODE, vnode, CT
 "");
 #endif
 
+static void
+unmount_or_warn(struct mount *mp)
+{
+   int error;
+
+   error = dounmount(mp, MNT_FORCE, curthread);
+   if (error != 0) {
+   printf("unmount of %s failed (", mp->mnt_stat.f_mntonname);
+   if (error == EBUSY)
+   printf("BUSY)\n");
+   else
+   printf("%d)\n", error);
+   }
+}
+
 /*
  * Unmount all filesystems. The list is traversed in reverse order
  * of mounting to avoid dependencies.
@@ -3735,42 +3750,28 @@ SYSCTL_PROC(_kern, KERN_VNODE, vnode, CT
 void
 vfs_unmountall(void)
 {
-   struct mount *mp;
-   struct thread *td;
-   int error;
+   struct mount *mp, *tmp;
 
CTR1(KTR_VFS, "%s: unmounting all filesystems", __func__);
-   td = curthread;
 
/*
 * Since this only runs when rebooting, it is not interlocked.
 */
-   while(!TAILQ_EMPTY(&mountlist)) {
-   mp = TAILQ_LAST(&mountlist, mntlist);
+   TAILQ_FOREACH_REVERSE_SAFE(mp, &mountlist, mntlist, mnt_list, tmp) {
vfs_ref(mp);
-   error = dounmount(mp, MNT_FORCE, td);
-   if (error != 0) {
-   TAILQ_REMOVE(&mountlist, mp, mnt_list);
-   /*
-* XXX: Due to the way in which we mount the root
-* file system off of devfs, devfs will generate a
-* "busy" warning when we try to unmount it before
-* the root.  Don't print a warning as a result in
-* order to avoid false positive errors that may
-* cause needless upset.
-*/
-   if (strcmp(mp->mnt_vfc->vfc_name, "devfs") != 0) {
-   printf("unmount of %s failed (",
-   mp->mnt_stat.f_mntonname);
-   if (error == EBUSY)
-   printf("BUSY)\n");
-   else
-   printf("%d)\n", error);
-   }
-   } else {
-   /* The unmount has removed mp from the mountlist */
-   }
+
+   /*
+* Forcibly unmounting "/dev" before "/" would prevent clean
+* unmount of the latter.
+*/
+   if (mp == rootdevmp)
+   continue;
+
+   unmount_or_warn(mp);
}
+
+   if (rootdevmp != NULL)
+   unmount_or_warn(rootdevmp);
 }
 
 /*

Modified: stable/10/sys/sys/vnode.h
=

svn commit: r293743 - in stable/10: lib/libc/sys sys/kern sys/sys

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 10:11:29 2016
New Revision: 293743
URL: https://svnweb.freebsd.org/changeset/base/293743

Log:
  MFC r287964:
  
  Kernel part of reroot support - a way to change rootfs without reboot.
  
  Note that the mountlist manipulations are somewhat fragile, and not very
  pretty.  The reason for this is to avoid changing vfs_mountroot(), which
  is (obviously) rather mission-critical, but not very well documented,
  and thus hard to test properly.  It might be possible to rework it to use
  its own simple root mount mechanism instead of vfs_mountroot().
  
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D2698

Modified:
  stable/10/lib/libc/sys/reboot.2
  stable/10/sys/kern/kern_shutdown.c
  stable/10/sys/kern/vfs_mountroot.c
  stable/10/sys/sys/reboot.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/lib/libc/sys/reboot.2
==
--- stable/10/lib/libc/sys/reboot.2 Tue Jan 12 10:09:03 2016
(r293742)
+++ stable/10/lib/libc/sys/reboot.2 Tue Jan 12 10:11:29 2016
(r293743)
@@ -113,6 +113,13 @@ Normally, the disks are sync'd (see
 before the processor is halted or rebooted.
 This option may be useful if file system changes have been made manually
 or if the processor is on fire.
+.It Dv RB_REROOT
+Instead of rebooting, unmount all filesystems except the one containing
+currently-running executable, and mount root filesystem using the same
+mechanism which is used during normal boot, based on
+vfs.root.mountfrom
+.Xr kenv 8
+variable.
 .It Dv RB_RDONLY
 Initially mount the root file system read-only.
 This is currently the default, and this option has been deprecated.

Modified: stable/10/sys/kern/kern_shutdown.c
==
--- stable/10/sys/kern/kern_shutdown.c  Tue Jan 12 10:09:03 2016
(r293742)
+++ stable/10/sys/kern/kern_shutdown.c  Tue Jan 12 10:11:29 2016
(r293743)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -157,10 +158,16 @@ static struct dumperinfo dumper;  /* our 
 static struct pcb dumppcb; /* Registers. */
 lwpid_t dumptid;   /* Thread ID. */
 
+static struct cdevsw reroot_cdevsw = {
+ .d_version = D_VERSION,
+ .d_name= "reroot",
+};
+
 static void poweroff_wait(void *, int);
 static void shutdown_halt(void *junk, int howto);
 static void shutdown_panic(void *junk, int howto);
 static void shutdown_reset(void *junk, int howto);
+static int kern_reroot(void);
 
 /* register various local shutdown events */
 static void
@@ -180,6 +187,26 @@ shutdown_conf(void *unused)
 SYSINIT(shutdown_conf, SI_SUB_INTRINSIC, SI_ORDER_ANY, shutdown_conf, NULL);
 
 /*
+ * The only reason this exists is to create the /dev/reroot/ directory,
+ * used by reroot code in init(8) as a mountpoint for tmpfs.
+ */
+static void
+reroot_conf(void *unused)
+{
+   int error;
+   struct cdev *cdev;
+
+   error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &cdev,
+   &reroot_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "reroot/reroot");
+   if (error != 0) {
+   printf("%s: failed to create device node, error %d",
+   __func__, error);
+   }
+}
+
+SYSINIT(reroot_conf, SI_SUB_DEVFS, SI_ORDER_ANY, reroot_conf, NULL);
+
+/*
  * The system call that results in a reboot.
  */
 /* ARGSUSED */
@@ -195,9 +222,13 @@ sys_reboot(struct thread *td, struct reb
if (error == 0)
error = priv_check(td, PRIV_REBOOT);
if (error == 0) {
-   mtx_lock(&Giant);
-   kern_reboot(uap->opt);
-   mtx_unlock(&Giant);
+   if (uap->opt & RB_REROOT) {
+   error = kern_reroot();
+   } else {
+   mtx_lock(&Giant);
+   kern_reboot(uap->opt);
+   mtx_unlock(&Giant);
+   }
}
return (error);
 }
@@ -462,6 +493,102 @@ kern_reboot(int howto)
 }
 
 /*
+ * The system call that results in changing the rootfs.
+ */
+static int
+kern_reroot(void)
+{
+   struct vnode *oldrootvnode, *vp;
+   struct mount *mp, *devmp;
+   int error;
+
+   if (curproc != initproc)
+   return (EPERM);
+
+   /*
+* Mark the filesystem containing currently-running executable
+* (the temporary copy of init(8)) busy.
+*/
+   vp = curproc->p_textvp;
+   error = vn_lock(vp, LK_SHARED);
+   if (error != 0)
+   return (error);
+   mp = vp->v_mount;
+   error = vfs_busy(mp, MBF_NOWAIT);
+   if (error != 0) {
+   vfs_ref(mp);
+   VOP_UNLOCK(vp, 0);
+   error = vfs_busy(mp, 0);
+   vn_lock(vp, LK_SHARED | LK_RETRY);
+  

svn commit: r293744 - in stable/10/sbin: init reboot

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 10:14:57 2016
New Revision: 293744
URL: https://svnweb.freebsd.org/changeset/base/293744

Log:
  MFC r290548:
  
  Userspace part of reroot support. This makes it possible to change
  the root filesystem without full reboot, using "reboot -r". This can
  be used to to eg. boot from a temporary md_image preloaded by loader(8),
  setup an iSCSI session, and continue booting from rootfs mounted over
  iSCSI.
  
  Relnotes: yes
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D3693

Modified:
  stable/10/sbin/init/Makefile
  stable/10/sbin/init/init.c
  stable/10/sbin/init/pathnames.h
  stable/10/sbin/reboot/reboot.8
  stable/10/sbin/reboot/reboot.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/init/Makefile
==
--- stable/10/sbin/init/MakefileTue Jan 12 10:11:29 2016
(r293743)
+++ stable/10/sbin/init/MakefileTue Jan 12 10:14:57 2016
(r293744)
@@ -2,6 +2,7 @@
 # $FreeBSD$
 
 PROG=  init
+SRCS=  init.c getmntopts.c
 MAN=   init.8
 PRECIOUSPROG=
 INSTALLFLAGS=-b -B.bak
@@ -9,6 +10,11 @@ CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CA
 DPADD= ${LIBUTIL} ${LIBCRYPT}
 LDADD= -lutil -lcrypt
 
+# Needed for getmntopts.c
+MOUNT= ${.CURDIR}/../../sbin/mount
+CFLAGS+=-I${MOUNT}
+.PATH: ${MOUNT}
+
 NO_SHARED?=YES
 
 .include 

Modified: stable/10/sbin/init/init.c
==
--- stable/10/sbin/init/init.c  Tue Jan 12 10:11:29 2016(r293743)
+++ stable/10/sbin/init/init.c  Tue Jan 12 10:14:57 2016(r293744)
@@ -46,6 +46,7 @@ static const char rcsid[] =
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -79,6 +80,7 @@ static const char rcsid[] =
 #include 
 #endif
 
+#include "mntopts.h"
 #include "pathnames.h"
 
 /*
@@ -103,6 +105,7 @@ static void warning(const char *, ...) _
 static void emergency(const char *, ...) __printflike(1, 2);
 static void disaster(int);
 static void badsys(int);
+static void revoke_ttys(void);
 static int  runshutdown(void);
 static char *strk(char *);
 
@@ -122,6 +125,8 @@ static state_func_t clean_ttys(void);
 static state_func_t catatonia(void);
 static state_func_t death(void);
 static state_func_t death_single(void);
+static state_func_t reroot(void);
+static state_func_t reroot_phase_two(void);
 
 static state_func_t run_script(const char *);
 
@@ -194,7 +199,7 @@ main(int argc, char *argv[])
 {
state_t initial_transition = runcom;
char kenv_value[PATH_MAX];
-   int c;
+   int c, error;
struct sigaction sa;
sigset_t mask;
 
@@ -227,6 +232,9 @@ main(int argc, char *argv[])
case 'q': /* rescan /etc/ttys */
sig = SIGHUP;
break;
+   case 'r': /* remount root */
+   sig = SIGEMT;
+   break;
default:
goto invalid;
}
@@ -248,7 +256,7 @@ invalid:
/*
 * Create an initial session.
 */
-   if (setsid() < 0)
+   if (setsid() < 0 && (errno != EPERM || getsid(0) != 1))
warning("initial setsid() failed: %m");
 
/*
@@ -262,7 +270,7 @@ invalid:
 * This code assumes that we always get arguments through flags,
 * never through bits set in some random machine register.
 */
-   while ((c = getopt(argc, argv, "dsf")) != -1)
+   while ((c = getopt(argc, argv, "dsfr")) != -1)
switch (c) {
case 'd':
devfs = 1;
@@ -273,6 +281,9 @@ invalid:
case 'f':
runcom_mode = FASTBOOT;
break;
+   case 'r':
+   initial_transition = reroot_phase_two;
+   break;
default:
warning("unrecognized flag '-%c'", c);
break;
@@ -288,13 +299,13 @@ invalid:
handle(badsys, SIGSYS, 0);
handle(disaster, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGXCPU,
SIGXFSZ, 0);
-   handle(transition_handler, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGUSR1,
-   SIGUSR2, 0);
+   handle(transition_handler, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP,
+   SIGUSR1, SIGUSR2, 0);
handle(alrm_handler, SIGALRM, 0);
sigfillset(&mask);
delset(&mask, SIGABRT, SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGSYS,
-   SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGTERM, SIGTSTP, SIGALRM,
-   SIGUSR1, SIGUSR2, 0);
+   SIGXCPU, SIGXFSZ, SIGHUP, SIGINT, SIGEMT, SIGTERM, SIGTSTP,
+   SIGALRM, SIGUSR1, SIGUSR2, 0);

svn commit: r293745 - head/usr.sbin/bhyvectl

2016-01-12 Thread Christian Brueffer
Author: brueffer
Date: Tue Jan 12 10:16:15 2016
New Revision: 293745
URL: https://svnweb.freebsd.org/changeset/base/293745

Log:
  Add a basic bhyvectl manpage.
  
  Reviewed by:  neel
  MFC after:2 weeks

Added:
  head/usr.sbin/bhyvectl/bhyvectl.8   (contents, props changed)
Modified:
  head/usr.sbin/bhyvectl/Makefile

Modified: head/usr.sbin/bhyvectl/Makefile
==
--- head/usr.sbin/bhyvectl/Makefile Tue Jan 12 10:14:57 2016
(r293744)
+++ head/usr.sbin/bhyvectl/Makefile Tue Jan 12 10:16:15 2016
(r293745)
@@ -5,7 +5,7 @@
 PROG=  bhyvectl
 SRCS=  bhyvectl.c
 
-MAN=
+MAN=   bhyvectl.8
 
 LIBADD=vmmapi util
 

Added: head/usr.sbin/bhyvectl/bhyvectl.8
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.sbin/bhyvectl/bhyvectl.8   Tue Jan 12 10:16:15 2016
(r293745)
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2015 Christian Brueffer
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 12, 2016
+.Dt BHYVECTL 8
+.Os
+.Sh NAME
+.Nm bhyvectl
+.Nd "control utility for bhyve instances"
+.Sh SYNOPSIS
+.Nm
+.Fl -vm= Ns Ar 
+.Op Fl -create
+.Op Fl -destroy
+.Op Fl -get-stats
+.Op Fl -inject-nmi
+.Op Fl -force-reset
+.Op Fl -force-poweroff
+.Sh DESCRIPTION
+The
+.Nm
+command is a control utility for active
+.Xr bhyve 8
+virtual machine instances.
+.Pp
+.Em Note :
+Most
+.Nm
+flags are intended for querying and setting the state of an active instance.
+These commands are intended for development purposes, and are not documented 
here.
+A complete list can be obtained by executing
+.Nm
+without any arguments.
+.Pp
+The user-facing options are as follows:
+.Bl -tag -width ".Fl d Ar argument"
+.It Fl -vm= Ns Ar 
+Operate on the virtual machine
+.Ar  .
+.It Fl -create
+Create the specified VM.
+.It Fl -destroy
+Destroy the specified VM.
+.It Fl -get-state
+Retrieve statistics for the specified VM.
+.It Fl -inject-nmi
+Inject a non-maskable interrupt (NMI) into the VM.
+.It Fl -force-reset
+Force the VM to reset.
+.It Fl -force-poweroff
+Force the VM to power off.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh EXAMPLES
+Destroy the VM called fbsd10:
+.Pp
+.Dl "bhyvectl --vm=fbsd10 --destroy"
+.Sh SEE ALSO
+.Xr bhyve 8 ,
+.Xr bhyveload 8
+.Sh HISTORY
+The
+.Nm
+command first appeared in
+.Fx 10.1 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+utility was written by
+.An Peter Grehan
+and
+.An Neel Natu .
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293746 - head/sys/conf

2016-01-12 Thread Christian Brueffer
Author: brueffer
Date: Tue Jan 12 10:19:56 2016
New Revision: 293746
URL: https://svnweb.freebsd.org/changeset/base/293746

Log:
  Document etherswitch and drivers using this framework.
  
  MFC after:2 weeks

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Tue Jan 12 10:16:15 2016(r293745)
+++ head/sys/conf/NOTES Tue Jan 12 10:19:56 2016(r293746)
@@ -2586,6 +2586,25 @@ device   pps
 device lpbb
 device pcfclock
 
+#
+# Etherswitch framework and drivers
+#
+# etherswitch  The etherswitch(4) framework
+# miiproxy Proxy device for miibus(4) functionality
+# 
+# Switch hardware support:
+# arswitch Atheros switches
+# ip17xIC+ 17x family switches
+# rtl8366r Realtek RTL8366 switches
+# ukswitch Multi-PHY switches
+#
+device etherswitch
+device miiproxy
+device arswitch
+device ip17x
+device rtl8366rb
+device ukswitch
+
 # Kernel BOOTP support
 
 optionsBOOTP   # Use BOOTP to obtain IP address/hostname
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293747 - stable/10/sbin/init

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 10:24:08 2016
New Revision: 293747
URL: https://svnweb.freebsd.org/changeset/base/293747

Log:
  MFC r290689:
  
  Fix resource leaks in error cases.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sbin/init/init.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/init/init.c
==
--- stable/10/sbin/init/init.c  Tue Jan 12 10:19:56 2016(r293746)
+++ stable/10/sbin/init/init.c  Tue Jan 12 10:24:08 2016(r293747)
@@ -660,6 +660,7 @@ read_file(const char *path, void **bufp,
error = fstat(fd, &sb);
if (error != 0) {
emergency("fstat: %s", strerror(errno));
+   close(fd);
return (error);
}
 
@@ -667,12 +668,14 @@ read_file(const char *path, void **bufp,
buf = malloc(bufsize);
if (buf == NULL) {
emergency("malloc: %s", strerror(errno));
+   close(fd);
return (error);
}
 
nbytes = read(fd, buf, bufsize);
if (nbytes != (ssize_t)bufsize) {
emergency("read: %s", strerror(errno));
+   close(fd);
free(buf);
return (error);
}
@@ -691,7 +694,7 @@ read_file(const char *path, void **bufp,
 }
 
 static int
-create_file(const char *path, void *buf, size_t bufsize)
+create_file(const char *path, const void *buf, size_t bufsize)
 {
ssize_t nbytes;
int error, fd;
@@ -705,13 +708,13 @@ create_file(const char *path, void *buf,
nbytes = write(fd, buf, bufsize);
if (nbytes != (ssize_t)bufsize) {
emergency("write: %s", strerror(errno));
+   close(fd);
return (-1);
}
 
error = close(fd);
if (error != 0) {
emergency("close: %s", strerror(errno));
-   free(buf);
return (-1);
}
 
@@ -757,6 +760,9 @@ reroot(void)
size_t bufsize, init_path_len;
int error, name[4];
 
+   buf = NULL;
+   bufsize = 0;
+
name[0] = CTL_KERN;
name[1] = KERN_PROC;
name[2] = KERN_PROC_PATHNAME;
@@ -782,12 +788,6 @@ reroot(void)
}
 
/*
-* Pacify GCC.
-*/
-   buf = NULL;
-   bufsize = 0;
-
-   /*
 * Copy the init binary into tmpfs, so that we can unmount
 * the old rootfs without committing suicide.
 */
@@ -809,6 +809,7 @@ reroot(void)
 
 out:
emergency("reroot failed; going to single user mode");
+   free(buf);
return (state_func_t) single_user;
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293739 - head/release

2016-01-12 Thread Kubilay Kocak
On 12/01/2016 8:42 PM, Colin Percival wrote:
> Author: cperciva
> Date: Tue Jan 12 09:42:21 2016
> New Revision: 293739
> URL: https://svnweb.freebsd.org/changeset/base/293739
> 
> Log:
>   Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
>   EC2 images.
>   
>   X-MFC after:if/when the driver fixes get MFCed

Is there a Bugzilla issue reference for this (or the head changeset)?

>   Relnotes:   FreeBSD now supports EC2 Enhanced Networking
> 
> Modified:
>   head/release/Makefile.ec2
> 
> Modified: head/release/Makefile.ec2
> ==
> --- head/release/Makefile.ec2 Tue Jan 12 09:27:01 2016(r293738)
> +++ head/release/Makefile.ec2 Tue Jan 12 09:42:21 2016(r293739)
> @@ -51,7 +51,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL}
>   @echo "--"
>   @false
>  .endif
> - /usr/local/bin/bsdec2-image-upload ${PUBLISH} \
> + /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov \
>   ${.OBJDIR}/ec2.raw \
>   "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \
>   "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \
> ___
> svn-src-h...@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-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293748 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:26:04 2016
New Revision: 293748
URL: https://svnweb.freebsd.org/changeset/base/293748

Log:
  sfxge: change hunt specific fields of efx_nic_t to ef10
  
  All these fields will be used in shared ef10 code, so put them in an
  ef10 member of a per-architecture union, rather that in the per-chip
  union.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4865

Modified:
  head/sys/dev/sfxge/common/ef10_impl.h
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/hunt_nic.c
  head/sys/dev/sfxge/common/hunt_vpd.c
  head/sys/dev/sfxge/common/medford_impl.h

Modified: head/sys/dev/sfxge/common/ef10_impl.h
==
--- head/sys/dev/sfxge/common/ef10_impl.h   Tue Jan 12 10:24:08 2016
(r293747)
+++ head/sys/dev/sfxge/common/ef10_impl.h   Tue Jan 12 13:26:04 2016
(r293748)
@@ -37,6 +37,13 @@
 extern "C" {
 #endif
 
+#if (EFSYS_OPT_HUNTINGTON && EFSYS_OPT_MEDFORD)
+#defineEF10_MAX_PIOBUF_NBUFS   MAX(HUNT_PIOBUF_NBUFS, 
MEDFORD_PIOBUF_NBUFS)
+#elif EFSYS_OPT_HUNTINGTON
+#defineEF10_MAX_PIOBUF_NBUFS   HUNT_PIOBUF_NBUFS
+#elif EFSYS_OPT_MEDFORD
+#defineEF10_MAX_PIOBUF_NBUFS   MEDFORD_PIOBUF_NBUFS
+#endif
 
 
 

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 10:24:08 2016
(r293747)
+++ head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 13:26:04 2016
(r293748)
@@ -672,26 +672,29 @@ struct efx_nic_s {
int enu_unused;
} siena;
 #endif /* EFSYS_OPT_SIENA */
-#if EFSYS_OPT_HUNTINGTON
+   int enu_unused;
+   } en_u;
+#if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
+   union en_arch {
struct {
-   int enu_vi_base;
-   int enu_vi_count;
+   int ena_vi_base;
+   int ena_vi_count;
 #if EFSYS_OPT_VPD
-   caddr_t enu_svpd;
-   size_t  enu_svpd_length;
+   caddr_t ena_svpd;
+   size_t  ena_svpd_length;
 #endif /* EFSYS_OPT_VPD */
-   efx_piobuf_handle_t 
enu_piobuf_handle[HUNT_PIOBUF_NBUFS];
-   uint32_tenu_piobuf_count;
-   uint32_t
enu_pio_alloc_map[HUNT_PIOBUF_NBUFS];
-   uint32_tenu_pio_write_vi_base;
+   efx_piobuf_handle_t 
ena_piobuf_handle[EF10_MAX_PIOBUF_NBUFS];
+   uint32_tena_piobuf_count;
+   uint32_t
ena_pio_alloc_map[EF10_MAX_PIOBUF_NBUFS];
+   uint32_tena_pio_write_vi_base;
/* Memory BAR mapping regions */
-   uint32_tenu_uc_mem_map_offset;
-   size_t  enu_uc_mem_map_size;
-   uint32_tenu_wc_mem_map_offset;
-   size_t  enu_wc_mem_map_size;
-   } hunt;
-#endif /* EFSYS_OPT_HUNTINGTON */
-   } en_u;
+   uint32_tena_uc_mem_map_offset;
+   size_t  ena_uc_mem_map_size;
+   uint32_tena_wc_mem_map_offset;
+   size_t  ena_wc_mem_map_size;
+   } ef10;
+   } en_arch;
+#endif /* (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) */
 };
 
 

Modified: head/sys/dev/sfxge/common/hunt_nic.c
==
--- head/sys/dev/sfxge/common/hunt_nic.cTue Jan 12 10:24:08 2016
(r293747)
+++ head/sys/dev/sfxge/common/hunt_nic.cTue Jan 12 13:26:04 2016
(r293748)
@@ -715,30 +715,30 @@ hunt_nic_alloc_piobufs(
efx_rc_t rc;
 
EFSYS_ASSERT3U(max_piobuf_count, <=,
-   EFX_ARRAY_SIZE(enp->en_u.hunt.enu_piobuf_handle));
+   EFX_ARRAY_SIZE(enp->en_arch.ef10.ena_piobuf_handle));
 
-   enp->en_u.hunt.enu_piobuf_count = 0;
+   enp->en_arch.ef10.ena_piobuf_count = 0;
 
for (i = 0; i < max_piobuf_count; i++) {
-   handlep = &enp->en_u.hunt.enu_piobuf_handle[i];
+   handlep = &enp->en_arch.ef10.ena_piobuf_handle[i];
 
if ((rc = efx_mcdi_alloc_piobuf(enp, handlep)) != 0)
goto fail1;
 
-   enp->en_u.hunt.en

svn commit: r293749 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:27:46 2016
New Revision: 293749
URL: https://svnweb.freebsd.org/changeset/base/293749

Log:
  sfxge: use NIC config in place of some Huntington specific PIO constants
  
  This should allow these functions to work for Medford as well.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4866

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/hunt_nic.c

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Tue Jan 12 13:26:04 2016
(r293748)
+++ head/sys/dev/sfxge/common/efx.h Tue Jan 12 13:27:46 2016
(r293749)
@@ -1128,6 +1128,7 @@ typedef struct efx_nic_cfg_s {
uint32_tenc_buftbl_limit;
uint32_tenc_piobuf_limit;
uint32_tenc_piobuf_size;
+   uint32_tenc_piobuf_min_alloc_size;
uint32_tenc_evq_timer_quantum_ns;
uint32_tenc_evq_timer_max_us;
uint32_tenc_clk_mult;

Modified: head/sys/dev/sfxge/common/hunt_nic.c
==
--- head/sys/dev/sfxge/common/hunt_nic.cTue Jan 12 13:26:04 2016
(r293748)
+++ head/sys/dev/sfxge/common/hunt_nic.cTue Jan 12 13:27:46 2016
(r293749)
@@ -768,6 +768,7 @@ hunt_nic_pio_alloc(
__out   uint32_t *offsetp,
__out   size_t *sizep)
 {
+   efx_nic_cfg_t *encp = &enp->en_nic_cfg;
efx_drv_cfg_t *edcp = &enp->en_drv_cfg;
uint32_t blk_per_buf;
uint32_t buf, blk;
@@ -785,7 +786,7 @@ hunt_nic_pio_alloc(
rc = ENOMEM;
goto fail1;
}
-   blk_per_buf = HUNT_PIOBUF_SIZE / edcp->edc_pio_alloc_size;
+   blk_per_buf = encp->enc_piobuf_size / edcp->edc_pio_alloc_size;
 
for (buf = 0; buf < enp->en_arch.ef10.ena_piobuf_count; buf++) {
uint32_t *map = &enp->en_arch.ef10.ena_pio_alloc_map[buf];
@@ -1260,6 +1261,7 @@ hunt_board_cfg(
 
encp->enc_piobuf_limit = HUNT_PIOBUF_NBUFS;
encp->enc_piobuf_size = HUNT_PIOBUF_SIZE;
+   encp->enc_piobuf_min_alloc_size = HUNT_MIN_PIO_ALLOC_SIZE;
 
/*
 * Get the current privilege mask. Note that this may be modified
@@ -1470,7 +1472,8 @@ hunt_nic_set_drv_limits(
uint32_t blk_size, blk_count, blks_per_piobuf;
 
blk_size =
-   MAX(edlp->edl_min_pio_alloc_size, HUNT_MIN_PIO_ALLOC_SIZE);
+   MAX(edlp->edl_min_pio_alloc_size,
+   encp->enc_piobuf_min_alloc_size);
 
blks_per_piobuf = encp->enc_piobuf_size / blk_size;
EFSYS_ASSERT3U(blks_per_piobuf, <=, 32);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293750 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:29:05 2016
New Revision: 293750
URL: https://svnweb.freebsd.org/changeset/base/293750

Log:
  sfxge: update SRAM methods to be no-ops on Medford as well
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4867

Modified:
  head/sys/dev/sfxge/common/efx_nic.c
  head/sys/dev/sfxge/common/efx_sram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_sram.c

Modified: head/sys/dev/sfxge/common/efx_nic.c
==
--- head/sys/dev/sfxge/common/efx_nic.c Tue Jan 12 13:27:46 2016
(r293749)
+++ head/sys/dev/sfxge/common/efx_nic.c Tue Jan 12 13:29:05 2016
(r293750)
@@ -291,7 +291,7 @@ static efx_nic_ops_t__efx_nic_hunt_ops 
hunt_nic_get_vi_pool,   /* eno_get_vi_pool */
hunt_nic_get_bar_region,/* eno_get_bar_region */
 #if EFSYS_OPT_DIAG
-   hunt_sram_test, /* eno_sram_test */
+   ef10_sram_test, /* eno_sram_test */
hunt_nic_register_test, /* eno_register_test */
 #endif /* EFSYS_OPT_DIAG */
hunt_nic_fini,  /* eno_fini */

Modified: head/sys/dev/sfxge/common/efx_sram.c
==
--- head/sys/dev/sfxge/common/efx_sram.cTue Jan 12 13:27:46 2016
(r293749)
+++ head/sys/dev/sfxge/common/efx_sram.cTue Jan 12 13:29:05 2016
(r293750)
@@ -55,20 +55,21 @@ efx_sram_buf_tbl_set(
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
 
-#if EFSYS_OPT_HUNTINGTON
-   if (enp->en_family == EFX_FAMILY_HUNTINGTON) {
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+   if (enp->en_family == EFX_FAMILY_HUNTINGTON ||
+   enp->en_family == EFX_FAMILY_MEDFORD) {
/*
 * FIXME: the efx_sram_buf_tbl_*() functionality needs to be
 * pulled inside the Falcon/Siena queue create/destroy code,
 * and then the original functions can be removed (see bug30834
 * comment #1).  But, for now, we just ensure that they are
-* no-ops for Huntington, to allow bringing up existing drivers
+* no-ops for EF10, to allow bringing up existing drivers
 * without modification.
 */
 
return (0);
}
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
if (stop >= EFX_BUF_TBL_SIZE) {
rc = EFBIG;
@@ -176,20 +177,21 @@ efx_sram_buf_tbl_clear(
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
 
-#if EFSYS_OPT_HUNTINGTON
-   if (enp->en_family == EFX_FAMILY_HUNTINGTON) {
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+   if (enp->en_family == EFX_FAMILY_HUNTINGTON ||
+   enp->en_family == EFX_FAMILY_MEDFORD) {
/*
 * FIXME: the efx_sram_buf_tbl_*() functionality needs to be
 * pulled inside the Falcon/Siena queue create/destroy code,
 * and then the original functions can be removed (see bug30834
 * comment #1).  But, for now, we just ensure that they are
-* no-ops for Huntington, to allow bringing up existing drivers
+* no-ops for EF10, to allow bringing up existing drivers
 * without modification.
 */
 
return;
}
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
EFSYS_ASSERT3U(stop, <, EFX_BUF_TBL_SIZE);
 

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:27:46 2016
(r293749)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:29:05 2016
(r293750)
@@ -562,7 +562,7 @@ hunt_bist_stop(
 #if EFSYS_OPT_DIAG
 
 extern __checkReturn   efx_rc_t
-hunt_sram_test(
+ef10_sram_test(
__inefx_nic_t *enp,
__inefx_sram_pattern_fn_t func);
 

Modified: head/sys/dev/sfxge/common/hunt_sram.c
==
--- head/sys/dev/sfxge/common/hunt_sram.c   Tue Jan 12 13:27:46 2016
(r293749)
+++ head/sys/dev/sfxge/common/hunt_sram.c   Tue Jan 12 13:29:05 2016
(r293750)
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
 #if EFSYS_OPT_DIAG
 
__checkReturn   efx_rc_t
-hunt_sram_test(
+ef10_sram_test(
__inefx_nic_t *enp,
__inefx_sram_pattern_fn_t func)
 {
__

svn commit: r293751 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:30:42 2016
New Revision: 293751
URL: https://svnweb.freebsd.org/changeset/base/293751

Log:
  sfxge: rename hunt interrupt methods to ef10 and use on Medford
  
  All of these apply to both Huntington and Medford.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4868

Modified:
  head/sys/dev/sfxge/common/efx_intr.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_intr.c

Modified: head/sys/dev/sfxge/common/efx_intr.c
==
--- head/sys/dev/sfxge/common/efx_intr.cTue Jan 12 13:29:05 2016
(r293750)
+++ head/sys/dev/sfxge/common/efx_intr.cTue Jan 12 13:30:42 2016
(r293751)
@@ -101,17 +101,16 @@ static efx_intr_ops_t __efx_intr_siena_o
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_intr_ops_t  __efx_intr_hunt_ops = {
-   hunt_intr_init, /* eio_init */
-   hunt_intr_enable,   /* eio_enable */
-   hunt_intr_disable,  /* eio_disable */
-   hunt_intr_disable_unlocked, /* eio_disable_unlocked */
-   hunt_intr_trigger,  /* eio_trigger */
-   hunt_intr_fini, /* eio_fini */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_intr_ops_t  __efx_intr_ef10_ops = {
+   ef10_intr_init, /* eio_init */
+   ef10_intr_enable,   /* eio_enable */
+   ef10_intr_disable,  /* eio_disable */
+   ef10_intr_disable_unlocked, /* eio_disable_unlocked */
+   ef10_intr_trigger,  /* eio_trigger */
+   ef10_intr_fini, /* eio_fini */
 };
-#endif /* EFSYS_OPT_HUNTINGTON */
-
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_intr_init(
@@ -152,10 +151,16 @@ efx_intr_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   eiop = (efx_intr_ops_t *)&__efx_intr_hunt_ops;
+   eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   eiop = (efx_intr_ops_t *)&__efx_intr_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(B_FALSE);
rc = ENOTSUP;

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:29:05 2016
(r293750)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:30:42 2016
(r293751)
@@ -112,30 +112,30 @@ hunt_ev_rxlabel_fini(
 /* INTR */
 
__checkReturn   efx_rc_t
-hunt_intr_init(
+ef10_intr_init(
__inefx_nic_t *enp,
__inefx_intr_type_t type,
__inefsys_mem_t *esmp);
 
void
-hunt_intr_enable(
+ef10_intr_enable(
__inefx_nic_t *enp);
 
void
-hunt_intr_disable(
+ef10_intr_disable(
__inefx_nic_t *enp);
 
void
-hunt_intr_disable_unlocked(
+ef10_intr_disable_unlocked(
__inefx_nic_t *enp);
 
__checkReturn   efx_rc_t
-hunt_intr_trigger(
+ef10_intr_trigger(
__inefx_nic_t *enp,
__inunsigned int level);
 
void
-hunt_intr_fini(
+ef10_intr_fini(
__inefx_nic_t *enp);
 
 /* NIC */

Modified: head/sys/dev/sfxge/common/hunt_intr.c
==
--- head/sys/dev/sfxge/common/hunt_intr.c   Tue Jan 12 13:29:05 2016
(r293750)
+++ head/sys/dev/sfxge/common/hunt_intr.c   Tue Jan 12 13:30:42 2016
(r293751)
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
 #if EFSYS_OPT_HUNTINGTON
 
__checkReturn   efx_rc_t
-hunt_intr_init(
+ef10_intr_init(
__inefx_nic_t *enp,
__inefx_intr_type_t type,
__inefsys_mem_t *esmp)
@@ -50,7 +50,7 @@ hunt_intr_init(
 
 
void
-hunt_intr_enable(
+ef10_intr_enable(
__inefx_nic_t *enp)
 {
_NOTE(ARGUNUSED(enp))
@@ -58,7 +58,7 @@ hunt_intr_enable(
 
 
void
-hunt_intr_disable(
+ef10_intr_disable(
__inefx_nic_t *enp)
 {
_NOTE(ARGUNUSED(enp))
@@ -66,7 +66,7 @@ hunt_intr_disable(
 
 
void
-hunt_intr_disable_unlocked(
+ef10_intr_disable_unlocked(
__inefx_nic_t *enp)
 {
_NOTE(ARGUNUSED(enp))
@@ -83,7 +83,8 @@ efx_mcdi_trigger_interrupt(
MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)];
   

svn commit: r293752 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:32:04 2016
New Revision: 293752
URL: https://svnweb.freebsd.org/changeset/base/293752

Log:
  sfxge: rename hunt ev methods to ef10 and use for Medford
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4869

Modified:
  head/sys/dev/sfxge/common/efx_ev.c
  head/sys/dev/sfxge/common/hunt_ev.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_rx.c

Modified: head/sys/dev/sfxge/common/efx_ev.c
==
--- head/sys/dev/sfxge/common/efx_ev.c  Tue Jan 12 13:30:42 2016
(r293751)
+++ head/sys/dev/sfxge/common/efx_ev.c  Tue Jan 12 13:32:04 2016
(r293752)
@@ -139,20 +139,20 @@ static efx_ev_ops_t   __efx_ev_siena_ops =
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_ev_ops_t__efx_ev_hunt_ops = {
-   hunt_ev_init,   /* eevo_init */
-   hunt_ev_fini,   /* eevo_fini */
-   hunt_ev_qcreate,/* eevo_qcreate */
-   hunt_ev_qdestroy,   /* eevo_qdestroy */
-   hunt_ev_qprime, /* eevo_qprime */
-   hunt_ev_qpost,  /* eevo_qpost */
-   hunt_ev_qmoderate,  /* eevo_qmoderate */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_ev_ops_t__efx_ev_ef10_ops = {
+   ef10_ev_init,   /* eevo_init */
+   ef10_ev_fini,   /* eevo_fini */
+   ef10_ev_qcreate,/* eevo_qcreate */
+   ef10_ev_qdestroy,   /* eevo_qdestroy */
+   ef10_ev_qprime, /* eevo_qprime */
+   ef10_ev_qpost,  /* eevo_qpost */
+   ef10_ev_qmoderate,  /* eevo_qmoderate */
 #if EFSYS_OPT_QSTATS
-   hunt_ev_qstats_update,  /* eevo_qstats_update */
+   ef10_ev_qstats_update,  /* eevo_qstats_update */
 #endif
 };
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 
__checkReturn   efx_rc_t
@@ -185,10 +185,16 @@ efx_ev_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   eevop = (efx_ev_ops_t *)&__efx_ev_hunt_ops;
+   eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;

Modified: head/sys/dev/sfxge/common/hunt_ev.c
==
--- head/sys/dev/sfxge/common/hunt_ev.c Tue Jan 12 13:30:42 2016
(r293751)
+++ head/sys/dev/sfxge/common/hunt_ev.c Tue Jan 12 13:32:04 2016
(r293752)
@@ -54,35 +54,35 @@ __FBSDID("$FreeBSD$");
 
 
 static __checkReturn   boolean_t
-hunt_ev_rx(
+ef10_ev_rx(
__inefx_evq_t *eep,
__inefx_qword_t *eqp,
__inconst efx_ev_callbacks_t *eecp,
__in_optvoid *arg);
 
 static __checkReturn   boolean_t
-hunt_ev_tx(
+ef10_ev_tx(
__inefx_evq_t *eep,
__inefx_qword_t *eqp,
__inconst efx_ev_callbacks_t *eecp,
__in_optvoid *arg);
 
 static __checkReturn   boolean_t
-hunt_ev_driver(
+ef10_ev_driver(
__inefx_evq_t *eep,
__inefx_qword_t *eqp,
__inconst efx_ev_callbacks_t *eecp,
__in_optvoid *arg);
 
 static __checkReturn   boolean_t
-hunt_ev_drv_gen(
+ef10_ev_drv_gen(
__inefx_evq_t *eep,
__inefx_qword_t *eqp,
__inconst efx_ev_callbacks_t *eecp,
__in_optvoid *arg);
 
 static __checkReturn   boolean_t
-hunt_ev_mcdi(
+ef10_ev_mcdi(
__inefx_evq_t *eep,
__inefx_qword_t *eqp,
__inconst efx_ev_callbacks_t *eecp,
@@ -230,7 +230,7 @@ fail1:
 
 
__checkReturn   efx_rc_t
-hunt_ev_init(
+ef10_ev_init(
__inefx_nic_t *enp)
 {
_NOTE(ARGUNUSED(enp))
@@ -238,14 +238,14 @@ hunt_ev_init(
 }
 
void
-hunt_ev_fini(
+ef10_ev_fini(
__inefx_nic_t *enp)
 {
_NOTE(ARGUNUSED(enp))
 }
 
__checkReturn   efx_rc_t
-hunt_ev_qcreate(
+ef10_ev_qcreate(
__inefx_nic_t *enp,
__inunsigned int index,
__inefsys_mem_t *esmp,
@@ -272,11 +272,11 @@ hunt_ev_qcreate(
}
 
/* Set up the handler tab

svn commit: r293753 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:33:16 2016
New Revision: 293753
URL: https://svnweb.freebsd.org/changeset/base/293753

Log:
  sfxge: rename hunt TX methods to ef10 and use for Medford
  
  Rename all except hunt_tx_qdesc_tso_create(), which creates a
  fw-assisted TSO v1 descriptor which isn't supported on Medford.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4870

Modified:
  head/sys/dev/sfxge/common/efx_tx.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_tx.c

Modified: head/sys/dev/sfxge/common/efx_tx.c
==
--- head/sys/dev/sfxge/common/efx_tx.c  Tue Jan 12 13:32:04 2016
(r293752)
+++ head/sys/dev/sfxge/common/efx_tx.c  Tue Jan 12 13:33:16 2016
(r293753)
@@ -179,29 +179,54 @@ static efx_tx_ops_t   __efx_tx_siena_ops =
 
 #if EFSYS_OPT_HUNTINGTON
 static efx_tx_ops_t__efx_tx_hunt_ops = {
-   hunt_tx_init,   /* etxo_init */
-   hunt_tx_fini,   /* etxo_fini */
-   hunt_tx_qcreate,/* etxo_qcreate */
-   hunt_tx_qdestroy,   /* etxo_qdestroy */
-   hunt_tx_qpost,  /* etxo_qpost */
-   hunt_tx_qpush,  /* etxo_qpush */
-   hunt_tx_qpace,  /* etxo_qpace */
-   hunt_tx_qflush, /* etxo_qflush */
-   hunt_tx_qenable,/* etxo_qenable */
-   hunt_tx_qpio_enable,/* etxo_qpio_enable */
-   hunt_tx_qpio_disable,   /* etxo_qpio_disable */
-   hunt_tx_qpio_write, /* etxo_qpio_write */
-   hunt_tx_qpio_post,  /* etxo_qpio_post */
-   hunt_tx_qdesc_post, /* etxo_qdesc_post */
-   hunt_tx_qdesc_dma_create,   /* etxo_qdesc_dma_create */
+   ef10_tx_init,   /* etxo_init */
+   ef10_tx_fini,   /* etxo_fini */
+   ef10_tx_qcreate,/* etxo_qcreate */
+   ef10_tx_qdestroy,   /* etxo_qdestroy */
+   ef10_tx_qpost,  /* etxo_qpost */
+   ef10_tx_qpush,  /* etxo_qpush */
+   ef10_tx_qpace,  /* etxo_qpace */
+   ef10_tx_qflush, /* etxo_qflush */
+   ef10_tx_qenable,/* etxo_qenable */
+   ef10_tx_qpio_enable,/* etxo_qpio_enable */
+   ef10_tx_qpio_disable,   /* etxo_qpio_disable */
+   ef10_tx_qpio_write, /* etxo_qpio_write */
+   ef10_tx_qpio_post,  /* etxo_qpio_post */
+   ef10_tx_qdesc_post, /* etxo_qdesc_post */
+   ef10_tx_qdesc_dma_create,   /* etxo_qdesc_dma_create */
hunt_tx_qdesc_tso_create,   /* etxo_qdesc_tso_create */
-   hunt_tx_qdesc_vlantci_create,   /* etxo_qdesc_vlantci_create */
+   ef10_tx_qdesc_vlantci_create,   /* etxo_qdesc_vlantci_create */
 #if EFSYS_OPT_QSTATS
-   hunt_tx_qstats_update,  /* etxo_qstats_update */
+   ef10_tx_qstats_update,  /* etxo_qstats_update */
 #endif
 };
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+static efx_tx_ops_t__efx_tx_medford_ops = {
+   ef10_tx_init,   /* etxo_init */
+   ef10_tx_fini,   /* etxo_fini */
+   ef10_tx_qcreate,/* etxo_qcreate */
+   ef10_tx_qdestroy,   /* etxo_qdestroy */
+   ef10_tx_qpost,  /* etxo_qpost */
+   ef10_tx_qpush,  /* etxo_qpush */
+   ef10_tx_qpace,  /* etxo_qpace */
+   ef10_tx_qflush, /* etxo_qflush */
+   ef10_tx_qenable,/* etxo_qenable */
+   ef10_tx_qpio_enable,/* etxo_qpio_enable */
+   ef10_tx_qpio_disable,   /* etxo_qpio_disable */
+   ef10_tx_qpio_write, /* etxo_qpio_write */
+   ef10_tx_qpio_post,  /* etxo_qpio_post */
+   ef10_tx_qdesc_post, /* etxo_qdesc_post */
+   ef10_tx_qdesc_dma_create,   /* etxo_qdesc_dma_create */
+   NULL,   /* etxo_qdesc_tso_create */
+   ef10_tx_qdesc_vlantci_create,   /* etxo_qdesc_vlantci_create */
+#if EFSYS_OPT_QSTATS
+   ef10_tx_qstats_update,  /* etxo_qstats_update */
+#endif
+};
+#endif /* EFSYS_OPT_MEDFORD */
+
__checkReturn   efx_rc_t
 efx_tx_init(

svn commit: r293754 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:34:55 2016
New Revision: 293754
URL: https://svnweb.freebsd.org/changeset/base/293754

Log:
  sfxge: rename hunt RX methods to ef10 and use for Medford
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4871

Modified:
  head/sys/dev/sfxge/common/efx_rx.c
  head/sys/dev/sfxge/common/hunt_filter.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_rx.c

Modified: head/sys/dev/sfxge/common/efx_rx.c
==
--- head/sys/dev/sfxge/common/efx_rx.c  Tue Jan 12 13:33:16 2016
(r293753)
+++ head/sys/dev/sfxge/common/efx_rx.c  Tue Jan 12 13:34:55 2016
(r293754)
@@ -175,29 +175,29 @@ static efx_rx_ops_t __efx_rx_siena_ops =
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_rx_ops_t __efx_rx_hunt_ops = {
-   hunt_rx_init,   /* erxo_init */
-   hunt_rx_fini,   /* erxo_fini */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_rx_ops_t __efx_rx_ef10_ops = {
+   ef10_rx_init,   /* erxo_init */
+   ef10_rx_fini,   /* erxo_fini */
 #if EFSYS_OPT_RX_HDR_SPLIT
-   hunt_rx_hdr_split_enable,   /* erxo_hdr_split_enable */
+   ef10_rx_hdr_split_enable,   /* erxo_hdr_split_enable */
 #endif
 #if EFSYS_OPT_RX_SCATTER
-   hunt_rx_scatter_enable, /* erxo_scatter_enable */
+   ef10_rx_scatter_enable, /* erxo_scatter_enable */
 #endif
 #if EFSYS_OPT_RX_SCALE
-   hunt_rx_scale_mode_set, /* erxo_scale_mode_set */
-   hunt_rx_scale_key_set,  /* erxo_scale_key_set */
-   hunt_rx_scale_tbl_set,  /* erxo_scale_tbl_set */
+   ef10_rx_scale_mode_set, /* erxo_scale_mode_set */
+   ef10_rx_scale_key_set,  /* erxo_scale_key_set */
+   ef10_rx_scale_tbl_set,  /* erxo_scale_tbl_set */
 #endif
-   hunt_rx_qpost,  /* erxo_qpost */
-   hunt_rx_qpush,  /* erxo_qpush */
-   hunt_rx_qflush, /* erxo_qflush */
-   hunt_rx_qenable,/* erxo_qenable */
-   hunt_rx_qcreate,/* erxo_qcreate */
-   hunt_rx_qdestroy,   /* erxo_qdestroy */
+   ef10_rx_qpost,  /* erxo_qpost */
+   ef10_rx_qpush,  /* erxo_qpush */
+   ef10_rx_qflush, /* erxo_qflush */
+   ef10_rx_qenable,/* erxo_qenable */
+   ef10_rx_qcreate,/* erxo_qcreate */
+   ef10_rx_qdestroy,   /* erxo_qdestroy */
 };
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 
__checkReturn   efx_rc_t
@@ -235,10 +235,16 @@ efx_rx_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   erxop = (efx_rx_ops_t *)&__efx_rx_hunt_ops;
+   erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   erxop = (efx_rx_ops_t *)&__efx_rx_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;
@@ -607,7 +613,7 @@ efx_rx_qdestroy(
  * Hash values are in network (big-endian) byte order.
  *
  *
- * On Huntington the pseudo-header is laid out as:
+ * On EF10 the pseudo-header is laid out as:
  * (See also SF-109306-TC section 9)
  *
  * Toeplitz hash (32 bits, little-endian)
@@ -629,7 +635,8 @@ efx_psuedo_hdr_pkt_length_get(
__inuint8_t *buffer,
__out   uint16_t *pkt_lengthp)
 {
-   if (enp->en_family != EFX_FAMILY_HUNTINGTON) {
+   if (enp->en_family != EFX_FAMILY_HUNTINGTON &&
+   enp->en_family != EFX_FAMILY_MEDFORD) {
EFSYS_ASSERT(0);
return (ENOTSUP);
}
@@ -656,6 +663,7 @@ efx_psuedo_hdr_hash_get(
(buffer[14] << 8) |
buffer[15]);
case EFX_FAMILY_HUNTINGTON:
+   case EFX_FAMILY_MEDFORD:
return (buffer[0] |
(buffer[1] << 8) |
(buffer[2] << 16) |

Modified: head/sys/dev/sfxge/common/hunt_filter.c
==
--- head/sys/dev/sfxge/common/hunt_filter.c Tue Jan 12 13:33:16 2016
(r293753)
+++ head/sys/dev/sfxge/common/hunt_filter.c Tue Jan 12 13:34:55 2016
(r293754)
@@ -1351,

svn commit: r293755 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:36:21 2016
New Revision: 293755
URL: https://svnweb.freebsd.org/changeset/base/293755

Log:
  sfxge: rename Huntington VPD methods to ef10 and use for Medford
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4872

Modified:
  head/sys/dev/sfxge/common/efx_vpd.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_vpd.c

Modified: head/sys/dev/sfxge/common/efx_vpd.c
==
--- head/sys/dev/sfxge/common/efx_vpd.c Tue Jan 12 13:34:55 2016
(r293754)
+++ head/sys/dev/sfxge/common/efx_vpd.c Tue Jan 12 13:36:21 2016
(r293755)
@@ -91,22 +91,22 @@ static efx_vpd_ops_t__efx_vpd_siena_ops
 
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 
-static efx_vpd_ops_t   __efx_vpd_hunt_ops = {
-   hunt_vpd_init,  /* evpdo_init */
-   hunt_vpd_size,  /* evpdo_size */
-   hunt_vpd_read,  /* evpdo_read */
-   hunt_vpd_verify,/* evpdo_verify */
-   hunt_vpd_reinit,/* evpdo_reinit */
-   hunt_vpd_get,   /* evpdo_get */
-   hunt_vpd_set,   /* evpdo_set */
-   hunt_vpd_next,  /* evpdo_next */
-   hunt_vpd_write, /* evpdo_write */
-   hunt_vpd_fini,  /* evpdo_fini */
+static efx_vpd_ops_t   __efx_vpd_ef10_ops = {
+   ef10_vpd_init,  /* evpdo_init */
+   ef10_vpd_size,  /* evpdo_size */
+   ef10_vpd_read,  /* evpdo_read */
+   ef10_vpd_verify,/* evpdo_verify */
+   ef10_vpd_reinit,/* evpdo_reinit */
+   ef10_vpd_get,   /* evpdo_get */
+   ef10_vpd_set,   /* evpdo_set */
+   ef10_vpd_next,  /* evpdo_next */
+   ef10_vpd_write, /* evpdo_write */
+   ef10_vpd_fini,  /* evpdo_fini */
 };
 
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_vpd_init(
@@ -134,10 +134,16 @@ efx_vpd_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   evpdop = (efx_vpd_ops_t *)&__efx_vpd_hunt_ops;
+   evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   evpdop = (efx_vpd_ops_t *)&__efx_vpd_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:34:55 2016
(r293754)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:36:21 2016
(r293755)
@@ -758,48 +758,48 @@ hunt_nic_pio_unlink(
 #if EFSYS_OPT_VPD
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_init(
+ef10_vpd_init(
__inefx_nic_t *enp);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_size(
+ef10_vpd_size(
__inefx_nic_t *enp,
__out   size_t *sizep);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_read(
+ef10_vpd_read(
__inefx_nic_t *enp,
__out_bcount(size)  caddr_t data,
__insize_t size);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_verify(
+ef10_vpd_verify(
__inefx_nic_t *enp,
__in_bcount(size)   caddr_t data,
__insize_t size);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_reinit(
+ef10_vpd_reinit(
__inefx_nic_t *enp,
__in_bcount(size)   caddr_t data,
__insize_t size);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_get(
+ef10_vpd_get(
__inefx_nic_t *enp,
__in_bcount(size)   caddr_t data,
__insize_t size,
__inout efx_vpd_value_t *evvp);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_set(
+ef10_vpd_set(
__inefx_nic_t *enp,
__in_bcount(size)   caddr_t data,
__insize_t size,
__inefx_vpd_value_t *evvp);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_next(
+ef10_vpd_next(
__inefx_nic_t *enp,
__in_bcount(size)   caddr_t data,
__insize_t size,
@@ -807,13 +807,13 @@ hunt_vpd_next(
__inout unsigned int *contp);
 
 extern __checkReturn   efx_rc_t
-hunt_vpd_write(
+ef10_vpd_write(

svn commit: r293756 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:37:58 2016
New Revision: 293756
URL: https://svnweb.freebsd.org/changeset/base/293756

Log:
  sfxge: rename hunt nvram methods and use for Medford
  
  Some new partitions have been added, but they shouldn't need to be
  handled any differently.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4873

Modified:
  head/sys/dev/sfxge/common/efx_nvram.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/hunt_vpd.c

Modified: head/sys/dev/sfxge/common/efx_nvram.c
==
--- head/sys/dev/sfxge/common/efx_nvram.c   Tue Jan 12 13:36:21 2016
(r293755)
+++ head/sys/dev/sfxge/common/efx_nvram.c   Tue Jan 12 13:37:58 2016
(r293756)
@@ -75,23 +75,23 @@ static efx_nvram_ops_t  __efx_nvram_siena
 
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 
-static efx_nvram_ops_t __efx_nvram_hunt_ops = {
+static efx_nvram_ops_t __efx_nvram_ef10_ops = {
 #if EFSYS_OPT_DIAG
-   hunt_nvram_test,/* envo_test */
+   ef10_nvram_test,/* envo_test */
 #endif /* EFSYS_OPT_DIAG */
-   hunt_nvram_size,/* envo_size */
-   hunt_nvram_get_version, /* envo_get_version */
-   hunt_nvram_rw_start,/* envo_rw_start */
-   hunt_nvram_read_chunk,  /* envo_read_chunk */
-   hunt_nvram_erase,   /* envo_erase */
-   hunt_nvram_write_chunk, /* envo_write_chunk */
-   hunt_nvram_rw_finish,   /* envo_rw_finish */
-   hunt_nvram_set_version, /* envo_set_version */
+   ef10_nvram_size,/* envo_size */
+   ef10_nvram_get_version, /* envo_get_version */
+   ef10_nvram_rw_start,/* envo_rw_start */
+   ef10_nvram_read_chunk,  /* envo_read_chunk */
+   ef10_nvram_erase,   /* envo_erase */
+   ef10_nvram_write_chunk, /* envo_write_chunk */
+   ef10_nvram_rw_finish,   /* envo_rw_finish */
+   ef10_nvram_set_version, /* envo_set_version */
 };
 
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_nvram_init(
@@ -119,10 +119,16 @@ efx_nvram_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   envop = (efx_nvram_ops_t *)&__efx_nvram_hunt_ops;
+   envop = (efx_nvram_ops_t *)&__efx_nvram_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   envop = (efx_nvram_ops_t *)&__efx_nvram_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:36:21 2016
(r293755)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:37:58 2016
(r293756)
@@ -42,7 +42,12 @@
 extern "C" {
 #endif
 
-#defineHUNTINGTON_NVRAM_CHUNK 0x80
+/*
+ * FIXME: This is just a power of 2 which fits in an MCDI v1 message, and could
+ * possibly be increased, or the write size reported by newer firmware used
+ * instead.
+ */
+#defineEF10_NVRAM_CHUNK 0x80
 
 /* Alignment requirement for value written to RX WPTR:
  *  the WPTR must be aligned to an 8 descriptor boundary
@@ -296,7 +301,7 @@ hunt_mcdi_feature_supported(
 #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD
 
 extern __checkReturn   efx_rc_t
-hunt_nvram_buf_read_tlv(
+ef10_nvram_buf_read_tlv(
__inefx_nic_t *enp,
__in_bcount(max_seg_size)   caddr_t seg_data,
__insize_t max_seg_size,
@@ -305,7 +310,7 @@ hunt_nvram_buf_read_tlv(
__out   size_t *sizep);
 
 extern __checkReturn   efx_rc_t
-hunt_nvram_buf_write_tlv(
+ef10_nvram_buf_write_tlv(
__inout_bcount(partn_size)  caddr_t partn_data,
__insize_t partn_size,
__inuint32_t tag,
@@ -314,7 +319,7 @@ hunt_nvram_buf_write_tlv(
__out   size_t *total_lengthp);
 
 extern __checkReturn   efx_rc_t
-hunt_nvram_partn_read_tlv(
+ef10_nvram_partn_read_tlv(
__inefx_nic_t *enp,
__inuint32_t partn,
__inuint32_t tag,
@@ -322,7 +327,7 @@ hunt_nvram_partn_read_tlv(
__out   size_t *sizep);
 

svn commit: r293757 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:39:25 2016
New Revision: 293757
URL: https://svnweb.freebsd.org/changeset/base/293757

Log:
  sfxge: rename hunt MCDI methods to ef10 and use for Medford
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4874

Modified:
  head/sys/dev/sfxge/common/efx_mcdi.c
  head/sys/dev/sfxge/common/efx_mcdi.h
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_mcdi.c

Modified: head/sys/dev/sfxge/common/efx_mcdi.c
==
--- head/sys/dev/sfxge/common/efx_mcdi.cTue Jan 12 13:37:58 2016
(r293756)
+++ head/sys/dev/sfxge/common/efx_mcdi.cTue Jan 12 13:39:25 2016
(r293757)
@@ -56,20 +56,20 @@ static efx_mcdi_ops_t   __efx_mcdi_siena_o
 
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 
-static efx_mcdi_ops_t  __efx_mcdi_hunt_ops = {
-   hunt_mcdi_init, /* emco_init */
-   hunt_mcdi_request_copyin,   /* emco_request_copyin */
-   hunt_mcdi_request_copyout,  /* emco_request_copyout */
-   hunt_mcdi_poll_reboot,  /* emco_poll_reboot */
-   hunt_mcdi_poll_response,/* emco_poll_response */
-   hunt_mcdi_read_response,/* emco_read_response */
-   hunt_mcdi_fini, /* emco_fini */
-   hunt_mcdi_feature_supported,/* emco_feature_supported */
+static efx_mcdi_ops_t  __efx_mcdi_ef10_ops = {
+   ef10_mcdi_init, /* emco_init */
+   ef10_mcdi_request_copyin,   /* emco_request_copyin */
+   ef10_mcdi_request_copyout,  /* emco_request_copyout */
+   ef10_mcdi_poll_reboot,  /* emco_poll_reboot */
+   ef10_mcdi_poll_response,/* emco_poll_response */
+   ef10_mcdi_read_response,/* emco_read_response */
+   ef10_mcdi_fini, /* emco_fini */
+   ef10_mcdi_feature_supported,/* emco_feature_supported */
 };
 
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
 
 
@@ -100,10 +100,16 @@ efx_mcdi_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   emcop = (efx_mcdi_ops_t *)&__efx_mcdi_hunt_ops;
+   emcop = (efx_mcdi_ops_t *)&__efx_mcdi_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   emcop = (efx_mcdi_ops_t *)&__efx_mcdi_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;
@@ -1491,7 +1497,7 @@ fail1:
 
 #if EFSYS_OPT_BIST
 
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 /*
  * Enter bist offline mode. This is a fw mode which puts the NIC into a state
  * where memory BIST tests can be run and not much else can interfere or 
happen.
@@ -1527,7 +1533,7 @@ fail1:
 
return (rc);
 }
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_mcdi_bist_start(
@@ -1788,7 +1794,7 @@ fail1:
 
 #endif /* EFSYS_OPT_MAC_STATS */
 
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 
 /*
  * This function returns the pf and vf number of a function.  If it is a pf the
@@ -1887,7 +1893,7 @@ fail1:
return (rc);
 }
 
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_mcdi_set_workaround(

Modified: head/sys/dev/sfxge/common/efx_mcdi.h
==
--- head/sys/dev/sfxge/common/efx_mcdi.hTue Jan 12 13:37:58 2016
(r293756)
+++ head/sys/dev/sfxge/common/efx_mcdi.hTue Jan 12 13:39:25 2016
(r293757)
@@ -188,11 +188,11 @@ efx_mcdi_mac_spoofing_supported(
 
 
 #if EFSYS_OPT_BIST
-#if EFSYS_OPT_HUNTINGTON
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
 extern __checkReturn   efx_rc_t
 efx_mcdi_bist_enable_offline(
__inefx_nic_t *enp);
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 extern __checkReturn   efx_rc_t
 efx_mcdi_bist_start(
__inefx_nic_t *enp,

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:37:58 2016
(r293756)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 13:39:25 2016
(r293757)
@@ -252,16 +252,16 @@ hunt_mac_stats_update(
 #if EFSYS_OPT_MCDI
 
 extern __checkReturn   efx_rc_t
-hunt_mcdi_init(
+ef10_mcdi_init(
__inefx_nic

svn commit: r293758 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 13:42:27 2016
New Revision: 293758
URL: https://svnweb.freebsd.org/changeset/base/293758

Log:
  sfxge: remove obsolete common code PKTFILTER module
  
  The pktfilter module has been obsolete for some time, as
  it was replaced by newer features in filter module. With
  the removal of the storport driver, this module has no
  users and can be removed.
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4875

Modified:
  head/sys/dev/sfxge/common/efsys.h
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_check.h
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/hunt_impl.h

Modified: head/sys/dev/sfxge/common/efsys.h
==
--- head/sys/dev/sfxge/common/efsys.h   Tue Jan 12 13:39:25 2016
(r293757)
+++ head/sys/dev/sfxge/common/efsys.h   Tue Jan 12 13:42:27 2016
(r293758)
@@ -287,7 +287,6 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b
 #defineEFSYS_OPT_RX_SCALE 1
 #defineEFSYS_OPT_QSTATS 1
 #defineEFSYS_OPT_FILTER 1
-#defineEFSYS_OPT_MCAST_FILTER_LIST 1
 #defineEFSYS_OPT_RX_SCATTER 0
 #defineEFSYS_OPT_RX_HDR_SPLIT 0
 

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Tue Jan 12 13:39:25 2016
(r293757)
+++ head/sys/dev/sfxge/common/efx.h Tue Jan 12 13:42:27 2016
(r293758)
@@ -508,35 +508,10 @@ efx_mac_fcntl_get(
 #defineEFX_MAC_HASH_BITS   (1 << 8)
 
 extern __checkReturn   efx_rc_t
-efx_pktfilter_init(
-   __inefx_nic_t *enp);
-
-extern void
-efx_pktfilter_fini(
-   __inefx_nic_t *enp);
-
-extern __checkReturn   efx_rc_t
-efx_pktfilter_set(
-   __inefx_nic_t *enp,
-   __inboolean_t unicst,
-   __inboolean_t brdcst);
-
-extern __checkReturn   efx_rc_t
 efx_mac_hash_set(
__inefx_nic_t *enp,
__in_ecount(EFX_MAC_HASH_BITS)  unsigned int const *bucket);
 
-#if EFSYS_OPT_MCAST_FILTER_LIST
-extern __checkReturn   efx_rc_t
-efx_pktfilter_mcast_list_set(
-   __inefx_nic_t *enp,
-   __inuint8_t const *addrs,
-   __inint count);
-#endif /* EFSYS_OPT_MCAST_FILTER_LIST */
-
-extern __checkReturn   efx_rc_t
-efx_pktfilter_mcast_all(
-   __inefx_nic_t *enp);
 
 #if EFSYS_OPT_MAC_STATS
 

Modified: head/sys/dev/sfxge/common/efx_check.h
==
--- head/sys/dev/sfxge/common/efx_check.h   Tue Jan 12 13:39:25 2016
(r293757)
+++ head/sys/dev/sfxge/common/efx_check.h   Tue Jan 12 13:42:27 2016
(r293758)
@@ -397,12 +397,9 @@
 # endif
 #endif /* EFSYS_OPT_WOL */
 
-/* Support calculating multicast pktfilter in common code */
-#if EFSYS_OPT_MCAST_FILTER_LIST
-# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \
-   EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
-#  error "MCAST_FILTER_LIST requires FALCON or SIENA or HUNTINGTON or MEDFORD"
-# endif
+/* Obsolete option */
+#ifdef EFSYS_OPT_MCAST_FILTER_LIST
+#  error "MCAST_FILTER_LIST is obsolete and not supported"
 #endif /* EFSYS_OPT_MCAST_FILTER_LIST */
 
 /* Support BIST */

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 13:39:25 2016
(r293757)
+++ head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 13:42:27 2016
(r293758)
@@ -266,16 +266,6 @@ efx_filter_reconfigure(
 
 #endif /* EFSYS_OPT_FILTER */
 
-typedef struct efx_pktfilter_ops_s {
-   efx_rc_t(*epfo_set)(efx_nic_t *,
-   boolean_t unicst,
-   boolean_t brdcast);
-#if EFSYS_OPT_MCAST_FILTER_LIST
-   efx_rc_t(*epfo_mcast_list_set)(efx_nic_t *,
-   uint8_t const *addrs, int count);
-#endif /* EFSYS_OPT_MCAST_FILTER_LIST */
-   efx_rc_t(*epfo_mcast_all)(efx_nic_t *);
-} efx_pktfilter_ops_t;
 
 typedef struct efx_port_s {
efx_mac_type_t  ep_mac_type;
@@ -624,7 +614,6 @@ struct efx_nic_s {
efx_filter_ten_filter;
efx_filter_ops_t*en_efop;
 #endif /* EFSYS_OPT_FILTER */
-   efx_pktfilter_ops_t *en_epfop;
 #if EFSYS_OPT_MCDI
efx_mcdi_t  en_mcdi;
 #endif /* EFSYS_OPT_MCDI */

Modified: head/sys/dev/sfxge/common/hunt_impl.h
===

svn commit: r293759 - stable/10/sys/kern

2016-01-12 Thread Edward Tomasz Napierala
Author: trasz
Date: Tue Jan 12 14:18:54 2016
New Revision: 293759
URL: https://svnweb.freebsd.org/changeset/base/293759

Log:
  Hide the "unmount of /dev failed (BUSY)" warning at shutdown or reboot,
  introduced with r293742, just like it was hidden before that commit.
  
  This is a direct commit to 10-STABLE; this special case is not needed
  in 11-CURRENT, because devfs supports forced unmounts there.  The forced
  unmount could be MFC-ed, but there are some LORs at shutdown, and I have
  a weird feelings about it.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/sys/kern/vfs_subr.c

Modified: stable/10/sys/kern/vfs_subr.c
==
--- stable/10/sys/kern/vfs_subr.c   Tue Jan 12 13:42:27 2016
(r293758)
+++ stable/10/sys/kern/vfs_subr.c   Tue Jan 12 14:18:54 2016
(r293759)
@@ -3734,7 +3734,7 @@ unmount_or_warn(struct mount *mp)
int error;
 
error = dounmount(mp, MNT_FORCE, curthread);
-   if (error != 0) {
+   if (error != 0 && strcmp(mp->mnt_vfc->vfc_name, "devfs") != 0) {
printf("unmount of %s failed (", mp->mnt_stat.f_mntonname);
if (error == EBUSY)
printf("BUSY)\n");
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread Ian Lepore
On Tue, 2016-01-12 at 08:55 +0100, Joel Dahl wrote:
> On Tue, Jan 12, 2016 at 01:41:34AM +, Sepherosa Ziehau wrote:
> > Author: sephe
> > Date: Tue Jan 12 01:41:34 2016
> > New Revision: 293720
> > URL: https://svnweb.freebsd.org/changeset/base/293720
> > 
> > Log:
> >   hyperv/hn: Implement SIOC[SG]IFMEDIA support
> >   
> >   Many applications and kernel modules (e.g. bridge) rely on the
> > ifmedia
> >   status report; give them what they want.
> >   
> >   Submitted by: Dexuan Cui 
> >   Reviewed by:  Jun Su , me,
> > adrian
> >   Modified by:  me (minor)
>   ^^^ Really?
> 
> % finger m...@freebsd.org
> [freebsd.org]
> Trying 8.8.178.110...
> Login: me Name: Michael Elbel
> Directory: /home/me   Shell:
> /usr/local/bin/bash
> No Mail.
> Mail forwarded to:
> m...@consol.de
> # me
> No Plan.
> 
> ;-)
> 

Really?  You're complaining about the committer using the personal
pronoun that refers to one's self in a context of referring to himself?

Do we really, as a project, have nothing better to do than this endless
nitpicking at the metadata in commit messages?

-- Ian

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


svn commit: r293761 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:20:03 2016
New Revision: 293761
URL: https://svnweb.freebsd.org/changeset/base/293761

Log:
  sfxge: remove unnecessary pulling out of soft bits from RX events
  
  These bigs are changed on Medford.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4876

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

Modified: head/sys/dev/sfxge/common/hunt_ev.c
==
--- head/sys/dev/sfxge/common/hunt_ev.c Tue Jan 12 14:33:17 2016
(r293760)
+++ head/sys/dev/sfxge/common/hunt_ev.c Tue Jan 12 15:20:03 2016
(r293761)
@@ -499,7 +499,6 @@ ef10_ev_rx(
uint32_t l3_class;
uint32_t l4_class;
uint32_t next_read_lbits;
-   boolean_t soft1, soft2;
uint16_t flags;
boolean_t should_abort;
efx_evq_rxq_state_t *eersp;
@@ -561,10 +560,6 @@ ef10_ev_rx(
flags |= EFX_DISCARD;
}
 
-   /* FIXME: do we need soft bits from RXDP firmware ? */
-   soft1 = (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_EV_SOFT1) != 0);
-   soft2 = (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_EV_SOFT2) != 0);
-
mcast = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_MAC_CLASS);
if (mcast == ESE_DZ_MAC_CLASS_UCAST)
flags |= EFX_PKT_UNICAST;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293762 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:20:53 2016
New Revision: 293762
URL: https://svnweb.freebsd.org/changeset/base/293762

Log:
  sfxge: add new MCDI sensors to common code
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4877

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

Modified: head/sys/dev/sfxge/common/mcdi_mon.c
==
--- head/sys/dev/sfxge/common/mcdi_mon.cTue Jan 12 15:20:03 2016
(r293761)
+++ head/sys/dev/sfxge/common/mcdi_mon.cTue Jan 12 15:20:53 2016
(r293762)
@@ -149,6 +149,13 @@ static const struct mcdi_sensor_map_s {
STAT(Px, CONTROLLER_SLAVE_VPTAT_EXT_ADC), /* 0x46 SLAVE_VPTAT_EXT_ADC */
STAT(Px, CONTROLLER_SLAVE_INTERNAL_TEMP_EXT_ADC),
/* 0x47 SLAVE_INTERNAL_TEMP_EXT_ADC */
+   STAT_NO_SENSOR(),   /* 0x48 (no sensor) */
+   STAT(Px, SODIMM_VOUT),  /* 0x49 SODIMM_VOUT */
+   STAT(Px, SODIMM_0_TEMP),/* 0x4a SODIMM_0_TEMP */
+   STAT(Px, SODIMM_1_TEMP),/* 0x4b SODIMM_1_TEMP */
+   STAT(Px, PHY0_VCC), /* 0x4c PHY0_VCC */
+   STAT(Px, PHY1_VCC), /* 0x4d PHY1_VCC */
+   STAT(Px, CONTROLLER_TDIODE_TEMP), /* 0x4e CONTROLLER_TDIODE_TEMP */
 };
 
 #defineMCDI_STATIC_SENSOR_ASSERT(_field)   
\
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293763 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:21:52 2016
New Revision: 293763
URL: https://svnweb.freebsd.org/changeset/base/293763

Log:
  sfxge: add definitions for compressed satellite images to common code headers
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4878

Modified:
  head/sys/dev/sfxge/common/siena_flash.h

Modified: head/sys/dev/sfxge/common/siena_flash.h
==
--- head/sys/dev/sfxge/common/siena_flash.h Tue Jan 12 15:20:53 2016
(r293762)
+++ head/sys/dev/sfxge/common/siena_flash.h Tue Jan 12 15:21:52 2016
(r293763)
@@ -91,6 +91,19 @@ typedef struct blob_hdr_s {  /* GENERAT
 #defineBLOB_CPU_TYPE_RXDI_VTBL1 (14)
 #defineBLOB_CPU_TYPE_TXDI_VTBL1 (15)
 #defineBLOB_CPU_TYPE_DUMPSPEC (32)
+#defineBLOB_CPU_TYPE_MC_XIP   (33)
+
+#defineBLOB_CPU_TYPE_INVALID (31)
+
+/*
+ * The upper four bits of the CPU type field specify the compression
+ * algorithm used for this blob.
+ */
+#defineBLOB_COMPRESSION_MASK (0xf000)
+#defineBLOB_CPU_TYPE_MASK(0x0fff)
+
+#defineBLOB_COMPRESSION_NONE (0x) /* Stored as is */
+#defineBLOB_COMPRESSION_LZ   (0x1000) /* see lib/lzdecoder.c */
 
 typedef struct siena_mc_boot_hdr_s {   /* GENERATED BY 
scripts/genfwdef */
efx_dword_t magic;  /* = SIENA_MC_BOOT_MAGIC */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293764 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:24:13 2016
New Revision: 293764
URL: https://svnweb.freebsd.org/changeset/base/293764

Log:
  sfxge: rename hunt filter methods, types etc. to ef10 and use for Medford
  
  New filters types may be added, but the same machinery should be able to
  handle them.
  
  Submitted by:   Mark Spender 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4881

Modified:
  head/sys/dev/sfxge/common/efx_filter.c
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/hunt_filter.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_mac.c

Modified: head/sys/dev/sfxge/common/efx_filter.c
==
--- head/sys/dev/sfxge/common/efx_filter.c  Tue Jan 12 15:21:52 2016
(r293763)
+++ head/sys/dev/sfxge/common/efx_filter.c  Tue Jan 12 15:24:13 2016
(r293764)
@@ -97,17 +97,17 @@ static efx_filter_ops_t __efx_filter_sie
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON
-static efx_filter_ops_t__efx_filter_hunt_ops = {
-   hunt_filter_init,   /* efo_init */
-   hunt_filter_fini,   /* efo_fini */
-   hunt_filter_restore,/* efo_restore */
-   hunt_filter_add,/* efo_add */
-   hunt_filter_delete, /* efo_delete */
-   hunt_filter_supported_filters,  /* efo_supported_filters */
-   hunt_filter_reconfigure,/* efo_reconfigure */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+static efx_filter_ops_t__efx_filter_ef10_ops = {
+   ef10_filter_init,   /* efo_init */
+   ef10_filter_fini,   /* efo_fini */
+   ef10_filter_restore,/* efo_restore */
+   ef10_filter_add,/* efo_add */
+   ef10_filter_delete, /* efo_delete */
+   ef10_filter_supported_filters,  /* efo_supported_filters */
+   ef10_filter_reconfigure,/* efo_reconfigure */
 };
-#endif /* EFSYS_OPT_HUNTINGTON */
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 
__checkReturn   efx_rc_t
 efx_filter_insert(
@@ -189,10 +189,16 @@ efx_filter_init(
 
 #if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
-   efop = (efx_filter_ops_t *)&__efx_filter_hunt_ops;
+   efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops;
break;
 #endif /* EFSYS_OPT_HUNTINGTON */
 
+#if EFSYS_OPT_MEDFORD
+   case EFX_FAMILY_MEDFORD:
+   efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops;
+   break;
+#endif /* EFSYS_OPT_MEDFORD */
+
default:
EFSYS_ASSERT(0);
rc = ENOTSUP;

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 15:21:52 2016
(r293763)
+++ head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 15:24:13 2016
(r293764)
@@ -436,9 +436,9 @@ typedef struct efx_filter_s {
 #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA
falconsiena_filter_t*ef_falconsiena_filter;
 #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */
-#if EFSYS_OPT_HUNTINGTON
-   hunt_filter_table_t *ef_hunt_filter_table;
-#endif /* EFSYS_OPT_HUNTINGTON */
+#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD
+   ef10_filter_table_t *ef_ef10_filter_table;
+#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
 } efx_filter_t;
 
 extern void

Modified: head/sys/dev/sfxge/common/hunt_filter.c
==
--- head/sys/dev/sfxge/common/hunt_filter.c Tue Jan 12 15:21:52 2016
(r293763)
+++ head/sys/dev/sfxge/common/hunt_filter.c Tue Jan 12 15:24:13 2016
(r293764)
@@ -41,90 +41,91 @@ __FBSDID("$FreeBSD$");
 
 #if EFSYS_OPT_FILTER
 
-#defineHFE_SPEC(hftp, index)   ((hftp)->hft_entry[(index)].hfe_spec)
+#defineEFE_SPEC(eftp, index)   ((eftp)->eft_entry[(index)].efe_spec)
 
 static efx_filter_spec_t *
-hunt_filter_entry_spec(
-   __inconst hunt_filter_table_t *hftp,
+ef10_filter_entry_spec(
+   __inconst ef10_filter_table_t *eftp,
__inunsigned int index)
 {
-   return ((efx_filter_spec_t *)(HFE_SPEC(hftp, index) &
-   ~(uintptr_t)EFX_HUNT_FILTER_FLAGS));
+   return ((efx_filter_spec_t *)(EFE_SPEC(eftp, index) &
+   ~(uintptr_t)EFX_EF10_FILTER_FLAGS));
 }
 
 static boolean_t
-hunt_filter_entry_is_busy(
-   __inconst hunt_filter_table_t *hftp,
+ef10_filter_entry_is_busy(
+   __inconst ef10_filter_table_t *eftp,
__inunsigned int index)
 {
-   if (HFE_SPEC(hftp, index) & EFX_HUNT_FILTER_FLAG_BUSY)
+

svn commit: r293765 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:25:03 2016
New Revision: 293765
URL: https://svnweb.freebsd.org/changeset/base/293765

Log:
  sfxge: rework MCDI header version handling
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4882

Modified:
  head/sys/dev/sfxge/common/efx_mcdi.c
  head/sys/dev/sfxge/common/efx_mcdi.h
  head/sys/dev/sfxge/common/hunt_mcdi.c
  head/sys/dev/sfxge/common/siena_mcdi.c

Modified: head/sys/dev/sfxge/common/efx_mcdi.c
==
--- head/sys/dev/sfxge/common/efx_mcdi.cTue Jan 12 15:24:13 2016
(r293764)
+++ head/sys/dev/sfxge/common/efx_mcdi.cTue Jan 12 15:25:03 2016
(r293765)
@@ -643,7 +643,6 @@ efx_mcdi_ev_cpl(
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp;
efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
-   efx_nic_cfg_t *encp = &enp->en_nic_cfg;
efx_mcdi_req_t *emrp;
int state;
 
@@ -668,7 +667,7 @@ efx_mcdi_ev_cpl(
emip->emi_pending_req = NULL;
EFSYS_UNLOCK(enp->en_eslp, state);
 
-   if (encp->enc_mcdi_max_payload_length > MCDI_CTL_SDU_LEN_MAX_V1) {
+   if (emip->emi_max_version >= 2) {
/* MCDIv2 response details do not fit into an event. */
efx_mcdi_read_response_header(enp, emrp);
} else {

Modified: head/sys/dev/sfxge/common/efx_mcdi.h
==
--- head/sys/dev/sfxge/common/efx_mcdi.hTue Jan 12 15:24:13 2016
(r293764)
+++ head/sys/dev/sfxge/common/efx_mcdi.hTue Jan 12 15:25:03 2016
(r293765)
@@ -69,6 +69,7 @@ struct efx_mcdi_req_s {
 
 typedef struct efx_mcdi_iface_s {
unsigned intemi_port;
+   unsigned intemi_max_version;
unsigned intemi_seq;
efx_mcdi_req_t  *emi_pending_req;
boolean_t   emi_ev_cpl;

Modified: head/sys/dev/sfxge/common/hunt_mcdi.c
==
--- head/sys/dev/sfxge/common/hunt_mcdi.c   Tue Jan 12 15:24:13 2016
(r293764)
+++ head/sys/dev/sfxge/common/hunt_mcdi.c   Tue Jan 12 15:25:03 2016
(r293765)
@@ -81,6 +81,7 @@ ef10_mcdi_init(
__inefx_nic_t *enp,
__inconst efx_mcdi_transport_t *emtp)
 {
+   efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
efsys_mem_t *esmp = emtp->emt_dma_mem;
efx_dword_t dword;
efx_rc_t rc;
@@ -89,6 +90,13 @@ ef10_mcdi_init(
enp->en_family == EFX_FAMILY_MEDFORD);
EFSYS_ASSERT(enp->en_features & EFX_FEATURE_MCDI_DMA);
 
+   /*
+* All EF10 firmware supports MCDIv2 and MCDIv1.
+* Medford BootROM supports MCDIv2 and MCDIv1.
+* Huntington BootROM supports MCDIv1 only.
+*/
+   emip->emi_max_version = 2;
+
/* A host DMA buffer is required for EF10 MCDI */
if (esmp == NULL) {
rc = EINVAL;

Modified: head/sys/dev/sfxge/common/siena_mcdi.c
==
--- head/sys/dev/sfxge/common/siena_mcdi.c  Tue Jan 12 15:24:13 2016
(r293764)
+++ head/sys/dev/sfxge/common/siena_mcdi.c  Tue Jan 12 15:25:03 2016
(r293765)
@@ -244,6 +244,9 @@ siena_mcdi_init(
goto fail1;
}
 
+   /* Siena BootROM and firmware only support MCDIv1 */
+   emip->emi_max_version = 1;
+
/*
 * Wipe the atomic reboot status so subsequent MCDI requests succeed.
 * BOOT_STATUS is preserved so eno_nic_probe() can boot out of the
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293766 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:26:17 2016
New Revision: 293766
URL: https://svnweb.freebsd.org/changeset/base/293766

Log:
  sfxge: remove obsolete efx_mac_hash_set() from common code
  
  This API has been replaced by efx_mac_multicast_list_set()
  and has no callers.
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4883

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_mac.c

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Tue Jan 12 15:25:03 2016
(r293765)
+++ head/sys/dev/sfxge/common/efx.h Tue Jan 12 15:26:17 2016
(r293766)
@@ -505,13 +505,6 @@ efx_mac_fcntl_get(
__out   unsigned int *fcntl_wantedp,
__out   unsigned int *fcntl_linkp);
 
-#defineEFX_MAC_HASH_BITS   (1 << 8)
-
-extern __checkReturn   efx_rc_t
-efx_mac_hash_set(
-   __inefx_nic_t *enp,
-   __in_ecount(EFX_MAC_HASH_BITS)  unsigned int const *bucket);
-
 
 #if EFSYS_OPT_MAC_STATS
 

Modified: head/sys/dev/sfxge/common/efx_mac.c
==
--- head/sys/dev/sfxge/common/efx_mac.c Tue Jan 12 15:25:03 2016
(r293765)
+++ head/sys/dev/sfxge/common/efx_mac.c Tue Jan 12 15:26:17 2016
(r293766)
@@ -462,55 +462,6 @@ efx_mac_fcntl_get(
*fcntl_wantedp = wanted;
 }
 
-/*
- * FIXME: efx_mac_hash_set() should be deleted once all its callers have been
- * updated to use efx_mac_multicast_list_set().
- * Then efx_port_t.ep_multicst_hash could be made Falcon/Siena specific as
- * well.
- */
-   __checkReturn   efx_rc_t
-efx_mac_hash_set(
-   __inefx_nic_t *enp,
-   __in_ecount(EFX_MAC_HASH_BITS)  unsigned int const *bucket)
-{
-   efx_port_t *epp = &(enp->en_port);
-   efx_mac_ops_t *emop = epp->ep_emop;
-   efx_oword_t old_hash[2];
-   unsigned int index;
-   efx_rc_t rc;
-
-   EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
-   EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
-   memcpy(old_hash, epp->ep_multicst_hash, sizeof (old_hash));
-
-   /* Set the lower 128 bits of the hash */
-   EFX_ZERO_OWORD(epp->ep_multicst_hash[0]);
-   for (index = 0; index < 128; index++) {
-   if (bucket[index] != 0)
-   EFX_SET_OWORD_BIT(epp->ep_multicst_hash[0], index);
-   }
-
-   /* Set the upper 128 bits of the hash */
-   EFX_ZERO_OWORD(epp->ep_multicst_hash[1]);
-   for (index = 0; index < 128; index++) {
-   if (bucket[index + 128] != 0)
-   EFX_SET_OWORD_BIT(epp->ep_multicst_hash[1], index);
-   }
-
-   if ((rc = emop->emo_reconfigure(enp)) != 0)
-   goto fail1;
-
-   return (0);
-
-fail1:
-   EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
-   memcpy(epp->ep_multicst_hash, old_hash, sizeof (old_hash));
-
-   return (rc);
-}
-
__checkReturn   efx_rc_t
 efx_mac_multicast_list_set(
__inefx_nic_t *enp,
@@ -912,6 +863,8 @@ fail1:
 
 #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA
 
+#defineEFX_MAC_HASH_BITS   (1 << 8)
+
 /* Compute the multicast hash as used on Falcon and Siena. */
 static void
 falconsiena_mac_multicast_hash_compute(
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293767 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:27:11 2016
New Revision: 293767
URL: https://svnweb.freebsd.org/changeset/base/293767

Log:
  sfxge: cleanup: improve consistency in efx_check.h
  
  Make error messages consistent, and remove redundant checks.
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4884

Modified:
  head/sys/dev/sfxge/common/efx_check.h

Modified: head/sys/dev/sfxge/common/efx_check.h
==
--- head/sys/dev/sfxge/common/efx_check.h   Tue Jan 12 15:26:17 2016
(r293766)
+++ head/sys/dev/sfxge/common/efx_check.h   Tue Jan 12 15:27:11 2016
(r293767)
@@ -61,9 +61,6 @@
 /* Decode fatal errors */
 #if EFSYS_OPT_DECODE_INTR_FATAL
 # if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA)
-#  if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
-#   error "INTR_FATAL not supported on HUNTINGTON or MEDFORD"
-#  endif
 #  error "INTR_FATAL requires FALCON or SIENA"
 # endif
 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
@@ -138,9 +135,6 @@
 /* Support management controller messages */
 #if EFSYS_OPT_MCDI
 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
-#  if EFSYS_OPT_FALCON
-#   error "MCDI not supported on FALCON"
-#  endif
 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
 # endif
 #endif /* EFSYS_OPT_MCDI */
@@ -186,14 +180,14 @@
 # endif
 #endif /* EFSYS_OPT_MON_NULL */
 
-/* Support Siena monitor */
+/* Obsolete option */
 #ifdef EFSYS_OPT_MON_SIENA
-#  error "MON_SIENA is obsolete use MON_MCDI"
+#  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
 #endif /* EFSYS_OPT_MON_SIENA*/
 
-/* Support Huntington monitor */
+/* Obsolete option */
 #ifdef EFSYS_OPT_MON_HUNTINGTON
-#  error "MON_HUNTINGTON is obsolete use MON_MCDI"
+#  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
 #endif /* EFSYS_OPT_MON_HUNTINGTON*/
 
 /* Support monitor statistics (voltage/temperature) */
@@ -265,9 +259,9 @@
 # endif
 #endif /* EFSYS_OPT_PCIE_TUNE */
 
-/* Support PHY BIST diagnostics */
+/* Obsolete option */
 #if EFSYS_OPT_PHY_BIST
-#  error "PHY_BIST is obsolete. It has been replaced by the BIST option."
+#  error "PHY_BIST is obsolete (replaced by BIST)."
 #endif /* EFSYS_OPT_PHY_BIST */
 
 /* Support PHY flags */
@@ -379,7 +373,7 @@
 
 /* Obsolete option */
 #ifdef EFSYS_OPT_STAT_NAME
-# error "EFSYS_OPT_STAT_NAME is obsolete (replaced by EFSYS_OPT_NAMES)."
+# error "STAT_NAME is obsolete (replaced by NAMES)."
 #endif
 
 /* Support PCI Vital Product Data (VPD) */
@@ -399,7 +393,7 @@
 
 /* Obsolete option */
 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
-#  error "MCAST_FILTER_LIST is obsolete and not supported"
+#  error "MCAST_FILTER_LIST is obsolete and is not supported"
 #endif /* EFSYS_OPT_MCAST_FILTER_LIST */
 
 /* Support BIST */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread Alexey Dokuchaev
On Tue, Jan 12, 2016 at 07:30:05AM -0700, Ian Lepore wrote:
> On Tue, 2016-01-12 at 08:55 +0100, Joel Dahl wrote:
> > On Tue, Jan 12, 2016 at 01:41:34AM +, Sepherosa Ziehau wrote:
> > > Author: sephe
> > > Date: Tue Jan 12 01:41:34 2016
> > > New Revision: 293720
> > > URL: https://svnweb.freebsd.org/changeset/base/293720
> > > 
> > > [...]
> > >   Modified by:me (minor)
> > 
> > % finger m...@freebsd.org
> > [freebsd.org]
> > Trying 8.8.178.110...
> > Login: me   Name: Michael Elbel
> 
> Really?  You're complaining about the committer using the personal
> pronoun that refers to one's self in a context of referring to himself?

I understand you; with certain entries like `me' or `myself' it does look
silly indeed, however...

> Do we really, as a project, have nothing better to do than this endless
> nitpicking at the metadata in commit messages?

... many of us neglect to give enough thinking and thus often give bogus
attribution in the logs; while complaining over personal pronouns is off
the line, the problem still stands, and I'm glad that people are paying
attention to these things.  Please don't be hard on Joel.

Generally, "Submitted by: foo (modified)" should be enough metadata to
reflect the fact that submitted changes were not applied verbatim; which
in turn is appropriate amendment for more of less substantial changes,
trivial modifications do not warrant it.

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


svn commit: r293768 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:28:10 2016
New Revision: 293768
URL: https://svnweb.freebsd.org/changeset/base/293768

Log:
  sfxge: update NVRAM partition lookup for Medford
  
  Prior to Medford, option ROM config was stored with one partition
  per network port. Medford stores option ROM config in a single
  partition (as an array of configurations, one per PF).
  
  Update the EFXname /port to MCDI partition mapping for this.
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4885

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

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==
--- head/sys/dev/sfxge/common/hunt_nvram.c  Tue Jan 12 15:27:11 2016
(r293767)
+++ head/sys/dev/sfxge/common/hunt_nvram.c  Tue Jan 12 15:28:10 2016
(r293768)
@@ -1509,8 +1509,6 @@ fail1:
 
 #if EFSYS_OPT_NVRAM
 
-/* FIXME: Update partition table for Medford */
-
 typedef struct ef10_parttbl_entry_s {
unsigned intpartn;
unsigned intport;
@@ -1518,7 +1516,7 @@ typedef struct ef10_parttbl_entry_s {
 } ef10_parttbl_entry_t;
 
 /* Translate EFX NVRAM types to firmware partition types */
-static ef10_parttbl_entry_t ef10_parttbl[] = {
+static ef10_parttbl_entry_t hunt_parttbl[] = {
{NVRAM_PARTITION_TYPE_MC_FIRMWARE, 1, EFX_NVRAM_MC_FIRMWARE},
{NVRAM_PARTITION_TYPE_MC_FIRMWARE, 2, EFX_NVRAM_MC_FIRMWARE},
{NVRAM_PARTITION_TYPE_MC_FIRMWARE, 3, EFX_NVRAM_MC_FIRMWARE},
@@ -1549,6 +1547,37 @@ static ef10_parttbl_entry_t ef10_parttbl
{NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP}
 };
 
+static ef10_parttbl_entry_t medford_parttbl[] = {
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 1, EFX_NVRAM_MC_FIRMWARE},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 2, EFX_NVRAM_MC_FIRMWARE},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 3, EFX_NVRAM_MC_FIRMWARE},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 4, EFX_NVRAM_MC_FIRMWARE},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP,  1, EFX_NVRAM_MC_GOLDEN},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP,  2, EFX_NVRAM_MC_GOLDEN},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP,  3, EFX_NVRAM_MC_GOLDEN},
+   {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP,  4, EFX_NVRAM_MC_GOLDEN},
+   {NVRAM_PARTITION_TYPE_EXPANSION_ROM,   1, EFX_NVRAM_BOOTROM},
+   {NVRAM_PARTITION_TYPE_EXPANSION_ROM,   2, EFX_NVRAM_BOOTROM},
+   {NVRAM_PARTITION_TYPE_EXPANSION_ROM,   3, EFX_NVRAM_BOOTROM},
+   {NVRAM_PARTITION_TYPE_EXPANSION_ROM,   4, EFX_NVRAM_BOOTROM},
+   {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 1, EFX_NVRAM_BOOTROM_CFG},
+   {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 2, EFX_NVRAM_BOOTROM_CFG},
+   {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 3, EFX_NVRAM_BOOTROM_CFG},
+   {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 4, EFX_NVRAM_BOOTROM_CFG},
+   {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,  1, EFX_NVRAM_DYNAMIC_CFG},
+   {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,  2, EFX_NVRAM_DYNAMIC_CFG},
+   {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,  3, EFX_NVRAM_DYNAMIC_CFG},
+   {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG,  4, EFX_NVRAM_DYNAMIC_CFG},
+   {NVRAM_PARTITION_TYPE_FPGA,1, EFX_NVRAM_FPGA},
+   {NVRAM_PARTITION_TYPE_FPGA,2, EFX_NVRAM_FPGA},
+   {NVRAM_PARTITION_TYPE_FPGA,3, EFX_NVRAM_FPGA},
+   {NVRAM_PARTITION_TYPE_FPGA,4, EFX_NVRAM_FPGA},
+   {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP},
+   {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP},
+   {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 3, EFX_NVRAM_FPGA_BACKUP},
+   {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP}
+};
+
 static __checkReturn   ef10_parttbl_entry_t *
 ef10_parttbl_entry(
__inefx_nic_t *enp,
@@ -1556,17 +1585,39 @@ ef10_parttbl_entry(
 {
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
ef10_parttbl_entry_t *entry;
-   int i;
+   ef10_parttbl_entry_t *parttbl;
+   size_t parttbl_size = 0;
+   unsigned int i;
 
EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
 
-   for (i = 0; i < EFX_ARRAY_SIZE(ef10_parttbl); i++) {
-   entry = &ef10_parttbl[i];
-
-   if (entry->port == emip->emi_port && entry->nvtype == type)
-   return (entry);
+   switch (enp->en_family) {
+   case EFX_FAMILY_HUNTINGTON:
+   parttbl = hunt_parttbl;
+   parttbl_size = EFX_ARRAY_SIZE(hunt_parttbl);
+   break;
+
+   case EFX_FAMILY_MEDFORD:
+   parttbl = medford_parttbl;
+   parttbl_size = EFX_ARRAY_SIZE(m

svn commit: r293769 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:28:59 2016
New Revision: 293769
URL: https://svnweb.freebsd.org/changeset/base/293769

Log:
  sfxge: fix interrupt handling for Medford
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4886

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_intr.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_intr.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 15:28:10 2016
(r293768)
+++ head/sys/dev/sfxge/common/efx_impl.hTue Jan 12 15:28:59 2016
(r293769)
@@ -342,6 +342,10 @@ typedef struct efx_intr_ops_s {
void(*eio_disable)(efx_nic_t *);
void(*eio_disable_unlocked)(efx_nic_t *);
efx_rc_t(*eio_trigger)(efx_nic_t *, unsigned int);
+   void(*eio_status_line)(efx_nic_t *, boolean_t *, uint32_t 
*);
+   void(*eio_status_message)(efx_nic_t *, unsigned int,
+boolean_t *);
+   void(*eio_fatal)(efx_nic_t *);
void(*eio_fini)(efx_nic_t *);
 } efx_intr_ops_t;
 

Modified: head/sys/dev/sfxge/common/efx_intr.c
==
--- head/sys/dev/sfxge/common/efx_intr.cTue Jan 12 15:28:10 2016
(r293768)
+++ head/sys/dev/sfxge/common/efx_intr.cTue Jan 12 15:28:59 2016
(r293769)
@@ -67,15 +67,27 @@ static  void
 falconsiena_intr_fini(
__inefx_nic_t *enp);
 
+static void
+falconsiena_intr_status_line(
+   __inefx_nic_t *enp,
+   __out   boolean_t *fatalp,
+   __out   uint32_t *qmaskp);
 
-static __checkReturn   boolean_t
-falconsiena_intr_check_fatal(
-   __inefx_nic_t *enp);
+static void
+falconsiena_intr_status_message(
+   __inefx_nic_t *enp,
+   __inunsigned int message,
+   __out   boolean_t *fatalp);
 
 static void
 falconsiena_intr_fatal(
__inefx_nic_t *enp);
 
+static __checkReturn   boolean_t
+falconsiena_intr_check_fatal(
+   __inefx_nic_t *enp);
+
+
 #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */
 
 
@@ -86,6 +98,9 @@ static efx_intr_ops_t __efx_intr_falcon_
falconsiena_intr_disable,   /* eio_disable */
falconsiena_intr_disable_unlocked,  /* eio_disable_unlocked */
falconsiena_intr_trigger,   /* eio_trigger */
+   falconsiena_intr_status_line,   /* eio_status_line */
+   falconsiena_intr_status_message,/* eio_status_message */
+   falconsiena_intr_fatal, /* eio_fatal */
falconsiena_intr_fini,  /* eio_fini */
 };
 #endif /* EFSYS_OPT_FALCON */
@@ -97,6 +112,9 @@ static efx_intr_ops_t__efx_intr_siena_o
falconsiena_intr_disable,   /* eio_disable */
falconsiena_intr_disable_unlocked,  /* eio_disable_unlocked */
falconsiena_intr_trigger,   /* eio_trigger */
+   falconsiena_intr_status_line,   /* eio_status_line */
+   falconsiena_intr_status_message,/* eio_status_message */
+   falconsiena_intr_fatal, /* eio_fatal */
falconsiena_intr_fini,  /* eio_fini */
 };
 #endif /* EFSYS_OPT_SIENA */
@@ -108,6 +126,9 @@ static efx_intr_ops_t   __efx_intr_ef10_op
ef10_intr_disable,  /* eio_disable */
ef10_intr_disable_unlocked, /* eio_disable_unlocked */
ef10_intr_trigger,  /* eio_trigger */
+   ef10_intr_status_line,  /* eio_status_line */
+   ef10_intr_status_message,   /* eio_status_message */
+   ef10_intr_fatal,/* eio_fatal */
ef10_intr_fini, /* eio_fini */
 };
 #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */
@@ -261,35 +282,12 @@ efx_intr_status_line(
__out   uint32_t *qmaskp)
 {
efx_intr_t *eip = &(enp->en_intr);
-   efx_dword_t dword;
+   efx_intr_ops_t *eiop = eip->ei_eiop;
 
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
 
-   /* Ensure Huntington and Falcon/Siena ISR at same location */
-   EFX_STATIC_ASSERT(FR_BZ_INT_ISR0_REG_OFST ==
-   ER_DZ_BIU_INT_ISR_REG_OFST);
-
-   /*
-* Read the queue mask and implicitly acknowledge the
-* interrupt.
-*/
-   EFX_BAR_READD(enp, FR_BZ_INT_ISR0_REG, &dword, B_FALSE);
-   *qmaskp = EFX_DWORD_FIELD(dword, EFX_DWORD_0);
-

svn commit: r293772 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:33:48 2016
New Revision: 293772
URL: https://svnweb.freebsd.org/changeset/base/293772

Log:
  sfxge: pass context type and num_queues to efx_mcdi_rss_context_alloc
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4890

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

Modified: head/sys/dev/sfxge/common/hunt_rx.c
==
--- head/sys/dev/sfxge/common/hunt_rx.c Tue Jan 12 15:31:32 2016
(r293771)
+++ head/sys/dev/sfxge/common/hunt_rx.c Tue Jan 12 15:33:48 2016
(r293772)
@@ -147,14 +147,34 @@ fail1:
 static __checkReturn   efx_rc_t
 efx_mcdi_rss_context_alloc(
__inefx_nic_t *enp,
+   __inefx_rx_scale_support_t scale_support,
+   __inuint32_t num_queues,
__out   uint32_t *rss_contextp)
 {
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN,
MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN)];
uint32_t rss_context;
+   uint32_t context_type;
efx_rc_t rc;
 
+   if (num_queues > EFX_MAXRSS) {
+   rc = EINVAL;
+   goto fail1;
+   }
+
+   switch (scale_support) {
+   case EFX_RX_SCALE_EXCLUSIVE:
+   context_type = MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EXCLUSIVE;
+   break;
+   case EFX_RX_SCALE_SHARED:
+   context_type = MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_SHARED;
+   break;
+   default:
+   rc = EINVAL;
+   goto fail2;
+   }
+
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_RSS_CONTEXT_ALLOC;
req.emr_in_buf = payload;
@@ -164,33 +184,36 @@ efx_mcdi_rss_context_alloc(
 
MCDI_IN_SET_DWORD(req, RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID,
EVB_PORT_ID_ASSIGNED);
-   MCDI_IN_SET_DWORD(req, RSS_CONTEXT_ALLOC_IN_TYPE,
-   MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EXCLUSIVE);
+   MCDI_IN_SET_DWORD(req, RSS_CONTEXT_ALLOC_IN_TYPE, context_type);
/* NUM_QUEUES is only used to validate indirection table offsets */
-   MCDI_IN_SET_DWORD(req, RSS_CONTEXT_ALLOC_IN_NUM_QUEUES, 64);
+   MCDI_IN_SET_DWORD(req, RSS_CONTEXT_ALLOC_IN_NUM_QUEUES, num_queues);
 
efx_mcdi_execute(enp, &req);
 
if (req.emr_rc != 0) {
rc = req.emr_rc;
-   goto fail1;
+   goto fail3;
}
 
if (req.emr_out_length_used < MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN) {
rc = EMSGSIZE;
-   goto fail2;
+   goto fail4;
}
 
rss_context = MCDI_OUT_DWORD(req, RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID);
if (rss_context == EF10_RSS_CONTEXT_INVALID) {
rc = ENOENT;
-   goto fail3;
+   goto fail5;
}
 
*rss_contextp = rss_context;
 
return (0);
 
+fail5:
+   EFSYS_PROBE(fail5);
+fail4:
+   EFSYS_PROBE(fail4);
 fail3:
EFSYS_PROBE(fail3);
 fail2:
@@ -420,7 +443,8 @@ ef10_rx_init(
 {
 #if EFSYS_OPT_RX_SCALE
 
-   if (efx_mcdi_rss_context_alloc(enp, &enp->en_rss_context) == 0) {
+   if (efx_mcdi_rss_context_alloc(enp, EFX_RX_SCALE_EXCLUSIVE, EFX_MAXRSS,
+   &enp->en_rss_context) == 0) {
/*
 * Allocated an exclusive RSS context, which allows both the
 * indirection table and key to be modified.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293773 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:35:00 2016
New Revision: 293773
URL: https://svnweb.freebsd.org/changeset/base/293773

Log:
  sfxge: remove obsolete lookahead split RXQ support
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4891

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_rx.c
  head/sys/dev/sfxge/common/hunt_rx.c

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Tue Jan 12 15:33:48 2016
(r293772)
+++ head/sys/dev/sfxge/common/efx.h Tue Jan 12 15:35:00 2016
(r293773)
@@ -1916,8 +1916,6 @@ efx_psuedo_hdr_pkt_length_get(
 
 typedef enum efx_rxq_type_e {
EFX_RXQ_TYPE_DEFAULT,
-   EFX_RXQ_TYPE_SPLIT_HEADER,
-   EFX_RXQ_TYPE_SPLIT_PAYLOAD,
EFX_RXQ_TYPE_SCATTER,
EFX_RXQ_NTYPES
 } efx_rxq_type_t;

Modified: head/sys/dev/sfxge/common/efx_rx.c
==
--- head/sys/dev/sfxge/common/efx_rx.c  Tue Jan 12 15:33:48 2016
(r293772)
+++ head/sys/dev/sfxge/common/efx_rx.c  Tue Jan 12 15:35:00 2016
(r293773)
@@ -1246,7 +1246,6 @@ falconsiena_rx_qcreate(
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_oword_t oword;
uint32_t size;
-   boolean_t split;
boolean_t jumbo;
efx_rc_t rc;
 
@@ -1277,7 +1276,6 @@ falconsiena_rx_qcreate(
 
switch (type) {
case EFX_RXQ_TYPE_DEFAULT:
-   split = B_FALSE;
jumbo = B_FALSE;
break;
 
@@ -1307,7 +1305,6 @@ falconsiena_rx_qcreate(
rc = EINVAL;
goto fail4;
}
-   split = B_FALSE;
jumbo = B_TRUE;
break;
 #endif /* EFSYS_OPT_RX_SCATTER */
@@ -1318,10 +1315,7 @@ falconsiena_rx_qcreate(
}
 
/* Set up the new descriptor queue */
-   EFX_POPULATE_OWORD_10(oword,
-   FRF_CZ_RX_HDR_SPLIT, split,
-   FRF_AZ_RX_ISCSI_DDIG_EN, 0,
-   FRF_AZ_RX_ISCSI_HDIG_EN, 0,
+   EFX_POPULATE_OWORD_7(oword,
FRF_AZ_RX_DESCQ_BUF_BASE_ID, id,
FRF_AZ_RX_DESCQ_EVQ_ID, eep->ee_index,
FRF_AZ_RX_DESCQ_OWNER_ID, 0,

Modified: head/sys/dev/sfxge/common/hunt_rx.c
==
--- head/sys/dev/sfxge/common/hunt_rx.c Tue Jan 12 15:33:48 2016
(r293772)
+++ head/sys/dev/sfxge/common/hunt_rx.c Tue Jan 12 15:35:00 2016
(r293773)
@@ -739,11 +739,6 @@ ef10_rx_qcreate(
disable_scatter = B_FALSE;
}
 
-   /*
-* Note: EFX_RXQ_TYPE_SPLIT_HEADER and EFX_RXQ_TYPE_SPLIT_PAYLOAD are
-* not supported here.
-*/
-
if ((rc = efx_mcdi_init_rxq(enp, n, eep->ee_index, label, index,
esmp, disable_scatter)) != 0)
goto fail3;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293771 - head/sys/arm/arm

2016-01-12 Thread Svatopluk Kraus
Author: skra
Date: Tue Jan 12 15:31:32 2016
New Revision: 293771
URL: https://svnweb.freebsd.org/changeset/base/293771

Log:
  Fix local macro for early KVA allocation.
  
  Only crashdumpmap allocation was affected which is used for temporary
  mappings during panic dump.
  
  Approved by:  kib (mentor)

Modified:
  head/sys/arm/arm/pmap-v6-new.c

Modified: head/sys/arm/arm/pmap-v6-new.c
==
--- head/sys/arm/arm/pmap-v6-new.c  Tue Jan 12 15:31:20 2016
(r293770)
+++ head/sys/arm/arm/pmap-v6-new.c  Tue Jan 12 15:31:32 2016
(r293771)
@@ -1109,7 +1109,7 @@ pmap_bootstrap(vm_offset_t firstaddr)
 * mapping of pages.
 */
 #defineSYSMAP(c, p, v, n)  do {\
-   v = (c)pmap_preboot_reserve_pages(1);   \
+   v = (c)pmap_preboot_reserve_pages(n);   \
p = pt2map_entry((vm_offset_t)v);   \
} while (0)
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293770 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 15:31:20 2016
New Revision: 293770
URL: https://svnweb.freebsd.org/changeset/base/293770

Log:
  sfxge: cleanup: use consistent types for NVRAM partitions
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4887

Modified:
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nvram.c
  head/sys/dev/sfxge/common/siena_impl.h
  head/sys/dev/sfxge/common/siena_nvram.c
  head/sys/dev/sfxge/common/siena_vpd.c

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 15:28:59 2016
(r293769)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Tue Jan 12 15:31:20 2016
(r293770)
@@ -361,18 +361,18 @@ ef10_nvram_partn_write_segment_tlv(
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_size(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__out   size_t *sizep);
 
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_lock(
__inefx_nic_t *enp,
-   __inunsigned int partn);
+   __inuint32_t partn);
 
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_read(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__inunsigned int offset,
__out_bcount(size)  caddr_t data,
__insize_t size);
@@ -380,14 +380,14 @@ ef10_nvram_partn_read(
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_erase(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__inunsigned int offset,
__insize_t size);
 
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_write(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__inunsigned int offset,
__out_bcount(size)  caddr_t data,
__insize_t size);
@@ -395,7 +395,7 @@ ef10_nvram_partn_write(
 extern void
 ef10_nvram_partn_unlock(
__inefx_nic_t *enp,
-   __inunsigned int partn);
+   __inuint32_t partn);
 
 #endif /* EFSYS_OPT_NVRAM || EFSYS_OPT_VPD */
 
@@ -457,7 +457,7 @@ ef10_nvram_rw_finish(
 extern __checkReturn   efx_rc_t
 ef10_nvram_partn_set_version(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__in_ecount(4)  uint16_t version[4]);
 
 extern __checkReturn   efx_rc_t

Modified: head/sys/dev/sfxge/common/hunt_nvram.c
==
--- head/sys/dev/sfxge/common/hunt_nvram.c  Tue Jan 12 15:28:59 2016
(r293769)
+++ head/sys/dev/sfxge/common/hunt_nvram.c  Tue Jan 12 15:31:20 2016
(r293770)
@@ -1288,7 +1288,7 @@ fail1:
__checkReturn   efx_rc_t
 ef10_nvram_partn_size(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__out   size_t *sizep)
 {
efx_rc_t rc;
@@ -1308,7 +1308,7 @@ fail1:
__checkReturn   efx_rc_t
 ef10_nvram_partn_lock(
__inefx_nic_t *enp,
-   __inunsigned int partn)
+   __inuint32_t partn)
 {
efx_rc_t rc;
 
@@ -1326,7 +1326,7 @@ fail1:
__checkReturn   efx_rc_t
 ef10_nvram_partn_read(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__inunsigned int offset,
__out_bcount(size)  caddr_t data,
__insize_t size)
@@ -1358,7 +1358,7 @@ fail1:
__checkReturn   efx_rc_t
 ef10_nvram_partn_erase(
__inefx_nic_t *enp,
-   __inunsigned int partn,
+   __inuint32_t partn,
__inunsigned int offset,
__insize_t size)
 {
@@ -1403,7 +1403,7 @@ fail1:
__checkReturn   efx_rc_t
 ef10_nvram_partn_write(
__inefx_nic_t *enp,
-   __inunsigned int pa

Re: svn commit: r293439 - in head: lib/libc/sys sys/dev/ti sys/kern sys/sys usr.bin/netstat

2016-01-12 Thread Shawn Webb
On Sat, Jan 09, 2016 at 07:41:57PM +, Antoine Brodin wrote:
> On Fri, Jan 8, 2016 at 8:34 PM, Gleb Smirnoff  wrote:
> > Author: glebius
> > Date: Fri Jan  8 20:34:57 2016
> > New Revision: 293439
> > URL: https://svnweb.freebsd.org/changeset/base/293439
> >
> > Log:
> >   New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 and
> >   up to now.
> 
> Hi,
> 
> "SF_FLAGS" addition seems to break graphics/graphviz on head.
> See error log at:
> http://beefy3.nyi.freebsd.org/data/head-i386-default/p405601_s293454/logs/errors/graphviz-2.38.0_10.log
> 739 ports are skipped due to this failure.

I've run into this, too.

Thanks,

-- 
Shawn Webb
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: svn commit: r293439 - in head: lib/libc/sys sys/dev/ti sys/kern sys/sys usr.bin/netstat

2016-01-12 Thread Adrian Chadd
Has this been addressed yet?


-a


On 12 January 2016 at 07:37, Shawn Webb  wrote:
> On Sat, Jan 09, 2016 at 07:41:57PM +, Antoine Brodin wrote:
>> On Fri, Jan 8, 2016 at 8:34 PM, Gleb Smirnoff  wrote:
>> > Author: glebius
>> > Date: Fri Jan  8 20:34:57 2016
>> > New Revision: 293439
>> > URL: https://svnweb.freebsd.org/changeset/base/293439
>> >
>> > Log:
>> >   New sendfile(2) syscall. A joint effort of NGINX and Netflix from 2013 
>> > and
>> >   up to now.
>>
>> Hi,
>>
>> "SF_FLAGS" addition seems to break graphics/graphviz on head.
>> See error log at:
>> http://beefy3.nyi.freebsd.org/data/head-i386-default/p405601_s293454/logs/errors/graphviz-2.38.0_10.log
>> 739 ports are skipped due to this failure.
>
> I've run into this, too.
>
> Thanks,
>
> --
> Shawn Webb
> HardenedBSD
>
> GPG Key ID:  0x6A84658F52456EEE
> GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293774 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Tue Jan 12 16:21:34 2016
New Revision: 293774
URL: https://svnweb.freebsd.org/changeset/base/293774

Log:
  sfxge: regenerate MCDI header
  
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days

Modified:
  head/sys/dev/sfxge/common/efx_regs_mcdi.h

Modified: head/sys/dev/sfxge/common/efx_regs_mcdi.h
==
--- head/sys/dev/sfxge/common/efx_regs_mcdi.h   Tue Jan 12 15:35:00 2016
(r293773)
+++ head/sys/dev/sfxge/common/efx_regs_mcdi.h   Tue Jan 12 16:21:34 2016
(r293774)
@@ -299,6 +299,9 @@
  * have already installed filters. See the comment at
  * MC_CMD_WORKAROUND_BUG26807. */
 #define MC_CMD_ERR_FILTERS_PRESENT 0x1014
+/* The clock whose frequency you've attempted to set set
+ * doesn't exist on this NIC */
+#define MC_CMD_ERR_NO_CLOCK 0x1015
 
 #define MC_CMD_ERR_CODE_OFST 0
 
@@ -318,9 +321,11 @@
 /* Point to the copycode entry point. */
 #define SIENA_MC_BOOTROM_COPYCODE_VEC (0x800 - 3 * 0x4)
 #define HUNT_MC_BOOTROM_COPYCODE_VEC (0x8000 - 3 * 0x4)
+#define MEDFORD_MC_BOOTROM_COPYCODE_VEC (0x1 - 3 * 0x4)
 /* Points to the recovery mode entry point. */
 #define SIENA_MC_BOOTROM_NOFLASH_VEC (0x800 - 2 * 0x4)
 #define HUNT_MC_BOOTROM_NOFLASH_VEC (0x8000 - 2 * 0x4)
+#define MEDFORD_MC_BOOTROM_NOFLASH_VEC (0x1 - 2 * 0x4)
 
 /* The command set exported by the boot ROM (MCDI v0) */
 #define MC_CMD_GET_VERSION_V0_SUPPORTED_FUNCS {\
@@ -1456,9 +1461,11 @@
 #defineMC_CMD_FC_IN_DDR_TEST_START_B1_WIDTH 1
 
 /* MC_CMD_FC_IN_DDR_TEST_POLL msgrequest */
-#defineMC_CMD_FC_IN_DDR_TEST_POLL_LEN 8
+#defineMC_CMD_FC_IN_DDR_TEST_POLL_LEN 12
 #defineMC_CMD_FC_IN_DDR_TEST_CMD_OFST 0
 /*MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 */
+/* Clear previous test result and prepare for restarting DDR test */
+#defineMC_CMD_FC_IN_DDR_TEST_POLL_CLEAR_RESULT_FOR_DDR_TEST_OFST 8
 
 /* MC_CMD_FC_IN_GET_ASSERT msgrequest */
 #defineMC_CMD_FC_IN_GET_ASSERT_LEN 4
@@ -1475,6 +1482,10 @@
 #defineMC_CMD_FC_IN_FPGA_BUILD_SERVICES 0x2
 /* enum: Get the BSP version */
 #defineMC_CMD_FC_IN_FPGA_BUILD_BSP_VERSION 0x3
+/* enum: Get build register for V2 (SFA974X) */
+#defineMC_CMD_FC_IN_FPGA_BUILD_BUILD_V2 0x4
+/* enum: GEt the services register for V2 (SFA974X) */
+#defineMC_CMD_FC_IN_FPGA_BUILD_SERVICES_V2 0x5
 
 /* MC_CMD_FC_IN_READ_MAP msgrequest */
 #defineMC_CMD_FC_IN_READ_MAP_LEN 8
@@ -1832,6 +1843,7 @@
 #defineMC_CMD_FC_IN_DDR_OP_OFST 4
 #defineMC_CMD_FC_IN_DDR_SET_SPD  0x0 /* enum */
 #defineMC_CMD_FC_IN_DDR_GET_STATUS  0x1 /* enum */
+#defineMC_CMD_FC_IN_DDR_SET_INFO  0x2 /* enum */
 #defineMC_CMD_FC_IN_DDR_BANK_OFST 8
 #defineMC_CMD_FC_IN_DDR_BANK_B0  0x0 /* enum */
 #defineMC_CMD_FC_IN_DDR_BANK_B1  0x1 /* enum */
@@ -1855,6 +1867,15 @@
 /* Page index of the spd data copied into MC_CMD_FC_IN_DDR_SPD */
 #defineMC_CMD_FC_IN_DDR_SPD_PAGE_ID_OFST 144
 
+/* MC_CMD_FC_IN_DDR_SET_INFO msgrequest */
+#defineMC_CMD_FC_IN_DDR_SET_INFO_LEN 16
+/*MC_CMD_FC_IN_CMD_OFST 0 */
+/*MC_CMD_FC_IN_DDR_OP_OFST 4 */
+/* Affected bank */
+/*MC_CMD_FC_IN_DDR_BANK_OFST 8 */
+/* Size of DDR */
+#defineMC_CMD_FC_IN_DDR_SIZE_OFST 12
+
 /* MC_CMD_FC_IN_DDR_GET_STATUS msgrequest */
 #defineMC_CMD_FC_IN_DDR_GET_STATUS_LEN 12
 /*MC_CMD_FC_IN_CMD_OFST 0 */
@@ -2387,6 +2408,116 @@
 #defineMC_CMD_FC_OUT_FPGA_BUILD_REVISION_HIGH_LBN 0
 #defineMC_CMD_FC_OUT_FPGA_BUILD_REVISION_HIGH_WIDTH 16
 
+/* MC_CMD_FC_OUT_FPGA_BUILD_V2 msgresponse */
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_LEN 32
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_COMPONENT_INFO_OFST 0
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_IS_APPLICATION_LBN 31
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_IS_APPLICATION_WIDTH 1
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_IS_LICENSED_LBN 30
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_IS_LICENSED_WIDTH 1
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_COMPONENT_ID_LBN 16
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_COMPONENT_ID_WIDTH 14
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_VERSION_MAJOR_LBN 12
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_VERSION_MAJOR_WIDTH 4
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_VERSION_MINOR_LBN 4
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_VERSION_MINOR_WIDTH 8
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_BUILD_NUM_LBN 0
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_BUILD_NUM_WIDTH 4
+/* Build timestamp (seconds since epoch) */
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_TIMESTAMP_OFST 4
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_PARAMETERS_OFST 8
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_PMA_PASSTHROUGH_LBN 31
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_PMA_PASSTHROUGH_WIDTH 1
+#defineMC_CMD_FC_OUT_FPGA_BUILD_V2_SODIMM2_QDR_DEF_LBN 29
+#defi

Re: svn commit: r293439 - in head: lib/libc/sys sys/dev/ti sys/kern sys/sys usr.bin/netstat

2016-01-12 Thread Gleb Smirnoff
  Antoine said that he is going to handle it.

On Tue, Jan 12, 2016 at 08:19:54AM -0800, Adrian Chadd wrote:
A> Has this been addressed yet?
A> 
A> 
A> -a
A> 
A> 
A> On 12 January 2016 at 07:37, Shawn Webb  wrote:
A> > On Sat, Jan 09, 2016 at 07:41:57PM +, Antoine Brodin wrote:
A> >> On Fri, Jan 8, 2016 at 8:34 PM, Gleb Smirnoff  wrote:
A> >> > Author: glebius
A> >> > Date: Fri Jan  8 20:34:57 2016
A> >> > New Revision: 293439
A> >> > URL: https://svnweb.freebsd.org/changeset/base/293439
A> >> >
A> >> > Log:
A> >> >   New sendfile(2) syscall. A joint effort of NGINX and Netflix from 
2013 and
A> >> >   up to now.
A> >>
A> >> Hi,
A> >>
A> >> "SF_FLAGS" addition seems to break graphics/graphviz on head.
A> >> See error log at:
A> >> 
http://beefy3.nyi.freebsd.org/data/head-i386-default/p405601_s293454/logs/errors/graphviz-2.38.0_10.log
A> >> 739 ports are skipped due to this failure.
A> >
A> > I've run into this, too.
A> >
A> > Thanks,
A> >
A> > --
A> > Shawn Webb
A> > HardenedBSD
A> >
A> > GPG Key ID:  0x6A84658F52456EEE
A> > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE

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


svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Ian Lepore
Author: ian
Date: Tue Jan 12 16:31:07 2016
New Revision: 293775
URL: https://svnweb.freebsd.org/changeset/base/293775

Log:
  Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
  because rounding down cannot increase the number of bits needed to express
  the result.
  
  I had no idea there was such a thing as uintfptr_t.
  
  Requested by: bde

Modified:
  head/sys/boot/uboot/lib/copy.c

Modified: head/sys/boot/uboot/lib/copy.c
==
--- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:21:34 2016
(r293774)
+++ head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:31:07 2016
(r293775)
@@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
 
biggest_block = 0;
biggest_size = 0;
-   subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
+   subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
eubldr = roundup2((uint64_t)uboot_heap_end, KERN_ALIGN);
for (i = 0; i < si->mr_no; i++) {
if (si->mr[i].flags != MR_ATTR_DRAM)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293776 - stable/10/usr.sbin/fstyp

2016-01-12 Thread Allan Jude
Author: allanjude
Date: Tue Jan 12 16:38:09 2016
New Revision: 293776
URL: https://svnweb.freebsd.org/changeset/base/293776

Log:
  MFC: r284589
Add the ability to detect ZFS and GELI encrypted file systems to fstyp(8)
  
  MFC: r284644
Fix GCC Warnings
  
  MFC: r284728
Only build ZFS support in absense of WITHOUT_ZFS
  
  MFC: r285426
Remove excess copyrights
  
  MFC: r286569
Use GELI sentinel constant
  
  MFC: r287937
Eliminate unneeded copying of vdev data, goto, etc. and add a note
that checksum of vdev label should be checked (which is not done
currently).
  
No functional change.
  
While I'm there, raise WARNS to 2.
  
  MFC: r292757
Fix order of includes in usr.sbin/fstyp/zfs.c
  
  MFC: r292829
Eliminate unneeded includes.

Added:
  stable/10/usr.sbin/fstyp/geli.c
 - copied, changed from r284589, head/usr.sbin/fstyp/geli.c
  stable/10/usr.sbin/fstyp/zfs.c
 - copied, changed from r284589, head/usr.sbin/fstyp/zfs.c
Modified:
  stable/10/usr.sbin/fstyp/Makefile
  stable/10/usr.sbin/fstyp/fstyp.8
  stable/10/usr.sbin/fstyp/fstyp.c
  stable/10/usr.sbin/fstyp/fstyp.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/fstyp/Makefile
==
--- stable/10/usr.sbin/fstyp/Makefile   Tue Jan 12 16:31:07 2016
(r293775)
+++ stable/10/usr.sbin/fstyp/Makefile   Tue Jan 12 16:38:09 2016
(r293776)
@@ -3,13 +3,43 @@
 .include 
 
 PROG=  fstyp
-SRCS=  fstyp.c ext2fs.c cd9660.c msdosfs.c ntfs.c ufs.c
+SRCS=  cd9660.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c
+
+.if ${MK_ZFS} != "no"
+SRCS +=zfs.c
+.endif
+
 MAN=   fstyp.8
 
-WARNS= 6
+WARNS?=2
 
 .if ${MK_TESTS} != "no"
 SUBDIR+=   tests
 .endif
 
+CFLAGS+=-I${.CURDIR}/../../sys
+
+.if ${MK_ZFS} != "no"
+IGNORE_PRAGMA=  YES
+
+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
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/head
+.endif
+
+DPADD=   ${LIBGEOM} ${LIBMD}
+LDADD=   -lgeom -lmd
+
+.if ${MK_ZFS} != "no"
+DPADD += ${LIBNVPAIR} ${LIBZFS}
+LDADD += -lnvpair -lzfs
+.endif
+
 .include 

Modified: stable/10/usr.sbin/fstyp/fstyp.8
==
--- stable/10/usr.sbin/fstyp/fstyp.8Tue Jan 12 16:31:07 2016
(r293775)
+++ stable/10/usr.sbin/fstyp/fstyp.8Tue Jan 12 16:38:09 2016
(r293776)
@@ -37,20 +37,42 @@
 .Nm
 .Op Fl l
 .Op Fl s
+.Op Fl u
 .Ar special
 .Sh DESCRIPTION
 The
 .Nm
 utility is used to determine the filesystem type on a given device.
 It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems.
+When the
+.Fl u
+flag is specified,
+.Nm
+also recognizes certain additional metadata formats that cannot be
+handled using
+.Xr mount 8 ,
+such as ZFS pools and
+.Xr geli 8
+providers.
+.Pp
 The filesystem name is printed to the standard output
-as, respectively,
-.Li cd9660 ,
-.Li ext2fs ,
-.Li msdosfs ,
-.Li ntfs ,
-or
-.Li ufs .
+as, respectively:
+.Bl -item -offset indent -compact
+.It
+cd9660
+.It
+ext2fs
+.It
+geli
+.It
+msdosfs
+.It
+ntfs
+.It
+ufs
+.It
+zfs
+.El
 .Pp
 Because
 .Nm
@@ -73,6 +95,9 @@ By default,
 only works on regular files and disk-like device nodes.
 Trying to read other file types might have unexpected consequences or hang
 indefinitely.
+.It Fl u
+Include filesystems and devices that cannot be mounted directly by
+.Xr mount 8 .
 .El
 .Sh EXIT STATUS
 The
@@ -82,8 +107,11 @@ type is not recognized.
 .Sh SEE ALSO
 .Xr file 1 ,
 .Xr capsicum 4 ,
+.Xr autofs 8 ,
+.Xr geli 8 ,
 .Xr glabel 8 ,
-.Xr mount 8
+.Xr mount 8 ,
+.Xr zpool 8
 .Sh HISTORY
 The
 .Nm
@@ -95,3 +123,5 @@ The
 utility was developed by
 .An Edward Tomasz Napierala Aq Mt tr...@freebsd.org
 under sponsorship from the FreeBSD Foundation.
+ZFS and GELI support was added by
+.An Allan Jude Aq Mt allanj...@freebsd.org

Modified: stable/10/usr.sbin/fstyp/fstyp.c
==
--- stable/10/usr.sbin/fstyp/fstyp.cTue Jan 12 16:31:07 2016
(r293775)
+++ stable/10/usr.sbin/fstyp/fstyp.cTue Jan 12 16:38:09 2016
(r293776)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -55,13 +54,18 @@ typedef int (*fstyp_function)(FILE *, ch
 static struct {
const char  *name;
fstyp_function  function

Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread Gary Jennejohn
On Tue, 12 Jan 2016 08:55:25 +0100
Joel Dahl  wrote:

> On Tue, Jan 12, 2016 at 01:41:34AM +, Sepherosa Ziehau wrote:
> > Author: sephe
> > Date: Tue Jan 12 01:41:34 2016
> > New Revision: 293720
> > URL: https://svnweb.freebsd.org/changeset/base/293720
> > 
> > Log:
> >   hyperv/hn: Implement SIOC[SG]IFMEDIA support
> >   
> >   Many applications and kernel modules (e.g. bridge) rely on the ifmedia
> >   status report; give them what they want.
> >   
> >   Submitted by: Dexuan Cui 
> >   Reviewed by:  Jun Su , me, adrian
> >   Modified by:  me (minor)  
>   ^^^ Really?
> 
> % finger m...@freebsd.org
> [freebsd.org]
> Trying 8.8.178.110...
> Login: me Name: Michael Elbel
> Directory: /home/me   Shell: /usr/local/bin/bash
> No Mail.
> Mail forwarded to:
> m...@consol.de
> # me
> No Plan.
> 

Michael has been in the password file since the early 1990s when jkh
added him and a number of other friends/colleagues from his days in
Germany, including myself (gj@, but I had a commit bit at one time).

Michael never had a commit bit and I doubt that he's even logged into
freefall for years.

Maybe his name should be changed to melbel, which would eliminate
the me/me@ kerfuffle.

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


Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread Jordan Hubbard
Or hellsbells. :-)

Sent from my iPhone

> On Jan 12, 2016, at 08:49, Gary Jennejohn  wrote:
> 
> 
> Maybe his name should be changed to melbel, which would eliminate
> the me/me@ kerfuffle.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread Mark Linimon
On Tue, Jan 12, 2016 at 05:49:30PM +0100, Gary Jennejohn wrote:
> Maybe his name should be changed to melbel, which would eliminate
> the me/me@ kerfuffle.

Or just start using the convention 'self' in commits.

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


Re: svn commit: r293720 - head/sys/dev/hyperv/netvsc

2016-01-12 Thread NGie Cooper

> On Jan 12, 2016, at 06:30, Ian Lepore  wrote:

…

> Really?  You're complaining about the committer using the personal
> pronoun that refers to one's self in a context of referring to himself?
> 
> Do we really, as a project, have nothing better to do than this endless
> nitpicking at the metadata in commit messages?

Xin called me out on it several months ago, and I agree: if I have to 
MFC someone’s change, it’s better when it says the committers handle as opposed 
to “me”. Not everyone speaks English after all...
Thanks,
-NGie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r293778 - stable/10/sys/modules/if_gif

2016-01-12 Thread Garrett Cooper
Author: ngie
Date: Tue Jan 12 18:24:22 2016
New Revision: 293778
URL: https://svnweb.freebsd.org/changeset/base/293778

Log:
  Fix LINT-NOINET kernels
  
  - Generate opt_inet.h appropriately according to MK_INET_SUPPORT
  - Only add in_gif.c to SRCS if MK_INET_SUPPORT != no
  
  This is a surgical fix since the build infrastructure has diverged 
sufficiently
  between stable/10 and head.
  
  This change will likely be reverted if and when imp's changes to config.mk 
have
  been backported to ^/stable/10 .
  
  Reviewed by: ae (no serious objections)
  Differential Revision: https://reviews.freebsd.org/D4864
  MFC after: 1 week
  Sponsored by: EMCC / Isilon Storage Division

Modified:
  stable/10/sys/modules/if_gif/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/modules/if_gif/Makefile
==
--- stable/10/sys/modules/if_gif/Makefile   Tue Jan 12 18:06:07 2016
(r293777)
+++ stable/10/sys/modules/if_gif/Makefile   Tue Jan 12 18:24:22 2016
(r293778)
@@ -5,11 +5,18 @@
 .PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet ${.CURDIR}/../../netinet6
 
 KMOD=  if_gif
-SRCS=  if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mrouting.h
+SRCS=  if_gif.c opt_inet.h opt_inet6.h opt_mrouting.h
 
 .if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
 opt_inet.h:
echo "#define INET 1" > ${.TARGET}
+.endif
+.else
+OPT_INET!= cat ${KERNBUILDDIR}/opt_inet.h; echo
+.if empty(OPT_INET)
+MK_INET_SUPPORT= no
+.endif
 
 .if ${MK_INET6_SUPPORT} != "no"
 opt_inet6.h:
@@ -25,6 +32,10 @@ MK_INET6_SUPPORT= no
 .endif
 .endif
 
+.if ${MK_INET_SUPPORT} != "no"
+SRCS+= in_gif.c
+.endif
+
 .if ${MK_INET6_SUPPORT} != "no"
 SRCS+= in6_gif.c
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293781 - in head: share/man/man4 sys/dev/uart

2016-01-12 Thread Ian Lepore
Author: ian
Date: Tue Jan 12 18:42:00 2016
New Revision: 293781
URL: https://svnweb.freebsd.org/changeset/base/293781

Log:
  Restore uart PPS signal capture polarity to its historical norm, and add an
  option to invert the polarity in software. Also add an option to capture
  very narrow pulses by using the hardware's MSR delta-bit capability of
  latching line state changes.
  
  This effectively reverts the mistake I made in r286595 which was based on
  empirical measurements made on hardware using TTL-level signaling, in which
  the logic levels are inverted from RS-232. Thus, this re-syncs the polarity
  with the requirements of RFC 2783, which is writen in terms of RS-232
  signaling.
  
  Narrow-pulse mode uses the ability of most ns8250 and similar chips to
  provide a delta indication in the modem status register. The hardware is
  able to notice and latch the change when the pulse width is shorter than
  interrupt latency, which results in the signal no longer being asserted by
  time the interrupt service code runs. When running in this mode we get
  notified only that "a pulse happened" so the driver synthesizes both an
  ASSERT and a CLEAR event (with the same timestamp for each). When the pulse
  width is about equal to the interrupt latency the driver may intermittantly
  see both edges of the pulse. To prevent generating spurious events, the
  driver implements a half-second lockout period after generating an event
  before it will generate another.
  
  Differential Revision:https://reviews.freebsd.org/D4477

Added:
  head/sys/dev/uart/uart_ppstypes.h   (contents, props changed)
Modified:
  head/share/man/man4/uart.4
  head/sys/dev/uart/uart_bus.h
  head/sys/dev/uart/uart_core.c
  head/sys/dev/uart/uart_dev_ns8250.c

Modified: head/share/man/man4/uart.4
==
--- head/share/man/man4/uart.4  Tue Jan 12 18:33:53 2016(r293780)
+++ head/share/man/man4/uart.4  Tue Jan 12 18:42:00 2016(r293781)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 10, 2015
+.Dd December 9, 2015
 .Dt UART 4
 .Os
 .Sh NAME
@@ -160,7 +160,9 @@ The API, accessed via
 is available on the tty device.
 To use the PPS capture feature with
 .Xr ntpd 8 ,
-symlink the tty device to
+symlink the tty callout device
+.Va /dev/cuau?
+to
 .Va /dev/pps0.
 .Pp
 The
@@ -175,15 +177,54 @@ it can be set in
 .Xr loader.conf 5
 or
 .Xr sysctl.conf 5 .
+.Pp
 The following capture modes are available:
 .Bl -tag -compact -offset "" -width ""
-.It 0
+.It 0x00
 Capture disabled.
-.It 1
+.It 0x01
 Capture pulses on the CTS line.
-.It 2
-Capture pulses on the DCD line (default).
+.It 0x02
+Capture pulses on the DCD line.
 .El
+.Pp
+The following values may be ORed with the capture mode to configure 
+capture processing options:
+.Bl -tag -compact -offset "" -width ""
+.It 0x10
+Invert the pulse (RS-232 logic low = ASSERT, high = CLEAR).
+.It 0x20
+Attempt to capture narrow pulses.
+.El
+.Pp
+Add the narrow pulse option when the incoming PPS pulse width is small
+enough to prevent reliable capture in normal mode.
+In narrow mode the driver uses the hardware's ability to latch a line
+state change; not all hardware has this capability.
+The hardware latch provides a reliable indication that a pulse occurred,
+but prevents distinguishing between the CLEAR and ASSERT edges of the pulse.
+For each detected pulse, the driver synthesizes both an ASSERT and a CLEAR
+event, using the same timestamp for each.
+To prevent spurious events when the hardware is intermittently able to
+see both edges of a pulse, the driver will not generate a new pair of
+events within a half second of the prior pair.
+Both normal and narrow pulse modes work with
+.Xr ntpd 8 .
+.Pp
+Add the invert option when the connection to the uart device uses TTL
+level signals, or when the PPS source emits inverted pulses.
+RFC 2783 defines an ASSERT event as a higher-voltage line level, and a CLEAR
+event as a lower-voltage line level, in the context of the RS-232 protocol.
+The modem control signals on a TTL-level connection are typically
+inverted from the RS-232 levels.
+For example, carrier presence is indicated by a high signal on an RS-232
+DCD line, and by a low signal on a TTL DCD line.
+This is due to the use of inverting line driver buffers to convert between
+TTL and RS-232 line levels in most hardware designs.
+Generally speaking, a connection to a DB-9 style connector is an RS-232
+level signal at up to 12 volts.
+A connection to header pins or an edge-connector on an embedded board
+is typically a TTL signal at 3.3 or 5 volts.
 .Sh FILES
 .Bl -tag -width ".Pa /dev/ttyu?.init" -compact
 .It Pa /dev/ttyu?

Modified: head/sys/dev/uart/uart_bus.h
==
--- head/sys/dev/uart/uart_bus.hTue Jan 12 18:33:53 2016
(r293780)
+++ head/sys/dev/uart/uart_bus.hTue Jan 12 18:4

svn commit: r293782 - in stable: 10/contrib/llvm/patches 10/contrib/llvm/tools/clang/tools/driver 10/usr.bin/clang/clang 9/contrib/llvm/patches 9/contrib/llvm/tools/clang/tools/driver 9/usr.bin/cla...

2016-01-12 Thread Dimitry Andric
Author: dim
Date: Tue Jan 12 19:33:43 2016
New Revision: 293782
URL: https://svnweb.freebsd.org/changeset/base/293782

Log:
  MFC r292950:
  
  Drop the clang patch which adds recognition of 'CC' suffixes as aliases
  for --driver-mode=g++, since this was never upstreamed.  For backwards
  compatibility, add a wrapper shell script.

Added:
  stable/9/usr.bin/clang/clang/CC.sh
 - copied unchanged from r292950, head/usr.bin/clang/clang/CC.sh
Deleted:
  stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff
Modified:
  stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp
  stable/9/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)
  stable/9/usr.bin/clang/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/10/usr.bin/clang/clang/CC.sh
 - copied unchanged from r292950, head/usr.bin/clang/clang/CC.sh
Deleted:
  stable/10/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff
Modified:
  stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp
  stable/10/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp
==
--- stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp   Tue Jan 12 
18:42:00 2016(r293781)
+++ stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp   Tue Jan 12 
19:33:43 2016(r293782)
@@ -215,14 +215,12 @@ static void ParseProgName(SmallVectorImp
   } suffixes [] = {
 { "clang", 0 },
 { "clang++",   "--driver-mode=g++" },
-{ "clang-CC",  "--driver-mode=g++" },
 { "clang-c++", "--driver-mode=g++" },
 { "clang-cc",  0 },
 { "clang-cpp", "--driver-mode=cpp" },
 { "clang-g++", "--driver-mode=g++" },
 { "clang-gcc", 0 },
 { "clang-cl",  "--driver-mode=cl"  },
-{ "CC","--driver-mode=g++" },
 { "cc",0 },
 { "cpp",   "--driver-mode=cpp" },
 { "cl" ,   "--driver-mode=cl"  },

Copied: stable/9/usr.bin/clang/clang/CC.sh (from r292950, 
head/usr.bin/clang/clang/CC.sh)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/9/usr.bin/clang/clang/CC.sh  Tue Jan 12 19:33:43 2016
(r293782, copy of r292950, head/usr.bin/clang/clang/CC.sh)
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $FreeBSD$
+# This file is in the public domain.
+exec /usr/bin/c++ "$@"

Modified: stable/9/usr.bin/clang/clang/Makefile
==
--- stable/9/usr.bin/clang/clang/Makefile   Tue Jan 12 18:42:00 2016
(r293781)
+++ stable/9/usr.bin/clang/clang/Makefile   Tue Jan 12 19:33:43 2016
(r293782)
@@ -18,9 +18,11 @@ LINKS=   ${BINDIR}/clang ${BINDIR}/clang++
 MLINKS=clang.1 clang++.1 \
clang.1 clang-cpp.1
 .if ${MK_CLANG_IS_CC} != "no"
+SCRIPTS=CC.sh
+SCRIPTSNAME=CC
+
 LINKS+=${BINDIR}/clang ${BINDIR}/cc \
${BINDIR}/clang ${BINDIR}/c++ \
-   ${BINDIR}/clang ${BINDIR}/CC \
${BINDIR}/clang ${BINDIR}/cpp
 MLINKS+= clang.1 cc.1 \
clang.1 c++.1 \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293782 - in stable: 10/contrib/llvm/patches 10/contrib/llvm/tools/clang/tools/driver 10/usr.bin/clang/clang 9/contrib/llvm/patches 9/contrib/llvm/tools/clang/tools/driver 9/usr.bin/cla...

2016-01-12 Thread Dimitry Andric
Author: dim
Date: Tue Jan 12 19:33:43 2016
New Revision: 293782
URL: https://svnweb.freebsd.org/changeset/base/293782

Log:
  MFC r292950:
  
  Drop the clang patch which adds recognition of 'CC' suffixes as aliases
  for --driver-mode=g++, since this was never upstreamed.  For backwards
  compatibility, add a wrapper shell script.

Added:
  stable/10/usr.bin/clang/clang/CC.sh
 - copied unchanged from r292950, head/usr.bin/clang/clang/CC.sh
Deleted:
  stable/10/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff
Modified:
  stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp
  stable/10/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Added:
  stable/9/usr.bin/clang/clang/CC.sh
 - copied unchanged from r292950, head/usr.bin/clang/clang/CC.sh
Deleted:
  stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff
Modified:
  stable/9/contrib/llvm/tools/clang/tools/driver/driver.cpp
  stable/9/usr.bin/clang/clang/Makefile
Directory Properties:
  stable/9/contrib/llvm/   (props changed)
  stable/9/contrib/llvm/tools/clang/   (props changed)
  stable/9/usr.bin/clang/   (props changed)

Modified: stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp
==
--- stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp  Tue Jan 12 
18:42:00 2016(r293781)
+++ stable/10/contrib/llvm/tools/clang/tools/driver/driver.cpp  Tue Jan 12 
19:33:43 2016(r293782)
@@ -215,14 +215,12 @@ static void ParseProgName(SmallVectorImp
   } suffixes [] = {
 { "clang", 0 },
 { "clang++",   "--driver-mode=g++" },
-{ "clang-CC",  "--driver-mode=g++" },
 { "clang-c++", "--driver-mode=g++" },
 { "clang-cc",  0 },
 { "clang-cpp", "--driver-mode=cpp" },
 { "clang-g++", "--driver-mode=g++" },
 { "clang-gcc", 0 },
 { "clang-cl",  "--driver-mode=cl"  },
-{ "CC","--driver-mode=g++" },
 { "cc",0 },
 { "cpp",   "--driver-mode=cpp" },
 { "cl" ,   "--driver-mode=cl"  },

Copied: stable/10/usr.bin/clang/clang/CC.sh (from r292950, 
head/usr.bin/clang/clang/CC.sh)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/usr.bin/clang/clang/CC.sh Tue Jan 12 19:33:43 2016
(r293782, copy of r292950, head/usr.bin/clang/clang/CC.sh)
@@ -0,0 +1,4 @@
+#!/bin/sh
+# $FreeBSD$
+# This file is in the public domain.
+exec /usr/bin/c++ "$@"

Modified: stable/10/usr.bin/clang/clang/Makefile
==
--- stable/10/usr.bin/clang/clang/Makefile  Tue Jan 12 18:42:00 2016
(r293781)
+++ stable/10/usr.bin/clang/clang/Makefile  Tue Jan 12 19:33:43 2016
(r293782)
@@ -18,9 +18,11 @@ LINKS=   ${BINDIR}/clang ${BINDIR}/clang++
 MLINKS=clang.1 clang++.1 \
clang.1 clang-cpp.1
 .if ${MK_CLANG_IS_CC} != "no"
+SCRIPTS=CC.sh
+SCRIPTSNAME=CC
+
 LINKS+=${BINDIR}/clang ${BINDIR}/cc \
${BINDIR}/clang ${BINDIR}/c++ \
-   ${BINDIR}/clang ${BINDIR}/CC \
${BINDIR}/clang ${BINDIR}/cpp
 MLINKS+= clang.1 cc.1 \
clang.1 c++.1 \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293739 - head/release

2016-01-12 Thread Colin Percival
On 01/12/16 02:31, Kubilay Kocak wrote:
> On 12/01/2016 8:42 PM, Colin Percival wrote:
>> Author: cperciva
>> Date: Tue Jan 12 09:42:21 2016
>> New Revision: 293739
>> URL: https://svnweb.freebsd.org/changeset/base/293739
>>
>> Log:
>>   Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
>>   EC2 images.
>>   
>>   X-MFC after:   if/when the driver fixes get MFCed
> 
> Is there a Bugzilla issue reference for this (or the head changeset)?

The commit which finally got this working was r293338, but my understanding
is that there are lots of earlier driver updates too.  Approximately all of
sys/dev/ixgbe will need to be MFCed, I think.

References:
https://reviews.freebsd.org/D4788
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202983

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293783 - head/lib/libc/sys

2016-01-12 Thread Jilles Tjoelker
Author: jilles
Date: Tue Jan 12 20:53:57 2016
New Revision: 293783
URL: https://svnweb.freebsd.org/changeset/base/293783

Log:
  Update futimens/utimensat for MFC to stable/10:
  
  * Fix __FreeBSD_version check.
  * Update history section in man page.
  
  An MFC of this commit to stable/10 will allow using the new system calls
  instead of the fallback.
  
  MFC after:3 days

Modified:
  head/lib/libc/sys/futimens.c
  head/lib/libc/sys/utimensat.2
  head/lib/libc/sys/utimensat.c

Modified: head/lib/libc/sys/futimens.c
==
--- head/lib/libc/sys/futimens.cTue Jan 12 19:33:43 2016
(r293782)
+++ head/lib/libc/sys/futimens.cTue Jan 12 20:53:57 2016
(r293783)
@@ -42,8 +42,11 @@ futimens(int fd, const struct timespec t
 {
struct timeval now, tv[2], *tvp;
struct stat sb;
+   int osreldate;
 
-   if (__getosreldate() >= 1100056)
+   osreldate = __getosreldate();
+   if (osreldate >= 1100056 ||
+   (osreldate >= 1002506 && osreldate < 110))
return (__sys_futimens(fd, times));
 
if (times == NULL || (times[0].tv_nsec == UTIME_NOW &&

Modified: head/lib/libc/sys/utimensat.2
==
--- head/lib/libc/sys/utimensat.2   Tue Jan 12 19:33:43 2016
(r293782)
+++ head/lib/libc/sys/utimensat.2   Tue Jan 12 20:53:57 2016
(r293783)
@@ -31,7 +31,7 @@
 .\" @(#)utimes.2   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2015
+.Dd January 12, 2016
 .Dt UTIMENSAT 2
 .Os
 .Sh NAME
@@ -289,4 +289,4 @@ The
 and
 .Fn utimensat
 system calls appeared in
-.Fx 11.0 .
+.Fx 10.3 .

Modified: head/lib/libc/sys/utimensat.c
==
--- head/lib/libc/sys/utimensat.c   Tue Jan 12 19:33:43 2016
(r293782)
+++ head/lib/libc/sys/utimensat.c   Tue Jan 12 20:53:57 2016
(r293783)
@@ -42,8 +42,11 @@ utimensat(int fd, const char *path, cons
 {
struct timeval now, tv[2], *tvp;
struct stat sb;
+   int osreldate;
 
-   if (__getosreldate() >= 1100056)
+   osreldate = __getosreldate();
+   if (osreldate >= 1100056 ||
+   (osreldate >= 1002506 && osreldate < 110))
return (__sys_utimensat(fd, path, times, flag));
 
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293739 - head/release

2016-01-12 Thread NGie Cooper
On Tue, Jan 12, 2016 at 12:42 PM, Colin Percival  wrote:
> On 01/12/16 02:31, Kubilay Kocak wrote:
>> On 12/01/2016 8:42 PM, Colin Percival wrote:
>>> Author: cperciva
>>> Date: Tue Jan 12 09:42:21 2016
>>> New Revision: 293739
>>> URL: https://svnweb.freebsd.org/changeset/base/293739
>>>
>>> Log:
>>>   Enable "EC2 Enhanced Networking" (aka. SR-IOV networking) when creating
>>>   EC2 images.
>>>
>>>   X-MFC after:   if/when the driver fixes get MFCed
>>
>> Is there a Bugzilla issue reference for this (or the head changeset)?
>
> The commit which finally got this working was r293338, but my understanding
> is that there are lots of earlier driver updates too.  Approximately all of
> sys/dev/ixgbe will need to be MFCed, I think.
>
> References:
> https://reviews.freebsd.org/D4788
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202983

This also needs to be done in order for the ixgbe/ixv split to be
backported: https://reviews.freebsd.org/D4767 (it's a doosey...).
Thanks!
-NGie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Steven Hartland

I think this breaks arm arches:
/usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24: 
error: use of undeclared identifier 'uintfptr_t'

subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
 ^
/usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/param.h:295:28: 
note: expanded from macro 'rounddown2'
#define rounddown2(x, y) ((x)&(~((y)-1)))  /* if y is power of 
two */


On 12/01/2016 16:31, Ian Lepore wrote:

Author: ian
Date: Tue Jan 12 16:31:07 2016
New Revision: 293775
URL: https://svnweb.freebsd.org/changeset/base/293775

Log:
   Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
   because rounding down cannot increase the number of bits needed to express
   the result.
   
   I had no idea there was such a thing as uintfptr_t.
   
   Requested by: bde


Modified:
   head/sys/boot/uboot/lib/copy.c

Modified: head/sys/boot/uboot/lib/copy.c
==
--- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:21:34 2016
(r293774)
+++ head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:31:07 2016
(r293775)
@@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
  
  		biggest_block = 0;

biggest_size = 0;
-   subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
+   subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
eubldr = roundup2((uint64_t)uboot_heap_end, KERN_ALIGN);
for (i = 0; i < si->mr_no; i++) {
if (si->mr[i].flags != MR_ATTR_DRAM)



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


svn commit: r293786 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 22:52:45 2016
New Revision: 293786
URL: https://svnweb.freebsd.org/changeset/base/293786

Log:
  MFC r289199
  Add support for reading device temperature

Modified:
  stable/10/sys/dev/bxe/bxe.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:47:16 2016(r293785)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:52:45 2016(r293786)
@@ -16154,9 +16154,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293787 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 22:58:46 2016
New Revision: 293787
URL: https://svnweb.freebsd.org/changeset/base/293787

Log:
  MFC r292638
Check for packet_length is greater than 60 bytes as well as packet_length is
greater than len_on_bd, before invoking the routine to handle jumbo over SGL
(bxe_service_rxsgl()).
Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and
erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
Fix formatting in bxe_sysctl_state()

Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe_stats.c
  stable/10/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:52:45 2016(r293786)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:58:46 2016(r293787)
@@ -483,6 +483,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -596,6 +600,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3486,11 +3494,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16154,12 +16165,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: stable/10/sys/dev/bxe/bxe_stats.c
==
--- stable/10/sys/dev/bxe/bxe_stats.c   Tue Jan 12 22:52:45 2016
(r293786)
+++ stable/10/sys/dev/bxe/bxe_stats.c   Tue Jan 12 22:58:46 2016
(r293787)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: stable/10/sys/dev/bxe/bxe_stats.h
==
--- stable/10/sys/dev/bxe/bxe_stats.h   Tue Jan 12 22:52:45 2016
(r293786)
+++ stable/10/sys/dev/bxe/bxe_stats.h   Tue Jan 12 22:58:46 2016
(r293787)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 uint32_t rx_jumbo_sge_pkts_old;
 uint32_t rx_soft_errors_old;
 uint3

svn commit: r293788 - stable/10/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:16:27 2016
New Revision: 293788
URL: https://svnweb.freebsd.org/changeset/base/293788

Log:
  MFC r292639
  Add support for firmware dump (a.k.a grcdump)

Added:
  stable/10/sys/dev/bxe/bxe_dump.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_dump.h
  stable/10/sys/dev/bxe/bxe_ioctl.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_ioctl.h
Modified:
  stable/10/sys/dev/bxe/bxe.c
  stable/10/sys/dev/bxe/bxe.h
  stable/10/sys/dev/bxe/ecore_init.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/bxe/bxe.c
==
--- stable/10/sys/dev/bxe/bxe.c Tue Jan 12 22:58:46 2016(r293787)
+++ stable/10/sys/dev/bxe/bxe.c Tue Jan 12 23:16:27 2016(r293788)
@@ -747,6 +747,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4514,7 +4516,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4534,7 +4536,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16308,6 +16311,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, &sc->debug,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, &sc->trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, &sc->rx_budget, 0,
@@ -16436,8 +16445,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifnet != NULL) {
+ether_ifdetach(sc->ifnet);
+}
+ifmedia_removeall(&sc->ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16451,6 +16472,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16465,6 +16487,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16536,6 +16559,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18856,3 +18881,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)
+{
+if (CHIP_IS_E1(sc))
+return dump_num_registers[0][pre

svn commit: r293789 - stable/9/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:26:45 2016
New Revision: 293789
URL: https://svnweb.freebsd.org/changeset/base/293789

Log:
  MFC r289199
Add support for reading device temperature

Modified:
  stable/9/sys/dev/bxe/bxe.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:16:27 2016(r293788)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:26:45 2016(r293789)
@@ -16163,9 +16163,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293790 - stable/9/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:44:03 2016
New Revision: 293790
URL: https://svnweb.freebsd.org/changeset/base/293790

Log:
  MFC r292638
  Check for packet_length is greater than 60 bytes as well as packet_length 
is
  greater than len_on_bd, before invoking the routine to handle jumbo over 
SGL
  (bxe_service_rxsgl()).
  Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) 
and
  erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
  Fix formatting in bxe_sysctl_state()

Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe_stats.c
  stable/9/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:26:45 2016(r293789)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:44:03 2016(r293790)
@@ -483,6 +483,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -596,6 +600,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3486,11 +3494,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16163,12 +16174,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: stable/9/sys/dev/bxe/bxe_stats.c
==
--- stable/9/sys/dev/bxe/bxe_stats.cTue Jan 12 23:26:45 2016
(r293789)
+++ stable/9/sys/dev/bxe/bxe_stats.cTue Jan 12 23:44:03 2016
(r293790)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: stable/9/sys/dev/bxe/bxe_stats.h
==
--- stable/9/sys/dev/bxe/bxe_stats.hTue Jan 12 23:26:45 2016
(r293789)
+++ stable/9/sys/dev/bxe/bxe_stats.hTue Jan 12 23:44:03 2016
(r293790)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 

svn commit: r293791 - stable/9/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Tue Jan 12 23:48:39 2016
New Revision: 293791
URL: https://svnweb.freebsd.org/changeset/base/293791

Log:
  MFC r292639
Add support for firmware dump (a.k.a grcdump)

Added:
  stable/9/sys/dev/bxe/bxe_dump.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_dump.h
  stable/9/sys/dev/bxe/bxe_ioctl.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_ioctl.h
Modified:
  stable/9/sys/dev/bxe/bxe.c
  stable/9/sys/dev/bxe/bxe.h
  stable/9/sys/dev/bxe/ecore_init.h
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/bxe/bxe.c
==
--- stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:44:03 2016(r293790)
+++ stable/9/sys/dev/bxe/bxe.c  Tue Jan 12 23:48:39 2016(r293791)
@@ -747,6 +747,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4514,7 +4516,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4534,7 +4536,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16317,6 +16320,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, &sc->debug,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, &sc->trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, &sc->rx_budget, 0,
@@ -16445,8 +16454,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifnet != NULL) {
+ether_ifdetach(sc->ifnet);
+}
+ifmedia_removeall(&sc->ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16460,6 +16481,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16474,6 +16496,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16545,6 +16568,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18865,3 +18890,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)
+{

svn commit: r293792 - head/sys/boot/uboot/lib

2016-01-12 Thread Ian Lepore
Author: ian
Date: Wed Jan 13 00:22:12 2016
New Revision: 293792
URL: https://svnweb.freebsd.org/changeset/base/293792

Log:
  Go back to using uintptr_t, because code that actually compiles is
  infinitely less buggy than code that is theoretically correct in some
  alternate universe.
  
  The uintfptr_t type is apparently a freebsd invention, and exists only when
  compiling the kernel.  It's a little hard to say for sure, since it doesn't
  seem to be documented anywhere except in email advice to unsuspecting and
  overly-trusting souls, who then get to wear the pointy hat for blindly
  following advice without investigating or testing it first.

Modified:
  head/sys/boot/uboot/lib/copy.c

Modified: head/sys/boot/uboot/lib/copy.c
==
--- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 23:48:39 2016
(r293791)
+++ head/sys/boot/uboot/lib/copy.c  Wed Jan 13 00:22:12 2016
(r293792)
@@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
 
biggest_block = 0;
biggest_size = 0;
-   subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
+   subldr = rounddown2((uintptr_t)_start, KERN_ALIGN);
eubldr = roundup2((uint64_t)uboot_heap_end, KERN_ALIGN);
for (i = 0; i < si->mr_no; i++) {
if (si->mr[i].flags != MR_ATTR_DRAM)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Ian Lepore
On Tue, 2016-01-12 at 22:49 +, Steven Hartland wrote:
> I think this breaks arm arches:
> /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24: 
> error: use of undeclared identifier 'uintfptr_t'
>  subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
>   ^
> /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/para
> m.h:295:28: 
> note: expanded from macro 'rounddown2'
> #define rounddown2(x, y) ((x)&(~((y)-1)))  /* if y is power
> of 
> two */
> 

Ooops, sorry.  Should be fixed now.

-- Ian

> On 12/01/2016 16:31, Ian Lepore wrote:
> > Author: ian
> > Date: Tue Jan 12 16:31:07 2016
> > New Revision: 293775
> > URL: https://svnweb.freebsd.org/changeset/base/293775
> > 
> > Log:
> >Cast using uintfptr_t and eliminate the cast to uint64_t which
> > is uneeded
> >because rounding down cannot increase the number of bits needed
> > to express
> >the result.
> >
> >I had no idea there was such a thing as uintfptr_t.
> >
> >Requested by: bde
> > 
> > Modified:
> >head/sys/boot/uboot/lib/copy.c
> > 
> > Modified: head/sys/boot/uboot/lib/copy.c
> > ===
> > ===
> > --- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:21:34 2016
> > (r293774)
> > +++ head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:31:07 2016
> > (r293775)
> > @@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
> >   
> > biggest_block = 0;
> > biggest_size = 0;
> > -   subldr = rounddown2((uint64_t)(uintptr_t)_start,
> > KERN_ALIGN);
> > +   subldr = rounddown2((uintfptr_t)_start,
> > KERN_ALIGN);
> > eubldr = roundup2((uint64_t)uboot_heap_end,
> > KERN_ALIGN);
> > for (i = 0; i < si->mr_no; i++) {
> > if (si->mr[i].flags != MR_ATTR_DRAM)
> > 
> 
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293793 - stable/8/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 00:26:45 2016
New Revision: 293793
URL: https://svnweb.freebsd.org/changeset/base/293793

Log:
  MFC r289199
Add support for reading device temperature

Modified:
  stable/8/sys/dev/bxe/bxe.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:22:12 2016(r293792)
+++ stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:26:45 2016(r293793)
@@ -16163,9 +16163,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293794 - stable/8/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 00:29:59 2016
New Revision: 293794
URL: https://svnweb.freebsd.org/changeset/base/293794

Log:
  MFC r292638
  Check for packet_length is greater than 60 bytes as well as packet_length 
is
  greater than len_on_bd, before invoking the routine to handle jumbo over 
SGL
  (bxe_service_rxsgl()).
  Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) 
and
  erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
  Fix formatting in bxe_sysctl_state()

Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe_stats.c
  stable/8/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:26:45 2016(r293793)
+++ stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:29:59 2016(r293794)
@@ -483,6 +483,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -596,6 +600,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3486,11 +3494,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16163,12 +16174,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: stable/8/sys/dev/bxe/bxe_stats.c
==
--- stable/8/sys/dev/bxe/bxe_stats.cWed Jan 13 00:26:45 2016
(r293793)
+++ stable/8/sys/dev/bxe/bxe_stats.cWed Jan 13 00:29:59 2016
(r293794)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: stable/8/sys/dev/bxe/bxe_stats.h
==
--- stable/8/sys/dev/bxe/bxe_stats.hWed Jan 13 00:26:45 2016
(r293793)
+++ stable/8/sys/dev/bxe/bxe_stats.hWed Jan 13 00:29:59 2016
(r293794)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 

svn commit: r293795 - stable/8/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 00:34:16 2016
New Revision: 293795
URL: https://svnweb.freebsd.org/changeset/base/293795

Log:
  MFC r292639
Add support for firmware dump (a.k.a grcdump)

Added:
  stable/8/sys/dev/bxe/bxe_dump.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_dump.h
  stable/8/sys/dev/bxe/bxe_ioctl.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_ioctl.h
Modified:
  stable/8/sys/dev/bxe/bxe.c
  stable/8/sys/dev/bxe/bxe.h
  stable/8/sys/dev/bxe/ecore_init.h
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)

Modified: stable/8/sys/dev/bxe/bxe.c
==
--- stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:29:59 2016(r293794)
+++ stable/8/sys/dev/bxe/bxe.c  Wed Jan 13 00:34:16 2016(r293795)
@@ -747,6 +747,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4514,7 +4516,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4534,7 +4536,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16317,6 +16320,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, &sc->debug, 0,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, &sc->trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, &sc->rx_budget, 0,
@@ -16445,8 +16454,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifnet != NULL) {
+ether_ifdetach(sc->ifnet);
+}
+ifmedia_removeall(&sc->ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16460,6 +16481,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16474,6 +16496,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16545,6 +16568,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18865,3 +18890,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)

svn commit: r293796 - head/sys/boot/efi/libefi

2016-01-12 Thread Steven Hartland
Author: smh
Date: Wed Jan 13 00:37:28 2016
New Revision: 293796
URL: https://svnweb.freebsd.org/changeset/base/293796

Log:
  Fix typo in libefi.c
  
  Fix a typo in libefl.c (removal or L) introduced by r293724
  
  MFC after:2 weeks
  X-MFC-With:   r293268
  Sponsored by: Multiplay

Modified:
  head/sys/boot/efi/libefi/libefi.c

Modified: head/sys/boot/efi/libefi/libefi.c
==
--- head/sys/boot/efi/libefi/libefi.c   Wed Jan 13 00:34:16 2016
(r293795)
+++ head/sys/boot/efi/libefi/libefi.c   Wed Jan 13 00:37:28 2016
(r293796)
@@ -179,7 +179,7 @@ efi_main(EFI_HANDLE image_handle, EFI_SY
argv = malloc((argc + 1) * sizeof(CHAR16*));
argc = 0;
if (addprog)
-   argv[argc++] = (CHAR16 *)"loader.efi";
+   argv[argc++] = (CHAR16 *)L"loader.efi";
argp = args;
while (argp != NULL && *argp != 0) {
argp = arg_skipsep(argp);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Ian Lepore
On Tue, 2016-01-12 at 02:17 +, Steven Hartland wrote:
> Author: smh
> Date: Tue Jan 12 02:17:39 2016
> New Revision: 293724
> URL: https://svnweb.freebsd.org/changeset/base/293724
> 
> Log:
>   Enable warnings in EFI boot code
>   
>   Set WARNS if not set for EFI boot code and fix the issues
> highlighted by
>   setting it.
>   

This appears to break arm builds when gcc is the compiler:

cc1: warnings being treated as errors
In file included from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efi.h:52,
 from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:35:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efiapi.h:535: 
warning: function declaration isn't a prototype
In file included from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:39:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common/bootstrap.h:332:
 warning: redundant redeclaration of 'delay'
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efilib.h:53: 
warning: previous declaration of 'delay' was here
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common/bootstrap.h:336:
 warning: redundant redeclaration of 'time'
/bsdstg/rm92/obj/arm.arm/local/build/staging/freebsd/rm92/src/tmp/usr/include/time.h:154:
 warning: previous declaration of 'time' was here

-- Ian

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


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Steven Hartland

Was this meant to be a full revert as you now have:

subldr = rounddown2((uintptr_t)_start, KERN_ALIGN);

vs the original:

subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);

i.e. missing the final conversion to uint64_t?



On 13/01/2016 00:25, Ian Lepore wrote:

On Tue, 2016-01-12 at 22:49 +, Steven Hartland wrote:

I think this breaks arm arches:
/usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24:
error: use of undeclared identifier 'uintfptr_t'
  subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
   ^
/usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/para
m.h:295:28:
note: expanded from macro 'rounddown2'
#define rounddown2(x, y) ((x)&(~((y)-1)))  /* if y is power
of
two */


Ooops, sorry.  Should be fixed now.

-- Ian


On 12/01/2016 16:31, Ian Lepore wrote:

Author: ian
Date: Tue Jan 12 16:31:07 2016
New Revision: 293775
URL: https://svnweb.freebsd.org/changeset/base/293775

Log:
Cast using uintfptr_t and eliminate the cast to uint64_t which
is uneeded
because rounding down cannot increase the number of bits needed
to express
the result.

I had no idea there was such a thing as uintfptr_t.

Requested by: bde


Modified:
head/sys/boot/uboot/lib/copy.c

Modified: head/sys/boot/uboot/lib/copy.c
===
===
--- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:21:34 2016
(r293774)
+++ head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:31:07 2016
(r293775)
@@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
   
   		biggest_block = 0;

biggest_size = 0;
-   subldr = rounddown2((uint64_t)(uintptr_t)_start,
KERN_ALIGN);
+   subldr = rounddown2((uintfptr_t)_start,
KERN_ALIGN);
eubldr = roundup2((uint64_t)uboot_heap_end,
KERN_ALIGN);
for (i = 0; i < si->mr_no; i++) {
if (si->mr[i].flags != MR_ATTR_DRAM)





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


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Steven Hartland

On 13/01/2016 00:41, Ian Lepore wrote:

On Tue, 2016-01-12 at 02:17 +, Steven Hartland wrote:

Author: smh
Date: Tue Jan 12 02:17:39 2016
New Revision: 293724
URL: https://svnweb.freebsd.org/changeset/base/293724

Log:
   Enable warnings in EFI boot code
   
   Set WARNS if not set for EFI boot code and fix the issues

highlighted by
   setting it.
   

This appears to break arm builds when gcc is the compiler:

cc1: warnings being treated as errors
In file included from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efi.h:52,
  from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:35:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efiapi.h:535: 
warning: function declaration isn't a prototype
In file included from 
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:39:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common/bootstrap.h:332:
 warning: redundant redeclaration of 'delay'
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/efilib.h:53: 
warning: previous declaration of 'delay' was here
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common/bootstrap.h:336:
 warning: redundant redeclaration of 'time'
/bsdstg/rm92/obj/arm.arm/local/build/staging/freebsd/rm92/src/tmp/usr/include/time.h:154:
 warning: previous declaration of 'time' was here

-- Ian

Passes a full tinderbox so I assume your forcing gcc for some reason?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Ian Lepore
On Wed, 2016-01-13 at 00:43 +, Steven Hartland wrote:
> On 13/01/2016 00:41, Ian Lepore wrote:
> > On Tue, 2016-01-12 at 02:17 +, Steven Hartland wrote:
> > > Author: smh
> > > Date: Tue Jan 12 02:17:39 2016
> > > New Revision: 293724
> > > URL: https://svnweb.freebsd.org/changeset/base/293724
> > > 
> > > Log:
> > >Enable warnings in EFI boot code
> > >
> > >Set WARNS if not set for EFI boot code and fix the issues
> > > highlighted by
> > >setting it.
> > >
> > This appears to break arm builds when gcc is the compiler:
> > 
> > cc1: warnings being treated as errors
> > In file included from
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
> > fi.h:52,
> >   from
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:35
> > :
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
> > fiapi.h:535: warning: function declaration isn't a prototype
> > In file included from
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:39
> > :
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common
> > /bootstrap.h:332: warning: redundant redeclaration of 'delay'
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
> > filib.h:53: warning: previous declaration of 'delay' was here
> > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common
> > /bootstrap.h:336: warning: redundant redeclaration of 'time'
> > /bsdstg/rm92/obj/arm.arm/local/build/staging/freebsd/rm92/src/tmp/u
> > sr/include/time.h:154: warning: previous declaration of 'time' was
> > here
> > 
> > -- Ian
> Passes a full tinderbox so I assume your forcing gcc for some reason?

For several reasons.  The fact that gcc isn't the default compiler
doesn't mean that it's okay for code to not compile with gcc; it's
still a supported compiler for arm.

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


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Ian Lepore
On Wed, 2016-01-13 at 00:41 +, Steven Hartland wrote:
> Was this meant to be a full revert as you now have:
> 
> subldr = rounddown2((uintptr_t)_start, KERN_ALIGN);
> 
> vs the original:
> 
> subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
> 
> i.e. missing the final conversion to uint64_t?
> 
> 

The uint64_t cast is still redudant so I didn't add that back.

-- Ian

> 
> On 13/01/2016 00:25, Ian Lepore wrote:
> > On Tue, 2016-01-12 at 22:49 +, Steven Hartland wrote:
> > > I think this breaks arm arches:
> > > /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24
> > > :
> > > error: use of undeclared identifier 'uintfptr_t'
> > >   subldr = rounddown2((uintfptr_t)_start,
> > > KERN_ALIGN);
> > >^
> > > /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/
> > > para
> > > m.h:295:28:
> > > note: expanded from macro 'rounddown2'
> > > #define rounddown2(x, y) ((x)&(~((y)-1)))  /* if y is
> > > power
> > > of
> > > two */
> > > 
> > Ooops, sorry.  Should be fixed now.
> > 
> > -- Ian
> > 
> > > On 12/01/2016 16:31, Ian Lepore wrote:
> > > > Author: ian
> > > > Date: Tue Jan 12 16:31:07 2016
> > > > New Revision: 293775
> > > > URL: https://svnweb.freebsd.org/changeset/base/293775
> > > > 
> > > > Log:
> > > > Cast using uintfptr_t and eliminate the cast to uint64_t
> > > > which
> > > > is uneeded
> > > > because rounding down cannot increase the number of bits
> > > > needed
> > > > to express
> > > > the result.
> > > > 
> > > > I had no idea there was such a thing as uintfptr_t.
> > > > 
> > > > Requested by: bde
> > > > 
> > > > Modified:
> > > > head/sys/boot/uboot/lib/copy.c
> > > > 
> > > > Modified: head/sys/boot/uboot/lib/copy.c
> > > > ===
> > > > 
> > > > ===
> > > > --- head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:21:34
> > > > 2016
> > > > (r293774)
> > > > +++ head/sys/boot/uboot/lib/copy.c  Tue Jan 12 16:31:07
> > > > 2016
> > > > (r293775)
> > > > @@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
> > > >
> > > > biggest_block = 0;
> > > > biggest_size = 0;
> > > > -   subldr =
> > > > rounddown2((uint64_t)(uintptr_t)_start,
> > > > KERN_ALIGN);
> > > > +   subldr = rounddown2((uintfptr_t)_start,
> > > > KERN_ALIGN);
> > > > eubldr = roundup2((uint64_t)uboot_heap_end,
> > > > KERN_ALIGN);
> > > > for (i = 0; i < si->mr_no; i++) {
> > > > if (si->mr[i].flags != MR_ATTR_DRAM)
> > > > 
> > > 
> 
> 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Brooks Davis
On Wed, Jan 13, 2016 at 12:41:41AM +, Steven Hartland wrote:
> Was this meant to be a full revert as you now have:
> 
> subldr = rounddown2((uintptr_t)_start, KERN_ALIGN);
> 
> vs the original:
> 
> subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
> 
> i.e. missing the final conversion to uint64_t?

The cast through uint64_t isn't allowed by the standard if you want the
result to be a function pointer.  The implementation of rounddown2()
should work fine on an uintptr_t even for fairly radical implementations.

-- Brooks

> 
> 
> 
> On 13/01/2016 00:25, Ian Lepore wrote:
> > On Tue, 2016-01-12 at 22:49 +, Steven Hartland wrote:
> >> I think this breaks arm arches:
> >> /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/copy.c:103:24:
> >> error: use of undeclared identifier 'uintfptr_t'
> >>   subldr = rounddown2((uintfptr_t)_start, KERN_ALIGN);
> >>^
> >> /usr/home/smh/freebsd/base/head1/sys/boot/uboot/lib/../../../sys/para
> >> m.h:295:28:
> >> note: expanded from macro 'rounddown2'
> >> #define rounddown2(x, y) ((x)&(~((y)-1)))  /* if y is power
> >> of
> >> two */
> >>
> > Ooops, sorry.  Should be fixed now.
> >
> > -- Ian
> >
> >> On 12/01/2016 16:31, Ian Lepore wrote:
> >>> Author: ian
> >>> Date: Tue Jan 12 16:31:07 2016
> >>> New Revision: 293775
> >>> URL: https://svnweb.freebsd.org/changeset/base/293775
> >>>
> >>> Log:
> >>> Cast using uintfptr_t and eliminate the cast to uint64_t which
> >>> is uneeded
> >>> because rounding down cannot increase the number of bits needed
> >>> to express
> >>> the result.
> >>> 
> >>> I had no idea there was such a thing as uintfptr_t.
> >>> 
> >>> Requested by: bde
> >>>
> >>> Modified:
> >>> head/sys/boot/uboot/lib/copy.c
> >>>
> >>> Modified: head/sys/boot/uboot/lib/copy.c
> >>> ===
> >>> ===
> >>> --- head/sys/boot/uboot/lib/copy.cTue Jan 12 16:21:34 2016
> >>> (r293774)
> >>> +++ head/sys/boot/uboot/lib/copy.cTue Jan 12 16:31:07 2016
> >>> (r293775)
> >>> @@ -100,7 +100,7 @@ uboot_loadaddr(u_int type, void *data, u
> >>>
> >>>   biggest_block = 0;
> >>>   biggest_size = 0;
> >>> - subldr = rounddown2((uint64_t)(uintptr_t)_start,
> >>> KERN_ALIGN);
> >>> + subldr = rounddown2((uintfptr_t)_start,
> >>> KERN_ALIGN);
> >>>   eubldr = roundup2((uint64_t)uboot_heap_end,
> >>> KERN_ALIGN);
> >>>   for (i = 0; i < si->mr_no; i++) {
> >>>   if (si->mr[i].flags != MR_ATTR_DRAM)
> >>>
> >>
> 
> 


signature.asc
Description: PGP signature


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread NGie Cooper
On Tue, Jan 12, 2016 at 4:54 PM, Ian Lepore  wrote:
...
> For several reasons.  The fact that gcc isn't the default compiler
> doesn't mean that it's okay for code to not compile with gcc; it's
> still a supported compiler for arm.

Agreed. It also makes things messier when MFCing changes if it doesn't
work with gcc.
Thanks,
-NGie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293797 - stable/7/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 01:09:32 2016
New Revision: 293797
URL: https://svnweb.freebsd.org/changeset/base/293797

Log:
  MFC r289199
  
  Add support for reading device temperature

Modified:
  stable/7/sys/dev/bxe/bxe.c
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 00:37:28 2016(r293796)
+++ stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:09:32 2016(r293797)
@@ -16165,9 +16165,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
+   uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
+
 BLOGI(sc, "... dumping driver state ...\n");
-/* XXX */
+   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Allan Jude

On 2016-01-12 20:05, NGie Cooper wrote:

On Tue, Jan 12, 2016 at 4:54 PM, Ian Lepore  wrote:
...

For several reasons.  The fact that gcc isn't the default compiler
doesn't mean that it's okay for code to not compile with gcc; it's
still a supported compiler for arm.


Agreed. It also makes things messier when MFCing changes if it doesn't
work with gcc.
Thanks,
-NGie



If it is a supported compiler, maybe we need a tinderbox option that 
compiles ARM with gcc, to catch cases like this.


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


svn commit: r293798 - stable/7/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 01:11:32 2016
New Revision: 293798
URL: https://svnweb.freebsd.org/changeset/base/293798

Log:
  MFC r292638
Check for packet_length is greater than 60 bytes as well as 
packet_length is
greater than len_on_bd, before invoking the routine to handle jumbo 
over SGL
(bxe_service_rxsgl()).
Add counters for number of jumbo_over_SGL packets 
(rx_bxe_service_rxsgl) and
erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts)
  
Fix formatting in bxe_sysctl_state()

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe_stats.c
  stable/7/sys/dev/bxe/bxe_stats.h
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:09:32 2016(r293797)
+++ stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:11:32 2016(r293798)
@@ -483,6 +483,10 @@ static const struct {
 4, STATS_FLAGS_FUNC, "rx_pkts"},
 { STATS_OFFSET32(rx_tpa_pkts),
 4, STATS_FLAGS_FUNC, "rx_tpa_pkts"},
+{ STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, STATS_FLAGS_FUNC, "rx_erroneous_jumbo_sge_pkts"},
+{ STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, STATS_FLAGS_FUNC, "rx_bxe_service_rxsgl"},
 { STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, STATS_FLAGS_FUNC, "rx_jumbo_sge_pkts"},
 { STATS_OFFSET32(rx_soft_errors),
@@ -596,6 +600,10 @@ static const struct {
 4, "rx_pkts"},
 { Q_STATS_OFFSET32(rx_tpa_pkts),
 4, "rx_tpa_pkts"},
+{ Q_STATS_OFFSET32(rx_erroneous_jumbo_sge_pkts),
+4, "rx_erroneous_jumbo_sge_pkts"},
+{ Q_STATS_OFFSET32(rx_bxe_service_rxsgl),
+4, "rx_bxe_service_rxsgl"},
 { Q_STATS_OFFSET32(rx_jumbo_sge_pkts),
 4, "rx_jumbo_sge_pkts"},
 { Q_STATS_OFFSET32(rx_soft_errors),
@@ -3486,11 +3494,14 @@ bxe_rxeof(struct bxe_softc*sc,
 m_adj(m, pad);
 m->m_pkthdr.len = m->m_len = len;
 
-if (len != lenonbd){
+if ((len > 60) && (len > lenonbd)) {
+fp->eth_q_stats.rx_bxe_service_rxsgl++;
 rc = bxe_service_rxsgl(fp, len, lenonbd, m, cqe_fp);
 if (rc)
 break;
 fp->eth_q_stats.rx_jumbo_sge_pkts++;
+} else if (lenonbd < len) {
+fp->eth_q_stats.rx_erroneous_jumbo_sge_pkts++;
 }
 
 /* assign packet to this interface interface */
@@ -16165,12 +16176,12 @@ bxe_sysctl_state(SYSCTL_HANDLER_ARGS)
 }
 
 if (result == 1) {
-   uint32_t  temp;
+uint32_t  temp;
 sc = (struct bxe_softc *)arg1;
 
 BLOGI(sc, "... dumping driver state ...\n");
-   temp = SHMEM2_RD(sc, temperature_in_half_celsius);
-   BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
+temp = SHMEM2_RD(sc, temperature_in_half_celsius);
+BLOGI(sc, "\t Device Temperature = %d Celsius\n", (temp/2));
 }
 
 return (error);

Modified: stable/7/sys/dev/bxe/bxe_stats.c
==
--- stable/7/sys/dev/bxe/bxe_stats.cWed Jan 13 01:09:32 2016
(r293797)
+++ stable/7/sys/dev/bxe/bxe_stats.cWed Jan 13 01:11:32 2016
(r293798)
@@ -1227,6 +1227,8 @@ bxe_drv_stats_update(struct bxe_softc *s
 UPDATE_ESTAT_QSTAT(rx_calls);
 UPDATE_ESTAT_QSTAT(rx_pkts);
 UPDATE_ESTAT_QSTAT(rx_tpa_pkts);
+UPDATE_ESTAT_QSTAT(rx_erroneous_jumbo_sge_pkts);
+UPDATE_ESTAT_QSTAT(rx_bxe_service_rxsgl);
 UPDATE_ESTAT_QSTAT(rx_jumbo_sge_pkts);
 UPDATE_ESTAT_QSTAT(rx_soft_errors);
 UPDATE_ESTAT_QSTAT(rx_hw_csum_errors);

Modified: stable/7/sys/dev/bxe/bxe_stats.h
==
--- stable/7/sys/dev/bxe/bxe_stats.hWed Jan 13 01:09:32 2016
(r293797)
+++ stable/7/sys/dev/bxe/bxe_stats.hWed Jan 13 01:11:32 2016
(r293798)
@@ -218,6 +218,8 @@ struct bxe_eth_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -319,6 +321,8 @@ struct bxe_eth_q_stats {
 uint32_t rx_calls;
 uint32_t rx_pkts;
 uint32_t rx_tpa_pkts;
+uint32_t rx_erroneous_jumbo_sge_pkts;
+uint32_t rx_bxe_service_rxsgl;
 uint32_t rx_jumbo_sge_pkts;
 uint32_t rx_soft_errors;
 uint32_t rx_hw_csum_errors;
@@ -413,6 +417,8 @@ struct bxe_eth_q_stats_old {
 uint32_t rx_calls_old;
 uint32_t rx_pkts_old;
 uint32_t rx_tpa_pkts_old;
+uint32_t rx_erroneous_jumbo_sge_pkts_old;
+uint32_t rx_bxe_service_rxsgl_old;
 uint32_t rx_jumbo_sge_

svn commit: r293799 - stable/7/sys/dev/bxe

2016-01-12 Thread David C Somayajulu
Author: davidcs
Date: Wed Jan 13 01:16:10 2016
New Revision: 293799
URL: https://svnweb.freebsd.org/changeset/base/293799

Log:
  MFC r292639
  Add support for firmware dump (a.k.a grcdump)

Added:
  stable/7/sys/dev/bxe/bxe_dump.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_dump.h
  stable/7/sys/dev/bxe/bxe_ioctl.h
 - copied unchanged from r292639, head/sys/dev/bxe/bxe_ioctl.h
Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
  stable/7/sys/dev/bxe/ecore_init.h
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==
--- stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:11:32 2016(r293798)
+++ stable/7/sys/dev/bxe/bxe.c  Wed Jan 13 01:16:10 2016(r293799)
@@ -747,6 +747,8 @@ static __noinline int bxe_nic_unload(str
 static void bxe_handle_sp_tq(void *context, int pending);
 static void bxe_handle_fp_tq(void *context, int pending);
 
+static int bxe_add_cdev(struct bxe_softc *sc);
+static void bxe_del_cdev(struct bxe_softc *sc);
 
 /* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
 uint32_t
@@ -4514,7 +4516,7 @@ bxe_nic_unload(struct bxe_softc *sc,
 sc->rx_mode = BXE_RX_MODE_NONE;
 /* XXX set rx mode ??? */
 
-if (IS_PF(sc)) {
+if (IS_PF(sc) && !sc->grcdump_done) {
 /* set ALWAYS_ALIVE bit in shmem */
 sc->fw_drv_pulse_wr_seq |= DRV_PULSE_ALWAYS_ALIVE;
 
@@ -4534,7 +4536,8 @@ bxe_nic_unload(struct bxe_softc *sc,
 ; /* bxe_vfpf_close_vf(sc); */
 } else if (unload_mode != UNLOAD_RECOVERY) {
 /* if this is a normal/close unload need to clean up chip */
-bxe_chip_cleanup(sc, unload_mode, keep_link);
+if (!sc->grcdump_done)
+bxe_chip_cleanup(sc, unload_mode, keep_link);
 } else {
 /* Send the UNLOAD_REQUEST to the MCP */
 bxe_send_unload_req(sc, unload_mode);
@@ -16319,6 +16322,12 @@ bxe_add_sysctls(struct bxe_softc *sc)
 CTLFLAG_RW, &sc->debug, 0,
 "debug logging mode");
 
+sc->trigger_grcdump = 0;
+SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump",
+CTLFLAG_RW, &sc->trigger_grcdump, 0,
+"set by driver when a grcdump is needed");
+
+
 sc->rx_budget = bxe_rx_budget;
 SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "rx_budget",
 CTLFLAG_RW, &sc->rx_budget, 0,
@@ -16447,8 +16456,20 @@ bxe_attach(device_t dev)
 return (ENXIO);
 }
 
+if (bxe_add_cdev(sc) != 0) {
+if (sc->ifnet != NULL) {
+ether_ifdetach(sc->ifnet);
+}
+ifmedia_removeall(&sc->ifmedia);
+bxe_release_mutexes(sc);
+bxe_deallocate_bars(sc);
+pci_disable_busmaster(dev);
+return (ENXIO);
+}
+
 /* allocate device interrupts */
 if (bxe_interrupt_alloc(sc) != 0) {
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16462,6 +16483,7 @@ bxe_attach(device_t dev)
 /* allocate ilt */
 if (bxe_alloc_ilt_mem(sc) != 0) {
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16476,6 +16498,7 @@ bxe_attach(device_t dev)
 if (bxe_alloc_hsi_mem(sc) != 0) {
 bxe_free_ilt_mem(sc);
 bxe_interrupt_free(sc);
+bxe_del_cdev(sc);
 if (sc->ifnet != NULL) {
 ether_ifdetach(sc->ifnet);
 }
@@ -16547,6 +16570,8 @@ bxe_detach(device_t dev)
 return(EBUSY);
 }
 
+bxe_del_cdev(sc);
+
 /* stop the periodic callout */
 bxe_periodic_stop(sc);
 
@@ -18867,3 +18892,457 @@ ecore_storm_memset_struct(struct bxe_sof
 }
 }
 
+
+/*
+ * character device - ioctl interface definitions
+ */
+
+
+#include "bxe_dump.h"
+#include "bxe_ioctl.h"
+#include 
+
+static int bxe_eioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
+struct thread *td);
+
+static struct cdevsw bxe_cdevsw = {
+.d_version = D_VERSION,
+.d_ioctl = bxe_eioctl,
+.d_name = "bxecnic",
+};
+
+#define BXE_PATH(sc)(CHIP_IS_E1x(sc) ? 0 : (sc->pcie_func & 1))
+
+
+#define DUMP_ALL_PRESETS0x1FFF
+#define DUMP_MAX_PRESETS13
+#define IS_E1_REG(chips)((chips & DUMP_CHIP_E1) == DUMP_CHIP_E1)
+#define IS_E1H_REG(chips)   ((chips & DUMP_CHIP_E1H) == DUMP_CHIP_E1H)
+#define IS_E2_REG(chips)((chips & DUMP_CHIP_E2) == DUMP_CHIP_E2)
+#define IS_E3A0_REG(chips)  ((chips & DUMP_CHIP_E3A0) == DUMP_CHIP_E3A0)
+#define IS_E3B0_REG(chips)  ((chips & DUMP_CHIP_E3B0) == DUMP_CHIP_E3B0)
+
+#define IS_REG_IN_PRESET(presets, idx)  \
+((presets & (1 << (idx-1))) == (1 << (idx-1)))
+
+
+static int
+bxe_get_preset_regs_len(struct bxe_softc *sc, uint32_t preset)
+{
+if (CHIP_IS_E1(sc))
+  

Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Steven Hartland



On 13/01/2016 00:54, Ian Lepore wrote:

On Wed, 2016-01-13 at 00:43 +, Steven Hartland wrote:

On 13/01/2016 00:41, Ian Lepore wrote:

On Tue, 2016-01-12 at 02:17 +, Steven Hartland wrote:

Author: smh
Date: Tue Jan 12 02:17:39 2016
New Revision: 293724
URL: https://svnweb.freebsd.org/changeset/base/293724

Log:
Enable warnings in EFI boot code

Set WARNS if not set for EFI boot code and fix the issues

highlighted by
setting it.


This appears to break arm builds when gcc is the compiler:

cc1: warnings being treated as errors
In file included from
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
fi.h:52,
   from
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:35
:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
fiapi.h:535: warning: function declaration isn't a prototype
In file included from
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.c:39
:
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common
/bootstrap.h:332: warning: redundant redeclaration of 'delay'
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../include/e
filib.h:53: warning: previous declaration of 'delay' was here
/local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../common
/bootstrap.h:336: warning: redundant redeclaration of 'time'
/bsdstg/rm92/obj/arm.arm/local/build/staging/freebsd/rm92/src/tmp/u
sr/include/time.h:154: warning: previous declaration of 'time' was
here

-- Ian

Passes a full tinderbox so I assume your forcing gcc for some reason?

For several reasons.  The fact that gcc isn't the default compiler
doesn't mean that it's okay for code to not compile with gcc; it's
still a supported compiler for arm.

-- Ian

Not disagreeing with that, was just curious that's all ;-)

The warnings you list seem to be detail, typical gcc, specifically:

sys/boot/efi/fdt/../include/efiapi.h:535: warning: function declaration isn't a 
prototype

I'm guessing its being picky and wants EFI_RESERVED_SERVICE to have void in 
there due to no params.

Does the following help:

Index: sys/boot/efi/fdt/Makefile
===
--- sys/boot/efi/fdt/Makefile   (revision 293796)
+++ sys/boot/efi/fdt/Makefile   (working copy)
@@ -7,6 +7,8 @@
 LIB=   efi_fdt
 INTERNALLIB=
 WARNS?=6
+CWARNFLAGS.gcc+=   -Wno-strict-prototypes
+CWARNFLAGS.gcc+=   -Wno-redundant-decls
 
 SRCS=  efi_fdt.c
 
@@ -34,4 +36,6 @@ CLEANFILES+=  machine
 
 .include 
 
+CFLAGS+=   ${CWARNFLAGS.${COMPILER_TYPE}}

+
 beforedepend ${OBJS}: machine

Could you detail detail how you're switching to gcc so I an run a full pass on 
that too?

Regards
Steve


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


Re: svn commit: r293775 - head/sys/boot/uboot/lib

2016-01-12 Thread Ian Lepore
On Wed, 2016-01-13 at 01:03 +, Brooks Davis wrote:
> On Wed, Jan 13, 2016 at 12:41:41AM +, Steven Hartland wrote:
> > Was this meant to be a full revert as you now have:
> > 
> > subldr = rounddown2((uintptr_t)_start, KERN_ALIGN);
> > 
> > vs the original:
> > 
> > subldr = rounddown2((uint64_t)(uintptr_t)_start, KERN_ALIGN);
> > 
> > i.e. missing the final conversion to uint64_t?
> 
> The cast through uint64_t isn't allowed by the standard if you want
> the
> result to be a function pointer.  The implementation of rounddown2()
> should work fine on an uintptr_t even for fairly radical
> implementations.
> 
> -- Brooks

_start is a function pointer, but subldr is uint64_t.  The cast isn't
needed inside the macro invocation because the round-down calculation
can't create a larger result than the size of the types involved.

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


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Steven Hartland



On 13/01/2016 01:10, Allan Jude wrote:

On 2016-01-12 20:05, NGie Cooper wrote:

On Tue, Jan 12, 2016 at 4:54 PM, Ian Lepore  wrote:
...

For several reasons.  The fact that gcc isn't the default compiler
doesn't mean that it's okay for code to not compile with gcc; it's
still a supported compiler for arm.


Agreed. It also makes things messier when MFCing changes if it doesn't
work with gcc.
Thanks,
-NGie



If it is a supported compiler, maybe we need a tinderbox option that 
compiles ARM with gcc, to catch cases like this.



Yer we really should.

I explicitly ran tinderbox on these changes in order to ensure all the 
bases where covered, if there are additional options not run by 
tinderbox but are supported then we really need add them otherwise we're 
just assuming everyone knows to manually test additional configurations 
which is never going to work.


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


svn commit: r293800 - stable/10/include

2016-01-12 Thread Kevin Lo
Author: kevlo
Date: Wed Jan 13 01:32:04 2016
New Revision: 293800
URL: https://svnweb.freebsd.org/changeset/base/293800

Log:
  MFC r293491:
  - Add the definition of CHARCLASS_NAME_MAX, as per POSIX.1-2001.
  - Avoid namespace pollution and move definitions of _POSIX2_CHARCLASS_NAME_MAX
and _POSIX2_COLL_WEIGHTS_MAX into the .2001 section.
With input from bde.
  
  Reviewed by:  bde

Modified:
  stable/10/include/limits.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/include/limits.h
==
--- stable/10/include/limits.h  Wed Jan 13 01:16:10 2016(r293799)
+++ stable/10/include/limits.h  Wed Jan 13 01:32:04 2016(r293800)
@@ -59,11 +59,13 @@
 #define_POSIX_TZNAME_MAX   3
 #endif
 
+#if __POSIX_VISIBLE >= 200112
 #defineBC_BASE_MAX99   /* max ibase/obase values in 
bc(1) */
 #defineBC_DIM_MAX   2048   /* max array elements in bc(1) 
*/
 #defineBC_SCALE_MAX   99   /* max scale value in bc(1) */
 #defineBC_STRING_MAX1000   /* max const string length in 
bc(1) */
-#defineCOLL_WEIGHTS_MAX0   /* max weights for order 
keyword */
+#defineCHARCLASS_NAME_MAX 14   /* max character class name 
size */
+#defineCOLL_WEIGHTS_MAX   10   /* max weights for order 
keyword */
 #defineEXPR_NEST_MAX  32   /* max expressions nested in 
expr(1) */
 #defineLINE_MAX 2048   /* max bytes in an input line */
 #defineRE_DUP_MAX255   /* max RE's in interval 
notation */
@@ -72,11 +74,14 @@
 #define_POSIX2_BC_DIM_MAX  2048
 #define_POSIX2_BC_SCALE_MAX99
 #define_POSIX2_BC_STRING_MAX   1000
+#define_POSIX2_CHARCLASS_NAME_MAX 14
+#define_POSIX2_COLL_WEIGHTS_MAX 2
 #define_POSIX2_EQUIV_CLASS_MAX 2
 #define_POSIX2_EXPR_NEST_MAX   32
 #define_POSIX2_LINE_MAX2048
 #define_POSIX2_RE_DUP_MAX  255
 #endif
+#endif
 
 #if __POSIX_VISIBLE >= 199309
 #define_POSIX_AIO_LISTIO_MAX   2
@@ -110,8 +115,6 @@
 #define_POSIX_TRACE_SYS_MAX8
 #define_POSIX_TRACE_USER_EVENT_MAX 32
 #define_POSIX_TTY_NAME_MAX 9
-#define_POSIX2_CHARCLASS_NAME_MAX 14
-#define_POSIX2_COLL_WEIGHTS_MAX 2
 
 #define_POSIX_RE_DUP_MAX   _POSIX2_RE_DUP_MAX
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Ian Lepore
On Wed, 2016-01-13 at 01:17 +, Steven Hartland wrote:
> 
> On 13/01/2016 00:54, Ian Lepore wrote:
> > On Wed, 2016-01-13 at 00:43 +, Steven Hartland wrote:
> > > On 13/01/2016 00:41, Ian Lepore wrote:
> > > > On Tue, 2016-01-12 at 02:17 +, Steven Hartland wrote:
> > > > > Author: smh
> > > > > Date: Tue Jan 12 02:17:39 2016
> > > > > New Revision: 293724
> > > > > URL: https://svnweb.freebsd.org/changeset/base/293724
> > > > > 
> > > > > Log:
> > > > > Enable warnings in EFI boot code
> > > > > 
> > > > > Set WARNS if not set for EFI boot code and fix the issues
> > > > > highlighted by
> > > > > setting it.
> > > > > 
> > > > This appears to break arm builds when gcc is the compiler:
> > > > 
> > > > cc1: warnings being treated as errors
> > > > In file included from
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../inclu
> > > > de/e
> > > > fi.h:52,
> > > >from
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.
> > > > c:35
> > > > :
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../inclu
> > > > de/e
> > > > fiapi.h:535: warning: function declaration isn't a prototype
> > > > In file included from
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/efi_fdt.
> > > > c:39
> > > > :
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../co
> > > > mmon
> > > > /bootstrap.h:332: warning: redundant redeclaration of 'delay'
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../inclu
> > > > de/e
> > > > filib.h:53: warning: previous declaration of 'delay' was here
> > > > /local/build/staging/freebsd/rm92/src/sys/boot/efi/fdt/../../co
> > > > mmon
> > > > /bootstrap.h:336: warning: redundant redeclaration of 'time'
> > > > /bsdstg/rm92/obj/arm.arm/local/build/staging/freebsd/rm92/src/t
> > > > mp/u
> > > > sr/include/time.h:154: warning: previous declaration of 'time'
> > > > was
> > > > here
> > > > 
> > > > -- Ian
> > > Passes a full tinderbox so I assume your forcing gcc for some
> > > reason?
> > For several reasons.  The fact that gcc isn't the default compiler
> > doesn't mean that it's okay for code to not compile with gcc; it's
> > still a supported compiler for arm.
> > 
> > -- Ian
> Not disagreeing with that, was just curious that's all ;-)
> 
> The warnings you list seem to be detail, typical gcc, specifically:
> 
> sys/boot/efi/fdt/../include/efiapi.h:535: warning: function
> declaration isn't a prototype
> 
> I'm guessing its being picky and wants EFI_RESERVED_SERVICE to have
> void in there due to no params.
> 
> Does the following help:
> 
> Index: sys/boot/efi/fdt/Makefile
> ===
> --- sys/boot/efi/fdt/Makefile   (revision 293796)
> +++ sys/boot/efi/fdt/Makefile   (working copy)
> @@ -7,6 +7,8 @@
>   LIB=   efi_fdt
>   INTERNALLIB=
>   WARNS?=6
> +CWARNFLAGS.gcc+=   -Wno-strict-prototypes
> +CWARNFLAGS.gcc+=   -Wno-redundant-decls
>   
>   SRCS=  efi_fdt.c
>   
> @@ -34,4 +36,6 @@ CLEANFILES+=  machine
>   
>   .include 
>   
> +CFLAGS+=   ${CWARNFLAGS.${COMPILER_TYPE}}
> +
>   beforedepend ${OBJS}: machine
> 
> Could you detail detail how you're switching to gcc so I an run a
> full pass on that too?
> 
>   Regards
>   Steve
> 

Yep, but then I had to do this because ef->off is 64 bits even on 32
bit arches, so I got a pointer/int size mismatch warning...

Index: common/load_elf.c
===
--- common/load_elf.c   (revision 293796)
+++ common/load_elf.c   (working copy)
@@ -886,7 +886,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *f
error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));
if (error == EOPNOTSUPP) {
md.md_cval += ef->off;
-   md.md_data = (void *)((uintptr_t)md.md_data + ef->off);
+   md.md_data = (void *)(uintptr_t)((uintptr_t)md.md_data +
ef->off);
} else if (error != 0)
return (error);
 #endif


That is just some special kind of ugly.  Fixing warnings is supposed to
lead to better code, but all this casting isn't better, it's just an
unreadable mess.  Man I miss the days when C was just a really powerful
macro assembler. :)

-- Ian

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


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Ian Lepore
On Wed, 2016-01-13 at 01:17 +, Steven Hartland wrote:
> 
> On 13/01/2016 00:54, Ian Lepore wrote:
> > [...]
> 
> Could you detail detail how you're switching to gcc so I an run a
> full pass on that too?
> 
>   Regards
>   Steve
> 
> 

I have this in the make.conf I use for this particular arm build...

WITH_GCC=yes
WITH_GNUCXX=yes
WITH_GCC_BOOTSTRAP=yes
WITHOUT_CLANG=yes
WITHOUT_CLANG_IS_CC=yes
WITHOUT_CLANG_BOOTSTRAP=yes

If nothing else, it'll remind you of how fast a buildworld *used* to
be. ;)

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


Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Conrad Meyer
On Tue, Jan 12, 2016 at 5:32 PM, Ian Lepore  wrote:
> Yep, but then I had to do this because ef->off is 64 bits even on 32
> bit arches, so I got a pointer/int size mismatch warning...
>
> Index: common/load_elf.c
> ===
> --- common/load_elf.c   (revision 293796)
> +++ common/load_elf.c   (working copy)
> @@ -886,7 +886,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *f
> error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));
> if (error == EOPNOTSUPP) {
> md.md_cval += ef->off;
> -   md.md_data = (void *)((uintptr_t)md.md_data + ef->off);
> +   md.md_data = (void *)(uintptr_t)((uintptr_t)md.md_data +
> ef->off);
> } else if (error != 0)
> return (error);
>  #endif
>
>
> That is just some special kind of ugly.

Yes.  You could maybe do:

md.md_data = (c_caddr_t)md.md_data + (ptrdiff_t)ef->off;

Instead.  Yes, the ptrdiff_t will truncate uint64_t on 32-bit pointer
platforms, but the result is truncated regardless when it is stored in
the md_data pointer.  And the result under modulus is equivalent.

(You could even change the type of md_data to c_caddr_t from 'const
void *' to make it easier to do math on.  Then this could just be:
md.md_data += (ptrdiff_t)ef->off;)

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


svn commit: r293801 - in head: . etc share/examples/ypldap usr.sbin/ypldap

2016-01-12 Thread Marcelo Araujo
Author: araujo
Date: Wed Jan 13 01:49:35 2016
New Revision: 293801
URL: https://svnweb.freebsd.org/changeset/base/293801

Log:
  ypldap(8) is a feature ready to be used to translate nis(8) database to 
ldap(3).
  
  This commit, fix a core dump on ypldap(8) related with memory allocation.
  Also an example of how to set the ypldap.conf(5) properly is added to
  examples files.
  
  A new user _ypldap is required to be able to run ypldap(8) as well as
  in a chroot mode.
  
  Reviewed by:  rodrigc (mentor), bjk
  Approved by:  bapt (mentor)
  Relnotes: Yes
  Sponsored by: gandi.net
  Differential Revision:https://reviews.freebsd.org/D4744

Added:
  head/share/examples/ypldap/
  head/share/examples/ypldap/ypldap.conf   (contents, props changed)
Modified:
  head/UPDATING
  head/etc/master.passwd
  head/usr.sbin/ypldap/yp.c
  head/usr.sbin/ypldap/ypldap.conf.5

Modified: head/UPDATING
==
--- head/UPDATING   Wed Jan 13 01:32:04 2016(r293800)
+++ head/UPDATING   Wed Jan 13 01:49:35 2016(r293801)
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20160113:
+   With the addition of ypldap(8), a new _ypldap user is now required
+   during installworld. "mergemaster -p" can be used to add the user
+   prior to installworld, as documented in the handbook.
+
 20151216:
The tftp loader (pxeboot) now uses the option root-path directive. As a
consequence it no longer looks for a pxeboot.4th file on the tftp

Modified: head/etc/master.passwd
==
--- head/etc/master.passwd  Wed Jan 13 01:32:04 2016(r293800)
+++ head/etc/master.passwd  Wed Jan 13 01:49:35 2016(r293801)
@@ -22,5 +22,6 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/
 pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin
 auditdistd:*:78:77::0:0:Auditdistd unprivileged 
user:/var/empty:/usr/sbin/nologin
 www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
+_ypldap:*:93:93::0:0:YP Ldap unprivileged user:/var/empty:/usr/sbin/nologin
 hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin
 nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin

Added: head/share/examples/ypldap/ypldap.conf
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/examples/ypldap/ypldap.conf  Wed Jan 13 01:49:35 2016
(r293801)
@@ -0,0 +1,40 @@
+$FreeBSD$
+domain "freebsd.org"
+interval   60
+provide map"passwd.byname"
+provide map"passwd.byuid"
+provide map"group.byname"
+provide map"group.bygid"
+provide map"netid.byname"
+
+directory "127.0.0.1" {
+   # directory options
+   binddn "cn=ldap,dc=freebsd,dc=org"
+   bindcred "secret"
+   basedn "dc=freebsd.,dc=org"
+   # starting point for groups directory search, default to basedn
+   groupdn "ou=Groups,dc=freebsd,dc=org"
+
+   # passwd maps configuration (RFC 2307 posixAccount object class)
+   passwd filter "(objectClass=posixAccount)"
+
+   attribute name maps to "uid"
+   fixed attribute passwd "*"
+   attribute uid maps to "uidNumber"
+   attribute gid maps to "gidNumber"
+   attribute gecos maps to "cn"
+   attribute home maps to "homeDirectory"
+   attribute shell maps to "loginShell"
+   fixed attribute change "0"
+   fixed attribute expire "0"
+   fixed attribute class ""
+
+   # group maps configuration (RFC 2307 posixGroup object class)
+   group filter "(objectClass=posixGroup)"
+
+   attribute groupname maps to "cn"
+   fixed attribute grouppasswd "*"
+   attribute groupgid maps to "gidNumber"
+   # memberUid returns multiple group members
+   list groupmembers maps to "memberUid"
+}

Modified: head/usr.sbin/ypldap/yp.c
==
--- head/usr.sbin/ypldap/yp.c   Wed Jan 13 01:32:04 2016(r293800)
+++ head/usr.sbin/ypldap/yp.c   Wed Jan 13 01:49:35 2016(r293801)
@@ -83,10 +83,10 @@ void
 yp_enable_events(void)
 {
int i;
-   extern fd_set   svc_fdset;
+   extern fd_set svc_fdset;
struct yp_event *ye;
 
-   for (i = 0; i < getdtablesize(); i++) {
+   for (i = 0; i < FD_SETSIZE; i++) {
if (FD_ISSET(i, &svc_fdset)) {
if ((ye = calloc(1, sizeof(*ye))) == NULL)
fatal(NULL);

Modified: head/usr.sbin/ypldap/ypldap.conf.5
==
--- head/usr.sbin/ypldap/ypldap.conf.5  Wed Jan 13 01:32:04 2016
(r

svn commit: r293802 - in stable/10/sys/boot: forth i386/loader userboot/userboot zfs

2016-01-12 Thread Allan Jude
Author: allanjude
Date: Wed Jan 13 01:50:02 2016
New Revision: 293802
URL: https://svnweb.freebsd.org/changeset/base/293802

Log:
  MFC: r293001
Introduce the ZFS Boot Environments menu to the loader menu
  
  MFC: r293414
Add ZFS Boot Environments menu to userboot
  
  MFC: r293454
Only call init_zfs_bootenv when the system is booted with ZFS
  
  MFC: r293612
Fix calling init_zfs_bootenv to early, resulting in empty ZFS BE menu
  
  Relnotes: yes
  Sponsored by: ScaleEngine Inc.

Modified:
  stable/10/sys/boot/forth/loader.conf
  stable/10/sys/boot/forth/menu-commands.4th
  stable/10/sys/boot/forth/menu.rc
  stable/10/sys/boot/forth/support.4th
  stable/10/sys/boot/i386/loader/main.c
  stable/10/sys/boot/userboot/userboot/main.c
  stable/10/sys/boot/zfs/libzfs.h
  stable/10/sys/boot/zfs/zfs.c
  stable/10/sys/boot/zfs/zfsimpl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/forth/loader.conf
==
--- stable/10/sys/boot/forth/loader.confWed Jan 13 01:49:35 2016
(r293801)
+++ stable/10/sys/boot/forth/loader.confWed Jan 13 01:50:02 2016
(r293802)
@@ -73,6 +73,7 @@ entropy_cache_type="/boot/entropy"
 #password=""   # Prevent changes to boot options
 #bootlock_password=""  # Prevent booting (see check-password.4th(8))
 #geom_eli_passphrase_prompt="NO" # Prompt for geli(8) passphrase to mount root
+bootenv_autolist="YES" # Auto populate the list of ZFS Boot 
Environments
 #beastie_disable="NO"  # Turn the beastie boot menu on and off
 #kernels="kernel kernel.old"   # Kernels to display in the boot menu
 #loader_logo="orbbw"   # Desired logo: orbbw, orb, fbsdbw, beastiebw, 
beastie, none

Modified: stable/10/sys/boot/forth/menu-commands.4th
==
--- stable/10/sys/boot/forth/menu-commands.4th  Wed Jan 13 01:49:35 2016
(r293801)
+++ stable/10/sys/boot/forth/menu-commands.4th  Wed Jan 13 01:50:02 2016
(r293802)
@@ -351,4 +351,68 @@ also menu-namespace also menu-command-he
2 goto_menu
 ;
 
+\ 
+\ Set boot environment defaults
+\ 
+
+: init_bootenv ( -- )
+   s" set menu_caption[1]=${bemenu_current}${vfs.root.mountfrom}" evaluate
+   s" set ansi_caption[1]=${beansi_current}${vfs.root.mountfrom}" evaluate
+   s" set menu_caption[2]=${bemenu_bootfs}${zfs_be_active}" evaluate
+   s" set ansi_caption[2]=${beansi_bootfs}${zfs_be_active}" evaluate
+   s" set 
menu_caption[3]=${bemenu_page}${zfs_be_currpage}${bemenu_pageof}${zfs_be_pages}"
 evaluate
+   s" set 
ansi_caption[3]=${beansi_page}${zfs_be_currpage}${bemenu_pageof}${zfs_be_pages}"
 evaluate
+;
+
+\
+\ Redraw the entire screen. A long BE name can corrupt the menu
+\ 
+
+: be_draw_screen
+   clear   \ Clear the screen (in screen.4th)
+   print_version   \ print version string (bottom-right; see version.4th)
+   draw-beastie\ Draw FreeBSD logo at right (in beastie.4th)
+   draw-brand  \ Draw brand.4th logo at top (in brand.4th)
+   menu-init   \ Initialize menu and draw bounding box (in menu.4th)
+;
+
+\
+\ Select a boot environment
+\ 
+
+: set_bootenv ( N -- N TRUE )
+   dup s" set vfs.root.mountfrom=${bootenv_root[E]}" 38 +c! evaluate
+   s" set currdev=${vfs.root.mountfrom}:" evaluate
+   s" unload" evaluate
+   free-module-options
+   s" /boot/defaults/loader.conf" read-conf
+   s" /boot/loader.conf" read-conf
+   s" /boot/loader.conf.local" read-conf
+   init_bootenv
+   be_draw_screen
+   menu-redraw
+   TRUE
+;
+
+\
+\ Switch to the next page of boot environments
+\
+
+: set_be_page ( N -- N TRUE )
+   s" zfs_be_currpage" getenv dup -1 = if
+   drop s" 1"
+   else
+   0 s>d 2swap
+   >number ( ud caddr/u -- ud' caddr'/u' ) \ convert string to 
numbers
+   2drop   \ drop the string
+   1 um/mod ( ud u1 -- u2 u3 ) \ convert double ud' to 
single u3' and remainder u2
+   swap drop ( ud2 u3 -- u3 )  \ drop the remainder u2
+   1+  \ increment the page 
number
+   s>d <# #s #>\ convert back to a 
string
+   then
+   s" zfs_be_currpage" setenv
+   s" reloadbe" evaluate
+   3 goto_menu
+;
+
 only forth definitions

Modified: stable/10/sys/boot/forth/menu.rc
==
--- stable/10/sys/boot/forth/menu.rcWed Jan 13 01:49:35 2016
(r293801)
+++ stable/10/sys/boot/forth/menu.rcWed Jan 13 01:50:02 2016
(r293802)
@@ -68,6 +68,13 @@ set mainmenu_command[6]="2 goto_menu"
 set mainmenu_keycode[6]=111
 set mainansi_caption[6]="Configure B

Re: svn commit: r293724 - in head/sys/boot: arm64/libarm64 common efi/boot1 efi/fdt efi/include efi/include/arm64 efi/libefi efi/loader efi/loader/arch/amd64 efi/loader/arch/arm efi/loader/arch/arm64

2016-01-12 Thread Bruce Evans

On Tue, 12 Jan 2016, Ian Lepore wrote:


On Wed, 2016-01-13 at 01:17 +, Steven Hartland wrote:


On 13/01/2016 00:54, Ian Lepore wrote:

On Wed, 2016-01-13 at 00:43 +, Steven Hartland wrote:
...

Passes a full tinderbox so I assume your forcing gcc for some
reason?

For several reasons.  The fact that gcc isn't the default compiler
doesn't mean that it's okay for code to not compile with gcc; it's
still a supported compiler for arm.


I usually force gcc.


Not disagreeing with that, was just curious that's all ;-)

The warnings you list seem to be detail, typical gcc, specifically:

sys/boot/efi/fdt/../include/efiapi.h:535: warning: function
declaration isn't a prototype

I'm guessing its being picky and wants EFI_RESERVED_SERVICE to have
void in there due to no params.


It is not broken, so it is warning about an unprototyped function as
requested by -Wstrict-prototypes.


Does the following help:

Index: sys/boot/efi/fdt/Makefile
===
--- sys/boot/efi/fdt/Makefile   (revision 293796)
+++ sys/boot/efi/fdt/Makefile   (working copy)
@@ -7,6 +7,8 @@
  LIB=   efi_fdt
  INTERNALLIB=
  WARNS?=6
+CWARNFLAGS.gcc+=   -Wno-strict-prototypes
+CWARNFLAGS.gcc+=   -Wno-redundant-decls

  SRCS=  efi_fdt.c



This just breaks the warning.


@@ -34,4 +36,6 @@ CLEANFILES+=  machine

  .include 

+CFLAGS+=   ${CWARNFLAGS.${COMPILER_TYPE}}
+
  beforedepend ${OBJS}: machine

Could you detail detail how you're switching to gcc so I an run a
full pass on that too?


Sometimes I use CC=gccNN, where gccNN is somwhere in $PATH.  Sometimes
it is a script to select an arch-dependent gcc.  This is unlikely to
work for makeworld but it works for kernels.


Yep, but then I had to do this because ef->off is 64 bits even on 32
bit arches, so I got a pointer/int size mismatch warning...


gcc detects this error too.


Index: common/load_elf.c
===
--- common/load_elf.c   (revision 293796)
+++ common/load_elf.c   (working copy)
@@ -886,7 +886,7 @@ __elfN(parse_modmetadata)(struct preloaded_file *f
error = __elfN(reloc_ptr)(fp, ef, v, &md, sizeof(md));
if (error == EOPNOTSUPP) {
md.md_cval += ef->off;
-   md.md_data = (void *)((uintptr_t)md.md_data + ef->off);
+   md.md_data = (void *)(uintptr_t)((uintptr_t)md.md_data +
ef->off);
} else if (error != 0)
return (error);
#endif


That is just some special kind of ugly.  Fixing warnings is supposed to
lead to better code, but all this casting isn't better, it's just an
unreadable mess.  Man I miss the days when C was just a really powerful
macro assembler. :)


This is made extra-ugly by misformatting it.  Fixing warnings
unfortunately usually leads to worse code, using extra code to break
the warning.

Here the detected bug is the bogus type for ef->off.  Values >=
UINT32_MAX in it cannot work in expressions like this.  This was only
detected accidentally.

md_data is a very confusing variable name.  It is used nearby in 4 structs
band has a different type in each.  Sometimes it is uint32_t or
uint64_t; sometimes it is void * and sometimes it is char *.  Here it
is void *.

Some of the structs are:
- mod_medadata (md is this); type void *
- mod_metadata64; type uint64_t
- mod_metadata32; type uint32_t
- file_metadata; type char []
The prefix is supposed to be unique in context.  One is better than none.
'off' in ef has none.

The void * type is inconvenient to work with.  The nearby md_cval has
the same bugs, except it isn't in file_metadata and its type is
const char * so you can add an integer to it without casting.  The
previous round of fixes was to fix a warning about using the gnu
extension of adding an integer to a void * without a cast.


+   md.md_data = (void *)(uintptr_t)((uintptr_t)md.md_data +
ef->off);


I don't see any better quick fix than changing 'off' to vm_offset_t
or maybe signed vm_offset_t.  It is in a local struct so this seems
to be possible.  Changing the void * instance of md_data to an integer
is harder.

md_cval should also be an integer.

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


Re: svn commit: r293792 - head/sys/boot/uboot/lib

2016-01-12 Thread Bruce Evans

On Wed, 13 Jan 2016, Ian Lepore wrote:


Log:
 Go back to using uintptr_t, because code that actually compiles is
 infinitely less buggy than code that is theoretically correct in some
 alternate universe.

 The uintfptr_t type is apparently a freebsd invention, and exists only when
 compiling the kernel.  It's a little hard to say for sure, since it doesn't
 seem to be documented anywhere except in email advice to unsuspecting and
 overly-trusting souls, who then get to wear the pointy hat for blindly
 following advice without investigating or testing it first.


Oops.  It is only declared in  outside of the kernel.
Only __uintfptr_t is always declared by sys/types.h.

Grep shows some style bugs (spelling mismatches) for *uintfptr_t in
:

X amd64/include/profile.h:typedef   u_long  uintfptr_t;
X arm/include/_types.h:typedef  __uint32_t  __uintfptr_t;
X arm/include/profile.h:typedef u_int   uintfptr_t;
X arm64/include/_types.h:typedef__uint64_t  __uintfptr_t;
X arm64/include/profile.h:typedef unsigned long longuintfptr_t;
X i386/include/profile.h:typedefu_int   uintfptr_t;
X mips/include/_types.h:typedef __uint64_t  __uintfptr_t;
X mips/include/_types.h:typedef __uint32_t  __uintfptr_t;
X mips/include/profile.h:typedef u_long uintfptr_t;
X mips/include/profile.h:typedef u_int  uintfptr_t;
X powerpc/include/_types.h:typedef  __uint64_t  __uintfptr_t;
X powerpc/include/_types.h:typedef  __uint32_t  __uintfptr_t;
X powerpc/include/profile.h:typedef u_long  uintfptr_t;
X powerpc/include/profile.h:typedef u_int   uintfptr_t;
X sparc64/include/_types.h:typedef  __uint64_t  __uintfptr_t;
X sparc64/include/profile.h:typedef u_long  uintfptr_t;
X x86/include/_types.h:typedef  __uint64_t  __uintfptr_t;
X x86/include/_types.h:typedef  __uint32_t  __uintfptr_t;

All except arm64 are consistently inconsistent in using the correct
basic type in  but a fixed-width type in
.  arm64 uses the long long abomination to get
a type mismatch (same width, higher rank) in .

This was consistent in FreeBSD-4 where __uintfptr_t doesn't exist.
uintptr_t was only declared in  (and 
via intentional pollution) so there was no difference for the kernel
to confuse you.  But  must be included.  
has a reference but no useful documentation in moncontrol(3), and
a surprisingly large amount of documentation in sysctl(3) of all
places.  It seems I didn't enlarge this when I enlarged gmon with
much more than uintfptr_t.

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


svn commit: r293804 - stable/9/lib/libc/yp

2016-01-12 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jan 13 05:32:24 2016
New Revision: 293804
URL: https://svnweb.freebsd.org/changeset/base/293804

Log:
  Merge r291073:
If a NIS server has long entries on its database that is bigger than
1024 specified on YPMAXRECORD the ypmatch can get in an infinite retry
loop when is requesting the information from the NIS server.
  
The ypmatch(1) will return an error until the command receives an
kill(1).
  
To avoid this problem, we check the MAX_RETRIES that is by default set
to 20 and avoid get in infinet loop at the client side.

Modified:
  stable/9/lib/libc/yp/yplib.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/lib/   (props changed)
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/yp/yplib.c
==
--- stable/9/lib/libc/yp/yplib.cWed Jan 13 04:11:04 2016
(r293803)
+++ stable/9/lib/libc/yp/yplib.cWed Jan 13 05:32:24 2016
(r293804)
@@ -653,7 +653,7 @@ yp_match(char *indomain, char *inmap, co
struct timeval tv;
struct ypreq_key yprk;
int r;
-
+   int retries = 0;
*outval = NULL;
*outvallen = 0;
 
@@ -691,6 +691,11 @@ yp_match(char *indomain, char *inmap, co
 #endif
 
 again:
+   if (retries > MAX_RETRIES) {
+   YPUNLOCK();
+   return (YPERR_RPC);
+   }
+
if (_yp_dobind(indomain, &ysd) != 0) {
YPUNLOCK();
return (YPERR_DOMAIN);
@@ -707,6 +712,7 @@ again:
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_match: clnt_call");
_yp_unbind(ysd);
+   retries++;
goto again;
}
 
@@ -756,7 +762,7 @@ yp_first(char *indomain, char *inmap, ch
struct dom_binding *ysd;
struct timeval tv;
int r;
-
+   int retries = 0;
/* Sanity check */
 
if (indomain == NULL || !strlen(indomain) ||
@@ -768,6 +774,11 @@ yp_first(char *indomain, char *inmap, ch
 
YPLOCK();
 again:
+   if (retries > MAX_RETRIES) {
+   YPUNLOCK();
+   return (YPERR_RPC);
+   }
+
if (_yp_dobind(indomain, &ysd) != 0) {
YPUNLOCK();
return (YPERR_DOMAIN);
@@ -786,6 +797,7 @@ again:
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_first: clnt_call");
_yp_unbind(ysd);
+   retries++;
goto again;
}
if (!(r = ypprot_err(yprkv.stat))) {
@@ -813,7 +825,7 @@ yp_next(char *indomain, char *inmap, cha
struct dom_binding *ysd;
struct timeval tv;
int r;
-
+   int retries = 0;
/* Sanity check */
 
if (inkey == NULL || !strlen(inkey) || inkeylen <= 0 ||
@@ -826,6 +838,11 @@ yp_next(char *indomain, char *inmap, cha
 
YPLOCK();
 again:
+   if (retries > MAX_RETRIES) {
+   YPUNLOCK();
+   return (YPERR_RPC);
+   }
+
if (_yp_dobind(indomain, &ysd) != 0) {
YPUNLOCK();
return (YPERR_DOMAIN);
@@ -846,6 +863,7 @@ again:
if (r != RPC_SUCCESS) {
clnt_perror(ysd->dom_client, "yp_next: clnt_call");
_yp_unbind(ysd);
+   retries++;
goto again;
}
if (!(r = ypprot_err(yprkv.stat))) {
@@ -874,7 +892,7 @@ yp_all(char *indomain, char *inmap, stru
CLIENT *clnt;
u_long status, savstat;
int clnt_sock;
-
+   int retries = 0;
/* Sanity check */
 
if (indomain == NULL || !strlen(indomain) ||
@@ -883,6 +901,10 @@ yp_all(char *indomain, char *inmap, stru
 
YPLOCK();
 again:
+   if (retries > MAX_RETRIES) {
+   YPUNLOCK();
+   return (YPERR_RPC);
+   }
 
if (_yp_dobind(indomain, &ysd) != 0) {
YPUNLOCK();
@@ -912,9 +934,10 @@ again:
if (clnt_call(clnt, YPPROC_ALL,
(xdrproc_t)xdr_ypreq_nokey, &yprnk,
(xdrproc_t)xdr_ypresp_all_seq, &status, tv) != RPC_SUCCESS) {
-   clnt_perror(ysd->dom_client, "yp_all: clnt_call");
+   clnt_perror(clnt, "yp_all: clnt_call");
clnt_destroy(clnt);
_yp_unbind(ysd);
+   retries++;
goto again;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r293805 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Wed Jan 13 06:34:51 2016
New Revision: 293805
URL: https://svnweb.freebsd.org/changeset/base/293805

Log:
  sfxge: rename common hunt NIC methods to ef10
  
  Submitted by:   Mark Spender 
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4880

Modified:
  head/sys/dev/sfxge/common/efx_nic.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_nic.c
  head/sys/dev/sfxge/common/hunt_rx.c
  head/sys/dev/sfxge/common/hunt_tx.c

Modified: head/sys/dev/sfxge/common/efx_nic.c
==
--- head/sys/dev/sfxge/common/efx_nic.c Wed Jan 13 05:32:24 2016
(r293804)
+++ head/sys/dev/sfxge/common/efx_nic.c Wed Jan 13 06:34:51 2016
(r293805)
@@ -284,18 +284,18 @@ static efx_nic_ops_t  __efx_nic_siena_ops
 #if EFSYS_OPT_HUNTINGTON
 
 static efx_nic_ops_t   __efx_nic_hunt_ops = {
-   hunt_nic_probe, /* eno_probe */
-   hunt_nic_set_drv_limits,/* eno_set_drv_limits */
-   hunt_nic_reset, /* eno_reset */
-   hunt_nic_init,  /* eno_init */
-   hunt_nic_get_vi_pool,   /* eno_get_vi_pool */
-   hunt_nic_get_bar_region,/* eno_get_bar_region */
+   ef10_nic_probe, /* eno_probe */
+   ef10_nic_set_drv_limits,/* eno_set_drv_limits */
+   ef10_nic_reset, /* eno_reset */
+   ef10_nic_init,  /* eno_init */
+   ef10_nic_get_vi_pool,   /* eno_get_vi_pool */
+   ef10_nic_get_bar_region,/* eno_get_bar_region */
 #if EFSYS_OPT_DIAG
ef10_sram_test, /* eno_sram_test */
-   hunt_nic_register_test, /* eno_register_test */
+   ef10_nic_register_test, /* eno_register_test */
 #endif /* EFSYS_OPT_DIAG */
-   hunt_nic_fini,  /* eno_fini */
-   hunt_nic_unprobe,   /* eno_unprobe */
+   ef10_nic_fini,  /* eno_fini */
+   ef10_nic_unprobe,   /* eno_unprobe */
 };
 
 #endif /* EFSYS_OPT_HUNTINGTON */

Modified: head/sys/dev/sfxge/common/hunt_impl.h
==
--- head/sys/dev/sfxge/common/hunt_impl.h   Wed Jan 13 05:32:24 2016
(r293804)
+++ head/sys/dev/sfxge/common/hunt_impl.h   Wed Jan 13 06:34:51 2016
(r293805)
@@ -52,7 +52,7 @@ extern "C" {
 /* Alignment requirement for value written to RX WPTR:
  *  the WPTR must be aligned to an 8 descriptor boundary
  */
-#defineHUNTINGTON_RX_WPTR_ALIGN 8
+#defineEF10_RX_WPTR_ALIGN 8
 
 /* Invalid RSS context handle */
 #defineEF10_RSS_CONTEXT_INVALID(0x)
@@ -161,48 +161,48 @@ ef10_intr_fini(
 /* NIC */
 
 extern __checkReturn   efx_rc_t
-hunt_nic_probe(
+ef10_nic_probe(
__inefx_nic_t *enp);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_set_drv_limits(
+ef10_nic_set_drv_limits(
__inout efx_nic_t *enp,
__inefx_drv_limits_t *edlp);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_get_vi_pool(
+ef10_nic_get_vi_pool(
__inefx_nic_t *enp,
__out   uint32_t *vi_countp);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_get_bar_region(
+ef10_nic_get_bar_region(
__inefx_nic_t *enp,
__inefx_nic_region_t region,
__out   uint32_t *offsetp,
__out   size_t *sizep);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_reset(
+ef10_nic_reset(
__inefx_nic_t *enp);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_init(
+ef10_nic_init(
__inefx_nic_t *enp);
 
 #if EFSYS_OPT_DIAG
 
 extern __checkReturn   efx_rc_t
-hunt_nic_register_test(
+ef10_nic_register_test(
__inefx_nic_t *enp);
 
 #endif /* EFSYS_OPT_DIAG */
 
 extern void
-hunt_nic_fini(
+ef10_nic_fini(
__inefx_nic_t *enp);
 
 extern void
-hunt_nic_unprobe(
+ef10_nic_unprobe(
__inefx_nic_t *enp);
 
 
@@ -747,7 +747,7 @@ typedef uint32_tefx_piobuf_handle_t;
 #defineEFX_PIOBUF_HANDLE_INVALID   ((efx_piobuf_handle_t) -1)
 
 extern __checkReturn   efx_rc_t
-hunt_nic_pio_alloc(
+ef10_nic_pio_alloc(
__inout efx_nic_t *enp,
__out   uint32_t *bufnump,
__out   efx_piobuf_handle_t *handlep,
@@ -756,19 +756,19 @@ hunt_nic_pio_alloc(
__out   size_t *sizep);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_pio_free(
+ef10_nic_pio_free(
__inout efx_nic_t *enp,
__inuint32_t bufnum,
__inuint32_t blknum);
 
 extern __checkReturn   efx_rc_t
-hunt_nic_pio_link(
+ef10_nic_pio_link(
__inout efx_nic_t *enp,
__inuint32_t v

svn commit: r293806 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Wed Jan 13 06:37:45 2016
New Revision: 293806
URL: https://svnweb.freebsd.org/changeset/base/293806

Log:
  sfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT
  
  The EFSYS_OPT_RX_HDR_SPLIT optional feature in the common code
  implemented the Lookahead Split feature of Windows. This split
  received packets at a preconfigured byte offset, and delivered
  the header and payload portions to separate receive queues.
  
  Now the common code interface has no callers, so remove it.
  
  Note that this should not be confused with the Header Data Split
  feature of Windows, which splits packets at a header boundary.
  
  Submitted by:   Andy Moreton 
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4888

Modified:
  head/sys/dev/sfxge/common/efsys.h
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_check.h
  head/sys/dev/sfxge/common/efx_ev.c
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_rx.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_rx.c

Modified: head/sys/dev/sfxge/common/efsys.h
==
--- head/sys/dev/sfxge/common/efsys.h   Wed Jan 13 06:34:51 2016
(r293805)
+++ head/sys/dev/sfxge/common/efsys.h   Wed Jan 13 06:37:45 2016
(r293806)
@@ -288,7 +288,6 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b
 #defineEFSYS_OPT_QSTATS 1
 #defineEFSYS_OPT_FILTER 1
 #defineEFSYS_OPT_RX_SCATTER 0
-#defineEFSYS_OPT_RX_HDR_SPLIT 0
 
 #defineEFSYS_OPT_EV_PREFETCH 0
 

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Wed Jan 13 06:34:51 2016
(r293805)
+++ head/sys/dev/sfxge/common/efx.h Wed Jan 13 06:37:45 2016
(r293806)
@@ -1817,15 +1817,6 @@ extern   void
 efx_rx_fini(
__inefx_nic_t *enp);
 
-#if EFSYS_OPT_RX_HDR_SPLIT
-   __checkReturn   efx_rc_t
-efx_rx_hdr_split_enable(
-   __inefx_nic_t *enp,
-   __inunsigned int hdr_buf_size,
-   __inunsigned int pld_buf_size);
-
-#endif /* EFSYS_OPT_RX_HDR_SPLIT */
-
 #if EFSYS_OPT_RX_SCATTER
__checkReturn   efx_rc_t
 efx_rx_scatter_enable(

Modified: head/sys/dev/sfxge/common/efx_check.h
==
--- head/sys/dev/sfxge/common/efx_check.h   Wed Jan 13 06:34:51 2016
(r293805)
+++ head/sys/dev/sfxge/common/efx_check.h   Wed Jan 13 06:37:45 2016
(r293806)
@@ -347,12 +347,9 @@
 # endif
 #endif /* EFSYS_OPT_QSTATS */
 
-/* Support receive header split */
-#if EFSYS_OPT_RX_HDR_SPLIT
-# if !(EFSYS_OPT_FALCON || EFSYS_OPT_SIENA || \
-   EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
-#  error "RX_HDR_SPLIT requires FALCON or SIENA or HUNTINGTON or MEDFORD"
-# endif
+/* Obsolete option */
+#ifdef EFSYS_OPT_RX_HDR_SPLIT
+# error "RX_HDR_SPLIT is obsolete and is not supported"
 #endif /* EFSYS_OPT_RX_HDR_SPLIT */
 
 /* Support receive scaling (RSS) */

Modified: head/sys/dev/sfxge/common/efx_ev.c
==
--- head/sys/dev/sfxge/common/efx_ev.c  Wed Jan 13 06:34:51 2016
(r293805)
+++ head/sys/dev/sfxge/common/efx_ev.c  Wed Jan 13 06:37:45 2016
(r293806)
@@ -498,7 +498,7 @@ falconsiena_ev_rx_not_ok(
EFX_EV_QSTAT_INCR(eep, EV_RX_FRM_TRUNC);
(*flagsp) |= EFX_DISCARD;
 
-#if (EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER)
+#if EFSYS_OPT_RX_SCATTER
/*
 * Lookout for payload queue ran dry errors and ignore them.
 *
@@ -513,7 +513,7 @@ falconsiena_ev_rx_not_ok(
(EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_JUMBO_CONT) == 0) &&
(EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_BYTE_CNT) == 0))
ignore = B_TRUE;
-#endif /* EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER */
+#endif /* EFSYS_OPT_RX_SCATTER */
}
 
if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_ETH_CRC_ERR) != 0) {
@@ -574,10 +574,10 @@ falconsiena_ev_rx(
uint32_t size;
uint32_t label;
boolean_t ok;
-#if (EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER)
+#if EFSYS_OPT_RX_SCATTER
boolean_t sop;
boolean_t jumbo_cont;
-#endif /* EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER */
+#endif /* EFSYS_OPT_RX_SCATTER */
uint32_t hdr_type;
boolean_t is_v6;
uint16_t flags;
@@ -592,10 +592,10 @@ falconsiena_ev_rx(
label = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_Q_LABEL);
ok = (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_PKT_OK) != 0);
 
-#if (EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER)
+#if EFSYS_OPT_RX_SCATTER
sop = (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_SOP) != 0);
   

svn commit: r293807 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Wed Jan 13 06:40:00 2016
New Revision: 293807
URL: https://svnweb.freebsd.org/changeset/base/293807

Log:
  sfxge: rework RX prefix handling in the common code
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4889

Modified:
  head/sys/dev/sfxge/common/efx.h
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/efx_rx.c
  head/sys/dev/sfxge/common/hunt_impl.h
  head/sys/dev/sfxge/common/hunt_rx.c

Modified: head/sys/dev/sfxge/common/efx.h
==
--- head/sys/dev/sfxge/common/efx.h Wed Jan 13 06:37:45 2016
(r293806)
+++ head/sys/dev/sfxge/common/efx.h Wed Jan 13 06:40:00 2016
(r293807)
@@ -1883,7 +1883,7 @@ efx_rx_scale_key_set(
__in_ecount(n)  uint8_t *key,
__insize_t n);
 
-extern uint32_t
+extern __checkReturn   uint32_t
 efx_psuedo_hdr_hash_get(
__inefx_nic_t *enp,
__inefx_rx_hash_alg_t func,

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hWed Jan 13 06:37:45 2016
(r293806)
+++ head/sys/dev/sfxge/common/efx_impl.hWed Jan 13 06:40:00 2016
(r293807)
@@ -166,7 +166,11 @@ typedef struct efx_rx_ops_s {
efx_rc_t(*erxo_scale_key_set)(efx_nic_t *, uint8_t *, size_t);
efx_rc_t(*erxo_scale_tbl_set)(efx_nic_t *, unsigned int *,
  size_t);
-#endif
+   uint32_t(*erxo_prefix_hash)(efx_nic_t *, efx_rx_hash_alg_t,
+   uint8_t *);
+#endif /* EFSYS_OPT_RX_SCALE */
+   efx_rc_t(*erxo_prefix_pktlen)(efx_nic_t *, uint8_t *,
+ uint16_t *);
void(*erxo_qpost)(efx_rxq_t *, efsys_dma_addr_t *, size_t,
  unsigned int, unsigned int,
  unsigned int);

Modified: head/sys/dev/sfxge/common/efx_rx.c
==
--- head/sys/dev/sfxge/common/efx_rx.c  Wed Jan 13 06:37:45 2016
(r293806)
+++ head/sys/dev/sfxge/common/efx_rx.c  Wed Jan 13 06:40:00 2016
(r293807)
@@ -75,6 +75,18 @@ falconsiena_rx_scale_tbl_set(
__in_ecount(n)  unsigned int *table,
__insize_t n);
 
+static __checkReturn   uint32_t
+falconsiena_rx_prefix_hash(
+   __inefx_nic_t *enp,
+   __inefx_rx_hash_alg_t func,
+   __inuint8_t *buffer);
+
+static __checkReturn   efx_rc_t
+falconsiena_rx_prefix_pktlen(
+   __inefx_nic_t *enp,
+   __inuint8_t *buffer,
+   __out   uint16_t *lengthp);
+
 #endif /* EFSYS_OPT_RX_SCALE */
 
 static void
@@ -130,7 +142,9 @@ static efx_rx_ops_t __efx_rx_falcon_ops 
falconsiena_rx_scale_mode_set,  /* erxo_scale_mode_set */
falconsiena_rx_scale_key_set,   /* erxo_scale_key_set */
falconsiena_rx_scale_tbl_set,   /* erxo_scale_tbl_set */
+   falconsiena_rx_prefix_hash, /* erxo_prefix_hash */
 #endif
+   falconsiena_rx_prefix_pktlen,   /* erxo_prefix_pktlen */
falconsiena_rx_qpost,   /* erxo_qpost */
falconsiena_rx_qpush,   /* erxo_qpush */
falconsiena_rx_qflush,  /* erxo_qflush */
@@ -151,7 +165,9 @@ static efx_rx_ops_t __efx_rx_siena_ops =
falconsiena_rx_scale_mode_set,  /* erxo_scale_mode_set */
falconsiena_rx_scale_key_set,   /* erxo_scale_key_set */
falconsiena_rx_scale_tbl_set,   /* erxo_scale_tbl_set */
+   falconsiena_rx_prefix_hash, /* erxo_prefix_hash */
 #endif
+   falconsiena_rx_prefix_pktlen,   /* erxo_prefix_pktlen */
falconsiena_rx_qpost,   /* erxo_qpost */
falconsiena_rx_qpush,   /* erxo_qpush */
falconsiena_rx_qflush,  /* erxo_qflush */
@@ -172,7 +188,9 @@ static efx_rx_ops_t __efx_rx_ef10_ops = 
ef10_rx_scale_mode_set, /* erxo_scale_mode_set */
ef10_rx_scale_key_set,  /* erxo_scale_key_set */
ef10_rx_scale_tbl_set,  /* erxo_scale_tbl_set */
+   ef10_rx_prefix_hash,/* erxo_prefix_hash */
 #endif
+   ef10_rx_prefix_pktlen,  /* erxo_prefix_pktlen */
ef10_rx_qpost,  /* erxo_qpost */
ef10_rx_qpush,  /* erxo_qpush */
ef10_rx_qflush, /* erxo_qflush */
@@ -553,92 +571,29 @@ efx_rx

svn commit: r293808 - head/sys/dev/sfxge/common

2016-01-12 Thread Andrew Rybchenko
Author: arybchik
Date: Wed Jan 13 06:41:39 2016
New Revision: 293808
URL: https://svnweb.freebsd.org/changeset/base/293808

Log:
  sfxge: note VI_SHIFT reported in ALLOC_VIS response
  
  Submitted by:   Andy Moreton 
  Reviewed by:gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:  2 days
  Differential Revision: https://reviews.freebsd.org/D4892

Modified:
  head/sys/dev/sfxge/common/efx_impl.h
  head/sys/dev/sfxge/common/hunt_nic.c

Modified: head/sys/dev/sfxge/common/efx_impl.h
==
--- head/sys/dev/sfxge/common/efx_impl.hWed Jan 13 06:40:00 2016
(r293807)
+++ head/sys/dev/sfxge/common/efx_impl.hWed Jan 13 06:41:39 2016
(r293808)
@@ -672,6 +672,7 @@ struct efx_nic_s {
struct {
int ena_vi_base;
int ena_vi_count;
+   int ena_vi_shift;
 #if EFSYS_OPT_VPD
caddr_t ena_svpd;
size_t  ena_svpd_length;

Modified: head/sys/dev/sfxge/common/hunt_nic.c
==
--- head/sys/dev/sfxge/common/hunt_nic.cWed Jan 13 06:40:00 2016
(r293807)
+++ head/sys/dev/sfxge/common/hunt_nic.cWed Jan 13 06:41:39 2016
(r293808)
@@ -470,9 +470,9 @@ efx_mcdi_alloc_vis(
__inefx_nic_t *enp,
__inuint32_t min_vi_count,
__inuint32_t max_vi_count,
-   __out_opt   uint32_t *vi_basep,
-   __out   uint32_t *vi_countp)
-
+   __out   uint32_t *vi_basep,
+   __out   uint32_t *vi_countp,
+   __out   uint32_t *vi_shiftp)
 {
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_ALLOC_VIS_IN_LEN,
@@ -506,11 +506,14 @@ efx_mcdi_alloc_vis(
goto fail3;
}
 
-   if (vi_basep != NULL)
-   *vi_basep = MCDI_OUT_DWORD(req, ALLOC_VIS_OUT_VI_BASE);
+   *vi_basep = MCDI_OUT_DWORD(req, ALLOC_VIS_OUT_VI_BASE);
+   *vi_countp = MCDI_OUT_DWORD(req, ALLOC_VIS_OUT_VI_COUNT);
 
-   if (vi_countp != NULL)
-   *vi_countp = MCDI_OUT_DWORD(req, ALLOC_VIS_OUT_VI_COUNT);
+   /* Report VI_SHIFT if available (always zero for Huntington) */
+   if (req.emr_out_length_used < MC_CMD_ALLOC_VIS_EXT_OUT_LEN)
+   *vi_shiftp = 0;
+   else
+   *vi_shiftp = MCDI_OUT_DWORD(req, ALLOC_VIS_EXT_OUT_VI_SHIFT);
 
return (0);
 
@@ -1560,7 +1563,7 @@ ef10_nic_init(
 {
efx_drv_cfg_t *edcp = &(enp->en_drv_cfg);
uint32_t min_vi_count, max_vi_count;
-   uint32_t vi_count, vi_base;
+   uint32_t vi_count, vi_base, vi_shift;
uint32_t i;
uint32_t retry;
uint32_t delay_us;
@@ -1603,7 +1606,7 @@ ef10_nic_init(
 */
vi_count = 0;
if ((rc = efx_mcdi_alloc_vis(enp, min_vi_count, max_vi_count,
-   &vi_base, &vi_count)) != 0)
+   &vi_base, &vi_count, &vi_shift)) != 0)
goto fail3;
 
EFSYS_PROBE2(vi_alloc, uint32_t, vi_base, uint32_t, vi_count);
@@ -1615,6 +1618,7 @@ ef10_nic_init(
 
enp->en_arch.ef10.ena_vi_base = vi_base;
enp->en_arch.ef10.ena_vi_count = vi_count;
+   enp->en_arch.ef10.ena_vi_shift = vi_shift;
 
if (vi_count < min_vi_count + enp->en_arch.ef10.ena_piobuf_count) {
/* Not enough extra VIs to map piobufs */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


  1   2   >