Lines Matching refs:sqp

4727 	struct sdebug_queue *sqp;  in sdebug_q_cmd_complete()  local
4736 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
4746 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4747 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_q_cmd_complete()
4750 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4764 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_q_cmd_complete()
4765 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4775 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4779 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_q_cmd_complete()
4785 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
5039 struct sdebug_queue *sqp; in stop_queued_cmnd() local
5044 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_queued_cmnd()
5045 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5051 if (test_bit(k, sqp->in_use_bm)) { in stop_queued_cmnd()
5052 sqcp = &sqp->qc_arr[k]; in stop_queued_cmnd()
5067 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5069 clear_bit(k, sqp->in_use_bm); in stop_queued_cmnd()
5073 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5084 struct sdebug_queue *sqp; in stop_all_queued() local
5089 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_all_queued()
5090 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5092 if (test_bit(k, sqp->in_use_bm)) { in stop_all_queued()
5093 sqcp = &sqp->qc_arr[k]; in stop_all_queued()
5107 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5109 clear_bit(k, sqp->in_use_bm); in stop_all_queued()
5110 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5113 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5121 struct sdebug_queue *sqp; in free_all_queued() local
5124 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in free_all_queued()
5126 sqcp = &sqp->qc_arr[k]; in free_all_queued()
5314 struct sdebug_queue *sqp; in block_unblock_all_queues() local
5316 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) in block_unblock_all_queues()
5317 atomic_set(&sqp->blocked, (int)block); in block_unblock_all_queues()
5369 struct sdebug_queue *sqp; in schedule_resp() local
5384 sqp = get_queue(cmnd); in schedule_resp()
5385 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5386 if (unlikely(atomic_read(&sqp->blocked))) { in schedule_resp()
5387 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5394 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5410 k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue); in schedule_resp()
5412 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5428 set_bit(k, sqp->in_use_bm); in schedule_resp()
5430 sqcp = &sqp->qc_arr[k]; in schedule_resp()
5434 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5439 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5496 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5499 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5500 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5517 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5529 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5750 struct sdebug_queue *sqp; in scsi_debug_show_info() local
5778 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in scsi_debug_show_info()
5780 f = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5782 l = find_last_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5834 struct sdebug_queue *sqp; in delay_store() local
5837 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in delay_store()
5838 ++j, ++sqp) { in delay_store()
5839 k = find_first_bit(sqp->in_use_bm, in delay_store()
5874 struct sdebug_queue *sqp; in ndelay_store() local
5877 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in ndelay_store()
5878 ++j, ++sqp) { in ndelay_store()
5879 k = find_first_bit(sqp->in_use_bm, in ndelay_store()
6200 struct sdebug_queue *sqp; in max_queue_store() local
6207 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in max_queue_store()
6208 ++j, ++sqp) { in max_queue_store()
6209 a = find_last_bit(sqp->in_use_bm, SDEBUG_CANQUEUE); in max_queue_store()