From nobody Wed Jun 05 08:28:11 2024 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 4VvLFR3DXMz5MMvC; Wed, 05 Jun 2024 08:28:11 +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 4VvLFR1cdFz4GbH; Wed, 5 Jun 2024 08:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717576091; 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=4/02Lciu/0Nf2NCLvEmFjmoh6LG+tWmLThSwxDzXk9g=; b=PGGFgvstKCpCb4MWVoBreI8U8hknh/UJ+TJa2qTV5oHmfgw4X5fhcP7T91iz0J6YwI3H2j 3UAmSaMFenDXc3blx04BskLgSRL32T4FdBP0mrAhdSHiQ5xpav5w795rDt36bux5jppmq0 5Iu5LU1PUVyMuJSZ/+eNSogaF9FJuodwMPoTY6zT85Y2F9upBfo79uFHElrH86B2xlVhqG 2mzGhnkMIAKBImODUSstFt1u0WwI6qdlOJy+4qYoD6TU7a2UnJBAPAzSWr6rFcpdOqWKWg qa6qNbl0UqaZmHRiUYMiyTtXVsHQIzo0vC6zowxc93sBABn5DknXm8jjSYj6nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717576091; a=rsa-sha256; cv=none; b=t3qfH9upOgj97U+gdnAPG1t4++1GFKljSQxWqaQ7F2kWN+bNsZKf3PiMVGAIlipW2DIxJx +ux+i67pDf/5BxWa+C3AscKBP168/uukk9LATCI7h2hbmrTSCKk1x7Cvs3A66Z0FvZdpML VTEUq/eWo7+PIkVlenkAwPrXz2O+Ik0UZ4GYojufYxGXmXkQWfYJW8oHVTLUvNDPVfk0AX i39886mBAYQqyntU55foJocPQRdsTtfX+vkPx5YtH5As+xCVs2vCMvGvgaTb6nPTT8kMnr Gs0sBWQxk9H/UVonJYQh0j/VPiYOAHZJhLj1eWxaMVeayPCB+DL7XQZai5oh5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717576091; 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=4/02Lciu/0Nf2NCLvEmFjmoh6LG+tWmLThSwxDzXk9g=; b=qszLouJDQuaq1tdOBl+WERnwYua0it1DDRBCcUIP3mTwhq6CuNRExCamye6K/xpFgxK2Ve lWhXubMrk/jNyAI4z1+v+d2eynV38WPEzd6Zj1j6CGypaOXwDiLMBJ1YEK6uMVyL+Zyaw8 uwbTvpeLdw+fjUx4F3m/ANzexy4sBhMcAbRR6xwbtn1hKoLBbHuwIhJgAnTinMbCO79YDr QTPY6SgnwtScZxkeGEjYFLh2n0X8QCpw0O0caRhfa3AZQ46BNlGCkl/Xr747Yh0Kse9aP3 +goi/0BWeA8diFIfEatd7dkaJzkHCYQ29WMUj5NeFzXGjKcz40LkfXccEprYUg== 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 4VvLFR1F6DzvgQ; Wed, 5 Jun 2024 08:28:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4558SBYe025382; Wed, 5 Jun 2024 08:28:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4558SBjP025379; Wed, 5 Jun 2024 08:28:11 GMT (envelope-from git) Date: Wed, 5 Jun 2024 08:28:11 GMT Message-Id: <202406050828.4558SBjP025379@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 91badda4a2dd - stable/14 - eqos: Call init earlier 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 91badda4a2ddf243b654269c0689d748557d2be1 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=91badda4a2ddf243b654269c0689d748557d2be1 commit 91badda4a2ddf243b654269c0689d748557d2be1 Author: Emmanuel Vadot AuthorDate: 2023-12-11 10:29:51 +0000 Commit: Emmanuel Vadot CommitDate: 2024-06-05 08:16:33 +0000 eqos: Call init earlier Call the subclassed IF_EQOS_INIT before trying to read the mac, clocks and reset needs to dealt with before we can read the registers. (cherry picked from commit bd0771390ef532ce0ae3f39350acd540125e5620) --- sys/dev/eqos/if_eqos.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 782c8beff98e..7c0335079195 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -1119,6 +1119,9 @@ eqos_attach(device_t dev) return (ENXIO); } + if ((error = IF_EQOS_INIT(dev))) + return (error); + sc->dev = dev; ver = RD4(sc, GMAC_MAC_VERSION); userver = (ver & GMAC_MAC_VERSION_USERVER_MASK) >> @@ -1142,10 +1145,6 @@ eqos_attach(device_t dev) sc->hw_feature[2], sc->hw_feature[3]); } - - if ((error = IF_EQOS_INIT(dev))) - return (error); - mtx_init(&sc->lock, "eqos lock", MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->callout, &sc->lock, 0);