Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp144368rdb; Tue, 31 Oct 2023 03:32:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2zr321ke+Spv68F9RkSY4i4n7fm/SwPNudm7IR2AnOcJbPJus6E2dgeQGj+SBuTK1ePTW X-Received: by 2002:a17:902:d512:b0:1cc:4b1b:2759 with SMTP id b18-20020a170902d51200b001cc4b1b2759mr5137874plg.63.1698748347822; Tue, 31 Oct 2023 03:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698748347; cv=none; d=google.com; s=arc-20160816; b=H+k5U7erLoFgflc9A9mLI78/016uR4GUGsmVRA0ugFXFmjUk0oqpA/qhZ9cQtmUEzb f9Nf46toxlAfVGKl9GSYgcVruQGAzfvkEEjXYnQKS7T7bGgB+7TS7cSC7BvN96Oxn+SJ /XB+K/omW+/rGgdXhS5v3A6mOGqHbs5ludqYCRm9ZWHf/zoMwj6uLRyWP1F2SDNxc4PJ /tAVyZzHyevbDx+Go6adnXC5ViP5QFFwZvx0EgL3HAIi5Qjoy3L6fQGzstQ5CxCbvjPW Iwe/cC72XkP828iSdYI85V6wfqO6v1kGtEi92g2IlS+V3NH4dj1kA++7LYp9zgxpA5fb rLSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P2EcXXb07HwmX+NKag4u1J9dCkLQ+vbQgj8O5yieG1U=; fh=ypveZX4KTOPPOmNXPPYhDXHc0/LipqGkRvQ66w+cppI=; b=SSsHik37OoZRKmbDrRuzC7k3+3QaC06VQjoQxtPxoJ1uk5UpCb5w+zXoHD+ndCG+wt GXzNZXYDjukp874idc4KiToEhtpS32TsBbY0iaxvkJd21Ah2WngUMwQMTRTp4N1IWlxl uhET5FLeG96GSL52RS3wwEkKn2rQgJ9WA8Mbf4lpPUr6Qp1s9jFR3vxLLVPcfTN3iw6k NrqCtDrN0IQlfXXMLi9HCmtWpIhyM6IiTmJttCuRxfncUZ+UMj0RoocBSbFpVYSWZS1h P1ZyJEoGSpWHCUhHJ9xS+TV60C7RGvzlY+4ebHPbou+zX+yhV5e3hPAqOkKKdzurU9nw 7VMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gn51hoyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id d5-20020a170902ef0500b001bb8a57d518si833316plx.379.2023.10.31.03.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 03:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gn51hoyu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8CD67802AF03; Tue, 31 Oct 2023 03:32:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234970AbjJaKcX (ORCPT + 99 others); Tue, 31 Oct 2023 06:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234962AbjJaKcV (ORCPT ); Tue, 31 Oct 2023 06:32:21 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED72EA; Tue, 31 Oct 2023 03:32:18 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-507ad511315so7960529e87.0; Tue, 31 Oct 2023 03:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698748337; x=1699353137; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=P2EcXXb07HwmX+NKag4u1J9dCkLQ+vbQgj8O5yieG1U=; b=gn51hoyuM/0EWlEXHzWg6opqUfOEO1rFftHZsLMO+m/34c423tuE5/O25/x9jA95tE EAutpPYQiO9j4SRD4JhmoFpi76wGkrFUMrrn13rwEw7gkI89AocPy5wtXNkNeYoLCeHg JYeUpCW3rofd/5r4hO0EkSOKiGGkOL8v1KeY/NHV4j728cvzWN2vdI12Y38VHjdacI6W PpGRI8vgfsLTFMkHaStJxALqvKAQLDZeZB7JhW9BraTuPaY3t1Ilpy3IMYD+CZtoOykN W4xcoD0/8I1HYS88OCFx39nod6GoUbsFTJOMVSHFqa8zLw6Ok2PBnmk8F9ZGfd6ta1M+ ipBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698748337; x=1699353137; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=P2EcXXb07HwmX+NKag4u1J9dCkLQ+vbQgj8O5yieG1U=; b=s3fTQ+XsHDqGwyKifBpoZQqyCSFbxEGoX3YFUqtUdBH0CDW2R2/riuCj010WEG/sNO pAJLq9LQevSy3kXHTArrCDXxGpV/uAtw81ttuIOxvH0HcMGy9KnFanc1diakkys4jk/6 dvxrrUmjSJStWrxr0U/a8xHbmjqeuGjVAxj7m+ApYbczFuSfy184I0vaggkDvRjLQRo2 5QcUJ9P7+CTR79HpLbclqkXujeSMZYlnlZUaSdgZEsG+QhQIhBW0+nWw3Zm6KnrU1uLL WEXx02lFxisW1ri4R5d83hcDhF5/KvdVrG4TM7cZaSM4coEwZygsO3fe4oRFW9QjrDr8 pyGQ== X-Gm-Message-State: AOJu0Yxpr8hMw/X8yzczb8PGikGZCVwGezpdf7yIDA36CkdE8taSI8im VAGy8F25Vj/kMga0PXTYem8= X-Received: by 2002:a05:6512:312f:b0:507:9ae3:6ba7 with SMTP id p15-20020a056512312f00b005079ae36ba7mr8656903lfd.67.1698748336364; Tue, 31 Oct 2023 03:32:16 -0700 (PDT) Received: from mobilestation (srv1.baikalchip.ru. [87.245.175.227]) by smtp.gmail.com with ESMTPSA id s12-20020a056512202c00b005056fb1d6fbsm169248lfs.238.2023.10.31.03.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 03:32:15 -0700 (PDT) Date: Tue, 31 Oct 2023 13:32:13 +0300 From: Serge Semin To: Bernd Edlinger Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] net: stmmac: Wait a bit for the reset to take effect Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 03:32:26 -0700 (PDT) On Mon, Oct 30, 2023 at 07:01:11AM +0100, Bernd Edlinger wrote: > otherwise the synopsys_id value may be read out wrong, > because the GMAC_VERSION register might still be in reset > state, for at least 1 us after the reset is de-asserted. From what have you got that delay value? -Serge(y) > > Add a wait for 10 us before continuing to be on the safe side. > > Signed-off-by: Bernd Edlinger > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index 5801f4d50f95..e485f4db3605 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -7398,6 +7398,9 @@ int stmmac_dvr_probe(struct device *device, > dev_err(priv->device, "unable to bring out of ahb reset: %pe\n", > ERR_PTR(ret)); > > + /* Wait a bit for the reset to take effect */ > + udelay(10); > + > /* Init MAC and get the capabilities */ > ret = stmmac_hw_init(priv); > if (ret) > -- > 2.39.2 > >