svn commit: r556549 - in head/net/intel-em-kmod: . files
Jan Beich
jbeich at FreeBSD.org
Sun Nov 29 05:08:14 UTC 2020
Author: jbeich
Date: Sun Nov 29 05:08:13 2020
New Revision: 556549
URL: https://svnweb.freebsd.org/changeset/ports/556549
Log:
net/intel-em-kmod: unbreak on -CURRENT
link_elf_obj: symbol if_multiaddr_array undefined
PR: 250918
Approved by: maintainer timeout (3 weeks)
Added:
head/net/intel-em-kmod/files/
head/net/intel-em-kmod/files/patch-base-r353844 (contents, props changed)
Modified:
head/net/intel-em-kmod/Makefile (contents, props changed)
Modified: head/net/intel-em-kmod/Makefile
==============================================================================
--- head/net/intel-em-kmod/Makefile Sun Nov 29 04:54:29 2020 (r556548)
+++ head/net/intel-em-kmod/Makefile Sun Nov 29 05:08:13 2020 (r556549)
@@ -17,5 +17,6 @@ MAX_NETMAP_OSVERSION= 1199999 # Doesn't build w/NETMA
MASTERDIR= ${.CURDIR}/../intel-ixl-kmod
PKGDIR= ${.CURDIR}
DISTINFO_FILE= ${.CURDIR}/distinfo
+PATCHDIR= ${.CURDIR}/files
.include "${MASTERDIR}/Makefile"
Added: head/net/intel-em-kmod/files/patch-base-r353844
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/intel-em-kmod/files/patch-base-r353844 Sun Nov 29 05:08:13 2020 (r556549)
@@ -0,0 +1,98 @@
+https://svnweb.freebsd.org/changeset/base/353844
+
+--- if_em.c.orig 2020-04-08 15:13:17 UTC
++++ if_em.c
+@@ -2275,7 +2275,11 @@ em_disable_promisc(struct adapter *adapter)
+ if (if_getflags(ifp) & IFF_ALLMULTI)
+ mcnt = MAX_NUM_MULTICAST_ADDRESSES;
+ else
++#if __FreeBSD_version > 1300053
++ mcnt = if_llmaddr_count(ifp);
++#else
+ mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
++#endif
+ /* Don't disable if in MAX groups */
+ if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
+ reg_rctl &= (~E1000_RCTL_MPE);
+@@ -2283,7 +2287,21 @@ em_disable_promisc(struct adapter *adapter)
+ E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl);
+ }
+
++#if __FreeBSD_version > 1300053
++static u_int
++em_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
++{
++ u8 *mta = arg;
+
++ if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
++ return (1);
++
++ bcopy(LLADDR(sdl), &mta[cnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN);
++
++ return (1);
++}
++#endif
++
+ /*********************************************************************
+ * Multicast Update
+ *
+@@ -2314,7 +2332,11 @@ em_set_multi(struct adapter *adapter)
+ msec_delay(5);
+ }
+
++#if __FreeBSD_version > 1300053
++ mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
++#else
+ if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
++#endif
+
+ if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES) {
+ reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
+--- if_lem.c.orig 2020-04-08 15:13:17 UTC
++++ if_lem.c
+@@ -2019,7 +2019,11 @@ lem_disable_promisc(struct adapter *adapter)
+ if (if_getflags(ifp) & IFF_ALLMULTI)
+ mcnt = MAX_NUM_MULTICAST_ADDRESSES;
+ else
++#if __FreeBSD_version > 1300053
++ mcnt = if_llmaddr_count(ifp);
++#else
+ mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
++#endif
+
+ /* Don't disable if in MAX groups */
+ if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
+@@ -2028,7 +2032,21 @@ lem_disable_promisc(struct adapter *adapter)
+ E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl);
+ }
+
++#if __FreeBSD_version > 1300053
++static u_int
++em_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
++{
++ u8 *mta = arg;
+
++ if (cnt == MAX_NUM_MULTICAST_ADDRESSES)
++ return (1);
++
++ bcopy(LLADDR(sdl), &mta[cnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN);
++
++ return (1);
++}
++#endif
++
+ /*********************************************************************
+ * Multicast Update
+ *
+@@ -2059,7 +2077,11 @@ lem_set_multi(struct adapter *adapter)
+ msec_delay(5);
+ }
+
++#if __FreeBSD_version > 1300053
++ mcnt = if_foreach_llmaddr(ifp, em_copy_maddr, mta);
++#else
+ if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
++#endif
+
+ if (mcnt >= MAX_NUM_MULTICAST_ADDRESSES) {
+ reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL);
More information about the svn-ports-head
mailing list