From patchwork Tue Apr 28 14:48:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 26570 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id A08CCB7069 for ; Wed, 29 Apr 2009 00:48:19 +1000 (EST) Received: by ozlabs.org (Postfix) id 8EC5ADDF2A; Wed, 29 Apr 2009 00:48:19 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 1B854DDF11 for ; Wed, 29 Apr 2009 00:48:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbZD1OsK (ORCPT ); Tue, 28 Apr 2009 10:48:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758785AbZD1OsI (ORCPT ); Tue, 28 Apr 2009 10:48:08 -0400 Received: from lanfw001a.cxnet.dk ([87.72.215.196]:40682 "EHLO lanfw001a.cxnet.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757452AbZD1OsH (ORCPT ); Tue, 28 Apr 2009 10:48:07 -0400 Received: from comxexch02.comx.local (unknown [172.31.1.117]) by lanfw001a.cxnet.dk (Postfix) with ESMTP id 6315C1639F0; Tue, 28 Apr 2009 16:48:05 +0200 (CEST) Received: from 172.31.4.93 ([172.31.4.93]) by comxexch02.comx.local ([172.31.1.117]) with Microsoft Exchange Server HTTP-DAV ; Tue, 28 Apr 2009 14:48:05 +0000 Received: from hawk by comxexch02.comx.local; 28 Apr 2009 16:48:05 +0200 Subject: [PATCH] sfc: Make temperature warnings/alarms more explicit. From: Jesper Dangaard Brouer Reply-To: jdb@comx.dk To: Ben Hutchings Cc: "netdev@vger.kernel.org" In-Reply-To: <1240929844.10689.35.camel@localhost.localdomain> References: <1240911369.10689.20.camel@localhost.localdomain> <1240925799.3200.16.camel@achroite> <1240929844.10689.35.camel@localhost.localdomain> Organization: ComX Networks A/S Date: Tue, 28 Apr 2009 16:48:04 +0200 Message-Id: <1240930084.10689.39.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The sfc driver can detect different hardware failures via the LM87 system. One of the failures I have experienced is the temperature alarm, but the error message didn't reveal that this error was temperature related. I had to read the code to discover that. I think that the temperature error should be more explicit, in order to warn people before the board is permanently damaged. Signed-off-by: Jesper Dangaard Brouer --- drivers/net/sfc/boards.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/sfc/boards.c b/drivers/net/sfc/boards.c index 4a4c74c..b1822fe 100644 --- a/drivers/net/sfc/boards.c +++ b/drivers/net/sfc/boards.c @@ -121,8 +121,10 @@ static int efx_check_lm87(struct efx_nic *efx, unsigned mask) if (alarms1 || alarms2) { EFX_ERR(efx, "LM87 detected a hardware failure (status %02x:%02x)" - "%s%s\n", + "%s%s%s\n", alarms1, alarms2, + (alarms1 & (LM87_ALARM_TEMP_INT|LM87_ALARM_TEMP_EXT1)) + ? " high temperature" : "", (alarms1 & LM87_ALARM_TEMP_INT) ? " INTERNAL" : "", (alarms1 & LM87_ALARM_TEMP_EXT1) ? " EXTERNAL" : ""); return -ERANGE;