Lines Matching refs:midQ
726 wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ) in wait_for_response() argument
731 midQ->mid_state != MID_REQUEST_SUBMITTED); in wait_for_response()
1033 struct mid_q_entry *midQ[MAX_COMPOUND]; in compound_send_recv() local
1095 midQ[i] = server->ops->setup_request(ses, server, &rqst[i]); in compound_send_recv()
1096 if (IS_ERR(midQ[i])) { in compound_send_recv()
1099 cifs_delete_mid(midQ[j]); in compound_send_recv()
1105 return PTR_ERR(midQ[i]); in compound_send_recv()
1108 midQ[i]->mid_state = MID_REQUEST_SUBMITTED; in compound_send_recv()
1109 midQ[i]->optype = optype; in compound_send_recv()
1116 midQ[i]->callback = cifs_compound_callback; in compound_send_recv()
1118 midQ[i]->callback = cifs_compound_last_callback; in compound_send_recv()
1125 cifs_save_when_sent(midQ[i]); in compound_send_recv()
1163 rc = wait_for_response(server, midQ[i]); in compound_send_recv()
1170 midQ[i]->mid, le16_to_cpu(midQ[i]->command)); in compound_send_recv()
1171 send_cancel(server, &rqst[i], midQ[i]); in compound_send_recv()
1173 midQ[i]->mid_flags |= MID_WAIT_CANCELLED; in compound_send_recv()
1174 if (midQ[i]->mid_state == MID_REQUEST_SUBMITTED) { in compound_send_recv()
1175 midQ[i]->callback = cifs_cancelled_callback; in compound_send_recv()
1187 rc = cifs_sync_mid_result(midQ[i], server); in compound_send_recv()
1194 if (!midQ[i]->resp_buf || in compound_send_recv()
1195 midQ[i]->mid_state != MID_RESPONSE_RECEIVED) { in compound_send_recv()
1201 buf = (char *)midQ[i]->resp_buf; in compound_send_recv()
1203 resp_iov[i].iov_len = midQ[i]->resp_buf_size + in compound_send_recv()
1206 if (midQ[i]->large_buf) in compound_send_recv()
1211 rc = server->ops->check_receive(midQ[i], server, in compound_send_recv()
1216 midQ[i]->resp_buf = NULL; in compound_send_recv()
1242 cifs_delete_mid(midQ[i]); in compound_send_recv()
1303 struct mid_q_entry *midQ; in SendReceive() local
1343 rc = allocate_mid(ses, in_buf, &midQ); in SendReceive()
1351 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceive()
1357 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceive()
1362 cifs_save_when_sent(midQ); in SendReceive()
1372 rc = wait_for_response(server, midQ); in SendReceive()
1374 send_cancel(server, &rqst, midQ); in SendReceive()
1376 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceive()
1378 midQ->callback = DeleteMidQEntry; in SendReceive()
1386 rc = cifs_sync_mid_result(midQ, server); in SendReceive()
1392 if (!midQ->resp_buf || !out_buf || in SendReceive()
1393 midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceive()
1399 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceive()
1400 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceive()
1401 rc = cifs_check_receive(midQ, server, 0); in SendReceive()
1403 cifs_delete_mid(midQ); in SendReceive()
1441 struct mid_q_entry *midQ; in SendReceiveBlockingLock() local
1484 rc = allocate_mid(ses, in_buf, &midQ); in SendReceiveBlockingLock()
1490 rc = cifs_sign_smb(in_buf, server, &midQ->sequence_number); in SendReceiveBlockingLock()
1492 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1497 midQ->mid_state = MID_REQUEST_SUBMITTED; in SendReceiveBlockingLock()
1501 cifs_save_when_sent(midQ); in SendReceiveBlockingLock()
1509 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1515 (!(midQ->mid_state == MID_REQUEST_SUBMITTED)) || in SendReceiveBlockingLock()
1521 (midQ->mid_state == MID_REQUEST_SUBMITTED) && in SendReceiveBlockingLock()
1528 rc = send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1530 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1542 cifs_delete_mid(midQ); in SendReceiveBlockingLock()
1547 rc = wait_for_response(server, midQ); in SendReceiveBlockingLock()
1549 send_cancel(server, &rqst, midQ); in SendReceiveBlockingLock()
1551 if (midQ->mid_state == MID_REQUEST_SUBMITTED) { in SendReceiveBlockingLock()
1553 midQ->callback = DeleteMidQEntry; in SendReceiveBlockingLock()
1564 rc = cifs_sync_mid_result(midQ, server); in SendReceiveBlockingLock()
1569 if (out_buf == NULL || midQ->mid_state != MID_RESPONSE_RECEIVED) { in SendReceiveBlockingLock()
1575 *pbytes_returned = get_rfc1002_length(midQ->resp_buf); in SendReceiveBlockingLock()
1576 memcpy(out_buf, midQ->resp_buf, *pbytes_returned + 4); in SendReceiveBlockingLock()
1577 rc = cifs_check_receive(midQ, server, 0); in SendReceiveBlockingLock()
1579 cifs_delete_mid(midQ); in SendReceiveBlockingLock()