netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oskar Schirmer <oskar@linutronix.de>
To: David Miller <davem@davemloft.net>
Cc: oskar@linutronix.de, netdev@vger.kernel.org,
	dan@embeddedalley.com, bigeasy@linutronix.de, hjk@linutronix.de,
	gerg@uclinux.org
Subject: Re: [PATCH] net/fec: carrier off initially to avoid root mount failure
Date: Fri, 8 Oct 2010 22:35:30 +0200	[thread overview]
Message-ID: <20101008203530.GA11926@www.tglx.de> (raw)
In-Reply-To: <20101008.103112.189689736.davem@davemloft.net>

On Fri, Oct 08, 2010 at 10:31:12 -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>
> 
> Maybe fs_enet_open() is a better place for this netif_carrier_off()
> call?

The patch is for fec, so I guess You propose fec_enet_open().

> Every open the driver probes the PHY and does phy_start().

netif_carrier handling is done in phylib properly
except with initialisation. So when asking for the most
correct place to fix this, I'ld propose phylib itself:
Shouldn't the correct carrier state be set with
phy_start_machine or phy_device_create when phy state is
set to PHY_DOWN?

Seen from this point of view, the patch I did propose is
a workaround, as much as doing it in the ndo_open, I guess.

  reply	other threads:[~2010-10-08 20:35 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 [this message]
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

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=20101008203530.GA11926@www.tglx.de \
    --to=oskar@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=dan@embeddedalley.com \
    --cc=davem@davemloft.net \
    --cc=gerg@uclinux.org \
    --cc=hjk@linutronix.de \
    --cc=netdev@vger.kernel.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).