Lines Matching defs:sleepFlag

164 			int sleepFlag);
165 static int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag);
171 static int MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag);
172 static int GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason);
173 static int GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag);
174 static int SendIocInit(MPT_ADAPTER *ioc, int sleepFlag);
175 static int SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag);
176 static int mpt_do_upload(MPT_ADAPTER *ioc, int sleepFlag);
177 static int mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag);
178 static int mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag);
179 static int KickStart(MPT_ADAPTER *ioc, int ignore, int sleepFlag);
180 static int SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag);
182 static int WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag);
183 static int WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag);
184 static int WaitForDoorbellReply(MPT_ADAPTER *ioc, int howlong, int sleepFlag);
194 int sleepFlag);
196 static int mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag);
1169 * @sleepFlag: Use schedule if CAN_SLEEP else use udelay.
1180 mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
1211 if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) {
1224 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
1238 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
1244 if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0)
1260 * @sleepFlag: Specifies whether the process can sleep
1275 mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
1290 if (WaitForDoorbellAck(ioc, 5, sleepFlag) < 0)
2272 * @sleepFlag: Use schedule if CAN_SLEEP else use udelay.
2290 mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
2326 if ((hard_reset_done = MakeIocReady(ioc, hard, sleepFlag)) < 0) {
2351 if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0)
2361 if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0)
2375 if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) {
2381 rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason);
2454 if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0))
2466 if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) {
2483 rc = mpt_do_upload(ioc, sleepFlag);
2514 ret = SendEventNotification(ioc, 1, sleepFlag); /* 1=Enable */
2518 rc = SendEventNotification(ioc->alt_ioc, 1, sleepFlag);
2901 * @sleepFlag: Specifies whether the process can sleep
2912 MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag)
2975 if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
2982 hard_reset_done = KickStart(ioc, statefault||force, sleepFlag);
2990 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 5; /* 5 seconds */
2998 if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) {
3007 if ((r = SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) {
3021 if (sleepFlag == CAN_SLEEP) {
3065 * @sleepFlag: Specifies whether the process can sleep
3071 GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason)
3111 reply_sz, (u16*)facts, 5 /*seconds*/, sleepFlag);
3221 if ( (r = GetPortFacts(ioc, 0, sleepFlag)) != 0 )
3240 * @sleepFlag: Specifies whether the process can sleep
3245 GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
3282 reply_sz, (u16*)pfacts, 5 /*seconds*/, sleepFlag);
3321 * @sleepFlag: Specifies whether the process can sleep
3328 SendIocInit(MPT_ADAPTER *ioc, int sleepFlag)
3392 sizeof(MPIDefaultReply_t), (u16*)&init_reply, 10 /*seconds*/, sleepFlag);
3405 if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0) {
3415 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 60; /* 60 seconds */
3418 if (sleepFlag == CAN_SLEEP) {
3445 * @sleepFlag: Specifies whether the process can sleep
3452 SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
3481 300 /*seconds*/, sleepFlag);
3485 30 /*seconds*/, sleepFlag);
3559 * @sleepFlag: Specifies whether the process can sleep
3570 mpt_do_upload(MPT_ADAPTER *ioc, int sleepFlag)
3591 prequest = (sleepFlag == NO_SLEEP) ? kzalloc(ioc->req_sz, GFP_ATOMIC) :
3624 reply_sz, (u16 *)preply, 65 /*seconds*/, sleepFlag);
3661 * @sleepFlag: Specifies whether the process can sleep
3671 mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag)
3696 if (sleepFlag == CAN_SLEEP) {
3713 if (sleepFlag == CAN_SLEEP) {
3803 if (sleepFlag == CAN_SLEEP) {
3827 if ( (GetIocFacts(ioc, sleepFlag,
3843 if ((SendIocInit(ioc, sleepFlag)) != 0) {
3854 if (sleepFlag == CAN_SLEEP) {
3870 * @sleepFlag: Specifies whether the process can sleep
3892 KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
3903 SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
3905 if (sleepFlag == CAN_SLEEP) {
3912 hard_reset_done = mpt_diag_reset(ioc, force, sleepFlag);
3919 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 2; /* 2 seconds */
3927 if (sleepFlag == CAN_SLEEP) {
3945 * @sleepFlag: CAN_SLEEP if called in a non-interrupt thread,
3959 mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
3981 if (sleepFlag == CAN_SLEEP)
4012 if (sleepFlag == CAN_SLEEP)
4046 if (sleepFlag == CAN_SLEEP) {
4125 if (sleepFlag == CAN_SLEEP) {
4131 if ((count = mpt_downloadboot(ioc, cached_fw, sleepFlag)) < 0) {
4156 if (sleepFlag == CAN_SLEEP) {
4195 if (sleepFlag == CAN_SLEEP) {
4254 * @sleepFlag: Specifies whether the process can sleep
4261 SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
4270 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4276 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 15; /* 15 seconds */
4282 if (sleepFlag != CAN_SLEEP)
4291 if (sleepFlag == CAN_SLEEP) {
4640 * @sleepFlag: Specifies whether the process can sleep
4651 int replyBytes, u16 *u16reply, int maxwait, int sleepFlag)
4677 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4693 if (!failcnt && (t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4711 if ((t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4724 if (!failcnt && (t = WaitForDoorbellReply(ioc, maxwait, sleepFlag)) < 0)
4747 * @sleepFlag: Specifies whether the process can sleep
4756 WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4764 if (sleepFlag == CAN_SLEEP) {
4798 * @sleepFlag: Specifies whether the process can sleep
4806 WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4813 if (sleepFlag == CAN_SLEEP) {
4847 * @sleepFlag: Specifies whether the process can sleep
4856 WaitForDoorbellReply(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4871 if ((t = WaitForDoorbellInt(ioc, howlong, sleepFlag)) < 0) {
4876 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4893 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4902 if (!failcnt && (t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
6285 * @sleepFlag: Specifies whether the process can sleep
6288 SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
6306 sleepFlag);
6961 * @sleepFlag: Indicates if sleep or schedule must be called.
6972 mpt_SoftResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
7027 rc = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
7043 rc = GetIocFacts(ioc, sleepFlag,
7047 if (sleepFlag == CAN_SLEEP)
7059 rc = SendIocInit(ioc, sleepFlag);
7063 rc = SendEventNotification(ioc, 1, sleepFlag);
7103 * @sleepFlag: Indicates if sleep or schedule must be called.
7110 mpt_Soft_Hard_ResetHandler(MPT_ADAPTER *ioc, int sleepFlag) {
7113 ret = mpt_SoftResetHandler(ioc, sleepFlag);
7116 ret = mpt_HardResetHandler(ioc, sleepFlag);
7129 * @sleepFlag: Indicates if sleep or schedule must be called.
7143 mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
7198 rc = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, sleepFlag);