Lines Matching refs:sqp

4930 	struct sdebug_queue *sqp;  in sdebug_q_cmd_complete()  local
4938 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
4948 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4950 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_q_cmd_complete()
4953 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4967 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_q_cmd_complete()
4968 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4978 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4982 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_q_cmd_complete()
4988 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
5268 struct sdebug_queue *sqp; in stop_queued_cmnd() local
5273 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_queued_cmnd()
5274 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5280 if (test_bit(k, sqp->in_use_bm)) { in stop_queued_cmnd()
5281 sqcp = &sqp->qc_arr[k]; in stop_queued_cmnd()
5296 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5298 clear_bit(k, sqp->in_use_bm); in stop_queued_cmnd()
5302 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5313 struct sdebug_queue *sqp; in stop_all_queued() local
5318 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_all_queued()
5319 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5321 if (test_bit(k, sqp->in_use_bm)) { in stop_all_queued()
5322 sqcp = &sqp->qc_arr[k]; in stop_all_queued()
5336 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5338 clear_bit(k, sqp->in_use_bm); in stop_all_queued()
5339 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5342 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5350 struct sdebug_queue *sqp; in free_all_queued() local
5353 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in free_all_queued()
5355 sqcp = &sqp->qc_arr[k]; in free_all_queued()
5543 struct sdebug_queue *sqp; in block_unblock_all_queues() local
5545 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) in block_unblock_all_queues()
5546 atomic_set(&sqp->blocked, (int)block); in block_unblock_all_queues()
5599 struct sdebug_queue *sqp; in schedule_resp() local
5614 sqp = get_queue(cmnd); in schedule_resp()
5615 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5616 if (unlikely(atomic_read(&sqp->blocked))) { in schedule_resp()
5617 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5624 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5640 k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue); in schedule_resp()
5642 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5651 set_bit(k, sqp->in_use_bm); in schedule_resp()
5653 sqcp = &sqp->qc_arr[k]; in schedule_resp()
5657 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5663 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5720 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5723 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5724 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5737 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5741 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5745 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5753 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5768 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5772 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5776 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5781 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
6007 struct sdebug_queue *sqp; in scsi_debug_show_info() local
6036 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in scsi_debug_show_info()
6038 f = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
6040 l = find_last_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
6092 struct sdebug_queue *sqp; in delay_store() local
6095 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in delay_store()
6096 ++j, ++sqp) { in delay_store()
6097 k = find_first_bit(sqp->in_use_bm, in delay_store()
6132 struct sdebug_queue *sqp; in ndelay_store() local
6135 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in ndelay_store()
6136 ++j, ++sqp) { in ndelay_store()
6137 k = find_first_bit(sqp->in_use_bm, in ndelay_store()
6458 struct sdebug_queue *sqp; in max_queue_store() local
6465 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in max_queue_store()
6466 ++j, ++sqp) { in max_queue_store()
6467 a = find_last_bit(sqp->in_use_bm, SDEBUG_CANQUEUE); in max_queue_store()
7525 struct sdebug_queue *sqp; in sdebug_blk_mq_poll() local
7531 sqp = sdebug_q_arr + queue_num; in sdebug_blk_mq_poll()
7533 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7535 qc_idx = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in sdebug_blk_mq_poll()
7542 if (!test_bit(qc_idx, sqp->in_use_bm)) in sdebug_blk_mq_poll()
7545 qc_idx = find_next_bit(sqp->in_use_bm, sdebug_max_queue, qc_idx + 1); in sdebug_blk_mq_poll()
7550 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_blk_mq_poll()
7575 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_blk_mq_poll()
7577 sqp, queue_num, qc_idx, __func__); in sdebug_blk_mq_poll()
7588 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_blk_mq_poll()
7595 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7598 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7599 if (find_first_bit(sqp->in_use_bm, sdebug_max_queue) >= sdebug_max_queue) in sdebug_blk_mq_poll()
7604 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()