Lines Matching full:rb
43 struct ishtp_cl_rb *rb; in ishtp_read_list_flush() local
48 list_for_each_entry_safe(rb, next, &cl->dev->read_list.list, list) in ishtp_read_list_flush()
49 if (rb->cl && ishtp_cl_cmp_id(cl, rb->cl)) { in ishtp_read_list_flush()
50 list_del(&rb->list); in ishtp_read_list_flush()
51 ishtp_io_rb_free(rb); in ishtp_read_list_flush()
447 struct ishtp_cl_rb *rb; in ishtp_cl_read_start() local
471 /* The current rb is the head of the free rb list */ in ishtp_cl_read_start()
477 rb = NULL; in ishtp_cl_read_start()
481 rb = list_entry(cl->free_rb_list.list.next, struct ishtp_cl_rb, list); in ishtp_cl_read_start()
482 list_del_init(&rb->list); in ishtp_cl_read_start()
485 rb->cl = cl; in ishtp_cl_read_start()
486 rb->buf_idx = 0; in ishtp_cl_read_start()
488 INIT_LIST_HEAD(&rb->list); in ishtp_cl_read_start()
496 list_add_tail(&rb->list, &dev->read_list.list); in ishtp_cl_read_start()
503 /* if ishtp_hbm_cl_flow_control_req failed, return rb to free list */ in ishtp_cl_read_start()
504 if (rets && rb) { in ishtp_cl_read_start()
506 list_del(&rb->list); in ishtp_cl_read_start()
510 list_add_tail(&rb->list, &cl->free_rb_list.list); in ishtp_cl_read_start()
604 * @rb: Pointer to client request block
609 static void ishtp_cl_read_complete(struct ishtp_cl_rb *rb) in ishtp_cl_read_complete() argument
613 struct ishtp_cl *cl = rb->cl; in ishtp_cl_read_complete()
621 list_add_tail(&rb->list, &cl->in_process_list.list); in ishtp_cl_read_complete()
821 struct ishtp_cl_rb *rb; in recv_ishtp_cl_msg() local
841 list_for_each_entry(rb, &dev->read_list.list, list) { in recv_ishtp_cl_msg()
843 cl = rb->cl; in recv_ishtp_cl_msg()
849 /* If no Rx buffer is allocated, disband the rb */ in recv_ishtp_cl_msg()
850 if (rb->buffer.size == 0 || rb->buffer.data == NULL) { in recv_ishtp_cl_msg()
854 list_del(&rb->list); in recv_ishtp_cl_msg()
855 ishtp_io_rb_free(rb); in recv_ishtp_cl_msg()
866 if (rb->buffer.size < ishtp_hdr->length + rb->buf_idx) { in recv_ishtp_cl_msg()
870 rb->buffer.size, ishtp_hdr->length, in recv_ishtp_cl_msg()
871 rb->buf_idx); in recv_ishtp_cl_msg()
872 list_del(&rb->list); in recv_ishtp_cl_msg()
873 ishtp_cl_io_rb_recycle(rb); in recv_ishtp_cl_msg()
878 buffer = rb->buffer.data + rb->buf_idx; in recv_ishtp_cl_msg()
881 rb->buf_idx += ishtp_hdr->length; in recv_ishtp_cl_msg()
885 list_del(&rb->list); in recv_ishtp_cl_msg()
886 complete_rb = rb; in recv_ishtp_cl_msg()
891 * rb buffer for the next coming msg in recv_ishtp_cl_msg()
954 struct ishtp_cl_rb *rb; in recv_ishtp_cl_msg_dma() local
962 list_for_each_entry(rb, &dev->read_list.list, list) { in recv_ishtp_cl_msg_dma()
963 cl = rb->cl; in recv_ishtp_cl_msg_dma()
970 * If no Rx buffer is allocated, disband the rb in recv_ishtp_cl_msg_dma()
972 if (rb->buffer.size == 0 || rb->buffer.data == NULL) { in recv_ishtp_cl_msg_dma()
976 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
977 ishtp_io_rb_free(rb); in recv_ishtp_cl_msg_dma()
988 if (rb->buffer.size < hbm->msg_length) { in recv_ishtp_cl_msg_dma()
992 rb->buffer.size, hbm->msg_length, rb->buf_idx); in recv_ishtp_cl_msg_dma()
993 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
994 ishtp_cl_io_rb_recycle(rb); in recv_ishtp_cl_msg_dma()
999 buffer = rb->buffer.data; in recv_ishtp_cl_msg_dma()
1001 rb->buf_idx = hbm->msg_length; in recv_ishtp_cl_msg_dma()
1005 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
1006 complete_rb = rb; in recv_ishtp_cl_msg_dma()
1011 * rb buffer for the next coming msg in recv_ishtp_cl_msg_dma()