sfc: Log clearer error messages for hardware monitor
authorBen Hutchings <bhutchings@solarflare.com>
Fri, 25 Jun 2010 07:06:29 +0000 (07:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Jun 2010 04:03:32 +0000 (21:03 -0700)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/falcon_boards.c

index 92b35e3d1100d9e92c284486891bb418541daab4..3d950c2cf205965d6aafced30330acd235d48734 100644 (file)
@@ -108,10 +108,15 @@ static int efx_check_lm87(struct efx_nic *efx, unsigned mask)
        if (alarms1 || alarms2) {
                netif_err(efx, hw, efx->net_dev,
                          "LM87 detected a hardware failure (status %02x:%02x)"
-                         "%s%s\n",
+                         "%s%s%s\n",
                          alarms1, alarms2,
-                         (alarms1 & LM87_ALARM_TEMP_INT) ? " INTERNAL" : "",
-                         (alarms1 & LM87_ALARM_TEMP_EXT1) ? " EXTERNAL" : "");
+                         (alarms1 & LM87_ALARM_TEMP_INT) ?
+                         "; board is overheating" : "",
+                         (alarms1 & LM87_ALARM_TEMP_EXT1) ?
+                         "; controller is overheating" : "",
+                         (alarms1 & ~(LM87_ALARM_TEMP_INT | LM87_ALARM_TEMP_EXT1)
+                          || alarms2) ?
+                         "; electrical fault" : "");
                return -ERANGE;
        }