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
This commit is contained in:
parent
a6d222eb68
commit
1dbf944a91
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350554
@ -31,7 +31,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd February 13, 2008
|
.Dd August 2, 2019
|
||||||
.Dt MXGE 4
|
.Dt MXGE 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -43,6 +43,7 @@ place the following lines in your
|
|||||||
kernel configuration file:
|
kernel configuration file:
|
||||||
.Bd -ragged -offset indent
|
.Bd -ragged -offset indent
|
||||||
.Cd "device firmware"
|
.Cd "device firmware"
|
||||||
|
.Cd "device zlib"
|
||||||
.Cd "device mxge"
|
.Cd "device mxge"
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -2442,7 +2442,8 @@ mwlboot.fw optional mwlfw \
|
|||||||
compile-with "${NORMAL_FW}" \
|
compile-with "${NORMAL_FW}" \
|
||||||
no-obj no-implicit-rule \
|
no-obj no-implicit-rule \
|
||||||
clean "mwlboot.fw"
|
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_eth_z8e.c optional mxge pci
|
||||||
dev/mxge/mxge_ethp_z8e.c optional mxge pci
|
dev/mxge/mxge_ethp_z8e.c optional mxge pci
|
||||||
dev/mxge/mxge_rss_eth_z8e.c optional mxge pci
|
dev/mxge/mxge_rss_eth_z8e.c optional mxge pci
|
||||||
|
@ -47,7 +47,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <sys/sx.h>
|
#include <sys/sx.h>
|
||||||
#include <sys/taskqueue.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.h>
|
||||||
#include <net/if_var.h>
|
#include <net/if_var.h>
|
||||||
@ -683,22 +684,6 @@ mxge_validate_firmware(mxge_softc_t *sc, const mcp_gen_header_t *hdr)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
static int
|
||||||
mxge_load_firmware_helper(mxge_softc_t *sc, uint32_t *limit)
|
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 *limit)
|
|||||||
|
|
||||||
/* setup zlib and decompress f/w */
|
/* setup zlib and decompress f/w */
|
||||||
bzero(&zs, sizeof (zs));
|
bzero(&zs, sizeof (zs));
|
||||||
zs.zalloc = z_alloc;
|
zs.zalloc = zcalloc_nowait;
|
||||||
zs.zfree = z_free;
|
zs.zfree = zcfree;
|
||||||
status = inflateInit(&zs);
|
status = inflateInit(&zs);
|
||||||
if (status != Z_OK) {
|
if (status != Z_OK) {
|
||||||
status = EIO;
|
status = EIO;
|
||||||
|
@ -5,4 +5,6 @@
|
|||||||
KMOD= if_mxge
|
KMOD= if_mxge
|
||||||
SRCS= if_mxge.c device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h
|
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>
|
.include <bsd.kmod.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user