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);
1173 * @sleepFlag: Use schedule if CAN_SLEEP else use udelay.
1184 mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
1215 if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) {
1228 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
1242 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
1248 if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0)
1264 * @sleepFlag: Specifies whether the process can sleep
1279 mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
1296 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
2281 * @sleepFlag: Use schedule if CAN_SLEEP else use udelay.
2299 mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
2335 if ((hard_reset_done = MakeIocReady(ioc, hard, sleepFlag)) < 0) {
2360 if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0)
2370 if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0)
2384 if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) {
2390 rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason);
2463 if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0))
2475 if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) {
2492 rc = mpt_do_upload(ioc, sleepFlag);
2523 ret = SendEventNotification(ioc, 1, sleepFlag); /* 1=Enable */
2527 rc = SendEventNotification(ioc->alt_ioc, 1, sleepFlag);
2910 * @sleepFlag: Specifies whether the process can sleep
2921 MakeIocReady(MPT_ADAPTER *ioc, int force, int sleepFlag)
2984 if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
2991 hard_reset_done = KickStart(ioc, statefault||force, sleepFlag);
2999 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 5; /* 5 seconds */
3007 if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) {
3016 if ((r = SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) {
3030 if (sleepFlag == CAN_SLEEP) {
3074 * @sleepFlag: Specifies whether the process can sleep
3080 GetIocFacts(MPT_ADAPTER *ioc, int sleepFlag, int reason)
3120 reply_sz, (u16*)facts, 5 /*seconds*/, sleepFlag);
3231 if ( (r = GetPortFacts(ioc, 0, sleepFlag)) != 0 )
3250 * @sleepFlag: Specifies whether the process can sleep
3255 GetPortFacts(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
3292 reply_sz, (u16*)pfacts, 5 /*seconds*/, sleepFlag);
3331 * @sleepFlag: Specifies whether the process can sleep
3338 SendIocInit(MPT_ADAPTER *ioc, int sleepFlag)
3402 sizeof(MPIDefaultReply_t), (u16*)&init_reply, 10 /*seconds*/, sleepFlag);
3415 if ((r = SendPortEnable(ioc, 0, sleepFlag)) != 0) {
3425 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 60; /* 60 seconds */
3428 if (sleepFlag == CAN_SLEEP) {
3455 * @sleepFlag: Specifies whether the process can sleep
3462 SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag)
3491 300 /*seconds*/, sleepFlag);
3495 30 /*seconds*/, sleepFlag);
3567 * @sleepFlag: Specifies whether the process can sleep
3578 mpt_do_upload(MPT_ADAPTER *ioc, int sleepFlag)
3599 prequest = (sleepFlag == NO_SLEEP) ? kzalloc(ioc->req_sz, GFP_ATOMIC) :
3632 reply_sz, (u16 *)preply, 65 /*seconds*/, sleepFlag);
3669 * @sleepFlag: Specifies whether the process can sleep
3679 mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag)
3704 if (sleepFlag == CAN_SLEEP) {
3721 if (sleepFlag == CAN_SLEEP) {
3811 if (sleepFlag == CAN_SLEEP) {
3835 if ( (GetIocFacts(ioc, sleepFlag,
3851 if ((SendIocInit(ioc, sleepFlag)) != 0) {
3862 if (sleepFlag == CAN_SLEEP) {
3878 * @sleepFlag: Specifies whether the process can sleep
3900 KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
3911 SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
3913 if (sleepFlag == CAN_SLEEP) {
3920 hard_reset_done = mpt_diag_reset(ioc, force, sleepFlag);
3927 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 2; /* 2 seconds */
3935 if (sleepFlag == CAN_SLEEP) {
3953 * @sleepFlag: CAN_SLEEP if called in a non-interrupt thread,
3967 mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag)
3989 if (sleepFlag == CAN_SLEEP)
4020 if (sleepFlag == CAN_SLEEP)
4054 if (sleepFlag == CAN_SLEEP) {
4133 if (sleepFlag == CAN_SLEEP) {
4139 if ((count = mpt_downloadboot(ioc, cached_fw, sleepFlag)) < 0) {
4164 if (sleepFlag == CAN_SLEEP) {
4203 if (sleepFlag == CAN_SLEEP) {
4262 * @sleepFlag: Specifies whether the process can sleep
4269 SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
4278 if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4284 cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 15; /* 15 seconds */
4290 if (sleepFlag != CAN_SLEEP)
4299 if (sleepFlag == CAN_SLEEP) {
4649 * @sleepFlag: Specifies whether the process can sleep
4660 int replyBytes, u16 *u16reply, int maxwait, int sleepFlag)
4686 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4702 if (!failcnt && (t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4720 if ((t = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
4733 if (!failcnt && (t = WaitForDoorbellReply(ioc, maxwait, sleepFlag)) < 0)
4756 * @sleepFlag: Specifies whether the process can sleep
4765 WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4773 if (sleepFlag == CAN_SLEEP) {
4807 * @sleepFlag: Specifies whether the process can sleep
4815 WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4822 if (sleepFlag == CAN_SLEEP) {
4856 * @sleepFlag: Specifies whether the process can sleep
4865 WaitForDoorbellReply(MPT_ADAPTER *ioc, int howlong, int sleepFlag)
4880 if ((t = WaitForDoorbellInt(ioc, howlong, sleepFlag)) < 0) {
4885 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4902 if ((t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
4911 if (!failcnt && (t = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0)
6273 * @sleepFlag: Specifies whether the process can sleep
6276 SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch, int sleepFlag)
6294 sleepFlag);
6959 * @sleepFlag: Indicates if sleep or schedule must be called.
6970 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);