Lines Matching refs:dr

118 static inline u32 vdc_tx_dring_avail(struct vio_dring_state *dr)  in vdc_tx_dring_avail()  argument
120 return vio_dring_avail(dr, VDC_TX_RING_SIZE); in vdc_tx_dring_avail()
178 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_blk_queue_start() local
184 if (port->disk && vdc_tx_dring_avail(dr) * 100 / VDC_TX_RING_SIZE >= 50) in vdc_blk_queue_start()
304 static void vdc_end_one(struct vdc_port *port, struct vio_dring_state *dr, in vdc_end_one() argument
307 struct vio_disk_desc *desc = vio_dring_entry(dr, index); in vdc_end_one()
316 dr->cons = vio_dring_next(dr, index); in vdc_end_one()
333 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_ack() local
336 if (unlikely(pkt->dring_ident != dr->ident || in vdc_ack()
341 vdc_end_one(port, dr, pkt->start_idx); in vdc_ack()
424 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in __vdc_tx_trigger() local
432 .dring_ident = dr->ident, in __vdc_tx_trigger()
433 .start_idx = dr->prod, in __vdc_tx_trigger()
434 .end_idx = dr->prod, in __vdc_tx_trigger()
439 hdr.seq = dr->snd_nxt; in __vdc_tx_trigger()
444 dr->snd_nxt++; in __vdc_tx_trigger()
462 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in __send_request() local
491 desc = vio_dring_cur(dr); in __send_request()
501 rqe = &port->rq_arr[dr->prod]; in __send_request()
528 dr->prod = vio_dring_next(dr, dr->prod); in __send_request()
538 struct vio_dring_state *dr; in vdc_queue_rq() local
541 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_queue_rq()
555 if (unlikely(vdc_tx_dring_avail(dr) < 1)) { in vdc_queue_rq()
572 struct vio_dring_state *dr; in generic_request() local
654 dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in generic_request()
659 desc = vio_dring_cur(dr); in generic_request()
692 dr->prod = vio_dring_next(dr, dr->prod); in generic_request()
712 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_alloc_tx_ring() local
723 dr->cookies, &ncookies, in vdc_alloc_tx_ring()
730 dr->base = dring; in vdc_alloc_tx_ring()
731 dr->entry_size = entry_size; in vdc_alloc_tx_ring()
732 dr->num_entries = VDC_TX_RING_SIZE; in vdc_alloc_tx_ring()
733 dr->prod = dr->cons = 0; in vdc_alloc_tx_ring()
734 dr->pending = VDC_TX_RING_SIZE; in vdc_alloc_tx_ring()
735 dr->ncookies = ncookies; in vdc_alloc_tx_ring()
742 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_free_tx_ring() local
744 if (dr->base) { in vdc_free_tx_ring()
745 ldc_free_exp_dring(port->vio.lp, dr->base, in vdc_free_tx_ring()
746 (dr->entry_size * dr->num_entries), in vdc_free_tx_ring()
747 dr->cookies, dr->ncookies); in vdc_free_tx_ring()
748 dr->base = NULL; in vdc_free_tx_ring()
749 dr->entry_size = 0; in vdc_free_tx_ring()
750 dr->num_entries = 0; in vdc_free_tx_ring()
751 dr->pending = 0; in vdc_free_tx_ring()
752 dr->ncookies = 0; in vdc_free_tx_ring()
1101 struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; in vdc_requeue_inflight() local
1104 for (idx = dr->cons; idx != dr->prod; idx = vio_dring_next(dr, idx)) { in vdc_requeue_inflight()
1105 struct vio_disk_desc *desc = vio_dring_entry(dr, idx); in vdc_requeue_inflight()
1111 dr->cons = vio_dring_next(dr, idx); in vdc_requeue_inflight()