Lines Matching refs:ring
78 struct safexcel_desc_ring *ring, in safexcel_ring_next_cwptr() argument
82 void *ptr = ring->write; in safexcel_ring_next_cwptr()
85 *atoken = ring->shwrite; in safexcel_ring_next_cwptr()
87 if ((ring->write == ring->read - ring->offset) || in safexcel_ring_next_cwptr()
88 (ring->read == ring->base && ring->write == ring->base_end)) in safexcel_ring_next_cwptr()
91 if (ring->write == ring->base_end) { in safexcel_ring_next_cwptr()
92 ring->write = ring->base; in safexcel_ring_next_cwptr()
93 ring->shwrite = ring->shbase; in safexcel_ring_next_cwptr()
95 ring->write += ring->offset; in safexcel_ring_next_cwptr()
96 ring->shwrite += ring->shoffset; in safexcel_ring_next_cwptr()
103 struct safexcel_desc_ring *ring, in safexcel_ring_next_rwptr() argument
106 void *ptr = ring->write; in safexcel_ring_next_rwptr()
109 *rtoken = ring->write + ring->shoffset; in safexcel_ring_next_rwptr()
111 if ((ring->write == ring->read - ring->offset) || in safexcel_ring_next_rwptr()
112 (ring->read == ring->base && ring->write == ring->base_end)) in safexcel_ring_next_rwptr()
115 if (ring->write == ring->base_end) in safexcel_ring_next_rwptr()
116 ring->write = ring->base; in safexcel_ring_next_rwptr()
118 ring->write += ring->offset; in safexcel_ring_next_rwptr()
124 struct safexcel_desc_ring *ring) in safexcel_ring_next_rptr() argument
126 void *ptr = ring->read; in safexcel_ring_next_rptr()
128 if (ring->write == ring->read) in safexcel_ring_next_rptr()
131 if (ring->read == ring->base_end) in safexcel_ring_next_rptr()
132 ring->read = ring->base; in safexcel_ring_next_rptr()
134 ring->read += ring->offset; in safexcel_ring_next_rptr()
140 int ring) in safexcel_ring_curr_rptr() argument
142 struct safexcel_desc_ring *rdr = &priv->ring[ring].rdr; in safexcel_ring_curr_rptr()
148 int ring) in safexcel_ring_first_rdr_index() argument
150 struct safexcel_desc_ring *rdr = &priv->ring[ring].rdr; in safexcel_ring_first_rdr_index()
156 int ring, in safexcel_ring_rdr_rdesc_index() argument
159 struct safexcel_desc_ring *rdr = &priv->ring[ring].rdr; in safexcel_ring_rdr_rdesc_index()
165 struct safexcel_desc_ring *ring) in safexcel_ring_rollback_wptr() argument
167 if (ring->write == ring->read) in safexcel_ring_rollback_wptr()
170 if (ring->write == ring->base) { in safexcel_ring_rollback_wptr()
171 ring->write = ring->base_end; in safexcel_ring_rollback_wptr()
172 ring->shwrite = ring->shbase_end; in safexcel_ring_rollback_wptr()
174 ring->write -= ring->offset; in safexcel_ring_rollback_wptr()
175 ring->shwrite -= ring->shoffset; in safexcel_ring_rollback_wptr()
189 cdesc = safexcel_ring_next_cwptr(priv, &priv->ring[ring_id].cdr, in safexcel_add_cdesc()
232 rdesc = safexcel_ring_next_rwptr(priv, &priv->ring[ring_id].rdr, in safexcel_add_rdesc()