Lines Matching refs:starget

594 ahd_linux_target_in_softc(struct scsi_target *starget)
597 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata);
600 target_offset = starget->id;
601 if (starget->channel != 0)
604 return &ahd->platform_data->starget[target_offset];
608 ahd_linux_target_alloc(struct scsi_target *starget)
611 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata);
614 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget);
618 char channel = starget->channel + 'A';
624 *ahd_targp = starget;
627 int flags = sc->device_flags[starget->id];
630 starget->id, &tstate);
634 spi_max_iu(starget) = 0;
637 spi_rti(starget) = 0;
641 spi_max_qas(starget) = 0;
644 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
645 spi_min_period(starget) = tinfo->user.period;
646 spi_max_offset(starget) = tinfo->user.offset;
650 starget->id, &tstate);
651 ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id,
664 ahd_linux_target_destroy(struct scsi_target *starget)
666 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget);
1341 struct scsi_target *starget;
1347 starget = ahd->platform_data->starget[i];
1348 if (starget != NULL) {
1349 ahd->platform_data->starget[i] = NULL;
1706 struct scsi_target *starget;
1731 starget = ahd->platform_data->starget[target];
1732 if (starget == NULL)
1736 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1737 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1738 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0)
1739 + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0)
1740 + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0)
1741 + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0)
1742 + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0)
1743 + (spi_hold_mcs(starget) ? MSG_EXT_PPR_HOLD_MCS : 0);
1745 if (tinfo->curr.period == spi_period(starget)
1746 && tinfo->curr.width == spi_width(starget)
1747 && tinfo->curr.offset == spi_offset(starget)
1752 spi_period(starget) = tinfo->curr.period;
1753 spi_width(starget) = tinfo->curr.width;
1754 spi_offset(starget) = tinfo->curr.offset;
1755 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1756 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1757 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1758 spi_rd_strm(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RD_STRM ? 1 : 0;
1759 spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0;
1760 spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0;
1761 spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0;
1762 spi_hold_mcs(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_HOLD_MCS ? 1 : 0;
1763 spi_display_xfer_agreement(starget);
2400 static void ahd_linux_set_width(struct scsi_target *starget, int width)
2402 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2407 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2408 starget->channel + 'A', ROLE_INITIATOR);
2414 static void ahd_linux_set_period(struct scsi_target *starget, int period)
2416 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2421 starget->channel + 'A',
2422 shost->this_id, starget->id, &tstate);
2439 if (spi_max_width(starget)) {
2449 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2450 starget->channel + 'A', ROLE_INITIATOR);
2454 if (spi_width(starget) == 0)
2467 static void ahd_linux_set_offset(struct scsi_target *starget, int offset)
2469 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2474 starget->channel + 'A',
2475 shost->this_id, starget->id, &tstate);
2487 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2488 starget->channel + 'A', ROLE_INITIATOR);
2502 static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
2504 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2509 starget->channel + 'A',
2510 shost->this_id, starget->id, &tstate);
2523 if (dt && spi_max_width(starget)) {
2526 ahd_linux_set_width(starget, 1);
2533 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2534 starget->channel + 'A', ROLE_INITIATOR);
2544 static void ahd_linux_set_qas(struct scsi_target *starget, int qas)
2546 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2551 starget->channel + 'A',
2552 shost->this_id, starget->id, &tstate);
2572 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2573 starget->channel + 'A', ROLE_INITIATOR);
2583 static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
2585 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2590 starget->channel + 'A',
2591 shost->this_id, starget->id, &tstate);
2605 if (iu && spi_max_width(starget)) {
2612 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2613 starget->channel + 'A', ROLE_INITIATOR);
2623 static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
2625 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2630 starget->channel + 'A',
2631 shost->this_id, starget->id, &tstate);
2645 if (rdstrm && spi_max_width(starget))
2648 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2649 starget->channel + 'A', ROLE_INITIATOR);
2659 static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
2661 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2666 starget->channel + 'A',
2667 shost->this_id, starget->id, &tstate);
2681 if (wrflow && spi_max_width(starget))
2684 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2685 starget->channel + 'A', ROLE_INITIATOR);
2695 static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
2697 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2702 starget->channel + 'A',
2703 shost->this_id, starget->id, &tstate);
2725 if (rti && spi_max_width(starget))
2728 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2729 starget->channel + 'A', ROLE_INITIATOR);
2739 static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
2741 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2746 starget->channel + 'A',
2747 shost->this_id, starget->id, &tstate);
2761 if (pcomp && spi_max_width(starget)) {
2778 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2779 starget->channel + 'A', ROLE_INITIATOR);
2789 static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
2791 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2796 starget->channel + 'A',
2797 shost->this_id, starget->id, &tstate);
2805 if (hold && spi_max_width(starget))
2808 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2809 starget->channel + 'A', ROLE_INITIATOR);