Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6008143pxb; Mon, 14 Feb 2022 13:01:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZor8xTaLaJn5BxhhDcCfQyUp2GWd7K2iGRj6MP4mKZoIVd06rRqc5vt3m2y9OnsPf3QWy X-Received: by 2002:a05:6808:14d0:: with SMTP id f16mr342307oiw.286.1644872500340; Mon, 14 Feb 2022 13:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644872500; cv=none; d=google.com; s=arc-20160816; b=Hz8eDiPFPl6UazuOON4ZecFWNa5wVMxexqeHCgJoD/6ciaNqSMphkIoqG2z6gjavBs z0jp2glElub8cLXSUDTYhHiv4yjiy2YyBxtolbslgQcnWVY5hvVK4KJIhW8DxMpKbl+L vcydb9bkw1KBFRsvtggTvj+eskJwNJO2KgHEqGX8Rd4NnCsMEH0PuaD9XZS0QaN1HmUU 1I8z4BIePiVPAAjslpf2qtGtnJ6jm+kimzsBjUA4tzcdqvxGl7peoq7YggkvgWUt480g VDMF/feb5XeEwL1ggDbj289Ywf7Qn8xajuGws6QYdC5KkzaWxSA4r9WJyxMN9h2OReX0 2fCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Lbl53r1z/KVZsaD6kYKdMFWLdsM7VWpP/7P1pbgiXZQ=; b=hY7l6+60l44Cm2J4JlPwmph5WsLhjmq3+BlQNwp4JxqX7FP8yMrLx4I6EebS5y9eUt nE5uWgtATYQ6rE1eKeJsxmw8nasZ+kpJTL0I0mVcfoTwLb3sOZqk0fAKvc1eCw/DShTi toKw9oKY/HMKdiwND9/AZ3VguffX7WVGUrkzZN/JJN46AH8XKBsbIusE3pZbpD+SVBS0 whhRqKX+8+wp8Ik7AZrzWg2dET5P428Koz46HMvQ8sMaCnLJW4pzx6howKDPpXB644FI njFYwR6xWRLxnOhffzN5o4XnnHVJXJd4Ulhvgy2PnCsuBWDy/zPlnCwukRX458a/iBMf lvhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ik1WgBk1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bc11si14502547oib.134.2022.02.14.13.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:01:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ik1WgBk1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BCF6E135487; Mon, 14 Feb 2022 12:23:54 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343854AbiBNJyk (ORCPT + 99 others); Mon, 14 Feb 2022 04:54:40 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343971AbiBNJv1 (ORCPT ); Mon, 14 Feb 2022 04:51:27 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CE56580C; Mon, 14 Feb 2022 01:42:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21AF961172; Mon, 14 Feb 2022 09:42:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEC93C340E9; Mon, 14 Feb 2022 09:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831742; bh=veH/rM47JN9wSPQuqR4WOFq5vn7iCDGrjKB+dEHAJG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ik1WgBk1w0+9jL0Tq229MyrBG/g3CeZoUs6NsFyUIR+9y85sO8Tm+rNhxHF3sO7Hb DwPcSSqeRSwk0n1hiEdNRCcE2g5XX4WGnWSwNR/0hsqNamMsAgt2exhST5b0jYYybV av+210+HCGhx218aStjqO+CTZiOB0HX4ymA8Yf7Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robert-Ionut Alexa , Ioana Ciornei , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 082/116] dpaa2-eth: unregister the netdev before disconnecting from the PHY Date: Mon, 14 Feb 2022 10:26:21 +0100 Message-Id: <20220214092501.598954427@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robert-Ionut Alexa [ Upstream commit 9ccc6e0c8959a019bb40f6b18704b142c04b19a8 ] The netdev should be unregistered before we are disconnecting from the MAC/PHY so that the dev_close callback is called and the PHY and the phylink workqueues are actually stopped before we are disconnecting and destroying the phylink instance. Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink") Signed-off-by: Robert-Ionut Alexa Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c index f06d88c471d0f..f917bc9c87969 100644 --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c @@ -4405,12 +4405,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev) #ifdef CONFIG_DEBUG_FS dpaa2_dbg_remove(priv); #endif + + unregister_netdev(net_dev); rtnl_lock(); dpaa2_eth_disconnect_mac(priv); rtnl_unlock(); - unregister_netdev(net_dev); - dpaa2_eth_dl_port_del(priv); dpaa2_eth_dl_traps_unregister(priv); dpaa2_eth_dl_unregister(priv); -- 2.34.1