Lines Matching refs:server
39 send_nt_cancel(struct TCP_Server_Info *server, void *buf, in send_nt_cancel() argument
51 mutex_lock(&server->srv_mutex); in send_nt_cancel()
52 rc = cifs_sign_smb(in_buf, server, &mid->sequence_number); in send_nt_cancel()
54 mutex_unlock(&server->srv_mutex); in send_nt_cancel()
63 --server->sequence_number; in send_nt_cancel()
64 rc = smb_send(server, in_buf, be32_to_cpu(in_buf->smb_buf_length)); in send_nt_cancel()
66 server->sequence_number--; in send_nt_cancel()
68 mutex_unlock(&server->srv_mutex); in send_nt_cancel()
98 cifs_find_mid(struct TCP_Server_Info *server, char *buffer) in cifs_find_mid() argument
104 list_for_each_entry(mid, &server->pending_mid_q, qhead) { in cifs_find_mid()
117 cifs_add_credits(struct TCP_Server_Info *server, const unsigned int add, in cifs_add_credits() argument
120 spin_lock(&server->req_lock); in cifs_add_credits()
121 server->credits += add; in cifs_add_credits()
122 server->in_flight--; in cifs_add_credits()
123 spin_unlock(&server->req_lock); in cifs_add_credits()
124 wake_up(&server->request_q); in cifs_add_credits()
128 cifs_set_credits(struct TCP_Server_Info *server, const int val) in cifs_set_credits() argument
130 spin_lock(&server->req_lock); in cifs_set_credits()
131 server->credits = val; in cifs_set_credits()
132 server->oplocks = val > 1 ? enable_oplocks : false; in cifs_set_credits()
133 spin_unlock(&server->req_lock); in cifs_set_credits()
137 cifs_get_credits_field(struct TCP_Server_Info *server, const int optype) in cifs_get_credits_field() argument
139 return &server->credits; in cifs_get_credits_field()
170 cifs_get_next_mid(struct TCP_Server_Info *server) in cifs_get_next_mid() argument
179 cur_mid = (__u16)((server->CurrentMid) & 0xffff); in cifs_get_next_mid()
202 list_for_each_entry(mid_entry, &server->pending_mid_q, qhead) { in cifs_get_next_mid()
223 server->tcpStatus = CifsNeedReconnect; in cifs_get_next_mid()
227 server->CurrentMid = mid; in cifs_get_next_mid()
377 cifs_downgrade_oplock(struct TCP_Server_Info *server, in cifs_downgrade_oplock() argument
387 cifs_check_trans2(struct mid_q_entry *mid, struct TCP_Server_Info *server, in cifs_check_trans2() argument
405 if (!server->large_buf) { in cifs_check_trans2()
412 server->bigbuf = NULL; in cifs_check_trans2()
418 cifs_need_neg(struct TCP_Server_Info *server) in cifs_need_neg() argument
420 return server->maxBuf == 0; in cifs_need_neg()
430 set_credits(ses->server, 1); in cifs_negotiate()
442 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_wsize() local
462 if (!(server->capabilities & CAP_LARGE_WRITE_X) || in cifs_negotiate_wsize()
463 (!(server->capabilities & CAP_UNIX) && server->sign)) in cifs_negotiate_wsize()
465 server->maxBuf - sizeof(WRITE_REQ) + 4); in cifs_negotiate_wsize()
477 struct TCP_Server_Info *server = tcon->ses->server; in cifs_negotiate_rsize() local
494 else if (server->capabilities & CAP_LARGE_READ_X) in cifs_negotiate_rsize()
497 defsize = server->maxBuf - sizeof(READ_RSP); in cifs_negotiate_rsize()
505 if (!(server->capabilities & CAP_LARGE_READ_X)) in cifs_negotiate_rsize()