From: David Miller <davem@davemloft.net>
To: srinivas.kandagatla@st.com
Cc: netdev@vger.kernel.org
Subject: Re: [RFC:PATCH 3.6.0-] net/ipconfig: Extend ipconfig retries to device open
Date: Mon, 08 Oct 2012 14:14:03 -0400 (EDT) [thread overview]
Message-ID: <20121008.141403.36402742873454814.davem@davemloft.net> (raw)
In-Reply-To: <5072C961.3030807@st.com>
From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Date: Mon, 08 Oct 2012 13:38:57 +0100
> On 07/10/12 05:11, David Miller wrote:
>> From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
>> Date: Thu, 4 Oct 2012 16:38:43 +0100
>>
>>> This patch adds retries to ipconfig at device open, the reason to do
>>> this is: Lets say If some mdio bus driver decide to use defered probe
>>> when it does not find any phys on the bus. The same mdio-bus driver is
>>> re-probed as part of lateinit calls. However ipconfig also fits into
>>> lateinit calls, so if ipconfig is called before the re-probe of mdio-bus
>>> driver, the mac driver will fail to find a valid PHY on the mdio-bus.
>> Real device drivers for real devices should not probe using late
>> initcalls.
> I agree,
> Let me summarize what I did try.
>
> I wanted to use "Defered Probe Feature" which went in 3.4 kernel to
> solve a sequencing issue.
> So modified Mdio-driver accordingly, mdio-driver decided to defer its
> probe for the first-time when It could not detect any PHY's on the BUS.
> (second time) device probe is actually called in lateinit call sequence
> by "Defered Probe Code".
That's not how we probe "devices on a bus" which is the model you
should be following here to fix this bug.
Just delaying is going to run into corner cases where things do not
work. You need cooperation between bus provider and bus consumer,
full stop.
prev parent reply other threads:[~2012-10-08 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-04 15:38 [RFC:PATCH 3.6.0-] net/ipconfig: Extend ipconfig retries to device open Srinivas KANDAGATLA
2012-10-07 4:11 ` David Miller
2012-10-08 12:38 ` Srinivas KANDAGATLA
2012-10-08 18:14 ` 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=20121008.141403.36402742873454814.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=srinivas.kandagatla@st.com \
/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).