Lines Matching refs:r2t
453 struct iscsi_r2t_info *r2t; in iscsi_tcp_cleanup_task() local
460 while (kfifo_out(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*))) { in iscsi_tcp_cleanup_task()
461 kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, in iscsi_tcp_cleanup_task()
466 r2t = tcp_task->r2t; in iscsi_tcp_cleanup_task()
467 if (r2t != NULL) { in iscsi_tcp_cleanup_task()
468 kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, in iscsi_tcp_cleanup_task()
470 tcp_task->r2t = NULL; in iscsi_tcp_cleanup_task()
529 struct iscsi_r2t_info *r2t; in iscsi_tcp_r2t_rsp() local
556 rc = kfifo_out(&tcp_task->r2tpool.queue, (void*)&r2t, sizeof(void*)); in iscsi_tcp_r2t_rsp()
564 r2t->exp_statsn = rhdr->statsn; in iscsi_tcp_r2t_rsp()
565 r2t->data_length = be32_to_cpu(rhdr->data_length); in iscsi_tcp_r2t_rsp()
566 if (r2t->data_length == 0) { in iscsi_tcp_r2t_rsp()
569 kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, in iscsi_tcp_r2t_rsp()
574 if (r2t->data_length > session->max_burst) in iscsi_tcp_r2t_rsp()
577 r2t->data_length, session->max_burst); in iscsi_tcp_r2t_rsp()
579 r2t->data_offset = be32_to_cpu(rhdr->data_offset); in iscsi_tcp_r2t_rsp()
580 if (r2t->data_offset + r2t->data_length > scsi_out(task->sc)->length) { in iscsi_tcp_r2t_rsp()
583 "and total length %d\n", r2t->data_length, in iscsi_tcp_r2t_rsp()
584 r2t->data_offset, scsi_out(task->sc)->length); in iscsi_tcp_r2t_rsp()
585 kfifo_in(&tcp_task->r2tpool.queue, (void*)&r2t, in iscsi_tcp_r2t_rsp()
590 r2t->ttt = rhdr->ttt; /* no flip */ in iscsi_tcp_r2t_rsp()
591 r2t->datasn = 0; in iscsi_tcp_r2t_rsp()
592 r2t->sent = 0; in iscsi_tcp_r2t_rsp()
595 kfifo_in(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*)); in iscsi_tcp_r2t_rsp()
985 struct iscsi_r2t_info *r2t = NULL; in iscsi_tcp_get_curr_r2t() local
988 r2t = &task->unsol_r2t; in iscsi_tcp_get_curr_r2t()
991 if (tcp_task->r2t) { in iscsi_tcp_get_curr_r2t()
992 r2t = tcp_task->r2t; in iscsi_tcp_get_curr_r2t()
994 if (r2t->data_length <= r2t->sent) { in iscsi_tcp_get_curr_r2t()
996 " done with r2t %p\n", r2t); in iscsi_tcp_get_curr_r2t()
998 (void *)&tcp_task->r2t, in iscsi_tcp_get_curr_r2t()
1000 tcp_task->r2t = r2t = NULL; in iscsi_tcp_get_curr_r2t()
1004 if (r2t == NULL) { in iscsi_tcp_get_curr_r2t()
1006 (void *)&tcp_task->r2t, sizeof(void *)) != in iscsi_tcp_get_curr_r2t()
1008 r2t = NULL; in iscsi_tcp_get_curr_r2t()
1010 r2t = tcp_task->r2t; in iscsi_tcp_get_curr_r2t()
1015 return r2t; in iscsi_tcp_get_curr_r2t()
1030 struct iscsi_r2t_info *r2t; in iscsi_tcp_task_xmit() local
1050 r2t = iscsi_tcp_get_curr_r2t(task); in iscsi_tcp_task_xmit()
1051 if (r2t == NULL) { in iscsi_tcp_task_xmit()
1060 iscsi_prep_data_out_pdu(task, r2t, (struct iscsi_data *) task->hdr); in iscsi_tcp_task_xmit()
1063 r2t, r2t->datasn - 1, task->hdr->itt, in iscsi_tcp_task_xmit()
1064 r2t->data_offset + r2t->sent, r2t->data_count); in iscsi_tcp_task_xmit()
1066 rc = conn->session->tt->init_pdu(task, r2t->data_offset + r2t->sent, in iscsi_tcp_task_xmit()
1067 r2t->data_count); in iscsi_tcp_task_xmit()
1073 r2t->sent += r2t->data_count; in iscsi_tcp_task_xmit()