Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361117
b: refs/heads/master
c: 84421b9
h: refs/heads/master
i:
  361115: bfef1b7
v: v3
  • Loading branch information
Nithin Sujir authored and David S. Miller committed Mar 8, 2013
1 parent 22ad034 commit 470219a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ddf64354af4a702ee0b85d0a285ba74c7278a460
refs/heads/master: 84421b99cedc3443e76d2a594f3c815d5cb9a8e1
14 changes: 5 additions & 9 deletions trunk/drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,8 @@ static void tg3_link_report(struct tg3 *tp)

tg3_ump_link_report(tp);
}

tp->link_up = netif_carrier_ok(tp->dev);
}

static u16 tg3_advert_flowctrl_1000X(u8 flow_ctrl)
Expand Down Expand Up @@ -2522,12 +2524,6 @@ static int tg3_phy_reset_5703_4_5(struct tg3 *tp)
return err;
}

static void tg3_carrier_on(struct tg3 *tp)
{
netif_carrier_on(tp->dev);
tp->link_up = true;
}

static void tg3_carrier_off(struct tg3 *tp)
{
netif_carrier_off(tp->dev);
Expand All @@ -2553,7 +2549,7 @@ static int tg3_phy_reset(struct tg3 *tp)
return -EBUSY;

if (netif_running(tp->dev) && tp->link_up) {
tg3_carrier_off(tp);
netif_carrier_off(tp->dev);
tg3_link_report(tp);
}

Expand Down Expand Up @@ -4262,9 +4258,9 @@ static bool tg3_test_and_report_link_chg(struct tg3 *tp, int curr_link_up)
{
if (curr_link_up != tp->link_up) {
if (curr_link_up) {
tg3_carrier_on(tp);
netif_carrier_on(tp->dev);
} else {
tg3_carrier_off(tp);
netif_carrier_off(tp->dev);
if (tp->phy_flags & TG3_PHYFLG_MII_SERDES)
tp->phy_flags &= ~TG3_PHYFLG_PARALLEL_DETECT;
}
Expand Down

0 comments on commit 470219a

Please sign in to comment.