Patchwork [4/5,net-next] tg3: Set initial carrier state to off.

login
register
mail settings
Submitter Michael Chan
Date Feb. 14, 2013, 10:13 p.m.
Message ID <1360880022-12856-4-git-send-email-mchan@broadcom.com>
Download mbox | patch
Permalink /patch/220531/
State Accepted
Delegated to: David Miller
Headers show

Comments

Michael Chan - Feb. 14, 2013, 10:13 p.m.
Before the device is opened, the carrier state should be off.  It
will not race with the link interrupt if we set it before calling
register_netdev().

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/ethernet/broadcom/tg3.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 7ac0bd0..3829321 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -16902,6 +16902,8 @@  static int tg3_init_one(struct pci_dev *pdev,
 
 	tg3_timer_init(tp);
 
+	tg3_carrier_off(tp);
+
 	err = register_netdev(dev);
 	if (err) {
 		dev_err(&pdev->dev, "Cannot register net device, aborting\n");