diff options
Diffstat (limited to 'drivers/message/fusion/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index e319abcd849c..828003937711 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -115,6 +115,7 @@ MODULE_PARM_DESC(mpt_fwfault_debug, "Enable detection of Firmware fault" | |||
115 | " and halt Firmware on fault - (default=0)"); | 115 | " and halt Firmware on fault - (default=0)"); |
116 | 116 | ||
117 | 117 | ||
118 | static char MptCallbacksName[MPT_MAX_PROTOCOL_DRIVERS][50]; | ||
118 | 119 | ||
119 | #ifdef MFCNT | 120 | #ifdef MFCNT |
120 | static int mfcounter = 0; | 121 | static int mfcounter = 0; |
@@ -213,7 +214,7 @@ static int ProcessEventNotification(MPT_ADAPTER *ioc, | |||
213 | static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); | 214 | static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); |
214 | static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); | 215 | static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); |
215 | static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); | 216 | static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); |
216 | static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info); | 217 | static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info , u8 cb_idx); |
217 | static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); | 218 | static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); |
218 | static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc); | 219 | static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc); |
219 | 220 | ||
@@ -490,7 +491,7 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa) | |||
490 | else if (ioc->bus_type == SPI) | 491 | else if (ioc->bus_type == SPI) |
491 | mpt_spi_log_info(ioc, log_info); | 492 | mpt_spi_log_info(ioc, log_info); |
492 | else if (ioc->bus_type == SAS) | 493 | else if (ioc->bus_type == SAS) |
493 | mpt_sas_log_info(ioc, log_info); | 494 | mpt_sas_log_info(ioc, log_info, cb_idx); |
494 | } | 495 | } |
495 | 496 | ||
496 | if (ioc_stat & MPI_IOCSTATUS_MASK) | 497 | if (ioc_stat & MPI_IOCSTATUS_MASK) |
@@ -644,7 +645,7 @@ mptbase_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply) | |||
644 | * considered an error by the caller. | 645 | * considered an error by the caller. |
645 | */ | 646 | */ |
646 | u8 | 647 | u8 |
647 | mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass) | 648 | mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass, char *func_name) |
648 | { | 649 | { |
649 | u8 cb_idx; | 650 | u8 cb_idx; |
650 | last_drv_idx = MPT_MAX_PROTOCOL_DRIVERS; | 651 | last_drv_idx = MPT_MAX_PROTOCOL_DRIVERS; |
@@ -659,6 +660,8 @@ mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass) | |||
659 | MptDriverClass[cb_idx] = dclass; | 660 | MptDriverClass[cb_idx] = dclass; |
660 | MptEvHandlers[cb_idx] = NULL; | 661 | MptEvHandlers[cb_idx] = NULL; |
661 | last_drv_idx = cb_idx; | 662 | last_drv_idx = cb_idx; |
663 | memcpy(MptCallbacksName[cb_idx], func_name, | ||
664 | strlen(func_name) > 50 ? 50 : strlen(func_name)); | ||
662 | break; | 665 | break; |
663 | } | 666 | } |
664 | } | 667 | } |
@@ -8002,7 +8005,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) | |||
8002 | * Refer to lsi/mpi_log_sas.h. | 8005 | * Refer to lsi/mpi_log_sas.h. |
8003 | **/ | 8006 | **/ |
8004 | static void | 8007 | static void |
8005 | mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info) | 8008 | mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info, u8 cb_idx) |
8006 | { | 8009 | { |
8007 | union loginfo_type { | 8010 | union loginfo_type { |
8008 | u32 loginfo; | 8011 | u32 loginfo; |
@@ -8056,21 +8059,22 @@ union loginfo_type { | |||
8056 | if (sub_code_desc != NULL) | 8059 | if (sub_code_desc != NULL) |
8057 | printk(MYIOC_s_INFO_FMT | 8060 | printk(MYIOC_s_INFO_FMT |
8058 | "LogInfo(0x%08x): Originator={%s}, Code={%s}," | 8061 | "LogInfo(0x%08x): Originator={%s}, Code={%s}," |
8059 | " SubCode={%s}\n", | 8062 | " SubCode={%s} cb_idx %s\n", |
8060 | ioc->name, log_info, originator_desc, code_desc, | 8063 | ioc->name, log_info, originator_desc, code_desc, |
8061 | sub_code_desc); | 8064 | sub_code_desc, MptCallbacksName[cb_idx]); |
8062 | else if (code_desc != NULL) | 8065 | else if (code_desc != NULL) |
8063 | printk(MYIOC_s_INFO_FMT | 8066 | printk(MYIOC_s_INFO_FMT |
8064 | "LogInfo(0x%08x): Originator={%s}, Code={%s}," | 8067 | "LogInfo(0x%08x): Originator={%s}, Code={%s}," |
8065 | " SubCode(0x%04x)\n", | 8068 | " SubCode(0x%04x) cb_idx %s\n", |
8066 | ioc->name, log_info, originator_desc, code_desc, | 8069 | ioc->name, log_info, originator_desc, code_desc, |
8067 | sas_loginfo.dw.subcode); | 8070 | sas_loginfo.dw.subcode, MptCallbacksName[cb_idx]); |
8068 | else | 8071 | else |
8069 | printk(MYIOC_s_INFO_FMT | 8072 | printk(MYIOC_s_INFO_FMT |
8070 | "LogInfo(0x%08x): Originator={%s}, Code=(0x%02x)," | 8073 | "LogInfo(0x%08x): Originator={%s}, Code=(0x%02x)," |
8071 | " SubCode(0x%04x)\n", | 8074 | " SubCode(0x%04x) cb_idx %s\n", |
8072 | ioc->name, log_info, originator_desc, | 8075 | ioc->name, log_info, originator_desc, |
8073 | sas_loginfo.dw.code, sas_loginfo.dw.subcode); | 8076 | sas_loginfo.dw.code, sas_loginfo.dw.subcode, |
8077 | MptCallbacksName[cb_idx]); | ||
8074 | } | 8078 | } |
8075 | 8079 | ||
8076 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 8080 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
@@ -8435,7 +8439,8 @@ fusion_init(void) | |||
8435 | /* Register ourselves (mptbase) in order to facilitate | 8439 | /* Register ourselves (mptbase) in order to facilitate |
8436 | * EventNotification handling. | 8440 | * EventNotification handling. |
8437 | */ | 8441 | */ |
8438 | mpt_base_index = mpt_register(mptbase_reply, MPTBASE_DRIVER); | 8442 | mpt_base_index = mpt_register(mptbase_reply, MPTBASE_DRIVER, |
8443 | "mptbase_reply"); | ||
8439 | 8444 | ||
8440 | /* Register for hard reset handling callbacks. | 8445 | /* Register for hard reset handling callbacks. |
8441 | */ | 8446 | */ |