From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BAAEC43613 for ; Wed, 19 Jun 2019 21:41:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 782FE20861 for ; Wed, 19 Jun 2019 21:41:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730566AbfFSVla (ORCPT ); Wed, 19 Jun 2019 17:41:30 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:40994 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfFSVla (ORCPT ); Wed, 19 Jun 2019 17:41:30 -0400 Received: from localhost (unknown [144.121.20.163]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 48D78147D11D9; Wed, 19 Jun 2019 14:41:29 -0700 (PDT) Date: Wed, 19 Jun 2019 17:41:28 -0400 (EDT) Message-Id: <20190619.174128.213376833708672164.davem@davemloft.net> To: martin.blumenstingl@googlemail.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, joabreu@synopsys.com, alexandre.torgue@st.com, peppe.cavallaro@st.com, khilman@baylibre.com Subject: Re: [PATCH net-next v1] net: stmmac: initialize the reset delay array From: David Miller In-Reply-To: <20190618203927.5862-1-martin.blumenstingl@googlemail.com> References: <20190618203927.5862-1-martin.blumenstingl@googlemail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 19 Jun 2019 14:41:29 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Blumenstingl Date: Tue, 18 Jun 2019 22:39:27 +0200 > Commit ce4ab73ab0c27c ("net: stmmac: drop the reset delays from struct > stmmac_mdio_bus_data") moved the reset delay array from struct > stmmac_mdio_bus_data to a stack variable. > The values from the array inside struct stmmac_mdio_bus_data were > previously initialized to 0 because the struct was allocated using > devm_kzalloc(). The array on the stack has to be initialized > explicitly, else we might be reading garbage values. > > Initialize all reset delays to 0 to ensure that the values are 0 if the > "snps,reset-delays-us" property is not defined. > This fixes booting at least two boards (MIPS pistachio marduk and ARM > sun8i H2+ Orange Pi Zero). These are hanging during boot when > initializing the stmmac Ethernet controller (as found by Kernel CI). > Both have in common that they don't define the "snps,reset-delays-us" > property. > > Fixes: ce4ab73ab0c27c ("net: stmmac: drop the reset delays from struct stmmac_mdio_bus_data") > Signed-off-by: Martin Blumenstingl Applied, thanks. > Please feel free to squash this into net-next commit ce4ab73ab0c27c. We do not "squash" things into existing net-next commits, as commits in my tree(s) are permanent and immutable.