netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bnx2: Fix the behavior of ethtool when ONBOOT=no
@ 2009-06-24  2:57 Naohiro Ooiwa
  2009-06-24  3:48 ` Michael Chan
  2009-06-24 16:43 ` Rick Jones
  0 siblings, 2 replies; 19+ messages in thread
From: Naohiro Ooiwa @ 2009-06-24  2:57 UTC (permalink / raw)
  To: mchan; +Cc: netdev

Hi Michael

I found a little bug.

When configure in ifcfg-eth* is ONBOOT=no,
the behavior of ethtool command is wrong.

    # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
    ONBOOT=no
    # ethtool eth2 | tail -n1
            Link detected: yes

I think "Link detected" should be "no".

The bnx2 driver should run netif_carrier_off() in initialization
until bnx2_open() is called.

The following is my patch.
It move netif_carrier_off() to bnx2_init_one().
I had already tested this patch. The result is good for me.

Could you please check the my patch ?


Best Regards,
Naohiro Ooiwa


Signed-off-by: Naohiro Ooiwa <nooiwa@meriraclelinux.com>
---
 drivers/net/bnx2.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 38f1c33..9eee986 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6151,8 +6151,6 @@ bnx2_open(struct net_device *dev)
 	struct bnx2 *bp = netdev_priv(dev);
 	int rc;

-	netif_carrier_off(dev);
-
 	bnx2_set_power_state(bp, PCI_D0);
 	bnx2_disable_int(bp);

@@ -8066,6 +8064,9 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (CHIP_NUM(bp) == CHIP_NUM_5709)
 		dev->features |= NETIF_F_TSO6;

+	/* Should set nocarrier until bnx2_open() is called */
+	netif_carrier_off(dev);
+
 	if ((rc = register_netdev(dev))) {
 		dev_err(&pdev->dev, "Cannot register net device\n");
 		goto error;
-- 
1.5.4.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-07-02  4:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24  2:57 [PATCH] bnx2: Fix the behavior of ethtool when ONBOOT=no Naohiro Ooiwa
2009-06-24  3:48 ` Michael Chan
2009-06-24  4:43   ` Naohiro Ooiwa
2009-06-24  5:04     ` Michael Chan
2009-06-24  5:45       ` Naohiro Ooiwa
2009-06-24  7:08         ` David Miller
2009-06-24  7:16           ` David Miller
2009-06-24  8:39             ` Naohiro Ooiwa
2009-06-24 16:43 ` Rick Jones
2009-06-24 16:59   ` Michael Chan
2009-06-24 23:42     ` David Miller
2009-06-24 23:48       ` Michael Chan
2009-06-25  0:12         ` David Miller
2009-06-25  0:25           ` David Miller
2009-06-26  4:30             ` Naohiro Ooiwa
2009-06-29  0:49     ` Naohiro Ooiwa
2009-06-30 14:50       ` Eilon Greenstein
2009-06-30 19:46         ` David Miller
2009-07-02  4:46           ` Naohiro Ooiwa

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).