From nobody Tue Mar 22 16:06:33 2022 X-Original-To: dev-commits-src-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 0BFB41A2C628; Tue, 22 Mar 2022 16:06:34 +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 4KNGZK6w0gz4pcH; Tue, 22 Mar 2022 16:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647965194; 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=zmhBxJq21CFDqWc4qhkLh11A2SKmDyCyv1MCtDrg0vc=; b=XbpXbn/5/c2sHNxxIPK3bEm+o3pLclSMlEl7H6O5Fg/rngKEXdwrbd1FbaEPQ0ZaVNWC8l dc8pShX4V/lAe/zIO8sqSBW2ROmGetRMfiGfZ3WHKwalZCYYCRthUSCilOgGiPot5O2CAB HFjS0uFzuf77HwMKhJJz2EYHxhas8P8eVSFLzCmVPKhyE5DhC4cBoMfXFTSSLgKPXprSIh 74dWBroG4hIh3HIQ13PAimYcq38mLUls49jPXolWE7ut6Fp517qBDbQwf08aX/enxTW07t UiuOdSPsmAgWKXgtMww639AePZQ0yWW0+zvtAxbjwJJoxGyGAYneXFYV1O8dPA== 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 C9070123F0; Tue, 22 Mar 2022 16:06:33 +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 22MG6X0r070613; Tue, 22 Mar 2022 16:06:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22MG6XYo070612; Tue, 22 Mar 2022 16:06:33 GMT (envelope-from git) Date: Tue, 22 Mar 2022 16:06:33 GMT Message-Id: <202203221606.22MG6XYo070612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 231237bbb0e8 - main - neta: split fixed and in-band link status configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 231237bbb0e803f9047c235cd6b5878f70e6c5eb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647965194; 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=zmhBxJq21CFDqWc4qhkLh11A2SKmDyCyv1MCtDrg0vc=; b=ock4SXsjn4ET5U3flMCmfpvikq0qDk5RFb0VWlfte22yObzDedNMGK0TrkV95pYxAs78sK hPQsidIvnolR/jVadLMfD7NMIiPzsL/WPH1KUeCe8+43oUT83sWqr826KXtSue6JhVd4yS nVdSzzPz+sIJf8dLYWTiRSrGWpyHris80omMVV0Qz/69YAn30n+EA8QOgUo8LZ4rHiSMIn jO2gsYaYwCuQF4UwlJesEtWp+3bFa/o4Rn0EgXn1MA9yACenwX2QsBEGS0TVDzc6Fnb1Iz U4Fxfo7hyHQDtePBqkZlcXNxD6K7Teul6J9icY6GKArjMgDZeCKR9kgnrHjtGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647965194; a=rsa-sha256; cv=none; b=y09KrHh1lZFpl8s8e8MqvD5Gx/yibMaFuITLPsX4qG0Dcg77kT+Y25Z3Cy2RIIkQcRZNsj JaGoU1NRi9qGK9fl3LPBuoLvW2Lbojsj1QO1EKvc6HNHNHKNQrgQYnHndv/Rd2KvnjLbBe HITF+ImWBP/srMeIXlJea+K/tIWJ/HwjEjNJ1lMtTs5aK78EB0hhynE0x1sFJdZVcjE5oG wDEisxaWVmVoGoGbRsk6sXfodqtgsAJLAnyUl/spNZZ0vGeiu7gQ9n3fiQpRMiAr7Lbvbk 31wy6wE/OK29pMvteQ+Qc8JqDciG5TeVMv/C/EjXUFbiiL1lQ2CFWVglYYGefQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=231237bbb0e803f9047c235cd6b5878f70e6c5eb commit 231237bbb0e803f9047c235cd6b5878f70e6c5eb Author: Sebastien Bini AuthorDate: 2022-03-22 15:44:09 +0000 Commit: Marcin Wojtas CommitDate: 2022-03-22 15:52:31 +0000 neta: split fixed and in-band link status configuration Fixed-link mode requires different handling than the in-band managed connection. Update interrupt, link-up/down and autonegotiation settings for the former. Reviewed by: mw MFC after: 1 week Obtained from: Stormshield Differential Revision: https://reviews.freebsd.org/D34394 --- sys/dev/neta/if_mvneta.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c index f4a5c9b52c0d..17bc7cab7115 100644 --- a/sys/dev/neta/if_mvneta.c +++ b/sys/dev/neta/if_mvneta.c @@ -1679,7 +1679,7 @@ mvneta_enable_intr(struct mvneta_softc *sc) reg |= MVNETA_PRXTXTI_PMISCICSUMMARY; MVNETA_WRITE(sc, MVNETA_PRXTXTIM, reg); - if (sc->use_inband_status) { + if (!sc->phy_attached || sc->use_inband_status) { /* Enable Port MISC Intr. (via RXTX_TH_Summary bit) */ MVNETA_WRITE(sc, MVNETA_PMIM, MVNETA_PMI_PHYSTATUSCHNG | MVNETA_PMI_LINKCHANGE | MVNETA_PMI_PSCSYNCCHANGE); @@ -1711,7 +1711,7 @@ mvneta_rxtxth_intr(void *arg) /* Ack maintance interrupt first */ if (__predict_false((ic & MVNETA_PRXTXTI_PMISCICSUMMARY) && - sc->use_inband_status)) { + (!sc->phy_attached || sc->use_inband_status))) { mvneta_sc_lock(sc); mvneta_misc_intr(sc); mvneta_sc_unlock(sc); @@ -2466,7 +2466,7 @@ mvneta_update_media(struct mvneta_softc *sc, int media) sc->autoneg = (IFM_SUBTYPE(media) == IFM_AUTO); - if (sc->use_inband_status) + if (!sc->phy_attached || sc->use_inband_status) mvneta_update_autoneg(sc, IFM_SUBTYPE(media) == IFM_AUTO); mvneta_update_eee(sc); @@ -2629,7 +2629,7 @@ mvneta_linkup(struct mvneta_softc *sc) KASSERT_SC_MTX(sc); - if (!sc->use_inband_status) { + if (!sc->phy_attached || !sc->use_inband_status) { reg = MVNETA_READ(sc, MVNETA_PANC); reg |= MVNETA_PANC_FORCELINKPASS; reg &= ~MVNETA_PANC_FORCELINKFAIL; @@ -2649,7 +2649,7 @@ mvneta_linkdown(struct mvneta_softc *sc) KASSERT_SC_MTX(sc); - if (!sc->use_inband_status) { + if (!sc->phy_attached || !sc->use_inband_status) { reg = MVNETA_READ(sc, MVNETA_PANC); reg &= ~MVNETA_PANC_FORCELINKPASS; reg |= MVNETA_PANC_FORCELINKFAIL;