diff options
author | Brice Goglin <brice@myri.com> | 2007-06-11 14:26:50 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-12 18:58:58 -0400 |
commit | 798a95dbd38b113a0f6f3bfe8a2769b261046d09 (patch) | |
tree | 58cb1556eb50a990da2c128a7c815f506de99013 /drivers/net/myri10ge/myri10ge.c | |
parent | f181137f9d70dc851dcb418cdad4df7888a0bfd3 (diff) |
myri10ge: report when the link partner is running in Myrinet mode
Since Myri-10G boards may also run in Myrinet mode instead of Ethernet,
add a message when we detect that the link partner is not running in the
right mode.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 15 |
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 | } |