All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Micha Nelissen <micha@neli.hopto.org>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH v3] ipconfig wait for carrier
Date: Thu, 19 May 2011 14:32:47 -0500	[thread overview]
Message-ID: <1305833568.3271.27.camel@dcbw.foobar.com> (raw)
In-Reply-To: <4DD56701.8040007@neli.hopto.org>

On Thu, 2011-05-19 at 20:52 +0200, Micha Nelissen wrote:
> Dan Williams wrote:
> > On Wed, 2011-05-18 at 18:14 -0400, David Miller wrote:
> >> Please fix ic_is_init_dev() to return a proper boolean "false" instead
> >> of "0" when IFF_LOOPBACK is set.
> 
> Ok. Had an int before, but boolean is better.
> 
> > Shouldn't the code still wait at *least* one second?  Not all drivers
> > support carrier detect, and those that don't set the carrier always-on.
> > Thus older devices that used to have 1s to get carrier in line (even if
> > they don't report it) now have only 10ms.
> > 
> > I think it should wait at least one second like the code currently does,
> > and then if the carrier still isn't up, wait longer.
> 
> What is the 1 second based on?
> 
> If a driver does not support carrier detect, then this code will wait
> for the timeout period. Or do those older drivers set carrier detect
> immediately when device is probed?

Older devices that do not support carrier detect have the carrier always
on, ie IFF_RUNNING is always set, and netif_carrier_ok() always returns
1.  There is currently no way to determine whether a device supports
carrier detection or not, since drivers do not set a flag anywhere to
that effect (though I'd like it if they did).

I think the bit we're talking about is the change to CONF_POST_OPEN and
the corresponding change from ssleep(1) -> msleep(10).  For drivers that
don't support carrier detect, the patch would effectively decrease the
time that these drivers have to establish a carrier (even if they don't
report it to the kernel!) from 1 second to 10ms.  Then the code in
ic_open_devs() will immediately fall down to have_carrier because these
drivers have the carrier always one.

Net result: previously there was a 1 second window for this older
hardware to establish a link, now there is a 10ms window.  That's a
behavior change that could break stuff that used to work.

Dan

> Micha
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2011-05-19 19:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14 20:36 [PATCH] ipconfig wait for carrier Micha Nelissen
2011-05-16 18:02 ` David Miller
2011-05-17 21:48 ` [PATCH v2] " Micha Nelissen
2011-05-18  5:22 ` [PATCH v3] " Micha Nelissen
2011-05-18  6:07   ` David Miller
2011-05-18  6:32     ` Micha Nelissen
2011-05-18  6:37       ` David Miller
2011-05-18  6:59         ` Micha Nelissen
2011-05-18 22:14           ` David Miller
2011-05-19 15:31             ` Dan Williams
2011-05-19 18:52               ` Micha Nelissen
2011-05-19 19:32                 ` Dan Williams [this message]
2011-05-19 19:19               ` David Miller
2011-05-19 19:24               ` Micha Nelissen
2011-05-19 19:35                 ` David Miller
2011-05-19 19:39                   ` Micha Nelissen
2011-05-19 19:47                     ` David Miller
2011-05-19 19:36                 ` Dan Williams
2011-05-19 20:14 ` [PATCH v4] " Micha Nelissen
2011-05-19 20:19   ` David Miller

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=1305833568.3271.27.camel@dcbw.foobar.com \
    --to=dcbw@redhat.com \
    --cc=davem@davemloft.net \
    --cc=micha@neli.hopto.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.