Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=798a95dbd38b113a0f6f3bfe8a2769b261046d09
Commit:     798a95dbd38b113a0f6f3bfe8a2769b261046d09
Parent:     f181137f9d70dc851dcb418cdad4df7888a0bfd3
Author:     Brice Goglin <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 11 20:26:50 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jun 12 18:58:58 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 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 4867837..e510f9b 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)
        struct mcp_irq_data *stats = mgp->fw_stats;
 
        if (unlikely(stats->stats_updated)) {
-               if (mgp->link_state != stats->link_up) {
-                       mgp->link_state = stats->link_up;
-                       if (mgp->link_state) {
+               unsigned link_up = ntohl(stats->link_up);
+               if (mgp->link_state != link_up) {
+                       mgp->link_state = link_up;
+
+                       if (mgp->link_state == MXGEFW_LINK_UP) {
                                if (netif_msg_link(mgp))
                                        printk(KERN_INFO
                                               "myri10ge: %s: link up\n",
@@ -1168,8 +1170,11 @@ static inline void myri10ge_check_statblock(struct 
myri10ge_priv *mgp)
                        } else {
                                if (netif_msg_link(mgp))
                                        printk(KERN_INFO
-                                              "myri10ge: %s: link down\n",
-                                              mgp->dev->name);
+                                              "myri10ge: %s: link %s\n",
+                                              mgp->dev->name,
+                                              (link_up == MXGEFW_LINK_MYRINET ?
+                                               "mismatch (Myrinet detected)" :
+                                               "down"));
                                netif_carrier_off(mgp->dev);
                                mgp->link_changes++;
                        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to