Lines Matching refs:starget
592 ahd_linux_target_in_softc(struct scsi_target *starget)
595 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata);
598 target_offset = starget->id;
599 if (starget->channel != 0)
602 return &ahd->platform_data->starget[target_offset];
606 ahd_linux_target_alloc(struct scsi_target *starget)
609 *((struct ahd_softc **)dev_to_shost(&starget->dev)->hostdata);
612 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget);
616 char channel = starget->channel + 'A';
622 *ahd_targp = starget;
625 int flags = sc->device_flags[starget->id];
628 starget->id, &tstate);
632 spi_max_iu(starget) = 0;
635 spi_rti(starget) = 0;
639 spi_max_qas(starget) = 0;
642 spi_max_width(starget) = (flags & CFWIDEB) ? 1 : 0;
643 spi_min_period(starget) = tinfo->user.period;
644 spi_max_offset(starget) = tinfo->user.offset;
648 starget->id, &tstate);
649 ahd_compile_devinfo(&devinfo, ahd->our_id, starget->id,
662 ahd_linux_target_destroy(struct scsi_target *starget)
664 struct scsi_target **ahd_targp = ahd_linux_target_in_softc(starget);
1319 struct scsi_target *starget;
1325 starget = ahd->platform_data->starget[i];
1326 if (starget != NULL) {
1327 ahd->platform_data->starget[i] = NULL;
1672 struct scsi_target *starget;
1697 starget = ahd->platform_data->starget[target];
1698 if (starget == NULL)
1702 (spi_dt(starget) ? MSG_EXT_PPR_DT_REQ : 0)
1703 + (spi_qas(starget) ? MSG_EXT_PPR_QAS_REQ : 0)
1704 + (spi_iu(starget) ? MSG_EXT_PPR_IU_REQ : 0)
1705 + (spi_rd_strm(starget) ? MSG_EXT_PPR_RD_STRM : 0)
1706 + (spi_pcomp_en(starget) ? MSG_EXT_PPR_PCOMP_EN : 0)
1707 + (spi_rti(starget) ? MSG_EXT_PPR_RTI : 0)
1708 + (spi_wr_flow(starget) ? MSG_EXT_PPR_WR_FLOW : 0)
1709 + (spi_hold_mcs(starget) ? MSG_EXT_PPR_HOLD_MCS : 0);
1711 if (tinfo->curr.period == spi_period(starget)
1712 && tinfo->curr.width == spi_width(starget)
1713 && tinfo->curr.offset == spi_offset(starget)
1718 spi_period(starget) = tinfo->curr.period;
1719 spi_width(starget) = tinfo->curr.width;
1720 spi_offset(starget) = tinfo->curr.offset;
1721 spi_dt(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_DT_REQ ? 1 : 0;
1722 spi_qas(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_QAS_REQ ? 1 : 0;
1723 spi_iu(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_IU_REQ ? 1 : 0;
1724 spi_rd_strm(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RD_STRM ? 1 : 0;
1725 spi_pcomp_en(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_PCOMP_EN ? 1 : 0;
1726 spi_rti(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_RTI ? 1 : 0;
1727 spi_wr_flow(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_WR_FLOW ? 1 : 0;
1728 spi_hold_mcs(starget) = tinfo->curr.ppr_options & MSG_EXT_PPR_HOLD_MCS ? 1 : 0;
1729 spi_display_xfer_agreement(starget);
2353 static void ahd_linux_set_width(struct scsi_target *starget, int width)
2355 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2360 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2361 starget->channel + 'A', ROLE_INITIATOR);
2367 static void ahd_linux_set_period(struct scsi_target *starget, int period)
2369 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2374 starget->channel + 'A',
2375 shost->this_id, starget->id, &tstate);
2392 if (spi_max_width(starget)) {
2402 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2403 starget->channel + 'A', ROLE_INITIATOR);
2407 if (spi_width(starget) == 0)
2420 static void ahd_linux_set_offset(struct scsi_target *starget, int offset)
2422 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2427 starget->channel + 'A',
2428 shost->this_id, starget->id, &tstate);
2440 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2441 starget->channel + 'A', ROLE_INITIATOR);
2455 static void ahd_linux_set_dt(struct scsi_target *starget, int dt)
2457 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2462 starget->channel + 'A',
2463 shost->this_id, starget->id, &tstate);
2476 if (dt && spi_max_width(starget)) {
2479 ahd_linux_set_width(starget, 1);
2486 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2487 starget->channel + 'A', ROLE_INITIATOR);
2497 static void ahd_linux_set_qas(struct scsi_target *starget, int qas)
2499 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2504 starget->channel + 'A',
2505 shost->this_id, starget->id, &tstate);
2525 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2526 starget->channel + 'A', ROLE_INITIATOR);
2536 static void ahd_linux_set_iu(struct scsi_target *starget, int iu)
2538 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2543 starget->channel + 'A',
2544 shost->this_id, starget->id, &tstate);
2558 if (iu && spi_max_width(starget)) {
2565 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2566 starget->channel + 'A', ROLE_INITIATOR);
2576 static void ahd_linux_set_rd_strm(struct scsi_target *starget, int rdstrm)
2578 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2583 starget->channel + 'A',
2584 shost->this_id, starget->id, &tstate);
2598 if (rdstrm && spi_max_width(starget))
2601 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2602 starget->channel + 'A', ROLE_INITIATOR);
2612 static void ahd_linux_set_wr_flow(struct scsi_target *starget, int wrflow)
2614 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2619 starget->channel + 'A',
2620 shost->this_id, starget->id, &tstate);
2634 if (wrflow && spi_max_width(starget))
2637 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2638 starget->channel + 'A', ROLE_INITIATOR);
2648 static void ahd_linux_set_rti(struct scsi_target *starget, int rti)
2650 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2655 starget->channel + 'A',
2656 shost->this_id, starget->id, &tstate);
2678 if (rti && spi_max_width(starget))
2681 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2682 starget->channel + 'A', ROLE_INITIATOR);
2692 static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp)
2694 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2699 starget->channel + 'A',
2700 shost->this_id, starget->id, &tstate);
2714 if (pcomp && spi_max_width(starget)) {
2731 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2732 starget->channel + 'A', ROLE_INITIATOR);
2742 static void ahd_linux_set_hold_mcs(struct scsi_target *starget, int hold)
2744 struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
2749 starget->channel + 'A',
2750 shost->this_id, starget->id, &tstate);
2758 if (hold && spi_max_width(starget))
2761 ahd_compile_devinfo(&devinfo, shost->this_id, starget->id, 0,
2762 starget->channel + 'A', ROLE_INITIATOR);