mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[SCSI] mpt fusion: fc loginfo using defines from the header
rewrite of mpt_fc_log_info to use the enum/defines from mpi_log_fc.h Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
caa5dea19d
commit
7c431e5cf4
1 changed files with 31 additions and 7 deletions
|
@ -64,6 +64,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mptbase.h"
|
#include "mptbase.h"
|
||||||
|
#include "lsi/mpi_log_fc.h"
|
||||||
|
|
||||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
#define my_NAME "Fusion MPT base driver"
|
#define my_NAME "Fusion MPT base driver"
|
||||||
|
@ -6349,14 +6350,37 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
|
||||||
static void
|
static void
|
||||||
mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
|
mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info)
|
||||||
{
|
{
|
||||||
static char *subcl_str[8] = {
|
char *desc = "unknown";
|
||||||
"FCP Initiator", "FCP Target", "LAN", "MPI Message Layer",
|
|
||||||
"FC Link", "Context Manager", "Invalid Field Offset", "State Change Info"
|
|
||||||
};
|
|
||||||
u8 subcl = (log_info >> 24) & 0x7;
|
|
||||||
|
|
||||||
printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubCl={%s}\n",
|
switch (log_info & 0xFF000000) {
|
||||||
ioc->name, log_info, subcl_str[subcl]);
|
case MPI_IOCLOGINFO_FC_INIT_BASE:
|
||||||
|
desc = "FCP Initiator";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_TARGET_BASE:
|
||||||
|
desc = "FCP Target";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_LAN_BASE:
|
||||||
|
desc = "LAN";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_MSG_BASE:
|
||||||
|
desc = "MPI Message Layer";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_LINK_BASE:
|
||||||
|
desc = "FC Link";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_CTX_BASE:
|
||||||
|
desc = "Context Manager";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_INVALID_FIELD_BYTE_OFFSET:
|
||||||
|
desc = "Invalid Field Offset";
|
||||||
|
break;
|
||||||
|
case MPI_IOCLOGINFO_FC_STATE_CHANGE:
|
||||||
|
desc = "State Change Info";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
printk(MYIOC_s_INFO_FMT "LogInfo(0x%08x): SubClass={%s}, Value=(0x%06x)\n",
|
||||||
|
ioc->name, log_info, desc, (log_info & 0xFFFFFF));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||||
|
|
Loading…
Reference in a new issue