Home
last modified time | relevance | path

Searched refs:starget (Results 1 – 25 of 40) sorted by relevance

12

/drivers/message/fusion/
Dmptspi.c402 static int mptspi_target_alloc(struct scsi_target *starget) in mptspi_target_alloc() argument
404 struct Scsi_Host *shost = dev_to_shost(&starget->dev); in mptspi_target_alloc()
419 vtarget->id = (u8)starget->id; in mptspi_target_alloc()
420 vtarget->channel = (u8)starget->channel; in mptspi_target_alloc()
421 vtarget->starget = starget; in mptspi_target_alloc()
422 starget->hostdata = vtarget; in mptspi_target_alloc()
424 if (starget->channel == 1) { in mptspi_target_alloc()
425 if (mptscsih_is_phys_disk(ioc, 0, starget->id) == 0) in mptspi_target_alloc()
432 starget->id); in mptspi_target_alloc()
435 if (starget->channel == 0 && in mptspi_target_alloc()
[all …]
Dmptfc.c98 static int mptfc_target_alloc(struct scsi_target *starget);
101 static void mptfc_target_destroy(struct scsi_target *starget);
479 if (ri->starget) { in mptfc_register_dev()
480 vtarget = ri->starget->hostdata; in mptfc_register_dev()
517 mptfc_target_destroy(struct scsi_target *starget) in mptfc_target_destroy() argument
522 rport = starget_to_rport(starget); in mptfc_target_destroy()
526 ri->starget = NULL; in mptfc_target_destroy()
528 if (starget->hostdata) in mptfc_target_destroy()
529 kfree(starget->hostdata); in mptfc_target_destroy()
530 starget->hostdata = NULL; in mptfc_target_destroy()
[all …]
Dmptsas.c531 return phy_info->port_details->starget; in mptsas_get_starget()
538 starget) in mptsas_set_starget()
541 phy_info->port_details->starget = starget; in mptsas_set_starget()
559 struct scsi_target *starget; in mptsas_add_device_component() local
598 starget = scsi_target(sdev); in mptsas_add_device_component()
599 rphy = dev_to_rphy(starget->dev.parent); in mptsas_add_device_component()
601 sas_info->os.id = starget->id; in mptsas_add_device_component()
602 sas_info->os.channel = starget->channel; in mptsas_add_device_component()
652 struct scsi_target *starget) in mptsas_add_device_component_starget_ir() argument
666 cfg.pageAddr = starget->id; in mptsas_add_device_component_starget_ir()
[all …]
/drivers/scsi/
Dscsi_transport_spi.c226 struct scsi_target *starget = sdev->sdev_target; in spi_device_configure() local
234 spi_support_sync(starget) = scsi_device_sync(sdev); in spi_device_configure()
235 spi_support_wide(starget) = scsi_device_wide(sdev); in spi_device_configure()
236 spi_support_dt(starget) = scsi_device_dt(sdev); in spi_device_configure()
237 spi_support_dt_only(starget) = scsi_device_dt_only(sdev); in spi_device_configure()
238 spi_support_ius(starget) = scsi_device_ius(sdev); in spi_device_configure()
241 spi_support_ius(starget) = 0; in spi_device_configure()
243 spi_support_qas(starget) = scsi_device_qas(sdev); in spi_device_configure()
252 struct scsi_target *starget = to_scsi_target(dev); in spi_setup_transport_attrs() local
254 spi_period(starget) = -1; /* illegal value */ in spi_setup_transport_attrs()
[all …]
Dscsi_scan.c226 static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, in scsi_alloc_sdev() argument
231 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in scsi_alloc_sdev()
245 sdev->id = starget->id; in scsi_alloc_sdev()
247 sdev->channel = starget->channel; in scsi_alloc_sdev()
258 sdev->sdev_gendev.parent = get_device(&starget->dev); in scsi_alloc_sdev()
259 sdev->sdev_target = starget; in scsi_alloc_sdev()
284 put_device(&starget->dev); in scsi_alloc_sdev()
317 static void scsi_target_destroy(struct scsi_target *starget) in scsi_target_destroy() argument
319 struct device *dev = &starget->dev; in scsi_target_destroy()
326 shost->hostt->target_destroy(starget); in scsi_target_destroy()
[all …]
Dscsi_sysfs.c335 struct scsi_target *starget; in scsi_device_dev_release_usercontext() local
342 starget = to_scsi_target(parent); in scsi_device_dev_release_usercontext()
345 starget->reap_ref++; in scsi_device_dev_release_usercontext()
834 static int scsi_target_add(struct scsi_target *starget) in scsi_target_add() argument
838 if (starget->state != STARGET_CREATED) in scsi_target_add()
841 error = device_add(&starget->dev); in scsi_target_add()
843 dev_err(&starget->dev, "target device_add failed, error %d\n", error); in scsi_target_add()
846 transport_add_device(&starget->dev); in scsi_target_add()
847 starget->state = STARGET_RUNNING; in scsi_target_add()
849 pm_runtime_set_active(&starget->dev); in scsi_target_add()
[all …]
Dscsi_lib.c138 struct scsi_target *starget = scsi_target(device); in __scsi_queue_insert() local
167 starget->target_blocked = starget->max_target_blocked; in __scsi_queue_insert()
325 struct scsi_target *starget = scsi_target(sdev); in scsi_device_unbusy() local
330 starget->target_busy--; in scsi_device_unbusy()
351 struct scsi_target *starget = scsi_target(current_sdev); in scsi_single_lun_run() local
355 starget->starget_sdev_user = NULL; in scsi_single_lun_run()
367 if (starget->starget_sdev_user) in scsi_single_lun_run()
369 list_for_each_entry_safe(sdev, tmp, &starget->devices, in scsi_single_lun_run()
394 static inline int scsi_target_is_busy(struct scsi_target *starget) in scsi_target_is_busy() argument
396 return ((starget->can_queue > 0 && in scsi_target_is_busy()
[all …]
Dscsi.c802 struct scsi_target *starget = scsi_target(sdev); in scsi_finish_command() local
818 starget->target_blocked = 0; in scsi_finish_command()
1188 void starget_for_each_device(struct scsi_target *starget, void *data, in starget_for_each_device() argument
1191 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in starget_for_each_device()
1195 if ((sdev->channel == starget->channel) && in starget_for_each_device()
1196 (sdev->id == starget->id)) in starget_for_each_device()
1216 void __starget_for_each_device(struct scsi_target *starget, void *data, in __starget_for_each_device() argument
1219 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in __starget_for_each_device()
1223 if ((sdev->channel == starget->channel) && in __starget_for_each_device()
1224 (sdev->id == starget->id)) in __starget_for_each_device()
[all …]
Desp_scsi.c510 struct scsi_target *target = tp->starget; in esp_need_to_nego_wide()
517 struct scsi_target *target = tp->starget; in esp_need_to_nego_sync()
736 if (spi_width(tp->starget) == tp->nego_goal_width && in esp_maybe_execute_command()
737 spi_period(tp->starget) == tp->nego_goal_period && in esp_maybe_execute_command()
738 spi_offset(tp->starget) == tp->nego_goal_offset) { in esp_maybe_execute_command()
1162 dev = __scsi_device_lookup_by_target(tp->starget, lun); in esp_reconnect()
1364 spi_period(tp->starget) = scsi_period; in esp_setsync()
1365 spi_offset(tp->starget) = scsi_offset; in esp_setsync()
1366 spi_width(tp->starget) = (tp->flags & ESP_TGT_WIDE) ? 1 : 0; in esp_setsync()
1396 spi_display_xfer_agreement(tp->starget); in esp_setsync()
[all …]
Dscsi_pm.c272 void scsi_autopm_get_target(struct scsi_target *starget) in scsi_autopm_get_target() argument
274 pm_runtime_get_sync(&starget->dev); in scsi_autopm_get_target()
277 void scsi_autopm_put_target(struct scsi_target *starget) in scsi_autopm_put_target() argument
279 pm_runtime_put_sync(&starget->dev); in scsi_autopm_put_target()
Dncr53c8xx.c1246 struct scsi_target *starget; member
4065 struct scsi_target *starget = tp->starget; in ncr_prepare_nego() local
4069 if (spi_support_wide(starget)) { in ncr_prepare_nego()
4077 if (spi_support_sync(starget)) { in ncr_prepare_nego()
4081 dev_info(&starget->dev, "target did not report SYNC.\n"); in ncr_prepare_nego()
5568 spi_display_xfer_agreement(tp->starget); in ncr_setsync()
6701 struct scsi_target *starget = tp->starget; in ncr_int_sir() local
6859 spi_period(starget) = 0; in ncr_int_sir()
6860 spi_offset(starget) = 0; in ncr_int_sir()
6865 spi_width(starget) = 0; in ncr_int_sir()
[all …]
Dscsi_transport_fc.c352 struct scsi_target *starget = to_scsi_target(dev); in fc_target_setup() local
353 struct fc_rport *rport = starget_to_rport(starget); in fc_target_setup()
361 fc_starget_node_name(starget) = rport->node_name; in fc_target_setup()
362 fc_starget_port_name(starget) = rport->port_name; in fc_target_setup()
363 fc_starget_port_id(starget) = rport->port_id; in fc_target_setup()
365 fc_starget_node_name(starget) = -1; in fc_target_setup()
366 fc_starget_port_name(starget) = -1; in fc_target_setup()
367 fc_starget_port_id(starget) = -1; in fc_target_setup()
1014 struct scsi_target *starget = transport_class_to_starget(dev); \
1015 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); \
[all …]
/drivers/scsi/aic7xxx/
Daic79xx_osm.c594 ahd_linux_target_in_softc(struct scsi_target *starget) in DEF_SCSI_QCMD()
597 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); in DEF_SCSI_QCMD()
600 target_offset = starget->id; in DEF_SCSI_QCMD()
601 if (starget->channel != 0) in DEF_SCSI_QCMD()
604 return &ahd->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
608 ahd_linux_target_alloc(struct scsi_target *starget) in ahd_linux_target_alloc() argument
611 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata); in ahd_linux_target_alloc()
614 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget); in ahd_linux_target_alloc()
618 char channel = starget->channel + 'A'; in ahd_linux_target_alloc()
624 *ahd_targp = starget; in ahd_linux_target_alloc()
[all …]
Daic7xxx_osm.c554 ahc_linux_target_in_softc(struct scsi_target *starget) in DEF_SCSI_QCMD()
557 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in DEF_SCSI_QCMD()
560 target_offset = starget->id; in DEF_SCSI_QCMD()
561 if (starget->channel != 0) in DEF_SCSI_QCMD()
564 return &ahc->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
568 ahc_linux_target_alloc(struct scsi_target *starget) in ahc_linux_target_alloc() argument
571 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in ahc_linux_target_alloc()
574 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_alloc()
579 char channel = starget->channel + 'A'; in ahc_linux_target_alloc()
583 target_offset = starget->id; in ahc_linux_target_alloc()
[all …]
Daic79xx_proc.c162 struct scsi_target *starget; in ahd_dump_target_state() local
172 starget = ahd->platform_data->starget[target_id]; in ahd_dump_target_state()
173 if (starget == NULL) in ahd_dump_target_state()
184 dev = scsi_device_lookup_by_target(starget, lun); in ahd_dump_target_state()
Daic7xxx_proc.c138 struct scsi_target *starget; in ahc_dump_target_state() local
150 starget = ahc->platform_data->starget[target_offset]; in ahc_dump_target_state()
151 if (!starget) in ahc_dump_target_state()
162 sdev = scsi_device_lookup_by_target(starget, lun); in ahc_dump_target_state()
/drivers/scsi/mpt3sas/
Dmpt3sas_scsih.c672 } else if (!sas_device->starget) { in _scsih_sas_device_add()
1155 _scsih_target_alloc(struct scsi_target *starget) in _scsih_target_alloc() argument
1157 struct Scsi_Host *shost = dev_to_shost(&starget->dev); in _scsih_target_alloc()
1169 starget->hostdata = sas_target_priv_data; in _scsih_target_alloc()
1170 sas_target_priv_data->starget = starget; in _scsih_target_alloc()
1174 if (starget->channel == RAID_CHANNEL) { in _scsih_target_alloc()
1176 raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, in _scsih_target_alloc()
1177 starget->channel); in _scsih_target_alloc()
1182 raid_device->starget = starget; in _scsih_target_alloc()
1190 rphy = dev_to_rphy(starget->dev.parent); in _scsih_target_alloc()
[all …]
/drivers/scsi/mpt2sas/
Dmpt2sas_scsih.c622 } else if (!sas_device->starget) { in _scsih_sas_device_add()
1280 _scsih_target_alloc(struct scsi_target *starget) in _scsih_target_alloc() argument
1282 struct Scsi_Host *shost = dev_to_shost(&starget->dev); in _scsih_target_alloc()
1294 starget->hostdata = sas_target_priv_data; in _scsih_target_alloc()
1295 sas_target_priv_data->starget = starget; in _scsih_target_alloc()
1299 if (starget->channel == RAID_CHANNEL) { in _scsih_target_alloc()
1301 raid_device = _scsih_raid_device_find_by_id(ioc, starget->id, in _scsih_target_alloc()
1302 starget->channel); in _scsih_target_alloc()
1309 raid_device->starget = starget; in _scsih_target_alloc()
1317 rphy = dev_to_rphy(starget->dev.parent); in _scsih_target_alloc()
[all …]
/drivers/scsi/sym53c8xx_2/
Dsym_glue.c731 dev_info(&tp->starget->dev, in sym_tune_dev_queuing()
782 tp->starget = sdev->sdev_target; in sym53c8xx_slave_alloc()
784 spi_min_period(tp->starget) = tp->usr_period; in sym53c8xx_slave_alloc()
785 spi_max_width(tp->starget) = tp->usr_width; in sym53c8xx_slave_alloc()
853 starget_printk(KERN_WARNING, tp->starget, in sym53c8xx_slave_destroy()
866 tp->starget = NULL; in sym53c8xx_slave_destroy()
1904 static void sym2_set_offset(struct scsi_target *starget, int offset) in sym2_set_offset() argument
1906 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in sym2_set_offset()
1908 struct sym_tcb *tp = &np->target[starget->id]; in sym2_set_offset()
1914 static void sym2_set_period(struct scsi_target *starget, int period) in sym2_set_period() argument
[all …]
Dsym_hipd.c84 dev_info(&tp->starget->dev, "%s: ", label); in sym_print_nego_msg()
1364 static void sym_check_goals(struct sym_hcb *np, struct scsi_target *starget, argument
1367 if (!spi_support_wide(starget))
1370 if (!spi_support_sync(starget)) {
1378 if (spi_support_dt(starget)) {
1379 if (spi_support_dt_only(starget))
1422 struct scsi_target *starget = tp->starget; local
1427 sym_check_goals(np, starget, goal);
2050 struct scsi_target *starget = tp->starget; local
2052 if (tp->tprint.period != spi_period(starget) ||
[all …]
/drivers/scsi/bfa/
Dbfad_attr.c29 bfad_im_get_starget_port_id(struct scsi_target *starget) in bfad_im_get_starget_port_id() argument
38 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_port_id()
43 itnim = bfad_get_itnim(im_port, starget->id); in bfad_im_get_starget_port_id()
47 fc_starget_port_id(starget) = fc_id; in bfad_im_get_starget_port_id()
55 bfad_im_get_starget_node_name(struct scsi_target *starget) in bfad_im_get_starget_node_name() argument
64 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_node_name()
69 itnim = bfad_get_itnim(im_port, starget->id); in bfad_im_get_starget_node_name()
73 fc_starget_node_name(starget) = cpu_to_be64(node_name); in bfad_im_get_starget_node_name()
81 bfad_im_get_starget_port_name(struct scsi_target *starget) in bfad_im_get_starget_port_name() argument
90 shost = dev_to_shost(starget->dev.parent); in bfad_im_get_starget_port_name()
[all …]
/drivers/usb/storage/
Dscsiglue.c282 static int target_alloc(struct scsi_target *starget) in target_alloc() argument
284 struct us_data *us = host_to_us(dev_to_shost(starget->dev.parent)); in target_alloc()
292 starget->no_report_luns = 1; in target_alloc()
304 starget->pdt_1f_for_no_lun = 1; in target_alloc()
/drivers/scsi/ibmvscsi/
Dibmvfc.c911 static struct ibmvfc_target *__ibmvfc_get_target(struct scsi_target *starget) in __ibmvfc_get_target() argument
913 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in __ibmvfc_get_target()
918 if (tgt->target_id == starget->id) { in __ibmvfc_get_target()
932 static struct ibmvfc_target *ibmvfc_get_target(struct scsi_target *starget) in ibmvfc_get_target() argument
934 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ibmvfc_get_target()
939 tgt = __ibmvfc_get_target(starget); in ibmvfc_get_target()
1061 static void ibmvfc_get_starget_node_name(struct scsi_target *starget) in ibmvfc_get_starget_node_name() argument
1063 struct ibmvfc_target *tgt = ibmvfc_get_target(starget); in ibmvfc_get_starget_node_name()
1064 fc_starget_port_name(starget) = tgt ? tgt->ids.node_name : 0; in ibmvfc_get_starget_node_name()
1076 static void ibmvfc_get_starget_port_name(struct scsi_target *starget) in ibmvfc_get_starget_port_name() argument
[all …]
/drivers/scsi/qla2xxx/
Dqla_attr.c1532 qla2x00_get_starget_node_name(struct scsi_target *starget) in qla2x00_get_starget_node_name() argument
1534 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); in qla2x00_get_starget_node_name()
1541 starget->id == fcport->rport->scsi_target_id) { in qla2x00_get_starget_node_name()
1547 fc_starget_node_name(starget) = node_name; in qla2x00_get_starget_node_name()
1551 qla2x00_get_starget_port_name(struct scsi_target *starget) in qla2x00_get_starget_port_name() argument
1553 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); in qla2x00_get_starget_port_name()
1560 starget->id == fcport->rport->scsi_target_id) { in qla2x00_get_starget_port_name()
1566 fc_starget_port_name(starget) = port_name; in qla2x00_get_starget_port_name()
1570 qla2x00_get_starget_port_id(struct scsi_target *starget) in qla2x00_get_starget_port_id() argument
1572 struct Scsi_Host *host = dev_to_shost(starget->dev.parent); in qla2x00_get_starget_port_id()
[all …]
/drivers/scsi/libsas/
Dsas_scsi_host.c909 int sas_target_alloc(struct scsi_target *starget) in sas_target_alloc() argument
911 struct sas_rphy *rphy = dev_to_rphy(starget->dev.parent); in sas_target_alloc()
918 starget->hostdata = found_dev; in sas_target_alloc()
1159 void sas_target_destroy(struct scsi_target *starget) in sas_target_destroy() argument
1161 struct domain_device *found_dev = starget->hostdata; in sas_target_destroy()
1166 starget->hostdata = NULL; in sas_target_destroy()

12