aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.c
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-03-14 11:14:03 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-14 15:27:43 -0500
commit3a892bef3f7e94c4d6c2c20b9a1b546f43679fd3 (patch)
tree5777985afb6a2bbfef93ef60b8952f41612b7396 /drivers/message/fusion/mptbase.c
parent5bf52c4fda97325976ffaf338d2e81b73b3db446 (diff)
[SCSI] fusion - move some debug firmware event debug msgs to verbose level
Created a debug level MPT_DEBUG_VERBOSE_EVENTS. Moving some of the more vebose debug messages for firwmare events into new debug level. Also added some more firmware events descriptions. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r--drivers/message/fusion/mptbase.c125
1 files changed, 107 insertions, 18 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 39c0b16d8d04..9960ef10366f 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -428,7 +428,7 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply)
428 results = ProcessEventNotification(ioc, pEvReply, &evHandlers); 428 results = ProcessEventNotification(ioc, pEvReply, &evHandlers);
429 if (results != evHandlers) { 429 if (results != evHandlers) {
430 /* CHECKME! Any special handling needed here? */ 430 /* CHECKME! Any special handling needed here? */
431 devtprintk((MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n", 431 devtverboseprintk((MYIOC_s_WARN_FMT "Called %d event handlers, sum results = %d\n",
432 ioc->name, evHandlers, results)); 432 ioc->name, evHandlers, results));
433 } 433 }
434 434
@@ -438,10 +438,10 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *reply)
438 */ 438 */
439 if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) { 439 if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) {
440 freereq = 0; 440 freereq = 0;
441 devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p does not return Request frame\n", 441 devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p does not return Request frame\n",
442 ioc->name, pEvReply)); 442 ioc->name, pEvReply));
443 } else { 443 } else {
444 devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n", 444 devtverboseprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n",
445 ioc->name, pEvReply)); 445 ioc->name, pEvReply));
446 } 446 }
447 447
@@ -5079,13 +5079,13 @@ SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch)
5079 5079
5080 evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc); 5080 evnp = (EventNotification_t *) mpt_get_msg_frame(mpt_base_index, ioc);
5081 if (evnp == NULL) { 5081 if (evnp == NULL) {
5082 devtprintk((MYIOC_s_WARN_FMT "Unable to allocate event request frame!\n", 5082 devtverboseprintk((MYIOC_s_WARN_FMT "Unable to allocate event request frame!\n",
5083 ioc->name)); 5083 ioc->name));
5084 return 0; 5084 return 0;
5085 } 5085 }
5086 memset(evnp, 0, sizeof(*evnp)); 5086 memset(evnp, 0, sizeof(*evnp));
5087 5087
5088 devtprintk((MYIOC_s_INFO_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp)); 5088 devtverboseprintk((MYIOC_s_INFO_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp));
5089 5089
5090 evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION; 5090 evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION;
5091 evnp->ChainOffset = 0; 5091 evnp->ChainOffset = 0;
@@ -5840,24 +5840,27 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr)
5840 break; 5840 break;
5841 case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: 5841 case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
5842 { 5842 {
5843 char buf[50];
5844 u8 id = (u8)(evData0);
5843 u8 ReasonCode = (u8)(evData0 >> 16); 5845 u8 ReasonCode = (u8)(evData0 >> 16);
5844 switch (ReasonCode) { 5846 switch (ReasonCode) {
5845 case MPI_EVENT_SAS_DEV_STAT_RC_ADDED: 5847 case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
5846 ds = "SAS Device Status Change: Added"; 5848 sprintf(buf,"SAS Device Status Change: Added: id=%d", id);
5847 break; 5849 break;
5848 case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING: 5850 case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
5849 ds = "SAS Device Status Change: Deleted"; 5851 sprintf(buf,"SAS Device Status Change: Deleted: id=%d", id);
5850 break; 5852 break;
5851 case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA: 5853 case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
5852 ds = "SAS Device Status Change: SMART Data"; 5854 sprintf(buf,"SAS Device Status Change: SMART Data: id=%d", id);
5853 break; 5855 break;
5854 case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED: 5856 case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
5855 ds = "SAS Device Status Change: No Persistancy Added"; 5857 sprintf(buf,"SAS Device Status Change: No Persistancy Added: id=%d", id);
5856 break; 5858 break;
5857 default: 5859 default:
5858 ds = "SAS Device Status Change: Unknown"; 5860 sprintf(buf,"SAS Device Status Change: Unknown: id=%d", id);
5859 break; 5861 break;
5860 } 5862 }
5863 ds = buf;
5861 break; 5864 break;
5862 } 5865 }
5863 case MPI_EVENT_ON_BUS_TIMER_EXPIRED: 5866 case MPI_EVENT_ON_BUS_TIMER_EXPIRED:
@@ -5873,11 +5876,97 @@ EventDescriptionStr(u8 event, u32 evData0, char *evStr)
5873 ds = "Persistent Table Full"; 5876 ds = "Persistent Table Full";
5874 break; 5877 break;
5875 case MPI_EVENT_SAS_PHY_LINK_STATUS: 5878 case MPI_EVENT_SAS_PHY_LINK_STATUS:
5876 ds = "SAS PHY Link Status"; 5879 {
5880 char buf[50];
5881 u8 LinkRates = (u8)(evData0 >> 8);
5882 u8 PhyNumber = (u8)(evData0);
5883 LinkRates = (LinkRates & MPI_EVENT_SAS_PLS_LR_CURRENT_MASK) >>
5884 MPI_EVENT_SAS_PLS_LR_CURRENT_SHIFT;
5885 switch (LinkRates) {
5886 case MPI_EVENT_SAS_PLS_LR_RATE_UNKNOWN:
5887 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5888 " Rate Unknown",PhyNumber);
5889 break;
5890 case MPI_EVENT_SAS_PLS_LR_RATE_PHY_DISABLED:
5891 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5892 " Phy Disabled",PhyNumber);
5893 break;
5894 case MPI_EVENT_SAS_PLS_LR_RATE_FAILED_SPEED_NEGOTIATION:
5895 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5896 " Failed Speed Nego",PhyNumber);
5897 break;
5898 case MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE:
5899 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5900 " Sata OOB Completed",PhyNumber);
5901 break;
5902 case MPI_EVENT_SAS_PLS_LR_RATE_1_5:
5903 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5904 " Rate 1.5 Gbps",PhyNumber);
5905 break;
5906 case MPI_EVENT_SAS_PLS_LR_RATE_3_0:
5907 sprintf(buf,"SAS PHY Link Status: Phy=%d:"
5908 " Rate 3.0 Gpbs",PhyNumber);
5909 break;
5910 default:
5911 sprintf(buf,"SAS PHY Link Status: Phy=%d", PhyNumber);
5912 break;
5913 }
5914 ds = buf;
5877 break; 5915 break;
5916 }
5878 case MPI_EVENT_SAS_DISCOVERY_ERROR: 5917 case MPI_EVENT_SAS_DISCOVERY_ERROR:
5879 ds = "SAS Discovery Error"; 5918 ds = "SAS Discovery Error";
5880 break; 5919 break;
5920 case MPI_EVENT_IR_RESYNC_UPDATE:
5921 {
5922 u8 resync_complete = (u8)(evData0 >> 16);
5923 char buf[40];
5924 sprintf(buf,"IR Resync Update: Complete = %d:",resync_complete);
5925 ds = buf;
5926 break;
5927 }
5928 case MPI_EVENT_IR2:
5929 {
5930 u8 ReasonCode = (u8)(evData0 >> 16);
5931 switch (ReasonCode) {
5932 case MPI_EVENT_IR2_RC_LD_STATE_CHANGED:
5933 ds = "IR2: LD State Changed";
5934 break;
5935 case MPI_EVENT_IR2_RC_PD_STATE_CHANGED:
5936 ds = "IR2: PD State Changed";
5937 break;
5938 case MPI_EVENT_IR2_RC_BAD_BLOCK_TABLE_FULL:
5939 ds = "IR2: Bad Block Table Full";
5940 break;
5941 case MPI_EVENT_IR2_RC_PD_INSERTED:
5942 ds = "IR2: PD Inserted";
5943 break;
5944 case MPI_EVENT_IR2_RC_PD_REMOVED:
5945 ds = "IR2: PD Removed";
5946 break;
5947 case MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED:
5948 ds = "IR2: Foreign CFG Detected";
5949 break;
5950 case MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR:
5951 ds = "IR2: Rebuild Medium Error";
5952 break;
5953 default:
5954 ds = "IR2";
5955 break;
5956 }
5957 break;
5958 }
5959 case MPI_EVENT_SAS_DISCOVERY:
5960 {
5961 if (evData0)
5962 ds = "SAS Discovery: Start";
5963 else
5964 ds = "SAS Discovery: Stop";
5965 break;
5966 }
5967 case MPI_EVENT_LOG_ENTRY_ADDED:
5968 ds = "SAS Log Entry Added";
5969 break;
5881 5970
5882 /* 5971 /*
5883 * MPT base "custom" events may be added here... 5972 * MPT base "custom" events may be added here...
@@ -5922,12 +6011,12 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
5922 } 6011 }
5923 6012
5924 EventDescriptionStr(event, evData0, evStr); 6013 EventDescriptionStr(event, evData0, evStr);
5925 devtprintk((MYIOC_s_INFO_FMT "MPT event (%s=%02Xh) detected!\n", 6014 devtprintk((MYIOC_s_INFO_FMT "MPT event:(%02Xh) : %s\n",
5926 ioc->name, 6015 ioc->name,
5927 evStr, 6016 event,
5928 event)); 6017 evStr));
5929 6018
5930#if defined(MPT_DEBUG) || defined(MPT_DEBUG_EVENTS) 6019#if defined(MPT_DEBUG) || defined(MPT_DEBUG_VERBOSE_EVENTS)
5931 printk(KERN_INFO MYNAM ": Event data:\n" KERN_INFO); 6020 printk(KERN_INFO MYNAM ": Event data:\n" KERN_INFO);
5932 for (ii = 0; ii < evDataLen; ii++) 6021 for (ii = 0; ii < evDataLen; ii++)
5933 printk(" %08x", le32_to_cpu(pEventReply->Data[ii])); 6022 printk(" %08x", le32_to_cpu(pEventReply->Data[ii]));
@@ -5986,7 +6075,7 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
5986 */ 6075 */
5987 for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) { 6076 for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
5988 if (MptEvHandlers[ii]) { 6077 if (MptEvHandlers[ii]) {
5989 devtprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n", 6078 devtverboseprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n",
5990 ioc->name, ii)); 6079 ioc->name, ii));
5991 r += (*(MptEvHandlers[ii]))(ioc, pEventReply); 6080 r += (*(MptEvHandlers[ii]))(ioc, pEventReply);
5992 handlers++; 6081 handlers++;
@@ -5998,10 +6087,10 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
5998 * If needed, send (a single) EventAck. 6087 * If needed, send (a single) EventAck.
5999 */ 6088 */
6000 if (pEventReply->AckRequired == MPI_EVENT_NOTIFICATION_ACK_REQUIRED) { 6089 if (pEventReply->AckRequired == MPI_EVENT_NOTIFICATION_ACK_REQUIRED) {
6001 devtprintk((MYIOC_s_WARN_FMT 6090 devtverboseprintk((MYIOC_s_WARN_FMT
6002 "EventAck required\n",ioc->name)); 6091 "EventAck required\n",ioc->name));
6003 if ((ii = SendEventAck(ioc, pEventReply)) != 0) { 6092 if ((ii = SendEventAck(ioc, pEventReply)) != 0) {
6004 devtprintk((MYIOC_s_WARN_FMT "SendEventAck returned %d\n", 6093 devtverboseprintk((MYIOC_s_WARN_FMT "SendEventAck returned %d\n",
6005 ioc->name, ii)); 6094 ioc->name, ii));
6006 } 6095 }
6007 } 6096 }