svn commit: r350554 - in head: share/man/man4 sys/conf sys/dev/mxge sys/modules/mxge/mxge
Xin LI
delphij at FreeBSD.org
Sat Aug 3 03:36:19 UTC 2019
Author: delphij
Date: Sat Aug 3 03:36:18 2019
New Revision: 350554
URL: https://svnweb.freebsd.org/changeset/base/350554
Log:
if_mxge: update zlib version 1.0.4 to 1.2.11.
PR: 229763
Submitted by: Yoshihiro Ota <ota j email ne jp>
Differential Revision: https://reviews.freebsd.org/D20272
Modified:
head/share/man/man4/mxge.4
head/sys/conf/files
head/sys/dev/mxge/if_mxge.c
head/sys/modules/mxge/mxge/Makefile
Modified: head/share/man/man4/mxge.4
==============================================================================
--- head/share/man/man4/mxge.4 Sat Aug 3 02:36:35 2019 (r350553)
+++ head/share/man/man4/mxge.4 Sat Aug 3 03:36:18 2019 (r350554)
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 13, 2008
+.Dd August 2, 2019
.Dt MXGE 4
.Os
.Sh NAME
@@ -43,6 +43,7 @@ place the following lines in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device firmware"
+.Cd "device zlib"
.Cd "device mxge"
.Ed
.Pp
Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files Sat Aug 3 02:36:35 2019 (r350553)
+++ head/sys/conf/files Sat Aug 3 03:36:18 2019 (r350554)
@@ -2442,7 +2442,8 @@ mwlboot.fw optional mwlfw \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "mwlboot.fw"
-dev/mxge/if_mxge.c optional mxge pci
+dev/mxge/if_mxge.c optional mxge pci \
+ compile-with "${ZLIB_C}"
dev/mxge/mxge_eth_z8e.c optional mxge pci
dev/mxge/mxge_ethp_z8e.c optional mxge pci
dev/mxge/mxge_rss_eth_z8e.c optional mxge pci
Modified: head/sys/dev/mxge/if_mxge.c
==============================================================================
--- head/sys/dev/mxge/if_mxge.c Sat Aug 3 02:36:35 2019 (r350553)
+++ head/sys/dev/mxge/if_mxge.c Sat Aug 3 03:36:18 2019 (r350554)
@@ -47,7 +47,8 @@ __FBSDID("$FreeBSD$");
#include <sys/sysctl.h>
#include <sys/sx.h>
#include <sys/taskqueue.h>
-#include <sys/zlib.h>
+#include <contrib/zlib/zlib.h>
+#include <dev/zlib/zcalloc.h>
#include <net/if.h>
#include <net/if_var.h>
@@ -683,22 +684,6 @@ mxge_validate_firmware(mxge_softc_t *sc, const mcp_gen
}
-static void *
-z_alloc(void *nil, u_int items, u_int size)
-{
- void *ptr;
-
- ptr = malloc(items * size, M_TEMP, M_NOWAIT);
- return ptr;
-}
-
-static void
-z_free(void *nil, void *ptr)
-{
- free(ptr, M_TEMP);
-}
-
-
static int
mxge_load_firmware_helper(mxge_softc_t *sc, uint32_t *limit)
{
@@ -723,8 +708,8 @@ mxge_load_firmware_helper(mxge_softc_t *sc, uint32_t *
/* setup zlib and decompress f/w */
bzero(&zs, sizeof (zs));
- zs.zalloc = z_alloc;
- zs.zfree = z_free;
+ zs.zalloc = zcalloc_nowait;
+ zs.zfree = zcfree;
status = inflateInit(&zs);
if (status != Z_OK) {
status = EIO;
Modified: head/sys/modules/mxge/mxge/Makefile
==============================================================================
--- head/sys/modules/mxge/mxge/Makefile Sat Aug 3 02:36:35 2019 (r350553)
+++ head/sys/modules/mxge/mxge/Makefile Sat Aug 3 03:36:18 2019 (r350554)
@@ -5,4 +5,6 @@
KMOD= if_mxge
SRCS= if_mxge.c device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h
+CFLAGS.if_mxge.c+= ${ZLIB_CFLAGS}
+
.include <bsd.kmod.mk>
More information about the svn-src-all
mailing list