Lines Matching refs:starget

544 ahc_linux_target_in_softc(struct scsi_target *starget)
547 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
550 target_offset = starget->id;
551 if (starget->channel != 0)
554 return &ahc->platform_data->starget[target_offset];
558 ahc_linux_target_alloc(struct scsi_target *starget)
561 *((struct ahc_softc **)dev_to_shost(&starget->dev)->hostdata);
564 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
569 char channel = starget->channel + 'A';
573 target_offset = starget->id;
574 if (starget->channel != 0)
577 if (starget->channel)
584 *ahc_targp = starget;
610 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
612 spi_max_offset(starget) = 0;
613 spi_min_period(starget) =
617 starget->id, &tstate);
619 ahc_compile_devinfo(&devinfo, our_id, starget->id,
632 ahc_linux_target_destroy(struct scsi_target *starget)
634 struct scsi_target **ahc_targp = ahc_linux_target_in_softc(starget);
644 struct scsi_target *starget = sdev->sdev_target;
666 spi_period(starget) = 0;
1233 struct scsi_target *starget;
1239 starget = ahc->platform_data->starget[i];
1240 if (starget != NULL) {
1241 ahc->platform_data->starget[i] = NULL;
1625 struct scsi_target *starget;
1657 starget = ahc->platform_data->starget[target_offset];
1658 if (starget == NULL)
1660 targ = scsi_transport_target_data(starget);
1663 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1664 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1665 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0);
1667 if (tinfo->curr.period == spi_period(starget)
1668 && tinfo->curr.width == spi_width(starget)
1669 && tinfo->curr.offset == spi_offset(starget)
1674 spi_period(starget) = tinfo->curr.period;
1675 spi_width(starget) = tinfo->curr.width;
1676 spi_offset(starget) = tinfo->curr.offset;
1677 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1678 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1679 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1680 spi_display_xfer_agreement(starget);
2349 static void ahc_linux_set_width(struct scsi_target *starget, int width)
2351 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2356 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2357 starget->channel + 'A', ROLE_INITIATOR);
2363 static void ahc_linux_set_period(struct scsi_target *starget, int period)
2365 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2370 starget->channel + 'A',
2371 shost->this_id, starget->id, &tstate);
2384 if (spi_max_width(starget))
2391 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2392 starget->channel + 'A', ROLE_INITIATOR);
2396 if (spi_width(starget) == 0)
2407 static void ahc_linux_set_offset(struct scsi_target *starget, int offset)
2409 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2414 starget->channel + 'A',
2415 shost->this_id, starget->id, &tstate);
2422 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2423 starget->channel + 'A', ROLE_INITIATOR);
2435 static void ahc_linux_set_dt(struct scsi_target *starget, int dt)
2437 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2442 starget->channel + 'A',
2443 shost->this_id, starget->id, &tstate);
2452 if (dt && spi_max_width(starget)) {
2455 ahc_linux_set_width(starget, 1);
2459 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2460 starget->channel + 'A', ROLE_INITIATOR);
2473 static void ahc_linux_set_qas(struct scsi_target *starget, int qas)
2475 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2480 starget->channel + 'A',
2481 shost->this_id, starget->id, &tstate);
2492 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2493 starget->channel + 'A', ROLE_INITIATOR);
2501 static void ahc_linux_set_iu(struct scsi_target *starget, int iu)
2503 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2508 starget->channel + 'A',
2509 shost->this_id, starget->id, &tstate);
2520 ahc_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2521 starget->channel + 'A', ROLE_INITIATOR);