Lines Matching refs:shost
62 static inline struct srp_rport *shost_to_rport(struct Scsi_Host *shost) in shost_to_rport() argument
66 WARN_ON_ONCE(device_for_each_child(&shost->shost_gendev, &child, in shost_to_rport()
107 struct Scsi_Host *shost = dev_to_shost(dev); in srp_host_setup() local
108 struct srp_host_attrs *srp_host = to_srp_host_attrs(shost); in srp_host_setup()
161 struct Scsi_Host *shost = dev_to_shost(dev); in store_srp_rport_delete() local
162 struct srp_internal *i = to_srp_internal(shost->transportt); in store_srp_rport_delete()
382 struct Scsi_Host *shost = rport_to_shost(rport); in srp_reconnect_work() local
387 shost_printk(KERN_ERR, shost, in srp_reconnect_work()
404 struct Scsi_Host *shost = rport_to_shost(rport); in __rport_fail_io_fast() local
415 i = to_srp_internal(shost->transportt); in __rport_fail_io_fast()
428 struct Scsi_Host *shost = rport_to_shost(rport); in rport_fast_io_fail_timedout() local
431 dev_name(&rport->dev), dev_name(&shost->shost_gendev)); in rport_fast_io_fail_timedout()
447 struct Scsi_Host *shost = rport_to_shost(rport); in rport_dev_loss_timedout() local
448 struct srp_internal *i = to_srp_internal(shost->transportt); in rport_dev_loss_timedout()
451 dev_name(&rport->dev), dev_name(&shost->shost_gendev)); in rport_dev_loss_timedout()
463 struct Scsi_Host *shost = rport_to_shost(rport); in __srp_start_tl_fail_timers() local
471 pr_debug("%s current state: %d\n", dev_name(&shost->shost_gendev), in __srp_start_tl_fail_timers()
481 pr_debug("%s new state: %d\n", dev_name(&shost->shost_gendev), in __srp_start_tl_fail_timers()
483 scsi_block_targets(shost, &shost->shost_gendev); in __srp_start_tl_fail_timers()
534 struct Scsi_Host *shost = rport_to_shost(rport); in srp_reconnect_rport() local
535 struct srp_internal *i = to_srp_internal(shost->transportt); in srp_reconnect_rport()
539 pr_debug("SCSI host %s\n", dev_name(&shost->shost_gendev)); in srp_reconnect_rport()
551 scsi_block_targets(shost, &shost->shost_gendev); in srp_reconnect_rport()
554 dev_name(&shost->shost_gendev), rport->state, res); in srp_reconnect_rport()
561 scsi_target_unblock(&shost->shost_gendev, SDEV_RUNNING); in srp_reconnect_rport()
567 shost_for_each_device(sdev, shost) { in srp_reconnect_rport()
582 scsi_target_unblock(&shost->shost_gendev, in srp_reconnect_rport()
606 struct Scsi_Host *shost = sdev->host; in srp_timed_out() local
607 struct srp_internal *i = to_srp_internal(shost->transportt); in srp_timed_out()
608 struct srp_rport *rport = shost_to_rport(shost); in srp_timed_out()
634 struct Scsi_Host *shost; in srp_rport_match() local
640 shost = dev_to_shost(dev->parent); in srp_rport_match()
641 if (!shost->transportt) in srp_rport_match()
643 if (shost->transportt->host_attrs.ac.class != &srp_host_class.class) in srp_rport_match()
646 i = to_srp_internal(shost->transportt); in srp_rport_match()
652 struct Scsi_Host *shost; in srp_host_match() local
658 shost = dev_to_shost(dev); in srp_host_match()
659 if (!shost->transportt) in srp_host_match()
661 if (shost->transportt->host_attrs.ac.class != &srp_host_class.class) in srp_host_match()
664 i = to_srp_internal(shost->transportt); in srp_host_match()
695 struct srp_rport *srp_rport_add(struct Scsi_Host *shost, in srp_rport_add() argument
699 struct device *parent = &shost->shost_gendev; in srp_rport_add()
700 struct srp_internal *i = to_srp_internal(shost->transportt); in srp_rport_add()
728 id = atomic_inc_return(&to_srp_host_attrs(shost)->next_port_id); in srp_rport_add()
729 dev_set_name(&rport->dev, "port-%d:%d", shost->host_no, id); in srp_rport_add()
779 void srp_remove_host(struct Scsi_Host *shost) in srp_remove_host() argument
781 device_for_each_child(&shost->shost_gendev, NULL, do_srp_rport_del); in srp_remove_host()