aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/myri10ge')
-rw-r--r--drivers/net/myri10ge/myri10ge.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 4867837bc1be..e510f9b15be9 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1156,9 +1156,11 @@ static inline void myri10ge_check_statblock(struct myri10ge_priv *mgp)
1156 struct mcp_irq_data *stats = mgp->fw_stats; 1156 struct mcp_irq_data *stats = mgp->fw_stats;
1157 1157
1158 if (unlikely(stats->stats_updated)) { 1158 if (unlikely(stats->stats_updated)) {
1159 if (mgp->link_state != stats->link_up) { 1159 unsigned link_up = ntohl(stats->link_up);
1160 mgp->link_state = stats->link_up; 1160 if (mgp->link_state != link_up) {
1161 if (mgp->link_state) { 1161 mgp->link_state = link_up;
1162
1163 if (mgp->link_state == MXGEFW_LINK_UP) {
1162 if (netif_msg_link(mgp)) 1164 if (netif_msg_link(mgp))
1163 printk(KERN_INFO 1165 printk(KERN_INFO
1164 "myri10ge: %s: link up\n", 1166 "myri10ge: %s: link up\n",
@@ -1168,8 +1170,11 @@ static inline void myri10ge_check_statblock(struct myri10ge_priv *mgp)
1168 } else { 1170 } else {
1169 if (netif_msg_link(mgp)) 1171 if (netif_msg_link(mgp))
1170 printk(KERN_INFO 1172 printk(KERN_INFO
1171 "myri10ge: %s: link down\n", 1173 "myri10ge: %s: link %s\n",
1172 mgp->dev->name); 1174 mgp->dev->name,
1175 (link_up == MXGEFW_LINK_MYRINET ?
1176 "mismatch (Myrinet detected)" :
1177 "down"));
1173 netif_carrier_off(mgp->dev); 1178 netif_carrier_off(mgp->dev);
1174 mgp->link_changes++; 1179 mgp->link_changes++;
1175 } 1180 }