From nobody Thu Jan 02 18:28:24 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 4YPFZd1Jctz5jndK; Thu, 02 Jan 2025 18:28:25 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YPFZc4m2Pz4ttP; Thu, 2 Jan 2025 18:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735842504; 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=S2Fccg8uRBNMuoCDIWiPNIEChnoi6bBxQWizrHjlx2c=; b=IixD1XbuYmdwqJzBVgZ1PxkQrTUt1vb6RTX7VTtthY4yJh16aWyIyTtKBm5NBwsB60g34I w9Q6F4cQD9JwSNgqopv2KWE7T7Y4wJ7UE73jSmiycx6cGjECLvXeBUprNeXZwzv6SA9zAa GaLKPbUT5uyVoBefof2TpN40DMeA/NpuYjgAsgpFIoPuF8c+R8lQlCVyAd6Y+7xxv0Gve3 xPWTkrjYxR4/CeZ2AzyU84ulzMm5CB9h4dZwDIHF9aveYiOkFmFSjJ9PkBOXP4Mb/fF8md ovpFuZJBmEFpJs/h81MdphutvCbP3YX9xOc/o/M0HFUeODcXJ3jtEe1l3u9w5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735842504; 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=S2Fccg8uRBNMuoCDIWiPNIEChnoi6bBxQWizrHjlx2c=; b=Ek0Wkgkeh4aIzM9t1J4gtGHy7SA9YSu79KuW1s8sdfyXBbwY/4FSgiu+gw7E4LeorTDksR YC6qrhalCfThLF4Ixyxboo8tLsLdaO6gdnOUQWRSo9Abz1dIV7Ta7dedcGLU2FFm4/+LaT b9rB4wWvHsx9ahWr0d/xBoVTB5IGtU0anUTWf4HH7azhIjkISRrKWHXtaiiPP3BvCFKTG7 cCt4Z6UR4NzsauflRdGbuobm1tszW9vMcRhkJ6T2tFjjVH4tNdWXAcoS37Ws+jOlgTHz49 e4PhPATjjjCiY+trMLhcQYh5/m9EeBln4P4fOgVA81c2hhJZZpMla3Vttzu3Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735842504; a=rsa-sha256; cv=none; b=xSXTcvIu1vTi2W1mREr9XVWY44+dm78I+p0MrWjHVN4jqziENHAeq0Tnh7z7+8cIVC+ACM mDKUa3ACEpxsdh81pVJwsPRiD7QDiEPAlNDzKDB3t8j0PZwVCEGodUips/WUS7+MYVHjaF +jFp9hs0HBD1i8dggz/QTVi1xkzKmErqi8PgvC5JZJKM/EsHShgcyX1WqcQ7r6q5KqMiih vGptNFZUbfe2kmmZSIFPcjceokN9nxC5PiirylGHbW1oP0+RYhBj21/U3XSLFoE1z9auFj J5vmc6Qw1g6UaNYAXBd5pkPPR4a8Y59QAs/pH2SPC8PQ+GAk8X+FkQV9kIXv8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YPFZc3yGTzpGj; Thu, 02 Jan 2025 18:28:24 +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 502ISOGU066380; Thu, 2 Jan 2025 18:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 502ISO0t066377; Thu, 2 Jan 2025 18:28:24 GMT (envelope-from git) Date: Thu, 2 Jan 2025 18:28:24 GMT Message-Id: <202501021828.502ISO0t066377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: faf0bf43df0c - main - cgem: Cleanup detaching of child miibus device 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: faf0bf43df0c2a16cbffc1e8f88f105a259c7e77 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=faf0bf43df0c2a16cbffc1e8f88f105a259c7e77 commit faf0bf43df0c2a16cbffc1e8f88f105a259c7e77 Author: John Baldwin AuthorDate: 2025-01-02 18:23:16 +0000 Commit: John Baldwin CommitDate: 2025-01-02 18:23:16 +0000 cgem: Cleanup detaching of child miibus device Move bus_generic_detach earlier in place of the existing device_delete_child. Differential Revision: https://reviews.freebsd.org/D47964 --- sys/dev/cadence/if_cgem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 67fbdf4e3fc5..4a7180fd15a4 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -1909,10 +1909,7 @@ cgem_detach(device_t dev) ether_ifdetach(sc->ifp); } - if (sc->miibus != NULL) { - device_delete_child(dev, sc->miibus); - sc->miibus = NULL; - } + bus_generic_detach(dev); /* Release resources. */ if (sc->mem_res != NULL) { @@ -1965,8 +1962,6 @@ cgem_detach(device_t dev) sc->mbuf_dma_tag = NULL; } - bus_generic_detach(dev); - if (sc->clk_tsuclk) clk_release(sc->clk_tsuclk); if (sc->clk_rxclk)