Re: [PATCH] stmmac: add DMA initialization delay to device tree

From: David Miller
Date: Mon Jun 02 2014 - 16:45:40 EST

From: Alexey Brodkin <Alexey.Brodkin@xxxxxxxxxxxx>
Date: Mon, 2 Jun 2014 19:14:09 +0000

> I understand that putting everything in DT is not a way to go.
> But a rationale for this particular patch is as follows: as I may see up
> until now everybody was happy with 100 milliseconds, but on my
> particular board connected to Gbit network I see that more than a second
> is required for DMA to initialize. If I connect the same board to 100
> Mbit network then initialization delay could be up to 2.5 seconds.
> So I may definitely bump the delay to say 3 seconds, but what if another
> user needs even more?
> On the other hand those who are happy now with 100 msec delay may be be
> disappointed in case of failure and frozen for N seconds board waiting
> for timeout.
> If you think that delay for a few seconds in case of initialization
> failure is acceptable then I will submit a patch that increases delay to
> 3 seconds (personally I haven't seen longer init times).

Stop right there.

We are doing synchronous delays here, without sleeping, and if that takes
seconds it is totally unacceptable.

You'll first have to convert this code to use msleep() or similar.

Second, if the chip hangs nobody cares if there is a 3 second pause, it's
error recovery.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at