Lines Matching refs:rb
33 struct ishtp_cl_rb *rb; in ishtp_read_list_flush() local
38 list_for_each_entry_safe(rb, next, &cl->dev->read_list.list, list) in ishtp_read_list_flush()
39 if (rb->cl && ishtp_cl_cmp_id(cl, rb->cl)) { in ishtp_read_list_flush()
40 list_del(&rb->list); in ishtp_read_list_flush()
41 ishtp_io_rb_free(rb); in ishtp_read_list_flush()
442 struct ishtp_cl_rb *rb; in ishtp_cl_read_start() local
472 rb = NULL; in ishtp_cl_read_start()
476 rb = list_entry(cl->free_rb_list.list.next, struct ishtp_cl_rb, list); in ishtp_cl_read_start()
477 list_del_init(&rb->list); in ishtp_cl_read_start()
480 rb->cl = cl; in ishtp_cl_read_start()
481 rb->buf_idx = 0; in ishtp_cl_read_start()
483 INIT_LIST_HEAD(&rb->list); in ishtp_cl_read_start()
491 list_add_tail(&rb->list, &dev->read_list.list); in ishtp_cl_read_start()
499 if (rets && rb) { in ishtp_cl_read_start()
501 list_del(&rb->list); in ishtp_cl_read_start()
505 list_add_tail(&rb->list, &cl->free_rb_list.list); in ishtp_cl_read_start()
602 static void ishtp_cl_read_complete(struct ishtp_cl_rb *rb) in ishtp_cl_read_complete() argument
606 struct ishtp_cl *cl = rb->cl; in ishtp_cl_read_complete()
614 list_add_tail(&rb->list, &cl->in_process_list.list); in ishtp_cl_read_complete()
812 struct ishtp_cl_rb *rb; in recv_ishtp_cl_msg() local
832 list_for_each_entry(rb, &dev->read_list.list, list) { in recv_ishtp_cl_msg()
834 cl = rb->cl; in recv_ishtp_cl_msg()
841 if (rb->buffer.size == 0 || rb->buffer.data == NULL) { in recv_ishtp_cl_msg()
845 list_del(&rb->list); in recv_ishtp_cl_msg()
846 ishtp_io_rb_free(rb); in recv_ishtp_cl_msg()
857 if (rb->buffer.size < ishtp_hdr->length + rb->buf_idx) { in recv_ishtp_cl_msg()
861 rb->buffer.size, ishtp_hdr->length, in recv_ishtp_cl_msg()
862 rb->buf_idx); in recv_ishtp_cl_msg()
863 list_del(&rb->list); in recv_ishtp_cl_msg()
864 ishtp_cl_io_rb_recycle(rb); in recv_ishtp_cl_msg()
869 buffer = rb->buffer.data + rb->buf_idx; in recv_ishtp_cl_msg()
872 rb->buf_idx += ishtp_hdr->length; in recv_ishtp_cl_msg()
876 list_del(&rb->list); in recv_ishtp_cl_msg()
877 complete_rb = rb; in recv_ishtp_cl_msg()
945 struct ishtp_cl_rb *rb; in recv_ishtp_cl_msg_dma() local
953 list_for_each_entry(rb, &dev->read_list.list, list) { in recv_ishtp_cl_msg_dma()
954 cl = rb->cl; in recv_ishtp_cl_msg_dma()
963 if (rb->buffer.size == 0 || rb->buffer.data == NULL) { in recv_ishtp_cl_msg_dma()
967 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
968 ishtp_io_rb_free(rb); in recv_ishtp_cl_msg_dma()
979 if (rb->buffer.size < hbm->msg_length) { in recv_ishtp_cl_msg_dma()
983 rb->buffer.size, hbm->msg_length, rb->buf_idx); in recv_ishtp_cl_msg_dma()
984 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
985 ishtp_cl_io_rb_recycle(rb); in recv_ishtp_cl_msg_dma()
990 buffer = rb->buffer.data; in recv_ishtp_cl_msg_dma()
992 rb->buf_idx = hbm->msg_length; in recv_ishtp_cl_msg_dma()
996 list_del(&rb->list); in recv_ishtp_cl_msg_dma()
997 complete_rb = rb; in recv_ishtp_cl_msg_dma()