Lines Matching refs:starget
544 ahc_linux_target_in_softc(struct scsi_target *starget) in DEF_SCSI_QCMD()
547 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in DEF_SCSI_QCMD()
550 target_offset = starget->id; in DEF_SCSI_QCMD()
551 if (starget->channel != 0) in DEF_SCSI_QCMD()
554 return &ahc->platform_data->starget[target_offset]; in DEF_SCSI_QCMD()
558 ahc_linux_target_alloc(struct scsi_target *starget) in ahc_linux_target_alloc() argument
561 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata); in ahc_linux_target_alloc()
564 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_alloc()
569 char channel = starget->channel + 'A'; in ahc_linux_target_alloc()
573 target_offset = starget->id; in ahc_linux_target_alloc()
574 if (starget->channel != 0) in ahc_linux_target_alloc()
577 if (starget->channel) in ahc_linux_target_alloc()
584 *ahc_targp = starget; in ahc_linux_target_alloc()
610 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0; in ahc_linux_target_alloc()
612 spi_max_offset(starget) = 0; in ahc_linux_target_alloc()
613 spi_min_period(starget) = in ahc_linux_target_alloc()
617 starget->id, &tstate); in ahc_linux_target_alloc()
619 ahc_compile_devinfo(&devinfo, our_id, starget->id, in ahc_linux_target_alloc()
632 ahc_linux_target_destroy(struct scsi_target *starget) in ahc_linux_target_destroy() argument
634 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget); in ahc_linux_target_destroy()
644 struct scsi_target *starget = sdev->sdev_target; in ahc_linux_slave_alloc() local
666 spi_period(starget) = 0; in ahc_linux_slave_alloc()
1232 struct scsi_target *starget; in ahc_platform_free() local
1238 starget = ahc->platform_data->starget[i]; in ahc_platform_free()
1239 if (starget != NULL) { in ahc_platform_free()
1240 ahc->platform_data->starget[i] = NULL; in ahc_platform_free()
1613 struct scsi_target *starget; in ahc_send_async() local
1645 starget = ahc->platform_data->starget[target_offset]; in ahc_send_async()
1646 if (starget == NULL) in ahc_send_async()
1648 targ = scsi_transport_target_data(starget); in ahc_send_async()
1651 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0) in ahc_send_async()
1652 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0) in ahc_send_async()
1653 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0); in ahc_send_async()
1655 if (tinfo->curr.period == spi_period(starget) in ahc_send_async()
1656 && tinfo->curr.width == spi_width(starget) in ahc_send_async()
1657 && tinfo->curr.offset == spi_offset(starget) in ahc_send_async()
1662 spi_period(starget) = tinfo->curr.period; in ahc_send_async()
1663 spi_width(starget) = tinfo->curr.width; in ahc_send_async()
1664 spi_offset(starget) = tinfo->curr.offset; in ahc_send_async()
1665 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0; in ahc_send_async()
1666 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0; in ahc_send_async()
1667 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0; in ahc_send_async()
1668 spi_display_xfer_agreement(starget); in ahc_send_async()
2337 static void ahc_linux_set_width(struct scsi_target *starget, int width) in ahc_linux_set_width() argument
2339 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_width()
2344 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_width()
2345 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_width()
2351 static void ahc_linux_set_period(struct scsi_target *starget, int period) in ahc_linux_set_period() argument
2353 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_period()
2358 starget->channel + 'A', in ahc_linux_set_period()
2359 shost->this_id, starget->id, &tstate); in ahc_linux_set_period()
2372 if (spi_max_width(starget)) in ahc_linux_set_period()
2379 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_period()
2380 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_period()
2384 if (spi_width(starget) == 0) in ahc_linux_set_period()
2395 static void ahc_linux_set_offset(struct scsi_target *starget, int offset) in ahc_linux_set_offset() argument
2397 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_offset()
2402 starget->channel + 'A', in ahc_linux_set_offset()
2403 shost->this_id, starget->id, &tstate); in ahc_linux_set_offset()
2410 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_offset()
2411 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_offset()
2423 static void ahc_linux_set_dt(struct scsi_target *starget, int dt) in ahc_linux_set_dt() argument
2425 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); in ahc_linux_set_dt()
2430 starget->channel + 'A', in ahc_linux_set_dt()
2431 shost->this_id, starget->id, &tstate); in ahc_linux_set_dt()
2440 if (dt && spi_max_width(starget)) { in ahc_linux_set_dt()
2443 ahc_linux_set_width(starget, 1); in ahc_linux_set_dt()
2447 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0, in ahc_linux_set_dt()
2448 starget->channel + 'A', ROLE_INITIATOR); in ahc_linux_set_dt()
2461 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2463 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2468 starget->channel + 'A',
2469 shost->this_id, starget->id, &tstate);
2480 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2481 starget->channel + 'A', ROLE_INITIATOR);
2489 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2491 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2496 starget->channel + 'A',
2497 shost->this_id, starget->id, &tstate);
2508 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2509 starget->channel + 'A', ROLE_INITIATOR);