From nobody Wed Jun 25 20:02:01 2025 X-Original-To: dev-commits-src-main@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 4bSCQL20xrz60SDt; Wed, 25 Jun 2025 20:02:02 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bSCQK6YRtz3GXT; Wed, 25 Jun 2025 20:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750881721; 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=EQZtYEUhkaUSVb4S1ul4w8qY5yv9+dkVBVjYQBsDDmU=; b=GbnGtdRIXk6jWLc2bbpVOCzsvgcNWoZN2pBWr3gcjv757U1uD3jWDekX1D35/LJoASxt5F 5yHPJ9gdTx/My46c4AcDpn4Sxh4obK/B3RjmDdmGLn1HJjgnTCWk8WhK3n/6wBp1pVNBf/ ZArDmdB1DY6QEuK/3ekv2hNTZbWbknJWCKuDQXOLXpAicffMFkiQ1Y/wchdFm/1Q3c7vTt O4L0a2aYEH2Y94zqCBtJzhB0WhebJyuCUeKYOmpYmFcgUp9B8cRgHoaTjzAGZojqsygukD fWPcnoQAXl5HhHVF1wNjZESg0SuENsm7uu+inFkGJnMeRqGk+/br0JV7N89A6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750881721; 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=EQZtYEUhkaUSVb4S1ul4w8qY5yv9+dkVBVjYQBsDDmU=; b=ulotbUHSf6YzAR4oWc8F5iw7xyQeAHdrW3titC30rIpANpJV0KNWqf0r6S9jDqYySiMUOT kPcwwKkmyFkUig/kkmPGLqNdzVj7ZTfqKgI7ns+Eg8hKXFmCyDr/zUeR06cKfNeX+lRNqW 2uzZOMUIhacJLV8pqdJqWb0BpO/2RDoPk+ibb5v2yXt2Piq9yQEcy9uirTToR0BtOWZXbD LWyu2+JAJZOpMpGyPi8MDuoa1Xc4KU0OQEeLEjY/VN/e/qxLBFuhsalQPQshrzVG9hii6Q D0W0MvfXQ/VAxEAS/juPUNPntItZESkY3PnboKRzRS5UhTjPBiOfZYrbijHdGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750881721; a=rsa-sha256; cv=none; b=dOfjn9BHB79USNO5IEORFhfAo/0MmKljLYlqLh0VKuwU8amKVaXxtnKqZs2fo9MPHfAySW StQre+7XKRHpgQuBMzCF7yBqhBMCq9Z9BAdrebdkCuLZ6ofasH9DE2whkzowLsgtc467xj QPbG0Rjrm6u9QrH4x2TiBe2KaiVbMIUOit3v1ABKzmb/rCa9jU5uYnY1u1Ok1I9hwlhbdt Xd70uk4G1W0uV7ODemdV2lB50CElfUyYe+XcaUPmtWGHTRzJViklMp1/+q5EEMGpXPEAis YxF8EWZsh8gTxubBaDqevGfdMZO2wdvIZKLwIsGgEcUpxEkAbRgp4SeokAfzpQ== 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 4bSCQK5f5dzY6f; Wed, 25 Jun 2025 20:02:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55PK218u079584; Wed, 25 Jun 2025 20:02:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55PK21NH079581; Wed, 25 Jun 2025 20:02:01 GMT (envelope-from git) Date: Wed, 25 Jun 2025 20:02:01 GMT Message-Id: <202506252002.55PK21NH079581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 0d7abc6e1f78 - main - IfAPI: Finish etherswitch driver conversions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d7abc6e1f785fa576909bbdba0a66a45be18a90 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=0d7abc6e1f785fa576909bbdba0a66a45be18a90 commit 0d7abc6e1f785fa576909bbdba0a66a45be18a90 Author: Justin Hibbits AuthorDate: 2025-02-11 21:13:36 +0000 Commit: Justin Hibbits CommitDate: 2025-06-25 19:53:13 +0000 IfAPI: Finish etherswitch driver conversions These drivers are not compiled by default, so were missed in the conversion. Sponsored by: Juniper Networks, Inc. --- sys/dev/etherswitch/arswitch/arswitch.c | 2 +- sys/dev/etherswitch/e6000sw/e6060sw.c | 8 ++++---- sys/dev/etherswitch/infineon/adm6996fc.c | 8 ++++---- sys/dev/etherswitch/micrel/ksz8995ma.c | 8 ++++---- sys/dev/etherswitch/mtkswitch/mtkswitch.c | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/dev/etherswitch/arswitch/arswitch.c b/sys/dev/etherswitch/arswitch/arswitch.c index 924793a0488f..c53c82f1750c 100644 --- a/sys/dev/etherswitch/arswitch/arswitch.c +++ b/sys/dev/etherswitch/arswitch/arswitch.c @@ -163,7 +163,7 @@ arswitch_attach_phys(struct arswitch_softc *sc) #if 0 DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(sc->miibus[phy]), - sc->ifp[phy]->if_xname); + if_name(sc->ifp[phy])); #endif if (err != 0) { device_printf(sc->sc_dev, diff --git a/sys/dev/etherswitch/e6000sw/e6060sw.c b/sys/dev/etherswitch/e6000sw/e6060sw.c index 901f887ffdc6..0af71692091c 100644 --- a/sys/dev/etherswitch/e6000sw/e6060sw.c +++ b/sys/dev/etherswitch/e6000sw/e6060sw.c @@ -214,9 +214,9 @@ e6060sw_attach_phys(struct e6060sw_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_E6060SW, M_WAITOK | M_ZERO); @@ -225,7 +225,7 @@ e6060sw_attach_phys(struct e6060sw_softc *sc) BMSR_DEFCAPMASK, phy + sc->smi_offset, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/infineon/adm6996fc.c b/sys/dev/etherswitch/infineon/adm6996fc.c index 58a3f9625d4a..fedab27c2610 100644 --- a/sys/dev/etherswitch/infineon/adm6996fc.c +++ b/sys/dev/etherswitch/infineon/adm6996fc.c @@ -173,9 +173,9 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_ADM6996FC, M_WAITOK | M_ZERO); @@ -184,7 +184,7 @@ adm6996fc_attach_phys(struct adm6996fc_softc *sc) BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/micrel/ksz8995ma.c b/sys/dev/etherswitch/micrel/ksz8995ma.c index c2ac994fe882..cbffd5e39f49 100644 --- a/sys/dev/etherswitch/micrel/ksz8995ma.c +++ b/sys/dev/etherswitch/micrel/ksz8995ma.c @@ -219,9 +219,9 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) sc->ifpport[phy] = port; sc->portphy[port] = phy; sc->ifp[port] = if_alloc(IFT_ETHER); - sc->ifp[port]->if_softc = sc; - sc->ifp[port]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[port], sc); + if_setflagbits(sc->ifp[port], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); if_initname(sc->ifp[port], name, port); sc->miibus[port] = malloc(sizeof(device_t), M_KSZ8995MA, M_WAITOK | M_ZERO); @@ -230,7 +230,7 @@ ksz8995ma_attach_phys(struct ksz8995ma_softc *sc) BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), - sc->ifp[port]->if_xname); + if_name(sc->ifp[port])); if (err != 0) { device_printf(sc->sc_dev, "attaching PHY %d failed\n", diff --git a/sys/dev/etherswitch/mtkswitch/mtkswitch.c b/sys/dev/etherswitch/mtkswitch/mtkswitch.c index 89e092d02ac4..ff7aee22398f 100644 --- a/sys/dev/etherswitch/mtkswitch/mtkswitch.c +++ b/sys/dev/etherswitch/mtkswitch/mtkswitch.c @@ -121,9 +121,9 @@ mtkswitch_attach_phys(struct mtkswitch_softc *sc) continue; } sc->ifp[phy] = if_alloc(IFT_ETHER); - sc->ifp[phy]->if_softc = sc; - sc->ifp[phy]->if_flags |= IFF_UP | IFF_BROADCAST | - IFF_DRV_RUNNING | IFF_SIMPLEX; + if_setsoftc(sc->ifp[phy], sc); + if_setflagbits(sc->ifp[phy], IFF_UP | IFF_BROADCAST | + IFF_DRV_RUNNING | IFF_SIMPLEX, 0); sc->ifname[phy] = malloc(strlen(name) + 1, M_DEVBUF, M_WAITOK); bcopy(name, sc->ifname[phy], strlen(name) + 1); if_initname(sc->ifp[phy], sc->ifname[phy], @@ -138,7 +138,7 @@ mtkswitch_attach_phys(struct mtkswitch_softc *sc) } else { DPRINTF(sc->sc_dev, "%s attached to pseudo interface " "%s\n", device_get_nameunit(sc->miibus[phy]), - sc->ifp[phy]->if_xname); + if_name(sc->ifp[phy])); } } return (err);