Home
last modified time | relevance | path

Searched refs:shost (Results 1 – 25 of 165) sorted by relevance

1234567

/linux/drivers/scsi/
H A Dhosts.c75 int scsi_host_set_state(struct Scsi_Host *shost, enum scsi_host_state state) in scsi_host_set_state() argument
76 __must_hold(shost->host_lock) in scsi_host_set_state()
78 enum scsi_host_state oldstate = READ_ONCE(shost->shost_state); in scsi_host_set_state()
149 WRITE_ONCE(shost->shost_state, state); in scsi_host_set_state()
154 shost_printk(KERN_ERR, shost, in scsi_host_set_state()
166 void scsi_remove_host(struct Scsi_Host *shost) in scsi_remove_host() argument
170 mutex_lock(&shost->scan_mutex); in scsi_remove_host()
171 spin_lock_irqsave(shost->host_lock, flags); in scsi_remove_host()
172 if (scsi_host_set_state(shost, SHOST_CANCEL)) in scsi_remove_host()
173 if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)) { in scsi_remove_host()
[all …]
H A Dscsi_error.c64 void scsi_eh_wakeup(struct Scsi_Host *shost, unsigned int busy) in scsi_eh_wakeup() argument
66 lockdep_assert_held(shost->host_lock); in scsi_eh_wakeup()
68 if (busy == shost->host_failed) { in scsi_eh_wakeup()
69 trace_scsi_eh_wakeup(shost); in scsi_eh_wakeup()
70 wake_up_process(shost->ehandler); in scsi_eh_wakeup()
71 SCSI_LOG_ERROR_RECOVERY(5, shost_printk(KERN_INFO, shost, in scsi_eh_wakeup()
78 struct Scsi_Host *shost = container_of(work, struct Scsi_Host, eh_work); in scsi_rcu_eh_wakeup() local
89 busy = scsi_host_busy(shost); in scsi_rcu_eh_wakeup()
91 spin_lock_irqsave(shost->host_lock, flags); in scsi_rcu_eh_wakeup()
92 scsi_eh_wakeup(shost, busy); in scsi_rcu_eh_wakeup()
[all …]
H A Dscsi_scan.c121 struct Scsi_Host *shost; member
166 data->shost = NULL; in scsi_complete_async_scans()
287 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in scsi_alloc_sdev() local
290 sdev = kzalloc(sizeof(*sdev) + shost->transportt->device_size, in scsi_alloc_sdev()
298 sdev->host = shost; in scsi_alloc_sdev()
338 scsi_init_limits(shost, &lim); in scsi_alloc_sdev()
368 if (shost->hostt->sdev_init) { in scsi_alloc_sdev()
369 ret = shost->hostt->sdev_init(sdev); in scsi_alloc_sdev()
394 struct Scsi_Host *shost = dev_to_shost(dev->parent); in scsi_target_destroy() local
400 spin_lock_irqsave(shost->host_lock, flags); in scsi_target_destroy()
[all …]
H A Dscsi_transport_fc.c31 static int fc_vport_setup(struct Scsi_Host *shost, int channel,
390 struct Scsi_Host *shost = dev_to_shost(dev); in fc_host_setup() local
391 struct fc_host_attrs *fc_host = shost_to_fc_host(shost); in fc_host_setup()
446 shost->host_no); in fc_host_setup()
452 fc_bsg_hostadd(shost, fc_host); in fc_host_setup()
461 struct Scsi_Host *shost = dev_to_shost(dev); in fc_host_remove() local
462 struct fc_host_attrs *fc_host = shost_to_fc_host(shost); in fc_host_remove()
529 fc_host_post_fc_event(struct Scsi_Host *shost, u32 event_number, in fc_host_post_fc_event() argument
567 event->host_no = shost->host_no; in fc_host_post_fc_event()
586 __func__, shost->host_no, in fc_host_post_fc_event()
[all …]
H A Ddmx3191d.c61 struct Scsi_Host *shost; in dmx3191d_probe_one() local
76 shost = scsi_host_alloc(&dmx3191d_driver_template, in dmx3191d_probe_one()
78 if (!shost) in dmx3191d_probe_one()
81 hostdata = shost_priv(shost); in dmx3191d_probe_one()
87 shost->irq = NO_IRQ; in dmx3191d_probe_one()
89 error = NCR5380_init(shost, 0); in dmx3191d_probe_one()
93 NCR5380_maybe_reset_bus(shost); in dmx3191d_probe_one()
95 pci_set_drvdata(pdev, shost); in dmx3191d_probe_one()
97 error = scsi_add_host(shost, &pdev->dev); in dmx3191d_probe_one()
101 scsi_scan_host(shost); in dmx3191d_probe_one()
[all …]
H A Dscsi_lib.c62 int scsi_init_sense_cache(struct Scsi_Host *shost) in scsi_init_sense_cache() argument
374 static void scsi_dec_host_busy(struct Scsi_Host *shost, struct scsi_cmnd *cmd) in scsi_dec_host_busy() argument
380 if (unlikely(scsi_host_in_recovery(shost))) { in scsi_dec_host_busy()
389 unsigned int busy = scsi_host_busy(shost); in scsi_dec_host_busy()
391 spin_lock_irqsave(shost->host_lock, flags); in scsi_dec_host_busy()
392 if (shost->host_failed || shost->host_eh_scheduled) in scsi_dec_host_busy()
393 scsi_eh_wakeup(shost, busy); in scsi_dec_host_busy()
394 spin_unlock_irqrestore(shost->host_lock, flags); in scsi_dec_host_busy()
401 struct Scsi_Host *shost = sdev->host; in scsi_device_unbusy() local
404 scsi_dec_host_busy(shost, cmd); in scsi_device_unbusy()
[all …]
H A Dqlogicfas.c110 priv->shost = hreg; in __qlogicfas_detect()
151 struct Scsi_Host *shost; in qlogicfas_detect() local
156 shost = __qlogicfas_detect(sht, iobase[num], irq[num]); in qlogicfas_detect()
157 if (shost == NULL) { in qlogicfas_detect()
161 priv = get_priv_by_host(shost); in qlogicfas_detect()
169 static int qlogicfas_release(struct Scsi_Host *shost) in qlogicfas_release() argument
171 struct qlogicfas408_priv *priv = get_priv_by_host(shost); in qlogicfas_release()
173 scsi_remove_host(shost); in qlogicfas_release()
174 if (shost->irq) { in qlogicfas_release()
176 free_irq(shost->irq, shost); in qlogicfas_release()
[all …]
H A Dscsi_proc.c67 struct Scsi_Host *shost = pde_data(file_inode(file)); in proc_scsi_host_write() local
74 if (!shost->hostt->write_info) in proc_scsi_host_write()
82 ret = shost->hostt->write_info(shost, page, count); in proc_scsi_host_write()
91 struct Scsi_Host *shost = m->private; in proc_scsi_show() local
92 return shost->hostt->show_info(m, shost); in proc_scsi_show()
218 void scsi_proc_host_add(struct Scsi_Host *shost) in scsi_proc_host_add() argument
220 const struct scsi_host_template *sht = shost->hostt; in scsi_proc_host_add()
232 sprintf(name,"%d", shost->host_no); in scsi_proc_host_add()
234 &proc_scsi_ops, shost); in scsi_proc_host_add()
240 shost_printk(KERN_ERR, shost, in scsi_proc_host_add()
[all …]
H A Dscsi_sysfs.c133 static int scsi_scan(struct Scsi_Host *shost, const char *str) in scsi_scan() argument
148 if (shost->transportt->user_scan) in scsi_scan()
149 res = shost->transportt->user_scan(shost, channel, id, lun); in scsi_scan()
151 res = scsi_scan_host_selected(shost, channel, id, lun, in scsi_scan()
165 struct Scsi_Host *shost = class_to_shost(dev); \
166 return snprintf (buf, 20, format_string, shost->field); \
188 struct Scsi_Host *shost = class_to_shost(dev); in store_scan() local
191 res = scsi_scan(shost, buf); in store_scan()
203 struct Scsi_Host *shost = class_to_shost(dev); in store_shost_state() local
217 scoped_guard(spinlock_irq, shost->host_lock) in store_shost_state()
[all …]
/linux/include/scsi/
H A Dscsi_host.h140 int (*init_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
141 int (*exit_cmd_priv)(struct Scsi_Host *shost, struct scsi_cmnd *cmd);
303 void (* map_queues)(struct Scsi_Host *shost);
313 int (* mq_poll)(struct Scsi_Host *shost, unsigned int queue_num);
374 int (*host_reset)(struct Scsi_Host *shost, int reset_type);
531 enum scsi_qc_status func_name(struct Scsi_Host *shost, \
537 spin_lock_irqsave(shost->host_lock, irq_flags); \
539 spin_unlock_irqrestore(shost->host_lock, irq_flags); \
772 #define shost_printk(prefix, shost, fmt, a...) \ argument
773 dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a)
[all …]
/linux/drivers/scsi/elx/efct/
H A Defct_xport.c377 struct Scsi_Host *shost = NULL; in efct_scsi_new_device() local
381 shost = scsi_host_alloc(&efct_template, sizeof(*vport)); in efct_scsi_new_device()
382 if (!shost) { in efct_scsi_new_device()
388 efct->shost = shost; in efct_scsi_new_device()
391 vport = (struct efct_vport *)shost->hostdata; in efct_scsi_new_device()
399 shost->can_queue = efct->hw.config.n_io; in efct_scsi_new_device()
400 shost->max_cmd_len = 16; /* 16-byte CDBs */ in efct_scsi_new_device()
401 shost->max_id = 0xffff; in efct_scsi_new_device()
402 shost->max_lun = 0xffffffff; in efct_scsi_new_device()
408 shost->sg_tablesize = sli_get_max_sgl(&efct->hw.sli); in efct_scsi_new_device()
[all …]
/linux/drivers/scsi/snic/
H A Dsnic_main.c160 SNIC_HOST_ERR(snic->shost, in snic_notify_set()
279 SNIC_HOST_INFO(snic->shost, "VNIC_DEV_OPEN Timedout.\n"); in snic_vdev_open_done()
289 snic_add_host(struct Scsi_Host *shost, struct pci_dev *pdev) in snic_add_host() argument
293 ret = scsi_add_host(shost, &pdev->dev); in snic_add_host()
295 SNIC_HOST_ERR(shost, in snic_add_host()
302 SNIC_BUG_ON(shost->work_q != NULL); in snic_add_host()
303 shost->work_q = alloc_ordered_workqueue("scsi_wq_%d", WQ_MEM_RECLAIM, in snic_add_host()
304 shost->host_no); in snic_add_host()
305 if (!shost->work_q) { in snic_add_host()
306 SNIC_HOST_ERR(shost, "Failed to Create ScsiHost wq.\n"); in snic_add_host()
[all …]
H A Dsnic_disc.c81 ntgts = min_t(u32, snic->fwinfo.max_tgts, snic->shost->max_id); in snic_queue_report_tgt_req()
83 ntgts = snic->shost->max_id; in snic_queue_report_tgt_req()
92 SNIC_HOST_ERR(snic->shost, "Resp Buf Alloc Failed.\n"); in snic_queue_report_tgt_req()
102 SNIC_HOST_ERR(snic->shost, in snic_queue_report_tgt_req()
132 SNIC_HOST_ERR(snic->shost, "Queuing Report Tgts Failed.\n"); in snic_queue_report_tgt_req()
137 SNIC_DISC_DBG(snic->shost, "Report Targets Issued.\n"); in snic_queue_report_tgt_req()
142 SNIC_HOST_ERR(snic->shost, in snic_queue_report_tgt_req()
153 struct Scsi_Host *shost = dev_to_shost(&tgt->dev); in snic_scsi_scan_tgt() local
156 SNIC_HOST_INFO(shost, "Scanning Target id 0x%x\n", tgt->id); in snic_scsi_scan_tgt()
163 spin_lock_irqsave(shost->host_lock, flags); in snic_scsi_scan_tgt()
[all …]
H A Dsnic_ctl.c33 SNIC_HOST_INFO(snic->shost, "Link Event: Link %s.\n", in snic_handle_link()
99 SNIC_HOST_INFO(snic->shost, "Exch Ver Req Preparing...\n"); in snic_queue_exch_ver_req()
103 SNIC_HOST_ERR(snic->shost, "Init Exch Ver Req failed\n"); in snic_queue_exch_ver_req()
122 SNIC_HOST_ERR(snic->shost, in snic_queue_exch_ver_req()
128 SNIC_HOST_INFO(snic->shost, "Exch Ver Req is issued. ret = %d\n", ret); in snic_queue_exch_ver_req()
147 SNIC_HOST_INFO(snic->shost, "Exch Ver Compl Received.\n"); in snic_io_exch_ver_cmpl_handler()
153 SNIC_HOST_ERR(snic->shost, in snic_io_exch_ver_cmpl_handler()
169 SNIC_HOST_INFO(snic->shost, in snic_io_exch_ver_cmpl_handler()
179 SNIC_HOST_INFO(snic->shost, in snic_io_exch_ver_cmpl_handler()
186 snic->shost->sg_tablesize = max_sgs; in snic_io_exch_ver_cmpl_handler()
[all …]
/linux/drivers/scsi/csiostor/
H A Dcsio_attr.c62 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_reg_rnode() local
78 rn->rport = fc_remote_port_add(shost, 0, &ids); in csio_reg_rnode()
87 spin_lock_irq(shost->host_lock); in csio_reg_rnode()
89 spin_unlock_irq(shost->host_lock); in csio_reg_rnode()
184 struct Scsi_Host *shost = csio_ln_to_shost(ln); in csio_fchost_attr_init() local
186 fc_host_node_name(shost) = wwn_to_u64(csio_ln_wwnn(ln)); in csio_fchost_attr_init()
187 fc_host_port_name(shost) = wwn_to_u64(csio_ln_wwpn(ln)); in csio_fchost_attr_init()
189 fc_host_supported_classes(shost) = FC_COS_CLASS3; in csio_fchost_attr_init()
190 fc_host_max_npiv_vports(shost) = in csio_fchost_attr_init()
192 fc_host_supported_speeds(shost) = FC_PORTSPEED_10GBIT | in csio_fchost_attr_init()
[all …]
/linux/drivers/scsi/bfa/
H A Dbfad_attr.c24 struct Scsi_Host *shost; in bfad_im_get_starget_port_id() local
31 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_port_id()
32 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; in bfad_im_get_starget_port_id()
50 struct Scsi_Host *shost; in bfad_im_get_starget_node_name() local
57 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_node_name()
58 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; in bfad_im_get_starget_node_name()
76 struct Scsi_Host *shost; in bfad_im_get_starget_port_name() local
83 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_port_name()
84 im_port = (struct bfad_im_port_s *) shost->hostdata[0]; in bfad_im_get_starget_port_name()
100 bfad_im_get_host_port_id(struct Scsi_Host *shost) in bfad_im_get_host_port_id() argument
[all …]
/linux/Documentation/translations/zh_CN/scsi/
H A Dscsi_eh.rst143 1. 将scmd->eh_entry链接到shost->eh_cmd_q
145 2. 在shost->shost_state中设置SHOST_RECOVERY状态位
147 3. 递增shost->host_failed失败计数器
149 4. 当检测到shost->host_busy == shost->host_failed
153 如上所述,当任一scmd被加入到shost->eh_cmd_q队列时,系统
158 添加到shost->eh_cmd_q队列。
162 即shost->host_busy == shost->host_failed),此时将唤
165 shost->eh_cmd_q队列中。
202 3. 唤醒所有在shost->host_wait上等待的任务。如果有人调用了
274 - 将scmd添加到shost->eh_cmd_q
[all …]
/linux/drivers/s390/scsi/
H A Dzfcp_scsi.c66 static enum scsi_qc_status zfcp_scsi_queuecommand(struct Scsi_Host *shost, in zfcp_scsi_queuecommand() argument
347 struct Scsi_Host *shost = rport_to_shost(rport); in zfcp_scsi_eh_target_reset_handler() local
350 (struct zfcp_adapter *)shost->hostdata[0]; in zfcp_scsi_eh_target_reset_handler()
353 shost_for_each_device(tmp_sdev, shost) { in zfcp_scsi_eh_target_reset_handler()
403 static int zfcp_scsi_sysfs_host_reset(struct Scsi_Host *shost, int reset_type) in zfcp_scsi_sysfs_host_reset() argument
406 (struct zfcp_adapter *)shost->hostdata[0]; in zfcp_scsi_sysfs_host_reset()
521 struct Scsi_Host *shost; in zfcp_scsi_adapter_unregister() local
524 shost = adapter->scsi_host; in zfcp_scsi_adapter_unregister()
525 if (!shost) in zfcp_scsi_adapter_unregister()
533 fc_remove_host(shost); in zfcp_scsi_adapter_unregister()
[all …]
/linux/drivers/scsi/mvsas/
H A Dmv_init.c81 sas_phy->ha = (struct sas_ha_struct *)mvi->shost->hostdata; in mvs_phy_init()
124 if (mvi->shost) in mvs_free()
125 scsi_host_put(mvi->shost); in mvs_free()
200 static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost) in mvs_alloc() argument
328 struct Scsi_Host *shost, unsigned int id) in mvs_pci_alloc() argument
331 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); in mvs_pci_alloc()
350 mvi->shost = shost; in mvs_pci_alloc()
358 if (!mvs_alloc(mvi, shost)) in mvs_pci_alloc()
382 static int mvs_prep_sas_ha_init(struct Scsi_Host *shost, in mvs_prep_sas_ha_init() argument
388 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost); in mvs_prep_sas_ha_init()
[all …]
/linux/drivers/scsi/pcmcia/
H A Dqlogic_stub.c98 struct Scsi_Host *shost; /* registered host structure */ in qlogic_detect() local
109 shost = scsi_host_alloc(host, sizeof(struct qlogicfas408_priv)); in qlogic_detect()
110 if (!shost) in qlogic_detect()
112 shost->io_port = qbase; in qlogic_detect()
113 shost->n_io_port = 16; in qlogic_detect()
114 shost->dma_channel = -1; in qlogic_detect()
116 shost->irq = qlirq; in qlogic_detect()
118 priv = get_priv_by_host(shost); in qlogic_detect()
122 priv->shost = shost; in qlogic_detect()
125 if (request_irq(qlirq, qlogicfas408_ihandl, 0, qlogic_name, shost)) in qlogic_detect()
[all …]
/linux/drivers/scsi/lpfc/
H A Dlpfc_attr.c120 struct Scsi_Host *shost = class_to_shost(dev); in lpfc_cmf_info_show() local
121 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; in lpfc_cmf_info_show()
279 struct Scsi_Host *shost = class_to_shost(dev); in lpfc_vmid_info_show() local
280 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata; in lpfc_vmid_info_show()
434 struct Scsi_Host *shost = class_to_shost(dev); in lpfc_enable_fip_show() local
435 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata; in lpfc_enable_fip_show()
448 struct Scsi_Host *shost = class_to_shost(dev); in lpfc_nvme_info_show() local
449 struct lpfc_vport *vport = shost_priv(shost); in lpfc_nvme_info_show()
747 struct Scsi_Host *shost = class_to_shost(dev); in lpfc_scsi_stat_show() local
748 struct lpfc_vport *vport = shost_priv(shost); in lpfc_scsi_stat_show()
[all …]
/linux/drivers/infiniband/ulp/iser/
H A Discsi_iser.c564 struct Scsi_Host *shost = iscsi_session_to_shost(cls_session); in iscsi_iser_session_destroy() local
567 iscsi_host_remove(shost, false); in iscsi_iser_session_destroy()
568 iscsi_host_free(shost); in iscsi_iser_session_destroy()
605 struct Scsi_Host *shost; in iscsi_iser_session_create() local
611 shost = iscsi_host_alloc(&iscsi_iser_sht, 0, 0); in iscsi_iser_session_create()
612 if (!shost) in iscsi_iser_session_create()
614 shost->transportt = iscsi_iser_scsi_transport; in iscsi_iser_session_create()
615 shost->cmd_per_lun = qdepth; in iscsi_iser_session_create()
616 shost->max_lun = iscsi_max_lun; in iscsi_iser_session_create()
617 shost->max_id = 0; in iscsi_iser_session_create()
[all …]
/linux/drivers/scsi/leapraid/
H A Dleapraid_os.c50 struct Scsi_Host *shost = pci_get_drvdata(pdev); in pdev_to_adapter() local
52 if (!shost) in pdev_to_adapter()
55 return shost_priv(shost); in pdev_to_adapter()
65 shost_for_each_device(sdev, adapter->shost) { in leapraid_set_tm_flg()
87 shost_for_each_device(sdev, adapter->shost) { in leapraid_clear_tm_flg()
111 if (taskid_task <= adapter->shost->can_queue) { in leapraid_tm_cmd_map_status()
591 rc = scsi_add_device(adapter->shost, RAID_CHANNEL, in leapraid_probe_raid()
711 if (scsi_add_device(adapter->shost, RAID_CHANNEL, in leapraid_probe_boot_dev()
873 enum scsi_qc_status leapraid_queuecommand(struct Scsi_Host *shost, in leapraid_queuecommand() argument
935 static int leapraid_init_cmd_priv(struct Scsi_Host *shost, in leapraid_init_cmd_priv() argument
[all …]
/linux/drivers/scsi/libsas/
H A Dsas_init.c183 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in sas_get_linkerrors() local
184 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost); in sas_get_linkerrors()
187 to_sas_internal(sas_ha->shost->transportt); in sas_get_linkerrors()
232 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in transport_sas_phy_reset() local
233 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost); in transport_sas_phy_reset()
236 to_sas_internal(sas_ha->shost->transportt); in transport_sas_phy_reset()
266 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in sas_phy_enable() local
267 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost); in sas_phy_enable()
270 to_sas_internal(sas_ha->shost->transportt); in sas_phy_enable()
303 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); in sas_phy_reset() local
[all …]
/linux/drivers/scsi/aacraid/
H A Dlinit.c240 static enum scsi_qc_status aac_queuecommand(struct Scsi_Host *shost, in aac_queuecommand() argument
255 static const char *aac_info(struct Scsi_Host *shost) in aac_info() argument
257 struct aac_dev *dev = (struct aac_dev *)shost->hostdata; in aac_info()
664 struct Scsi_Host *shost = aac->scsi_host_ptr; in get_num_of_incomplete_fibs() local
668 scsi_host_busy_iter(shost, fib_count_iter, &fcnt); in get_num_of_incomplete_fibs()
1581 struct Scsi_Host *shost; in aac_probe_one() local
1639 shost = scsi_host_alloc(&aac_driver_template, sizeof(struct aac_dev)); in aac_probe_one()
1640 if (!shost) { in aac_probe_one()
1645 shost->irq = pdev->irq; in aac_probe_one()
1646 shost->unique_id = unique_id; in aac_probe_one()
[all …]

1234567