Lines Matching refs:sqp
4766 struct sdebug_queue *sqp; in sdebug_q_cmd_complete() local
4775 sqp = sdebug_q_arr + sd_dp->sqa_idx; in sdebug_q_cmd_complete()
4785 spin_lock_irqsave(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4786 sqcp = &sqp->qc_arr[qc_idx]; in sdebug_q_cmd_complete()
4789 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4803 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) { in sdebug_q_cmd_complete()
4804 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4814 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
4818 k = find_last_bit(sqp->in_use_bm, retval); in sdebug_q_cmd_complete()
4824 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in sdebug_q_cmd_complete()
5078 struct sdebug_queue *sqp; in stop_queued_cmnd() local
5083 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_queued_cmnd()
5084 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5090 if (test_bit(k, sqp->in_use_bm)) { in stop_queued_cmnd()
5091 sqcp = &sqp->qc_arr[k]; in stop_queued_cmnd()
5106 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5108 clear_bit(k, sqp->in_use_bm); in stop_queued_cmnd()
5112 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_queued_cmnd()
5123 struct sdebug_queue *sqp; in stop_all_queued() local
5128 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in stop_all_queued()
5129 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5131 if (test_bit(k, sqp->in_use_bm)) { in stop_all_queued()
5132 sqcp = &sqp->qc_arr[k]; in stop_all_queued()
5146 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5148 clear_bit(k, sqp->in_use_bm); in stop_all_queued()
5149 spin_lock_irqsave(&sqp->qc_lock, iflags); in stop_all_queued()
5152 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in stop_all_queued()
5160 struct sdebug_queue *sqp; in free_all_queued() local
5163 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in free_all_queued()
5165 sqcp = &sqp->qc_arr[k]; in free_all_queued()
5353 struct sdebug_queue *sqp; in block_unblock_all_queues() local
5355 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) in block_unblock_all_queues()
5356 atomic_set(&sqp->blocked, (int)block); in block_unblock_all_queues()
5408 struct sdebug_queue *sqp; in schedule_resp() local
5423 sqp = get_queue(cmnd); in schedule_resp()
5424 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5425 if (unlikely(atomic_read(&sqp->blocked))) { in schedule_resp()
5426 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5433 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5449 k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue); in schedule_resp()
5451 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5467 set_bit(k, sqp->in_use_bm); in schedule_resp()
5469 sqcp = &sqp->qc_arr[k]; in schedule_resp()
5473 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5478 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5535 spin_lock_irqsave(&sqp->qc_lock, iflags); in schedule_resp()
5538 clear_bit(k, sqp->in_use_bm); in schedule_resp()
5539 spin_unlock_irqrestore(&sqp->qc_lock, iflags); in schedule_resp()
5556 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5568 sd_dp->sqa_idx = sqp - sdebug_q_arr; in schedule_resp()
5789 struct sdebug_queue *sqp; in scsi_debug_show_info() local
5817 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; ++j, ++sqp) { in scsi_debug_show_info()
5819 f = find_first_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5821 l = find_last_bit(sqp->in_use_bm, sdebug_max_queue); in scsi_debug_show_info()
5873 struct sdebug_queue *sqp; in delay_store() local
5876 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in delay_store()
5877 ++j, ++sqp) { in delay_store()
5878 k = find_first_bit(sqp->in_use_bm, in delay_store()
5913 struct sdebug_queue *sqp; in ndelay_store() local
5916 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in ndelay_store()
5917 ++j, ++sqp) { in ndelay_store()
5918 k = find_first_bit(sqp->in_use_bm, in ndelay_store()
6239 struct sdebug_queue *sqp; in max_queue_store() local
6246 for (j = 0, sqp = sdebug_q_arr; j < submit_queues; in max_queue_store()
6247 ++j, ++sqp) { in max_queue_store()
6248 a = find_last_bit(sqp->in_use_bm, SDEBUG_CANQUEUE); in max_queue_store()