Lines Matching refs:sd_dp
353 struct sdebug_defer sd_dp; member
4898 static void sdebug_q_cmd_complete(struct sdebug_defer *sd_dp) in sdebug_q_cmd_complete() argument
4900 struct sdebug_queued_cmd *sqcp = container_of(sd_dp, struct sdebug_queued_cmd, sd_dp); in sdebug_q_cmd_complete()
4908 if (raw_smp_processor_id() != sd_dp->issuing_cpu) in sdebug_q_cmd_complete()
4919 aborted = sd_dp->aborted; in sdebug_q_cmd_complete()
4921 sd_dp->aborted = false; in sdebug_q_cmd_complete()
4940 struct sdebug_defer *sd_dp = container_of(timer, struct sdebug_defer, in sdebug_q_cmd_hrt_complete() local
4942 sdebug_q_cmd_complete(sd_dp); in sdebug_q_cmd_hrt_complete()
4949 struct sdebug_defer *sd_dp = container_of(work, struct sdebug_defer, in sdebug_q_cmd_wq_complete() local
4951 sdebug_q_cmd_complete(sd_dp); in sdebug_q_cmd_wq_complete()
5185 static bool stop_qc_helper(struct sdebug_defer *sd_dp, in stop_qc_helper() argument
5189 int res = hrtimer_try_to_cancel(&sd_dp->hrt); in stop_qc_helper()
5201 if (cancel_work_sync(&sd_dp->ew.work)) in stop_qc_helper()
5216 struct sdebug_defer *sd_dp; in scsi_debug_stop_cmnd() local
5224 sd_dp = &sqcp->sd_dp; in scsi_debug_stop_cmnd()
5225 l_defer_t = READ_ONCE(sd_dp->defer_t); in scsi_debug_stop_cmnd()
5228 if (stop_qc_helper(sd_dp, l_defer_t)) in scsi_debug_stop_cmnd()
5514 struct sdebug_defer *sd_dp; in sdebug_alloc_queued_cmd() local
5520 sd_dp = &sqcp->sd_dp; in sdebug_alloc_queued_cmd()
5522 hrtimer_init(&sd_dp->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED); in sdebug_alloc_queued_cmd()
5523 sd_dp->hrt.function = sdebug_q_cmd_hrt_complete; in sdebug_alloc_queued_cmd()
5524 INIT_WORK(&sd_dp->ew.work, sdebug_q_cmd_wq_complete); in sdebug_alloc_queued_cmd()
5549 struct sdebug_defer *sd_dp; in schedule_resp() local
5584 sd_dp = &sqcp->sd_dp; in schedule_resp()
5641 sd_dp->issuing_cpu = raw_smp_processor_id(); in schedule_resp()
5644 sd_dp->cmpl_ts = ktime_add(ns_to_ktime(ns_from_boot), kt); in schedule_resp()
5646 WRITE_ONCE(sd_dp->defer_t, SDEB_DEFER_POLL); in schedule_resp()
5652 WRITE_ONCE(sd_dp->defer_t, SDEB_DEFER_HRT); in schedule_resp()
5653 hrtimer_start(&sd_dp->hrt, kt, HRTIMER_MODE_REL_PINNED); in schedule_resp()
5665 sd_dp->aborted = true; in schedule_resp()
5672 sd_dp->issuing_cpu = raw_smp_processor_id(); in schedule_resp()
5676 sd_dp->cmpl_ts = ns_to_ktime(ns_from_boot); in schedule_resp()
5677 WRITE_ONCE(sd_dp->defer_t, SDEB_DEFER_POLL); in schedule_resp()
5682 WRITE_ONCE(sd_dp->defer_t, SDEB_DEFER_WQ); in schedule_resp()
5683 schedule_work(&sd_dp->ew.work); in schedule_resp()
7431 struct sdebug_defer *sd_dp; in sdebug_blk_mq_poll_iter() local
7456 sd_dp = &sqcp->sd_dp; in sdebug_blk_mq_poll_iter()
7457 if (READ_ONCE(sd_dp->defer_t) != SDEB_DEFER_POLL) { in sdebug_blk_mq_poll_iter()
7462 if (time < sd_dp->cmpl_ts) { in sdebug_blk_mq_poll_iter()
7472 if (raw_smp_processor_id() != sd_dp->issuing_cpu) in sdebug_blk_mq_poll_iter()