public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear•com>
To: Oskar Schirmer <oskar@linutronix•de>
Cc: David Miller <davem@davemloft•net>,
	netdev@vger•kernel.org, dan@embeddedalley•com,
	bigeasy@linutronix•de, hjk@linutronix•de, gerg@uclinux•org,
	bhutchings@solarflare•com
Subject: Re: [PATCH] net/fec: carrier off initially to avoid root mount failure
Date: Mon, 11 Oct 2010 22:38:47 +1000	[thread overview]
Message-ID: <4CB30557.4020005@snapgear.com> (raw)
In-Reply-To: <20101011075420.GA17320@www.tglx.de>

On 11/10/10 17:54, Oskar Schirmer wrote:
> On Sun, Oct 10, 2010 at 21:19:56 -0700, David Miller wrote:
>> From: Oskar Schirmer<oskar@linutronix•de>
>> Date: Thu,  7 Oct 2010 14:30:30 +0200
>>
>>> with hardware slow in negotiation, the system did freeze
>>> while trying to mount root on nfs at boot time.
>>>
>>> the link state has not been initialised so network stack
>>> tried to start transmission right away. this caused instant
>>> retries, as the driver solely stated business upon link down,
>>> rendering the system unusable.
>>>
>>> notify carrier off initially to prevent transmission until
>>> phylib will report link up.
>>>
>>> Signed-off-by: Oskar Schirmer<oskar@linutronix•de>
>>
>> I did some more investigation into this situation, and for now I'm
>> going to apply your patch.  It is correct, and it also matches what
>> the only other seemingly correct driver I could find using phylib does
>> (gianfar) :-) Actually, although I didn't check, bi-modal drivers
>> (those that only use phylib for some phy types) like tg3 probably do
>> the right thing here too.
>>
>> Longer term I think the right thing to do might be:
>>
>> 1) Create some notion of "network device has managed carrier"
>>
>>     This could simply be a flag bit in the netdev or netdev_ops,
>>     or some other kind of attribute.
>>
>> 2) Managed carrier devices start with netif_carrier_off(), otherwise
>>     the device starts with netif_carrier_on().
>
> This last conditional (managed vs otherwise) would be implicit
> with a null PHY driver as Ben Hutchings proposes it to Greg Ungerers
> "allow FEC driver to not have attached PHY", 2010/10/07,
> with the null PHY simply switching to netif_carrier_on right after
> machine start.
>
> Otherwise my patch would need another #ifdef to live in
> peace with Gregs patch.

You can ignore my patch for now. I am reworking the it to
use fixed phy. It will look quite different when it is done.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg@snapgear•com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

      reply	other threads:[~2010-10-11 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 12:30 [PATCH] net/fec: carrier off initially to avoid root mount failure Oskar Schirmer
2010-10-08 17:31 ` David Miller
2010-10-08 20:35   ` Oskar Schirmer
2010-10-08 20:50     ` David Miller
2010-10-11  4:19 ` David Miller
2010-10-11  7:54   ` Oskar Schirmer
2010-10-11 12:38     ` Greg Ungerer [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=4CB30557.4020005@snapgear.com \
    --to=gerg@snapgear$(echo .)com \
    --cc=bhutchings@solarflare$(echo .)com \
    --cc=bigeasy@linutronix$(echo .)de \
    --cc=dan@embeddedalley$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=gerg@uclinux$(echo .)org \
    --cc=hjk@linutronix$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oskar@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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