Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59018
b: refs/heads/master
c: 9b1084b
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jul 11, 2007
1 parent ff70167 commit 6b73fe4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: 7b6b83474cb9bdd07dadfb7497a29c3005ad9d1d
refs/heads/master: 9b1084b8f99a6b5e97c0c9bc1b4455db4fa51a07
14 changes: 12 additions & 2 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,21 @@ bnx2_report_fw_link(struct bnx2 *bp)
REG_WR_IND(bp, bp->shmem_base + BNX2_LINK_STATUS, fw_link_status);
}

static char *
bnx2_xceiver_str(struct bnx2 *bp)
{
return ((bp->phy_port == PORT_FIBRE) ? "SerDes" :
((bp->phy_flags & PHY_SERDES_FLAG) ? "Remote Copper" :
"Copper"));
}

static void
bnx2_report_link(struct bnx2 *bp)
{
if (bp->link_up) {
netif_carrier_on(bp->dev);
printk(KERN_INFO PFX "%s NIC Link is Up, ", bp->dev->name);
printk(KERN_INFO PFX "%s NIC %s Link is Up, ", bp->dev->name,
bnx2_xceiver_str(bp));

printk("%d Mbps ", bp->line_speed);

Expand All @@ -633,7 +642,8 @@ bnx2_report_link(struct bnx2 *bp)
}
else {
netif_carrier_off(bp->dev);
printk(KERN_ERR PFX "%s NIC Link is Down\n", bp->dev->name);
printk(KERN_ERR PFX "%s NIC %s Link is Down\n", bp->dev->name,
bnx2_xceiver_str(bp));
}

bnx2_report_fw_link(bp);
Expand Down

0 comments on commit 6b73fe4

Please sign in to comment.