aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/message/fusion/mptbase.c27
-rw-r--r--drivers/message/fusion/mptbase.h3
-rw-r--r--drivers/message/fusion/mptctl.c6
-rw-r--r--drivers/message/fusion/mptfc.c9
-rw-r--r--drivers/message/fusion/mptlan.c4
-rw-r--r--drivers/message/fusion/mptsas.c15
-rw-r--r--drivers/message/fusion/mptspi.c9
7 files changed, 47 insertions, 26 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
118static char MptCallbacksName[MPT_MAX_PROTOCOL_DRIVERS][50];
118 119
119#ifdef MFCNT 120#ifdef MFCNT
120static int mfcounter = 0; 121static int mfcounter = 0;
@@ -213,7 +214,7 @@ static int ProcessEventNotification(MPT_ADAPTER *ioc,
213static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf); 214static void mpt_iocstatus_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf);
214static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info); 215static void mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info);
215static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info); 216static void mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info);
216static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info); 217static void mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info , u8 cb_idx);
217static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc); 218static int mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
218static void mpt_inactive_raid_list_free(MPT_ADAPTER *ioc); 219static 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 */
646u8 647u8
647mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass) 648mpt_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 **/
8004static void 8007static void
8005mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info) 8008mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info, u8 cb_idx)
8006{ 8009{
8007union loginfo_type { 8010union 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 */
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 7f31973b3f7c..0b23c426a571 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -926,7 +926,8 @@ extern void mpt_detach(struct pci_dev *pdev);
926extern int mpt_suspend(struct pci_dev *pdev, pm_message_t state); 926extern int mpt_suspend(struct pci_dev *pdev, pm_message_t state);
927extern int mpt_resume(struct pci_dev *pdev); 927extern int mpt_resume(struct pci_dev *pdev);
928#endif 928#endif
929extern u8 mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass); 929extern u8 mpt_register(MPT_CALLBACK cbfunc, MPT_DRIVER_CLASS dclass,
930 char *func_name);
930extern void mpt_deregister(u8 cb_idx); 931extern void mpt_deregister(u8 cb_idx);
931extern int mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc); 932extern int mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc);
932extern void mpt_event_deregister(u8 cb_idx); 933extern void mpt_event_deregister(u8 cb_idx);
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 40046f595f1c..d8ddfdf8be14 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -3018,7 +3018,8 @@ static int __init mptctl_init(void)
3018 * Install our handler 3018 * Install our handler
3019 */ 3019 */
3020 ++where; 3020 ++where;
3021 mptctl_id = mpt_register(mptctl_reply, MPTCTL_DRIVER); 3021 mptctl_id = mpt_register(mptctl_reply, MPTCTL_DRIVER,
3022 "mptctl_reply");
3022 if (!mptctl_id || mptctl_id >= MPT_MAX_PROTOCOL_DRIVERS) { 3023 if (!mptctl_id || mptctl_id >= MPT_MAX_PROTOCOL_DRIVERS) {
3023 printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); 3024 printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n");
3024 misc_deregister(&mptctl_miscdev); 3025 misc_deregister(&mptctl_miscdev);
@@ -3026,7 +3027,8 @@ static int __init mptctl_init(void)
3026 goto out_fail; 3027 goto out_fail;
3027 } 3028 }
3028 3029
3029 mptctl_taskmgmt_id = mpt_register(mptctl_taskmgmt_reply, MPTCTL_DRIVER); 3030 mptctl_taskmgmt_id = mpt_register(mptctl_taskmgmt_reply, MPTCTL_DRIVER,
3031 "mptctl_taskmgmt_reply");
3030 if (!mptctl_taskmgmt_id || mptctl_taskmgmt_id >= MPT_MAX_PROTOCOL_DRIVERS) { 3032 if (!mptctl_taskmgmt_id || mptctl_taskmgmt_id >= MPT_MAX_PROTOCOL_DRIVERS) {
3031 printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n"); 3033 printk(KERN_ERR MYNAM ": ERROR: Failed to register with Fusion MPT base driver\n");
3032 mpt_deregister(mptctl_id); 3034 mpt_deregister(mptctl_id);
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index b5f03ad81568..e15220ff52fc 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -1472,9 +1472,12 @@ mptfc_init(void)
1472 if (!mptfc_transport_template) 1472 if (!mptfc_transport_template)
1473 return -ENODEV; 1473 return -ENODEV;
1474 1474
1475 mptfcDoneCtx = mpt_register(mptscsih_io_done, MPTFC_DRIVER); 1475 mptfcDoneCtx = mpt_register(mptscsih_io_done, MPTFC_DRIVER,
1476 mptfcTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTFC_DRIVER); 1476 "mptscsih_scandv_complete");
1477 mptfcInternalCtx = mpt_register(mptscsih_scandv_complete, MPTFC_DRIVER); 1477 mptfcTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTFC_DRIVER,
1478 "mptscsih_scandv_complete");
1479 mptfcInternalCtx = mpt_register(mptscsih_scandv_complete, MPTFC_DRIVER,
1480 "mptscsih_scandv_complete");
1478 1481
1479 mpt_event_register(mptfcDoneCtx, mptfc_event_process); 1482 mpt_event_register(mptfcDoneCtx, mptfc_event_process);
1480 mpt_reset_register(mptfcDoneCtx, mptfc_ioc_reset); 1483 mpt_reset_register(mptfcDoneCtx, mptfc_ioc_reset);
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 4fa9665cbe93..cbe96072a6cc 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -1452,7 +1452,9 @@ static int __init mpt_lan_init (void)
1452{ 1452{
1453 show_mptmod_ver(LANAME, LANVER); 1453 show_mptmod_ver(LANAME, LANVER);
1454 1454
1455 if ((LanCtx = mpt_register(lan_reply, MPTLAN_DRIVER)) <= 0) { 1455 LanCtx = mpt_register(lan_reply, MPTLAN_DRIVER,
1456 "lan_reply");
1457 if (LanCtx <= 0) {
1456 printk (KERN_ERR MYNAM ": Failed to register with MPT base driver\n"); 1458 printk (KERN_ERR MYNAM ": Failed to register with MPT base driver\n");
1457 return -EBUSY; 1459 return -EBUSY;
1458 } 1460 }
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 235113ac08e5..83a5115f0251 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -5368,13 +5368,18 @@ mptsas_init(void)
5368 return -ENODEV; 5368 return -ENODEV;
5369 mptsas_transport_template->eh_timed_out = mptsas_eh_timed_out; 5369 mptsas_transport_template->eh_timed_out = mptsas_eh_timed_out;
5370 5370
5371 mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER); 5371 mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER,
5372 mptsasTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSAS_DRIVER); 5372 "mptscsih_io_done");
5373 mptsasTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSAS_DRIVER,
5374 "mptscsih_taskmgmt_complete");
5373 mptsasInternalCtx = 5375 mptsasInternalCtx =
5374 mpt_register(mptscsih_scandv_complete, MPTSAS_DRIVER); 5376 mpt_register(mptscsih_scandv_complete, MPTSAS_DRIVER,
5375 mptsasMgmtCtx = mpt_register(mptsas_mgmt_done, MPTSAS_DRIVER); 5377 "mptscsih_scandv_complete");
5378 mptsasMgmtCtx = mpt_register(mptsas_mgmt_done, MPTSAS_DRIVER,
5379 "mptsas_mgmt_done");
5376 mptsasDeviceResetCtx = 5380 mptsasDeviceResetCtx =
5377 mpt_register(mptsas_taskmgmt_complete, MPTSAS_DRIVER); 5381 mpt_register(mptsas_taskmgmt_complete, MPTSAS_DRIVER,
5382 "mptsas_taskmgmt_complete");
5378 5383
5379 mpt_event_register(mptsasDoneCtx, mptsas_event_process); 5384 mpt_event_register(mptsasDoneCtx, mptsas_event_process);
5380 mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset); 5385 mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset);
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 1abaa5d01ae3..0e2803155ae2 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1551,9 +1551,12 @@ mptspi_init(void)
1551 if (!mptspi_transport_template) 1551 if (!mptspi_transport_template)
1552 return -ENODEV; 1552 return -ENODEV;
1553 1553
1554 mptspiDoneCtx = mpt_register(mptscsih_io_done, MPTSPI_DRIVER); 1554 mptspiDoneCtx = mpt_register(mptscsih_io_done, MPTSPI_DRIVER,
1555 mptspiTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSPI_DRIVER); 1555 "mptscsih_io_done");
1556 mptspiInternalCtx = mpt_register(mptscsih_scandv_complete, MPTSPI_DRIVER); 1556 mptspiTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSPI_DRIVER,
1557 "mptscsih_taskmgmt_complete");
1558 mptspiInternalCtx = mpt_register(mptscsih_scandv_complete,
1559 MPTSPI_DRIVER, "mptscsih_scandv_complete");
1557 1560
1558 mpt_event_register(mptspiDoneCtx, mptspi_event_process); 1561 mpt_event_register(mptspiDoneCtx, mptspi_event_process);
1559 mpt_reset_register(mptspiDoneCtx, mptspi_ioc_reset); 1562 mpt_reset_register(mptspiDoneCtx, mptspi_ioc_reset);