Lines Matching refs:midQ

752 wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)  in wait_for_response()  argument
757 midQ->mid_state != MID_REQUEST_SUBMITTED, in wait_for_response()
1058 struct mid_q_entry *midQ[MAX_COMPOUND]; in compound_send_recv() local
1124 midQ[i] = server->ops->setup_request(ses, server, &rqst[i]); in compound_send_recv()
1125 if (IS_ERR(midQ[i])) { in compound_send_recv()
1128 delete_mid(midQ[j]); in compound_send_recv()
1134 return PTR_ERR(midQ[i]); in compound_send_recv()
1137 midQ[i]->mid_state = MID_REQUEST_SUBMITTED; in compound_send_recv()
1138 midQ[i]->optype = optype; in compound_send_recv()
1145 midQ[i]->callback = cifs_compound_callback; in compound_send_recv()
1147 midQ[i]->callback = cifs_compound_last_callback; in compound_send_recv()
1154 cifs_save_when_sent(midQ[i]); in compound_send_recv()
1197 rc = wait_for_response(server, midQ[i]); in compound_send_recv()
1204 midQ[i]->mid, le16_to_cpu(midQ[i]->command)); in compound_send_recv()
1205 send_cancel(server, &rqst[i], midQ[i]); in compound_send_recv()
1207 midQ[i]->mid_flags |= MID_WAIT_CANCELLED; in compound_send_recv()
1208 if (midQ[i]->mid_state == MID_REQUEST_SUBMITTED) { in compound_send_recv()
1209 midQ[i]->callback = cifs_cancelled_callback; in compound_send_recv()
1221 rc = cifs_sync_mid_result(midQ[i], server); in compound_send_recv()
1228 if (!midQ[i]->resp_buf || in compound_send_recv()
1229 midQ[i]->mid_state != MID_RESPONSE_RECEIVED) { in compound_send_recv()
1235 buf = (char *)midQ[i]->resp_buf; in compound_send_recv()
1237 resp_iov[i].iov_len = midQ[i]->resp_buf_size + in compound_send_recv()
1240 if (midQ[i]->large_buf) in compound_send_recv()
1245 rc = server->ops->check_receive(midQ[i], server, in compound_send_recv()
1250 midQ[i]->resp_buf = NULL; in compound_send_recv()
1280 delete_mid(midQ[i]); in compound_send_recv()
1341 struct mid_q_entry *midQ; in SendReceive() local
1385 rc = allocate_mid(ses, in_buf, &midQ); in SendReceive()
1393 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceive()
1399 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceive()
1404 cifs_save_when_sent(midQ); in SendReceive()
1414 rc = wait_for_response(server, midQ); in SendReceive()
1416 send_cancel(server, &rqst, midQ); in SendReceive()
1418 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceive()
1420 midQ->callback = release_mid; in SendReceive()
1428 rc = cifs_sync_mid_result(midQ, server); in SendReceive()
1434 if (!midQ->resp_buf || !out_buf || in SendReceive()
1435 midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceive()
1441 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceive()
1442 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceive()
1443 rc = cifs_check_receive(midQ, server, 0); in SendReceive()
1445 delete_mid(midQ); in SendReceive()
1483 struct mid_q_entry *midQ; in SendReceiveBlockingLock() local
1530 rc = allocate_mid(ses, in_buf, &midQ); in SendReceiveBlockingLock()
1536 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceiveBlockingLock()
1538 delete_mid(midQ); in SendReceiveBlockingLock()
1543 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceiveBlockingLock()
1547 cifs_save_when_sent(midQ); in SendReceiveBlockingLock()
1555 delete_mid(midQ); in SendReceiveBlockingLock()
1561 (!(midQ->mid_state == MID_REQUEST_SUBMITTED)) || in SendReceiveBlockingLock()
1568 (midQ->mid_state == MID_REQUEST_SUBMITTED) && in SendReceiveBlockingLock()
1576 rc = send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1578 delete_mid(midQ); in SendReceiveBlockingLock()
1590 delete_mid(midQ); in SendReceiveBlockingLock()
1595 rc = wait_for_response(server, midQ); in SendReceiveBlockingLock()
1597 send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1599 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceiveBlockingLock()
1601 midQ->callback = release_mid; in SendReceiveBlockingLock()
1614 rc = cifs_sync_mid_result(midQ, server); in SendReceiveBlockingLock()
1619 if (out_buf == NULL || midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceiveBlockingLock()
1625 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceiveBlockingLock()
1626 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceiveBlockingLock()
1627 rc = cifs_check_receive(midQ, server, 0); in SendReceiveBlockingLock()
1629 delete_mid(midQ); in SendReceiveBlockingLock()