Lines Matching defs:wq

143 static int free_wq_copy_descs(struct fnic *fnic, struct vnic_wq_copy *wq)
153 if (wq->to_clean_index <= fnic->fw_ack_index[0])
154 wq->ring.desc_avail += (fnic->fw_ack_index[0]
155 - wq->to_clean_index + 1);
157 wq->ring.desc_avail += (wq->ring.desc_count
158 - wq->to_clean_index
166 wq->to_clean_index =
167 (fnic->fw_ack_index[0] + 1) % wq->ring.desc_count;
208 struct vnic_wq_copy *wq = &fnic->wq_copy[0];
224 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0])
225 free_wq_copy_descs(fnic, wq);
227 if (!vnic_wq_copy_desc_avail(wq))
230 fnic_queue_wq_copy_desc_fw_reset(wq, SCSI_NO_TAG);
261 struct vnic_wq_copy *wq = &fnic->wq_copy[0];
270 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0])
271 free_wq_copy_descs(fnic, wq);
273 if (!vnic_wq_copy_desc_avail(wq)) {
287 fnic_queue_wq_copy_desc_fip_reg(wq, SCSI_NO_TAG,
295 fnic_queue_wq_copy_desc_flogi_reg(wq, SCSI_NO_TAG,
315 * Routine to enqueue a wq copy desc
318 struct vnic_wq_copy *wq,
369 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0])
370 free_wq_copy_descs(fnic, wq);
372 if (unlikely(!vnic_wq_copy_desc_avail(wq))) {
391 fnic_queue_wq_copy_desc_icmnd_16(wq, sc->request->tag,
427 struct vnic_wq_copy *wq;
516 /* create copy wq desc and enqueue it */
517 wq = &fnic->wq_copy[0];
518 ret = fnic_queue_wq_copy_desc(fnic, wq, io_req, sc, sg_count);
707 static inline int is_ack_index_in_range(struct vnic_wq_copy *wq,
710 if (wq->to_clean_index <= wq->to_use_index) {
712 if (request_out < wq->to_clean_index ||
713 request_out >= wq->to_use_index)
717 if (request_out < wq->to_clean_index &&
718 request_out >= wq->to_use_index)
736 struct vnic_wq_copy *wq;
742 wq = &fnic->wq_copy[cq_index - fnic->raw_wq_count - fnic->rq_count];
746 if (is_ack_index_in_range(wq, request_out)) {
1205 case FCPIO_ACK: /* fw copied copy wq desc to its queue */
1238 * Routine to process wq copy
1340 void fnic_wq_copy_cleanup_handler(struct vnic_wq_copy *wq,
1344 struct fnic *fnic = vnic_dev_priv(wq->vdev);
1405 struct vnic_wq_copy *wq = &fnic->wq_copy[0];
1421 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0])
1422 free_wq_copy_descs(fnic, wq);
1424 if (!vnic_wq_copy_desc_avail(wq)) {
1432 fnic_queue_wq_copy_desc_itmf(wq, tag | FNIC_TAG_ABORT,
1913 struct vnic_wq_copy *wq = &fnic->wq_copy[0];
1931 if (vnic_wq_copy_desc_avail(wq) <= fnic->wq_copy_desc_low[0])
1932 free_wq_copy_descs(fnic, wq);
1934 if (!vnic_wq_copy_desc_avail(wq)) {
1945 fnic_queue_wq_copy_desc_itmf(wq, sc->request->tag | FNIC_TAG_DEV_RST,