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);
1325 struct scsi_target *starget;
1331 starget = ahd->platform_data->starget[i];
1332 if (starget != NULL) {
1333 ahd->platform_data->starget[i] = NULL;
1678 struct scsi_target *starget;
1703 starget = ahd->platform_data->starget[target];
1704 if (starget == NULL)
1708 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1709 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1710 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0)
1711 + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0)
1712 + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0)
1713 + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0)
1714 + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0)
1715 + (spi_hold_mcs(starget) ? MSG_EXT_PPR_HOLD_MCS : 0);
1717 if (tinfo->curr.period == spi_period(starget)
1718 && tinfo->curr.width == spi_width(starget)
1719 && tinfo->curr.offset == spi_offset(starget)
1724 spi_period(starget) = tinfo->curr.period;
1725 spi_width(starget) = tinfo->curr.width;
1726 spi_offset(starget) = tinfo->curr.offset;
1727 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1728 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1729 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1730 spi_rd_strm(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RD_STRM ? 1 : 0;
1731 spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0;
1732 spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0;
1733 spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0;
1734 spi_hold_mcs(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_HOLD_MCS ? 1 : 0;
1735 spi_display_xfer_agreement(starget);
2365 static void ahd_linux_set_width(struct scsi_target *starget, int width)
2367 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2372 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2373 starget->channel + 'A', ROLE_INITIATOR);
2379 static void ahd_linux_set_period(struct scsi_target *starget, int period)
2381 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2386 starget->channel + 'A',
2387 shost->this_id, starget->id, &tstate);
2404 if (spi_max_width(starget)) {
2414 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2415 starget->channel + 'A', ROLE_INITIATOR);
2419 if (spi_width(starget) == 0)
2432 static void ahd_linux_set_offset(struct scsi_target *starget, int offset)
2434 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2439 starget->channel + 'A',
2440 shost->this_id, starget->id, &tstate);
2452 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2453 starget->channel + 'A', ROLE_INITIATOR);
2467 static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
2469 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2474 starget->channel + 'A',
2475 shost->this_id, starget->id, &tstate);
2488 if (dt && spi_max_width(starget)) {
2491 ahd_linux_set_width(starget, 1);
2498 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2499 starget->channel + 'A', ROLE_INITIATOR);
2509 static void ahd_linux_set_qas(struct scsi_target *starget, int qas)
2511 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2516 starget->channel + 'A',
2517 shost->this_id, starget->id, &tstate);
2537 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2538 starget->channel + 'A', ROLE_INITIATOR);
2548 static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
2550 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2555 starget->channel + 'A',
2556 shost->this_id, starget->id, &tstate);
2570 if (iu && spi_max_width(starget)) {
2577 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2578 starget->channel + 'A', ROLE_INITIATOR);
2588 static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
2590 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2595 starget->channel + 'A',
2596 shost->this_id, starget->id, &tstate);
2610 if (rdstrm && spi_max_width(starget))
2613 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2614 starget->channel + 'A', ROLE_INITIATOR);
2624 static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
2626 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2631 starget->channel + 'A',
2632 shost->this_id, starget->id, &tstate);
2646 if (wrflow && spi_max_width(starget))
2649 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2650 starget->channel + 'A', ROLE_INITIATOR);
2660 static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
2662 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2667 starget->channel + 'A',
2668 shost->this_id, starget->id, &tstate);
2690 if (rti && spi_max_width(starget))
2693 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2694 starget->channel + 'A', ROLE_INITIATOR);
2704 static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
2706 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2711 starget->channel + 'A',
2712 shost->this_id, starget->id, &tstate);
2726 if (pcomp && spi_max_width(starget)) {
2743 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2744 starget->channel + 'A', ROLE_INITIATOR);
2754 static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
2756 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2761 starget->channel + 'A',
2762 shost->this_id, starget->id, &tstate);
2770 if (hold && spi_max_width(starget))
2773 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2774 starget->channel + 'A', ROLE_INITIATOR);