From patchwork Wed Jun 21 13:55:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13287372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0643EB64D7 for ; Wed, 21 Jun 2023 13:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5i2X8uJYcsouhtqU521kuOznEN8xpE3TAOBq0FP/7Ds=; b=ynBc3Vto6uBG5h phw9NhbGNx4HkJ2jeu+rXjEUDhL0WfOryHSGF1pmcquXCzf/4FtUjj/JA0ohOfcEQIY4hrLTCh4t5 UZkuzEM/FhF3n3B9O4A3xj/gqr/AGnTSjXKpKF8JCSm0sFsuiZJGf77k4K2DU2SXm2gTcCtD7bIyU BRVhhpwJMsRuUduithhzmC0Lz8dDq/g0DqK3AJRN2L1H9gnlPUMdpi+PsilqjytCxnv/7VcrvaEaB C9763nddABm+7PrwQ4JxXaT5PWBmt5xZeQuTbmpbjnmLd+FvGgyIqvkzrB7T+QNtX59/uJLZ+02qI 2jGCXdmPQSj4GhTpQI0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qByJJ-00Ek9W-12; Wed, 21 Jun 2023 13:55:49 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qByJH-00Ek8N-0Z for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2023 13:55:48 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f8f3786f20so69718755e9.2 for ; Wed, 21 Jun 2023 06:55:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687355744; x=1689947744; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TGiINbu7foWgaD89gaNM9RV3a9vEUoSjU+97idyE2Co=; b=G5MLNwrMO/ygECl2UrKnTU4hYZAPfCguFUUBoqVRG3tRN7Vb04To5n0wDzGBF6f9uu SrAyU1MPLRIzDsEAZZzVc3u9m29IKIkNND81q1leCLtwqeXIqNaoqKGegINEEVVhbawA lExWWKmCn1a/dyqWCjd/GKB31g6qHiPLXntc6CxZGa0j3MtIG9oO/SDZMLwTiUdNZw9w mEuKhbpeXSqFRWSbmSWMxJ2wNF63e7yMjAtS8xw4UircxJRfc2yFhtDsx9nR76005mya rFBm0l+tgvZwCeuNJklbDwxyzx8/AjGTKlDRwZY325eNt4a324SQDVm8GJNdTefEaaAw eoUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687355744; x=1689947744; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TGiINbu7foWgaD89gaNM9RV3a9vEUoSjU+97idyE2Co=; b=ZHEKESgQNohnckHzRznl9FCog6aeF4L+8NzBHj1KXDbym/r49mKOoPynd080EUtK3i 55OzedmLnTisTOgvAlpTWF+KxXkb22wWhsvpoj18KVIbfHDxQWuqHnULueAN90KzLsLk 63sKlE+vyl679peY7EB8MMIbtGHgpqDi6XmhTTrFIAnZ9fd4rSy3boE3Kt6oT6//hXA+ Waa9Vr+sphC/9RTAeTKR29WSqbahdu097i3bnJjidRqXvPnNb03IRtF6gK3nkaoML4il Nu666ecyScLASqunqkaI8ixIv+4Y3S2QuMuYFo9X3Cbycr5EY+kvdSved+CU4sh1P1AI tP0w== X-Gm-Message-State: AC+VfDyg8X60wVpk3ACPVyrhzCL/EyyRaRaH9qDM134MmaTvGovUooSJ Gpp+BAqg4obt07dWRsknQhrABA== X-Google-Smtp-Source: ACHHUZ6lpAkKw4lUE1mi/nl5WQy66Jmf4UjvJOEHqcX5UnW2U7zvUnOOSSgljBc/dyx9VV5dVySgcw== X-Received: by 2002:a05:600c:22c6:b0:3f9:b244:c294 with SMTP id 6-20020a05600c22c600b003f9b244c294mr8259781wmg.35.1687355744011; Wed, 21 Jun 2023 06:55:44 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:a69f:8ee3:6907:ccdf]) by smtp.gmail.com with ESMTPSA id y7-20020a1c4b07000000b003f17848673fsm5069294wma.27.2023.06.21.06.55.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 06:55:43 -0700 (PDT) From: Bartosz Golaszewski To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Junxiao Chang Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH net] net: stmmac: fix double serdes powerdown Date: Wed, 21 Jun 2023 15:55:37 +0200 Message-Id: <20230621135537.376649-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230621_065547_403129_BD88564A X-CRM114-Status: GOOD ( 10.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski Commit 49725ffc15fc ("net: stmmac: power up/down serdes in stmmac_open/release") correctly added a call to the serdes_powerdown() callback to stmmac_release() but did not remove the one from stmmac_remove() which leads to a doubled call to serdes_powerdown(). This can lead to all kinds of problems: in the case of the qcom ethqos driver, it caused an unbalanced regulator disable splat. Fixes: 49725ffc15fc ("net: stmmac: power up/down serdes in stmmac_open/release") Signed-off-by: Bartosz Golaszewski Reviewed-by: Jiri Pirko Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney Acked-by: Junxiao Chang Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 10e8a5606ba6..4727f7be4f86 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7461,12 +7461,6 @@ void stmmac_dvr_remove(struct device *dev) netif_carrier_off(ndev); unregister_netdev(ndev); - /* Serdes power down needs to happen after VLAN filter - * is deleted that is triggered by unregister_netdev(). - */ - if (priv->plat->serdes_powerdown) - priv->plat->serdes_powerdown(ndev, priv->plat->bsp_priv); - #ifdef CONFIG_DEBUG_FS stmmac_exit_fs(ndev); #endif