Lines Matching refs:shost

131 static int scsi_scan(struct Scsi_Host *shost, const char *str)  in scsi_scan()  argument
146 if (shost->transportt->user_scan) in scsi_scan()
147 res = shost->transportt->user_scan(shost, channel, id, lun); in scsi_scan()
149 res = scsi_scan_host_selected(shost, channel, id, lun, in scsi_scan()
163 struct Scsi_Host *shost = class_to_shost(dev); \
164 return snprintf (buf, 20, format_string, shost->field); \
186 struct Scsi_Host *shost = class_to_shost(dev); in store_scan() local
189 res = scsi_scan(shost, buf); in store_scan()
201 struct Scsi_Host *shost = class_to_shost(dev); in store_shost_state() local
215 if (scsi_host_set_state(shost, state)) in store_shost_state()
223 struct Scsi_Host *shost = class_to_shost(dev); in show_shost_state() local
224 const char *name = scsi_host_state_name(shost->shost_state); in show_shost_state()
256 struct Scsi_Host *shost = class_to_shost(dev); in show_shost_supported_mode() local
257 unsigned int supported_mode = shost->hostt->supported_mode; in show_shost_supported_mode()
272 struct Scsi_Host *shost = class_to_shost(dev); in show_shost_active_mode() local
274 if (shost->active_mode == MODE_UNKNOWN) in show_shost_active_mode()
277 return show_shost_mode(shost->active_mode, buf); in show_shost_active_mode()
296 struct Scsi_Host *shost = class_to_shost(dev); in store_host_reset() local
297 struct scsi_host_template *sht = shost->hostt; in store_host_reset()
306 ret = sht->host_reset(shost, type); in store_host_reset()
322 struct Scsi_Host *shost = class_to_shost(dev); in show_shost_eh_deadline() local
324 if (shost->eh_deadline == -1) in show_shost_eh_deadline()
326 return sprintf(buf, "%u\n", shost->eh_deadline / HZ); in show_shost_eh_deadline()
333 struct Scsi_Host *shost = class_to_shost(dev); in store_shost_eh_deadline() local
337 if (shost->transportt && in store_shost_eh_deadline()
338 (shost->transportt->eh_strategy_handler || in store_shost_eh_deadline()
339 !shost->hostt->eh_host_reset_handler)) in store_shost_eh_deadline()
352 spin_lock_irqsave(shost->host_lock, flags); in store_shost_eh_deadline()
353 if (scsi_host_in_recovery(shost)) in store_shost_eh_deadline()
357 shost->eh_deadline = -1; in store_shost_eh_deadline()
359 shost->eh_deadline = deadline * HZ; in store_shost_eh_deadline()
363 spin_unlock_irqrestore(shost->host_lock, flags); in store_shost_eh_deadline()
384 struct Scsi_Host *shost = class_to_shost(dev); in show_host_busy() local
385 return snprintf(buf, 20, "%d\n", scsi_host_busy(shost)); in show_host_busy()
1417 struct Scsi_Host *shost = sdev->host; in scsi_remove_device() local
1419 mutex_lock(&shost->scan_mutex); in scsi_remove_device()
1421 mutex_unlock(&shost->scan_mutex); in scsi_remove_device()
1427 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in __scsi_remove_target() local
1431 spin_lock_irqsave(shost->host_lock, flags); in __scsi_remove_target()
1433 list_for_each_entry(sdev, &shost->__devices, siblings) { in __scsi_remove_target()
1447 spin_unlock_irqrestore(shost->host_lock, flags); in __scsi_remove_target()
1450 spin_lock_irqsave(shost->host_lock, flags); in __scsi_remove_target()
1453 spin_unlock_irqrestore(shost->host_lock, flags); in __scsi_remove_target()
1466 struct Scsi_Host *shost = dev_to_shost(dev->parent); in scsi_remove_target() local
1471 spin_lock_irqsave(shost->host_lock, flags); in scsi_remove_target()
1472 list_for_each_entry(starget, &shost->__targets, siblings) { in scsi_remove_target()
1483 spin_unlock_irqrestore(shost->host_lock, flags); in scsi_remove_target()
1489 spin_unlock_irqrestore(shost->host_lock, flags); in scsi_remove_target()
1513 int scsi_sysfs_add_host(struct Scsi_Host *shost) in scsi_sysfs_add_host() argument
1518 if (shost->hostt->shost_attrs) { in scsi_sysfs_add_host()
1519 for (i = 0; shost->hostt->shost_attrs[i]; i++) { in scsi_sysfs_add_host()
1520 error = device_create_file(&shost->shost_dev, in scsi_sysfs_add_host()
1521 shost->hostt->shost_attrs[i]); in scsi_sysfs_add_host()
1527 transport_register_device(&shost->shost_gendev); in scsi_sysfs_add_host()
1528 transport_configure_device(&shost->shost_gendev); in scsi_sysfs_add_host()
1541 struct Scsi_Host *shost = sdev->host; in scsi_sysfs_device_initialize() local
1565 !shost->no_scsi2_lun_in_cdb) in scsi_sysfs_device_initialize()
1569 spin_lock_irqsave(shost->host_lock, flags); in scsi_sysfs_device_initialize()
1571 list_add_tail(&sdev->siblings, &shost->__devices); in scsi_sysfs_device_initialize()
1572 spin_unlock_irqrestore(shost->host_lock, flags); in scsi_sysfs_device_initialize()