svn commit: r331760 - head/sys/vm

2018-03-30 Thread Konstantin Belousov
Author: kib
Date: Fri Mar 30 10:55:31 2018
New Revision: 331760
URL: https://svnweb.freebsd.org/changeset/base/331760

Log:
  Make vm_map_max/min/pmap KBI stable.
  
  There are out of tree consumers of vm_map_min() and vm_map_max(), and
  I believe there are consumers of vm_map_pmap(), although the later is
  arguably less in the need of KBI-stable interface. For the consumers
  benefit, make modules using this KPI not depended on the struct vm_map
  layout.
  
  Reviewed by:  alc, markj
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week
  Differential revision:https://reviews.freebsd.org/D14902

Modified:
  head/sys/vm/vm_map.c
  head/sys/vm/vm_map.h

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cFri Mar 30 10:36:54 2018(r331759)
+++ head/sys/vm/vm_map.cFri Mar 30 10:55:31 2018(r331760)
@@ -4315,6 +4315,27 @@ vm_map_lookup_done(vm_map_t map, vm_map_entry_t entry)
vm_map_unlock_read(map);
 }
 
+vm_offset_t
+vm_map_max_KBI(const struct vm_map *map)
+{
+
+   return (map->max_offset);
+}
+
+vm_offset_t
+vm_map_min_KBI(const struct vm_map *map)
+{
+
+   return (map->min_offset);
+}
+
+pmap_t
+vm_map_pmap_KBI(vm_map_t map)
+{
+
+   return (map->pmap);
+}
+
 #include "opt_ddb.h"
 #ifdef DDB
 #include 

