From nobody Fri May 20 17:14:31 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E91BE1B343D3; Fri, 20 May 2022 17:14:31 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L4YHW4qKVz4jB8; Fri, 20 May 2022 17:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653066871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nIMzVFO0QvmbRka0JTTduRmmz3qTPN2avzPeAjZtkuI=; b=O5EmoP8i/YABHXAeOJXAkybbs6pUG55p0Ph14I0+lvc7BtVdvMvbdxzYiHVXL9qRha0pMp 5970efpwLGScG/hXGcKXQsR8t6LVAX/DdaYxShiJAYQVKqNWMzHyeq/l09U2UGx63SnLMG Ms9ZC3BLtnpaMfBONzI5Lx1UK0R0l4mO26yDaEpvWenJGvSHEMzYjtI5SzwwEj9bmArK3l 58g7g67JqaIeQCu9+dV2PIhxuQK4vnCld+HjQqiydgCBOMobaQrM/sAB1aGb8kXsFAwB8R DZeyZ+04T3PPBTSSpoFz3Iht0NDbu2xiKBMVV0xnghkxZDrLYOLfmoV4b6BqiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B80C16691; Fri, 20 May 2022 17:14:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24KHEVBE044422; Fri, 20 May 2022 17:14:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24KHEVsi044421; Fri, 20 May 2022 17:14:31 GMT (envelope-from git) Date: Fri, 20 May 2022 17:14:31 GMT Message-Id: <202205201714.24KHEVsi044421@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: John Baldwin Subject: git: 2c65b27619b4 - main - net/aquantia-atlantic-kmod: Remove unused DRIVER_MODULE devclass on recent main. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c65b27619b4a41314c9d57145a76f3d80fc0e9f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653066871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nIMzVFO0QvmbRka0JTTduRmmz3qTPN2avzPeAjZtkuI=; b=tLHqIw57s8mqMQEr/r5n9OXe/wq0xB00xS9is9faawF8kMigq/tDcOJ8AUYx0O+XiHuOAu k0xm7dryy4wNppljo5fthCfY08wTE1qwG3DAWlvV4G0U2jNvN184+THSLYHkgAOQRPdsly RGKAH1Te0J1OO0P60CYQaeOMqmapL1J01SuJpEvyvURaaOnqQCFxI835rTt5tMksPCTsjw hq5tfvPGoM4hrZuGcDuEnoyhXOdeH9zb31nkSLy/EfgLuy8XOU5nNTOI0rhXZ9ncDJ5asu fkBCT3/En1WuDF1rsV/AwfHgHppseXg7muEFyEVjm6Muw28I6aWJpOT30W0dpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653066871; a=rsa-sha256; cv=none; b=Cvfe3D5+v/67K2fL8fP9OcsbO42wlMzB3w4+YZaSIa9EDA/tdmpX7F0FBIUOT16vl26Oka Admh9enohIg0pYB2mGA9JFoYwbcsFdWIk06UBqSGmAhfNd/FU7rE447aMOVEFffQE07SVS mVIcZVG6EWPJxgg1Vl7kVhR6mgNfySRXng0xfISNuMOc3IBP74lTyFPEglcnr2Uwv6GE/4 GV4DmyJDG9vbII0zn0RVVAeSTReS70Di6phb85xB4lVLGt1p22mYn15Cx+gzPUC+tOyUbc 507GA0N+TzhORUZzyzoBHoohp8xXFNaG+DlCIHp6b4oE2JP2WMSOs+XEreAIjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb (doc, src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=2c65b27619b4a41314c9d57145a76f3d80fc0e9f commit 2c65b27619b4a41314c9d57145a76f3d80fc0e9f Author: John Baldwin AuthorDate: 2022-05-20 17:11:32 +0000 Commit: John Baldwin CommitDate: 2022-05-20 17:11:32 +0000 net/aquantia-atlantic-kmod: Remove unused DRIVER_MODULE devclass on recent main. While here, stop disabling -Werror and fix various fatal warnings on head including fixing the type of the last arg to the multiaddr callback and removing various unused variables. Reviewed by: bofh (maintainer) Differential Revision: https://reviews.freebsd.org/D35200 --- net/aquantia-atlantic-kmod/Makefile | 3 - net/aquantia-atlantic-kmod/files/patch-aq__main.c | 82 +++++++++++++++++++++-- net/aquantia-atlantic-kmod/files/patch-aq__ring.c | 23 +++++++ 3 files changed, 100 insertions(+), 8 deletions(-) diff --git a/net/aquantia-atlantic-kmod/Makefile b/net/aquantia-atlantic-kmod/Makefile index 3fb93576ff31..e0606201680c 100644 --- a/net/aquantia-atlantic-kmod/Makefile +++ b/net/aquantia-atlantic-kmod/Makefile @@ -16,9 +16,6 @@ GH_ACCOUNT= Aquantia GH_PROJECT= aqtion-freebsd GH_TAGNAME= 4816644 -# Strip -Werror from sys/conf/kmod.mk -MAKE_ENV= WERROR="" - PLIST_FILES= ${KMODDIR}/if_atlantic.ko .include diff --git a/net/aquantia-atlantic-kmod/files/patch-aq__main.c b/net/aquantia-atlantic-kmod/files/patch-aq__main.c index f99c14376bb8..1f2353725bed 100644 --- a/net/aquantia-atlantic-kmod/files/patch-aq__main.c +++ b/net/aquantia-atlantic-kmod/files/patch-aq__main.c @@ -3,12 +3,71 @@ https://github.com/Aquantia/aqtion-freebsd/pull/11 --- aq_main.c.orig 2019-09-24 14:45:34 UTC +++ aq_main.c -@@ -735,6 +735,23 @@ static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_co +@@ -193,8 +193,12 @@ static driver_t aq_driver = { + "aq", aq_methods, sizeof(struct aq_dev), + }; + ++#if __FreeBSD_version >= 1400058 ++DRIVER_MODULE(atlantic, pci, aq_driver, 0, 0); ++#else + static devclass_t aq_devclass; + DRIVER_MODULE(atlantic, pci, aq_driver, aq_devclass, 0, 0); ++#endif + + MODULE_DEPEND(atlantic, pci, 1, 1, 1); + MODULE_DEPEND(atlantic, ether, 1, 1, 1); +@@ -282,8 +286,6 @@ static struct if_shared_ctx aq_sctx_init = { + .isc_ntxd_default = {PAGE_SIZE / sizeof(aq_txc_desc_t) * 4}, + }; + +-if_shared_ctx_t aq_sctx = &aq_sctx_init; +- + /* + * TUNEABLE PARAMETERS: + */ +@@ -300,7 +302,7 @@ static void *aq_register(device_t dev) + */ + static void *aq_register(device_t dev) + { +- return (aq_sctx); ++ return (&aq_sctx_init); + } + + static int aq_if_attach_pre(if_ctx_t ctx) +@@ -417,13 +419,11 @@ static int aq_if_attach_post(if_ctx_t ctx) + static int aq_if_attach_post(if_ctx_t ctx) + { + struct aq_dev *softc; +- if_t ifp; + int rc; + + AQ_DBG_ENTER(); + + softc = iflib_get_softc(ctx); +- ifp = iflib_get_ifp(ctx); + rc = 0; + + aq_update_hw_stats(softc); +@@ -635,13 +635,11 @@ static void aq_if_init(if_ctx_t ctx) + struct aq_dev *softc; + struct aq_hw *hw; + struct ifmediareq ifmr; +- struct ifnet *ifp; + int i, err; + + AQ_DBG_ENTER(); + softc = iflib_get_softc(ctx); + hw = &softc->hw; +- ifp = iflib_get_ifp(ctx); + + err = aq_hw_init(&softc->hw, softc->hw.mac_addr, softc->msix, + softc->scctx->isc_intr == IFLIB_INTR_MSIX); +@@ -735,6 +733,23 @@ static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_co } } +#if __FreeBSD_version >= 1300054 -+static u_int aq_mc_filter_apply(void *arg, struct sockaddr_dl *dl, int count) ++static u_int aq_mc_filter_apply(void *arg, struct sockaddr_dl *dl, u_int count) +{ + struct aq_dev *softc = arg; + struct aq_hw *hw = &softc->hw; @@ -20,14 +79,14 @@ https://github.com/Aquantia/aqtion-freebsd/pull/11 + mac_addr = LLADDR(dl); + aq_hw_mac_addr_set(hw, mac_addr, count + 1); + -+ aq_log_detail("set %d mc address %6D", count + 1, mac_addr, ":"); ++ aq_log_detail("set %u mc address %6D", count + 1, mac_addr, ":"); + return (1); +} +#else static int aq_mc_filter_apply(void *arg, struct ifmultiaddr *ifma, int count) { struct aq_dev *softc = arg; -@@ -752,6 +769,7 @@ static int aq_mc_filter_apply(void *arg, struct ifmult +@@ -752,6 +767,7 @@ static int aq_mc_filter_apply(void *arg, struct ifmult aq_log_detail("set %d mc address %6D", count + 1, mac_addr, ":"); return (1); } @@ -35,7 +94,7 @@ https://github.com/Aquantia/aqtion-freebsd/pull/11 static bool aq_is_mc_promisc_required(struct aq_dev *softc) { -@@ -764,15 +782,22 @@ static void aq_if_multi_set(if_ctx_t ctx) +@@ -764,15 +780,22 @@ static void aq_if_multi_set(if_ctx_t ctx) struct ifnet *ifp = iflib_get_ifp(ctx); struct aq_hw *hw = &softc->hw; AQ_DBG_ENTER(); @@ -59,3 +118,16 @@ https://github.com/Aquantia/aqtion-freebsd/pull/11 } AQ_DBG_EXIT(0); } +@@ -825,12 +848,10 @@ static int aq_if_promisc_set(if_ctx_t ctx, int flags) + static int aq_if_promisc_set(if_ctx_t ctx, int flags) + { + struct aq_dev *softc; +- struct ifnet *ifp; + + AQ_DBG_ENTER(); + + softc = iflib_get_softc(ctx); +- ifp = iflib_get_ifp(softc->ctx); + + aq_hw_set_promisc(&softc->hw, !!(flags & IFF_PROMISC), + aq_is_vlan_promisc_required(softc), diff --git a/net/aquantia-atlantic-kmod/files/patch-aq__ring.c b/net/aquantia-atlantic-kmod/files/patch-aq__ring.c new file mode 100644 index 000000000000..bc01c89d484e --- /dev/null +++ b/net/aquantia-atlantic-kmod/files/patch-aq__ring.c @@ -0,0 +1,23 @@ +--- aq_ring.c.orig 2022-05-13 21:22:45 UTC ++++ aq_ring.c +@@ -456,8 +456,8 @@ static int aq_isc_txd_encap(void *arg, if_pkt_info_t p + aq_tx_desc_t *txd = NULL; + bus_dma_segment_t *segs; + qidx_t pidx; +- uint32_t hdrlen=0, pay_len, eop; +- uint8_t tx_cmd = 0, ct_en, ct_idx; ++ uint32_t hdrlen=0, pay_len; ++ uint8_t tx_cmd = 0; + int i, desc_count = 0; + + AQ_DBG_ENTERA("[%d] start=%d", pi->ipi_qsidx, pi->ipi_pidx); +@@ -469,9 +469,6 @@ static int aq_isc_txd_encap(void *arg, if_pkt_info_t p + AQ_DBG_PRINT("txc at 0x%p, txd at 0x%p len %d", txc, txd, pi->ipi_len); + + pay_len = pi->ipi_len; +- eop = 0; +- ct_en = 0; +- ct_idx = 0; + + txc->flags1 = 0U; + txc->flags2 = 0U;