netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Alexey.Brodkin@synopsys.com
Cc: hdegoede@redhat.com, netdev@vger.kernel.org, wens@csie.org,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, peppe.cavallaro@st.com,
	Vineet.Gupta1@synopsys.com
Subject: Re: [PATCH] stmmac: add DMA initialization delay to device tree
Date: Mon, 02 Jun 2014 13:45:35 -0700 (PDT)	[thread overview]
Message-ID: <20140602.134535.1968359234490945809.davem@davemloft.net> (raw)
In-Reply-To: <1401736448.2430.10.camel@abrodkin-8560l>

From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
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.

      reply	other threads:[~2014-06-02 20:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 14:53 [PATCH] stmmac: add DMA initialization delay to device tree Alexey Brodkin
2014-06-02 18:15 ` David Miller
2014-06-02 19:14   ` Alexey Brodkin
2014-06-02 20:45     ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140602.134535.1968359234490945809.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).