Lines Matching refs:starget
83 struct scsi_target *starget = scsi_target(device); in scsi_set_blocked() local
108 atomic_set(&starget->target_blocked, in scsi_set_blocked()
109 starget->max_target_blocked); in scsi_set_blocked()
295 struct scsi_target *starget = scsi_target(sdev); in scsi_device_unbusy() local
299 if (starget->can_queue > 0) in scsi_device_unbusy()
300 atomic_dec(&starget->target_busy); in scsi_device_unbusy()
322 struct scsi_target *starget = scsi_target(current_sdev); in scsi_single_lun_run() local
326 starget->starget_sdev_user = NULL; in scsi_single_lun_run()
338 if (starget->starget_sdev_user) in scsi_single_lun_run()
340 list_for_each_entry_safe(sdev, tmp, &starget->devices, in scsi_single_lun_run()
366 static inline bool scsi_target_is_busy(struct scsi_target *starget) in scsi_target_is_busy() argument
368 if (starget->can_queue > 0) { in scsi_target_is_busy()
369 if (atomic_read(&starget->target_busy) >= starget->can_queue) in scsi_target_is_busy()
371 if (atomic_read(&starget->target_blocked) > 0) in scsi_target_is_busy()
1290 struct scsi_target *starget = scsi_target(sdev); in scsi_target_queue_ready() local
1293 if (starget->single_lun) { in scsi_target_queue_ready()
1295 if (starget->starget_sdev_user && in scsi_target_queue_ready()
1296 starget->starget_sdev_user != sdev) { in scsi_target_queue_ready()
1300 starget->starget_sdev_user = sdev; in scsi_target_queue_ready()
1304 if (starget->can_queue <= 0) in scsi_target_queue_ready()
1307 busy = atomic_inc_return(&starget->target_busy) - 1; in scsi_target_queue_ready()
1308 if (atomic_read(&starget->target_blocked) > 0) { in scsi_target_queue_ready()
1315 if (atomic_dec_return(&starget->target_blocked) > 0) in scsi_target_queue_ready()
1318 SCSI_LOG_MLQUEUE(3, starget_printk(KERN_INFO, starget, in scsi_target_queue_ready()
1322 if (busy >= starget->can_queue) in scsi_target_queue_ready()
1332 if (starget->can_queue > 0) in scsi_target_queue_ready()
1333 atomic_dec(&starget->target_busy); in scsi_target_queue_ready()
2702 scsi_target_quiesce(struct scsi_target *starget) in scsi_target_quiesce() argument
2704 starget_for_each_device(starget, NULL, device_quiesce_fn); in scsi_target_quiesce()
2715 scsi_target_resume(struct scsi_target *starget) in scsi_target_resume() argument
2717 starget_for_each_device(starget, NULL, device_resume_fn); in scsi_target_resume()