From: Tim Gardner <tim.gardner@canonical.com>
To: dan.j.williams@intel.com, edmund.nadolski@intel.com,
dave.jiang@intel.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] isci: Make warning messages unique
Date: Mon, 12 Sep 2011 14:46:12 -0600 [thread overview]
Message-ID: <4E6E6F94.4050502@canonical.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Hi,
I've got a 2-way Sandybridge server with an 'Intel(R) C600 SAS
Controller'. The driver makes a boatload of dmesg noise with non-unique
messages distinguished only by the event code. For example, I've got 296
of these in dmesg:
(NULL device *): sci_phy_event_handler:735: PHY starting substate
machine received unexpected event_code b3402000
In an effort to discover which of the 9 places from which this message
was emitted I added a line number.
The next step is to decide if all of these really need to be dev_warn().
rtg
--
Tim Gardner tim.gardner@canonical.com
[-- Attachment #2: 0001-isci-Make-warning-messages-unique.patch --]
[-- Type: text/x-patch, Size: 4791 bytes --]
>From dd6dc25630bb10e01b6c3133217d2dc987ab1ed0 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Mon, 12 Sep 2011 13:39:20 -0600
Subject: [PATCH] isci: Make warning messages unique
There are a number of warning messages that are identical. Make
them unique by adding a line number to the printed string.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
drivers/scsi/isci/phy.c | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c
index 79313a7..33365f8 100644
--- a/drivers/scsi/isci/phy.c
+++ b/drivers/scsi/isci/phy.c
@@ -546,10 +546,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_dbg(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
return SCI_SUCCESS;
@@ -587,9 +586,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
break;
@@ -616,9 +615,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
return SCI_SUCCESS;
@@ -630,9 +629,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received unexpected "
+ "%s:%d: PHY starting substate machine received unexpected "
"event_code %x\n",
- __func__,
+ __func__, __LINE__,
event_code);
return SCI_FAILURE;
}
@@ -658,9 +657,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
@@ -690,10 +689,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;;
}
@@ -732,9 +730,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__, event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
@@ -754,10 +752,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: PHY starting substate machine received "
+ "%s:%d: PHY starting substate machine received "
"unexpected event_code %x\n",
- __func__,
- event_code);
+ __func__, __LINE__, event_code);
return SCI_FAILURE;
}
@@ -777,9 +774,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%sP SCIC PHY 0x%p ready state machine received "
+ "%s:%d: SCIC PHY 0x%p ready state machine received "
"unexpected event_code %x\n",
- __func__, iphy, event_code);
+ __func__, __LINE__, iphy, event_code);
return SCI_FAILURE_INVALID_STATE;
}
return SCI_SUCCESS;
@@ -791,9 +788,9 @@ enum sci_status sci_phy_event_handler(struct isci_phy *iphy, u32 event_code)
break;
default:
dev_warn(sciphy_to_dev(iphy),
- "%s: SCIC PHY 0x%p resetting state machine received "
+ "%s:%d: SCIC PHY 0x%p resetting state machine received "
"unexpected event_code %x\n",
- __func__, iphy, event_code);
+ __func__, __LINE__, iphy, event_code);
return SCI_FAILURE_INVALID_STATE;
break;
--
1.7.0.4
next reply other threads:[~2011-09-12 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 20:46 Tim Gardner [this message]
2011-09-13 19:38 ` [PATCH] isci: Make warning messages unique Williams, Dan J
2011-09-13 19:54 ` Tim Gardner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E6E6F94.4050502@canonical.com \
--to=tim.gardner@canonical.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=edmund.nadolski@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox