Lines Matching refs:midQ
718 wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ) in wait_for_response() argument
723 midQ->mid_state != MID_REQUEST_SUBMITTED); in wait_for_response()
1025 struct mid_q_entry *midQ[MAX_COMPOUND]; in compound_send_recv() local
1087 midQ[i] = server->ops->setup_request(ses, server, &rqst[i]); in compound_send_recv()
1088 if (IS_ERR(midQ[i])) { in compound_send_recv()
1091 cifs_delete_mid(midQ[j]); in compound_send_recv()
1097 return PTR_ERR(midQ[i]); in compound_send_recv()
1100 midQ[i]->mid_state = MID_REQUEST_SUBMITTED; in compound_send_recv()
1101 midQ[i]->optype = optype; in compound_send_recv()
1108 midQ[i]->callback = cifs_compound_callback; in compound_send_recv()
1110 midQ[i]->callback = cifs_compound_last_callback; in compound_send_recv()
1117 cifs_save_when_sent(midQ[i]); in compound_send_recv()
1152 rc = wait_for_response(server, midQ[i]); in compound_send_recv()
1159 midQ[i]->mid, le16_to_cpu(midQ[i]->command)); in compound_send_recv()
1160 send_cancel(server, &rqst[i], midQ[i]); in compound_send_recv()
1162 midQ[i]->mid_flags |= MID_WAIT_CANCELLED; in compound_send_recv()
1163 if (midQ[i]->mid_state == MID_REQUEST_SUBMITTED) { in compound_send_recv()
1164 midQ[i]->callback = cifs_cancelled_callback; in compound_send_recv()
1176 rc = cifs_sync_mid_result(midQ[i], server); in compound_send_recv()
1183 if (!midQ[i]->resp_buf || in compound_send_recv()
1184 midQ[i]->mid_state != MID_RESPONSE_RECEIVED) { in compound_send_recv()
1190 buf = (char *)midQ[i]->resp_buf; in compound_send_recv()
1192 resp_iov[i].iov_len = midQ[i]->resp_buf_size + in compound_send_recv()
1195 if (midQ[i]->large_buf) in compound_send_recv()
1200 rc = server->ops->check_receive(midQ[i], server, in compound_send_recv()
1205 midQ[i]->resp_buf = NULL; in compound_send_recv()
1229 cifs_delete_mid(midQ[i]); in compound_send_recv()
1290 struct mid_q_entry *midQ; in SendReceive() local
1330 rc = allocate_mid(ses, in_buf, &midQ); in SendReceive()
1338 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceive()
1344 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceive()
1349 cifs_save_when_sent(midQ); in SendReceive()
1359 rc = wait_for_response(server, midQ); in SendReceive()
1361 send_cancel(server, &rqst, midQ); in SendReceive()
1363 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceive()
1365 midQ->callback = DeleteMidQEntry; in SendReceive()
1373 rc = cifs_sync_mid_result(midQ, server); in SendReceive()
1379 if (!midQ->resp_buf || !out_buf || in SendReceive()
1380 midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceive()
1386 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceive()
1387 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceive()
1388 rc = cifs_check_receive(midQ, server, 0); in SendReceive()
1390 cifs_delete_mid(midQ); in SendReceive()
1428 struct mid_q_entry *midQ; in SendReceiveBlockingLock() local
1471 rc = allocate_mid(ses, in_buf, &midQ); in SendReceiveBlockingLock()
1477 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceiveBlockingLock()
1479 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1484 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceiveBlockingLock()
1488 cifs_save_when_sent(midQ); in SendReceiveBlockingLock()
1496 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1502 (!(midQ->mid_state == MID_REQUEST_SUBMITTED)) || in SendReceiveBlockingLock()
1508 (midQ->mid_state == MID_REQUEST_SUBMITTED) && in SendReceiveBlockingLock()
1515 rc = send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1517 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1529 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1534 rc = wait_for_response(server, midQ); in SendReceiveBlockingLock()
1536 send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1538 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceiveBlockingLock()
1540 midQ->callback = DeleteMidQEntry; in SendReceiveBlockingLock()
1551 rc = cifs_sync_mid_result(midQ, server); in SendReceiveBlockingLock()
1556 if (out_buf == NULL || midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceiveBlockingLock()
1562 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceiveBlockingLock()
1563 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceiveBlockingLock()
1564 rc = cifs_check_receive(midQ, server, 0); in SendReceiveBlockingLock()
1566 cifs_delete_mid(midQ); in SendReceiveBlockingLock()