Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2758581rwl; Thu, 13 Apr 2023 10:24:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bEbyqHDwS1Z/olBY1dUwwYn0+ym7b5VaZuudH/FqcVKumU7llMKrD5mB+MIIJXNNlcIkrx X-Received: by 2002:a17:90a:ad82:b0:23f:dd27:169b with SMTP id s2-20020a17090aad8200b0023fdd27169bmr2734186pjq.2.1681406688086; Thu, 13 Apr 2023 10:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681406688; cv=none; d=google.com; s=arc-20160816; b=eIwI1WX3JUrjSXTyeNldI8at5eDlSKB1cuT4JvV8K5Lql86VRZxyts9zkV6n2LiMWD gHvyjwd48cKqjBS8Mtwu5kC2H6ul/eaOTzK4yQ/eoTVY3oZ1QuEvdBYkLewGE/Dm/TAM r6fk/4XTceZEz2riPAmDB5GBTenuXSt6/bP8pntiQQQ9VZaJQf6V9xM7OG15isJMXSst 80ZyWSd/qhzjJ1CU7QqVGtxgPkYnkSB/cF6QoNUnPANMW/7np85gfePmNpdM33iPMQwv YxMzvhxX8iJyKlnCyqi3Gx8YXLs/L81K5eLMqKAJDt6gMG2x5h+FoIP+11f091oH07lw EIVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=if+eweMpKSPw4ABoMbVMDGxTF36ZdVsMnlzvEryPtKs=; b=WltJRtx7NKfmCS7kTBpU/Hi8xIwOn17ZuVg8UOWAdCKujZWxMCkLMwLNsuUwBgM6mg SJRN+l83swr1RyyDrPA7dcQUbB7Wwrhk6NeHAKm3RrYKhBxrfTYP/U8W3oh2sJkitcN/ hGPAJa0Up1eOJ3Ml8e1GLCCm6CR7CwLZatYXrktoyYr6Jjbs8eqrqNYCjOTGHjX+IX3r dz8WnIVUq80ZLmqKBemIvJzCdhDK0x8kSietgtQUpb7r05ZgkzTs3Su04f6pkf46BFKV 6jlQx4IyU7CzlUE3icQRE9fpRVSys2RPZx4bQk2rKXe2SlDXbfxcnkzJVDXcyw/DrIvM wR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="qaKN/MLn"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw2-20020a17090b128200b0022c24bf1810si2454561pjb.29.2023.04.13.10.24.35; Thu, 13 Apr 2023 10:24:48 -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=@gmail.com header.s=20221208 header.b="qaKN/MLn"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjDMRQC (ORCPT + 99 others); Thu, 13 Apr 2023 13:16:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjDMRQB (ORCPT ); Thu, 13 Apr 2023 13:16:01 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74E444EF2; Thu, 13 Apr 2023 10:16:00 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id e3so4255140qtm.12; Thu, 13 Apr 2023 10:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681406159; x=1683998159; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=if+eweMpKSPw4ABoMbVMDGxTF36ZdVsMnlzvEryPtKs=; b=qaKN/MLnxUQcthWApLlSBdpvdv19s0p1x5z3lzpzzTx39vs2YbBJuNZbeLJJNOyIBb nF08e0k6lCQdQxMo4kEO+mgaVZq/sB/9MRvuc/8Zf49lDZqb6W0YtcNZI4p+dL0wilVB oAsj09HuNSwVfIkNtNn+wE4mruVGQB3YeAlIs/vO1/1ZRLLLj/EFIP1IlI4btLXQT8P8 cZxEJ1tjQ4+BXgJoufO10gwKWBi8R77KYbhZ3pnwnzNUyn8c4xMFMAKhiOlC/JJNnCcq XdnNVdemEije4GM33zv9zZiwPaNC2r2laF6ICKWlRutbXfzah5Uh5nVnj5npEaNZ0oF2 cscA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681406159; x=1683998159; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=if+eweMpKSPw4ABoMbVMDGxTF36ZdVsMnlzvEryPtKs=; b=OyNLsVp9C93ZU7//BNvLFW3XC+MRLjzMf4nugc+e2QzqY0exUR+FAyT8aOFIOHZpat Vhff8Vhb3nbiClkWbEh5OJFyYYDqPDggpgv7ie0RQ4qOTnJWuHsUWNmPs89DCJETOgCE iLGZWvXqgXmg+VWY5EikRJ5NOy3CJew7m3DgLbZEYLb0nRizb7mQ0+DXt3xXM03u6bXb +SuGDD3QcTu2E/uQOe05UrbNJK7h5tfT4eu6uz4YUekQg+96n7BQRsb40h11mhodrBym E0JpEbfqAKaXPUgFH4bkGF+IWqXSND+qVwazMK7+3jt2eTtPivPwYwdfQzkKsi2kzn5i 2HnQ== X-Gm-Message-State: AAQBX9fR9tP2fT0mpLc9ZvAzscMEgB2FGQGYSLDwLONvQaM36T0RLY5d YGEzFCqZ4yDxTXzQQhcUbuM= X-Received: by 2002:a05:622a:120c:b0:3e4:e9c9:df70 with SMTP id y12-20020a05622a120c00b003e4e9c9df70mr3529740qtx.10.1681406159380; Thu, 13 Apr 2023 10:15:59 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id bk37-20020a05620a1a2500b0074add69317bsm109446qkb.121.2023.04.13.10.15.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Apr 2023 10:15:58 -0700 (PDT) Message-ID: <298c045a-5438-6761-46d8-c46c57989812@gmail.com> Date: Thu, 13 Apr 2023 10:15:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH net-next v4] net: stmmac:fix system hang when setting up tag_8021q VLAN for DSA ports Content-Language: en-US To: Jacob Keller , Yan Wang , davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, kuba@kernel.org, mcoquelin.stm32@gmail.com Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "open list:STMMAC ETHERNET DRIVER" , "moderated list:ARM/STM32 ARCHITECTURE" , "moderated list:ARM/STM32 ARCHITECTURE" , open list References: <01ef9d4f-d2dc-d584-4733-798cffda49a1@intel.com> From: Florian Fainelli In-Reply-To: <01ef9d4f-d2dc-d584-4733-798cffda49a1@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On 4/13/23 10:07, Jacob Keller wrote: > > > On 4/13/2023 8:06 AM, Yan Wang wrote: >> The system hang because of dsa_tag_8021q_port_setup()-> >> stmmac_vlan_rx_add_vid(). >> >> I found in stmmac_drv_probe() that cailing pm_runtime_put() >> disabled the clock. >> >> First, when the kernel is compiled with CONFIG_PM=y,The stmmac's >> resume/suspend is active. >> >> Secondly,stmmac as DSA master,the dsa_tag_8021q_port_setup() function >> will callback stmmac_vlan_rx_add_vid when DSA dirver starts. However, >> The system is hanged for the stmmac_vlan_rx_add_vid() accesses its >> registers after stmmac's clock is closed. >> >> I would suggest adding the pm_runtime_resume_and_get() to the >> stmmac_vlan_rx_add_vid().This guarantees that resuming clock output >> while in use. >> >> Signed-off-by: Yan Wang > > This looks identical to the net fix you posted at [1]. I don't think we > need both? > > [1]: > https://lore.kernel.org/netdev/KL1PR01MB5448020DE191340AE64530B0E6989@KL1PR01MB5448.apcprd01.prod.exchangelabs.com/ Unfortunately both still lack a proper Fixes: tag, and this is bug fix. -- Florian