lkml.org 
[lkml]   [2019]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v1] net: stmmac: initialize the reset delay array
From
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
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 <martin.blumenstingl@googlemail.com>

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.

\
 
 \ /
  Last update: 2019-06-19 23:41    [W:0.041 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site