Lines Matching refs:cb_idx

211 static void	mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info , u8 cb_idx);
267 u8 cb_idx; in mpt_get_cb_idx() local
269 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) in mpt_get_cb_idx()
270 if (MptDriverClass[cb_idx] == dclass) in mpt_get_cb_idx()
271 return cb_idx; in mpt_get_cb_idx()
448 u8 cb_idx; in mpt_turbo_reply() local
456 cb_idx = (pa & 0x00FF0000) >> 16; in mpt_turbo_reply()
460 cb_idx = mpt_get_cb_idx(MPTLAN_DRIVER); in mpt_turbo_reply()
480 cb_idx = mpt_get_cb_idx(MPTSTM_DRIVER); in mpt_turbo_reply()
484 cb_idx = 0; in mpt_turbo_reply()
489 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS || in mpt_turbo_reply()
490 MptCallbacks[cb_idx] == NULL) { in mpt_turbo_reply()
492 __func__, ioc->name, cb_idx); in mpt_turbo_reply()
496 if (MptCallbacks[cb_idx](ioc, mf, mr)) in mpt_turbo_reply()
508 u8 cb_idx; in mpt_reply() local
529 cb_idx = mr->u.frame.hwhdr.msgctxu.fld.cb_idx; in mpt_reply()
533 ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function)); in mpt_reply()
546 mpt_sas_log_info(ioc, log_info, cb_idx); in mpt_reply()
553 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS || in mpt_reply()
554 MptCallbacks[cb_idx] == NULL) { in mpt_reply()
556 __func__, ioc->name, cb_idx); in mpt_reply()
561 freeme = MptCallbacks[cb_idx](ioc, mf, mr); in mpt_reply()
702 u8 cb_idx; in mpt_register() local
709 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_register()
710 if (MptCallbacks[cb_idx] == NULL) { in mpt_register()
711 MptCallbacks[cb_idx] = cbfunc; in mpt_register()
712 MptDriverClass[cb_idx] = dclass; in mpt_register()
713 MptEvHandlers[cb_idx] = NULL; in mpt_register()
714 last_drv_idx = cb_idx; in mpt_register()
715 strscpy(MptCallbacksName[cb_idx], func_name, in mpt_register()
733 mpt_deregister(u8 cb_idx) in mpt_deregister() argument
735 if (cb_idx && (cb_idx < MPT_MAX_PROTOCOL_DRIVERS)) { in mpt_deregister()
736 MptCallbacks[cb_idx] = NULL; in mpt_deregister()
737 MptDriverClass[cb_idx] = MPTUNKNOWN_DRIVER; in mpt_deregister()
738 MptEvHandlers[cb_idx] = NULL; in mpt_deregister()
756 mpt_event_register(u8 cb_idx, MPT_EVHANDLER ev_cbfunc) in mpt_event_register() argument
758 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_event_register()
761 MptEvHandlers[cb_idx] = ev_cbfunc; in mpt_event_register()
775 mpt_event_deregister(u8 cb_idx) in mpt_event_deregister() argument
777 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_event_deregister()
780 MptEvHandlers[cb_idx] = NULL; in mpt_event_deregister()
795 mpt_reset_register(u8 cb_idx, MPT_RESETHANDLER reset_func) in mpt_reset_register() argument
797 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_reset_register()
800 MptResetHandlers[cb_idx] = reset_func; in mpt_reset_register()
814 mpt_reset_deregister(u8 cb_idx) in mpt_reset_deregister() argument
816 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_reset_deregister()
819 MptResetHandlers[cb_idx] = NULL; in mpt_reset_deregister()
829 mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, u8 cb_idx) in mpt_device_driver_register() argument
833 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_device_driver_register()
836 MptDeviceDriverHandlers[cb_idx] = dd_cbfunc; in mpt_device_driver_register()
853 mpt_device_driver_deregister(u8 cb_idx) in mpt_device_driver_deregister() argument
858 if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS) in mpt_device_driver_deregister()
861 dd_cbfunc = MptDeviceDriverHandlers[cb_idx]; in mpt_device_driver_deregister()
868 MptDeviceDriverHandlers[cb_idx] = NULL; in mpt_device_driver_deregister()
885 mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc) in mpt_get_msg_frame() argument
911 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; /* byte */ in mpt_get_msg_frame()
939 ioc->name, cb_idx, ioc->id, mf)); in mpt_get_msg_frame()
954 mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) in mpt_put_msg_frame() argument
961 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; /* byte */ in mpt_put_msg_frame()
990 mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf) in mpt_put_msg_frame_hi_pri() argument
997 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; in mpt_put_msg_frame_hi_pri()
1180 mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag) in mpt_send_handshake_request() argument
1200 mf->u.frame.hwhdr.msgctxu.fld.cb_idx = cb_idx; in mpt_send_handshake_request()
1766 u8 cb_idx; in mpt_attach() local
2020 for(cb_idx = 0; cb_idx < MPT_MAX_PROTOCOL_DRIVERS; cb_idx++) { in mpt_attach()
2021 if(MptDeviceDriverHandlers[cb_idx] && in mpt_attach()
2022 MptDeviceDriverHandlers[cb_idx]->probe) { in mpt_attach()
2023 MptDeviceDriverHandlers[cb_idx]->probe(pdev); in mpt_attach()
2076 u8 cb_idx; in mpt_detach() local
2104 for(cb_idx = 0; cb_idx < MPT_MAX_PROTOCOL_DRIVERS; cb_idx++) { in mpt_detach()
2105 if(MptDeviceDriverHandlers[cb_idx] && in mpt_detach()
2106 MptDeviceDriverHandlers[cb_idx]->remove) { in mpt_detach()
2107 MptDeviceDriverHandlers[cb_idx]->remove(pdev); in mpt_detach()
3963 u8 cb_idx; in mpt_diag_reset() local
3988 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_diag_reset()
3989 if (MptResetHandlers[cb_idx]) in mpt_diag_reset()
3990 (*(MptResetHandlers[cb_idx]))(ioc, in mpt_diag_reset()
4090 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_diag_reset()
4091 if (MptResetHandlers[cb_idx]) { in mpt_diag_reset()
4092 mpt_signal_reset(cb_idx, in mpt_diag_reset()
4095 mpt_signal_reset(cb_idx, in mpt_diag_reset()
6656 u8 cb_idx; in mpt_version_proc_show() local
6664 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_version_proc_show()
6666 if (MptCallbacks[cb_idx]) { in mpt_version_proc_show()
6667 switch (MptDriverClass[cb_idx]) { in mpt_version_proc_show()
6972 u8 cb_idx; in mpt_SoftResetHandler() local
7006 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_SoftResetHandler()
7007 if (MptResetHandlers[cb_idx]) in mpt_SoftResetHandler()
7008 mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET); in mpt_SoftResetHandler()
7025 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_SoftResetHandler()
7026 if (MptResetHandlers[cb_idx]) in mpt_SoftResetHandler()
7027 mpt_signal_reset(cb_idx, ioc, MPT_IOC_PRE_RESET); in mpt_SoftResetHandler()
7081 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_SoftResetHandler()
7082 if (MptResetHandlers[cb_idx]) in mpt_SoftResetHandler()
7083 mpt_signal_reset(cb_idx, ioc, in mpt_SoftResetHandler()
7142 u8 cb_idx; in mpt_HardResetHandler() local
7184 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_HardResetHandler()
7185 if (MptResetHandlers[cb_idx]) { in mpt_HardResetHandler()
7186 mpt_signal_reset(cb_idx, ioc, MPT_IOC_SETUP_RESET); in mpt_HardResetHandler()
7188 mpt_signal_reset(cb_idx, ioc->alt_ioc, in mpt_HardResetHandler()
7216 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in mpt_HardResetHandler()
7217 if (MptResetHandlers[cb_idx]) { in mpt_HardResetHandler()
7218 mpt_signal_reset(cb_idx, ioc, MPT_IOC_POST_RESET); in mpt_HardResetHandler()
7220 mpt_signal_reset(cb_idx, in mpt_HardResetHandler()
7697 u8 cb_idx; in ProcessEventNotification() local
7766 for (cb_idx = MPT_MAX_PROTOCOL_DRIVERS-1; cb_idx; cb_idx--) { in ProcessEventNotification()
7767 if (MptEvHandlers[cb_idx]) { in ProcessEventNotification()
7770 ioc->name, cb_idx)); in ProcessEventNotification()
7771 r += (*(MptEvHandlers[cb_idx]))(ioc, pEventReply); in ProcessEventNotification()
8058 mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info, u8 cb_idx) in mpt_sas_log_info() argument
8114 sub_code_desc, MptCallbacksName[cb_idx]); in mpt_sas_log_info()
8120 sas_loginfo.dw.subcode, MptCallbacksName[cb_idx]); in mpt_sas_log_info()
8127 MptCallbacksName[cb_idx]); in mpt_sas_log_info()
8477 u8 cb_idx; in fusion_init() local
8482 for (cb_idx = 0; cb_idx < MPT_MAX_PROTOCOL_DRIVERS; cb_idx++) { in fusion_init()
8483 MptCallbacks[cb_idx] = NULL; in fusion_init()
8484 MptDriverClass[cb_idx] = MPTUNKNOWN_DRIVER; in fusion_init()
8485 MptEvHandlers[cb_idx] = NULL; in fusion_init()
8486 MptResetHandlers[cb_idx] = NULL; in fusion_init()