Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9390988rwd; Wed, 21 Jun 2023 06:59:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7T+PBknc0am2AqLzx0yHWEbzWnkGXH5Mide24x4cN96i5QzQVqT99Eoan9gQo17SywhKc1 X-Received: by 2002:a17:903:22c4:b0:1b1:1168:656b with SMTP id y4-20020a17090322c400b001b11168656bmr22762196plg.26.1687355952221; Wed, 21 Jun 2023 06:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687355952; cv=none; d=google.com; s=arc-20160816; b=v7aic5hFq9yGvngs/K/81Yj4JyhAOYCkdsTQuBRMEDFidQgeSd98oTsLxJXboyrhSk f5gK9UlBtpMvSl144Ssq+qffFc6kKr3xclcXxNfvjahgnRXgkAHF/WPQRyEjVp3gNEbg njo036qJWLXxcDI7OlamaV1NQdsOo1Iycox3JcM0rIypT0fBFbbKwCrrVTpGXs9blsXP vRLZ4lO/SK2oRt91FfQRt2vXvR6iJKD1J9BFhBA+qk7KHvSAH3piyUB8VbGmiOIoq9Nl iTF3hBhLytmE/hg6IuxuqtBqqqICVN1I/GAOzVy/PQ8SA1YHet489Pyo+O9o/KTyV022 RP3g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=TGiINbu7foWgaD89gaNM9RV3a9vEUoSjU+97idyE2Co=; b=CsKTxNxsszuUY1Yg+5eFUhUMigryQgwlcbC4cczVgLLmFmjblEZa4jlUfDhV6Y5UYc bSjsf527am4iUiGbQGDK4xLkk+QAzGqFkMEajkQrVpS18JmWvBxualu9PznkL32a1KAf cNvQKy2Pj0U5TgE/bP3ojWOzkigUEplsn55h1s8hYkDwwf3Gc5hdxVvfQ4h6fk/dfApa jM/HGxh3IgfM2GAPeX9A8u0mV6h7skECBMniu0ih1L2bvOq5lXzbUmsDB3x3z9jDFcDq X0EyzOUiqloZiMLiPFu518hJa9zWb/pW2nEL8JvHRQNMTHG7ZzTeLtnyLA8VqMcOBD8G lg2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=G5MLNwrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a170902a50600b001b55f047727si4019423plq.36.2023.06.21.06.58.58; Wed, 21 Jun 2023 06:59:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=G5MLNwrM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231708AbjFUNzx (ORCPT + 99 others); Wed, 21 Jun 2023 09:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231807AbjFUNzu (ORCPT ); Wed, 21 Jun 2023 09:55:50 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AAD3199E for ; Wed, 21 Jun 2023 06:55:46 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f9bece8e19so8464205e9.1 for ; Wed, 21 Jun 2023 06:55:46 -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=eKbu/0a648+oA7zlDTQSMhD0v0jKJ/WLN3f0QTDtiFeh0FonADLfg1dnNOwEeb7hDd WMvv29oYMMd1y+Us3reE/fKGCzE+QjUNy7Nxz+bgggRih6u5kEjohBXKN/79GslASAED G2NRC5A+O++TDxr3JHlx4y14LNZlqdeaydHZzCiWiqqmDi5BGKCvhaapABDXPECBMEwH IwKZj3DVWedCoZtsPvpC3Ekaq4v9VTgAxMSW7U86KpLT13kRaCrDf6+f45kcdcLQQ3ki akRBLME5/4qr0EV7Ez4NE8EKpeBSrWE1wDm+4D5T8OLvnQFGh1TMJlhcfPAEWJlKiwqz pKGg== X-Gm-Message-State: AC+VfDx4B7Vs04EjXqVeBmwe3Ws+B5oj87g1joK3qLxCFWc4dTx+Zd0B slREXtGa1K3e16+1fQau2qqY1w== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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: 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 --- 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 -- 2.39.2