netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lutomirski <amluto@gmail.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@intel.com>
Cc: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] Tell linkwatch about new interfaces
Date: Sat, 11 Apr 2009 11:46:00 -0400	[thread overview]
Message-ID: <cb0375e10904110846k53bd5edbvb9fc9f6ff43bc97c@mail.gmail.com> (raw)
In-Reply-To: <alpine.WNT.2.00.0904091128270.6048@jbrandeb-desk1.amr.corp.intel.com>

On Thu, Apr 9, 2009 at 8:48 PM, Brandeburg, Jesse
<jesse.brandeburg@intel.com> wrote:
>
> does this patch also fix the issue?

Yes.

2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN qlen 1000

Tested-by: Andy Lutomirski <amluto@gmail.com>

The link operational states are still funny, though:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
3: wmaster0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UNKNOWN qlen 1000

It looks like all interfaces that don't call netif_carrier_down after
registration end up in UNKNOWN until something happens.  The case of
carrier_on but UNKNOWN doesn't seem to confuse my userspace, but it's
still odd.

--Andy

>
> ===== begin =====
>
> e1000e: indicate link down at load
>
> From: Jesse Brandeburg <jesse.brandeburg@intel.com>
>
> same kind of patch as e1000, let driver explicitly push link state
> once link comes up.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
>
>  drivers/net/e1000e/netdev.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
> index fb78278..6a0411e 100644
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
> @@ -3072,6 +3072,8 @@ static int e1000_open(struct net_device *netdev)
>        if (test_bit(__E1000_TESTING, &adapter->state))
>                return -EBUSY;
>
> +       netif_carrier_off(netdev);
> +
>        /* allocate transmit descriptors */
>        err = e1000e_setup_tx_resources(adapter);
>        if (err)
> @@ -5006,10 +5008,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
>        if (!(adapter->flags & FLAG_HAS_AMT))
>                e1000_get_hw_control(adapter);
>
> -       /* tell the stack to leave us alone until e1000_open() is called */
> -       netif_carrier_off(netdev);
> -       netif_tx_stop_all_queues(netdev);
> -
>        strcpy(netdev->name, "eth%d");
>        err = register_netdev(netdev);
>        if (err)
>

  reply	other threads:[~2009-04-11 15:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 15:40 [PATCH 1/1] Tell linkwatch about new interfaces Andrew Lutomirski
2009-04-05  0:05 ` David Miller
2009-04-05  4:00   ` Andrew Lutomirski
2009-04-10  0:48     ` Brandeburg, Jesse
2009-04-11 15:46       ` Andrew Lutomirski [this message]
2009-04-13 23:22       ` David Miller
2009-04-14  7:43         ` Jeff Kirsher
2009-07-14 17:17   ` Sergio Luis
2009-07-14 18:33     ` David Miller
2009-07-14 18:37       ` Sergio Luis
2009-07-14 18:58       ` Andrew Lutomirski

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=cb0375e10904110846k53bd5edbvb9fc9f6ff43bc97c@mail.gmail.com \
    --to=amluto@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=linux-kernel@vger.kernel.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 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).