Modified: head/sys/vm/vm_map.h
==
--- head/sys/vm/vm_map.hFri Mar 30 10:36:54 2018(r331759)
+++ head/sys/vm/vm_map.hFri Mar 30 10:55:31 2018(r331760)
@@ -206,6 +206,11 @@ struct vm_map {
 #defineMAP_BUSY_WAKEUP 0x02
 
 #ifdef _KERNEL
+#ifdef KLD_MODULE
+#definevm_map_max(map) vm_map_max_KBI((map))
+#definevm_map_min(map) vm_map_min_KBI((map))
+#definevm_map_pmap(map)vm_map_pmap_KBI((map))
+#else
 static __inline vm_offset_t
 vm_map_max(const struct vm_map *map)
 {
@@ -229,6 +234,7 @@ vm_map_modflags(vm_map_t map, vm_flags_t set, vm_flags
 {
map->flags = (map->flags | set) & ~clear;
 }
+#endif /* KLD_MODULE */
 #endif /* _KERNEL */
 
 /*
@@ -289,6 +295,9 @@ void vm_map_wakeup(vm_map_t map);
 void vm_map_busy(vm_map_t map);
 void vm_map_unbusy(vm_map_t map);
 void vm_map_wait_busy(vm_map_t map);
+vm_offset_t vm_map_max_KBI(const struct vm_map *map);
+vm_offset_t vm_map_min_KBI(const struct vm_map *map);
+pmap_t vm_map_pmap_KBI(vm_map_t map);
 
 #definevm_map_lock(map)_vm_map_lock(map, LOCK_FILE, LOCK_LINE)
 #definevm_map_unlock(map)  _vm_map_unlock(map, LOCK_FILE, 
LOCK_LINE)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331761 - head/sys/i386/i386

2018-03-30 Thread Andriy Gapon
Author: avg
Date: Fri Mar 30 11:25:30 2018
New Revision: 331761
URL: https://svnweb.freebsd.org/changeset/base/331761

Log:
  align i386 cpu_reset() with amd64 version
  
  Maybe this code could be moved to x86.
  
  MFC after:1 week

Modified:
  head/sys/i386/i386/vm_machdep.c

Modified: head/sys/i386/i386/vm_machdep.c
==
--- head/sys/i386/i386/vm_machdep.c Fri Mar 30 10:55:31 2018
(r331760)
+++ head/sys/i386/i386/vm_machdep.c Fri Mar 30 11:25:30 2018
(r331761)
@@ -585,7 +585,8 @@ cpu_reset_proxy()
 
cpu_reset_proxy_active = 1;
while (cpu_reset_proxy_active == 1)
-   ;   /* Wait for other cpu to see that we've started */
+   ia32_pause(); /* Wait for other cpu to see that we've started */
+
CPU_SETOF(cpu_reset_proxyid, &tcrp);
stop_cpus(tcrp);
printf("cpu_reset_proxy: Stopped CPU %d\n", cpu_reset_proxyid);
@@ -617,19 +618,21 @@ cpu_reset()
printf("cpu_reset: Restarting BSP\n");
 
/* Restart CPU #0. */
-   /* XXX: restart_cpus(1 << 0); */
CPU_SETOF(0, &started_cpus);
wmb();
 
cnt = 0;
-   while (cpu_reset_proxy_active == 0 && cnt < 1000)
+   while (cpu_reset_proxy_active == 0 && cnt < 1000) {
+   ia32_pause();
cnt++;  /* Wait for BSP to announce restart */
+   }
if (cpu_reset_proxy_active == 0)
printf("cpu_reset: Failed to restart BSP\n");
enable_intr();
cpu_reset_proxy_active = 2;
 
-   while (1);
+   while (1)
+   ia32_pause();
/* NOTREACHED */
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331762 - head/share/misc

2018-03-30 Thread Eric Turgeon
Author: ericbsd (ports committer)
Date: Fri Mar 30 11:30:48 2018
New Revision: 331762
URL: https://svnweb.freebsd.org/changeset/base/331762

Log:
  Add Eric Turgeon (ericbsd) in committers-ports.dot with mentor/mentee.
  
  Approved by:  bapt (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotFri Mar 30 11:25:30 2018
(r331761)
+++ head/share/misc/committers-ports.dotFri Mar 30 11:30:48 2018
(r331762)
@@ -100,6 +100,7 @@ eadler [label="Eitan Adler\nead...@freebsd.org\n2011/0
 edwin [label="Edwin Groothuis\ned...@freebsd.org\n2002/10/22"]
 ehaupt [label="Emanuel Haupt\neha...@freebsd.org\n2005/10/03"]
 eik [label="Oliver Eikemeier\n...@freebsd.org\n2003/11/12"]
+ericbsd [label="Eric Turgeon\eric...@freebsd.org\n2018/03/17"]
 erwin [label="Erwin Lansing\ner...@freebsd.org\n2003/06/04"]
 eugen [label="Eugene Grosbein\neu...@freebsd.org\n2017/03/04"]
 farrokhi [label="Babak Farrokhi\nfarro...@freebsd.org\n2006/11/07"]
@@ -307,6 +308,7 @@ bapt -> bdrewery
 bapt -> bofh
 bapt -> dumbbell
 bapt -> eadler
+bapt -> ericbsd
 bapt -> grembo
 bapt -> jbeich
 bapt -> jlaffaye
@@ -691,6 +693,7 @@ wen -> pawel
 wg -> alexey
 wg -> danilo
 wg -> dvl
+wg -> ericbsd
 wg -> misha
 wg -> nemysis
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331764 - head/usr.bin/calendar/calendars

2018-03-30 Thread Eric Turgeon
Author: ericbsd (ports committer)
Date: Fri Mar 30 13:37:33 2018
New Revision: 331764
URL: https://svnweb.freebsd.org/changeset/base/331764

Log:
  Adding Eric Turgeon (ericbsd) to calendar.freebsd
  
  Approved by: bapt (mentor)

Modified:
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 30 11:57:58 
2018(r331763)
+++ head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 30 13:37:33 
2018(r331764)
@@ -108,6 +108,7 @@
 03/13  Alexander Leidinger  born in Neunkirchen, 
Saarland, Germany, 1976
 03/13  Will Andrews  born in Pontiac, Michigan, United 
States, 1982
 03/14  Bernhard Froehlich  born in Graz, Styria, Austria, 
1985
+03/14  Eric Turgeon  born in Edmundston, New Brunswick, 
Canada, 1982
 03/15  Paolo Pisati  born in Lodi, Italy, 1977
 03/15  Brian Fundakowski Feldman  born in Alexandria, 
Virginia, United States, 1983
 03/17  Michael Smith  born in Bankstown, New South Wales, 
Australia, 1971
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331765 - head/share/misc

2018-03-30 Thread Eric Turgeon
Author: ericbsd (ports committer)
Date: Fri Mar 30 14:41:16 2018
New Revision: 331765
URL: https://svnweb.freebsd.org/changeset/base/331765

Log:
  Fix missing n after \ of Eric Turgeon entry
  
  Approved by:  bapt (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotFri Mar 30 13:37:33 2018
(r331764)
+++ head/share/misc/committers-ports.dotFri Mar 30 14:41:16 2018
(r331765)
@@ -100,7 +100,7 @@ eadler [label="Eitan Adler\nead...@freebsd.org\n2011/0
 edwin [label="Edwin Groothuis\ned...@freebsd.org\n2002/10/22"]
 ehaupt [label="Emanuel Haupt\neha...@freebsd.org\n2005/10/03"]
 eik [label="Oliver Eikemeier\n...@freebsd.org\n2003/11/12"]
-ericbsd [label="Eric Turgeon\eric...@freebsd.org\n2018/03/17"]
+ericbsd [label="Eric Turgeon\neric...@freebsd.org\n2018/03/17"]
 erwin [label="Erwin Lansing\ner...@freebsd.org\n2003/06/04"]
 eugen [label="Eugene Grosbein\neu...@freebsd.org\n2017/03/04"]
 farrokhi [label="Babak Farrokhi\nfarro...@freebsd.org\n2006/11/07"]
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331766 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/ocs_fc sys/modules sys/modules/ocs_fc

2018-03-30 Thread Kenneth D. Merry
Author: ken
Date: Fri Mar 30 15:28:25 2018
New Revision: 331766
URL: https://svnweb.freebsd.org/changeset/base/331766

Log:
  Bring in the Broadcom/Emulex Fibre Channel driver, ocs_fc(4).
  
  The ocs_fc(4) driver supports the following hardware:
  
  Emulex 16/8G FC GEN 5 HBAS
LPe15004 FC Host Bus Adapters
LPe160XX FC Host Bus Adapters
  
  Emulex 32/16G FC GEN 6 HBAS
LPe3100X FC Host Bus Adapters
LPe3200X FC Host Bus Adapters
  
  The driver supports target and initiator mode, and also supports FC-Tape.
  
  Note that the driver only currently works on little endian platforms.  It
  is only included in the module build for amd64 and i386, and in GENERIC
  on amd64 only.
  
  Submitted by: Ram Kishore Vegesna 
  Reviewed by:  mav
  MFC after:5 days
  Relnotes: yes
  Sponsored by: Broadcom
  Differential Revision:https://reviews.freebsd.org/D11423

Added:
  head/share/man/man4/ocs_fc.4   (contents, props changed)
  head/sys/dev/ocs_fc/
  head/sys/dev/ocs_fc/ocs.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_cam.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_cam.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_common.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_ddump.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_ddump.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_device.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_device.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_domain.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_domain.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_drv_fc.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_els.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_els.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_fabric.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_fabric.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_fcp.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_hw.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_hw.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_hw_queues.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_hw_queues.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_io.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_io.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_ioctl.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_ioctl.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_list.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_mgmt.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_mgmt.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_node.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_node.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_os.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_os.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_pci.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_scsi.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_scsi.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_sm.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_sm.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_sport.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_sport.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_stats.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_unsol.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_unsol.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_utils.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_utils.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_vpd.h   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_xport.c   (contents, props changed)
  head/sys/dev/ocs_fc/ocs_xport.h   (contents, props changed)
  head/sys/dev/ocs_fc/sli4.c   (contents, props changed)
  head/sys/dev/ocs_fc/sli4.h   (contents, props changed)
  head/sys/dev/ocs_fc/version.h   (contents, props changed)
  head/sys/modules/ocs_fc/
  head/sys/modules/ocs_fc/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/sys/amd64/conf/GENERIC
  head/sys/conf/files
  head/sys/modules/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileFri Mar 30 14:41:16 2018
(r331765)
+++ head/share/man/man4/MakefileFri Mar 30 15:28:25 2018
(r331766)
@@ -402,6 +402,7 @@ MAN=aac.4 \
${_nvram2env.4} \
${_nxge.4} \
oce.4 \
+   ocs_fc.4\
ohci.4 \
orm.4 \
ow.4 \

Added: head/share/man/man4/ocs_fc.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/ocs_fc.4Fri Mar 30 15:28:25 2018
(r331766)
@@ -0,0 +1,194 @@
+.\" Copyright (c) 2017 Broadcom. All rights reserved.
+.\"

svn commit: r331767 - head/stand/efi/libefi

2018-03-30 Thread Emmanuel Vadot
Author: manu
Date: Fri Mar 30 16:37:08 2018
New Revision: 331767
URL: https://svnweb.freebsd.org/changeset/base/331767

Log:
  efinet: Do not return only if ReceiveFilter fails
  
  If the network interface or the uefi implementation do not support the
  ReceiveFilter interface do not return only and just print a message.
  U-Boot doesn't support is and likely never will. Also even if this fails
  it doesn't mean that network in EFI isn't supported.

Modified:
  head/stand/efi/libefi/efinet.c

Modified: head/stand/efi/libefi/efinet.c
==
--- head/stand/efi/libefi/efinet.c  Fri Mar 30 15:28:25 2018
(r331766)
+++ head/stand/efi/libefi/efinet.c  Fri Mar 30 16:37:08 2018
(r331767)
@@ -225,11 +225,9 @@ efinet_init(struct iodesc *desc, void *machdep_hint)
EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST;
 
status = net->ReceiveFilters(net, mask, 0, FALSE, 0, NULL);
-   if (status != EFI_SUCCESS) {
+   if (status != EFI_SUCCESS)
printf("net%d: cannot set rx. filters (status=%lu)\n",
nif->nif_unit, EFI_ERROR_CODE(status));
-   return;
-   }
 
 #ifdef EFINET_DEBUG
dump_mode(net->Mode);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331768 - head/sys/dev/ocs_fc

2018-03-30 Thread Conrad Meyer
Author: cem
Date: Fri Mar 30 16:44:54 2018
New Revision: 331768
URL: https://svnweb.freebsd.org/changeset/base/331768

Log:
  ocs_fc(4): Fix GCC build (-Wredundant-decls)
  
  These objects are defined earlier in the same file; an extern declaration
  after definition is redundant.
  
  Broken in r331766 (introduction of ocs_fc(4)).
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/dev/ocs_fc/sli4.c

Modified: head/sys/dev/ocs_fc/sli4.c
==
--- head/sys/dev/ocs_fc/sli4.c  Fri Mar 30 16:37:08 2018(r331767)
+++ head/sys/dev/ocs_fc/sli4.c  Fri Mar 30 16:44:54 2018(r331768)
@@ -5758,9 +5758,6 @@ int32_t sli_link_is_configurable(sli4_t *sli)
 
 /* vim: set noexpandtab textwidth=120: */
 
-extern const char *SLI_QNAME[];
-extern const sli4_reg_t regmap[SLI4_REG_MAX][SLI4_MAX_IF_TYPES];
-
 /**
  * @ingroup sli_fc
  * @brief Write an FCOE_WQ_CREATE command.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331776 - head/sys/netinet6

2018-03-30 Thread Brooks Davis
Author: brooks
Date: Fri Mar 30 18:26:29 2018
New Revision: 331776
URL: https://svnweb.freebsd.org/changeset/base/331776

Log:
  Remove a comment that suggests checking that a non-pointer is non-NULL.
  
  Reviewed by:  melifaro, markj, hrs, ume
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14904

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Fri Mar 30 18:26:26 2018(r331775)
+++ head/sys/netinet6/in6.c Fri Mar 30 18:26:29 2018(r331776)
@@ -476,10 +476,6 @@ in6_control(struct socket *so, u_long cmd, caddr_t dat
error = EINVAL;
goto out;
}
-   /*
-* XXX: should we check if ifa_dstaddr is NULL and return
-* an error?
-*/
ifr->ifr_dstaddr = ia->ia_dstaddr;
if ((error = sa6_recoverscope(&ifr->ifr_dstaddr)) != 0)
goto out;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331797 - in head/sys: dev/an dev/ath dev/cxgbe dev/if_ndis dev/iwi dev/ixl dev/mlx4/mlx4_en dev/mlx5/mlx5_en dev/mwl dev/nxge dev/oce dev/qlnx/qlnxe dev/sbni dev/sfxge dev/vxge net net...

2018-03-30 Thread Brooks Davis
Author: brooks
Date: Fri Mar 30 18:50:13 2018
New Revision: 331797
URL: https://svnweb.freebsd.org/changeset/base/331797

Log:
  Use an accessor function to access ifr_data.
  
  This fixes 32-bit compat (no ioctl command defintions are required
  as struct ifreq is the same size).  This is believed to be sufficent to
  fully support ifconfig on 32-bit systems.
  
  Reviewed by:  kib
  Obtained from:CheriBSD
  MFC after:1 week
  Relnotes: yes
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14900

Modified:
  head/sys/dev/an/if_an.c
  head/sys/dev/ath/if_ath_ioctl.c
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/if_ndis/if_ndis.c
  head/sys/dev/iwi/if_iwi.c
  head/sys/dev/ixl/ixl_pf_main.c
  head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c
  head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
  head/sys/dev/mwl/if_mwl.c
  head/sys/dev/nxge/if_nxge.c
  head/sys/dev/oce/oce_if.c
  head/sys/dev/qlnx/qlnxe/qlnx_os.c
  head/sys/dev/sbni/if_sbni.c
  head/sys/dev/sfxge/sfxge.c
  head/sys/dev/vxge/vxge.c
  head/sys/net/if.c
  head/sys/net/if.h
  head/sys/net/if_gif.c
  head/sys/net/if_gre.c
  head/sys/net/if_ipsec.c
  head/sys/net/if_spppsubr.c
  head/sys/net/if_var.h
  head/sys/net/if_vlan.c
  head/sys/net/iflib.c
  head/sys/net80211/ieee80211_ioctl.c
  head/sys/netinet/ip_carp.c
  head/sys/netpfil/pf/if_pfsync.c
  head/sys/security/mac/mac_net.c

Modified: head/sys/dev/an/if_an.c
==
--- head/sys/dev/an/if_an.c Fri Mar 30 18:49:52 2018(r331796)
+++ head/sys/dev/an/if_an.c Fri Mar 30 18:50:13 2018(r331797)
@@ -1934,7 +1934,8 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da
error = 0;
break;
case SIOCGAIRONET:
-   error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq));
+   error = copyin(ifr_data_get_ptr(ifr), &sc->areq,
+   sizeof(sc->areq));
if (error != 0)
break;
AN_LOCK(sc);
@@ -1963,13 +1964,15 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da
break;
}
AN_UNLOCK(sc);
-   error = copyout(&sc->areq, ifr->ifr_data, sizeof(sc->areq));
+   error = copyout(&sc->areq, ifr_data_get_ptr(ifr),
+   sizeof(sc->areq));
break;
case SIOCSAIRONET:
if ((error = priv_check(td, PRIV_DRIVER)))
goto out;
AN_LOCK(sc);
-   error = copyin(ifr->ifr_data, &sc->areq, sizeof(sc->areq));
+   error = copyin(ifr_data_get_ptr(ifr), &sc->areq,
+   sizeof(sc->areq));
if (error != 0)
break;
an_setdef(sc, &sc->areq);
@@ -1978,7 +1981,8 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da
case SIOCGPRIVATE_0:/* used by Cisco client utility */
if ((error = priv_check(td, PRIV_DRIVER)))
goto out;
-   error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl));
+   error = copyin(ifr_data_get_ptr(ifr), &l_ioctl,
+   sizeof(l_ioctl));
if (error)
goto out;
mode = l_ioctl.command;
@@ -1996,13 +2000,15 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da
AN_UNLOCK(sc);
if (!error) {
/* copy out the updated command info */
-   error = copyout(&l_ioctl, ifr->ifr_data, 
sizeof(l_ioctl));
+   error = copyout(&l_ioctl, ifr_data_get_ptr(ifr),
+   sizeof(l_ioctl));
}
break;
case SIOCGPRIVATE_1:/* used by Cisco client utility */
if ((error = priv_check(td, PRIV_DRIVER)))
goto out;
-   error = copyin(ifr->ifr_data, &l_ioctl, sizeof(l_ioctl));
+   error = copyin(ifr_data_get_ptr(ifr), &l_ioctl,
+   sizeof(l_ioctl));
if (error)
goto out;
l_ioctl.command = 0;

Modified: head/sys/dev/ath/if_ath_ioctl.c
==
--- head/sys/dev/ath/if_ath_ioctl.c Fri Mar 30 18:49:52 2018
(r331796)
+++ head/sys/dev/ath/if_ath_ioctl.c Fri Mar 30 18:50:13 2018
(r331797)
@@ -267,12 +267,12 @@ ath_ioctl(struct ieee80211com *ic, u_long cmd, void *d
rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC;
if (rt->info[sc->sc_txrix].phy & IEEE80211_T_HT)
sc->sc_stats.ast_tx_rate |= IEEE80211_RATE_MCS;
-   return copyout(&sc->sc_stats,
-   ifr->ifr_data, sizeof (sc->sc_stats));
+   

svn commit: r331806 - head/release

2018-03-30 Thread Glen Barber
Author: gjb
Date: Fri Mar 30 19:08:37 2018
New Revision: 331806
URL: https://svnweb.freebsd.org/changeset/base/331806

Log:
  Add logic for "families" for GCE images.
  
  This allows for GCE consumers to easily detect the latest major
  version of FreeBSD when using the gcloud command line utility.
  
  To ensure snapshot builds do not conflict with release-style
  builds (ALPHA, BETA, RC, RELEASE), the '-snap' suffix is appended
  to the GCE image family name.
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/Makefile.gce

Modified: head/release/Makefile.gce
==
--- head/release/Makefile.gce   Fri Mar 30 19:02:24 2018(r331805)
+++ head/release/Makefile.gce   Fri Mar 30 19:08:37 2018(r331806)
@@ -18,8 +18,13 @@ CLEANFILES+= ${GCE_UPLOAD_TGTS}
 
 GCE_BUCKET?=
 
+.if !defined(GCE_FAMILY) || empty(GCE_FAMILY)
+GCE_FAMILY=${TYPE:tl}-${REVISION:S,.,-,}
+.endif
+
 .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT" || ${BRANCH} == 
"PRERELEASE"
 SNAPSHOT_DATE!=date +-%Y-%m-%d
+GCE_FAMILY_SUFX=   -snap
 .endif
 
 # Really?  Uppercase characters are not allowed?  Sigh...
@@ -64,6 +69,7 @@ gce-do-upload:
/usr/local/bin/gsutil cp ${.OBJDIR}/${GCE_TARGET}.tar.gz \
gs://${GCE_BUCKET}/
/usr/local/bin/gcloud compute images create ${GCE_TARGET} \
+   --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} \
--source-uri gs://${GCE_BUCKET}/${GCE_TARGET}.tar.gz
touch ${.OBJDIR}/${.TARGET}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331819 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:35:31 2018
New Revision: 331819
URL: https://svnweb.freebsd.org/changeset/base/331819

Log:
  Add missing newline character in print in mlx5core.
  
  MFC after:3 days
  Submitted by: slavash@
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_health.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:26:45 2018
(r331818)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:35:31 2018
(r331819)
@@ -183,7 +183,7 @@ static void reset_fw_if_needed(struct mlx5_core_dev *d
fatal_error == MLX5_SENSOR_NIC_DISABLED ||
fatal_error == MLX5_SENSOR_NIC_SW_RESET ||
test_bit(MLX5_SKIP_SW_RESET, &health->flags)) {
-   mlx5_core_warn(dev, "Not issuing FW reset. Either it's already 
done or won't help.");
+   mlx5_core_warn(dev, "Not issuing FW reset. Either it's already 
done or won't help.\n");
return;
}
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331820 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:39:27 2018
New Revision: 331820
URL: https://svnweb.freebsd.org/changeset/base/331820

Log:
  Properly check if crspace is supported in mlx5core.
  
  The old code checked for MLX5_CR_SPACE_DOMAIN which is irrelevant here.
  However, if dev->vsec_addr would be 0, an access to wrong offset would
  happen.
  
  MFC after:3 days
  Submitted by: slavash@
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c  Fri Mar 30 19:35:31 2018
(r331819)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_crspace.c  Fri Mar 30 19:39:27 2018
(r331820)
@@ -65,6 +65,8 @@ enum {
 #define MLX5_MERGE(rsrc1, rsrc2, start, len)   \
(((len) == 32) ? (rsrc2) : MLX5_MERGE_C(rsrc1, rsrc2, start, len))
 
+#define MLX5_SEMAPHORE_SPACE_DOMAIN 0xA
+
 static int mlx5_pciconf_wait_on_flag(struct mlx5_core_dev *dev,
 u8 expected_val)
 {
@@ -131,6 +133,9 @@ int mlx5_pciconf_cap9_sem(struct mlx5_core_dev *dev, i
int retries = 0;
u32 lock_val;
 
+   if (!dev->vsec_addr)
+   return -ENXIO;
+
if (state == UNLOCK) {
pci_write_config_dword(dev->pdev, dev->vsec_addr +
   PCI_SEMAPHORE_OFFSET, 0);
@@ -159,7 +164,6 @@ int mlx5_pciconf_cap9_sem(struct mlx5_core_dev *dev, i
return 0;
 }
 
-#define MLX5_PROTECTED_CR_SPACE_DOMAIN 0x6
 static int mlx5_pciconf_set_addr_space(struct mlx5_core_dev *dev,
   u16 space)
 {
@@ -183,7 +187,6 @@ static int mlx5_pciconf_set_addr_space(struct mlx5_cor
return 0;
 }
 
-#define MLX5_CR_SPACE_DOMAIN 0x2
 static int mlx5_get_vendor_cap_addr(struct mlx5_core_dev *dev)
 {
int vend_cap;
@@ -196,24 +199,27 @@ static int mlx5_get_vendor_cap_addr(struct mlx5_core_d
ret = mlx5_pciconf_cap9_sem(dev, LOCK);
if (ret) {
mlx5_core_warn(dev,
-  "pciconf_cap9_sem locking failure\n");
+   "pciconf_cap9_sem locking failure\n");
return 0;
}
-   if (mlx5_pciconf_set_addr_space(dev, MLX5_CR_SPACE_DOMAIN))
+   if (mlx5_pciconf_set_addr_space(dev,
+  MLX5_SEMAPHORE_SPACE_DOMAIN))
vend_cap = 0;
ret = mlx5_pciconf_cap9_sem(dev, UNLOCK);
if (ret)
mlx5_core_warn(dev,
-  "pciconf_cap9_sem unlocking failure\n");
+   "pciconf_cap9_sem unlocking failure\n");
return vend_cap;
 }
 
-#define MLX5_SEMAPHORE_SPACE_DOMAIN 0xA
 int mlx5_pciconf_set_sem_addr_space(struct mlx5_core_dev *dev,
u32 sem_space_address, int state)
 {
u32 data, id = 0;
int ret;
+
+   if (!dev->vsec_addr)
+   return -ENXIO;
 
ret = mlx5_pciconf_set_addr_space(dev,
  MLX5_SEMAPHORE_SPACE_DOMAIN);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331821 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:43:15 2018
New Revision: 331821
URL: https://svnweb.freebsd.org/changeset/base/331821

Log:
  Prepare for FW dump in error state in mlx5core.
  
  - Move firmware dump prep and cleanup to init_one() and remove_one() so that
  the init and cleanup will happen only upon driver reload.
  - Add some prints to indicate firmware dump.
  
  MFC after:3 days
  Submitted by: slavash@
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c   Fri Mar 30 19:39:27 2018
(r331820)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_fwdump.c   Fri Mar 30 19:43:15 2018
(r331821)
@@ -116,14 +116,18 @@ mlx5_fwdump(struct mlx5_core_dev *mdev)
uint32_t i, ri;
int error;
 
+   dev_info(&mdev->pdev->dev, "Issuing FW dump\n");
dd = (struct mlx5_dump_data *)atomic_load_acq_ptr((uintptr_t *)
&mdev->dump_data);
if (dd == NULL)
return;
mtx_lock(&dd->dump_lock);
-   if (dd->dump_valid)
+   if (dd->dump_valid) {
/* only one dump */
+   dev_warn(&mdev->pdev->dev,
+   "Only one FW dump can be captured aborting FW dump\n");
goto failed;
+   }
 
/* mlx5_vsc already warns, be silent. */
error = mlx5_vsc_lock(mdev);

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Mar 30 19:39:27 2018
(r331820)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c Fri Mar 30 19:43:15 2018
(r331821)
@@ -1056,8 +1056,6 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, st
goto err_fs;
}
 
-   mlx5_fwdump_prep(dev);
-
clear_bit(MLX5_INTERFACE_STATE_DOWN, &dev->intf_state);
set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state);
 
@@ -1127,7 +1125,6 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, 
goto out;
}
 
-   mlx5_fwdump_clean(dev);
mlx5_unregister_device(dev);
 
mlx5_cleanup_fs(dev);
@@ -1179,7 +1176,6 @@ struct mlx5_core_event_handler {
  void *data);
 };
 
-
 static int init_one(struct pci_dev *pdev,
const struct pci_device_id *id)
 {
@@ -1224,6 +1220,8 @@ static int init_one(struct pci_dev *pdev,
goto clean_health;
}
 
+   mlx5_fwdump_prep(dev);
+
pci_save_state(pdev->dev.bsddev);
return 0;
 
@@ -1248,6 +1246,7 @@ static void remove_one(struct pci_dev *pdev)
return;
}
 
+   mlx5_fwdump_clean(dev);
mlx5_pagealloc_cleanup(dev);
mlx5_health_cleanup(dev);
mlx5_pci_close(dev, priv);
@@ -1264,6 +1263,7 @@ static pci_ers_result_t mlx5_pci_err_detected(struct p
dev_info(&pdev->dev, "%s was called\n", __func__);
mlx5_enter_error_state(dev, false);
mlx5_unload_one(dev, priv, false);
+
if (state) {
mlx5_drain_health_wq(dev);
mlx5_pci_disable_device(dev);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331822 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:45:48 2018
New Revision: 331822
URL: https://svnweb.freebsd.org/changeset/base/331822

Log:
  Reorganize health recovery in mlx5core.
  
  - Move the semaphore locking and unlocking to the same function.
  - Flags are no longer needed if the reset and crdump will be done in the
same function.
  
  MFC after:3 days
  Submitted by: slavash@
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_health.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:43:15 2018
(r331821)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:45:48 2018
(r331822)
@@ -48,8 +48,6 @@ enum {
 enum {
MLX5_DROP_NEW_HEALTH_WORK,
MLX5_DROP_NEW_RECOVERY_WORK,
-   MLX5_SKIP_SW_RESET,
-   MLX5_SW_RESET_SEM_LOCKED,
 };
 
 enum  {
@@ -167,7 +165,6 @@ static void reset_fw_if_needed(struct mlx5_core_dev *d
 {
bool supported = (ioread32be(&dev->iseg->initializing) >>
  MLX5_FW_RESET_SUPPORTED_OFFSET) & 1;
-   struct mlx5_core_health *health = &dev->priv.health;
u32 cmdq_addr, fatal_error;
 
if (!supported)
@@ -181,8 +178,7 @@ static void reset_fw_if_needed(struct mlx5_core_dev *d
fatal_error = check_fatal_sensors(dev);
if (fatal_error == MLX5_SENSOR_PCI_COMM_ERR ||
fatal_error == MLX5_SENSOR_NIC_DISABLED ||
-   fatal_error == MLX5_SENSOR_NIC_SW_RESET ||
-   test_bit(MLX5_SKIP_SW_RESET, &health->flags)) {
+   fatal_error == MLX5_SENSOR_NIC_SW_RESET) {
mlx5_core_warn(dev, "Not issuing FW reset. Either it's already 
done or won't help.\n");
return;
}
@@ -197,26 +193,65 @@ static void reset_fw_if_needed(struct mlx5_core_dev *d
&dev->iseg->cmdq_addr_l_sz);
 }
 
+#define MLX5_CRDUMP_WAIT_MS6
+#define MLX5_FW_RESET_WAIT_MS  1000
+#define MLX5_NIC_STATE_POLL_MS 5
 void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force)
 {
+   unsigned long end, delay_ms = MLX5_CRDUMP_WAIT_MS;
+   u32 fatal_error;
+   int lock = -EBUSY;
+
mutex_lock(&dev->intf_state_mutex);
if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR) {
goto unlock;
return;
}
 
-   if (!force)
-   mlx5_core_err(dev, "internal state error detected\n");
-   if (check_fatal_sensors(dev) || force) {
-   reset_fw_if_needed(dev);
+   fatal_error = check_fatal_sensors(dev);
+
+   if (fatal_error || force) {
+   if (!force)
+   mlx5_core_err(dev, "internal state error detected\n");
dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
mlx5_trigger_cmd_completions(dev);
}
 
-   mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0);
-   if (!force)
-   mlx5_core_err(dev, "system error event triggered\n");
+   if (force)
+   goto err_state_done;
 
+   if (fatal_error == MLX5_SENSOR_FW_SYND_RFR) {
+   if (mlx5_core_is_pf(dev))
+   lock = lock_sem_sw_reset(dev, LOCK);
+
+   if (lock != -EBUSY) {
+   reset_fw_if_needed(dev);
+   delay_ms = MLX5_FW_RESET_WAIT_MS;
+   }
+   }
+
+   /* Recover from SW reset */
+   end = jiffies + msecs_to_jiffies(delay_ms);
+   do {
+   if (sensor_nic_disabled(dev))
+   break;
+
+   msleep(MLX5_NIC_STATE_POLL_MS);
+   } while (!time_after(jiffies, end));
+
+   if (!sensor_nic_disabled(dev)) {
+   dev_err(&dev->pdev->dev, "NIC IFC still %d after %lums.\n",
+   get_nic_mode(dev), delay_ms);
+   }
+
+   /* Release FW semaphore if you are the lock owner */
+   if (!lock)
+   lock_sem_sw_reset(dev, UNLOCK);
+
+   mlx5_core_err(dev, "system error event triggered\n");
+
+err_state_done:
+   mlx5_core_event(dev, MLX5_DEV_EVENT_SYS_ERROR, 0);
 unlock:
mutex_unlock(&dev->intf_state_mutex);
 }
@@ -265,7 +300,6 @@ static void health_recover(struct work_struct *work)
if (sensor_pci_no_comm(dev)) {
dev_err(&dev->pdev->dev, "health recovery flow aborted, PCI 
reads still not working\n");
recover = false;
-   goto clear_sem;
}
 
nic_mode = get_nic_mode(dev);
@@ -281,14 +315,6 @@ static void health_recover(struct work_struct *work)
recover = false;
}
 
-clear_sem:
-   if (test_and_clear_bit(MLX5_SW_RESET_SEM_LOCKED, &health->flags)) {
-   mlx5_core_dbg(dev, "Unlocking FW reset semaphore\n");
-   lock_sem_sw_reset(dev, UNLOCK);
-   }
-
-   test_and_clear_bit(MLX5_SKIP_SW_RESET, &health->flag

svn commit: r331823 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:48:25 2018
New Revision: 331823
URL: https://svnweb.freebsd.org/changeset/base/331823

Log:
  Collect firmware dump when mlx5core is in device error state.
  
  Firmware dump collecting should be triggered in case firmware syndrome
  with request for reset bit is set.
  
  MFC after:3 days
  Submitted by: slavash@
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_health.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:45:48 2018
(r331822)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:48:25 2018
(r331823)
@@ -221,10 +221,13 @@ void mlx5_enter_error_state(struct mlx5_core_dev *dev,
goto err_state_done;
 
if (fatal_error == MLX5_SENSOR_FW_SYND_RFR) {
+   /* Get cr-dump and reset FW semaphore */
if (mlx5_core_is_pf(dev))
lock = lock_sem_sw_reset(dev, LOCK);
 
+   /* Execute cr-dump and SW reset */
if (lock != -EBUSY) {
+   mlx5_fwdump(dev);
reset_fw_if_needed(dev);
delay_ms = MLX5_FW_RESET_WAIT_MS;
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331824 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:49:35 2018
New Revision: 331824
URL: https://svnweb.freebsd.org/changeset/base/331824

Log:
  Make sure Giant is locked when allocating bus resources in mlx5core.
  
  During health care IRQ resources will be reallocated.
  Newbus requires that Giant is locked before accessing
  these resources.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_health.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_health.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:48:25 2018
(r331823)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_health.c   Fri Mar 30 19:49:35 2018
(r331824)
@@ -300,6 +300,8 @@ static void health_recover(struct work_struct *work)
priv = container_of(health, struct mlx5_priv, health);
dev = container_of(priv, struct mlx5_core_dev, priv);
 
+   mtx_lock(&Giant);   /* XXX newbus needs this */
+
if (sensor_pci_no_comm(dev)) {
dev_err(&dev->pdev->dev, "health recovery flow aborted, PCI 
reads still not working\n");
recover = false;
@@ -322,6 +324,8 @@ static void health_recover(struct work_struct *work)
dev_err(&dev->pdev->dev, "starting health recovery flow\n");
mlx5_recover_device(dev);
}
+
+   mtx_unlock(&Giant);
 }
 
 /* How much time to wait until health resetting the driver (in msecs) */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331825 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:50:45 2018
New Revision: 331825
URL: https://svnweb.freebsd.org/changeset/base/331825

Log:
  Fix for use after free in mlx5core.
  
  Make sure the command completion handler is not called when the device is
  in internal error state. This can easily trigger use after free situations.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_eq.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Mar 30 19:49:35 2018
(r331824)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c   Fri Mar 30 19:50:45 2018
(r331825)
@@ -254,7 +254,8 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru
break;
 
case MLX5_EVENT_TYPE_CMD:
-   mlx5_cmd_comp_handler(dev, 
be32_to_cpu(eqe->data.cmd.vector));
+   if (dev->state != MLX5_DEVICE_STATE_INTERNAL_ERROR)
+   mlx5_cmd_comp_handler(dev, 
be32_to_cpu(eqe->data.cmd.vector));
break;
 
case MLX5_EVENT_TYPE_PORT_CHANGE:
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331826 - head/sys/dev/mlx5/mlx5_core

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:55:31 2018
New Revision: 331826
URL: https://svnweb.freebsd.org/changeset/base/331826

Log:
  Bump mlx5core driver version.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_core.h

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_core.h
==
--- head/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Mar 30 19:50:45 2018
(r331825)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_core.h Fri Mar 30 19:55:31 2018
(r331826)
@@ -33,8 +33,10 @@
 #include 
 
 #define DRIVER_NAME "mlx5_core"
-#define DRIVER_VERSION "1.23.0 (03 Mar 2015)"
-#define DRIVER_RELDATE "03 Mar 2015"
+#ifndef DRIVER_VERSION
+#define DRIVER_VERSION "3.4.1"
+#endif
+#define DRIVER_RELDATE "February 2018"
 
 extern int mlx5_core_debug_mask;
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r331827 - head/sys/dev/mlx5

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 19:58:58 2018
New Revision: 331827
URL: https://svnweb.freebsd.org/changeset/base/331827

Log:
  Remove unused structure field in mlx5core.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/dev/mlx5/driver.h

Modified: head/sys/dev/mlx5/driver.h
==
--- head/sys/dev/mlx5/driver.h  Fri Mar 30 19:55:31 2018(r331826)
+++ head/sys/dev/mlx5/driver.h  Fri Mar 30 19:58:58 2018(r331827)
@@ -371,7 +371,6 @@ struct mlx5_cmd {
struct cmd_msg_cache cache;
int checksum_disabled;
struct mlx5_cmd_stats stats[MLX5_CMD_OP_MAX];
-   int moving_to_polling;
 };
 
 struct mlx5_port_caps {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-03-30 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Mar 30 20:11:12 2018
New Revision: 331828
URL: https://svnweb.freebsd.org/changeset/base/331828

Log:
  Optimise use of Giant in the LinuxKPI.
  
  - Make sure Giant is locked when calling PCI device methods.
  Newbus currently requires this.
  
  - Avoid unlocking Giant right before aquiring the sleepqueue lock.
  This can save a task switch.
  
  MFC after:1 week
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/module.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c
  head/sys/compat/linuxkpi/common/src/linux_pci.c
  head/sys/compat/linuxkpi/common/src/linux_rcu.c
  head/sys/compat/linuxkpi/common/src/linux_schedule.c

Modified: head/sys/compat/linuxkpi/common/include/linux/module.h
==
--- head/sys/compat/linuxkpi/common/include/linux/module.h  Fri Mar 30 
19:58:58 2018(r331827)
+++ head/sys/compat/linuxkpi/common/include/linux/module.h  Fri Mar 30 
20:11:12 2018(r331828)
@@ -78,9 +78,7 @@ _module_run(void *arg)
printf("Running %s (%p)\n", name, pc);
 #endif
fn = arg;
-   DROP_GIANT();
fn();
-   PICKUP_GIANT();
 }
 
 #definemodule_init(fn) 
\

Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==
--- head/sys/compat/linuxkpi/common/src/linux_compat.c  Fri Mar 30 19:58:58 
2018(r331827)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c  Fri Mar 30 20:11:12 
2018(r331828)
@@ -1804,8 +1804,6 @@ linux_wait_for_common(struct completion *c, int flags)
if (SCHEDULER_STOPPED())
return (0);
 
-   DROP_GIANT();
-
task = current;
 
if (flags != 0)
@@ -1819,22 +1817,25 @@ linux_wait_for_common(struct completion *c, int flags)
break;
sleepq_add(c, NULL, "completion", flags, 0);
if (flags & SLEEPQ_INTERRUPTIBLE) {
+   DROP_GIANT();
error = -sleepq_wait_sig(c, 0);
+   PICKUP_GIANT();
if (error != 0) {
linux_schedule_save_interrupt_value(task, 
error);
error = -ERESTARTSYS;
goto intr;
}
-   } else
+   } else {
+   DROP_GIANT();
sleepq_wait(c, 0);
+   PICKUP_GIANT();
+   }
}
if (c->done != UINT_MAX)
c->done--;
sleepq_release(c);
 
 intr:
-   PICKUP_GIANT();
-
return (error);
 }
 
@@ -1851,8 +1852,6 @@ linux_wait_for_timeout_common(struct completion *c, in
if (SCHEDULER_STOPPED())
return (0);
 
-   DROP_GIANT();
-
task = current;
 
if (flags != 0)
@@ -1866,10 +1865,14 @@ linux_wait_for_timeout_common(struct completion *c, in
break;
sleepq_add(c, NULL, "completion", flags, 0);
sleepq_set_timeout(c, linux_timer_jiffies_until(end));
+
+   DROP_GIANT();
if (flags & SLEEPQ_INTERRUPTIBLE)
error = -sleepq_timedwait_sig(c, 0);
else
error = -sleepq_timedwait(c, 0);
+   PICKUP_GIANT();
+
if (error != 0) {
/* check for timeout */
if (error == -EWOULDBLOCK) {
@@ -1889,8 +1892,6 @@ linux_wait_for_timeout_common(struct completion *c, in
/* return how many jiffies are left */
error = linux_timer_jiffies_until(end);
 done:
-   PICKUP_GIANT();
-
return (error);
 }
 

Modified: head/sys/compat/linuxkpi/common/src/linux_pci.c
==
--- head/sys/compat/linuxkpi/common/src/linux_pci.c Fri Mar 30 19:58:58 
2018(r331827)
+++ head/sys/compat/linuxkpi/common/src/linux_pci.c Fri Mar 30 20:11:12 
2018(r331828)
@@ -171,12 +171,11 @@ linux_pci_attach(device_t dev)
pdev->bus = pbus;
}
 
-   DROP_GIANT();
spin_lock(&pci_lock);
list_add(&pdev->links, &pci_devices);
spin_unlock(&pci_lock);
+
error = pdrv->probe(pdev, id);
-   PICKUP_GIANT();
if (error) {
spin_lock(&pci_lock);
list_del(&pdev->links);
@@ -194,9 +193,9 @@ linux_pci_detach(device_t dev)
 
linux_set_current(curthread);
pdev = device_get_softc(dev);
-   DROP_GIANT();
+
pdev->pdrv->remove(pdev);
-   PICKUP_GIANT();
+
spin_lock(&pci_lock);
list_del(&pdev->links);
spin_unlock(&pci_lock);
@@ -258,11 +257,8 @@ linux_pci_shut

svn commit: r331829 - in head/sys/dev: ex ixgb nxge vxge

2018-03-30 Thread Brooks Davis
Author: brooks
Date: Fri Mar 30 20:24:29 2018
New Revision: 331829
URL: https://svnweb.freebsd.org/changeset/base/331829

Log:
  Fall back to ether_ioctl() by default.
  
  The common pratice in ethernet device drivers is to fall back to
  ether_ioctl() to implement generic ioctls not implemented by the driver
  and to fail if no handler exists.
  
  Convert these drivers to follow that practice rather than calling
  ether_ioctl() for specific cases.
  
  vxge(4) aready had the default case, but it was only called on failure
  to match.
  
  Reviewed by:  imp
  Obtained from:CheriBSD
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14895

Modified:
  head/sys/dev/ex/if_ex.c
  head/sys/dev/ixgb/if_ixgb.c
  head/sys/dev/nxge/if_nxge.c
  head/sys/dev/vxge/vxge.c

Modified: head/sys/dev/ex/if_ex.c
==
--- head/sys/dev/ex/if_ex.c Fri Mar 30 20:11:12 2018(r331828)
+++ head/sys/dev/ex/if_ex.c Fri Mar 30 20:24:29 2018(r331829)
@@ -823,12 +823,6 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
DODEBUG(Start_End, printf("%s: ex_ioctl: start ", ifp->if_xname););
 
switch(cmd) {
-   case SIOCSIFADDR:
-   case SIOCGIFADDR:
-   case SIOCSIFMTU:
-   error = ether_ioctl(ifp, cmd, data);
-   break;
-
case SIOCSIFFLAGS:
DODEBUG(Start_End, printf("SIOCSIFFLAGS"););
EX_LOCK(sc);
@@ -850,8 +844,8 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, cmd);
break;
default:
-   DODEBUG(Start_End, printf("unknown"););
-   error = EINVAL;
+   error = ether_ioctl(ifp, cmd, data);
+   break;
}
 
DODEBUG(Start_End, printf("\n%s: ex_ioctl: finish\n", ifp->if_xname););

Modified: head/sys/dev/ixgb/if_ixgb.c
==
--- head/sys/dev/ixgb/if_ixgb.c Fri Mar 30 20:11:12 2018(r331828)
+++ head/sys/dev/ixgb/if_ixgb.c Fri Mar 30 20:24:29 2018(r331829)
@@ -525,11 +525,6 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD_TYPE command,
goto out;
 
switch (command) {
-   case SIOCSIFADDR:
-   case SIOCGIFADDR:
-   IOCTL_DEBUGOUT("ioctl rcv'd: SIOCxIFADDR (Get/Set Interface 
Addr)");
-   ether_ioctl(ifp, command, data);
-   break;
case SIOCSIFMTU:
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)");
if (ifr->ifr_mtu > IXGB_MAX_JUMBO_FRAME_SIZE - ETHER_HDR_LEN) {
@@ -610,8 +605,8 @@ ixgb_ioctl(struct ifnet * ifp, IOCTL_CMD_TYPE command,
}
break;
default:
-   IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%X)\n", 
(int)command);
-   error = EINVAL;
+   error = ether_ioctl(ifp, command, data);
+   break;
}
 
 out:

Modified: head/sys/dev/nxge/if_nxge.c
==
--- head/sys/dev/nxge/if_nxge.c Fri Mar 30 20:11:12 2018(r331828)
+++ head/sys/dev/nxge/if_nxge.c Fri Mar 30 20:24:29 2018(r331829)
@@ -1623,12 +1623,6 @@ xge_ioctl(struct ifnet *ifnetp, unsigned long command,
}
 
switch(command) {
-   /* Set/Get ifnet address */
-   case SIOCSIFADDR:
-   case SIOCGIFADDR:
-   ether_ioctl(ifnetp, command, data);
-   break;
-
/* Set ifnet MTU */
case SIOCSIFMTU:
retValue = xge_change_mtu(lldev, ifreqp->ifr_mtu);
@@ -1713,7 +1707,7 @@ xge_ioctl(struct ifnet *ifnetp, unsigned long command,
break;
 
default:
-   retValue = EINVAL;
+   retValue = ether_ioctl(ifnetp, command, data);
break;
}
return retValue;

Modified: head/sys/dev/vxge/vxge.c
==
--- head/sys/dev/vxge/vxge.cFri Mar 30 20:11:12 2018(r331828)
+++ head/sys/dev/vxge/vxge.cFri Mar 30 20:24:29 2018(r331829)
@@ -3573,12 +3573,6 @@ vxge_ioctl(ifnet_t ifp, u_long command, caddr_t data)
return (EBUSY);
 
switch (command) {
-   /* Set/Get ifnet address */
-   case SIOCSIFADDR:
-   case SIOCGIFADDR:
-   ether_ioctl(ifp, command, data);
-   break;
-
/* Set Interface MTU */
case SIOCSIFMTU:
err = vxge_change_mtu(vdev, (unsigned long)ifr->ifr_mtu);
___
svn-src-head@freebsd.org mailing list
https://lists.

svn commit: r331830 - in head: share/man/man4 sys/dev/cm sys/dev/pdq

2018-03-30 Thread Brooks Davis
Author: brooks
Date: Fri Mar 30 20:27:47 2018
New Revision: 331830
URL: https://svnweb.freebsd.org/changeset/base/331830

Log:
  Add deprecation notices for Arcnet and FDDI drivers.
  
  We intend to remove support before FreeBSD 12 is branched.
  
  Reviewed by:  imp, emaste
  MFC after:3 days
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14890

Modified:
  head/share/man/man4/cm.4
  head/share/man/man4/fpa.4
  head/sys/dev/cm/if_cm_isa.c
  head/sys/dev/pdq/if_fpa.c

Modified: head/share/man/man4/cm.4
==
--- head/share/man/man4/cm.4Fri Mar 30 20:24:29 2018(r331829)
+++ head/share/man/man4/cm.4Fri Mar 30 20:27:47 2018(r331830)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 16, 2005
+.Dd March 29, 2018
 .Dt CM 4
 .Os
 .Sh NAME
@@ -46,6 +46,12 @@ module at boot time, place the following line in
 .Bd -literal -offset indent
 if_cm_load="YES"
 .Ed
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 12.0
+and later.
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/share/man/man4/fpa.4
==
--- head/share/man/man4/fpa.4   Fri Mar 30 20:24:29 2018(r331829)
+++ head/share/man/man4/fpa.4   Fri Mar 30 20:27:47 2018(r331830)
@@ -4,7 +4,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 15, 2017
+.Dd March 29, 2018
 .Dt FPA 4
 .Os
 .Sh NAME
@@ -16,6 +16,12 @@
 .Fx
 only:
 .Cd "device fddi"
+.Sh DEPRECATION NOTICE
+The
+.Nm
+driver is not present in
+.Fx 12.0
+and later.
 .Sh DESCRIPTION
 The
 .Nm

Modified: head/sys/dev/cm/if_cm_isa.c
==
--- head/sys/dev/cm/if_cm_isa.c Fri Mar 30 20:24:29 2018(r331829)
+++ head/sys/dev/cm/if_cm_isa.c Fri Mar 30 20:27:47 2018(r331830)
@@ -113,6 +113,7 @@ cm_isa_attach(dev)
if (error)
goto err;
 
+   gone_in_dev(dev, 12, "cm(4) driver");
return 0;
 
 err:

Modified: head/sys/dev/pdq/if_fpa.c
==
--- head/sys/dev/pdq/if_fpa.c   Fri Mar 30 20:24:29 2018(r331829)
+++ head/sys/dev/pdq/if_fpa.c   Fri Mar 30 20:27:47 2018(r331830)
@@ -158,6 +158,7 @@ pdq_pci_attach(device_t dev)
 }
 
 
+gone_in_dev(dev, 12, "fpa(4) driver");
 return (0);
 bad:
 pdq_free(dev);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r331830 - in head: share/man/man4 sys/dev/cm sys/dev/pdq

2018-03-30 Thread Rodney W. Grimes
> Author: brooks
> Date: Fri Mar 30 20:27:47 2018
> New Revision: 331830
> URL: https://svnweb.freebsd.org/changeset/base/331830
> 
> Log:
>   Add deprecation notices for Arcnet and FDDI drivers.
>   
>   We intend to remove support before FreeBSD 12 is branched.
>   
>   Reviewed by:imp, emaste
>   MFC after:  3 days
>   Sponsored by:   DARPA, AFRL
>   Differential Revision:  https://reviews.freebsd.org/D14890
> 
> Modified:
>   head/share/man/man4/cm.4
>   head/share/man/man4/fpa.4
>   head/sys/dev/cm/if_cm_isa.c
>   head/sys/dev/pdq/if_fpa.c

There is still an if_fea.c, which is also an FDDI driver, in the
11.1 src tree.
Not sure what happened to it in ^head, as it seems missing.

You'll probably need to make a direct commit to add a
+gone_in_dev(dev, 12, "fea(4) driver");

Thanks,
Rod

> 
> Modified: head/share/man/man4/cm.4
> ==
> --- head/share/man/man4/cm.4  Fri Mar 30 20:24:29 2018(r331829)
> +++ head/share/man/man4/cm.4  Fri Mar 30 20:27:47 2018(r331830)
> @@ -25,7 +25,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd July 16, 2005
> +.Dd March 29, 2018
>  .Dt CM 4
>  .Os
>  .Sh NAME
> @@ -46,6 +46,12 @@ module at boot time, place the following line in
>  .Bd -literal -offset indent
>  if_cm_load="YES"
>  .Ed
> +.Sh DEPRECATION NOTICE
> +The
> +.Nm
> +driver is not present in
> +.Fx 12.0
> +and later.
>  .Sh DESCRIPTION
>  The
>  .Nm
> 
> Modified: head/share/man/man4/fpa.4
> ==
> --- head/share/man/man4/fpa.4 Fri Mar 30 20:24:29 2018(r331829)
> +++ head/share/man/man4/fpa.4 Fri Mar 30 20:27:47 2018(r331830)
> @@ -4,7 +4,7 @@
>  .\"
>  .\" $FreeBSD$
>  .\"
> -.Dd February 15, 2017
> +.Dd March 29, 2018
>  .Dt FPA 4
>  .Os
>  .Sh NAME
> @@ -16,6 +16,12 @@
>  .Fx
>  only:
>  .Cd "device fddi"
> +.Sh DEPRECATION NOTICE
> +The
> +.Nm
> +driver is not present in
> +.Fx 12.0
> +and later.
>  .Sh DESCRIPTION
>  The
>  .Nm
> 
> Modified: head/sys/dev/cm/if_cm_isa.c
> ==
> --- head/sys/dev/cm/if_cm_isa.c   Fri Mar 30 20:24:29 2018
> (r331829)
> +++ head/sys/dev/cm/if_cm_isa.c   Fri Mar 30 20:27:47 2018
> (r331830)
> @@ -113,6 +113,7 @@ cm_isa_attach(dev)
>   if (error)
>   goto err;
>  
> + gone_in_dev(dev, 12, "cm(4) driver");
>   return 0;
>  
>  err:
> 
> Modified: head/sys/dev/pdq/if_fpa.c
> ==
> --- head/sys/dev/pdq/if_fpa.c Fri Mar 30 20:24:29 2018(r331829)
> +++ head/sys/dev/pdq/if_fpa.c Fri Mar 30 20:27:47 2018(r331830)
> @@ -158,6 +158,7 @@ pdq_pci_attach(device_t dev)
>  }
>  
>  
> +gone_in_dev(dev, 12, "fpa(4) driver");
>  return (0);
>  bad:
>  pdq_free(dev);
> 
> 

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


svn commit: r331831 - in head/sys: net netinet6

2018-03-30 Thread Brooks Davis
Author: brooks
Date: Fri Mar 30 21:38:53 2018
New Revision: 331831
URL: https://svnweb.freebsd.org/changeset/base/331831

Log:
  Document and enforce assumptions about struct (in6_)ifreq.
  
  - The two types must be type-punnable for shared members of ifr_ifru.
This allows compatibility accessors to be shared.
  
  - There must be no padding gap between ifr_name and ifr_ifru.  This is
assumed in tcpdump's use of SIOCGIFFLAGS output which attempts to be
broadly portable.  This is true for all current architectures, but very
large (256-bit) fat-pointers could violate this invariant.
  
  Reviewed by:  kib
  Obtained from:CheriBSD
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D14910

Modified:
  head/sys/net/if.c
  head/sys/netinet6/in6.c

Modified: head/sys/net/if.c
==
--- head/sys/net/if.c   Fri Mar 30 20:27:47 2018(r331830)
+++ head/sys/net/if.c   Fri Mar 30 21:38:53 2018(r331831)
@@ -97,6 +97,13 @@
 
 #include 
 
+/*
+ * Consumers of struct ifreq such as tcpdump assume no pad between ifr_name
+ * and ifr_ifru when it is used in SIOCGIFCONF.
+ */
+_Static_assert(sizeof(((struct ifreq *)0)->ifr_name) ==
+offsetof(struct ifreq, ifr_ifru), "gap between ifr_name and ifr_ifru");
+
 #ifdef COMPAT_FREEBSD32
 #include 
 #include 

Modified: head/sys/netinet6/in6.c
==
--- head/sys/netinet6/in6.c Fri Mar 30 20:27:47 2018(r331830)
+++ head/sys/netinet6/in6.c Fri Mar 30 21:38:53 2018(r331831)
@@ -112,6 +112,14 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+/*
+ * struct in6_ifreq and struct ifreq must be type punnable for common members
+ * of ifr_ifru to allow accessors to be shared.
+ */
+_Static_assert(offsetof(struct in6_ifreq, ifr_ifru) ==
+offsetof(struct ifreq, ifr_ifru),
+"struct in6_ifreq and struct ifreq are not type punnable");
+
 VNET_DECLARE(int, icmp6_nodeinfo_oldmcprefix);
 #define V_icmp6_nodeinfo_oldmcprefix   VNET(icmp6_nodeinfo_oldmcprefix)
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r331830 - in head: share/man/man4 sys/dev/cm sys/dev/pdq

2018-03-30 Thread Brooks Davis
On Fri, Mar 30, 2018 at 02:13:22PM -0700, Rodney W. Grimes wrote:
> > Author: brooks
> > Date: Fri Mar 30 20:27:47 2018
> > New Revision: 331830
> > URL: https://svnweb.freebsd.org/changeset/base/331830
> > 
> > Log:
> >   Add deprecation notices for Arcnet and FDDI drivers.
> >   
> >   We intend to remove support before FreeBSD 12 is branched.
> >   
> >   Reviewed by:  imp, emaste
> >   MFC after:3 days
> >   Sponsored by: DARPA, AFRL
> >   Differential Revision:https://reviews.freebsd.org/D14890
> > 
> > Modified:
> >   head/share/man/man4/cm.4
> >   head/share/man/man4/fpa.4
> >   head/sys/dev/cm/if_cm_isa.c
> >   head/sys/dev/pdq/if_fpa.c
> 
> There is still an if_fea.c, which is also an FDDI driver, in the
> 11.1 src tree.
> Not sure what happened to it in ^head, as it seems missing.

It went away with EISA support.

> You'll probably need to make a direct commit to add a
> +gone_in_dev(dev, 12, "fea(4) driver");

Thanks for the reminder, I'll do that now.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r331836 - head/sys/conf

2018-03-30 Thread Jason A. Harmening
Author: jah
Date: Sat Mar 31 05:17:12 2018
New Revision: 331836
URL: https://svnweb.freebsd.org/changeset/base/331836

Log:
  Remove MK_AUTO_OBJ from env passed to PORTS_MODULES
  
  This fixes a failure to resolve object file paths seen when buildkernel
  (which sets MK_AUTO_OBJ=yes) and installkernel (which sets MK_AUTO_OBJ=no)
  are run as separate steps.  r329232 partially fixed this scenario by removing
  MAKEOBJDIR, but it seems the AUTO_OBJ setting also needs to be on the same
  page for the build and install steps.
  
  Reviewed by:  bdrewery
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D14143

Modified:
  head/sys/conf/kern.post.mk

Modified: head/sys/conf/kern.post.mk
==
--- head/sys/conf/kern.post.mk  Sat Mar 31 01:37:14 2018(r331835)
+++ head/sys/conf/kern.post.mk  Sat Mar 31 05:17:12 2018(r331836)
@@ -70,8 +70,9 @@ PORTSMODULESENV=\
-u CXX \
-u CPP \
-u MAKESYSPATH \
+   -u MK_AUTO_OBJ \
-u MAKEOBJDIR \
-   MAKEFLAGS="${MAKEFLAGS:M*:tW:S/^-m /-m_/g:S/ -m / -m_/g:tw:N-m_*}" \
+   MAKEFLAGS="${MAKEFLAGS:M*:tW:S/^-m /-m_/g:S/ -m / 
-m_/g:tw:N-m_*:NMK_AUTO_OBJ=*}" \
SYSDIR=${SYSDIR} \
PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \
SRC_BASE=${SRC_BASE} \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"