Lines Matching refs:sqp

3714 	struct sdebug_queue *sqp;  in sdebug_q_cmd_complete()  local
3723 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
3733 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
3734 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_q_cmd_complete()
3737 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
3751 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_q_cmd_complete()
3752 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
3762 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
3766 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_q_cmd_complete()
3772 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
3927 struct sdebug_queue *sqp; in stop_queued_cmnd() local
3932 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_queued_cmnd()
3933 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_queued_cmnd()
3939 if (test_bit(k, sqp->in_use_bm)) { in stop_queued_cmnd()
3940 sqcp = &sqp->qc_arr[k]; in stop_queued_cmnd()
3955 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
3957 clear_bit(k, sqp->in_use_bm); in stop_queued_cmnd()
3961 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
3972 struct sdebug_queue *sqp; in stop_all_queued() local
3977 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_all_queued()
3978 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
3980 if (test_bit(k, sqp->in_use_bm)) { in stop_all_queued()
3981 sqcp = &sqp->qc_arr[k]; in stop_all_queued()
3995 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
3997 clear_bit(k, sqp->in_use_bm); in stop_all_queued()
3998 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
4001 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
4009 struct sdebug_queue *sqp; in free_all_queued() local
4012 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in free_all_queued()
4014 sqcp = &sqp->qc_arr[k]; in free_all_queued()
4199 struct sdebug_queue *sqp; in block_unblock_all_queues() local
4201 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) in block_unblock_all_queues()
4202 atomic_set(&sqp->blocked, (int)block); in block_unblock_all_queues()
4229 static void setup_inject(struct sdebug_queue *sqp, in setup_inject() argument
4262 struct sdebug_queue *sqp; in schedule_resp() local
4278 sqp = get_queue(cmnd); in schedule_resp()
4279 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
4280 if (unlikely(atomic_read(&sqp->blocked))) { in schedule_resp()
4281 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
4289 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
4305 k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue); in schedule_resp()
4307 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
4323 __set_bit(k, sqp->in_use_bm); in schedule_resp()
4325 sqcp = &sqp->qc_arr[k]; in schedule_resp()
4329 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
4331 setup_inject(sqp, sqcp); in schedule_resp()
4366 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
4377 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
4577 struct sdebug_queue *sqp; in scsi_debug_show_info() local
4604 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in scsi_debug_show_info()
4606 f = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
4608 l = find_last_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
4632 struct sdebug_queue *sqp; in delay_store() local
4635 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in delay_store()
4636 ++j, ++sqp) { in delay_store()
4637 k = find_first_bit(sqp->in_use_bm, in delay_store()
4672 struct sdebug_queue *sqp; in ndelay_store() local
4675 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in ndelay_store()
4676 ++j, ++sqp) { in ndelay_store()
4677 k = find_first_bit(sqp->in_use_bm, in ndelay_store()
4911 struct sdebug_queue *sqp; in max_queue_store() local
4917 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in max_queue_store()
4918 ++j, ++sqp) { in max_queue_store()
4919 a = find_last_bit(sqp->in_use_bm, SDEBUG_CANQUEUE); in max_queue_store()