Lines Matching refs:sqp

4748 	struct sdebug_queue *sqp;  in sdebug_q_cmd_complete()  local
4756 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
4766 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4768 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_q_cmd_complete()
4771 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4785 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_q_cmd_complete()
4786 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4796 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4800 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_q_cmd_complete()
4806 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
5060 struct sdebug_queue *sqp; in stop_queued_cmnd() local
5065 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_queued_cmnd()
5066 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5072 if (test_bit(k, sqp->in_use_bm)) { in stop_queued_cmnd()
5073 sqcp = &sqp->qc_arr[k]; in stop_queued_cmnd()
5088 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5090 clear_bit(k, sqp->in_use_bm); in stop_queued_cmnd()
5094 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5105 struct sdebug_queue *sqp; in stop_all_queued() local
5110 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_all_queued()
5111 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5113 if (test_bit(k, sqp->in_use_bm)) { in stop_all_queued()
5114 sqcp = &sqp->qc_arr[k]; in stop_all_queued()
5128 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5130 clear_bit(k, sqp->in_use_bm); in stop_all_queued()
5131 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5134 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5142 struct sdebug_queue *sqp; in free_all_queued() local
5145 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in free_all_queued()
5147 sqcp = &sqp->qc_arr[k]; in free_all_queued()
5335 struct sdebug_queue *sqp; in block_unblock_all_queues() local
5337 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) in block_unblock_all_queues()
5338 atomic_set(&sqp->blocked, (int)block); in block_unblock_all_queues()
5391 struct sdebug_queue *sqp; in schedule_resp() local
5406 sqp = get_queue(cmnd); in schedule_resp()
5407 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5408 if (unlikely(atomic_read(&sqp->blocked))) { in schedule_resp()
5409 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5416 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5432 k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue); in schedule_resp()
5434 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5450 set_bit(k, sqp->in_use_bm); in schedule_resp()
5452 sqcp = &sqp->qc_arr[k]; in schedule_resp()
5456 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5462 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5519 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5522 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5523 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5536 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5540 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5544 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5552 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5567 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5571 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5575 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5580 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5802 struct sdebug_queue *sqp; in scsi_debug_show_info() local
5831 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in scsi_debug_show_info()
5833 f = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5835 l = find_last_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5887 struct sdebug_queue *sqp; in delay_store() local
5890 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in delay_store()
5891 ++j, ++sqp) { in delay_store()
5892 k = find_first_bit(sqp->in_use_bm, in delay_store()
5927 struct sdebug_queue *sqp; in ndelay_store() local
5930 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in ndelay_store()
5931 ++j, ++sqp) { in ndelay_store()
5932 k = find_first_bit(sqp->in_use_bm, in ndelay_store()
6253 struct sdebug_queue *sqp; in max_queue_store() local
6260 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in max_queue_store()
6261 ++j, ++sqp) { in max_queue_store()
6262 a = find_last_bit(sqp->in_use_bm, SDEBUG_CANQUEUE); in max_queue_store()
7301 struct sdebug_queue *sqp; in sdebug_blk_mq_poll() local
7307 sqp = sdebug_q_arr + queue_num; in sdebug_blk_mq_poll()
7308 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7312 qc_idx = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in sdebug_blk_mq_poll()
7315 qc_idx = find_next_bit(sqp->in_use_bm, sdebug_max_queue, qc_idx + 1); in sdebug_blk_mq_poll()
7320 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_blk_mq_poll()
7345 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_blk_mq_poll()
7347 sqp, queue_num, qc_idx, __func__); in sdebug_blk_mq_poll()
7358 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_blk_mq_poll()
7365 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7367 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()
7370 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_blk_mq_poll()