From owner-svn-src-all@freebsd.org Sat Aug 3 03:36:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4DA6A4DC0; Sat, 3 Aug 2019 03:36:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 460qSg5GX8z3MFx; Sat, 3 Aug 2019 03:36:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96539CFEF; Sat, 3 Aug 2019 03:36:19 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x733aJPT067841; Sat, 3 Aug 2019 03:36:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x733aI37067837; Sat, 3 Aug 2019 03:36:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201908030336.x733aI37067837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 3 Aug 2019 03:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350554 - in head: share/man/man4 sys/conf sys/dev/mxge sys/modules/mxge/mxge X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head: share/man/man4 sys/conf sys/dev/mxge sys/modules/mxge/mxge X-SVN-Commit-Revision: 350554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2019 03:36:19 -0000 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 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 #include #include -#include +#include +#include #include #include @@ -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