Lines Matching refs:ioctl_cmds
183 if (!mutex_trylock(&ioc->ioctl_cmds.mutex))
186 if (mutex_lock_interruptible(&ioc->ioctl_cmds.mutex))
217 if (ioc->ioctl_cmds.msg_context != req->u.hdr.MsgContext)
220 ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_COMMAND_GOOD;
225 ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_RF_VALID;
227 memcpy(ioc->ioctl_cmds.reply, reply, sz);
255 memcpy(ioc->ioctl_cmds.sense, sense_data, sz);
256 ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_SENSE_VALID;
263 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) {
266 ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
267 complete(&ioc->ioctl_cmds.done);
271 ioc->ioctl_cmds.status &= ~MPT_MGMT_STATUS_PENDING;
272 complete(&ioc->ioctl_cmds.done);
478 CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status)
485 CLEAR_MGMT_PENDING_STATUS(ioc->ioctl_cmds.status)
537 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_PENDING) {
538 ioc->ioctl_cmds.status |= MPT_MGMT_STATUS_DID_IOCRESET;
539 complete(&ioc->ioctl_cmds.done);
692 mutex_unlock(&iocp->ioctl_cmds.mutex);
943 SET_MGMT_MSG_CONTEXT(iocp->ioctl_cmds.msg_context, dlmsg->MsgContext);
944 INITIALIZE_MGMT_STATUS(iocp->ioctl_cmds.status)
949 timeleft = wait_for_completion_timeout(&iocp->ioctl_cmds.done, HZ*60);
950 if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
953 if (iocp->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
967 if (!(iocp->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID)) {
977 ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply;
1002 CLEAR_MGMT_STATUS(iocp->ioctl_cmds.status);
1003 SET_MGMT_MSG_CONTEXT(iocp->ioctl_cmds.msg_context, 0);
2260 SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, hdr->MsgContext);
2261 INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status)
2295 timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done,
2297 if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
2301 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
2329 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID) {
2332 4*ioc->ioctl_cmds.reply[2]);
2334 sz = min(ioc->reply_sz, 4*ioc->ioctl_cmds.reply[2]);
2338 ioc->ioctl_cmds.reply, sz)){
2351 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_SENSE_VALID) {
2355 ioc->ioctl_cmds.sense, sz)) {
2369 if ((ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD) &&
2384 CLEAR_MGMT_STATUS(ioc->ioctl_cmds.status)
2385 SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0);
2603 SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context,
2605 INITIALIZE_MGMT_STATUS(ioc->ioctl_cmds.status)
2609 timeleft = wait_for_completion_timeout(&ioc->ioctl_cmds.done,
2611 if (!(ioc->ioctl_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
2614 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET) {
2637 if (ioc->ioctl_cmds.status & MPT_MGMT_STATUS_RF_VALID)
2641 CLEAR_MGMT_STATUS(ioc->ioctl_cmds.status)
2642 SET_MGMT_MSG_CONTEXT(ioc->ioctl_cmds.msg_context, 0);
2867 mutex_unlock(&iocp->ioctl_cmds.mutex);
2921 mutex_unlock(&iocp->ioctl_cmds.mutex);
2975 mutex_init(&ioc->ioctl_cmds.mutex);
2976 init_completion(&ioc->ioctl_cmds.done);